nvi-1.81.6/0040755000076400001440000000000010720065733011457 5ustar skimousersnvi-1.81.6/Changes0100644000076400001440000000241110720065506012743 0ustar skimousersChanges since 1.81.5 * various compilation fixes * support for newer DBs * tcl support compiles again Changes since 1.81.4 * add Changes document * the preserve command overwrote the edited file; the problem is really in DB; a bandaid was added * configure changes - -rpath now on by default - check for iconv * handle incomplete/invalid input * upgrade libtool and automake * Motif front-end was getting out of sync; fixed * ^T works in presence of wide chars * fix use of OPT_GLOBAL (YAMAMOTO Takashi ) * missing fallback function added * fix use of both leftright and number (problem reported by Dima Dorfman ) * install everything 1.79 installed * fix count argument for commands (problem reported by Arfst Ludwig ) * perl changes - map no longer assumes its argument is the name of a perl function - EXISTS for marks * documentation changes - vi.ref converted to texinfo - vsplit documented Changes since 1.81.3 * support for newer ncurses * various other wide character related changes * eliminate spurious cursor movements on split screens * use of gtk-1.2 allowed again * small fix to Motif front-end nvi-1.81.6/LICENSE0100644000076400001440000000373510720065506012467 0ustar skimousers/*- * $Id: LICENSE,v 8.17 2000/08/18 14:58:41 bostic Exp $ (Sleepycat) $Date: 2000/08/18 14:58:41 $ */ The following are the copyrights and redistribution conditions that apply to this copy of the Vi software. /* * Copyright (c) 1991, 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 * Keith Bostic. All rights reserved. * Copyright (c) 1999, 2000 * Sven Verdoolaege. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ nvi-1.81.6/README0100644000076400001440000001006310720065733012334 0ustar skimousers# $Id: README,v 8.153 2001/04/30 09:31:12 skimo Exp $ (Berkeley) $Date: 2001/04/30 09:31:12 $ This is version 1.81.6 (2007-11-18) of nex/nvi, a reimplementation of the ex/vi text editors originally distributed as part of the Fourth Berkeley Software Distribution (4BSD), by the University of California, Berkeley. The directory layout is as follows: LICENSE ....... Copyright, use and redistribution information. README ........ This file. build.unix .... UNIX build directory. catalog ....... Message catalogs; see catalog/README. cl ............ Vi interface to the curses(3) library. clib .......... C library replacement source code. common ........ Code shared by ex and vi. db ............ A stripped-down, replacement db(3) library. dist .......... Various files used to build the vi distribution. docs .......... Ex/vi documentation, both current and historic. docs/README ... Documentation overview. docs/edit ..... Edit: A tutorial. docs/exref .... Ex Reference Manual -- Version 3.7. docs/vi.man ... UNIX manual page for nex/nvi. docs/vi.ref ... Nex/nvi reference manual. docs/vitut .... An Introduction to Display Editing with Vi. ex ............ Ex source code. gtk ........... Vi gtk application. include ....... Replacement include files. ip ............ Library interface to vi: vi side. ipc ........... Library interface to vi: application side. motif ......... Vi motif application. motif_l ....... Motif library interface to vi. perl_api ...... Perl scripting language support. perl_scripts .. Perl scripts. regex ......... POSIX 1003.2 regular expression library. tcl_api ....... Tcl scripting language support. tcl_scripts ... Tcl scripts. vi ............ Vi source code. To build DB for a UNIX platform: cd build.unix ../dist/configure make To build multiple UNIX versions of DB in the same source tree, create a new directory then configure and build. mkdir build.bsdos3.0 cd build.bsdos3.0 ../dist/configure make For additional information about building DB for UNIX platforms, the description of possible configuration options and other information on DB configuration and build issues, see the file build.unix/README. Bug fixes and updated versions of this software will periodically be made available. For more information, as well as a list of Frequently Asked Questions, see: http://www.bostic.com/vi To ask questions about vi, report vi problems, request notification of future releases and/or bug fixes, or to contact the authors for any reason, please send email to: bostic@bostic.com =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= o This software is several years old and is the product of many folks' work. This software was originally derived from software contributed to the University of California, Berkeley by Steve Kirkendall, the author of the vi clone elvis. Without his work, this work would have been far more difficult. IEEE POSIX 1003.2 style regular expression support is courtesy of Henry Spencer, for which I am *very* grateful. Elan Amir did the original 4BSD curses work that made it possible to support a full-screen editor using curses. George Neville-Neil added the Tcl interpreter, and the initial interpreter design was his. Sven Verdoolaege added the Perl interpreter. Rob Mayoff provided the original Cscope support. o Many, many people suggested enhancements, and provided bug reports and testing, far too many to individually thank. o From the original vi acknowledgements, by William Joy and Mark Horton: Bruce Englar encouraged the early development of this display editor. Peter Kessler helped bring sanity to version 2's command layout. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made the editor work on a large number of terminals and Unix systems. o And... The financial support of UUNET Communications Services is gratefully acknowledged. nvi-1.81.6/README.1st0100644000076400001440000000072210720065506013041 0ustar skimousersThis is a development version of nvi. Use at your own risk. Please do not contact the original authors about bugs you find in this version. Contact skimo-vi@kotnet.org instead. There is no guarantee that anything in this version will be available in upcoming stable releases. New versions will be made available on http://www.kotnet.org/~skimo/nvi As always this software comes with absolutely NO WARRANTY. Now read the original README file. Sven Verdoolaege nvi-1.81.6/README.DB30100644000076400001440000000175610720065506012712 0ustar skimousersThis version of vi requires DB3.1 or better, which can be found on http://www.sleepycat.com/ . Note that there is a small problem with DB 3.2 in that it will not let nvi read in a final line that doesn't end in a newline. This should be fixed in DB 3.3 If your system library (such as glibc prior to version 2.2) uses a previous version of db (e.g. DB2) internally, you must configure with --enable-dynamic-loading to avoid symbols in the internally used db from being resolved against the newer db. If, on top of that, the vi binary is explicitly linked against that previous version of db (such as might happen if you enable the perl embedding), you should compile the 3.x version with all symbols internally resolved. In case you use the Gnu linker (ld), this can be accomplished by passing it the -Bsymbolic option. You can do this by setting CC to e.g. "gcc -Wl,-Bsymbolic" prior to configuring db. See docs/ref/build_unix/flags.html in the db distribution for more information. skimo@kotnet.org nvi-1.81.6/TODO0100644000076400001440000001141510720065506012144 0ustar skimousers# $Id: TODO,v 8.2 1997/04/12 15:53:31 bostic Exp $ (Berkeley) $Date: 1997/04/12 15:53:31 $ ======================================================================== GENERAL ======================================================================== 2.0: Open mode is not yet implemented. ======================================================================== DB ======================================================================== 1.N When nvi edits files that don't have trailing newlines, it appends one, regardless. This is required, by default, from POSIX.2. 1.N: If you run out of space in the recovery directory, the recovery file is left in place. 2.0: It's known that it's possible to sync the backing files in the wrong manner, leaving backup files that aren't recoverable. This is going to be left alone until we have a logging version of DB, which will hopefully fix this (or at least make it possible to easily do so). ======================================================================== VI ======================================================================== 1.N: Make the search pattern and command history (what the '.' command executes) remembered between windows, or configurable so that it is. 1.N: Change the screen scrolling to not eat user characters... i.e. g/pattern/foo should not eat already entered chars. 1.N: The vi main command loop should use the general-purpose overflow and underflow routines. In addition, the vi command loop uses unsigned longs -- should probably be fixed as a 32-bit unsigned type, and then check to make sure it's never used as as variable type again. 1.N: Should "view" set a lock on the file? 1.N: Should "view" copy the file (or even open a recovery file)? 1.N: The strings found by searches should be highlighted until the next character is entered. 1.N: Display a split vi screen for the :help command. 1.N: When getting a key for a continue screen, we should always read from the terminal, not from a mapped key. 1.N: The sentence, paragraph and section movement commands don't match historic practice in some boundary cases. This should be left alone until POSIX 1003.2 makes up its mind. 1.N: The vs_sm_fill routine should scroll if possible, not always redraw. 1.N: Think about setting a dirty/inuse bits on the lines of the SMAP structure. That way the message routines could steal lines and refresh would continue to work, because it would know not to touch the lines that were in use. ======================================================================== EX ======================================================================== 2.0: ^C isn't passed to the shell in the script windows as an interrupt character. 2.0: It would be nice to inverse video the replaced text during interactive substitute. 2.0: The :args command should put the current file name out in reverse video. This isn't going to be easy, currently only full lines can be in reverse video, not just parts. ======================================================================== CURSES ======================================================================== 1.N In single-line screens, have to press 'q' twice when quitting out of a ":set all" display. ======================================================================== MOTIF/IPC ======================================================================== 1.N: We currently permit the user to change the lines, columns and term edit options. Shouldn't that be illegal in a window interface? ======================================================================== REDESIGN ======================================================================== 2.0: There's a serious problem with error returns -- we need to separate command failure from fatal error, consistently, over the entire source tree. We need to rework all of vi to have three return values: 0: success 1: vi error, continue 2: fatal error, die Right now we don't recognize fatal errors for what they are. 2.0: The complete list of POSIX.1 calls that can return EINTR are: wait, waitpid, sleep, dup2, close, read, write, fcntl(SETLCKW) tcsetattr, tcdrain The problem is that technically, any system/library call can return EINTR, so, while nvi blocks (most of?) the obvious ones, someone may have to do a complete pass and block signals everywhere. 2.0: The options hardtabs, lisp, optimize, redraw, and slowopen are recognized, but not implemented. 2.0: Field editing shouldn't be hard to add to nvi: Field editing file template: version # field # row/column start row/column stop label field # Label string re field # Matching re string. field # row/column start row/column stop label field # Label string re field # Matching re string. moves to the next field in column 0 moves to the previous field nvi-1.81.6/build.unix/0040755000076400001440000000000010720065506013536 5ustar skimousersnvi-1.81.6/build.unix/README0100644000076400001440000003061210720065506014415 0ustar skimousers# $Id: README,v 8.29 2001/05/13 20:52:36 skimo Exp $ (Berkeley) $Date: 2001/05/13 20:52:36 $ Nvi uses the GNU autoconf program for configuration and compilation. You should enter: ../dist/configure make and nvi will configure the system and build one or two binaries: nvi and tknvi. You can use any path to the configure script, e.g., to build for an x86 architecture, I suggest that you do: mkdir build.x86 cd build.x86 ../dist/configure make There are options that you can specify to the configure command. See the next section for a description of these options. If you want to rebuild or reconfigure nvi, for example, because you change your mind as to the curses library that you want to use, create a new directory and reconfigure it using "configure" and whatever options you choose, don't try to selectively edit the files. By default, nvi is installed as "vi", with hard links to "ex" and "view". To install them using different names, use the configure program options. For example, to install them as "nvi", "nex" and "nview", use: configure --program-prefix=n See the section below on installation for details. Note, if you're building nvi on a LynxOS system, you should read the README.LynxOS file in this directory for additional build instructions that are specific to that operating system. If you have trouble with this procedure, send email to the addresses listed in ../README. In that email, please provide a complete script of the output for all of the above commands that you entered. =-=-=-=-=-=-= NVI'S OPTIONS TO THE CONFIGURE PROGRAM =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= There are many options that you can enter to the configuration program. To see a complete list of the options, enter "configure --help". Only a few of them are nvi specific. These options are as follows: --disable-re DON'T use the nvi-provided RE routines. --enable-debug Build a debugging version. --enable-perlinterp Include a Perl interpreter in vi. --enable-tclinterp Include a Tk/Tcl interpreter in vi. --enable-gtk Build a gtk front-end. --enable-motif Build a motif front-end. --enable-threads Turn on thread support. --enable-widechar Build a wide character aware vi (experimental). --with-curses=DIR Path to curses installation. --with-db3=db3prefix Path to db3 installation. --enable-dynamic-loading Load DB 3 dynamically. disable-re: By default, nvi loads its own versions of the POSIX 1003.2 Regular Expression routines (which are Henry Spencer's implementation). If your C library contains an implementation of the POSIX 1003.2 RE routines (note, this is NOT the same as the historic UNIX RE routines), and you want to use them instead, enter: --disable-re as an argument to configure, and the RE routines will be taken from whatever libraries you load. Please ensure that your RE routines implement Henry Spencer's extensions for doing vi-style "word" searches. enable-debug: If you want to build nvi with no optimization (i.e. without -O as a compiler flag), with -g as a compiler flag, and with DEBUG defined during compilation, enter: --enable-debug as an argument to configure. enable-perlinterp: If you have the Perl 5 libraries and you want to compile in the Perl interpreter, enter: --enable-perlinterp as an argument to configure. (Note: this is NOT possible with Perl 4, or even with Perl 5 versions earlier than 5.002.) enable-tclinterp: If you have the Tk/Tcl libraries and you want to compile in the Tcl/Tk interpreter, enter: --enable-tclinterp as an argument to configure. If your Tk/Tcl include files and libraries aren't in the standard library and include locations, see the next section of this README file for more information. enable-gtk: If you have the Gtk libraries and you want to build the Gtk nvi front-end, enter: --enable-gtk as an argument to configure. If your Gtk include files and libraries aren't in the standard library and include locations, see the next section of this README file for more information. See also the enable-threads option. enable-motif: If you have the Motif libraries and you want to build the Motif nvi front-end, enter: --enable-motif as an argument to configure. If your Motif include files and libraries aren't in the standard library and include locations, see the next section of this README file for more information. enable-threads: If you want to be able to use multiple windows in the Gtk front-end, you should specify this option. with-curses: Specifies the path where curses is installed. with-db3: Specifies the path where DB3 is installed. See README.DB3 for more information about DB3. enable-dynamic-loading: Dynamically load DB3 library. See README.DB3 for more information about DB3. enable-widechar: Enables support for wide characters. Note that this is still rather experimental. If you try this out on Solaris, you will want to point nvi to the curses in /usr/xpg4/ which is CSI compliant. =-=-=-=-=-=-= ADDING OR CHANGING COMPILERS, OR COMPILE OR LOAD LINE FLAGS =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= If you want to use a specific compiler, specify the CC environment variable before running configure. For example: env CC=gcc configure Using anything other than the native compiler will almost certainly mean that you'll want to check the compile and load line flags, too. If you want to specify additional load line flags, specify the ADDLDFLAGS environment variable before running configure. For example: env ADDLDFLAGS="-Q" configure would specify the -Q flag in the load line when the nvi programs are loaded. If you don't want configure to use the default load line flags for the system, specify the LDFLAGS environment variable before running configure. For example: env LDFLAGS="-32" configure will cause configure to set the load line flags to "-32", and not set them based on the current system. If you want to specify additional compile line flags, specify the ADDCPPFLAGS environment variable before running configure. For example: env ADDCPPFLAGS="-I../foo" configure would cause the compiler to be passed the -I../foo flag when compiling test programs during configuration as well as when building nvi object files. If you don't want configure to use the default compile line flags for the system, specify the CPPFLAGS environment variable before running configure. For example: env CPPFLAGS="-I.." configure will cause configure to use "-I.." as the compile line flags instead of the default values. =-=-=-=-=-=-= ADDING LIBRARIES AND INCLUDE FILES =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= If the Tk/Tcl or any other include files or libraries are in non-standard places on your system, you will need to specify the directory path where they can be found. If you want to specify additional library paths, set the ADDLIBS environment variable before running configure. For example: env ADDLIBS="-L/a/b -L/e/f -ldb" configure would specify two additional directories to search for libraries, /a/b and /e/f, and one additional library to load, "db". If you want to specify additional include paths, specify the ADDCPPFLAGS environment variable before running configure. For example: env ADDCPPFLAGS="-I/usr/local/include" LIBS="-ldb" configure would search /usr/local/include for include files, as well as load the db library as described above. As a final example, let's say that you've downloaded ncurses from the net and you've built it in a directory named ncurses which is at the same level in the filesystem hierarchy as nvi. You would enter something like: env ADDCPPFLAGS="-I../../ncurses/include" \ ADDLIBS="-L../../ncurses/libraries" configure to cause nvi to look for the curses include files and the curses library in the ncurses environment. Notes: Make sure that you prepend -L to any library directory names, and that you prepend -I to any include file directory names! Also, make sure that you quote the paths as shown above, i.e. with single or double quotes around the values you're specifying for ADDCPPFLAGS and ADDLIBS. =-=-=-=-=-= You should NOT need to add any libraries or include files to load the Perl5 interpreter. The configure script will obtain that information directly from the Perl5 program. This means that the configure script must be able to find perl in its path. It looks for "perl5" first, and then "perl". If you're building a Perl interpreter and neither is found, it's a fatal error. =-=-=-=-=-= You do not need to specify additional libraries to load Tk/Tcl, Perl or curses, as the nvi configuration script adds the appropriate libraries to the load line whenever you specify --enable-tknvi or other Perl or Tk/Tcl related option, or build the Tk/Tcl or curses version of nvi. The library names that are automatically loaded are as follows: for Perl: -lperl for Tk/Tcl: -ltk -ltcl -lm for curses: -lcurses In addition, the configure script loads: ... the X libraries when loading the Tk/Tcl libraries, if they exist. ... the -ltermcap or -ltermlib libraries when loading any curses library, if they exist. =-=-=-=-=-= The env command is available on most systems, and simply sets one or more environment variables before running a command. If the env command is not available to you, you can set the environment variables in your shell before running configure. For example, in sh or ksh, you could do: ADDLIBS="-L/a/b -L/e/f -ldb" configure and in csh or tcsh, you could do: setenv ADDLIBS "-L/a/b -L/e/f -ldb" configure See your shell manual page for further information. =-=-=-=-=-=-= INSTALLING NVI =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Nvi installs the following files into the following locations, with the following default values: Variables: Default value: prefix /usr/local exec_prefix $(prefix) bindir $(prefix)/bin datadir $(prefix)/share mandir $(prefix)/man File(s): Default location ---------------------------------------- vi $(bindir)/vi vi.1 $(mandir)/man1/vi.1 vi.0 $(mandir)/cat1/vi.0 Perl scripts $(datadir)/vi/perl/ Tcl scripts $(datadir)/vi/tcl/ Message Catalogs $(datadir)/vi/catalog/ Notes: There are two hard links to the vi program, named ex and view. Similarly, there are two hard links to the unformatted vi manual page, named ex.1 and view.1, and two hard links to the formatted manual page, named ex.0 and view.0. These links are created when the program and man pages are installed. If you want to install vi, ex, view and the man pages as nvi, nex, nview, use the configure option --program-prefix=n. Other, more complex transformations are possible -- use configure --help to see more options. To move the entire installation tree somewhere besides /usr/local, change the value of both "exec_prefix" and "prefix". To move the binaries to a different place, change the value of "bindir". Similarly, to put the datafiles (the message catalogs, Perl and Tcl scripts) or the man pages in a different place, change the value of "datadir" or "mandir". These values can be changed as part of configuration: configure --exec_prefix=/usr/contrib --prefix=/usr/share or when doing the install itself: make exec_prefix=/usr/contrib prefix=/usr/contrib install The datafile directory (e.g., /usr/local/share/vi by default) is completely removed and then recreated as part of the installation process. =-=-=-=-=-=-= NVI AND THE CURSES LIBRARY =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The major portability problem for nvi is selecting a curses library. Unfortunately, it is common to find broken versions of curses -- the original System V curses was broken, resulting in all vendors whose implementations are derived from System V having broken implementations in turn. If you use the vendor's or other curses library, and you see any of the following symptoms: + Core dumps in curses routines. + Missing routines when compiling. + Repainting the wrong characters on the screen. + Displaying inverse video in the wrong places. + Failure to reset your terminal to the correct modes on exit. you have a broken curses implementation, and you should reconfigure nvi to use another curses library. An alternative for your vendor's curses is ncurses, available from ftp://ftp.gnu.org/pub/gnu/ncurses/ One final note. If you see the following symptoms: + Line-by-line screen repainting instead of scrolling. it usually means that your termcap or terminfo information is insufficient for the terminal. nvi-1.81.6/build.unix/README.LynxOS0100644000076400001440000003504310720065506015613 0ustar skimousersREADME.LynxOS ============= Written by Ronald F. Guilmette Last modified Wed Aug 14 23:10:07 PDT 1996 ------------------------------------------ 0. Introduction --------------- This file describes how to build and install the Berkeley nvi editor for the LynxOS 2.4.0 operating system. LynxOS 2.4.0 is available for a variety of different hardware platforms, in particular, x86, m680x0, Sparc, and PowerPC. I have successfully built nvi on all four of these flavors of LynxOS by following the procedures given in this file. Note that these procedures may not work on versions of LynxOS prior to 2.4.0. (As I understand it, a good deal of work went into making the 2.4.0 release more POSIX-compliant, and I have no idea what build glitches, if any, you might encounter if you try to build nvi on a pre-2.4.0 version of LynxOS.) There are basically four steps to configuring, building, and installing nvi on LynxOS, namely: 1. Get setup to use the proper C compiler. 2. Replace your installed `tr' program. 3. Fix your system include files. 4. Do a normal configure, build, and install of nvi. These steps are described in separate sections below. 1. Get Setup to Use the Proper C Compiler ------------------------------------------ The first step when building nvi on LynxOS is to set your $PATH environment variable properly so that the gcc 2.x compiler appears first on your path, prior to the older (and less robust) gcc 1.xx compiler (typically installed as /bin/gcc) and/or the old Lynx proprietary C compiler (typically installed as /bin/cc), both of which may also be present on your system. Note that for most operating systems, the configure script for nvi tries to use whatever compiler you have installed (and in your $PATH) as "cc", however in the special case of LynxOS, the configure script will auto- matically try to find a "gcc" program on your $PATH in preference to a compiler called "cc". If the nvi configure script only find a compiler called "cc", that's OK. It will still try to see if that is really just the GNU C compiler installed under the name "cc". Regardless of the name however (be it "gcc" or "cc") the first C compiler in your $PATH should be some _recent_ (i.e. 2.0 or later) version of the GNU C compiler... and the nvi configure script now checks that this is the case, and fails if it isn't. Oddly enough, LynxOS 2.4.0 (and some prior versions) shipped with as many as three different C compilers installed, so it is important to set your $PATH environment variable carfully in order to get the proper C compiler to appear first in your $PATH. You want to avoid having either the /bin/gcc compiler or the /bin/cc compiler be the first C compiler in your $PATH. To make sure that the GNU C version 2.x compiler which was shipped with your LynxOS system appears first on your path, you will need to either set your $PATH variable (for sh/bash/ksh users) or your $path variable (for csh/tcsh users). You can, of course, just do this at the shell command prompt, but it is probably better to actually edit this change into your .profile file (for sh/bash/ksh users) or into your .cshrc file (for csh/tcsh users). The pathname of the directory that contains the GNU C version 2.x compiler is (unfortunately) dependent upon the exact type of LynxOS system you have. For LynxOS 2.4.0 on x86 systems, gcc 2.x is located in: /cygnus/94q4-lynxos-x86/bin For LynxOS 2.4.0 on m680x0 systems, gcc 2.x is located in: /cygnus/94q4-lynxos-68k/bin For LynxOS 2.4.0 on Sparc systems, gcc 2.x is located in: /cygnus/94q4-lynxos-usparc/bin For LynxOS 2.4.0 on PowerPC systems, gcc 2.x is located in: /cygnus/95q2-lynxos-ppc/bin (Note also that these locations may change in LynxOS 2.5.x and beyond.) Anyway, it is imperative that you setup your $PATH environment variable (*before* you do the configure step for nvi) so that the GNU C version 2.x compiler appears in your $PATH before either the /bin/cc or /bin/gcc compilers (if present). If you fail to do this, the configure step for nvi will fail, because the compiler script actually checks (now) that the compiler you are using (if your are on a LynxOS system) is gcc 2.0 or later. To make absolutely sure that you will be configuring and building nvi with the proper C compiler (i.e. the GNU C version 2.x compiler on your system) you should add the directory name listed above for your specific system type to your $PATH setting in your $HOME/.profile file. (For csh/tcsh users, you will instead want to add the relevant directory name to the setting of your $path variable in your ~/.cshrc file.) Once you have added the proper direc- tory name (from the list given above) to your $HOME/.profile file (or to your ~/.cshrc file, if you are using csh or tcsh) you should log out completely and then log back into the system just to make sure your new $PATH/$path setting takes effect properly. When you finish making this adjustment to your $PATH (or $path), the most up-to-date version of gcc on your system should be available to you as the first `gcc' program on your $PATH. You should verify that this is indeed the case simply by typing `gcc -v' and then checking the version number reported by the compiler. It should say either "2.6-94q4" or (on PowerPC systems) it should say "2.6-95q2". If you don't get these results, try again to set your $PATH (or $path) until you do. You won't be able to build nvi until you are properly setup to use gcc version 2.0 or later. Performing the steps shown above will insure that your subsequent configura- tion and build steps for nvi will make use of the most up-to-date version of gcc that was shipped with your Lynx operating system. (Note that the versions of gcc which are currently shipping with LynxOS 2.4.0 are also somewhat out- of-date themselves, but they are still quite a bit newer and more bug-free and ANSI conformant that those other two C compilers, /bin/cc and /bin/gcc, which also ship with LynxOS 2.4.0.) (Note: At present, LynxOS version 2.4.0 is the latest officially released version of LynxOS, and all of the above information is accurate and correct for LynxOS 2.4.0 as of the time of this writing. However it is rumored that future releases of LynxOS may provide a still newer version of gcc, and that it may be located in the /usr/bin directory. Thus, if you are building nvi for some LynxOS version later than 2.4.0, you may wish to check and see if your system has a program called /usr/bin/gcc, and use that version of gcc, if available, rather than the one suggested above.) 2. Replace Your Installed `tr' Program --------------------------------------- The `tr' program which comes bundled with LynxOS 2.4.0 (as /bin/tr) has a somewhat obscure bug which just happens to be tickled by almost all GNU `autoconf' generated `configure' scripts (including the one that nowadays comes bundled with nvi). Using the stock /bin/tr program on LynxOS when executing such `configure' scripts _will_ cause these scripts to malfunction in various ways. It is therefore imperative that you replace your LynxOS /bin/tr program with a properly working version of the `tr' command _before_ you even try to configure nvi. (You can tell if your `tr' program has the bug by executng the command "echo ab- | tr ab- ABC". If this yields the string "Ab-" then you have the bug. If it yields "ABC" then you don't.) You can obtain sources for a working version of the `tr' command as part of the GNU `textutils' package (the latest version of which, at the time of this writing, is 1.19). The GNU textutils package is available for downloading from prep.ai.mit.edu in the pub/gnu directory. Look for the file named textutils-1.19.tar.gz, or an even more recent version of textutils, if one is available. Fetch it, gunzip it, untar it, and follow the directions in the INSTALL file included in the tar file to build and install the entire textutils set of utility programs (which includes a working `tr' program). Then just make sure that the GNU version of `tr' appears on your $PATH _before_ the LynxOS version of `tr' (i.e. /bin/tr). Be sure to do this step _before_ you start to configure nvi. When building the textutils set of programs, I suggest that you use the most up-to-date C compiler available on your system (as described above). Also, note that it will be important for you to AVOID using the -O (optimize) compiler option when building the GNU textutils package, even if you are using the most up-to-date version of gcc which shipped with your system. If you try to use -O when building the textutils package on an x86 with the Cygnus 94q4 C compiler, you will end up with a `tr' program which will malfunction even worse than the one you are trying to replace! If you use -O when building the textutils package on LynxOS on the PowerPC (using the Cygnus 95q2 C compiler) you will just get yourself a compiler crash. So just don't use -O when building textutils. You can avoid using -O by in- voking make in the textutils directory as follows: make CFLAGS="-g" (Note: At present, LynxOS version 2.4.0 is the latest officially released version of LynxOS, and all of the above information is accurate and correct for LynxOS 2.4.0 as of the time of this writing. However it is rumored that the bug in the /bin/tr program will be fixed in future releases of LynxOS, so if you have a version of LynxOS later than 2.4.0, you may wish to check and see if your /bin/tr program even has the problematic bug before bothering with all of this.) 3. Fix Your System Include Files --------------------------------- If you are building nvi on a PowerPC system, it is also important that you apply the patches given at the end of this file to your /usr/include files. (Note that you will have to be root in order to do this.) Two of the patches included below fix a pair of serious bugs in the /usr/include/stdarg.h file on the PowerPC, and you really _do_ want to have these bugs fixed anyway, because without these fixes, anything that you compile which uses will very likely malfunction at run-time. Regardless of which LynxOS platform you are using (i.e. x86, PowerPC, Sparc, or m680x0) you may want to apply all of the system include files patches that are included below anyway. Doing so will clean up a few minor problems with the relevant system include files (i.e. , , and ) and this step will also prevent a few warnings which you would otherwise get during the build of nvi. You can apply all of the patches given at the end of this file simply by doing the following: su root cd /usr/include /bin/patch < this-file Where `this-file' is the actual full pathname of the file you are now reading, wherever it may reside on your own system. (Note: At present, LynxOS version 2.4.0 is the latest officially released version of LynxOS, and all of the above information is accurate and correct for LynxOS 2.4.0 as of the time of this writing. However it is rumored that future releases of LynxOS may incorporate some or all of the important system include file fixes provided below. Thus, if you are building nvi for some LynxOS version later than 2.4.0, you should probably go ahead and try to apply the patches given below to your system include files, and then just don't worry about it if these patches seem to have already been applied.) 4. A Brief Note about Sendmail ------------------------------- I should mention also that LynxOS does not normally ship with the `sendmail' mail transfer program installed, either under /usr/lib/ or anywhere else for that matter. This isn't really a big problem, but nvi normally wants and expects to have a sendmail program available so that it can send users notifi- cations (by mail) whenever a partially edited file is preserved by the editor in response to a sudden system crash, a sudden system shutdown, or an unexpect- ed serial-line hangup. You can configure and build nvi without any sendmail program installed on your system, but you will get warnings about its absence when you are doing the initial configure step prior to actually building nvi. If you want to have a fully-functional nvi which does send out notification messages (by mail) whenever partially edited files are preserved during a serial line hangup or system crash, then you should get the BSD sendmail sources (via ftp from ftp.cs.berkeley.edu), build and install sendmail, and then reconfigure, rebuild, and reinstall nvi. Please contact me at the E-mail address below if you experience any problems in building or using nvi on LynxOS. I make no guarrantees, but I may be willing to try to help. Ron Guilmette Roseville, California August 14, 1996 cut here for LynxOS 2.4.0 system include files patches ----------------------------------------------------------------------------- *** wait.h Fri Apr 26 10:02:45 1996 --- wait.h Sun May 19 05:36:50 1996 *************** *** 94,104 **** /* Function prototypes */ #ifndef __LYNXOS - #ifdef _POSIX_SOURCE extern pid_t wait _AP((int *)); extern pid_t waitpid _AP((pid_t, int *, int)); ! #else ! extern int wait _AP((union wait *)); ! extern int waitpid _AP((int, union wait *, int)); ! extern int wait3 _AP((union wait *, int, struct rusage *)); #endif #endif /* !__LYNXOS */ --- 94,101 ---- /* Function prototypes */ #ifndef __LYNXOS extern pid_t wait _AP((int *)); extern pid_t waitpid _AP((pid_t, int *, int)); ! #ifndef _POSIX_SOURCE ! extern int wait3 _AP((int *, int, struct rusage *)); #endif #endif /* !__LYNXOS */ *** ioctl.h Fri Apr 26 16:50:51 1996 --- ioctl.h Sat May 18 17:55:16 1996 *************** *** 572,576 **** #ifndef __LYNXOS ! extern int ioctl _AP((int, int, char *)); #endif --- 572,576 ---- #ifndef __LYNXOS ! extern int ioctl _AP((int, int, ...)); #endif *** stdarg.h Fri Apr 26 16:51:02 1996 --- stdarg.h Sat May 18 19:34:13 1996 *************** *** 88,92 **** (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) ! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg ())) void va_end(va_list); /* Defined in libgcc.a */ --- 88,92 ---- (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) ! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg (LASTARG))) void va_end(va_list); /* Defined in libgcc.a */ *************** *** 162,166 **** (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) ! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg ())) void va_end(va_list); /* Defined in libgcc.a */ --- 162,166 ---- (((sizeof(TYPE) + sizeof(int) - 1) / sizeof(int)) * sizeof(int)) ! #define va_start(AP, LASTARG) (AP = ((char *) __builtin_next_arg (LASTARG))) void va_end(va_list); /* Defined in libgcc.a */ nvi-1.81.6/build.unix/README.Solaris0100644000076400001440000000106010720065506016023 0ustar skimousersThere are some known problems with Solaris curses. Please give ncurses a try when you encounter a screen output problem. Apparently, the more recent Solaris compilers invoke the incremental linker, `ild', when the "-g" option is used and one or more "xxx.o" files are specified on the command line during the link phase. Unfortunately, the executable produced is up to 3-4 times as big as an executable generated by the standard linker `ld'. You can bypass this by adding "-xildoff" to LDFLAGS or by setting CFLAGS (to something that does not contain "-g"). nvi-1.81.6/catalog/0040755000076400001440000000000010720065506013067 5ustar skimousersnvi-1.81.6/catalog/Makefile0100644000076400001440000000477210720065506014536 0ustar skimousers# $Id: Makefile,v 8.30 1996/11/27 11:59:09 bostic Exp $ (Berkeley) $Date: 1996/11/27 11:59:09 $ CAT= dutch english french german ru_SU.KOI8-R spanish swedish FILES= ../cl/*.c ../common/*.c ../ex/*.c ../vi/*.c all: dump ${CAT} ${CAT}: english.base @echo "... $@"; \ rm -f $@; \ sort -u $@.base | \ awk '{ \ if ($$1 == 1) { \ print "\nMESSAGE NUMBER 1 IS NOT LEGAL"; \ exit 1; \ } \ if (++nline > $$1) { \ print "DUPLICATE MESSAGE NUMBER " $$1; \ exit 1; \ } \ for (; nline < $$1; ++nline) \ print ""; \ print $0; \ }' | \ sed -e '1s/^/VI_MESSAGE_CATALOG/' \ -e '/"/s/^[^"]*"//' \ -e '1!s/"$$/X/' > $@; \ chmod 444 $@; \ if grep DUPLICATE $@ > /dev/null; then \ grep DUPLICATE $@; \ fi; \ if grep 'NOT LEGAL' $@ > /dev/null; then \ grep 'NOT LEGAL' $@; \ fi CHK= dutch.check english.check french.check german.check \ ru_SU.KOI8-R.check spanish.check swedish.check check: ${CHK} ${CHK}: ${CAT} @echo "... $@"; \ f=`basename $@ .check`; \ (echo "Unused message id's (this is okay):"; \ awk '{ \ while (++nline < $$1) \ printf "%03d\n", nline; \ }' < $$f.base; \ echo =========================; \ echo "MISSING ERROR MESSAGES (Please add!):"; \ awk '{print $$1}' < $$f.base | sort -u > __ck1; \ awk '{print $$1}' < english.base | sort -u > __ck2; \ comm -13 __ck1 __ck2; \ echo =========================; \ echo "Extra error messages (just delete them):"; \ comm -23 __ck1 __ck2; \ echo =========================; \ echo "MESSAGES WITH THE SAME MESSAGE ID's (FIX!):"; \ for j in \ `sed '/^$$/d' < $$f.base | sort -u | \ awk '{print $$1}' | uniq -d`; do \ egrep $$j $$f.base; \ done; \ echo =========================; \ echo "Duplicate messages, both id and message (this is okay):"; \ sed '/^$$/d' < $$f.base | sort | uniq -c | \ awk '$$1 != 1 { print $$0 }' | sort -n; \ echo =========================; \ echo "Duplicate messages, just message (this is okay):"; \ sed '/^$$/d' < $$f | sort | uniq -c | \ awk '$$1 != 1 { print $$0 }' | sort -n; \ echo =========================) > $@ english.base: dump ${FILES} #Makefile ./dump ${FILES} |\ sed -e '/|/!d' \ -e 's/|/ "/' \ -e 's/^"//' \ -e 's/\\"/"/g' |\ sort -n > $@ dump: dump.c ${CC} -O -o dump dump.c clean: rm -f dump dump.o ${CAT} english.base *.check __ck1 __ck2 nvi-1.81.6/catalog/README0100644000076400001440000001526610720065506013756 0ustar skimousers# $Id: README,v 8.4 1994/11/22 09:52:04 bostic Exp $ (Berkeley) $Date: 1994/11/22 09:52:04 $ Generally, all non-system error and informational messages in nvi are catalog messages, i.e. they can be tailored to a specific langauge. Command strings, usage strings, system errors and other "known text" are not. It would certainly be possible to internationalize all the text strings in nvi, but it's unclear that it's the right thing to do. First, there's no portable way to do message catalogs. The System V scheme is a reasonable choice, but none of the 4BSD derived systems support it. So, catalogs are completely implemented within nvi, and don't require any library support. Message catalogs in nvi are fairly simple. Every catalog message consists of two parts -- an initial number followed by a pipe (`|') character, followed by the English text for the message. For example: msgq(sp, M_ERR, "001|This is an error message"); would be a typical message. When the msgq() routine is called, if the user has specified a message catalog and the format string (the third argument) has a leading number, then it is converted to a record number, and that record is retrieved from the message catalog and used as a replacement format string. If the record can't be retrieved for any reason, the English text is displayed instead. Each message format string MUST map into the English format string, i.e. it can't display more or different arguments than the English one. For example: msgq(sp, M_ERR, "002|Error: %d %x", arg1, arg2); is a format string that displays two arguments. It is possible, however, to reorder the arguments or to not display all of them. The convention nvi uses is the System V printf(3) convention, i.e. "%[0-9]*$" is the name of a specific, numbered argument. For example: msgq(sp, M_ERR, "002|Error: %2$d %1$x", arg1, arg2); displays the arguments in reverse order. If the system supports this convention in its library printf routines (as specified by the test #define NL_ARGMAX), nvi uses those routines. Otherwise, there is some serious magic going on in common/msg.c to make this all work. Arguments to the msgq function are required to contain ONLY printable characters. No further translation is done by the msgq routine before displaying the message on the screen. For example, in the msgq call: msgq(sp, M_ERR, "003|File: %s", file_name); "file_name" must contain only printable characters. The routine msg_print() returns a printable version of a string in allocated memory. For example: char *p; p = msg_print(sp, file_name); msgq(sp, M_ERR, M("003", "File: %s"), p); FREE_SPACE(sp, p, 0); makes sure that "file_name" is printable before calling the msgq routine. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The message catalogs themselves are maintained in two files. The first is the "base file" which contains two fields, a record number and the message itself. All base files are named using the convention "vi_.base", e.g. the English one is "vi_english.base". For example: 002 "Unable to create temporary file" 003 "Warning: %s is not a regular file" 004 "%s already locked, session is read-only" 005 "%s: remove" 006 "%s: close" 007 "%s: remove" 008 "%s: remove" 009 "Read-only file, not written; use ! to override" 010 "Read-only file, not written" are the first few lines of the current vi_english.base file. Note that message #1 is missing -- the first message of each catalog is a special one, so that nvi can recognize message catalog files. It's added by the Makefile script that creates the second version of the message catalog. The second file is the file used by nvi to access messages, and is a list of the messages, one per line: VI_MESSAGE_CATALOG Unable to create temporary fileX Warning: %s is not a regular fileX %s already locked, session is read-onlyX %s: removeX %s: closeX %s: removeX %s: removeX Read-only file, not written; use ! to overrideX Read-only file, not writtenX Note that all messages have had a trailing 'X' character appended. This is to provide nvi a place to store a trailing nul for the message so that C library routines that expect one won't be disappointed. These files are named for their language, e.g. "vi_english". The second files are automatically created from the first files. To create a new catalog for nvi: Copy the file vi_english.base to a file that you can modify , e.g. "cp vi_english.base vi_german.base". For each of the messages in the file, replace the message with the string that you want to use. To find out what the arguments to a message are, I'm afraid you'll have to search the source code for the message number. You can find them fairly quickly by doing: cd ..; egrep '123\|' */*.[chys] I'm sorry that there's not an easier way, but I couldn't think of anything that wasn't a lot of work. If, for some reason, you don't have the file vi_english.base, or you have new sources for which you want to create a new base catalog, you can create it by running the command "make english" in the catalog directory. Once you've translated all of the strings, then add your catalog to the "CAT=" line of the Makefile, and run the command "make catalog". This will create the second (and corresponding) file for each file named .base. Don't worry about missing line numbers, i.e. base files that look like: 005 Message number 5. 007 Message number 7. This simply means that a message was deleted during the course of nvi's development. It will be taken care of automatically when you create the second form of the file. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= If you add new messages to the nvi sources, you can check your work by doing "make english; make check". The "make check" target lists unused message numbers, duplicate message numbers, and duplicate messages. Unused message numbers are only useful if you are condensing messages. Duplicate message numbers are a serious problem and have to be fixed. Duplicate messages are only interesting if a message appears often enough that it's worth creating a routine so that the string is only need in a single place. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= To select a catalog when running nvi, set the "msgcat" option. If the value of this option ends with a '/', it is treated as the name of a directory that contains a message catalog "vi_XXXX", where XXXX is the value of the LANG environmental variable, if it's set, or the value of the LC_MESSAGES environmental variable if it's not. If neither of those environmental variables are set, or if the option doesn't end in a '/', the option is treated as the full path name of the message catalog to use. If any messages are missing from the catalog, the backup text (English) is used instead. nvi-1.81.6/catalog/dump.c0100644000076400001440000000302010720065506014170 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * %sccs.include.redist.c% */ #ifndef lint static char copyright[] = "%Z% Copyright (c) 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint static char sccsid[] = "$Id: dump.c,v 8.1 1994/08/31 13:27:37 bostic Exp $ (Berkeley) $Date: 1994/08/31 13:27:37 $"; #endif /* not lint */ #include #include static void parse(fp) FILE *fp; { int ch, s1, s2, s3; #define TESTD(s) { \ if ((s = getc(fp)) == EOF) \ return; \ if (!isdigit(s)) \ continue; \ } #define TESTP { \ if ((ch = getc(fp)) == EOF) \ return; \ if (ch != '|') \ continue; \ } #define MOVEC(t) { \ do { \ if ((ch = getc(fp)) == EOF) \ return; \ } while (ch != (t)); \ } for (;;) { MOVEC('"'); TESTD(s1); TESTD(s2); TESTD(s3); TESTP; putchar('"'); putchar(s1); putchar(s2); putchar(s3); putchar('|'); for (;;) { /* dump to end quote. */ if ((ch = getc(fp)) == EOF) return; putchar(ch); if (ch == '"') break; if (ch == '\\') { if ((ch = getc(fp)) == EOF) return; putchar(ch); } } putchar('\n'); } } int main(argc, argv) int argc; char *argv[]; { FILE *fp; for (; *argv != NULL; ++argv) { if ((fp = fopen(*argv, "r")) == NULL) { perror(*argv); exit (1); } parse(fp); (void)fclose(fp); } exit (0); } nvi-1.81.6/catalog/dutch0100644000076400001440000002644110720065506014125 0ustar skimousersVI_MESSAGE_CATALOG regel te langX kan regel %lu niet verwijderenX kan niet toevoegen aan regel %luX kan niet invoegen vooraan regel %luX kan regel %lu niet opslaanX kan laatste regel niet lezenX Fout: kan regel %lu niet vindenX log bestandX Er vindt geen logging plaats, kan wijzigingen niet ongedaan makenX geen wijzigingen om ongedaan te makenX Er vindt geen logging plaats, kan wijzigingen niet ongedaan makenX Er vindt geen logging plaats, herhaling niet mogelijkX geen wijzigingen om te herhalenX %s/%d: schrijven naar log misluktX Vi's standaard invoer en uitvoer moeten aan een terminal gekoppeld zijnX Merk %s: niet gezetX Merk %s: de regel is verwijderdX Merk %s: de cursor positie bestaat niet meerX Fout: X nieuw bestandX naam veranderdX gewijzigdX ongewijzigdX NIET BEVEILIGDX niet schrijfbaarX regel %lu uit %lu [%ld%%]X leeg bestandX regel %luX Het bestand %s is geen message catalogX Niet in staat om de standaard %s optie in te stellenX Gebruik: %sX set: optie %s onbekend: 'set all' laat alle opties zienX set: [no]%s optie kan geen waarde hebbenX set: %s optie moet een waarde hebbenX set: %s optie: %sX set: %s optie: %s: getal is te grootX set: %s optie: %s is een ongeldige waardeX set: %s optie moet een waarde hebbenX Te weinig kolommen op het scherm, minder dan %dX Aantal kolommen te groot, meer dan %dX Te weinig regels op het scherm, minder dan %dX Aantal regels te groot, meer dan %dX De lisp optie is niet ondersteundX messages niet uitgeschakeld: %sX messages niet geactiveerd: %sX De paragraph optie moet karakter paren bevattenX De section optie moet karakter paren bevattenX De standaard buffer is leegX Buffer %s is leegX Bestanden met newlines in de naam kunnen niet hersteld wordenX Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie misluktX Bestand wordt gecopieerd voor herstel...X Herstel mechanisme werkt niet: %sX Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie misluktX Kon bestand niet veilig stellen: %sX Bestand wordt gecopieerd voor herstel...X Informatie met betrekking tot gebruiker nummer %u niet gevondenX Kan herstel bestand niet beveiligenX herstel buffer overgelopenX herstel bestandX %s: verminkt herstel bestandX %s: verminkt herstel bestandX U heeft geen bestand genaamd %s te herstellenX U kan eerdere versies van dit bestand herstellenX U kan nog meer bestanden herstellenX kan geen email versturen: %sX Bestand leeg; niets om te doorzoekenX Einde van het bestand bereikt zonder dat het patroon gevonden isX Geen vorig zoek patroonX Patroon niet gevondenX Begin van het bestand bereikt zonder dat het patroon gevonden isX Zoek-operatie omgeslagenX Bezig met zoeken...X Geen niet-printbaar karakter gevondenX Onbekend commandoX Commando niet beschikbaar in ex modeX Aantal mag niet nul zijnX %s: ongeldige regel aanduidingX Interne fout in syntax tabel (%s: %s)X Gebruik: %sX %s: tijdelijke buffer niet vrijgegevenX Vlag offset voor regel 1X Vlag offset voorbij bestands eindeX bestand/scherm veranderd tijdens uitvoeren van @ in een blokX bestand/scherm veranderd tijdens uitvoeren van globaal/v commandoX Ex commando mislukt: rest van commando(s) genegeerdX Ex commando mislukt: gemappede toetsen genegeerdX Het tweede adres is kleiner dan het eersteX Geen merk naam opgegevenX \\ niet gevolgd door / of ?X Referentie aan een regel nummer kleiner dan 0X Het %s commando is onbekendX Adres waarde te grootX Adres waarde te kleinX Ongeldige adres combinatieX Ongeldig adres: slechts %lu regels in het bestand aanwezigX Ongeldig adres: het bestand is leegX Het %s commando staat het adres 0 niet toeX Geen afkortingen om weer te gevenX Afkortingen moeten eindigen met een "woord" letterX Afkortingen mogen geen tabulaties of spaties bevattenX Afkortingen mogen geen woord/niet-woord karakters mengen, behalve aan het eindeX "%s" is geen afkortingX Vi commando mislukt: gemappede toetsen genegeerdX Dit is het laatste bestandX Dit is het eerste bestandX Dit is het eerste bestandX lijst met bestanden is leegX Geen voorgaand commando om "!" te vervangenX Geen bestandsnaam voor %%X Geen bestandsnaam voor #X Fout: execl: %sX I/O fout: %sX Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forcerenX Kan uw home directory niet vindenX Nieuwe huidige directory: %sX Geen cut buffers aanwezigX Het %s commando kan niet gebruikt worden in een globaal of v commandoX %s/%s: niet gelezen: noch U noch root is de eigenaarX %s/%s: niet gelezen: U bent niet de eigenaarX %s/%s: niet gelezen: kan gewijzigd worden door andere gebruikersX %s: niet gelezen: noch U noch root is de eigenaar"X %s: niet gelezen: U bent niet de eigenaarX %s: niet gelezen: kan gewijzigd worden door andere gebruikersX Geen volgende regel om samen te voegenX Geen input map entriesX Geen command map entriesX Het %s karakter kan niet ge-remapped wordenX "%s" is niet gemappedX Merk naam moet een enkel karakter zijnX %s bestaat al, niet weggeschreven; gebruik ! om het te forcerenX Nieuw .exrc bestand: %s. X doel regel ligt in het blokX Het open commando vereist dat de open optie actief isX Het open commando is nog niet ondersteundX Kan dit bestand niet veilig stellenX Bestand veilig gesteldX %s resulteert in te veel bestandsnamenX Alleen echte bestanden en named pipes kunnen gelezen wordenX %s: lees beveiliging niet beschikbaarX Bezig met lezen...X %s: %lu regels, %lu karaktersX Geen achtergrond schermen aanwezigX Het script commando is alleen beschikbaar in vi modeX Geen comando om uit te voerenX shiftwidth optie op 0 gezetX Count te grootX Count te kleinX Reguliere expressie opgegeven; r vlag heeft geen betekenisX De #, l en p vlaggen kunnen niet gecombineerd worden met de c vlag in vi modeX Geen match gevondenX Geen voorafgaande tag aanwezigX Minder dan %s elementen op de tags stapel; gebruik :display t[ags]X Geen bestand genaamd %s op de tags stapel; gebruik :display t[ags]X Kies Enter om door te gaan: X %s: tag niet gevondenX %s: verminkte tag in %sX %s: Het regel nummer van deze tag is voorbij het einde van het bestandX De tags stapel is leegX %s: zoek patroon niet gevondenX %d andere bestanden te wijzigenX Buffer %s is leegX Bevestig wijziging? [n]X OnderbrokenX Geen voorafgaande buffer om uit te voerenX Geen vorige reguliere expressieX Het %s commando vereist dat er een bestand geladen isX Gebruik: %sX Het visual commando vereist dat de open optie actief isX Leeg bestandX Geen voorafgaand F, f, T of t zoek commandoX %s niet gevondenX Geen voorafgaand bestand te bewerkenX Cursor niet op een getalX Getal wordt te grootX Getal wordt te kleinX Geen overeenkomstig karakter op deze regelX Overeenkomstig karakter niet gevondenX Geen karakters te vervangenX Geen ander scherm aanwezigX Karakters achter het zoek patroon, de regel offset, en/of het z commandoX Geen voorafgaand zoek patroonX Zoekopdracht na omslag teruggekeerd op originele positieX Afkorting overschrijdt expansie limiet: karakters genegeerdX Ongeldig karakter; quote to enterX Reeds aan het begin van de invoerX Niet meer karakters te verwijderenX Verplaatsing voorbij het einde van het bestandX Verplaatsing voorbij het einde van de regelX Cursor niet verplaatstX Reeds aan het begin van het bestandX Verplaatsing voorbij het begin van het bestandX Reeds in de eerste kolomX Buffers moeten voor het commando opgegeven wordenX Reeds bij het einde van het bestandX Reeds bij het einde van de regelX %s is geen vi commandoX Gebruik: %sX Geen karakters te verwijderenX Het Q commando vereist de ex terminal interfaceX Geen commando om te herhalenX Het bestand is leegX %s mag niet gebruikt worden als een verplaatsings commandoX Al in commando modeX Cursor niet in een woordX Windows optie waarde is te groot, maximum is %uX ToevoegenX VeranderenX CommandoX InvoegenX VervangenX Verplaatsing voorbij het eind van het schermX Verplaatsing voorbij het begin van het schermX Scherm moet meer dan %d regels hebben om het te kunnen splitsenX Er zijn geen achtergrond schermenX Er is geen achtergrond scherm waarin U bestand %s aan het bewerken bentX U kan uw enige scherm niet in de achtergrond zettenX Het scherm kan slechts verkleind worden tot %d regelsX Het scherm kan niet kleinerX Het scherm kan niet groterX Dit scherm kan niet gesuspend wordenX Onderbroken: gemappede toetsen genegeerdX vi: tijdelijke buffer niet vrijgegevenX Deze terminal heeft geen %s toetsX Er kan slechts een buffer opgegeven wordenX Getal groter dan %luX OnderbrokenX Aanmaken van tijdelijk bestand is misluktX Waarschuwing: %s is geen regulier bestandX %s is al geopend, bestand is in deze sessie niet schrijfbaarX %s: verwijdering misluktX %s: sluiting misluktX %s: verwijdering misluktX %s: verwijdering misluktX Bestand niet schrijfbaar, niet weggeschreven; gebruik ! om het te forcerenX Bestand niet schrijfbaar, niet weggeschrevenX %s bestaat al, niet weggeschreven; gebruik ! om het te forcerenX %s bestaat al, niet weggeschrevenX Gebruik ! om een incompleet bestand weg te schrijvenX Bestand incompleet, niet weggeschrevenX %s: bestand op disk nieuwer dan deze versie; gebruik ! om het te forcerenX %s: bestand op disk nieuwer dan deze versieX %s: schrijf beveiliging niet beschikbaarX Bezig met schrijven...X %s: WAARSCHUWING: BESTAND INCOMPLEETX Reeds op de eerste tag van deze groepX %s: nieuw bestand: %lu regels, %lu karaktersX %s: %lu regels, %lu karaktersX %s resulteert in te veel bestandsnamenX %s: geen normaal bestandX %s: U bent niet de eigenaarX %s: kan gewijzigd worden door andere gebruikersX Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forcerenX Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik :edit! om het te forcerenX Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forcerenX Tijdelijk bestand; exit negeert wijzigingenX Bestand niet schrijfbaar, wijzigingen niet automatisch weggeschrevenX log opnieuw gestartX Bevestig? [ynq]X Druk op een toets om door te gaan: X Druk op een toets om door te gaan [: voor meer ex commandos]: X Druk op een toets om door te gaan [q om te stoppen]: X Deze vorm van %s vereist de ex terminal interfaceX Entering ex input mode.X Commando mislukt, nog geen bestand geladen.X doorgaan?X Onverwacht character eventX Onverwacht end-of-file eventX Geen match gevonden voor dit patroonX Onverwacht interrupt eventX Onverwacht quit eventX Onverwacht repaint eventX Reeds op de laatste tag van deze groepX Het %s command vereist de ex terminal interfaceX Deze vorm van %s is niet ondersteund als de secure edit optie actief isX Onverwacht string eventX Onverwacht timeout eventX Onverwacht write eventX Shell expansies zijn niet ondersteund als de secure edit optie actief isX Het %s commando is niet ondersteund als de secure edit optie actief isX set: %s mag niet uitgezet wordenX Scherm te klein.X toegevoegdX gewijzigdX verwijderdX samengevoegdX verplaatstX verschovenX gebufferdX regelX regelsX Vi was niet geladen met een Tcl interpreterX Bestand gewijzigd sinds het de laatste keer weg is geschreven.X Shell expansie misluktX Geen %s edit optie opgegevenX Vi was niet geladen met een Perl interpreterX Geen ex commando om uit te voerenX Kies om commando uit te voeren, :q om te stoppenX Gebruik "cscope help" voor uitlegX Nog geen cscope connectie aanwezigX %s: onbekend zoek type: gebruik een van %sX %d: onbekende cscope sessieX set: de %s optie mag nooit aangezet wordenX set: de %s optie mag nooit op 0 gezet wordenX %s: toegevoegd: %lu regels, %lu karaktersX Onverwacht resize eventX %d bestanden te wijzigenX nvi-1.81.6/catalog/dutch.base0100644000076400001440000003140410720065506015031 0ustar skimousers002 "regel te lang" 003 "kan regel %lu niet verwijderen" 004 "kan niet toevoegen aan regel %lu" 005 "kan niet invoegen vooraan regel %lu" 006 "kan regel %lu niet opslaan" 007 "kan laatste regel niet lezen" 008 "Fout: kan regel %lu niet vinden" 009 "log bestand" 010 "Er vindt geen logging plaats, kan wijzigingen niet ongedaan maken" 011 "geen wijzigingen om ongedaan te maken" 012 "Er vindt geen logging plaats, kan wijzigingen niet ongedaan maken" 013 "Er vindt geen logging plaats, herhaling niet mogelijk" 014 "geen wijzigingen om te herhalen" 015 "%s/%d: schrijven naar log mislukt" 016 "Vi's standaard invoer en uitvoer moeten aan een terminal gekoppeld zijn" 017 "Merk %s: niet gezet" 018 "Merk %s: de regel is verwijderd" 019 "Merk %s: de cursor positie bestaat niet meer" 020 "Fout: " 021 "nieuw bestand" 022 "naam veranderd" 023 "gewijzigd" 024 "ongewijzigd" 025 "NIET BEVEILIGD" 026 "niet schrijfbaar" 027 "regel %lu uit %lu [%ld%%]" 028 "leeg bestand" 029 "regel %lu" 030 "Het bestand %s is geen message catalog" 031 "Niet in staat om de standaard %s optie in te stellen" 032 "Gebruik: %s" 033 "set: optie %s onbekend: 'set all' laat alle opties zien" 034 "set: [no]%s optie kan geen waarde hebben" 035 "set: %s optie moet een waarde hebben" 036 "set: %s optie: %s" 037 "set: %s optie: %s: getal is te groot" 038 "set: %s optie: %s is een ongeldige waarde" 039 "set: %s optie moet een waarde hebben" 040 "Te weinig kolommen op het scherm, minder dan %d" 041 "Aantal kolommen te groot, meer dan %d" 042 "Te weinig regels op het scherm, minder dan %d" 043 "Aantal regels te groot, meer dan %d" 044 "De lisp optie is niet ondersteund" 045 "messages niet uitgeschakeld: %s" 046 "messages niet geactiveerd: %s" 048 "De paragraph optie moet karakter paren bevatten" 049 "De section optie moet karakter paren bevatten" 053 "De standaard buffer is leeg" 054 "Buffer %s is leeg" 055 "Bestanden met newlines in de naam kunnen niet hersteld worden" 056 "Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie mislukt" 057 "Bestand wordt gecopieerd voor herstel..." 058 "Herstel mechanisme werkt niet: %s" 059 "Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie mislukt" 060 "Kon bestand niet veilig stellen: %s" 061 "Bestand wordt gecopieerd voor herstel..." 062 "Informatie met betrekking tot gebruiker nummer %u niet gevonden" 063 "Kan herstel bestand niet beveiligen" 064 "herstel buffer overgelopen" 065 "herstel bestand" 066 "%s: verminkt herstel bestand" 067 "%s: verminkt herstel bestand" 068 "U heeft geen bestand genaamd %s te herstellen" 069 "U kan eerdere versies van dit bestand herstellen" 070 "U kan nog meer bestanden herstellen" 071 "kan geen email versturen: %s" 072 "Bestand leeg; niets om te doorzoeken" 073 "Einde van het bestand bereikt zonder dat het patroon gevonden is" 074 "Geen vorig zoek patroon" 075 "Patroon niet gevonden" 076 "Begin van het bestand bereikt zonder dat het patroon gevonden is" 077 "Zoek-operatie omgeslagen" 078 "Bezig met zoeken..." 079 "Geen niet-printbaar karakter gevonden" 080 "Onbekend commando" 082 "Commando niet beschikbaar in ex mode" 083 "Aantal mag niet nul zijn" 084 "%s: ongeldige regel aanduiding" 085 "Interne fout in syntax tabel (%s: %s)" 086 "Gebruik: %s" 087 "%s: tijdelijke buffer niet vrijgegeven" 088 "Vlag offset voor regel 1" 089 "Vlag offset voorbij bestands einde" 090 "bestand/scherm veranderd tijdens uitvoeren van @ in een blok" 091 "bestand/scherm veranderd tijdens uitvoeren van globaal/v commando" 092 "Ex commando mislukt: rest van commando(s) genegeerd" 093 "Ex commando mislukt: gemappede toetsen genegeerd" 094 "Het tweede adres is kleiner dan het eerste" 095 "Geen merk naam opgegeven" 096 "\\ niet gevolgd door / of ?" 097 "Referentie aan een regel nummer kleiner dan 0" 098 "Het %s commando is onbekend" 099 "Adres waarde te groot" 100 "Adres waarde te klein" 101 "Ongeldige adres combinatie" 102 "Ongeldig adres: slechts %lu regels in het bestand aanwezig" 103 "Ongeldig adres: het bestand is leeg" 104 "Het %s commando staat het adres 0 niet toe" 105 "Geen afkortingen om weer te geven" 106 "Afkortingen moeten eindigen met een "woord" letter" 107 "Afkortingen mogen geen tabulaties of spaties bevatten" 108 "Afkortingen mogen geen woord/niet-woord karakters mengen, behalve aan het einde" 109 ""%s" is geen afkorting" 110 "Vi commando mislukt: gemappede toetsen genegeerd" 111 "Dit is het laatste bestand" 112 "Dit is het eerste bestand" 113 "Dit is het eerste bestand" 114 "lijst met bestanden is leeg" 115 "Geen voorgaand commando om "!" te vervangen" 116 "Geen bestandsnaam voor %%" 117 "Geen bestandsnaam voor #" 118 "Fout: execl: %s" 119 "I/O fout: %s" 120 "Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forceren" 121 "Kan uw home directory niet vinden" 122 "Nieuwe huidige directory: %s" 123 "Geen cut buffers aanwezig" 124 "Het %s commando kan niet gebruikt worden in een globaal of v commando" 125 "%s/%s: niet gelezen: noch U noch root is de eigenaar" 126 "%s/%s: niet gelezen: U bent niet de eigenaar" 127 "%s/%s: niet gelezen: kan gewijzigd worden door andere gebruikers" 128 "%s: niet gelezen: noch U noch root is de eigenaar"" 129 "%s: niet gelezen: U bent niet de eigenaar" 130 "%s: niet gelezen: kan gewijzigd worden door andere gebruikers" 131 "Geen volgende regel om samen te voegen" 132 "Geen input map entries" 133 "Geen command map entries" 134 "Het %s karakter kan niet ge-remapped worden" 135 ""%s" is niet gemapped" 136 "Merk naam moet een enkel karakter zijn" 137 "%s bestaat al, niet weggeschreven; gebruik ! om het te forceren" 138 "Nieuw .exrc bestand: %s. " 139 "doel regel ligt in het blok" 140 "Het open commando vereist dat de open optie actief is" 141 "Het open commando is nog niet ondersteund" 142 "Kan dit bestand niet veilig stellen" 143 "Bestand veilig gesteld" 144 "%s resulteert in te veel bestandsnamen" 145 "Alleen echte bestanden en named pipes kunnen gelezen worden" 146 "%s: lees beveiliging niet beschikbaar" 147 "Bezig met lezen..." 148 "%s: %lu regels, %lu karakters" 149 "Geen achtergrond schermen aanwezig" 150 "Het script commando is alleen beschikbaar in vi mode" 151 "Geen comando om uit te voeren" 152 "shiftwidth optie op 0 gezet" 153 "Count te groot" 154 "Count te klein" 155 "Reguliere expressie opgegeven; r vlag heeft geen betekenis" 156 "De #, l en p vlaggen kunnen niet gecombineerd worden met de c vlag in vi mode" 157 "Geen match gevonden" 158 "Geen voorafgaande tag aanwezig" 159 "Minder dan %s elementen op de tags stapel; gebruik :display t[ags]" 160 "Geen bestand genaamd %s op de tags stapel; gebruik :display t[ags]" 161 "Kies Enter om door te gaan: " 162 "%s: tag niet gevonden" 163 "%s: verminkte tag in %s" 164 "%s: Het regel nummer van deze tag is voorbij het einde van het bestand" 165 "De tags stapel is leeg" 166 "%s: zoek patroon niet gevonden" 167 "%d andere bestanden te wijzigen" 168 "Buffer %s is leeg" 169 "Bevestig wijziging? [n]" 170 "Onderbroken" 171 "Geen voorafgaande buffer om uit te voeren" 172 "Geen vorige reguliere expressie" 173 "Het %s commando vereist dat er een bestand geladen is" 174 "Gebruik: %s" 175 "Het visual commando vereist dat de open optie actief is" 177 "Leeg bestand" 178 "Geen voorafgaand F, f, T of t zoek commando" 179 "%s niet gevonden" 180 "Geen voorafgaand bestand te bewerken" 181 "Cursor niet op een getal" 182 "Getal wordt te groot" 183 "Getal wordt te klein" 184 "Geen overeenkomstig karakter op deze regel" 185 "Overeenkomstig karakter niet gevonden" 186 "Geen karakters te vervangen" 187 "Geen ander scherm aanwezig" 188 "Karakters achter het zoek patroon, de regel offset, en/of het z commando" 189 "Geen voorafgaand zoek patroon" 190 "Zoekopdracht na omslag teruggekeerd op originele positie" 191 "Afkorting overschrijdt expansie limiet: karakters genegeerd" 192 "Ongeldig karakter; quote to enter" 193 "Reeds aan het begin van de invoer" 194 "Niet meer karakters te verwijderen" 195 "Verplaatsing voorbij het einde van het bestand" 196 "Verplaatsing voorbij het einde van de regel" 197 "Cursor niet verplaatst" 198 "Reeds aan het begin van het bestand" 199 "Verplaatsing voorbij het begin van het bestand" 200 "Reeds in de eerste kolom" 201 "Buffers moeten voor het commando opgegeven worden" 202 "Reeds bij het einde van het bestand" 203 "Reeds bij het einde van de regel" 204 "%s is geen vi commando" 205 "Gebruik: %s" 206 "Geen karakters te verwijderen" 207 "Het Q commando vereist de ex terminal interface" 208 "Geen commando om te herhalen" 209 "Het bestand is leeg" 210 "%s mag niet gebruikt worden als een verplaatsings commando" 211 "Al in commando mode" 212 "Cursor niet in een woord" 214 "Windows optie waarde is te groot, maximum is %u" 215 "Toevoegen" 216 "Veranderen" 217 "Commando" 218 "Invoegen" 219 "Vervangen" 220 "Verplaatsing voorbij het eind van het scherm" 221 "Verplaatsing voorbij het begin van het scherm" 222 "Scherm moet meer dan %d regels hebben om het te kunnen splitsen" 223 "Er zijn geen achtergrond schermen" 224 "Er is geen achtergrond scherm waarin U bestand %s aan het bewerken bent" 225 "U kan uw enige scherm niet in de achtergrond zetten" 226 "Het scherm kan slechts verkleind worden tot %d regels" 227 "Het scherm kan niet kleiner" 228 "Het scherm kan niet groter" 230 "Dit scherm kan niet gesuspend worden" 231 "Onderbroken: gemappede toetsen genegeerd" 232 "vi: tijdelijke buffer niet vrijgegeven" 233 "Deze terminal heeft geen %s toets" 234 "Er kan slechts een buffer opgegeven worden" 235 "Getal groter dan %lu" 236 "Onderbroken" 237 "Aanmaken van tijdelijk bestand is mislukt" 238 "Waarschuwing: %s is geen regulier bestand" 239 "%s is al geopend, bestand is in deze sessie niet schrijfbaar" 240 "%s: verwijdering mislukt" 241 "%s: sluiting mislukt" 242 "%s: verwijdering mislukt" 243 "%s: verwijdering mislukt" 244 "Bestand niet schrijfbaar, niet weggeschreven; gebruik ! om het te forceren" 245 "Bestand niet schrijfbaar, niet weggeschreven" 246 "%s bestaat al, niet weggeschreven; gebruik ! om het te forceren" 247 "%s bestaat al, niet weggeschreven" 248 "Gebruik ! om een incompleet bestand weg te schrijven" 249 "Bestand incompleet, niet weggeschreven" 250 "%s: bestand op disk nieuwer dan deze versie; gebruik ! om het te forceren" 251 "%s: bestand op disk nieuwer dan deze versie" 252 "%s: schrijf beveiliging niet beschikbaar" 253 "Bezig met schrijven..." 254 "%s: WAARSCHUWING: BESTAND INCOMPLEET" 255 "Reeds op de eerste tag van deze groep" 256 "%s: nieuw bestand: %lu regels, %lu karakters" 257 "%s: %lu regels, %lu karakters" 258 "%s resulteert in te veel bestandsnamen" 259 "%s: geen normaal bestand" 260 "%s: U bent niet de eigenaar" 261 "%s: kan gewijzigd worden door andere gebruikers" 262 "Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forceren" 263 "Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik :edit! om het te forceren" 264 "Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forceren" 265 "Tijdelijk bestand; exit negeert wijzigingen" 266 "Bestand niet schrijfbaar, wijzigingen niet automatisch weggeschreven" 267 "log opnieuw gestart" 268 "Bevestig? [ynq]" 269 "Druk op een toets om door te gaan: " 270 "Druk op een toets om door te gaan [: voor meer ex commandos]: " 271 "Druk op een toets om door te gaan [q om te stoppen]: " 272 "Deze vorm van %s vereist de ex terminal interface" 273 "Entering ex input mode." 274 "Commando mislukt, nog geen bestand geladen." 275 " doorgaan?" 276 "Onverwacht character event" 277 "Onverwacht end-of-file event" 278 "Geen match gevonden voor dit patroon" 279 "Onverwacht interrupt event" 280 "Onverwacht quit event" 281 "Onverwacht repaint event" 282 "Reeds op de laatste tag van deze groep" 283 "Het %s command vereist de ex terminal interface" 284 "Deze vorm van %s is niet ondersteund als de secure edit optie actief is" 285 "Onverwacht string event" 286 "Onverwacht timeout event" 287 "Onverwacht write event" 289 "Shell expansies zijn niet ondersteund als de secure edit optie actief is" 290 "Het %s commando is niet ondersteund als de secure edit optie actief is" 291 "set: %s mag niet uitgezet worden" 292 "Scherm te klein." 293 "toegevoegd" 294 "gewijzigd" 295 "verwijderd" 296 "samengevoegd" 297 "verplaatst" 298 "verschoven" 299 "gebufferd" 300 "regel" 301 "regels" 302 "Vi was niet geladen met een Tcl interpreter" 303 "Bestand gewijzigd sinds het de laatste keer weg is geschreven." 304 "Shell expansie mislukt" 305 "Geen %s edit optie opgegeven" 306 "Vi was niet geladen met een Perl interpreter" 307 "Geen ex commando om uit te voeren" 308 "Kies om commando uit te voeren, :q om te stoppen" 309 "Gebruik "cscope help" voor uitleg" 310 "Nog geen cscope connectie aanwezig" 311 "%s: onbekend zoek type: gebruik een van %s" 312 "%d: onbekende cscope sessie" 313 "set: de %s optie mag nooit aangezet worden" 314 "set: de %s optie mag nooit op 0 gezet worden" 315 "%s: toegevoegd: %lu regels, %lu karakters" 316 "Onverwacht resize event" 317 "%d bestanden te wijzigen" nvi-1.81.6/catalog/dutch.check0100644000076400001440000000217510720065506015177 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 213 229 288 ========================= MISSING ERROR MESSAGES (Please add!): 288 318 319 320 ========================= Extra error messages (just delete them): 280 287 ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): ========================= Duplicate messages, just message (this is okay): 2 %s bestaat al, niet weggeschreven; gebruik ! om het te forcerenX 2 %s resulteert in te veel bestandsnamenX 2 %s: %lu regels, %lu karaktersX 2 %s: verminkt herstel bestandX 2 Bestand wordt gecopieerd voor herstel...X 2 Buffer %s is leegX 2 Dit is het eerste bestandX 2 Er vindt geen logging plaats, kan wijzigingen niet ongedaan makenX 2 OnderbrokenX 2 Wijzigingen kunnen niet ongedaan gemaakt worden als deze sessie misluktX 2 gewijzigdX 2 set: %s optie moet een waarde hebbenX 3 %s: verwijdering misluktX 3 Bestand gewijzigd sinds laatste schrijfactie; schrijf het weg of gebruik ! om het te forcerenX 4 Gebruik: %sX ========================= nvi-1.81.6/catalog/dutch.owner0100644000076400001440000000004310720065506015244 0ustar skimousersJ.G. Vons nvi-1.81.6/catalog/english0100644000076400001440000002354510720065506014451 0ustar skimousersVI_MESSAGE_CATALOG Line length overflowX unable to delete line %luX unable to append to line %luX unable to insert at line %luX unable to store line %luX unable to get last lineX Error: unable to retrieve line %luX Log fileX Logging not being performed, undo not possibleX No changes to undoX Logging not being performed, undo not possibleX Logging not being performed, roll-forward not possibleX No changes to re-doX %s/%d: log put errorX Vi's standard input and output must be a terminalX Mark %s: not setX Mark %s: the line was deletedX Mark %s: cursor position no longer existsX Error: X new fileX name changedX modifiedX unmodifiedX UNLOCKEDX readonlyX line %lu of %lu [%ld%%]X empty fileX line %luX The file %s is not a message catalogX Unable to set default %s optionX Usage: %sX set: no %s option: 'set all' gives all option valuesX set: [no]%s option doesn't take a valueX set: %s option isn't a booleanX set: %s option: %sX set: %s option: %s: value overflowX set: %s option: %s is an illegal numberX set: %s option isn't a booleanX Screen columns too small, less than %dX Screen columns too large, greater than %dX Screen lines too small, less than %dX Screen lines too large, greater than %dX The lisp option is not implementedX messages not turned off: %sX messages not turned on: %sX The paragraph option must be in two character groupsX The section option must be in two character groupsX The default buffer is emptyX Buffer %s is emptyX Files with newlines in the name are unrecoverableX Modifications not recoverable if the session failsX Copying file for recovery...X Preservation failed: %sX Modifications not recoverable if the session failsX File backup failed: %sX Copying file for recovery...X Information on user id %u not foundX Unable to lock recovery fileX Recovery file buffer overrunX Recovery fileX %s: malformed recovery fileX %s: malformed recovery fileX No files named %s, readable by you, to recoverX There are older versions of this file for you to recoverX There are other files for you to recoverX not sending email: %sX File empty; nothing to searchX Reached end-of-file without finding the patternX No previous search patternX Pattern not foundX Reached top-of-file without finding the patternX Search wrappedX Searching...X No non-printable character foundX Unknown command nameX %s: command not available in ex modeX Count may not be zeroX %s: bad line specificationX Internal syntax table error (%s: %s)X Usage: %sX %s: temporary buffer not releasedX Flag offset to before line 1X Flag offset past end-of-fileX @ with range running when the file/screen changedX Global/v command running when the file/screen changedX Ex command failed: pending commands discardedX Ex command failed: mapped keys discardedX The second address is smaller than the firstX No mark name suppliedX \\ not followed by / or ?X Reference to a line number less than 0X The %s command is unknownX Address value overflowX Address value underflowX Illegal address combinationX Illegal address: only %lu lines in the fileX Illegal address: the file is emptyX The %s command doesn't permit an address of 0X No abbreviations to displayX Abbreviations must end with a "word" characterX Abbreviations may not contain tabs or spacesX Abbreviations may not mix word/non-word characters, except at the endX "%s" is not an abbreviationX Vi command failed: mapped keys discardedX No more files to editX No previous files to editX No previous files to rewindX No file list to displayX No previous command to replace "!"X No filename to substitute for %%X No filename to substitute for #X Error: execl: %sX I/O error: %sX File modified since last complete write; write or use ! to overrideX Unable to find home directory locationX New current directory: %sX No cut buffers to displayX The %s command can't be used as part of a global or v commandX %s/%s: not sourced: not owned by you or rootX %s/%s: not sourced: not owned by youX %s/%s: not sourced: writeable by a user other than the ownerX %s: not sourced: not owned by you or rootX %s: not sourced: not owned by youX %s: not sourced: writeable by a user other than the ownerX No following lines to joinX No input map entriesX No command map entriesX The %s character may not be remappedX "%s" isn't currently mappedX Mark names must be a single characterX %s exists, not written; use ! to overrideX New exrc file: %sX Destination line is inside move rangeX The open command requires that the open option be setX The open command is not yet implementedX Preservation of this file not possibleX File preservedX %s: expanded into too many file namesX Only regular files and named pipes may be readX %s: read lock was unavailableX Reading...X %s: %lu lines, %lu charactersX No background screens to displayX The script command is only available in vi modeX No command to executeX shiftwidth option set to 0X Count overflowX Count underflowX Regular expression specified; r flag meaninglessX The #, l and p flags may not be combined with the c flag in vi modeX No match foundX No previous tag enteredX Less than %s entries on the tags stack; use :display t[ags]X No file %s on the tags stack to return to; use :display t[ags]X Press Enter to continue: X %s: tag not foundX %s: corrupted tag in %sX %s: the tag's line number is past the end of the fileX The tags stack is emptyX %s: search pattern not foundX %d more files to editX Buffer %s is emptyX Confirm change? [n]X InterruptedX No previous buffer to executeX No previous regular expressionX The %s command requires that a file have already been read inX Usage: %sX The visual command requires that the open option be setX Empty fileX No previous F, f, T or t searchX %s not foundX No previous file to editX Cursor not in a numberX Resulting number too largeX Resulting number too smallX No match character on this lineX Matching character not foundX No characters to replaceX No other screen to switch toX Characters after search string, line offset and/or z commandX No previous search patternX Search wrapped to original positionX Abbreviation exceeded expansion limit: characters discardedX Illegal character; quote to enterX Already at the beginning of the insertX No more characters to eraseX Movement past the end-of-fileX Movement past the end-of-lineX No cursor movement madeX Already at the beginning of the fileX Movement past the beginning of the fileX Already in the first columnX Buffers should be specified before the commandX Already at end-of-fileX Already at end-of-lineX %s isn't a vi commandX Usage: %sX No characters to deleteX The Q command requires the ex terminal interfaceX No command to repeatX The file is emptyX %s may not be used as a motion commandX Already in command modeX Cursor not in a wordX Windows option value is too large, max is %uX AppendX ChangeX CommandX InsertX ReplaceX Movement past the end-of-screenX Movement past the beginning-of-screenX Screen must be larger than %d lines to splitX There are no background screensX There's no background screen editing a file named %sX You may not background your only displayed screenX The screen can only shrink to %d rowsX The screen cannot shrinkX The screen cannot growX This screen may not be suspendedX Interrupted: mapped keys discardedX vi: temporary buffer not releasedX This terminal has no %s keyX Only one buffer may be specifiedX Number larger than %luX InterruptedX Unable to create temporary fileX Warning: %s is not a regular fileX %s already locked, session is read-onlyX %s: removeX %s: closeX %s: removeX %s: removeX Read-only file, not written; use ! to overrideX Read-only file, not writtenX %s exists, not written; use ! to overrideX %s exists, not writtenX Partial file, not written; use ! to overrideX Partial file, not writtenX %s: file modified more recently than this copy; use ! to overrideX %s: file modified more recently than this copyX %s: write lock was unavailableX Writing...X %s: WARNING: FILE TRUNCATEDX Already at the first tag of this groupX %s: new file: %lu lines, %lu charactersX %s: %lu lines, %lu charactersX %s expanded into too many file namesX %s: not a regular fileX %s: not owned by youX %s: accessible by a user other than the ownerX File modified since last complete write; write or use ! to overrideX File modified since last complete write; write or use :edit! to overrideX File modified since last complete write; write or use ! to overrideX File is a temporary; exit will discard modificationsX File readonly, modifications not auto-writtenX Log restartedX confirm? [ynq]X Press any key to continue: X Press any key to continue [: to enter more ex commands]: X Press any key to continue [q to quit]: X That form of %s requires the ex terminal interfaceX Entering ex input mode.X Command failed, no file read in yet.X cont?X Unexpected character eventX Unexpected end-of-file eventX No matches for queryX Unexpected interrupt eventX Unexpected repaint eventX Already at the last tag of this groupX The %s command requires the ex terminal interfaceX That form of %s is not supported when the secure edit option is setX Unexpected string eventX Unexpected timeout eventX Screen must be larger than %d columns to splitX Shell expansions not supported when the secure edit option is setX The %s command is not supported when the secure edit option is setX set: the %s option may not be turned offX Display too small.X addedX changedX deletedX joinedX movedX shiftedX yankedX lineX linesX Vi was not loaded with a Tcl interpreterX File modified since last write.X Shell expansion failedX No %s edit option specifiedX Vi was not loaded with a Perl interpreterX No ex command to executeX Enter to execute a command, :q to exitX Use "cscope help" for helpX No cscope connections runningX %s: unknown search type: use one of %sX %d: no such cscope sessionX set: the %s option may never be turned onX set: the %s option may never be set to 0X %s: appended: %lu lines, %lu charactersX Unexpected resize eventX %d files to editX Unexpected command or inputX %d screens backgrounded; use :display to list themX Unknown cursor position.X nvi-1.81.6/catalog/english.base0100644000076400001440000002704310720065506015357 0ustar skimousers002 "Line length overflow" 003 "unable to delete line %lu" 004 "unable to append to line %lu" 005 "unable to insert at line %lu" 006 "unable to store line %lu" 007 "unable to get last line" 008 "Error: unable to retrieve line %lu" 009 "Log file" 010 "Logging not being performed, undo not possible" 011 "No changes to undo" 012 "Logging not being performed, undo not possible" 013 "Logging not being performed, roll-forward not possible" 014 "No changes to re-do" 015 "%s/%d: log put error" 016 "Vi's standard input and output must be a terminal" 017 "Mark %s: not set" 018 "Mark %s: the line was deleted" 019 "Mark %s: cursor position no longer exists" 020 "Error: " 021 "new file" 022 "name changed" 023 "modified" 024 "unmodified" 025 "UNLOCKED" 026 "readonly" 027 "line %lu of %lu [%ld%%]" 028 "empty file" 029 "line %lu" 030 "The file %s is not a message catalog" 031 "Unable to set default %s option" 032 "Usage: %s" 033 "set: no %s option: 'set all' gives all option values" 034 "set: [no]%s option doesn't take a value" 035 "set: %s option isn't a boolean" 036 "set: %s option: %s" 037 "set: %s option: %s: value overflow" 038 "set: %s option: %s is an illegal number" 039 "set: %s option isn't a boolean" 040 "Screen columns too small, less than %d" 041 "Screen columns too large, greater than %d" 042 "Screen lines too small, less than %d" 043 "Screen lines too large, greater than %d" 044 "The lisp option is not implemented" 045 "messages not turned off: %s" 046 "messages not turned on: %s" 048 "The paragraph option must be in two character groups" 049 "The section option must be in two character groups" 053 "The default buffer is empty" 054 "Buffer %s is empty" 055 "Files with newlines in the name are unrecoverable" 056 "Modifications not recoverable if the session fails" 057 "Copying file for recovery..." 058 "Preservation failed: %s" 059 "Modifications not recoverable if the session fails" 060 "File backup failed: %s" 061 "Copying file for recovery..." 062 "Information on user id %u not found" 063 "Unable to lock recovery file" 064 "Recovery file buffer overrun" 065 "Recovery file" 066 "%s: malformed recovery file" 067 "%s: malformed recovery file" 068 "No files named %s, readable by you, to recover" 069 "There are older versions of this file for you to recover" 070 "There are other files for you to recover" 071 "not sending email: %s" 072 "File empty; nothing to search" 073 "Reached end-of-file without finding the pattern" 074 "No previous search pattern" 075 "Pattern not found" 076 "Reached top-of-file without finding the pattern" 077 "Search wrapped" 078 "Searching..." 079 "No non-printable character found" 080 "Unknown command name" 082 "%s: command not available in ex mode" 083 "Count may not be zero" 084 "%s: bad line specification" 085 "Internal syntax table error (%s: %s)" 086 "Usage: %s" 087 "%s: temporary buffer not released" 088 "Flag offset to before line 1" 089 "Flag offset past end-of-file" 090 "@ with range running when the file/screen changed" 091 "Global/v command running when the file/screen changed" 092 "Ex command failed: pending commands discarded" 093 "Ex command failed: mapped keys discarded" 094 "The second address is smaller than the first" 095 "No mark name supplied" 096 "\\ not followed by / or ?" 097 "Reference to a line number less than 0" 098 "The %s command is unknown" 099 "Address value overflow" 100 "Address value underflow" 101 "Illegal address combination" 102 "Illegal address: only %lu lines in the file" 103 "Illegal address: the file is empty" 104 "The %s command doesn't permit an address of 0" 105 "No abbreviations to display" 106 "Abbreviations must end with a "word" character" 107 "Abbreviations may not contain tabs or spaces" 108 "Abbreviations may not mix word/non-word characters, except at the end" 109 ""%s" is not an abbreviation" 110 "Vi command failed: mapped keys discarded" 111 "No more files to edit" 112 "No previous files to edit" 113 "No previous files to rewind" 114 "No file list to display" 115 "No previous command to replace "!"" 116 "No filename to substitute for %%" 117 "No filename to substitute for #" 118 "Error: execl: %s" 119 "I/O error: %s" 120 "File modified since last complete write; write or use ! to override" 121 "Unable to find home directory location" 122 "New current directory: %s" 123 "No cut buffers to display" 124 "The %s command can't be used as part of a global or v command" 125 "%s/%s: not sourced: not owned by you or root" 126 "%s/%s: not sourced: not owned by you" 127 "%s/%s: not sourced: writeable by a user other than the owner" 128 "%s: not sourced: not owned by you or root" 129 "%s: not sourced: not owned by you" 130 "%s: not sourced: writeable by a user other than the owner" 131 "No following lines to join" 132 "No input map entries" 133 "No command map entries" 134 "The %s character may not be remapped" 135 ""%s" isn't currently mapped" 136 "Mark names must be a single character" 137 "%s exists, not written; use ! to override" 138 "New exrc file: %s" 139 "Destination line is inside move range" 140 "The open command requires that the open option be set" 141 "The open command is not yet implemented" 142 "Preservation of this file not possible" 143 "File preserved" 144 "%s: expanded into too many file names" 145 "Only regular files and named pipes may be read" 146 "%s: read lock was unavailable" 147 "Reading..." 148 "%s: %lu lines, %lu characters" 149 "No background screens to display" 150 "The script command is only available in vi mode" 151 "No command to execute" 152 "shiftwidth option set to 0" 153 "Count overflow" 154 "Count underflow" 155 "Regular expression specified; r flag meaningless" 156 "The #, l and p flags may not be combined with the c flag in vi mode" 157 "No match found" 158 "No previous tag entered" 159 "Less than %s entries on the tags stack; use :display t[ags]" 160 "No file %s on the tags stack to return to; use :display t[ags]" 161 "Press Enter to continue: " 162 "%s: tag not found" 163 "%s: corrupted tag in %s" 164 "%s: the tag's line number is past the end of the file" 165 "The tags stack is empty" 166 "%s: search pattern not found" 167 "%d more files to edit" 168 "Buffer %s is empty" 169 "Confirm change? [n]" 170 "Interrupted" 171 "No previous buffer to execute" 172 "No previous regular expression" 173 "The %s command requires that a file have already been read in" 174 "Usage: %s" 175 "The visual command requires that the open option be set" 177 "Empty file" 178 "No previous F, f, T or t search" 179 "%s not found" 180 "No previous file to edit" 181 "Cursor not in a number" 182 "Resulting number too large" 183 "Resulting number too small" 184 "No match character on this line" 185 "Matching character not found" 186 "No characters to replace" 187 "No other screen to switch to" 188 "Characters after search string, line offset and/or z command" 189 "No previous search pattern" 190 "Search wrapped to original position" 191 "Abbreviation exceeded expansion limit: characters discarded" 192 "Illegal character; quote to enter" 193 "Already at the beginning of the insert" 194 "No more characters to erase" 195 "Movement past the end-of-file" 196 "Movement past the end-of-line" 197 "No cursor movement made" 198 "Already at the beginning of the file" 199 "Movement past the beginning of the file" 200 "Already in the first column" 201 "Buffers should be specified before the command" 202 "Already at end-of-file" 203 "Already at end-of-line" 204 "%s isn't a vi command" 205 "Usage: %s" 206 "No characters to delete" 207 "The Q command requires the ex terminal interface" 208 "No command to repeat" 209 "The file is empty" 209 "The file is empty" 210 "%s may not be used as a motion command" 211 "Already in command mode" 212 "Cursor not in a word" 214 "Windows option value is too large, max is %u" 215 "Append" 216 "Change" 217 "Command" 218 "Insert" 219 "Replace" 220 "Movement past the end-of-screen" 221 "Movement past the beginning-of-screen" 222 "Screen must be larger than %d lines to split" 223 "There are no background screens" 224 "There's no background screen editing a file named %s" 225 "You may not background your only displayed screen" 226 "The screen can only shrink to %d rows" 227 "The screen cannot shrink" 228 "The screen cannot grow" 230 "This screen may not be suspended" 231 "Interrupted: mapped keys discarded" 232 "vi: temporary buffer not released" 233 "This terminal has no %s key" 234 "Only one buffer may be specified" 235 "Number larger than %lu" 236 "Interrupted" 237 "Unable to create temporary file" 238 "Warning: %s is not a regular file" 239 "%s already locked, session is read-only" 240 "%s: remove" 241 "%s: close" 242 "%s: remove" 243 "%s: remove" 244 "Read-only file, not written; use ! to override" 245 "Read-only file, not written" 246 "%s exists, not written; use ! to override" 247 "%s exists, not written" 248 "Partial file, not written; use ! to override" 249 "Partial file, not written" 250 "%s: file modified more recently than this copy; use ! to override" 251 "%s: file modified more recently than this copy" 252 "%s: write lock was unavailable" 253 "Writing..." 254 "%s: WARNING: FILE TRUNCATED" 255 "Already at the first tag of this group" 256 "%s: new file: %lu lines, %lu characters" 257 "%s: %lu lines, %lu characters" 258 "%s expanded into too many file names" 259 "%s: not a regular file" 260 "%s: not owned by you" 261 "%s: accessible by a user other than the owner" 262 "File modified since last complete write; write or use ! to override" 263 "File modified since last complete write; write or use :edit! to override" 264 "File modified since last complete write; write or use ! to override" 265 "File is a temporary; exit will discard modifications" 266 "File readonly, modifications not auto-written" 267 "Log restarted" 268 "confirm? [ynq]" 269 "Press any key to continue: " 270 "Press any key to continue [: to enter more ex commands]: " 271 "Press any key to continue [q to quit]: " 272 "That form of %s requires the ex terminal interface" 273 "Entering ex input mode." 274 "Command failed, no file read in yet." 275 " cont?" 276 "Unexpected character event" 277 "Unexpected end-of-file event" 278 "No matches for query" 279 "Unexpected interrupt event" 281 "Unexpected repaint event" 282 "Already at the last tag of this group" 283 "The %s command requires the ex terminal interface" 284 "That form of %s is not supported when the secure edit option is set" 285 "Unexpected string event" 286 "Unexpected timeout event" 288 "Screen must be larger than %d columns to split" 289 "Shell expansions not supported when the secure edit option is set" 290 "The %s command is not supported when the secure edit option is set" 291 "set: the %s option may not be turned off" 292 "Display too small." 293 "added" 294 "changed" 295 "deleted" 296 "joined" 297 "moved" 298 "shifted" 299 "yanked" 300 "line" 301 "lines" 302 "Vi was not loaded with a Tcl interpreter" 303 "File modified since last write." 304 "Shell expansion failed" 304 "Shell expansion failed" 305 "No %s edit option specified" 306 "Vi was not loaded with a Perl interpreter" 307 "No ex command to execute" 308 "Enter to execute a command, :q to exit" 309 "Use "cscope help" for help" 310 "No cscope connections running" 311 "%s: unknown search type: use one of %s" 312 "%d: no such cscope session" 313 "set: the %s option may never be turned on" 314 "set: the %s option may never be set to 0" 315 "%s: appended: %lu lines, %lu characters" 316 "Unexpected resize event" 317 "%d files to edit" 318 "Unexpected command or input" 319 "%d screens backgrounded; use :display to list them" 320 "Unknown cursor position." 321 "File encoding conversion not supported" 322 "Input encoding conversion not supported" 323 "Invalid input. Truncated." 324 "Conversion error on line %d" nvi-1.81.6/catalog/english.check0100644000076400001440000000175610720065506015525 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 229 280 287 ========================= MISSING ERROR MESSAGES (Please add!): ========================= Extra error messages (just delete them): ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): 2 209 "The file is empty" 2 304 "Shell expansion failed" ========================= Duplicate messages, just message (this is okay): 2 %s exists, not written; use ! to overrideX 2 %s: %lu lines, %lu charactersX 2 %s: malformed recovery fileX 2 Buffer %s is emptyX 2 Copying file for recovery...X 2 InterruptedX 2 Logging not being performed, undo not possibleX 2 Modifications not recoverable if the session failsX 2 No previous search patternX 2 set: %s option isn't a booleanX 3 %s: removeX 3 File modified since last complete write; write or use ! to overrideX 4 Usage: %sX ========================= nvi-1.81.6/catalog/english.owner0100644000076400001440000000004610720065506015571 0ustar skimousersKeith Bostic nvi-1.81.6/catalog/french0100644000076400001440000003114510720065506014260 0ustar skimousersVI_MESSAGE_CATALOG Dépassement de longueur de ligneX impossible de supprimer la ligne %luX impossible d'ajouter à la ligne %luX impossible d'insérer devant la ligne %luX impossible de stocker la ligne %luX impossible d'obtenir la dernière ligneX Erreur : impossible de récupérer la ligne %luX Fichier journalX Aucune journalisation n'étant effectuée, impossible d'annulerX Aucune action à annulerX Aucune journalisation n'étant effectuée, impossible d'annulerX Aucune journalisation n'étant effectuée, reprise actualisée impossibleX Aucune action à refaireX %s/%d : Erreur d'écriture de journalX L'entrée et la sortie Vi standards doivent être un terminalX Marque %s : non définieX Marque %s : la ligne a été suppriméeX Marque %s : la position du curseur n'existe plusX Erreur : X nouveau fichierX le nom a changéX modifiéX non modifiéX DÉVERROUILLÉX lecture seuleX ligne %lu de %lu [%ld%%]X fichier videX ligne %luX Ce fichier %s n'est pas un catalogue de messagesX Impossible de configurer option %s par défautX Utilisation : %sX Définition : pas d'option %s : 'set all' donne toutes les valeurs optionnellesX Définition : option [no]%s ne prend pas de valeurX Définition : l'option %s n'est pas booléenneX Définition : option %s : %sX Définition : option %s : %s : Dépassement de valeurX Définition : option %s : %s n'est pas un nombre valideX Définition : l'option %s n'est pas booléenneX Les colonnes de l'écran sont trop petites, inférieures à %dX Les colonnes de l'écran sont trop grandes, supérieures à %dX Les lignes de l'écran sont trop courtes, inférieures à %dX Les lignes de l'écran sont trop longues, supérieures à %dX L'option lisp n'est pas implémentéeX Les messages ne sont pas désactivés : %sX Les messages ne sont pas activés : %sX L'option de paragraphe doit être en groupe de deux caractèresX L'option de section doit être en groupe de deux caractèresX Le tampon par défaut est videX Le tampon %s est videX Les fichiers dont le nom contient des caractères de saut de ligne sont irrécupérablesX Impossible de récupérer les modifications si la session échoueX Copie en cours du fichier pour récupération...X La préservation a échoué : %sX Impossible de récupérer les modifications si la session échoueX La sauvegarde du fichier a échoué : %sX Copie en cours du fichier pour récupération...X Les renseignements sur l'identité %u de l'utilisateur sont introuvablesX Impossible de verrouiller le fichier de récupérationX Débordement de tampon du fichier de récupérationX Fichier de récupérationX %s : Fichier de récupération malforméX %s : Fichier de récupération malforméX Aucun fichier nommé %s à récupérer, que vous puissiez lireX Il existe des versions récupérables antérieures à ce fichierX Vous avez d'autres fichiers à récupérerX pas d'envoi d'email : %sX Fichier vide, rien à rechercherX Fin de fichier atteinte sans trouver le motifX Pas de motif de recherche précédentX Motif introuvableX Début du fichier atteint sans trouver le motifX La recherche est revenue à son point de départX Recherche en cours...X Caractère non-imprimable introuvableX Nom de commande inconnuX %s : Commande non disponible en ex modeX Le compteur ne peut être zéroX %s : mauvaise spécification de ligneX Erreur de tableau de syntaxe interne (%s: %s)X Utilisation : %sX %s : tampon temporaire non libéréX Décalage de drapeau hors de la ligne 1X Décalage de drapeau hors de la fin du fichierX @ avec plage, en cours d'exécution quand le fichier/l'écran a changéX Commande Global/v en cours d'exécution quand le fichier/l'écran a changéX La commande ex a échoué : commandes en attente abandonnéesX La commande ex a échoué : les touches affectées sont abandonnéesX La deuxième adresse est plus petite que la premièreX Aucun nom de marque fourniX \\ non suivi par / ou ?X Référence à un numéro de ligne inférieure à 0X La commande %s est inconnueX Dépassement de la valeur adresseX Dépassement négatif de la valeur adresseX Combinaison d'adresse non valideX Adresse non valide : il n'y a que %lu lignes dans ce fichierX Adresse non valide : le fichier est videX La commande %s ne permet pas une adresse de 0X Pas d'abréviations à afficherX Les abréviations doivent finir par un caractère"motX Les abréviations ne peuvent pas contenir de tabulations ni d'espacesX Les abréviations ne peuvent pas contenir un mélange de caractères mot/non-mot, sauf à la finX "%s" n'est pas une abréviationX La commande Vi a échoué : Les touches affectées ont été abandonnéesX Plus de fichiers à éditerX Pas de fichiers précédents à éditerX Pas de fichiers précédents à rembobinerX Pas de liste de fichiers à afficherX Pas de commande précédente à remplacer"!"X Pas de nom de fichier à substituer à %%X Pas de nom de fichier à substituer à #X Erreur : execl : %sX Erreur E/S : %sX Fichier modifié depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasserX Impossible de trouver l'emplacement du répertoire d'origineX Nouveau répertoire en cours : %sX Pas de tampon de coupure à afficherX La commande %s ne peut pas être utilisée à l'intérieur d'une commande globale ou commande vX %s/%s : échec de source : ni vous ni le super-utilisateur n'êtes les propriétaires X %s/%s : échec de source : vous n'êtes pas le propriétaireX %s/%s : échec de source : peut être écrit par un utilisateur autre que le propriétaireX %s : échec de source : ni vous ni le super-utilisateur n'êtes les propriétairesX %s : échec de source : vous n'êtes pas le propriétaireX %s : échec de source : peut être écrit par un utilisateur autre que le propriétaireX Pas de lignes suivantes à joindreX Pas d'entrées de mappage d'entréeX Pas d'entrées de mappage de commandesX Le caractère %s ne peut pas être remappéX "%s" n'est pas actuellement mappéX Les noms de marque ne doivent avoir qu'un caractèreX %s existe, non enregistré; utiliser ! pour outrepasserX Nouveau fichier exrc : %sX La ligne de destination est à l'intérieur de la plage à déplacerX La commande ouverte nécessite que l'option ouverte soit définieX La commande ouverte n'est pas encore implémentéeX La préservation de ce fichier est impossibleX Fichier préservéX %s: étendu dans trop de noms de fichiersX Vous ne pouvez lire que les fichiers standards et les canaux de transmission nommésX %s: Interdiction de lecture non disponibleX Lecture en cours...X %s: %lu lignes, %lu caractèresX Pas d'écrans d'arrière-plan à afficherX La commande script n'est disponible qu'en mode viX Pas de commande à exécuterX Option de largeur de décalage définie sur 0X Compter dépassementX Compter dépassement négatifX Expression standard spécifiée; drapeau r superfluX Vous ne pouvez pas en mode vi, combiner les drapeaux #, l et p avec le drapeau cX Aucune correspondance trouvéeX Aucune marque précédente entréeX Moins de %s entrées dans la pile de marques ; utilisez t[ags]X Pas de fichier %s vers lequel retourner dans la pile de marques ; utiliser : affichage t[ags]X Appuyez sur Entrée pour continuer :X %s : marque introuvableX %s : marque corrompue en %sX %s : le numéro de ligne de la marque dépasse la fin du fichierX La pile de marques est videX %s : motif de recherche introuvableX %d fichiers supplémentaires à éditerX Le tampon %s est vide Confirmer les changements ? [n]X InterrompuX Pas de tampon précédent à exécuterX Pas d'expression standard précédenteX La commande %s nécessite qu'un fichier ait déjà été lu en mémoireX Utilisation : %sX La commande visual nécessite que l'option open soit définieX Fichier videX Pas de recherche précédente F, f, T ou tX %s introuvableX Pas de fichier précédent à éditerX Le curseur n'est pas dans un nombreX Le nombre obtenu est trop grandX Le nombre obtenu est trop petitX Pas de correspondance de caractère sur cette ligneX Caractère correspondant introuvableX Pas de caractères à remplacerX Pas d'autre écran vers lequel basculerX Caractères après la chaîne de recherche, décalage de ligne et/ou commande zX Pas de motif de recherche précédentX La recherche est revenue à son point de départX L'abréviation a dépassé la limite de l'expansion : caractères abandonnésX Caractère non valide ; guillemet pour saisirX Déjà au début de l'insertionX Plus de caractères à effacerX Déplacement hors de fin de fichierX Déplacement hors de fin de ligneX Aucun mouvement de curseur n'a été effectuéX Déjà au début du fichierX Déplacement hors du début du fichierX Déjà dans la première colonneX Les tampons doivent être spécifiés avant la commandeX Déjà à la fin du fichierX Déjà à la fin de la ligneX %s n'est pas une commande viX Utilisation : %sX Pas de caractères à supprimerX La commande Q nécessite une interface terminal exX Pas de commande à répéterX Le fichier est videX Vous ne pouvez pas utiliser %s comme commande de déplacementX Déjà en mode commandeX Le curseur n'est pas dans un motX Valeur optionnelle de fenêtre trop grande, maximum est %uX AjouterX ChangerX CommandeX InsérerX RemplacerX Déplacement hors de la fin d'écranX Déplacement hors du début d'écranX L'écran doit être supérieur à %d lignes pour se fractionnerX Il n'y a pas d'écran d'arrière-planX Il n'y a pas d'écran d'arrière-plan qui édite un fichier nommé %sX Vous ne pouvez pas mettre à l'arrière-plan votre seul écran affichéX L'écran ne peut être réduit qu'à %d rangsX L'écran n'est pas auto-réductibleX L'écran n'est pas auto-extensibleX Vous ne pouvez pas mettre cet écran en attenteX Interrompu : les touches affectées ont été abandonnéesX vi : le tampon temporaire n' a pas été libéréX Ce terminal n'a pas de touche %sX Vous ne pouvez spécifier qu'un seul tamponX Nombre supérieur à %luX InterrompuX Impossible de créer un fichier temporaireX Avertissement : %s n'est pas un fichier standardX %s déjà verrouillé, session en lecture seuleX %s: supprimerX %s: fermerX %s: supprimerX %s: supprimerX Fichier en lecture seule, non écrit, utiliser ! pour outrepasserX Fichier en lecture seule, non écritX %s existe, non écrit; utiliser ! pour outrepasserX %s existe, non écritX Fichier partiel, non écrit; utiliser ! pour outrepasserX Fichier partiel, non écritX %s: fichier modifié plus récemment que cet exemplaire; utiliser ! pour outrepasserX %s: fichier modifié plus récemment que cet exemplaireX %s: interdiction d'écriture non disponibleX Ecriture en cours...X %s: AVERTISSEMENT : FICHIER TRONQUÉX Première marque de ce groupe déjà atteinteX %s: nouveau fichier : %lu lignes, %lu caractèresX %s: %lu lignes, %lu caractèresX %s étendue à trop de noms de fichiersX %s: pas un fichier standardX %s: ne vous appartient pasX %s: accessible par un utilisateur autre que son propriétaireX Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasser X Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser :edit! pour outrepasserX Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasserX Fichier temporaire ; quitter annulera les modificationsX Fichier en lecture seule ; les modifications ne sont pas écrites automatiquementX Journal redémarréX confirmer ? [ynq]X Appuyez sur n'importe quelle touche pour continuer : X Appuyez sur n'importe quelle touche pour continuer [: pour entrer plus de commandes ex] : X Appuyez sur n'importe quelle touche pour continuer [q pour Quitter]: X Cette forme de %s nécessite l'interface de terminal exX Entrée de mode entrée ex.X La commande a échoué, aucun fichier n'a encore été lu.X cont?X Evénement imprévu de caractèreX Evénement imprévu de fin-de-fichierX Pas de correspondances pour cette requêteX Evénement imprévu d'interruptionX Evénement quitter imprévuX Evénement imprévu de rafraîchissementX La dernière marque de ce groupe a déjà été atteinteX La commande %s nécessite l'interface de terminal exX Cette forme de %s n'est pas reconnue quand l'option d'édition protégée est activéeX Evénement imprévu de chaîneX Evénement imprévu de délai impartiX Evénement d'écriture imprévuX Les expansions du shell ne sont pas reconnues quand l'option d'édition protégée est activéeX La commande %s n'est pas reconnue quand l'option d'édition protégée est activéeX Définition : l'option %s ne peut pas être désactivéeX Affichage trop petit.X ajoutéX changéX suppriméX jointX déplacéX décaléX coupéX ligneX lignesX Vi n'a pas été chargé avec un interprétateur TclX Ficher modifié depuis le dernier enregistrement.X L'expansion du shell a échouéX Pas d'option d'édition %s spécifiéeX Vi n'a pas été chargé avec un interprétateur PerlX Pas de commande ex à exécuterX Entrez pour exécuter une commande, :q pour quitterX Utiliser "cscope help" pour obtenir de l'aideX Aucune connexion cscope n'est lancéeX %s : type de recherche inconnu : utiliser un des %sX %d : Il n'existe pas de telle session cscopeX Définition : l'option %s ne peut jamais être activéeX Définition : l'option %s ne peut jamais être définie sur 0X %s: joints : %lu lignes, %lu caractèresX événement imprévu de redimensionnementX %d fichiers à éditerX nvi-1.81.6/catalog/french.base0100644000076400001440000003420610720065506015172 0ustar skimousers002 "Dépassement de longueur de ligne" 003 "impossible de supprimer la ligne %lu" 004 "impossible d'ajouter à la ligne %lu" 005 "impossible d'insérer devant la ligne %lu" 006 "impossible de stocker la ligne %lu" 007 "impossible d'obtenir la dernière ligne" 008 "Erreur : impossible de récupérer la ligne %lu" 009 "Fichier journal" 010 "Aucune journalisation n'étant effectuée, impossible d'annuler" 011 "Aucune action à annuler" 012 "Aucune journalisation n'étant effectuée, impossible d'annuler" 013 "Aucune journalisation n'étant effectuée, reprise actualisée impossible" 014 "Aucune action à refaire" 015 "%s/%d : Erreur d'écriture de journal" 016 "L'entrée et la sortie Vi standards doivent être un terminal" 017 "Marque %s : non définie" 018 "Marque %s : la ligne a été supprimée" 019 "Marque %s : la position du curseur n'existe plus" 020 "Erreur : " 021 "nouveau fichier" 022 "le nom a changé" 023 "modifié" 024 "non modifié" 025 "DÉVERROUILLÉ" 026 "lecture seule" 027 "ligne %lu de %lu [%ld%%]" 028 "fichier vide" 029 "ligne %lu" 030 "Ce fichier %s n'est pas un catalogue de messages" 031 "Impossible de configurer option %s par défaut" 032 "Utilisation : %s" 033 "Définition : pas d'option %s : 'set all' donne toutes les valeurs optionnelles" 034 "Définition : option [no]%s ne prend pas de valeur" 035 "Définition : l'option %s n'est pas booléenne" 036 "Définition : option %s : %s" 037 "Définition : option %s : %s : Dépassement de valeur" 038 "Définition : option %s : %s n'est pas un nombre valide" 039 "Définition : l'option %s n'est pas booléenne" 040 "Les colonnes de l'écran sont trop petites, inférieures à %d" 041 "Les colonnes de l'écran sont trop grandes, supérieures à %d" 042 "Les lignes de l'écran sont trop courtes, inférieures à %d" 043 "Les lignes de l'écran sont trop longues, supérieures à %d" 044 "L'option lisp n'est pas implémentée" 045 "Les messages ne sont pas désactivés : %s" 046 "Les messages ne sont pas activés : %s" 048 "L'option de paragraphe doit être en groupe de deux caractères" 049 "L'option de section doit être en groupe de deux caractères" 053 "Le tampon par défaut est vide" 054 "Le tampon %s est vide" 055 "Les fichiers dont le nom contient des caractères de saut de ligne sont irrécupérables" 056 "Impossible de récupérer les modifications si la session échoue" 057 "Copie en cours du fichier pour récupération..." 058 "La préservation a échoué : %s" 059 "Impossible de récupérer les modifications si la session échoue" 060 "La sauvegarde du fichier a échoué : %s" 061 "Copie en cours du fichier pour récupération..." 062 "Les renseignements sur l'identité %u de l'utilisateur sont introuvables" 063 "Impossible de verrouiller le fichier de récupération" 064 "Débordement de tampon du fichier de récupération" 065 "Fichier de récupération" 066 "%s : Fichier de récupération malformé" 067 "%s : Fichier de récupération malformé" 068 "Aucun fichier nommé %s à récupérer, que vous puissiez lire" 069 "Il existe des versions récupérables antérieures à ce fichier" 070 "Vous avez d'autres fichiers à récupérer" 071 "pas d'envoi d'email : %s" 072 "Fichier vide, rien à rechercher" 073 "Fin de fichier atteinte sans trouver le motif" 074 "Pas de motif de recherche précédent" 075 "Motif introuvable" 076 "Début du fichier atteint sans trouver le motif" 077 "La recherche est revenue à son point de départ" 078 "Recherche en cours..." 079 "Caractère non-imprimable introuvable" 080 "Nom de commande inconnu" 082 "%s : Commande non disponible en ex mode" 083 "Le compteur ne peut être zéro" 084 "%s : mauvaise spécification de ligne" 085 "Erreur de tableau de syntaxe interne (%s: %s)" 086 "Utilisation : %s" 087 "%s : tampon temporaire non libéré" 088 "Décalage de drapeau hors de la ligne 1" 089 "Décalage de drapeau hors de la fin du fichier" 090 "@ avec plage, en cours d'exécution quand le fichier/l'écran a changé" 091 "Commande Global/v en cours d'exécution quand le fichier/l'écran a changé" 092 "La commande ex a échoué : commandes en attente abandonnées" 093 "La commande ex a échoué : les touches affectées sont abandonnées" 094 "La deuxième adresse est plus petite que la première" 095 "Aucun nom de marque fourni" 096 "\\ non suivi par / ou ?" 097 "Référence à un numéro de ligne inférieure à 0" 098 "La commande %s est inconnue" 099 "Dépassement de la valeur adresse" 100 "Dépassement négatif de la valeur adresse" 101 "Combinaison d'adresse non valide" 102 "Adresse non valide : il n'y a que %lu lignes dans ce fichier" 103 "Adresse non valide : le fichier est vide" 104 "La commande %s ne permet pas une adresse de 0" 105 "Pas d'abréviations à afficher" 106 "Les abréviations doivent finir par un caractère"mot" 107 "Les abréviations ne peuvent pas contenir de tabulations ni d'espaces" 108 "Les abréviations ne peuvent pas contenir un mélange de caractères mot/non-mot, sauf à la fin" 109 ""%s" n'est pas une abréviation" 110 "La commande Vi a échoué : Les touches affectées ont été abandonnées" 111 "Plus de fichiers à éditer" 112 "Pas de fichiers précédents à éditer" 113 "Pas de fichiers précédents à rembobiner" 114 "Pas de liste de fichiers à afficher" 115 "Pas de commande précédente à remplacer"!"" 116 "Pas de nom de fichier à substituer à %%" 117 "Pas de nom de fichier à substituer à #" 118 "Erreur : execl : %s" 119 "Erreur E/S : %s" 120 "Fichier modifié depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasser" 121 "Impossible de trouver l'emplacement du répertoire d'origine" 122 "Nouveau répertoire en cours : %s" 123 "Pas de tampon de coupure à afficher" 124 "La commande %s ne peut pas être utilisée à l'intérieur d'une commande globale ou commande v" 125 "%s/%s : échec de source : ni vous ni le super-utilisateur n'êtes les propriétaires " 126 "%s/%s : échec de source : vous n'êtes pas le propriétaire" 127 "%s/%s : échec de source : peut être écrit par un utilisateur autre que le propriétaire" 128 "%s : échec de source : ni vous ni le super-utilisateur n'êtes les propriétaires" 129 "%s : échec de source : vous n'êtes pas le propriétaire" 130 "%s : échec de source : peut être écrit par un utilisateur autre que le propriétaire" 131 "Pas de lignes suivantes à joindre" 132 "Pas d'entrées de mappage d'entrée" 133 "Pas d'entrées de mappage de commandes" 134 "Le caractère %s ne peut pas être remappé" 135 ""%s" n'est pas actuellement mappé" 136 "Les noms de marque ne doivent avoir qu'un caractère" 137 "%s existe, non enregistré; utiliser ! pour outrepasser" 138 "Nouveau fichier exrc : %s" 139 "La ligne de destination est à l'intérieur de la plage à déplacer" 140 "La commande ouverte nécessite que l'option ouverte soit définie" 141 "La commande ouverte n'est pas encore implémentée" 142 "La préservation de ce fichier est impossible" 143 "Fichier préservé" 144 "%s: étendu dans trop de noms de fichiers" 145 "Vous ne pouvez lire que les fichiers standards et les canaux de transmission nommés" 146 "%s: Interdiction de lecture non disponible" 147 "Lecture en cours..." 148 "%s: %lu lignes, %lu caractères" 149 "Pas d'écrans d'arrière-plan à afficher" 150 "La commande script n'est disponible qu'en mode vi" 151 "Pas de commande à exécuter" 152 "Option de largeur de décalage définie sur 0" 153 "Compter dépassement" 154 "Compter dépassement négatif" 155 "Expression standard spécifiée; drapeau r superflu" 156 "Vous ne pouvez pas en mode vi, combiner les drapeaux #, l et p avec le drapeau c" 157 "Aucune correspondance trouvée" 158 "Aucune marque précédente entrée" 159 "Moins de %s entrées dans la pile de marques ; utilisez t[ags]" 160 "Pas de fichier %s vers lequel retourner dans la pile de marques ; utiliser : affichage t[ags]" 161 "Appuyez sur Entrée pour continuer :" 162 "%s : marque introuvable" 163 "%s : marque corrompue en %s" 164 "%s : le numéro de ligne de la marque dépasse la fin du fichier" 165 "La pile de marques est vide" 166 "%s : motif de recherche introuvable" 167 "%d fichiers supplémentaires à éditer" 168 "Le tampon %s est vide 169 "Confirmer les changements ? [n]" 170 "Interrompu" 171 "Pas de tampon précédent à exécuter" 172 "Pas d'expression standard précédente" 173 "La commande %s nécessite qu'un fichier ait déjà été lu en mémoire" 174 "Utilisation : %s" 175 "La commande visual nécessite que l'option open soit définie" 177 "Fichier vide" 178 "Pas de recherche précédente F, f, T ou t" 179 "%s introuvable" 180 "Pas de fichier précédent à éditer" 181 "Le curseur n'est pas dans un nombre" 182 "Le nombre obtenu est trop grand" 183 "Le nombre obtenu est trop petit" 184 "Pas de correspondance de caractère sur cette ligne" 185 "Caractère correspondant introuvable" 186 "Pas de caractères à remplacer" 187 "Pas d'autre écran vers lequel basculer" 188 "Caractères après la chaîne de recherche, décalage de ligne et/ou commande z" 189 "Pas de motif de recherche précédent" 190 "La recherche est revenue à son point de départ" 191 "L'abréviation a dépassé la limite de l'expansion : caractères abandonnés" 192 "Caractère non valide ; guillemet pour saisir" 193 "Déjà au début de l'insertion" 194 "Plus de caractères à effacer" 195 "Déplacement hors de fin de fichier" 196 "Déplacement hors de fin de ligne" 197 "Aucun mouvement de curseur n'a été effectué" 198 "Déjà au début du fichier" 199 "Déplacement hors du début du fichier" 200 "Déjà dans la première colonne" 201 "Les tampons doivent être spécifiés avant la commande" 202 "Déjà à la fin du fichier" 203 "Déjà à la fin de la ligne" 204 "%s n'est pas une commande vi" 205 "Utilisation : %s" 206 "Pas de caractères à supprimer" 207 "La commande Q nécessite une interface terminal ex" 208 "Pas de commande à répéter" 209 "Le fichier est vide" 209 "Le fichier est vide" 210 "Vous ne pouvez pas utiliser %s comme commande de déplacement" 211 "Déjà en mode commande" 212 "Le curseur n'est pas dans un mot" 214 "Valeur optionnelle de fenêtre trop grande, maximum est %u" 215 "Ajouter" 216 "Changer" 217 "Commande" 218 "Insérer" 219 "Remplacer" 220 "Déplacement hors de la fin d'écran" 221 "Déplacement hors du début d'écran" 222 "L'écran doit être supérieur à %d lignes pour se fractionner" 223 "Il n'y a pas d'écran d'arrière-plan" 224 "Il n'y a pas d'écran d'arrière-plan qui édite un fichier nommé %s" 225 "Vous ne pouvez pas mettre à l'arrière-plan votre seul écran affiché" 226 "L'écran ne peut être réduit qu'à %d rangs" 227 "L'écran n'est pas auto-réductible" 228 "L'écran n'est pas auto-extensible" 230 "Vous ne pouvez pas mettre cet écran en attente" 231 "Interrompu : les touches affectées ont été abandonnées" 232 "vi : le tampon temporaire n' a pas été libéré" 233 "Ce terminal n'a pas de touche %s" 234 "Vous ne pouvez spécifier qu'un seul tampon" 235 "Nombre supérieur à %lu" 236 "Interrompu" 237 "Impossible de créer un fichier temporaire" 238 "Avertissement : %s n'est pas un fichier standard" 239 "%s déjà verrouillé, session en lecture seule" 240 "%s: supprimer" 241 "%s: fermer" 242 "%s: supprimer" 243 "%s: supprimer" 244 "Fichier en lecture seule, non écrit, utiliser ! pour outrepasser" 245 "Fichier en lecture seule, non écrit" 246 "%s existe, non écrit; utiliser ! pour outrepasser" 247 "%s existe, non écrit" 248 "Fichier partiel, non écrit; utiliser ! pour outrepasser" 249 "Fichier partiel, non écrit" 250 "%s: fichier modifié plus récemment que cet exemplaire; utiliser ! pour outrepasser" 251 "%s: fichier modifié plus récemment que cet exemplaire" 252 "%s: interdiction d'écriture non disponible" 253 "Ecriture en cours..." 254 "%s: AVERTISSEMENT : FICHIER TRONQUÉ" 255 "Première marque de ce groupe déjà atteinte" 256 "%s: nouveau fichier : %lu lignes, %lu caractères" 257 "%s: %lu lignes, %lu caractères" 258 "%s étendue à trop de noms de fichiers" 259 "%s: pas un fichier standard" 260 "%s: ne vous appartient pas" 261 "%s: accessible par un utilisateur autre que son propriétaire" 262 "Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasser " 263 "Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser :edit! pour outrepasser" 264 "Fichier modifé depuis la dernière écriture complète ; écrire ou utiliser ! pour outrepasser" 265 "Fichier temporaire ; quitter annulera les modifications" 266 "Fichier en lecture seule ; les modifications ne sont pas écrites automatiquement" 267 "Journal redémarré" 268 "confirmer ? [ynq]" 269 "Appuyez sur n'importe quelle touche pour continuer : " 270 "Appuyez sur n'importe quelle touche pour continuer [: pour entrer plus de commandes ex] : " 271 "Appuyez sur n'importe quelle touche pour continuer [q pour Quitter]: " 272 "Cette forme de %s nécessite l'interface de terminal ex" 273 "Entrée de mode entrée ex." 274 "La commande a échoué, aucun fichier n'a encore été lu." 275 "cont?" 276 "Evénement imprévu de caractère" 277 "Evénement imprévu de fin-de-fichier" 278 "Pas de correspondances pour cette requête" 279 "Evénement imprévu d'interruption" 280 "Evénement quitter imprévu" 281 "Evénement imprévu de rafraîchissement" 282 "La dernière marque de ce groupe a déjà été atteinte" 283 "La commande %s nécessite l'interface de terminal ex" 284 "Cette forme de %s n'est pas reconnue quand l'option d'édition protégée est activée" 285 "Evénement imprévu de chaîne" 286 "Evénement imprévu de délai imparti" 287 "Evénement d'écriture imprévu" 289 "Les expansions du shell ne sont pas reconnues quand l'option d'édition protégée est activée" 290 "La commande %s n'est pas reconnue quand l'option d'édition protégée est activée" 291 "Définition : l'option %s ne peut pas être désactivée" 292 "Affichage trop petit." 293 "ajouté" 294 "changé" 295 "supprimé" 296 "joint" 297 "déplacé" 298 "décalé" 299 "coupé" 300 "ligne" 301 "lignes" 302 "Vi n'a pas été chargé avec un interprétateur Tcl" 303 "Ficher modifié depuis le dernier enregistrement." 304 "L'expansion du shell a échoué" 304 "L'expansion du shell a échoué" 305 "Pas d'option d'édition %s spécifiée" 306 "Vi n'a pas été chargé avec un interprétateur Perl" 307 "Pas de commande ex à exécuter" 308 "Entrez pour exécuter une commande, :q pour quitter" 309 "Utiliser "cscope help" pour obtenir de l'aide" 310 "Aucune connexion cscope n'est lancée" 311 "%s : type de recherche inconnu : utiliser un des %s" 312 "%d : Il n'existe pas de telle session cscope" 313 "Définition : l'option %s ne peut jamais être activée" 314 "Définition : l'option %s ne peut jamais être définie sur 0" 315 "%s: joints : %lu lignes, %lu caractères" 316 "événement imprévu de redimensionnement" 317 "%d fichiers à éditer" nvi-1.81.6/catalog/french.check0100644000076400001440000000200510720065506015325 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 229 288 ========================= MISSING ERROR MESSAGES (Please add!): 288 318 319 320 ========================= Extra error messages (just delete them): 280 287 ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): 2 209 "Le fichier est vide" 2 304 "L'expansion du shell a échoué" ========================= Duplicate messages, just message (this is okay): 2 %s : Fichier de récupération malforméX 2 %s: %lu lignes, %lu caractèresX 2 Aucune journalisation n'étant effectuée, impossible d'annulerX 2 Copie en cours du fichier pour récupération...X 2 Définition : l'option %s n'est pas booléenneX 2 Impossible de récupérer les modifications si la session échoueX 2 InterrompuX 2 La recherche est revenue à son point de départX 2 Pas de motif de recherche précédentX 3 %s: supprimerX 4 Utilisation : %sX ========================= nvi-1.81.6/catalog/german0100644000076400001440000002735110720065506014270 0ustar skimousersVI_MESSAGE_CATALOG Zeilenlängen-ÜberlaufX kann Zeile %lu nicht löschenX kann an Zeile %lu nicht anfügenX kann in Zeile %lu nicht einfügenX kann Zeile %lu nicht speichernX kann letzte Zeile nicht lesenX Fehler: kann Zeile %lu nicht wiederherstellenX ProtokolldateiX Keine Protokollierung aktiv, Rückgängigmachen nicht möglichX Keine Änderungen rückgängig zu machenX Keine Protokollierung aktiv, Rückgängigmachen nicht möglichX Keine Protokollierung aktiv, Wiederholung von Änderungen nicht möglichX Keine Änderungen zu wiederholenX %s/%d: ProtokollschreibfehlerX Vi's Standardein- und -ausgabe muß ein Terminal seinX Marke %s: nicht gesetztX Marke %s: die Zeile wurde gelöschtX Marke %s: Cursorposition existiert nicht mehrX Fehler: X neue DateiX Name geändertX geändertX nicht geändertX NICHT GELOCKTX nur zum LesenX Zeile %lu von %lu [%ld%%]X leere DateiX Zeile %luX Die Datei %s ist kein MeldungskatalogX Setzen der Voreinstellung für %s Option nicht möglichX Benutzung: %sX set: keine %s Option: 'set all' zeigt alle Optionen mit Werten anX set: der [no]%s Option kann kein Wert zugewiesen werdenX set: %s ist keine Boolsche OptionX set: %s Option: %sX set: %s Option: %s: Werte-ÜberlaufX set: %s Option: %s ist eine ungültige ZahlX set: %s ist keine Boolsche OptionX Bildschirm hat zu wenig Spalten, weniger als %dX Bildschirm hat zu viele Spalten, mehr als %dX Bildschirm hat zu wenig Zeilen, weniger als %dX Bildschirm hat zu viele Zeilen, mehr als %dX Die lisp-Option ist nicht implementiertX Meldungen nicht abgeschaltet: %sX Meldungen nicht eingeschaltet: %sX Die paragraph-Option muß Gruppen zu zwei Zeichen enthaltenX Die section-Option muß Gruppen zu zwei Zeichen enthaltenX Der Standardpuffer ist leerX Puffer %s ist leerX Dateien mit newlines im Namen sind nicht wiederherstellbarX Änderungen nicht wiederherstellbar, falls die Editorsitzung schiefgehtX kopiere Datei für Wiederherstellung ...X Rettungsmechanismus funktioniert nicht: %sX Änderungen nicht wiederherstellbar, falls die Editorsitzung schiefgehtX Sicherung der Datei gescheitert: %sX kopiere Datei für Wiederherstellung ...X Informationen über den Benutzer mit id %u nicht gefundenX Wiederherstellungsdatei kann nicht gelockt werdenX Puffer der Wiederherstellungsdatei übergelaufenX WiederherstellungsdateiX %s: Wiederherstellungsdatei hat falsches FormatX %s: Wiederherstellungsdatei hat falsches FormatX Keine von Ihnen lesbaren Dateien mit Namen %s zum WiederherstellenX Es gibt ältere Versionen dieser Datei von Ihnen zum WiederherstellenX Sie haben noch andere Dateien zum WiederherstellenX schicke keine email: %sX Datei leer; nichts zu suchenX Dateiende erreicht, ohne das Suchmuster zu findenX Kein altes SuchmusterX Suchmuster nicht gefundenX Dateianfang erreicht, ohne das Suchmuster zu findenX Suche beginnt von vornX suche ...X Keine nichtdruckbaren Zeichen gefundenX Unbekannter KommandonameX %s: Kommando im ex-Modus nicht verfügbarX Anzahl darf nicht Null seinX %s: falsche ZeilenangabeX Interner Syntaxtabellenfehler (%s: %s)X Benutzung: %sX %s: temporärer Puffer nicht freigegebenX Flagoffset vor Zeile 1X Flagoffset hinter dem DateiendeX @ mit Bereich lief, als Datei/Anzeige geändert wurdeX globales oder v-Kommando lief, als Datei/Anzeige geändert wurdeX Ex-Kommando mißlungen: restliche Kommandoeingabe ignoriertX Ex-Kommando mißlungen: umdefinierte Tasten ungültigX Die zweite Adresse ist kleiner als die ersteX Kein Markenname angegebenX \\ ohne folgenden / oder ?X Referenz auf eine negative ZeilennummerX Das Kommando %s ist unbekanntX Adreßwert zu großX Adreßwert zu kleinX Ungültige AdreßkombinationX Ungültige Adresse: nur %lu Zeilen in der DateiX Ungültige Adresse: die Datei ist leerX Das Kommando %s erlaubt keine Adresse 0X Keine Abkürzungen zum AnzeigenX Abkürzungen müssen mit einem "Wort"-Zeichen endenX Abkürzungen dürfen keine Tabulator- oder Leerzeichen enthaltenX In Abkürzungen dürfen außer am Ende Wort- und Nicht-Wort-Zeichen nicht gemischt werdenX "%s" ist keine AbkürzungX Vi Kommando mißlungen: umdefinierte Tasten ungültigX Keine weiteren Dateien zu editierenX Keine vorhergehenden Dateien zu editierenX Keine vorhergehenden Dateien für rewindX Keine Dateiliste zum AnzeigenX Kein vorhergehendes Kommando, um "!" zu ersetzenX Kein Dateiname für %%X Kein Dateiname für #X Fehler: execl: %sX E/A-Fehler: %sX Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorierenX Kann Homedirectory nicht bestimmenX Neues aktuelles Directory: %sX Keine Puffer anzuzeigenX Das Kommando %s kann nicht als Teil eines global oder v Kommandos verwendet werdenX %s/%s: nicht gelesen: gehört weder Ihnen noch rootX %s/%s: nicht gelesen: gehört nicht IhnenX %s/%s: nicht gelesen: anderer Benutzer als Eigentümer hat SchreibrechtX %s: nicht gelesen: gehört weder Ihnen noch rootX %s: nicht gelesen: gehört nicht IhnenX %s: nicht gelesen: anderer Benutzer als Eigentümer hat SchreibrechtX Keine folgenden Zeilen zum VerbindenX Kein input-Map EintragX Kein command-Map EintragX Das %s Zeichen kann nicht umgemappt werdenX "%s" ist momentan nicht gemapptX Markennamen müssen einzelne Buchstaben seinX %s existiert, nicht geschrieben; verwende ! zum ÜberschreibenX Neue .exrc Datei: %s. X Zielzeile ist innerhalb des VerschiebebereichsX Das open Kommando verlangt, daß die open Option gesetzt istX Das open Kommando ist nocht nicht implementiertX Rettung dieser Datei nicht möglichX Datei gerettetX %s wurde in zu viele Dateinamen expandiertX Nur reguläre Dateien und named pipes können gelesen werdenX %s: Locken zum Lesen war nicht möglichX lese ...X %s: %lu Zeilen, %lu ZeichenX Keine Hintergrundanzeigen vorhandenX Das script Kommando ist nur im vi Modus verfügbarX Kein Kommando auszuführenX shiftwidth Option auf 0 gesetztX Anzahl-ÜberlaufX Anzahl-UnterlaufX Regulärer Ausdruck angegeben; r Flag bedeutungslosX Die #, l und p Flags können im vi Modus nicht mit dem c Flag kombiniert werdenX Keine Übereinstimmung gefundenX Kein vorhergehender 'tag' angegebenX Weniger als %s Einträge auf dem 'tag'-Stack; verwende :display t[ags]X Keine Datei namens %s auf dem 'tag'-Stack; verwende :display t[ags]X Drücke Enter um fortzufahren: X %s: 'tag' nicht gefundenX %s: kaputter 'tag' in %sX %s: die Zeilennummer des 'tag' ist hinter dem DateiendeX Der 'tag' Stack ist leerX %s: Suchmuster nicht gefundenX %d weitere Dateien zu editierenX Puffer %s ist leerX Bestätige Änderung [n]X Unterbrochen.X Kein vorhergehender Puffer zum AusführenX Kein vorhergehender regulärer AusdruckX Das Kommando %s verlangt, daß bereits eine Datei eingelesen wurdeX Benutzung: %sX Das visual Kommando verlangt daß die open Option gesetzt istX Leere DateiX Keine vorhergehende F, f, T oder t SucheX %s nicht gefundenX Keine vorhergehende Datei zu editierenX Cursor nicht auf einer ZahlX Sich ergebende Zahl ist zu großX Sich ergebende Zahl ist zu kleinX Kein korrespondierendes Zeichen in dieser ZeileX Korrespondierendes Zeichen nicht gefundenX Keine Zeichen zu ersetzenX Keine andere Anzeige zum HinschaltenX Zeichen nach Suchmuster, Zeilenoffset und/oder z KommandoX Kein altes SuchmusterX Suche zur ursprünglichen Position zurückgekehrtX Abkürzung überschreitet Expansionsgrenze: Zeichen weggelassenX Nicht erlaubtes Zeichen; maskiere zum EingebenX Bereits am Anfang der EingabeX Keine weiteren Zeichen zu löschenX Bewegung hinter das DateiendeX Bewegung hinter das ZeilenendeX Keine Cursorbewegung gemachtX Bereits am DateianfangX Bewegung vor den DateianfangX Bereits in der ersten SpalteX Puffer sollen vor dem Kommando angegeben werdenX Bereits am DateiendeX Bereits am ZeilenendeX %s ist kein vi KommandoX Benutzung: %sX Keine Zeichen zu löschenX Das Q Kommando benötigt das ex Terminal InterfaceX Kein Kommando zu wiederholenX Die Datei ist leerX %s kann nicht als Bewegungskommando verwendet werdenX Bereits im Kommando-ModusX Cursor nicht auf einem WortX Wert der Window Option ist zu groß, max ist %uX AnhängenX ÄndernX KommandoX EinfügenX ErsetzenX Bewegung hinter das AnzeigenendeX Bewegung vor den AnzeigenanfangX Anzeige muß für Bildschirmteilung größer als %d seinX Keine Hintergrundanzeigen vorhandenX Es gibt keine Hintergrundanzeige, die eine Datei namens %s editiertX Die einzige dargestellte Anzeige kann nicht in den Hintergrund gebracht werdenX Die Anzeige kann nur auf %d Zeilen verkleinert werdenX Die Anzeige kann nicht verkleinert werdenX Die Anzeige kann nicht vergrößert werdenX Diese Anzeige kann nicht gestopt werdenX Unterbrochen: umdefinierte Tasten ungültigX vi: temporärer Puffer nicht freigegebenX Dieses Terminal hat keine %s TasteX es kann nur ein Puffer angegeben werdenX Zahl größer als %luX UnterbrochenX Nicht möglich, temporäre Datei anzulegenX Warnung: %s ist keine reguläre DateiX %s ist bereits gelockt, Editorsitzung schreibgeschütztX %s: löschenX %s: schließenX %s: löschenX %s: löschenX Datei nicht schreibbar, nicht geschrieben; verwende ! zum ÜberschreibenX Datei nicht schreibbar, nicht geschriebenX %s existiert, nicht geschrieben; verwende ! zum ÜberschreibenX %s existiert, nicht geschriebenX Teil der Datei, nicht geschrieben; verwende ! zum ÜberschreibenX Teil der Datei, nicht geschriebenX %s: Datei wurde später als diese Kopie verändert; verwende ! zum ÜberschreibenX %s: Datei wurde später als diese Kopie verändertX %s: Locken zum Schreiben war nicht möglichX schreibe ...X %s: WARNUNG: DATEI ABGESCHNITTENX Bereits am ersten 'tag' dieser GruppeX %s: neue Datei: %lu Zeilen, %lu ZeichenX %s: %lu Zeilen, %lu ZeichenX %s wurde in zu viele Dateinamen expandiertX %s: keine reguläre DateiX %s: gehört nicht IhnenX %s: anderer Benutzer als Eigentümer hat ZugriffX Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorierenX Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende :edit! zum ignorierenX Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorierenX Datei ist temporär; beim Verlassen gehen die Änderungen verlorenX Datei ist schreibgeschützt, Änderungen werden nicht automatisch geschriebenX Portokollierung neu begonnenX bestätigen [ynq]X Drücke beliebige Taste um fortzufahrenX Drücke beliebige Taste um fortzufahren [: um weitere Kommandos einzugeben]: X Drücke beliebige Taste um fortzufahren [q zum Verlassen]: X Diese Form von %s benötigt das ex Terminal-InterfaceX Gehe in ex Eingabe-Modus.\nX Kommando schiefgelaufen, noch keine Datei eingelesenX weiter?X unerwartetes Zeichen - EreignisX unerwartetes Dateiende - EreignisX Keine Position zum Anspringen gefundenX unerwartetes Unterbrechungs - EreignisX unerwartetes Verlassen - EreignisX unerwartetes Wiederherstellungs - EreignisX Bereits am letzten 'tag' dieser GruppeX Das %s Kommando benötigt das ex Terminal-InterfaceX Diese Form von %s wird nicht unterstützt wenn die 'secure edit' - Option gesetzt istX unerwartetes Zeichenketten - EreignisX unerwartetes timeout - EreignisX unerwartetes Schreibe - EreignisX Shell Expandierungen nicht unterstützt wenn die 'secure edit' - Option gesetzt istX Das %s Kommando wird nicht unterstützt wenn die 'secure edit' - Option gesetzt istX set: %s kann nicht ausgeschaltet werdenX Anzeige zu klein.X angefügtX geändertX gelöschtX verbundenX verschobenX geschobenX in Puffer geschriebenX ZeileX ZeilenX Vi wurde nicht mit dem Tcl Interpreter gelinktX Datei wurde seit dem letzten Schreiben verändert.X Shell Expansion hat nicht geklapptX Es ist keine %s Editieroption angegebenX Vi wurde nicht mit einem Perl Interpreter geladenX Kein ex Kommando auszuführenX Drücke um ein Kommando auszuführen, :q zum verlassenX Verwende "cscope help" für HilestellungX Keine cscope Verbindung aktivX %s: unbekannter Suchtyp: verwende einen aus %sX %d: keine solche cscope VerbindungX set: die %s Option kann nicht eingeschaltet werdenX set: die %s Option kann nicht auf 0 gesetzt werdenX %s: angefügt: %lu Zeilen, %lu ZeichenX unerwartetes Größenveränderungs - EreignisX %d Dateien zu edierenX nvi-1.81.6/catalog/german.base0100644000076400001440000003231410720065506015174 0ustar skimousers002 "Zeilenlängen-Überlauf" 003 "kann Zeile %lu nicht löschen" 004 "kann an Zeile %lu nicht anfügen" 005 "kann in Zeile %lu nicht einfügen" 006 "kann Zeile %lu nicht speichern" 007 "kann letzte Zeile nicht lesen" 008 "Fehler: kann Zeile %lu nicht wiederherstellen" 009 "Protokolldatei" 010 "Keine Protokollierung aktiv, Rückgängigmachen nicht möglich" 011 "Keine Änderungen rückgängig zu machen" 012 "Keine Protokollierung aktiv, Rückgängigmachen nicht möglich" 013 "Keine Protokollierung aktiv, Wiederholung von Änderungen nicht möglich" 014 "Keine Änderungen zu wiederholen" 015 "%s/%d: Protokollschreibfehler" 016 "Vi's Standardein- und -ausgabe muß ein Terminal sein" 017 "Marke %s: nicht gesetzt" 018 "Marke %s: die Zeile wurde gelöscht" 019 "Marke %s: Cursorposition existiert nicht mehr" 020 "Fehler: " 021 "neue Datei" 022 "Name geändert" 023 "geändert" 024 "nicht geändert" 025 "NICHT GELOCKT" 026 "nur zum Lesen" 027 "Zeile %lu von %lu [%ld%%]" 028 "leere Datei" 029 "Zeile %lu" 030 "Die Datei %s ist kein Meldungskatalog" 031 "Setzen der Voreinstellung für %s Option nicht möglich" 032 "Benutzung: %s" 033 "set: keine %s Option: 'set all' zeigt alle Optionen mit Werten an" 034 "set: der [no]%s Option kann kein Wert zugewiesen werden" 035 "set: %s ist keine Boolsche Option" 036 "set: %s Option: %s" 037 "set: %s Option: %s: Werte-Überlauf" 038 "set: %s Option: %s ist eine ungültige Zahl" 039 "set: %s ist keine Boolsche Option" 040 "Bildschirm hat zu wenig Spalten, weniger als %d" 041 "Bildschirm hat zu viele Spalten, mehr als %d" 042 "Bildschirm hat zu wenig Zeilen, weniger als %d" 043 "Bildschirm hat zu viele Zeilen, mehr als %d" 044 "Die lisp-Option ist nicht implementiert" 045 "Meldungen nicht abgeschaltet: %s" 046 "Meldungen nicht eingeschaltet: %s" 048 "Die paragraph-Option muß Gruppen zu zwei Zeichen enthalten" 049 "Die section-Option muß Gruppen zu zwei Zeichen enthalten" 053 "Der Standardpuffer ist leer" 054 "Puffer %s ist leer" 055 "Dateien mit newlines im Namen sind nicht wiederherstellbar" 056 "Änderungen nicht wiederherstellbar, falls die Editorsitzung schiefgeht" 057 "kopiere Datei für Wiederherstellung ..." 058 "Rettungsmechanismus funktioniert nicht: %s" 059 "Änderungen nicht wiederherstellbar, falls die Editorsitzung schiefgeht" 060 "Sicherung der Datei gescheitert: %s" 061 "kopiere Datei für Wiederherstellung ..." 062 "Informationen über den Benutzer mit id %u nicht gefunden" 063 "Wiederherstellungsdatei kann nicht gelockt werden" 064 "Puffer der Wiederherstellungsdatei übergelaufen" 065 "Wiederherstellungsdatei" 066 "%s: Wiederherstellungsdatei hat falsches Format" 067 "%s: Wiederherstellungsdatei hat falsches Format" 068 "Keine von Ihnen lesbaren Dateien mit Namen %s zum Wiederherstellen" 069 "Es gibt ältere Versionen dieser Datei von Ihnen zum Wiederherstellen" 070 "Sie haben noch andere Dateien zum Wiederherstellen" 071 "schicke keine email: %s" 072 "Datei leer; nichts zu suchen" 073 "Dateiende erreicht, ohne das Suchmuster zu finden" 074 "Kein altes Suchmuster" 075 "Suchmuster nicht gefunden" 076 "Dateianfang erreicht, ohne das Suchmuster zu finden" 077 "Suche beginnt von vorn" 078 "suche ..." 079 "Keine nichtdruckbaren Zeichen gefunden" 080 "Unbekannter Kommandoname" 082 "%s: Kommando im ex-Modus nicht verfügbar" 083 "Anzahl darf nicht Null sein" 084 "%s: falsche Zeilenangabe" 085 "Interner Syntaxtabellenfehler (%s: %s)" 086 "Benutzung: %s" 087 "%s: temporärer Puffer nicht freigegeben" 088 "Flagoffset vor Zeile 1" 089 "Flagoffset hinter dem Dateiende" 090 "@ mit Bereich lief, als Datei/Anzeige geändert wurde" 091 "globales oder v-Kommando lief, als Datei/Anzeige geändert wurde" 092 "Ex-Kommando mißlungen: restliche Kommandoeingabe ignoriert" 093 "Ex-Kommando mißlungen: umdefinierte Tasten ungültig" 094 "Die zweite Adresse ist kleiner als die erste" 095 "Kein Markenname angegeben" 096 "\\ ohne folgenden / oder ?" 097 "Referenz auf eine negative Zeilennummer" 098 "Das Kommando %s ist unbekannt" 099 "Adreßwert zu groß" 100 "Adreßwert zu klein" 101 "Ungültige Adreßkombination" 102 "Ungültige Adresse: nur %lu Zeilen in der Datei" 103 "Ungültige Adresse: die Datei ist leer" 104 "Das Kommando %s erlaubt keine Adresse 0" 105 "Keine Abkürzungen zum Anzeigen" 106 "Abkürzungen müssen mit einem "Wort"-Zeichen enden" 107 "Abkürzungen dürfen keine Tabulator- oder Leerzeichen enthalten" 108 "In Abkürzungen dürfen außer am Ende Wort- und Nicht-Wort-Zeichen nicht gemischt werden" 109 ""%s" ist keine Abkürzung" 110 "Vi Kommando mißlungen: umdefinierte Tasten ungültig" 111 "Keine weiteren Dateien zu editieren" 112 "Keine vorhergehenden Dateien zu editieren" 113 "Keine vorhergehenden Dateien für rewind" 114 "Keine Dateiliste zum Anzeigen" 115 "Kein vorhergehendes Kommando, um "!" zu ersetzen" 116 "Kein Dateiname für %%" 117 "Kein Dateiname für #" 118 "Fehler: execl: %s" 119 "E/A-Fehler: %s" 120 "Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorieren" 121 "Kann Homedirectory nicht bestimmen" 122 "Neues aktuelles Directory: %s" 123 "Keine Puffer anzuzeigen" 124 "Das Kommando %s kann nicht als Teil eines global oder v Kommandos verwendet werden" 125 "%s/%s: nicht gelesen: gehört weder Ihnen noch root" 126 "%s/%s: nicht gelesen: gehört nicht Ihnen" 127 "%s/%s: nicht gelesen: anderer Benutzer als Eigentümer hat Schreibrecht" 128 "%s: nicht gelesen: gehört weder Ihnen noch root" 129 "%s: nicht gelesen: gehört nicht Ihnen" 130 "%s: nicht gelesen: anderer Benutzer als Eigentümer hat Schreibrecht" 131 "Keine folgenden Zeilen zum Verbinden" 132 "Kein input-Map Eintrag" 133 "Kein command-Map Eintrag" 134 "Das %s Zeichen kann nicht umgemappt werden" 135 ""%s" ist momentan nicht gemappt" 136 "Markennamen müssen einzelne Buchstaben sein" 137 "%s existiert, nicht geschrieben; verwende ! zum Überschreiben" 138 "Neue .exrc Datei: %s. " 139 "Zielzeile ist innerhalb des Verschiebebereichs" 140 "Das open Kommando verlangt, daß die open Option gesetzt ist" 141 "Das open Kommando ist nocht nicht implementiert" 142 "Rettung dieser Datei nicht möglich" 143 "Datei gerettet" 144 "%s wurde in zu viele Dateinamen expandiert" 145 "Nur reguläre Dateien und named pipes können gelesen werden" 146 "%s: Locken zum Lesen war nicht möglich" 147 "lese ..." 148 "%s: %lu Zeilen, %lu Zeichen" 149 "Keine Hintergrundanzeigen vorhanden" 150 "Das script Kommando ist nur im vi Modus verfügbar" 151 "Kein Kommando auszuführen" 152 "shiftwidth Option auf 0 gesetzt" 153 "Anzahl-Überlauf" 154 "Anzahl-Unterlauf" 155 "Regulärer Ausdruck angegeben; r Flag bedeutungslos" 156 "Die #, l und p Flags können im vi Modus nicht mit dem c Flag kombiniert werden" 157 "Keine Übereinstimmung gefunden" 158 "Kein vorhergehender 'tag' angegeben" 159 "Weniger als %s Einträge auf dem 'tag'-Stack; verwende :display t[ags]" 160 "Keine Datei namens %s auf dem 'tag'-Stack; verwende :display t[ags]" 161 "Drücke Enter um fortzufahren: " 162 "%s: 'tag' nicht gefunden" 163 "%s: kaputter 'tag' in %s" 164 "%s: die Zeilennummer des 'tag' ist hinter dem Dateiende" 165 "Der 'tag' Stack ist leer" 166 "%s: Suchmuster nicht gefunden" 167 "%d weitere Dateien zu editieren" 168 "Puffer %s ist leer" 169 "Bestätige Änderung [n]" 170 "Unterbrochen." 171 "Kein vorhergehender Puffer zum Ausführen" 172 "Kein vorhergehender regulärer Ausdruck" 173 "Das Kommando %s verlangt, daß bereits eine Datei eingelesen wurde" 174 "Benutzung: %s" 175 "Das visual Kommando verlangt daß die open Option gesetzt ist" 177 "Leere Datei" 178 "Keine vorhergehende F, f, T oder t Suche" 179 "%s nicht gefunden" 180 "Keine vorhergehende Datei zu editieren" 181 "Cursor nicht auf einer Zahl" 182 "Sich ergebende Zahl ist zu groß" 183 "Sich ergebende Zahl ist zu klein" 184 "Kein korrespondierendes Zeichen in dieser Zeile" 185 "Korrespondierendes Zeichen nicht gefunden" 186 "Keine Zeichen zu ersetzen" 187 "Keine andere Anzeige zum Hinschalten" 188 "Zeichen nach Suchmuster, Zeilenoffset und/oder z Kommando" 189 "Kein altes Suchmuster" 190 "Suche zur ursprünglichen Position zurückgekehrt" 191 "Abkürzung überschreitet Expansionsgrenze: Zeichen weggelassen" 192 "Nicht erlaubtes Zeichen; maskiere zum Eingeben" 193 "Bereits am Anfang der Eingabe" 194 "Keine weiteren Zeichen zu löschen" 195 "Bewegung hinter das Dateiende" 196 "Bewegung hinter das Zeilenende" 197 "Keine Cursorbewegung gemacht" 198 "Bereits am Dateianfang" 199 "Bewegung vor den Dateianfang" 200 "Bereits in der ersten Spalte" 201 "Puffer sollen vor dem Kommando angegeben werden" 202 "Bereits am Dateiende" 203 "Bereits am Zeilenende" 204 "%s ist kein vi Kommando" 205 "Benutzung: %s" 206 "Keine Zeichen zu löschen" 207 "Das Q Kommando benötigt das ex Terminal Interface" 208 "Kein Kommando zu wiederholen" 209 "Die Datei ist leer" 210 "%s kann nicht als Bewegungskommando verwendet werden" 211 "Bereits im Kommando-Modus" 212 " Cursor nicht auf einem Wort" 214 "Wert der Window Option ist zu groß, max ist %u" 215 "Anhängen" 216 "Ändern" 217 "Kommando" 218 "Einfügen" 219 "Ersetzen" 220 "Bewegung hinter das Anzeigenende" 221 "Bewegung vor den Anzeigenanfang" 222 "Anzeige muß für Bildschirmteilung größer als %d sein" 223 "Keine Hintergrundanzeigen vorhanden" 224 "Es gibt keine Hintergrundanzeige, die eine Datei namens %s editiert" 225 "Die einzige dargestellte Anzeige kann nicht in den Hintergrund gebracht werden" 226 "Die Anzeige kann nur auf %d Zeilen verkleinert werden" 227 "Die Anzeige kann nicht verkleinert werden" 228 "Die Anzeige kann nicht vergrößert werden" 230 "Diese Anzeige kann nicht gestopt werden" 231 "Unterbrochen: umdefinierte Tasten ungültig" 232 "vi: temporärer Puffer nicht freigegeben" 233 "Dieses Terminal hat keine %s Taste" 234 "es kann nur ein Puffer angegeben werden" 235 "Zahl größer als %lu" 236 "Unterbrochen" 237 "Nicht möglich, temporäre Datei anzulegen" 238 "Warnung: %s ist keine reguläre Datei" 239 "%s ist bereits gelockt, Editorsitzung schreibgeschützt" 240 "%s: löschen" 241 "%s: schließen" 242 "%s: löschen" 243 "%s: löschen" 244 "Datei nicht schreibbar, nicht geschrieben; verwende ! zum Überschreiben" 245 "Datei nicht schreibbar, nicht geschrieben" 246 "%s existiert, nicht geschrieben; verwende ! zum Überschreiben" 247 "%s existiert, nicht geschrieben" 248 "Teil der Datei, nicht geschrieben; verwende ! zum Überschreiben" 249 "Teil der Datei, nicht geschrieben" 250 "%s: Datei wurde später als diese Kopie verändert; verwende ! zum Überschreiben" 251 "%s: Datei wurde später als diese Kopie verändert" 252 "%s: Locken zum Schreiben war nicht möglich" 253 "schreibe ..." 254 "%s: WARNUNG: DATEI ABGESCHNITTEN" 255 "Bereits am ersten 'tag' dieser Gruppe" 256 "%s: neue Datei: %lu Zeilen, %lu Zeichen" 257 "%s: %lu Zeilen, %lu Zeichen" 258 "%s wurde in zu viele Dateinamen expandiert" 259 "%s: keine reguläre Datei" 260 "%s: gehört nicht Ihnen" 261 "%s: anderer Benutzer als Eigentümer hat Zugriff" 262 "Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorieren" 263 "Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende :edit! zum ignorieren" 264 "Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorieren" 265 "Datei ist temporär; beim Verlassen gehen die Änderungen verloren" 266 "Datei ist schreibgeschützt, Änderungen werden nicht automatisch geschrieben" 267 "Portokollierung neu begonnen" 268 "bestätigen [ynq]" 269 "Drücke beliebige Taste um fortzufahren" 270 "Drücke beliebige Taste um fortzufahren [: um weitere Kommandos einzugeben]: " 271 "Drücke beliebige Taste um fortzufahren [q zum Verlassen]: " 272 "Diese Form von %s benötigt das ex Terminal-Interface" 273 "Gehe in ex Eingabe-Modus.\n" 274 "Kommando schiefgelaufen, noch keine Datei eingelesen" 275 " weiter?" 276 "unerwartetes Zeichen - Ereignis" 277 "unerwartetes Dateiende - Ereignis" 278 "Keine Position zum Anspringen gefunden" 279 "unerwartetes Unterbrechungs - Ereignis" 280 "unerwartetes Verlassen - Ereignis" 281 "unerwartetes Wiederherstellungs - Ereignis" 282 "Bereits am letzten 'tag' dieser Gruppe" 283 "Das %s Kommando benötigt das ex Terminal-Interface" 284 "Diese Form von %s wird nicht unterstützt wenn die 'secure edit' - Option gesetzt ist" 285 "unerwartetes Zeichenketten - Ereignis" 286 "unerwartetes timeout - Ereignis" 287 "unerwartetes Schreibe - Ereignis" 289 "Shell Expandierungen nicht unterstützt wenn die 'secure edit' - Option gesetzt ist" 290 "Das %s Kommando wird nicht unterstützt wenn die 'secure edit' - Option gesetzt ist" 291 "set: %s kann nicht ausgeschaltet werden" 292 "Anzeige zu klein." 293 "angefügt" 294 "geändert" 295 "gelöscht" 296 "verbunden" 297 "verschoben" 298 "geschoben" 299 "in Puffer geschrieben" 300 "Zeile" 301 "Zeilen" 302 "Vi wurde nicht mit dem Tcl Interpreter gelinkt" 303 "Datei wurde seit dem letzten Schreiben verändert." 304 "Shell Expansion hat nicht geklappt" 305 "Es ist keine %s Editieroption angegeben" 306 "Vi wurde nicht mit einem Perl Interpreter geladen" 307 "Kein ex Kommando auszuführen" 308 "Drücke um ein Kommando auszuführen, :q zum verlassen" 309 "Verwende "cscope help" für Hilestellung" 310 "Keine cscope Verbindung aktiv" 311 "%s: unbekannter Suchtyp: verwende einen aus %s" 312 "%d: keine solche cscope Verbindung" 313 "set: die %s Option kann nicht eingeschaltet werden" 314 "set: die %s Option kann nicht auf 0 gesetzt werden" 315 "%s: angefügt: %lu Zeilen, %lu Zeichen" 316 "unerwartetes Größenveränderungs - Ereignis" 317 "%d Dateien zu edieren" nvi-1.81.6/catalog/german.check0100644000076400001440000000222710720065506015337 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 213 229 288 ========================= MISSING ERROR MESSAGES (Please add!): 288 318 319 320 ========================= Extra error messages (just delete them): 280 287 ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): ========================= Duplicate messages, just message (this is okay): 2 %s existiert, nicht geschrieben; verwende ! zum ÜberschreibenX 2 %s wurde in zu viele Dateinamen expandiertX 2 %s: %lu Zeilen, %lu ZeichenX 2 %s: Wiederherstellungsdatei hat falsches FormatX 2 Kein altes SuchmusterX 2 Keine Hintergrundanzeigen vorhandenX 2 Keine Protokollierung aktiv, Rückgängigmachen nicht möglichX 2 Puffer %s ist leerX 2 geändertX 2 kopiere Datei für Wiederherstellung ...X 2 set: %s ist keine Boolsche OptionX 2 Änderungen nicht wiederherstellbar, falls die Editorsitzung schiefgehtX 3 %s: löschenX 3 Datei wurde seit dem letzten vollständigen Schreiben geändert; schreibe oder verwende ! zum ignorierenX 4 Benutzung: %sX ========================= nvi-1.81.6/catalog/german.owner0100644000076400001440000000013210720065506015405 0ustar skimousersBernhard Daeubler Joerg Wunsch nvi-1.81.6/catalog/ru_SU.KOI8-R0100644000076400001440000001747610720065506014773 0ustar skimousersVI_MESSAGE_CATALOG ðÅÒÅÐÏÌÎÅÎÉÅ ÚÎÁÞÅÎÉÑ ÄÌÉÎÙ ÓÔÒÏËÉX ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÓÔÒÏËÕ %luX ÎÅ×ÏÚÍÏÖÎÏ ÄÏÂÁ×ÉÔØ Ë ÓÔÒÏËÅ %luX ÎÅ×ÏÚÍÏÖÎÏ ×ÓÔÁ×ÉÔØ × ÓÔÒÏËÕ %luX ÎÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÓÔÒÏËÕ %luX ÎÅ×ÏÚÍÏÖÎÏ ÄÏÓÔÁÔØ ÐÏÓÌÅÄÎÀÀ ÓÔÒÏËÕX æÁÊÌ ÚÁÐÉÓÅÊX úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÏÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ËÏÍÁÎÄÕX îÅÔ ÉÚÍÅÎÅÎÉÊ ÄÌÑ ÏÔÍÅÎÙX úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÏÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ËÏÍÁÎÄÕX úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÐÒÏÓÍÏÔÒÅÔØ ×ÐÅÒÅÄX îÅÔ ÉÚÍÅÎÅÎÉÊ ÄÌÑ ÐÅÒÅÄÅÌËÉX %s/%d: ÏÛÉÂËÁ ÐÒÉ ÚÁÐÉÓÉ ÐÒÏÔÏËÏÌÁX óÔÁÎÄÁÒÔÎÙÊ ××ÏÄ/×Ù×ÏÄ ÄÌÑ VI ÄÏÌÖÅÎ ÂÙÔØ ÔÅÒÍÉÎÁÌX ïÔÍÅÔËÁ %s: ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁX ïÔÍÅÔËÁ %s: ÓÔÒÏËÁ ÂÙÌÁ ÕÄÁÌÅÎÁX ïÔÍÅÔËÁ %s: ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ ÂÏÌØÛÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔX ïÛÉÂËÁ: X æÁÊÌ %s ÎÅ Ñ×ÌÑÅÔÓÑ ËÁÔÁÌÏÇÏÍ ÓÏÏÂÝÅÎÉÊX îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÏÐÃÉÀ %s ÐÏ ÕÍÏÌÞÁÎÉÀX éÓÐÏÌØÚÏ×ÁÎÉÅ: %sX ïÐÃÉÉ %s ÎÅÔ: 'set all' ÐÏËÁÚÙ×ÁÅÔ ×ÓÅ ×ÏÚÍÏÖÎÙÅ ÏÐÃÉÉX set: [no]%s ÎÅ ÐÒÉÎÉÍÁÅÔ ÔÁËÏÇÏ ÚÎÁÞÅÎÉÑX set: %s ÏÐÃÉÑ ÎÅ Ñ×ÌÑÅÔÓÑ ÌÏÇÉÞÅÓËÏÊX set: ÎÅÐÒÁ×ÉÌØÎÏÅ ÚÎÁÞÅÎÉÅ %sX set: %s ÏÐÃÉÑ ÎÅ Ñ×ÌÑÅÔÓÑ ÌÏÇÉÞÅÓËÏÊX ëÏÌÉÞÅÓÔ×Ï ËÏÌÏÎÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ÍÁÌÏ, ÍÅÎØÛÅ ÞÅÍ %dX ëÏÌÉÞÅÓÔ×Ï ËÏÌÏÎÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÂÏÌØÛÅ ÞÅÍ %dX ëÏÌÉÞÅÓÔ×Ï ÓÔÒÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ÍÁÌÏ, ÍÅÎØÛÅ ÞÅÍ %dX ëÏÌÉÞÅÓÔ×Ï ÓÔÒÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÂÏÌØÛÅ ÞÅÍ %dX ïÐÃÉÑ lisp ÏÔÓÕÔÓÔ×ÕÅÔX óÏÏÂÝÅÎÉÑ ÎÅ ×ÙËÌÀÞÅÎÙ: %sX óÏÏÂÝÅÎÉÑ ÎÅ ×ËÌÀÞÅÎÙ: %sX ïÐÃÉÑ paragraph ÄÏÌÖÎÁ ÓÏÓÔÏÑÔØ ÉÚ ÇÒÕÐÐ Ó Ä×ÕÍÑ ÓÉÍ×ÏÌÁÍÉX ïÐÃÉÑ section ÄÏÌÖÎÁ ÓÏÓÔÏÑÔØ ÉÚ ÇÒÕÐÐ Ó Ä×ÕÍÑ ÓÉÍ×ÏÌÁÍÉX óÔÁÒÔÏ×ÙÊ ÂÕÆÅÒ ÐÕÓÔX âÕÆÅÒ %s ÐÕÓÔX æÁÊÌÙ Ó ÓÉÍ×ÏÌÁÍÉ ÐÅÒÅ×ÏÄÁ ÓÔÒÏËÉ × ÉÍÅÎÉ ÎÅ ÍÏÇÕÔ ÂÙÔØ ×ÏÓÓÔÁÎÏ×ÌÅÎÙX éÚÍÅÎÅÎÉÑ ÎÅ ÓÏÈÒÁÎÅÎÙ ÐÒÉ ËÒÁÈÅ ÓÅÓÓÉÉX óÏÈÒÁÎÅÎÉÅ ÎÅ ÕÄÁÌÏÓØ: %sX éÚÍÅÎÅÎÉÑ ÎÅ ÓÏÈÒÁÎÑÀÔÓÑ ÐÒÉ ÏÂÒÙ×Å ÓÅÓÓÉÉX óÏÈÒÁÎÅÎÉÅ ËÏÐÉÉ ÆÁÊÌÁ ÎÅ ÕÄÁÌÏÓØ: %sX éÎÆÏÒÍÁÃÉÉ ÎÁ ÐÏÌØÚÏ×ÁÔÅÌÑ %u ÎÅ ÎÁÊÄÅÎÏX îÅ×ÏÚÍÏÖÎÏ ÚÁÝÉÔÉÔØ ÓÐÁÓÅÎÎÙÊ ÆÁÊÌX âÕÆÅÒ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÏÇÏ ÆÁÊÌÁ ÐÅÒÅÐÏÌÎÅÎX ÷ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌX %s: ÎÅ ÄÏ ËÏÎÃÁ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌX %s: ÎÅ ÄÏ ËÏÎÃÁ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌX æÁÊÌÏ× Ó ÉÍÅÎÅÍ %s, ËÏÔÏÒÙÅ ÷Ù ÍÏÖÅÔÅ ÞÉÔÁÔØ, ÎÅ ÓÕÝÅÓÔ×ÕÅÔX åÓÔØ ÓÔÁÒÙÅ ×ÅÒÓÉÉ ÆÁÊÌÁ, ËÏÔÏÒÙÅ ÍÏÖÎÏ ×ÏÓÓÔÁÎÏ×ÉÔØX óÕÝÅÓÔ×ÕÀÔ ÄÒÕÇÉÅ ÆÁÊÌÙ, ËÏÔÏÒÙÅ ÍÏÖÎÏ ×ÏÓÓÔÁÎÏ×ÉÔØX Å-mail ÎÅ ÐÏÓÌÁÎ: %sX æÁÊÌ ÐÕÓÔ - ÉÓËÁÔØ ÎÅÞÅÇÏX äÏÓÔÉÇÎÕÔ ËÏÎÅà ÆÁÊÌÁ ÂÅÚ ÎÁÈÏÖÄÅÎÉÑ ÏÂÒÁÚÃÁ ÐÏÉÓËÁX îÅ ÚÁÄÁÎ ÏÂÒÁÚÅà ÐÏÉÓËÁX ïÂÒÁÚÅà ÐÏÉÓËÁ ÎÅ ÎÁÊÄÅÎX äÏÓÔÕÐÎÏ ÎÁÞÁÌÏ ÆÁÊÌÁ ÂÅÚ ÎÁÈÏÖÄÅÎÉÑ ÏÂÒÁÚÃÁ ÐÏÉÓËÁX ðÏÉÓË ÚÁÃÉËÌÅÎX îÅÐÅÞÁÔÎÙÈ ÓÉÍ×ÏÌÏ× ÎÅ ÎÁÊÄÅÎÏX îÅÉÚ×ÅÓÔÎÁÑ ËÏÍÁÎÄÁX %s: ËÏÍÁÎÄÁ ÎÅ ÄÏÓÔÕÐÎÁ × ÒÅÖÉÍÅ exX óÞÅÔÞÉË ÎÅ ÍÏÖÅÔ ÂÙÔØ ÎÕÌÅÍX %s: ÎÅÐÒÁ×ÉÌØÎÏÅ ÕËÁÚÁÎÉÅ ÓÔÒÏËÉX ÷ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ × ÓÉÎÔÁËÓÉÓÅ (%s: %s)X éÓÐÏÌØÚÏ×ÁÎÉÅ: %sX %s: ×ÒÅÍÅÎÎÙÊ ÂÕÆÅÒ ÎÅ ÉÓÐÏÌØÚÏ×ÁÎX íÅÔËÁ ÐÏÓÔÁ×ÌÅÎÁ ÐÅÒÅÄ ÓÔÒÏËÏÊ 1X íÅÔËÁ ÐÏÓÔÁ×ÌÅÎÁ ÐÏÓÌÅ ËÏÎÃÁ ÆÁÊÌÁX ëÏÍÁÎÄÁ ex ÎÅ ÕÄÁÌÁÓØ: ÐÏÓÌÅÄÕÀÝÉÅ ËÏÍÁÎÄÙ ÚÁÂÙÔÙX ÷ÔÏÒÏÊ ÁÄÒÅÓ ÍÅÎØÛÅ ÞÅÍ ÐÅÒ×ÙÊX îÅ ÕËÁÚÁÎÏ ÎÁÚ×ÁÎÉÅ ÏÔÍÅÔËÉX \\ ÎÅ ÚÁ×ÅÒÛÁÅÔÓÑ / ÉÌÉ ?X óÓÙÌËÁ Ë ÓÔÒÏËÅ Ó ÎÏÍÅÒÏÍ ÍÅÎØÛÅ 0X ëÏÍÁÎÄÁ %s ÎÅÉÚ×ÅÓÔÎÁX ðÅÒÅÐÏÌÎÅÎÉÅ ÚÎÁÞÅÎÉÑ ÁÄÒÅÓÁX îÅÄÏÂÏÒ ÚÎÁÞÅÎÉÑ ÁÄÒÅÓÁX îÅÄÏÐÕÓÔÉÍÁÑ ËÏÍÂÉÎÁÃÉÑ × ÁÄÒÅÓÅX îÅÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ: ×ÓÅÇÏ %lu ÓÔÒÏË × ÆÁÊÌÅX îÅÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ: ÆÁÊÌ ÐÕÓÔX ëÏÍÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÁÄÒÅÓ 0X áÂÂÒÅ×ÉÁÔÕÒÙ ÏÔÓÕÔÓÔ×ÕÀÔX áÂÂÒÅ×ÉÁÔÕÒÙ ÄÏÌÖÎÙ ÚÁËÁÎÞÉ×ÁÔØÓÑ ÓÉÍ×ÏÌÏÍ "word"X áÂÂÒÅ×ÉÁÔÕÒÙ ÎÅ ÍÏÇÕÔ ÓÏÄÅÒÖÁÔØ ÓÉÍ×ÏÌÏÙ ÔÁÂÌÑÃÉÉ ÉÌÉ ÐÒÏÂÅÌÙX áÂÂÒÅ×ÉÁÔÕÒÙ ÎÅ ÍÏÇÕÔ ÓÏÞÅÔÁÔØÓÑ Ó ÓÉÍ×ÏÌÁÍÉ ÓÌÏ×/ÎÅ-ÓÌÏ×, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ËÏÎÃÁ ÓÔÒÏËÉX "%s" ÎÅ Ñ×ÌÑÅÔÓÑ ÁÂÂÒÅ×ÉÁÔÕÒÏÊX æÁÊÌÏ× ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÂÏÌØÛÅ ÎÅÔX ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑX ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÐÒÏÓÍÏÔÒÁ ÎÁÚÁÄX îÅÔ ÆÁÊÌÏ×X ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÊ ËÏÍÁÎÄÙ ÄÌÑ ÚÁÍÅÎÙ "!"X ïÔÓÕÔÓÔ×ÉÅ ÚÁÍÅÎÙ ÄÌÑ %%X ïÔÓÕÔÓÔ×ÉÅ ÚÁÍÅÎÙ ÄÌÑ #X ïÛÉÂËÁ: execl: %sX ïÛÉÂËÁ ××ÏÄÁ/×Ù×ÏÄÁ: %sX æÁÊÌ ÉÚÍÅÎÅÎ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ÐÏÌÎÏÊ ÚÁÐÉÓÉ: ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÄÏÍÁÛÎÉÊ ËÁÔÁÌÏÇX îÏ×ÙÊ ËÁÔÁÌÏÇ: %sX îÅÔ ×ÙÒÅÚÁÎÙÈ ÂÕÆÅÒÏ×X ëÏÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ×ÎÕÔÒÉ ÇÌÏÂÁÌØÎÏÊ ÉÌÉ v ËÏÍÁÎÄÙX %s/%s: ÎÅ ÏÔËÒÙÔ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ ÉÌÉ root-ÕX %s/%s: ÎÅ ÏÔËÒÙÔ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍX %s/%s: ÎÅ ÏÔËÒÙÔ: ×ÏÚÍÏÖÎÏÓÔØ ÚÁÐÉÓÉ Õ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÎÅ Ñ×ÌÑÀÝÅÇÏÓÑ ×ÌÁÄÅÌØÃÅÍX %s: ÎÅ ÓÞÉÔÁÎ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ ÉÌÉ root-ÕX %s: ÎÅ ÓÞÉÔÁÎ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍX %s: ÎÅ ÓÞÉÔÁÎ: ×ÏÚÍÏÖÎÏÓÔØ ÚÁÐÉÓÉ Õ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÎÅ Ñ×ÌÑÀÝÅÇÏÓÑ ×ÌÁÄÅÌØÃÅÍX ðÏÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ ÏÔÓÕÔÓÔ×ÕÀÔX ïÔÓÕÔÓÔ×ÉÅ ÐÁÒÁÍÅÔÒÏ× ××ÏÄÁX ïÔÓÕÔÓÔ×ÉÅ ÐÁÒÁÍÅÔÒÏ× ËÏÍÁÎÄÙX óÉÍ×ÏÌ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÐÅÒÅÎÁÚÎÁÞÅÎX "%s" ÎÁ ÄÁÎÎÙÊ ÍÏÍÅÎÔ ÎÅ ÎÁÚÎÁÞÅÎX éÍÑ ÍÅÔËÉ ÄÏÌÖÎÏ ÂÙÔØ ÏÄÎÉÍ ÓÉÍ×ÏÌÏÍX %s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ; ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX îÏ×ÙÊ ÆÁÊÌ exrc: %sX óÔÒÏËÁ ÐÅÒÅÎÏÓÁ ÎÁÈÏÄÉÔÓÑ ×ÎÕÔÒÉ ÐÁÒÁÍÅÔÒÏ× ÐÅÒÅÎÏÓÁX ëÏÍÁÎÄÁ open ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÕÓÔÁÎÏ×ËÕ ÏÐÃÉÉ openX ëÏÍÁÎÄÁ open ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁX úÁÝÉÔÁ ÆÁÊÌÁ ÎÅ×ÏÚÍÏÖÎÁX æÁÊÌ ÚÁÝÉÝÅÎX %s ÒÁÓÛÉÒÉÌÓÑ × ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÉÍÅÎ ÆÁÊÌÏ×X %s: ÚÁÝÉÔÁ ÎÁ ÞÔÅÎÉÅ ÂÙÌÁ ÎÅÄÏÓÔÕÐÎÁX %s: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×X îÅÔ ÔÅÎÅ×ÙÈ ÏËÏÎX ëÏÍÁÎÄÁ script ÉÓÐÏÌØÚÕÅÔÓÑ ÔÏÌØËÏ × ÒÅÖÉÍÅ viX îÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÉÓÐÏÌÎÅÎÉÑX ïÐÃÉÑ shiftwidth ÕÓÔÁÎÏ×ÌÅÎÁ ÎÁ 0X ðÅÒÅÐÏÌÎÅÎÉÅ ÓÞÅÔÞÉËÁX ãÉËÌ ×ÙÐÏÌÎÅÎ ÎÅ ÄÏ ËÏÎÃÁX õËÁÚÁÎÏ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ: ÆÌÁÇ r ÎÅ ÎÕÖÅÎX æÌÁÇÉ #, l É p ÎÅ ÍÏÇÕÔ ÂÙÔØ ÏÂßÅÄÉÎÅÎÙ Ó ÆÌÁÇÏÍ c × ÒÅÖÉÍÅ viX óÏ×ÐÁÄÅÎÉÊ ÎÅÔX íÅÔËÁ ÏÔÓÕÔÓÔ×ÕÅÔX ÷ ÓÔÅËÅ ÍÅÔÏË ÚÁÐÉÓÅÊ ÍÅÎØÛÅ, ÞÅÍ %s, ÉÓÐÏÌØÚÕÊÔÅ :display t[ags]X æÁÊÌÁ Ó ÉÍÅÎÅÍ %s × ÓÔÅËÅ ÍÅÔÏË ÎÅÔ; ÉÓÐÏÌØÚÕÊÔÅ :display t[ags]X %s: ÍÅÔËÁ ÎÅ ÎÁÊÄÅÎÁX %s: ÐÌÏÈÁÑ ÍÅÔËÁ × %sX óÔÅË ÍÅÔÏË ÐÕÓÔX %s: ÏÂÒÁÚÅà ÐÏÉÓËÁ ÎÅ ÎÁÊÄÅÎX âÕÆÅÒ %s ÐÕÓÔX ðÒÅÒ×ÁÎÏX ïÔÓÕÔÓÔ×ÉÅ ÂÕÆÅÒÁ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑX îÅÔ ÐÒÅÄÉÄÕÝÅÇÏ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑX ëÏÍÁÎÄÁ %s ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÎÁÌÉÞÉÅ ÐÒÏÞÔÅÎÎÏÇÏ ÆÁÊÌÁX éÓÐÏÌØÚÏ×ÁÎÉÅ: %sX ëÏÍÁÎÄÁ visual ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÏÂÑÚÁÔÅÌØÎÕÀ ÕÓÔÁÎÏ×ËÕ ÏÐÃÉÉ openX ðÕÓÔÏÊ ÆÁÊÌX îÅÔ ÐÒÅÄÙÄÕÝÅÇÏ ÐÏÉÓËÁ F, f, T, ÉÌÉ tX %s ÎÅ ÎÁÊÄÅÎÏX îÅÔ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑX ëÕÒÓÏÒ ÓÔÏÉÔ ÎÅ ÎÁ ÃÉÆÒÅX ðÏÌÕÞÅÎÎÏÅ ÞÉÓÌÏ ÓÌÉÛËÏÍ ×ÅÌÉËÏX ðÏÌÕÞÅÎÎÏÅ ÞÉÓÌÏ ÓÌÉÛËÏÍ ÍÁÌÏX ðÏÄÈÏÄÑÝÅÇÏ ÓÉÍ×ÏÌÁ ÎÅÔ ÎÁ ÜÔÏÊ ÓÔÒÏËÅX ðÏÄÈÏÄÑÝÉÊ ÓÉÍ×ÏÌ ÎÅ ÎÁÊÄÅÎX îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑX äÒÕÇÏÇÏ ÜËÒÁÎÁ ÎÅ ÓÕÝÅÓÔ×ÕÅÔX óÉÍ×ÏÌÙ ÐÏÓÌÅ ÓÔÒÏËÉ ÄÌÑ ÐÏÉÓËÁ, ÓÍÅÝÅÎÉÑ ÓÔÒÏËÉ É/ÉÌÉ ËÏÍÁÎÄÙ zX ðÒÏÛÌÙÊ ÏÂÒÁÚÅà ÐÏÉÓËÁ ÏÔÓÕÔÓÔ×ÕÅÔX ðÏÉÓË ÚÁ×ÅÒÛÉÌÓÑ ÎÁ ÎÁÞÁÌØÎÏÊ ÐÏÚÉÃÉÉX óÉÍ×ÏÌ ÎÅÐÒÁ×ÉÌÅÎ; Ë×ÏÔÉÒÕÊÔÅ ÄÌÑ ××ÏÄÁX õÖÅ ÎÁ ÎÁÞÁÌÅ ×ÓÔÁ×ËÉX îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑX ðÅÒÅÄ×ÉÖÅÎÉÅ ÚÁ ËÏÎÅà ÆÁÊÌÁX ðÅÒÅÄ×ÉÖÅÎÉÅ ÚÁ ËÏÎÅà ÓÔÒÏËÉX ä×ÉÖÅÎÉÅ ÓÔÒÏËÉ ÎÅ ÓÄÅÌÁÎÏX õÖÅ ÎÁ ÎÁÞÁÌÅ ÆÁÊÌÁX ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ÎÁÞÁÌÏ ÆÁÊÌÁX õÖÅ × ÐÅÒ×ÏÊ ËÏÌÏÎËÅX âÕÆÅÒÙ ÄÏÌÖÎÙ ÂÙÔØ ÕËÁÚÁÎÙ ÄÏ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙX õÖÅ ÎÁ ËÏÎÃÅ ÆÁÊÌÁX õÖÅ ÎÁ ËÏÎÃÅ ÓÔÒÏËÉX %s ÎÅ Ñ×ÌÑÅÔÓÑ ËÏÍÁÎÄÏÊ VIX éÓÐÏÌØÚÏ×ÁÎÉÅ: %sX îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑX îÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÐÏ×ÔÏÒÁX ëÏÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ËÁË ËÏÍÁÎÄÁ ÐÅÒÅÍÅÝÅÎÉÑX õÖÅ × ËÏÍÁÎÄÎÏÍ ÒÅÖÉÍÅX úÎÁÞÅÎÉÅ ÏÐÃÉÉ windows ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÍÁËÓÉÍÁÌØÎÏÅ ÚÎÁÞÅÎÉÅ = %uX ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ËÏÎÅà ÜËÒÁÎÁX ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ÎÁÞÁÌÏ ÜËÒÁÎÁX ôÅÎÅ×ÙÈ ÏËÏÎ ÎÅÔX îÅ ÓÕÝÅÓÔ×ÕÅÔ ÔÅÎÅ×ÏÇÏ ÏËÎÁ Ó ÒÅÄÁËÔÉÒÏ×ÁÎÉÅÍ ÆÁÊÌÁ %sX ÷Ù ÎÅ ÍÏÖÅÔÅ ÓÄÅÌÁÔØ ÅÄÉÎÓÔ×ÅÎÎÏÅ ÏËÎÏ ÔÅÎÅ×ÙÍX üËÒÁÎ ÍÏÖÅÔ ÂÙÔØ ÓÖÁÔX üËÒÁÎ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓÖÁÔ ÔÏÌØËÏ ÄÏ %d ÓÔÒÏËX üËÒÁÎ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÒÁÓÛÉÒÅÎX äÁÎÎÙÊ ÔÉÐ ÔÅÒÍÉÎÁÌÁ ÎÅ ÉÍÅÅÔ ËÌÁ×ÉÛÉ %sX îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌX ÷ÎÉÍÁÎÉÅ: %s ÓÐÅÃÉÁÌØÎÙÊ ÆÁÊÌX %s ÕÖÅ ÚÁÂÌÏËÉÒÏ×ÁÎ, ÄÏÓÔÕÐÅÎ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅX %s: ÕÄÁÌÅÎX %s: ÚÁËÒÙÔX %s: ÕÄÁÌÅÎX %s: ÕÄÁÌÅÎX æÁÊÌ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ, ÎÅ ÚÁÐÉÓÁÎ: éÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX æÁÊÌ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ, ÎÅ ÚÁÐÉÓÁÎX %s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ; ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX %s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎX éÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÞÁÓÔÉÞÎÏÊ ÚÁÐÉÓÉ ÆÁÊÌÁX þÁÓÔØ ÆÁÊÌÁ, ÆÁÊÌ ÎÅ ÚÁÐÉÓÁÎX %s: æÁÊÌ ÉÚÍÅÎÑÌÓÑ ÐÏÚÄÎÅÅ, ÞÅÍ ÄÁÎÎÁÑ ËÏÐÉÑ: ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX %s: æÁÊÌ ÉÚÍÅÎÑÌÓÑ ÐÏÚÄÎÅÅ, ÞÅÍ ÄÁÎÎÁÑ ËÏÐÉÑX %s: ÚÁÝÉÔÁ ÎÁ ÚÁÐÉÓØ ÂÙÌÁ ÎÅÄÏÓÔÕÐÎÁX %s: ÷îéíáîéå: æáêì õóåþåîX %s: ÎÏ×ÙÊ ÆÁÊÌ: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×X %s: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×X %s ÒÁÓÛÉÒÉÌÓÑ × ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÉÍÅÎ ÆÁÊÌÏ×X %s: ÓÐÅÃÉÁÌØÎÙÊ ÆÁÊÌX %s: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍX %s: ÄÏÓÔÕÐÅÎ ÎÅ ÔÏÌØËÏ ÷ÁÍX æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ :edit ÄÌÑ ÏÂÈÏÄÁX æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX æÁÊÌ ×ÒÅÍÅÎÎÙÊ: ×ÙÈÏÄ ÓÏÔÒÅÔ ÌÀÂÙÅ ÉÚÍÅÎÅÎÉÑX úÁÐÉÓÉ ÎÁÞÁÔÙ ÚÁÎÏ×ÏX nvi-1.81.6/catalog/ru_SU.KOI8-R.base0100644000076400001440000002144510720065506015673 0ustar skimousers002 "ðÅÒÅÐÏÌÎÅÎÉÅ ÚÎÁÞÅÎÉÑ ÄÌÉÎÙ ÓÔÒÏËÉ" 003 "ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÓÔÒÏËÕ %lu" 004 "ÎÅ×ÏÚÍÏÖÎÏ ÄÏÂÁ×ÉÔØ Ë ÓÔÒÏËÅ %lu" 005 "ÎÅ×ÏÚÍÏÖÎÏ ×ÓÔÁ×ÉÔØ × ÓÔÒÏËÕ %lu" 006 "ÎÅ×ÏÚÍÏÖÎÏ ÓÏÈÒÁÎÉÔØ ÓÔÒÏËÕ %lu" 007 "ÎÅ×ÏÚÍÏÖÎÏ ÄÏÓÔÁÔØ ÐÏÓÌÅÄÎÀÀ ÓÔÒÏËÕ" 009 "æÁÊÌ ÚÁÐÉÓÅÊ" 010 "úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÏÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ËÏÍÁÎÄÕ" 011 "îÅÔ ÉÚÍÅÎÅÎÉÊ ÄÌÑ ÏÔÍÅÎÙ" 012 "úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÏÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ËÏÍÁÎÄÕ" 013 "úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÐÒÏÓÍÏÔÒÅÔØ ×ÐÅÒÅÄ" 014 "îÅÔ ÉÚÍÅÎÅÎÉÊ ÄÌÑ ÐÅÒÅÄÅÌËÉ" 015 "%s/%d: ÏÛÉÂËÁ ÐÒÉ ÚÁÐÉÓÉ ÐÒÏÔÏËÏÌÁ" 016 "óÔÁÎÄÁÒÔÎÙÊ ××ÏÄ/×Ù×ÏÄ ÄÌÑ VI ÄÏÌÖÅÎ ÂÙÔØ ÔÅÒÍÉÎÁÌ" 017 "ïÔÍÅÔËÁ %s: ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁ" 018 "ïÔÍÅÔËÁ %s: ÓÔÒÏËÁ ÂÙÌÁ ÕÄÁÌÅÎÁ" 019 "ïÔÍÅÔËÁ %s: ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ ÂÏÌØÛÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" 020 "ïÛÉÂËÁ: " 030 "æÁÊÌ %s ÎÅ Ñ×ÌÑÅÔÓÑ ËÁÔÁÌÏÇÏÍ ÓÏÏÂÝÅÎÉÊ" 031 "îÅ×ÏÚÍÏÖÎÏ ÕÓÔÁÎÏ×ÉÔØ ÏÐÃÉÀ %s ÐÏ ÕÍÏÌÞÁÎÉÀ" 032 "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s" 033 "ïÐÃÉÉ %s ÎÅÔ: 'set all' ÐÏËÁÚÙ×ÁÅÔ ×ÓÅ ×ÏÚÍÏÖÎÙÅ ÏÐÃÉÉ" 034 "set: [no]%s ÎÅ ÐÒÉÎÉÍÁÅÔ ÔÁËÏÇÏ ÚÎÁÞÅÎÉÑ" 035 "set: %s ÏÐÃÉÑ ÎÅ Ñ×ÌÑÅÔÓÑ ÌÏÇÉÞÅÓËÏÊ" 038 "set: ÎÅÐÒÁ×ÉÌØÎÏÅ ÚÎÁÞÅÎÉÅ %s" 039 "set: %s ÏÐÃÉÑ ÎÅ Ñ×ÌÑÅÔÓÑ ÌÏÇÉÞÅÓËÏÊ" 040 "ëÏÌÉÞÅÓÔ×Ï ËÏÌÏÎÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ÍÁÌÏ, ÍÅÎØÛÅ ÞÅÍ %d" 041 "ëÏÌÉÞÅÓÔ×Ï ËÏÌÏÎÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÂÏÌØÛÅ ÞÅÍ %d" 042 "ëÏÌÉÞÅÓÔ×Ï ÓÔÒÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ÍÁÌÏ, ÍÅÎØÛÅ ÞÅÍ %d" 043 "ëÏÌÉÞÅÓÔ×Ï ÓÔÒÏË ÜËÒÁÎÁ ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÂÏÌØÛÅ ÞÅÍ %d" 044 "ïÐÃÉÑ lisp ÏÔÓÕÔÓÔ×ÕÅÔ" 045 "óÏÏÂÝÅÎÉÑ ÎÅ ×ÙËÌÀÞÅÎÙ: %s" 046 "óÏÏÂÝÅÎÉÑ ÎÅ ×ËÌÀÞÅÎÙ: %s" 048 "ïÐÃÉÑ paragraph ÄÏÌÖÎÁ ÓÏÓÔÏÑÔØ ÉÚ ÇÒÕÐÐ Ó Ä×ÕÍÑ ÓÉÍ×ÏÌÁÍÉ" 049 "ïÐÃÉÑ section ÄÏÌÖÎÁ ÓÏÓÔÏÑÔØ ÉÚ ÇÒÕÐÐ Ó Ä×ÕÍÑ ÓÉÍ×ÏÌÁÍÉ" 053 "óÔÁÒÔÏ×ÙÊ ÂÕÆÅÒ ÐÕÓÔ" 054 "âÕÆÅÒ %s ÐÕÓÔ" 055 "æÁÊÌÙ Ó ÓÉÍ×ÏÌÁÍÉ ÐÅÒÅ×ÏÄÁ ÓÔÒÏËÉ × ÉÍÅÎÉ ÎÅ ÍÏÇÕÔ ÂÙÔØ ×ÏÓÓÔÁÎÏ×ÌÅÎÙ" 056 "éÚÍÅÎÅÎÉÑ ÎÅ ÓÏÈÒÁÎÅÎÙ ÐÒÉ ËÒÁÈÅ ÓÅÓÓÉÉ" 058 "óÏÈÒÁÎÅÎÉÅ ÎÅ ÕÄÁÌÏÓØ: %s" 059 "éÚÍÅÎÅÎÉÑ ÎÅ ÓÏÈÒÁÎÑÀÔÓÑ ÐÒÉ ÏÂÒÙ×Å ÓÅÓÓÉÉ" 060 "óÏÈÒÁÎÅÎÉÅ ËÏÐÉÉ ÆÁÊÌÁ ÎÅ ÕÄÁÌÏÓØ: %s" 062 "éÎÆÏÒÍÁÃÉÉ ÎÁ ÐÏÌØÚÏ×ÁÔÅÌÑ %u ÎÅ ÎÁÊÄÅÎÏ" 063 "îÅ×ÏÚÍÏÖÎÏ ÚÁÝÉÔÉÔØ ÓÐÁÓÅÎÎÙÊ ÆÁÊÌ" 064 "âÕÆÅÒ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÏÇÏ ÆÁÊÌÁ ÐÅÒÅÐÏÌÎÅÎ" 065 "÷ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌ" 066 "%s: ÎÅ ÄÏ ËÏÎÃÁ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌ" 067 "%s: ÎÅ ÄÏ ËÏÎÃÁ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌ" 068 "æÁÊÌÏ× Ó ÉÍÅÎÅÍ %s, ËÏÔÏÒÙÅ ÷Ù ÍÏÖÅÔÅ ÞÉÔÁÔØ, ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" 069 "åÓÔØ ÓÔÁÒÙÅ ×ÅÒÓÉÉ ÆÁÊÌÁ, ËÏÔÏÒÙÅ ÍÏÖÎÏ ×ÏÓÓÔÁÎÏ×ÉÔØ" 070 "óÕÝÅÓÔ×ÕÀÔ ÄÒÕÇÉÅ ÆÁÊÌÙ, ËÏÔÏÒÙÅ ÍÏÖÎÏ ×ÏÓÓÔÁÎÏ×ÉÔØ" 071 "Å-mail ÎÅ ÐÏÓÌÁÎ: %s" 072 "æÁÊÌ ÐÕÓÔ - ÉÓËÁÔØ ÎÅÞÅÇÏ" 073 "äÏÓÔÉÇÎÕÔ ËÏÎÅà ÆÁÊÌÁ ÂÅÚ ÎÁÈÏÖÄÅÎÉÑ ÏÂÒÁÚÃÁ ÐÏÉÓËÁ" 074 "îÅ ÚÁÄÁÎ ÏÂÒÁÚÅà ÐÏÉÓËÁ" 075 "ïÂÒÁÚÅà ÐÏÉÓËÁ ÎÅ ÎÁÊÄÅÎ" 076 "äÏÓÔÕÐÎÏ ÎÁÞÁÌÏ ÆÁÊÌÁ ÂÅÚ ÎÁÈÏÖÄÅÎÉÑ ÏÂÒÁÚÃÁ ÐÏÉÓËÁ" 077 "ðÏÉÓË ÚÁÃÉËÌÅÎ" 079 "îÅÐÅÞÁÔÎÙÈ ÓÉÍ×ÏÌÏ× ÎÅ ÎÁÊÄÅÎÏ" 080 "îÅÉÚ×ÅÓÔÎÁÑ ËÏÍÁÎÄÁ" 082 "%s: ËÏÍÁÎÄÁ ÎÅ ÄÏÓÔÕÐÎÁ × ÒÅÖÉÍÅ ex" 083 "óÞÅÔÞÉË ÎÅ ÍÏÖÅÔ ÂÙÔØ ÎÕÌÅÍ" 084 "%s: ÎÅÐÒÁ×ÉÌØÎÏÅ ÕËÁÚÁÎÉÅ ÓÔÒÏËÉ" 085 "÷ÎÕÔÒÅÎÎÑÑ ÏÛÉÂËÁ × ÓÉÎÔÁËÓÉÓÅ (%s: %s)" 086 "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s" 087 "%s: ×ÒÅÍÅÎÎÙÊ ÂÕÆÅÒ ÎÅ ÉÓÐÏÌØÚÏ×ÁÎ" 088 "íÅÔËÁ ÐÏÓÔÁ×ÌÅÎÁ ÐÅÒÅÄ ÓÔÒÏËÏÊ 1" 089 "íÅÔËÁ ÐÏÓÔÁ×ÌÅÎÁ ÐÏÓÌÅ ËÏÎÃÁ ÆÁÊÌÁ" 092 "ëÏÍÁÎÄÁ ex ÎÅ ÕÄÁÌÁÓØ: ÐÏÓÌÅÄÕÀÝÉÅ ËÏÍÁÎÄÙ ÚÁÂÙÔÙ" 094 "÷ÔÏÒÏÊ ÁÄÒÅÓ ÍÅÎØÛÅ ÞÅÍ ÐÅÒ×ÙÊ" 095 "îÅ ÕËÁÚÁÎÏ ÎÁÚ×ÁÎÉÅ ÏÔÍÅÔËÉ" 096 "\\ ÎÅ ÚÁ×ÅÒÛÁÅÔÓÑ / ÉÌÉ ?" 097 "óÓÙÌËÁ Ë ÓÔÒÏËÅ Ó ÎÏÍÅÒÏÍ ÍÅÎØÛÅ 0" 098 "ëÏÍÁÎÄÁ %s ÎÅÉÚ×ÅÓÔÎÁ" 099 "ðÅÒÅÐÏÌÎÅÎÉÅ ÚÎÁÞÅÎÉÑ ÁÄÒÅÓÁ" 100 "îÅÄÏÂÏÒ ÚÎÁÞÅÎÉÑ ÁÄÒÅÓÁ" 101 "îÅÄÏÐÕÓÔÉÍÁÑ ËÏÍÂÉÎÁÃÉÑ × ÁÄÒÅÓÅ" 102 "îÅÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ: ×ÓÅÇÏ %lu ÓÔÒÏË × ÆÁÊÌÅ" 103 "îÅÐÒÁ×ÉÌØÎÙÊ ÁÄÒÅÓ: ÆÁÊÌ ÐÕÓÔ" 104 "ëÏÍÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØ ÁÄÒÅÓ 0" 105 "áÂÂÒÅ×ÉÁÔÕÒÙ ÏÔÓÕÔÓÔ×ÕÀÔ" 106 "áÂÂÒÅ×ÉÁÔÕÒÙ ÄÏÌÖÎÙ ÚÁËÁÎÞÉ×ÁÔØÓÑ ÓÉÍ×ÏÌÏÍ "word"" 107 "áÂÂÒÅ×ÉÁÔÕÒÙ ÎÅ ÍÏÇÕÔ ÓÏÄÅÒÖÁÔØ ÓÉÍ×ÏÌÏÙ ÔÁÂÌÑÃÉÉ ÉÌÉ ÐÒÏÂÅÌÙ" 108 "áÂÂÒÅ×ÉÁÔÕÒÙ ÎÅ ÍÏÇÕÔ ÓÏÞÅÔÁÔØÓÑ Ó ÓÉÍ×ÏÌÁÍÉ ÓÌÏ×/ÎÅ-ÓÌÏ×, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ËÏÎÃÁ ÓÔÒÏËÉ" 109 ""%s" ÎÅ Ñ×ÌÑÅÔÓÑ ÁÂÂÒÅ×ÉÁÔÕÒÏÊ" 111 "æÁÊÌÏ× ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÂÏÌØÛÅ ÎÅÔ" 112 "ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ" 113 "ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÐÒÏÓÍÏÔÒÁ ÎÁÚÁÄ" 114 "îÅÔ ÆÁÊÌÏ×" 115 "ïÔÓÕÔÓÔ×ÉÅ ÐÒÅÄÙÄÕÝÅÊ ËÏÍÁÎÄÙ ÄÌÑ ÚÁÍÅÎÙ "!"" 116 "ïÔÓÕÔÓÔ×ÉÅ ÚÁÍÅÎÙ ÄÌÑ %%" 117 "ïÔÓÕÔÓÔ×ÉÅ ÚÁÍÅÎÙ ÄÌÑ #" 118 "ïÛÉÂËÁ: execl: %s" 119 "ïÛÉÂËÁ ××ÏÄÁ/×Ù×ÏÄÁ: %s" 120 "æÁÊÌ ÉÚÍÅÎÅÎ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ÐÏÌÎÏÊ ÚÁÐÉÓÉ: ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 121 "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÄÏÍÁÛÎÉÊ ËÁÔÁÌÏÇ" 122 "îÏ×ÙÊ ËÁÔÁÌÏÇ: %s" 123 "îÅÔ ×ÙÒÅÚÁÎÙÈ ÂÕÆÅÒÏ×" 124 "ëÏÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ×ÎÕÔÒÉ ÇÌÏÂÁÌØÎÏÊ ÉÌÉ v ËÏÍÁÎÄÙ" 125 "%s/%s: ÎÅ ÏÔËÒÙÔ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ ÉÌÉ root-Õ" 126 "%s/%s: ÎÅ ÏÔËÒÙÔ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ" 127 "%s/%s: ÎÅ ÏÔËÒÙÔ: ×ÏÚÍÏÖÎÏÓÔØ ÚÁÐÉÓÉ Õ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÎÅ Ñ×ÌÑÀÝÅÇÏÓÑ ×ÌÁÄÅÌØÃÅÍ" 128 "%s: ÎÅ ÓÞÉÔÁÎ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ ÉÌÉ root-Õ" 129 "%s: ÎÅ ÓÞÉÔÁÎ: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ" 130 "%s: ÎÅ ÓÞÉÔÁÎ: ×ÏÚÍÏÖÎÏÓÔØ ÚÁÐÉÓÉ Õ ÐÏÌØÚÏ×ÁÔÅÌÑ, ÎÅ Ñ×ÌÑÀÝÅÇÏÓÑ ×ÌÁÄÅÌØÃÅÍ" 131 "ðÏÓÌÅÄÕÀÝÉÅ ÓÔÒÏËÉ ÏÔÓÕÔÓÔ×ÕÀÔ" 132 "ïÔÓÕÔÓÔ×ÉÅ ÐÁÒÁÍÅÔÒÏ× ××ÏÄÁ" 133 "ïÔÓÕÔÓÔ×ÉÅ ÐÁÒÁÍÅÔÒÏ× ËÏÍÁÎÄÙ" 134 "óÉÍ×ÏÌ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÐÅÒÅÎÁÚÎÁÞÅÎ" 135 ""%s" ÎÁ ÄÁÎÎÙÊ ÍÏÍÅÎÔ ÎÅ ÎÁÚÎÁÞÅÎ" 136 "éÍÑ ÍÅÔËÉ ÄÏÌÖÎÏ ÂÙÔØ ÏÄÎÉÍ ÓÉÍ×ÏÌÏÍ" 137 "%s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ; ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 138 "îÏ×ÙÊ ÆÁÊÌ exrc: %s" 139 "óÔÒÏËÁ ÐÅÒÅÎÏÓÁ ÎÁÈÏÄÉÔÓÑ ×ÎÕÔÒÉ ÐÁÒÁÍÅÔÒÏ× ÐÅÒÅÎÏÓÁ" 140 "ëÏÍÁÎÄÁ open ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÕÓÔÁÎÏ×ËÕ ÏÐÃÉÉ open" 141 "ëÏÍÁÎÄÁ open ÎÅ ÒÅÁÌÉÚÏ×ÁÎÁ" 142 "úÁÝÉÔÁ ÆÁÊÌÁ ÎÅ×ÏÚÍÏÖÎÁ" 143 "æÁÊÌ ÚÁÝÉÝÅÎ" 144 "%s ÒÁÓÛÉÒÉÌÓÑ × ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÉÍÅÎ ÆÁÊÌÏ×" 146 "%s: ÚÁÝÉÔÁ ÎÁ ÞÔÅÎÉÅ ÂÙÌÁ ÎÅÄÏÓÔÕÐÎÁ" 148 "%s: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×" 149 "îÅÔ ÔÅÎÅ×ÙÈ ÏËÏÎ" 150 "ëÏÍÁÎÄÁ script ÉÓÐÏÌØÚÕÅÔÓÑ ÔÏÌØËÏ × ÒÅÖÉÍÅ vi" 151 "îÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÉÓÐÏÌÎÅÎÉÑ" 152 "ïÐÃÉÑ shiftwidth ÕÓÔÁÎÏ×ÌÅÎÁ ÎÁ 0" 153 "ðÅÒÅÐÏÌÎÅÎÉÅ ÓÞÅÔÞÉËÁ" 154 "ãÉËÌ ×ÙÐÏÌÎÅÎ ÎÅ ÄÏ ËÏÎÃÁ" 155 "õËÁÚÁÎÏ ÒÅÇÕÌÑÒÎÏÅ ×ÙÒÁÖÅÎÉÅ: ÆÌÁÇ r ÎÅ ÎÕÖÅÎ" 156 "æÌÁÇÉ #, l É p ÎÅ ÍÏÇÕÔ ÂÙÔØ ÏÂßÅÄÉÎÅÎÙ Ó ÆÌÁÇÏÍ c × ÒÅÖÉÍÅ vi" 157 "óÏ×ÐÁÄÅÎÉÊ ÎÅÔ" 158 "íÅÔËÁ ÏÔÓÕÔÓÔ×ÕÅÔ" 159 "÷ ÓÔÅËÅ ÍÅÔÏË ÚÁÐÉÓÅÊ ÍÅÎØÛÅ, ÞÅÍ %s, ÉÓÐÏÌØÚÕÊÔÅ :display t[ags]" 160 "æÁÊÌÁ Ó ÉÍÅÎÅÍ %s × ÓÔÅËÅ ÍÅÔÏË ÎÅÔ; ÉÓÐÏÌØÚÕÊÔÅ :display t[ags]" 162 "%s: ÍÅÔËÁ ÎÅ ÎÁÊÄÅÎÁ" 163 "%s: ÐÌÏÈÁÑ ÍÅÔËÁ × %s" 165 "óÔÅË ÍÅÔÏË ÐÕÓÔ" 166 "%s: ÏÂÒÁÚÅà ÐÏÉÓËÁ ÎÅ ÎÁÊÄÅÎ" 168 "âÕÆÅÒ %s ÐÕÓÔ" 170 "ðÒÅÒ×ÁÎÏ" 171 "ïÔÓÕÔÓÔ×ÉÅ ÂÕÆÅÒÁ ÄÌÑ ÉÓÐÏÌØÚÏ×ÁÎÉÑ" 172 "îÅÔ ÐÒÅÄÉÄÕÝÅÇÏ ÒÅÇÕÌÑÒÎÏÇÏ ×ÙÒÁÖÅÎÉÑ" 173 "ëÏÍÁÎÄÁ %s ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÎÁÌÉÞÉÅ ÐÒÏÞÔÅÎÎÏÇÏ ÆÁÊÌÁ" 174 "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s" 175 "ëÏÍÁÎÄÁ visual ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÏÂÑÚÁÔÅÌØÎÕÀ ÕÓÔÁÎÏ×ËÕ ÏÐÃÉÉ open" 177 "ðÕÓÔÏÊ ÆÁÊÌ" 178 "îÅÔ ÐÒÅÄÙÄÕÝÅÇÏ ÐÏÉÓËÁ F, f, T, ÉÌÉ t" 179 "%s ÎÅ ÎÁÊÄÅÎÏ" 180 "îÅÔ ÐÒÅÄÙÄÕÝÅÇÏ ÆÁÊÌÁ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ" 181 "ëÕÒÓÏÒ ÓÔÏÉÔ ÎÅ ÎÁ ÃÉÆÒÅ" 182 "ðÏÌÕÞÅÎÎÏÅ ÞÉÓÌÏ ÓÌÉÛËÏÍ ×ÅÌÉËÏ" 183 "ðÏÌÕÞÅÎÎÏÅ ÞÉÓÌÏ ÓÌÉÛËÏÍ ÍÁÌÏ" 184 "ðÏÄÈÏÄÑÝÅÇÏ ÓÉÍ×ÏÌÁ ÎÅÔ ÎÁ ÜÔÏÊ ÓÔÒÏËÅ" 185 "ðÏÄÈÏÄÑÝÉÊ ÓÉÍ×ÏÌ ÎÅ ÎÁÊÄÅÎ" 186 "îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑ" 187 "äÒÕÇÏÇÏ ÜËÒÁÎÁ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" 188 "óÉÍ×ÏÌÙ ÐÏÓÌÅ ÓÔÒÏËÉ ÄÌÑ ÐÏÉÓËÁ, ÓÍÅÝÅÎÉÑ ÓÔÒÏËÉ É/ÉÌÉ ËÏÍÁÎÄÙ z" 189 "ðÒÏÛÌÙÊ ÏÂÒÁÚÅà ÐÏÉÓËÁ ÏÔÓÕÔÓÔ×ÕÅÔ" 190 "ðÏÉÓË ÚÁ×ÅÒÛÉÌÓÑ ÎÁ ÎÁÞÁÌØÎÏÊ ÐÏÚÉÃÉÉ" 192 "óÉÍ×ÏÌ ÎÅÐÒÁ×ÉÌÅÎ; Ë×ÏÔÉÒÕÊÔÅ ÄÌÑ ××ÏÄÁ" 193 "õÖÅ ÎÁ ÎÁÞÁÌÅ ×ÓÔÁ×ËÉ" 194 "îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑ" 195 "ðÅÒÅÄ×ÉÖÅÎÉÅ ÚÁ ËÏÎÅà ÆÁÊÌÁ" 196 "ðÅÒÅÄ×ÉÖÅÎÉÅ ÚÁ ËÏÎÅà ÓÔÒÏËÉ" 197 "ä×ÉÖÅÎÉÅ ÓÔÒÏËÉ ÎÅ ÓÄÅÌÁÎÏ" 198 "õÖÅ ÎÁ ÎÁÞÁÌÅ ÆÁÊÌÁ" 199 "ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ÎÁÞÁÌÏ ÆÁÊÌÁ" 200 "õÖÅ × ÐÅÒ×ÏÊ ËÏÌÏÎËÅ" 201 "âÕÆÅÒÙ ÄÏÌÖÎÙ ÂÙÔØ ÕËÁÚÁÎÙ ÄÏ ×ÙÐÏÌÎÅÎÉÑ ËÏÍÁÎÄÙ" 202 "õÖÅ ÎÁ ËÏÎÃÅ ÆÁÊÌÁ" 203 "õÖÅ ÎÁ ËÏÎÃÅ ÓÔÒÏËÉ" 204 "%s ÎÅ Ñ×ÌÑÅÔÓÑ ËÏÍÁÎÄÏÊ VI" 205 "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s" 206 "îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑ" 208 "îÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÐÏ×ÔÏÒÁ" 210 "ëÏÍÁÎÄÁ %s ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ËÁË ËÏÍÁÎÄÁ ÐÅÒÅÍÅÝÅÎÉÑ" 211 "õÖÅ × ËÏÍÁÎÄÎÏÍ ÒÅÖÉÍÅ" 214 "úÎÁÞÅÎÉÅ ÏÐÃÉÉ windows ÓÌÉÛËÏÍ ×ÅÌÉËÏ, ÍÁËÓÉÍÁÌØÎÏÅ ÚÎÁÞÅÎÉÅ = %u" 220 "ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ËÏÎÅà ÜËÒÁÎÁ" 221 "ä×ÉÖÅÎÉÅ ËÕÒÓÏÒÁ ÚÁ ÎÁÞÁÌÏ ÜËÒÁÎÁ" 223 "ôÅÎÅ×ÙÈ ÏËÏÎ ÎÅÔ" 224 "îÅ ÓÕÝÅÓÔ×ÕÅÔ ÔÅÎÅ×ÏÇÏ ÏËÎÁ Ó ÒÅÄÁËÔÉÒÏ×ÁÎÉÅÍ ÆÁÊÌÁ %s" 225 "÷Ù ÎÅ ÍÏÖÅÔÅ ÓÄÅÌÁÔØ ÅÄÉÎÓÔ×ÅÎÎÏÅ ÏËÎÏ ÔÅÎÅ×ÙÍ" 226 "üËÒÁÎ ÍÏÖÅÔ ÂÙÔØ ÓÖÁÔ" 227 "üËÒÁÎ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÓÖÁÔ ÔÏÌØËÏ ÄÏ %d ÓÔÒÏË" 228 "üËÒÁÎ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÒÁÓÛÉÒÅÎ" 233 "äÁÎÎÙÊ ÔÉÐ ÔÅÒÍÉÎÁÌÁ ÎÅ ÉÍÅÅÔ ËÌÁ×ÉÛÉ %s" 237 "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ" 238 "÷ÎÉÍÁÎÉÅ: %s ÓÐÅÃÉÁÌØÎÙÊ ÆÁÊÌ" 239 "%s ÕÖÅ ÚÁÂÌÏËÉÒÏ×ÁÎ, ÄÏÓÔÕÐÅÎ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅ" 240 "%s: ÕÄÁÌÅÎ" 241 "%s: ÚÁËÒÙÔ" 242 "%s: ÕÄÁÌÅÎ" 243 "%s: ÕÄÁÌÅÎ" 244 "æÁÊÌ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ, ÎÅ ÚÁÐÉÓÁÎ: éÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 245 "æÁÊÌ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ, ÎÅ ÚÁÐÉÓÁÎ" 246 "%s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ; ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 247 "%s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ" 248 "éÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÞÁÓÔÉÞÎÏÊ ÚÁÐÉÓÉ ÆÁÊÌÁ" 249 "þÁÓÔØ ÆÁÊÌÁ, ÆÁÊÌ ÎÅ ÚÁÐÉÓÁÎ" 250 "%s: æÁÊÌ ÉÚÍÅÎÑÌÓÑ ÐÏÚÄÎÅÅ, ÞÅÍ ÄÁÎÎÁÑ ËÏÐÉÑ: ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 251 "%s: æÁÊÌ ÉÚÍÅÎÑÌÓÑ ÐÏÚÄÎÅÅ, ÞÅÍ ÄÁÎÎÁÑ ËÏÐÉÑ" 252 "%s: ÚÁÝÉÔÁ ÎÁ ÚÁÐÉÓØ ÂÙÌÁ ÎÅÄÏÓÔÕÐÎÁ" 254 "%s: ÷îéíáîéå: æáêì õóåþåî" 256 "%s: ÎÏ×ÙÊ ÆÁÊÌ: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×" 257 "%s: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×" 258 "%s ÒÁÓÛÉÒÉÌÓÑ × ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÉÍÅÎ ÆÁÊÌÏ×" 259 "%s: ÓÐÅÃÉÁÌØÎÙÊ ÆÁÊÌ" 260 "%s: ÎÅ ÐÒÉÎÁÄÌÅÖÉÔ ÷ÁÍ" 261 "%s: ÄÏÓÔÕÐÅÎ ÎÅ ÔÏÌØËÏ ÷ÁÍ" 262 "æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 263 "æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ :edit ÄÌÑ ÏÂÈÏÄÁ" 264 "æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁ" 265 "æÁÊÌ ×ÒÅÍÅÎÎÙÊ: ×ÙÈÏÄ ÓÏÔÒÅÔ ÌÀÂÙÅ ÉÚÍÅÎÅÎÉÑ" 267 "úÁÐÉÓÉ ÎÁÞÁÔÙ ÚÁÎÏ×Ï" nvi-1.81.6/catalog/ru_SU.KOI8-R.check0100644000076400001440000000272510720065506016036 0ustar skimousersUnused message id's (this is okay): 001 008 021 022 023 024 025 026 027 028 029 036 037 047 050 051 052 057 061 078 081 090 091 093 110 145 147 161 164 167 169 176 191 207 209 212 213 215 216 217 218 219 222 229 230 231 232 234 235 236 253 255 266 ========================= MISSING ERROR MESSAGES (Please add!): 008 021 022 023 024 025 026 027 028 029 036 037 057 061 078 090 091 093 110 145 147 161 164 167 169 191 207 209 212 215 216 217 218 219 222 230 231 232 234 235 236 253 255 266 268 269 270 271 272 273 274 275 276 277 278 279 281 282 283 284 285 286 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 ========================= Extra error messages (just delete them): ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): ========================= Duplicate messages, just message (this is okay): 2 %s ÒÁÓÛÉÒÉÌÓÑ × ÓÌÉÛËÏÍ ÂÏÌØÛÏÅ ËÏÌÉÞÅÓÔ×Ï ÉÍÅÎ ÆÁÊÌÏ×X 2 %s ÓÕÝÅÓÔ×ÕÅÔ, ÎÅ ÚÁÐÉÓÁÎ; ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX 2 %s: %lu ÓÔÒÏË, %lu ÓÉÍ×ÏÌÏ×X 2 %s: ÎÅ ÄÏ ËÏÎÃÁ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÆÁÊÌX 2 set: %s ÏÐÃÉÑ ÎÅ Ñ×ÌÑÅÔÓÑ ÌÏÇÉÞÅÓËÏÊX 2 âÕÆÅÒ %s ÐÕÓÔX 2 æÁÊÌ ÉÚÍÅÎÅÎ ÓÏ ×ÒÅÍÅÎÉ ÐÏÓÌÅÄÎÅÊ ÚÁÐÉÓÉ: ÓÏÈÒÁÎÉÔÅ ÉÌÉ ÉÓÐÏÌØÚÕÊÔÅ ! ÄÌÑ ÏÂÈÏÄÁX 2 úÁÐÉÓÉ ÎÅ ×ÅÌÉÓØ, ÎÅ×ÏÚÍÏÖÎÏ ÏÔÍÅÎÉÔØ ÐÏÓÌÅÄÎÀÀ ËÏÍÁÎÄÕX 3 %s: ÕÄÁÌÅÎX 3 îÅÔ ÓÉÍ×ÏÌÏ× ÄÌÑ ÕÄÁÌÅÎÉÑX 4 éÓÐÏÌØÚÏ×ÁÎÉÅ: %sX ========================= nvi-1.81.6/catalog/ru_SU.KOI8-R.owner0100644000076400001440000000007510720065506016107 0ustar skimousersAndrey A. Chernov Dima Ruban nvi-1.81.6/catalog/spanish0100644000076400001440000003043510720065506014461 0ustar skimousersVI_MESSAGE_CATALOG Desbordamiento de longitud de l¡neaX no se puede borrar la l¡nea %luX no se puede a¤adir la l¡nea %luX no se puede insertar en la l¡nea %luX no se puede guardar la l¡nea %luX no se puede obtener la £ltima l¡neaX Error: no se puede recuperar la l¡nea %luX Archivo de logX No se realiza log, no se puede deshacerX No hay cambios para deshacerX No se realiza log, no se puede deshacerX No se realiza log, no se puede remontar hacia adelanteX No hay cambios para rehacerX %s/%d: error de logX La entrada y salida est ndar de Vi debe ser una terminalX Marcar %s: no determinadoX Marcar %s: se borr¢ la l¡neaX Marcar %s: la posici¢n del cursor ya no existeX Error: X nuevo archivoX nombre cambiadoX modificadoX no modificadoX DESTRABADOX lectura solamenteX l¡nea %lu de %lu [%ld%%]X archivo vac¡oX l¡nea %luX El archivo %s no es un cat logo de mensajesX No se puede determinar la opci¢n por omisi¢n %sX Uso: %sX determinar: no hay opci¢n %s: 'determinar todo' establece todos los valores de opci¢nX determinar: [no] hay opci¢n %s no tiene valorX determinar: opci¢n %s no es booleanoX determinar: opci¢n %s: %sX determinar: opci¢n %s: %s: desbordamiento de valoresX determinar: opci¢n %s: %s es un n£mero ilegalX determinar: opci¢n %s no es booleanoX Las columnas en pantalla son demasiado peque¤as, menos de %dX Las columnas en pantalla son demasiado grandes, m s de %dX Las l¡neas en pantalla son demasiado peque¤as, menos de %dX Las l¡neas en pantalla son demasiado grandes, m s de %dX La opci¢n lisp no est  implementadaX mensajes no desconectados: %sX mensajes no conectados: %sX La opci¢n de p rrafo debe estar en dos grupos de caracteresX La opci¢n de secci¢n debe estar en dos grupos de caracteresX El buffer por omisi¢n est  vac¡oX El buffer %s est  vac¡oX Los archivos con nuevas l¡neas en el nombre son irrecuperablesX Las modificaciones no pueden recuperarse si la sesi¢n fallaX Copiando archivo para recuperaci¢n...X Preservaci¢n fracasada: %sX Las modificaciones no pueden recuperarse si la sesi¢n fallaX Archivo de respaldo fracasado: %sX Copiando archivo para recuperaci¢n...X Informaci¢n sobre identificaci¢n del usuario %u no encontradaX No se puede trabar archivo de recuperaci¢nX Desbordamiento de buffer de archivo de recuperaci¢nX Archivo de recuperaci¢nX %s: archivo de recuperaci¢n defectuosoX %s: archivo de recuperaci¢n defectuosoX No hay archivos denominados %s, que usted pueda leer, para recuperarX Existen versiones m s antiguas de este archivo que usted puede recuperarX Existen otros archivos que usted puede recuperarX no env¡a email: %sX Archivo vac¡o; no hay nada para buscarX Se alcanz¢ el final del archivo sin encontrar el patr¢nX No hay patr¢n anterior de b£squedaX No se encontr¢ el patr¢nX Se alcanz¢ el principio del archivo sin encontrar el patr¢nX B£squeda reiniciadaX Buscando...X No se encontr¢ ning£n car cter no imprimibleX Nombre de comando desconocidoX %s: comando no disponible en modalidad exX La cuenta no puede ser ceroX %s: mala especificaci¢n de l¡neaX Error interno de tabla de sintaxis (%s: %s)X Uso: %sX %s: buffer temporario no liberadoX Desplazamiento de marcador a antes de la l¡nea 1X Desplazamiento de marcador m s all  del final del archivoX @ con rango que corre cuando se cambia el archivo/la pantallaX Comando global/v que corre cuando se cambia el archivo/la pantallaX Comando Ex fracasado: comandos pendientes descartadosX Comando Ex fracasado: teclas mapeadas descartadasX La segunda direcci¢n es m s peque¤a que la primeraX No se suministra nombre de marcaX \\ no es seguido por / o ?X Referencia a un n£mero de l¡nea menor que 0X El comando %s es desconocidoX Desbordamiento de valor de direcci¢nX Subdesbordamiento de valor de direcci¢nX Combinaci¢n de direcci¢n ilegalX Direcci¢n ilegal: s¢lo %lu l¡neas en el archivoX Direcci¢n ilegal: el archivo est  vac¡oX El comando %s no permite una direcci¢n de 0X No hay abreviaturas para visualizarX Las abreviaturas deben terminar con un car cter de \"palabra\" X Las abreviaturas no pueden contener tabs o espaciosX Las abreviaturas no pueden mezclar caracteres palabra/no-palabra, salvo al finalX \"%s\" no es una abreviaturaX Comando Vi fracasado: teclas mapeadas descartadasX No hay m s archivos para editarX No hay archivos anteriores para editarX No hay archivos anteriores para rebobinarX No hay lista de archivos para visualizarX No hay un comando anterior para reemplazar a \"!\"X No hay nombre de archivo para sustituir por %%X No hay nombre de archivo para sustituir por #X Error: execl: %sX Error de E/S: %sX Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterarX No se puede encontrar la ubicaci¢n del directorio inicialX Nuevo directorio actual: %sX No hay buffers sueltos para visualizarX El comando %s no puede usarse como parte de un comando global o vX %s/%s: sin fuente: no le pertenece a usted o a ra¡zX %s/%s: sin fuente: no le pertenece a ustedX %s/%s: sin fuente: puede ser escrito por un usuario que no sea el propietarioX %s: sin fuente: no le pertenece a usted o a ra¡zX %s: sin fuente: no le pertenece a ustedX %s: sin fuente: puede ser escrito por un usuario que no sea el propietarioX No hay l¡neas siguientes para unirX No hay anotaciones de mapa de entradaX No hay anotaciones de mapa de comandoX El car cter %s no puede remapearseX \"%s\" no est  mapeado actualmenteX Marca de nombres debe ser un s¢lo car cterX %s existe, no est  escrito; usar ! para alterarX Nuevo archivo exrc: %sX La l¡nea de destino se encuentra dentro del rango de movimientoX El comando abierto requiere que se determine la opci¢n abiertaX El comando abierto no se ha implementado a£nX No es posible preservar este archivoX Archivo preservadoX %s: expandido a demasiados nombres de archivoX S¢lo pueden leerse los archivos regulares y los conductos nombradosX %s: traba de lectura no disponibleX Leyendo...X %s: %lu l¡neas, %lu caracteresX No hay pantallas de fondo para mostrarX El comando de script s¢lo est  disponible en modalidad viX No hay comando para ejecutarX opci¢n de ancho de desplazamiento en 0X Desbordamiento de cuentaX Subdesbordamiento de cuentaX Expresi¢n regular especificada; marcador r no tiene significadoX Los marcadores #, l y p no pueden combinarse con el marcador c en la modalidad viX No se encontr¢ coincidenciaX No se ingres¢ un identificador anteriorX Se encontraron menos de %s anotaciones en la pila de identificadores; usar :visualizar i[dentificadores]X No hay archivo %s en la pila de identificadores al que se pueda volver; usar :visualizar i[dentificadores]" Presionar Intro para continuar: X %s: no se encontr¢ el identificadorX %s: identificador corrompido en %sX %s: el n£mero de l¡nea del identificador es posterior al final del archivoX La pila de identificadores est  vac¡aX %s: patr¢n de b£squeda no encontradoX %d archivos m s para editarX El buffer %s est  vac¡oX ¨Confirmar cambio? [n]X InterrumpidoX No hay buffer anterior para ejecutarX No hay expresi¢n regular anteriorX El comando %s requiere que se haya le¡do un archivoX Uso: %sX El comando visual requiere que se determine la opci¢n abiertaX Archivo vac¡oX No hay b£squeda F, f, T o t anteriorX %s no se encontr¢X No hay archivo anterior para editarX El cursor no est  en un n£meroX El n£mero resultante es demasiado grandeX El n£mero resultante es demasiado peque¤oX No hay car cter coincidente en esta l¡neaX No se encontr¢ un car cter coincidenteX No hay caracteres para reemplazarX No hay otra pantalla a la que se pueda pasarX Caracteres despu‚s de cadena de b£squeda, desplazamiento de l¡nea y/o comando zX No hay patr¢n anterior de b£squedaX B£squeda vuelve a la posici¢n inicialX Se super¢ el l¡mite de expansi¢n de abreviatura: se descartaron caracteresX Car cter ilegal; mencionar para entrarX Ya se encuentra al principio de la inserci¢nX No hay m s caracteres para borrarX Movimiento m s all  del final del archivoX Movimiento m s all  del final de la l¡neaX No hay movimiento del cursorX Ya se encuentra al principio del archivoX Movimiento m s all  del principio del archivoX Ya se encuentra en la primera columnaX Los buffers deben especificarse antes del comandoX Ya se encuentra al final del archivoX Ya se encuentra al final de la l¡neaX %s no es un comando viX Uso: %sX No hay caracteres para borrarX El comando Q requiere la interfase de terminal exX No hay comando para repetirX El archivo est  vac¡oX %s no puede usarse como comando de movimientoX Ya se encuentra en modalidad de comandoX El cursor no se encuentra en una palabraX El valor de opci¢n de Windows es demasiado grande, el m x. es %uX A¤adirX CambiarX ComandoX InsertarX ReemplazarX El movimiento va m s all  del final de la pantallaX El movimiento va m s all  del principio de la pantallaX La pantalla debe tener m s de %d l¡neas para dividirseX No hay pantallas de fondoX No hay pantalla de fondo editando un archivo denominado %sX No se puede poner fondo a la £nica pantalla que se visualizaX La pantalla s¢lo puede reducirse a %d hilerasX La pantalla no puede reducirseX La pantalla no puede aumentarseX Esta pantalla no puede suspenderseX Interrumpido: teclas mapeadas descartadasX vi: buffer temporario no liberadoX Esta terminal no tiene tecla %sX S¢lo un buffer puede especificarseX N£mero mayor que %luX InterrumpidoX No se puede crear archivo temporarioX Advertencia: %s no es un archivo regularX %s ya se encuentra trabado, la sesi¢n es de lectura solamenteX %s: eliminarX %s: cerrarX %s: eliminarX %s: eliminarX Archivo de lectura solamente, no escrito; usar ! para alterarX Archivo de lectura solamente, no escritoX %s existe, no escrito; usar ! para alterarX %s existe, no escritoX Archivo parcial, no escrito; usar ! para alterarX Archivo parcial, no escritoX %s: archivo modificado m s recientemente que esta copia; usar ! para alterarX %s: archivo modificado m s recientemente que esta copiaX %s: la traba de escritura no estaba disponibleX Escribiendo...X %s: ADVERTENCIA: ARCHIVO TRUNCADOX Ya se encuentra en el primer identificador de este grupoX %s: nuevo archivo: %lu l¡neas, %lu caracteresX %s: %lu l¡neas, %lu caracteresX %s expandido a demasiados nombres de archivosX %s: no es un archivo regularX %s: no le perteneceX %s: accesible por un usuario que no sea el propietarioX Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterarX Archivo modificado desde la £ltima escritura completa; escribir o usar :editar! para alterarX Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterarX El archivo es temporario; al salir se descartar n las modificacionesX Archivo de lectura solamente, las modificaciones no se autoescribenX Se reinici¢ el logX confirmar? [snq]X Presionar cualquier tecla para continuar: X Presionar cualquier tecla para continuar [: para ingresar m s comandos ex]: X Presionar cualquier tecla para continuar [q para salir]: X Esta forma de %s requiere la interfase terminal exX Ingresando en la modalidad de entrada ex.X Comando fracasado, no hay archivo le¡do aun.X cont?X Evento inesperado de car cterX Evento inesperado de final de archivoX No hay coincidencias para consultaX Evento inesperado de interrupci¢nX Evento inesperado de salidaX Evento inesperado de repinturaX Ya se encuentra en el £ltimo identificador de este grupoX El comando %s requiere la interfase terminal exX Esta forma de %s no se encuentra soportada cuando se determina la opci¢n de edici¢n seguraX Evento inesperado de cadenaX Evento inesperado de tiempo excedidoX Evento inesperado de escrituraX Las expansiones de shell no se encuentran soportadas cuando se determina la opci¢n de edici¢n seguraX El comando %s no se encuentra soportado cuando se determina la opci¢n de edici¢n seguraX determinar: la opci¢n %s puede no estar desconectadaX El monitor es demasiado peque¤o.X agregadoX cambiadoX borradoX unidoX movidoX desplazadoX arrancadoX l¡neaX l¡neasX Vi no se carg¢ con un int‚rprete TclX Archivo modificado desde la £ltima escritura.X Expansi¢n de shell fracasadaX No hay opci¢n de edici¢n %s especificadaX Vi no se carg¢ con un int‚rprete PerlX No hay comando ex para ejecutarX Ingresar para ejecutar un comando, :q para salirX Usar \"cscope ayuda\" para obtener ayudaX No hay conexiones cscope corriendoX %s: tipo de b£squeda desconocido: usar uno de %sX %d: no existe esta sesi¢n cscopeX determinar: la opci¢n %s no puede conectarse nuncaX determinar: la opci¢n %s no puede determinarse nunca en 0X %s: a¤adido: %lu l¡neas, %lu caracteresX Evento inesperado de modificaci¢n de tama¤oX %d archivos para editarX nvi-1.81.6/catalog/spanish.base0100644000076400001440000003347710720065506015403 0ustar skimousers002 "Desbordamiento de longitud de l¡nea" 003 "no se puede borrar la l¡nea %lu" 004 "no se puede a¤adir la l¡nea %lu" 005 "no se puede insertar en la l¡nea %lu" 006 "no se puede guardar la l¡nea %lu" 007 "no se puede obtener la £ltima l¡nea" 008 "Error: no se puede recuperar la l¡nea %lu" 009 "Archivo de log" 010 "No se realiza log, no se puede deshacer" 011 "No hay cambios para deshacer" 012 "No se realiza log, no se puede deshacer" 013 "No se realiza log, no se puede remontar hacia adelante" 014 "No hay cambios para rehacer" 015 "%s/%d: error de log" 016 "La entrada y salida est ndar de Vi debe ser una terminal" 017 "Marcar %s: no determinado" 018 "Marcar %s: se borr¢ la l¡nea" 019 "Marcar %s: la posici¢n del cursor ya no existe" 020 "Error: " 021 "nuevo archivo" 022 "nombre cambiado" 023 "modificado" 024 "no modificado" 025 "DESTRABADO" 026 "lectura solamente" 027 "l¡nea %lu de %lu [%ld%%]" 028 "archivo vac¡o" 029 "l¡nea %lu" 030 "El archivo %s no es un cat logo de mensajes" 031 "No se puede determinar la opci¢n por omisi¢n %s" 032 "Uso: %s" 033 "determinar: no hay opci¢n %s: 'determinar todo' establece todos los valores de opci¢n" 034 "determinar: [no] hay opci¢n %s no tiene valor" 035 "determinar: opci¢n %s no es booleano" 036 "determinar: opci¢n %s: %s" 037 "determinar: opci¢n %s: %s: desbordamiento de valores" 038 "determinar: opci¢n %s: %s es un n£mero ilegal" 039 "determinar: opci¢n %s no es booleano" 040 "Las columnas en pantalla son demasiado peque¤as, menos de %d" 041 "Las columnas en pantalla son demasiado grandes, m s de %d" 042 "Las l¡neas en pantalla son demasiado peque¤as, menos de %d" 043 "Las l¡neas en pantalla son demasiado grandes, m s de %d" 044 "La opci¢n lisp no est  implementada" 045 "mensajes no desconectados: %s" 046 "mensajes no conectados: %s" 048 "La opci¢n de p rrafo debe estar en dos grupos de caracteres" 049 "La opci¢n de secci¢n debe estar en dos grupos de caracteres" 053 "El buffer por omisi¢n est  vac¡o" 054 "El buffer %s est  vac¡o" 055 "Los archivos con nuevas l¡neas en el nombre son irrecuperables" 056 "Las modificaciones no pueden recuperarse si la sesi¢n falla" 057 "Copiando archivo para recuperaci¢n..." 058 "Preservaci¢n fracasada: %s" 059 "Las modificaciones no pueden recuperarse si la sesi¢n falla" 060 "Archivo de respaldo fracasado: %s" 061 "Copiando archivo para recuperaci¢n..." 062 "Informaci¢n sobre identificaci¢n del usuario %u no encontrada" 063 "No se puede trabar archivo de recuperaci¢n" 064 "Desbordamiento de buffer de archivo de recuperaci¢n" 065 "Archivo de recuperaci¢n" 066 "%s: archivo de recuperaci¢n defectuoso" 067 "%s: archivo de recuperaci¢n defectuoso" 068 "No hay archivos denominados %s, que usted pueda leer, para recuperar" 069 "Existen versiones m s antiguas de este archivo que usted puede recuperar" 070 "Existen otros archivos que usted puede recuperar" 071 "no env¡a email: %s" 072 "Archivo vac¡o; no hay nada para buscar" 073 "Se alcanz¢ el final del archivo sin encontrar el patr¢n" 074 "No hay patr¢n anterior de b£squeda" 075 "No se encontr¢ el patr¢n" 076 " Se alcanz¢ el principio del archivo sin encontrar el patr¢n" 077 "B£squeda reiniciada" 078 "Buscando..." 079 "No se encontr¢ ning£n car cter no imprimible" 080 "Nombre de comando desconocido" 082 "%s: comando no disponible en modalidad ex" 083 "La cuenta no puede ser cero" 084 "%s: mala especificaci¢n de l¡nea" 085 "Error interno de tabla de sintaxis (%s: %s)" 086 "Uso: %s" 087 "%s: buffer temporario no liberado" 088 "Desplazamiento de marcador a antes de la l¡nea 1" 089 "Desplazamiento de marcador m s all  del final del archivo" 090 "@ con rango que corre cuando se cambia el archivo/la pantalla" 091 "Comando global/v que corre cuando se cambia el archivo/la pantalla" 092 "Comando Ex fracasado: comandos pendientes descartados" 093 "Comando Ex fracasado: teclas mapeadas descartadas" 094 "La segunda direcci¢n es m s peque¤a que la primera" 095 "No se suministra nombre de marca" 096 "\\ no es seguido por / o ?" 097 "Referencia a un n£mero de l¡nea menor que 0" 098 "El comando %s es desconocido" 099 "Desbordamiento de valor de direcci¢n" 100 "Subdesbordamiento de valor de direcci¢n" 101 "Combinaci¢n de direcci¢n ilegal" 102 "Direcci¢n ilegal: s¢lo %lu l¡neas en el archivo" 103 "Direcci¢n ilegal: el archivo est  vac¡o" 104 "El comando %s no permite una direcci¢n de 0" 105 "No hay abreviaturas para visualizar" 106 "Las abreviaturas deben terminar con un car cter de \"palabra\" " 107 "Las abreviaturas no pueden contener tabs o espacios" 108 "Las abreviaturas no pueden mezclar caracteres palabra/no-palabra, salvo al final" 109 "\"%s\" no es una abreviatura" 110 "Comando Vi fracasado: teclas mapeadas descartadas" 111 "No hay m s archivos para editar" 112 "No hay archivos anteriores para editar" 113 "No hay archivos anteriores para rebobinar" 114 "No hay lista de archivos para visualizar" 115 "No hay un comando anterior para reemplazar a \"!\"" 116 "No hay nombre de archivo para sustituir por %%" 117 "No hay nombre de archivo para sustituir por #" 118 "Error: execl: %s" 119 "Error de E/S: %s" 120 "Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterar" 121 "No se puede encontrar la ubicaci¢n del directorio inicial" 122 "Nuevo directorio actual: %s" 123 "No hay buffers sueltos para visualizar" 124 "El comando %s no puede usarse como parte de un comando global o v" 125 "%s/%s: sin fuente: no le pertenece a usted o a ra¡z" 126 "%s/%s: sin fuente: no le pertenece a usted" 127 "%s/%s: sin fuente: puede ser escrito por un usuario que no sea el propietario" 128 "%s: sin fuente: no le pertenece a usted o a ra¡z" 129 "%s: sin fuente: no le pertenece a usted" 130 "%s: sin fuente: puede ser escrito por un usuario que no sea el propietario" 131 "No hay l¡neas siguientes para unir" 132 "No hay anotaciones de mapa de entrada" 133 "No hay anotaciones de mapa de comando" 134 "El car cter %s no puede remapearse" 135 "\"%s\" no est  mapeado actualmente" 136 "Marca de nombres debe ser un s¢lo car cter" 137 "%s existe, no est  escrito; usar ! para alterar" 138 "Nuevo archivo exrc: %s" 139 "La l¡nea de destino se encuentra dentro del rango de movimiento" 140 "El comando abierto requiere que se determine la opci¢n abierta" 141 "El comando abierto no se ha implementado a£n" 142 "No es posible preservar este archivo" 143 "Archivo preservado" 144 "%s: expandido a demasiados nombres de archivo" 145 "S¢lo pueden leerse los archivos regulares y los conductos nombrados" 146 "%s: traba de lectura no disponible" 147 "Leyendo..." 148 "%s: %lu l¡neas, %lu caracteres" 149 "No hay pantallas de fondo para mostrar" 150 "El comando de script s¢lo est  disponible en modalidad vi" 151 "No hay comando para ejecutar" 152 "opci¢n de ancho de desplazamiento en 0" 153 "Desbordamiento de cuenta" 154 "Subdesbordamiento de cuenta" 155 "Expresi¢n regular especificada; marcador r no tiene significado" 156 "Los marcadores #, l y p no pueden combinarse con el marcador c en la modalidad vi" 157 "No se encontr¢ coincidencia" 158 "No se ingres¢ un identificador anterior" 159 "Se encontraron menos de %s anotaciones en la pila de identificadores; usar :visualizar i[dentificadores]" 160 "No hay archivo %s en la pila de identificadores al que se pueda volver; usar :visualizar i[dentificadores]" 161 "Presionar Intro para continuar: " 162 "%s: no se encontr¢ el identificador" 163 "%s: identificador corrompido en %s" 164 "%s: el n£mero de l¡nea del identificador es posterior al final del archivo" 165 "La pila de identificadores est  vac¡a" 166 "%s: patr¢n de b£squeda no encontrado" 167 "%d archivos m s para editar" 168 "El buffer %s est  vac¡o" 169 "¨Confirmar cambio? [n]" 170 "Interrumpido" 171 "No hay buffer anterior para ejecutar" 172 "No hay expresi¢n regular anterior" 173 "El comando %s requiere que se haya le¡do un archivo" 174 "Uso: %s" 175 "El comando visual requiere que se determine la opci¢n abierta" 177 "Archivo vac¡o" 178 "No hay b£squeda F, f, T o t anterior" 179 "%s no se encontr¢" 180 "No hay archivo anterior para editar" 181 "El cursor no est  en un n£mero" 182 "El n£mero resultante es demasiado grande" 183 " El n£mero resultante es demasiado peque¤o" 184 "No hay car cter coincidente en esta l¡nea" 185 "No se encontr¢ un car cter coincidente" 186 "No hay caracteres para reemplazar" 187 "No hay otra pantalla a la que se pueda pasar" 188 "Caracteres despu‚s de cadena de b£squeda, desplazamiento de l¡nea y/o comando z" 189 "No hay patr¢n anterior de b£squeda" 190 "B£squeda vuelve a la posici¢n inicial" 191 "Se super¢ el l¡mite de expansi¢n de abreviatura: se descartaron caracteres" 192 "Car cter ilegal; mencionar para entrar" 193 "Ya se encuentra al principio de la inserci¢n" 194 "No hay m s caracteres para borrar" 195 "Movimiento m s all  del final del archivo" 196 "Movimiento m s all  del final de la l¡nea" 197 "No hay movimiento del cursor" 198 "Ya se encuentra al principio del archivo" 199 "Movimiento m s all  del principio del archivo" 200 "Ya se encuentra en la primera columna" 201 "Los buffers deben especificarse antes del comando" 202 "Ya se encuentra al final del archivo" 203 "Ya se encuentra al final de la l¡nea" 204 "%s no es un comando vi" 205 "Uso: %s" 206 "No hay caracteres para borrar" 207 "El comando Q requiere la interfase de terminal ex" 208 "No hay comando para repetir" 209 "El archivo est  vac¡o" 209 "El archivo est  vac¡o" 210 "%s no puede usarse como comando de movimiento" 211 "Ya se encuentra en modalidad de comando" 212 "El cursor no se encuentra en una palabra" 214 "El valor de opci¢n de Windows es demasiado grande, el m x. es %u" 215 "A¤adir" 216 "Cambiar" 217 "Comando" 218 "Insertar" 219 "Reemplazar" 220 "El movimiento va m s all  del final de la pantalla" 221 "El movimiento va m s all  del principio de la pantalla" 222 "La pantalla debe tener m s de %d l¡neas para dividirse" 223 "No hay pantallas de fondo" 224 "No hay pantalla de fondo editando un archivo denominado %s" 225 "No se puede poner fondo a la £nica pantalla que se visualiza" 226 "La pantalla s¢lo puede reducirse a %d hileras" 227 "La pantalla no puede reducirse" 228 "La pantalla no puede aumentarse" 230 "Esta pantalla no puede suspenderse" 231 "Interrumpido: teclas mapeadas descartadas" 232 "vi: buffer temporario no liberado" 233 "Esta terminal no tiene tecla %s" 234 "S¢lo un buffer puede especificarse" 235 "N£mero mayor que %lu" 236 "Interrumpido" 237 "No se puede crear archivo temporario" 238 "Advertencia: %s no es un archivo regular" 239 "%s ya se encuentra trabado, la sesi¢n es de lectura solamente" 240 "%s: eliminar" 241 "%s: cerrar" 242 "%s: eliminar" 243 "%s: eliminar" 244 "Archivo de lectura solamente, no escrito; usar ! para alterar" 245 " Archivo de lectura solamente, no escrito" 246 "%s existe, no escrito; usar ! para alterar" 247 "%s existe, no escrito" 248 "Archivo parcial, no escrito; usar ! para alterar" 249 "Archivo parcial, no escrito" 250 "%s: archivo modificado m s recientemente que esta copia; usar ! para alterar" 251 "%s: archivo modificado m s recientemente que esta copia" 252 "%s: la traba de escritura no estaba disponible" 253 "Escribiendo..." 254 "%s: ADVERTENCIA: ARCHIVO TRUNCADO" 255 "Ya se encuentra en el primer identificador de este grupo" 256 "%s: nuevo archivo: %lu l¡neas, %lu caracteres" 257 "%s: %lu l¡neas, %lu caracteres" 258 "%s expandido a demasiados nombres de archivos" 259 "%s: no es un archivo regular" 260 "%s: no le pertenece" 261 "%s: accesible por un usuario que no sea el propietario" 262 "Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterar" 263 "Archivo modificado desde la £ltima escritura completa; escribir o usar :editar! para alterar" 264 "Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterar" 265 "El archivo es temporario; al salir se descartar n las modificaciones" 266 "Archivo de lectura solamente, las modificaciones no se autoescriben" 267 "Se reinici¢ el log" 268 "confirmar? [snq]" 269 "Presionar cualquier tecla para continuar: " 270 "Presionar cualquier tecla para continuar [: para ingresar m s comandos ex]: " 271 "Presionar cualquier tecla para continuar [q para salir]: " 272 "Esta forma de %s requiere la interfase terminal ex" 273 "Ingresando en la modalidad de entrada ex." 274 "Comando fracasado, no hay archivo le¡do aun." 275 " cont?" 276 "Evento inesperado de car cter" 277 "Evento inesperado de final de archivo" 278 "No hay coincidencias para consulta" 279 "Evento inesperado de interrupci¢n" 280 "Evento inesperado de salida" 281 "Evento inesperado de repintura" 282 "Ya se encuentra en el £ltimo identificador de este grupo" 283 "El comando %s requiere la interfase terminal ex" 284 "Esta forma de %s no se encuentra soportada cuando se determina la opci¢n de edici¢n segura" 285 "Evento inesperado de cadena" 286 "Evento inesperado de tiempo excedido" 287 "Evento inesperado de escritura" 289 "Las expansiones de shell no se encuentran soportadas cuando se determina la opci¢n de edici¢n segura" 290 "El comando %s no se encuentra soportado cuando se determina la opci¢n de edici¢n segura" 291 "determinar: la opci¢n %s puede no estar desconectada" 292 "El monitor es demasiado peque¤o." 293 "agregado" 294 "cambiado" 295 "borrado" 296 "unido" 297 "movido" 298 "desplazado" 299 "arrancado" 300 "l¡nea" 301 "l¡neas" 302 "Vi no se carg¢ con un int‚rprete Tcl" 303 "Archivo modificado desde la £ltima escritura." 304 "Expansi¢n de shell fracasada" 304 "Expansi¢n de shell fracasada" 305 "No hay opci¢n de edici¢n %s especificada" 306 "Vi no se carg¢ con un int‚rprete Perl" 307 "No hay comando ex para ejecutar" 308 "Ingresar para ejecutar un comando, :q para salir" 309 "Usar \"cscope ayuda\" para obtener ayuda" 310 "No hay conexiones cscope corriendo" 311 "%s: tipo de b£squeda desconocido: usar uno de %s" 312 "%d: no existe esta sesi¢n cscope" 313 "determinar: la opci¢n %s no puede conectarse nunca" 314 "determinar: la opci¢n %s no puede determinarse nunca en 0" 315 "%s: a¤adido: %lu l¡neas, %lu caracteres" 316 "Evento inesperado de modificaci¢n de tama¤o" 317 "%d archivos para editar" nvi-1.81.6/catalog/spanish.check0100644000076400001440000000203110720065506015524 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 229 288 ========================= MISSING ERROR MESSAGES (Please add!): 288 318 319 320 ========================= Extra error messages (just delete them): 280 287 ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): 2 209 "El archivo est  vac¡o" 2 304 "Expansi¢n de shell fracasada" ========================= Duplicate messages, just message (this is okay): 2 %s: %lu l¡neas, %lu caracteresX 2 %s: archivo de recuperaci¢n defectuosoX 2 Copiando archivo para recuperaci¢n...X 2 El buffer %s est  vac¡oX 2 InterrumpidoX 2 Las modificaciones no pueden recuperarse si la sesi¢n fallaX 2 No hay patr¢n anterior de b£squedaX 2 No se realiza log, no se puede deshacerX 2 determinar: opci¢n %s no es booleanoX 3 %s: eliminarX 3 Archivo modificado desde la £ltima escritura completa; escribir o usar ! para alterarX 4 Uso: %sX ========================= nvi-1.81.6/catalog/spell.ok0100644000076400001440000000016710720065506014542 0ustar skimousersARGMAX LC NL XXXX arg1 arg2 chys english english.base german.base langauge msg msg.c msgcat msgq nvi nvi's pathname sp nvi-1.81.6/catalog/swedish0100644000076400001440000002450510720065506014463 0ustar skimousersVI_MESSAGE_CATALOG För långa raderX kan inte ta bort rad %luX kan inte lägga till på rad %luX kan inte sätta in på rad %luX kan inte lagra rad %luX kan inte hämta sista radenX Fel: kan inte hämta rad %luX LoggningsfilX Loggning utförs inte, ångra är inte möjligtX Inga ändringar att ångraX Loggning utförs inte, ångra är inte möjligtX Loggning utförs inte, ångra ångra är inte möjligtX Inga ändringar att återgöraX %s/%d: fel vid loggningX Vi:s standard in och ut måste gå till en terminalX Markering %s: inte sattX Markering %s: raden har tagits bortX Markering %s: markörpositionen finns inte längreX Fel: X ny filX namnet ändradesX ändradX oförändradX OLÅSTX inte skrivbarX rad %lu av %lu [%ld%%]X tom filX rad %luX Filen %s är ingen meddelandekatalogX Kan inte sätta standardvärde för %s flagganX Användning: %sX set: %s är en okänd flagga: "set all" visar alla flaggorX set: [no]%s flaggan kan inte ges ett värdeX set: %s flaggan är inte boleanskX set: %s flaggan: %sX set: %s flaggan: %s: för stort värdeX set: %s flaggan: %s är ett otillåtet talX set: %s flaggan är inte boleanskX Fönsterkolumnerna är för få, mindre än %dX Fönsterkolumnerna är för många, fler än %dX Fönsterraderna är för få, mindre än %dX Fönsterraderna är för många, fler än %dX Lisp flaggan är inte implementeradX meddelanden är inte avslagna: %sX meddelanden är inte påslagna: %sX Paragraph flaggan måste ges i teckengrupper om tvåX Section flaggan måste ges i teckengrupper om tvåX Standardbufferten är tomX Buffer %s är tomX Filer med radmatning i namnet kan inte återskapasX Ändringar kan inte återskapas om programmet krascharX Kopierar filen för återskapning...X Säkerhetskopiering misslyckades: %sX Ändringar kan inte återskapas om programmet krascharX Misslyckades att säkerhetskopiera filen: %sX Kopierar filen för återskapning...X Kan inte hitta information om användaridentitet %uX Kan inte låsa återskapningsfilenX Återskapningsfilens buffer överskrivenX ÅterskapningsfilX %s: Återskapningsfilen är korruptX %s: Återskapningsfilen är korruptX Det finns ingen fil %s, läsbar av dig, att återskapaX Det finns äldre versioner av denna fil som du kan återskapaX Det finns andra filer du kan återskapaX skickar inte email: %sX Filen är tom; inget att söka iX Kom till slutet på filen utan att hitta söksträngenX Ingen tidigare söksträngX Hittar inte söksträngenX Kom till början av filen utan att hitta söksträngenX Sökningen slog runtX Söker...X Inga icke skrivbara tecken funnaX Okänt kommandonamnX %s: kommandot är inte tillgängligt i "ex" lägeX Talet får inte vara nollX %s: Ogiltig radspecifikationX Fel i intern syntaxtabell (%s: %s)X Användning: %sX %s: temporärbuffert inte frisläpptX Offset är före rad 1X Offset är efter slutet på filenX @ med intervall exekverades när filen/fönstret ändradesX Global/v kommando exekverades när filen/fönstret ändradesX Ex kommando misslyckades: efterföljande kommandon ignoreradeX Ex kommando misslyckades: omdefinierade tangenter ignoreradeX Den andra adressen är mindre än den förstaX Inget namn på markering givetX \\ följs inte av / eller ?X Referens till ett radnummer mindre än 0X %s kommandot är inte käntX Värdet på adressen är för stortX Värdet på adressen är för litetX Otillåten adresskombinationX Otillåten adress: bara %lu rader finns i filenX Otillåten adress: filen är tomX %s kommandot tillåter inte en adress som är 0X Inga förkortningar att visaX Förkortningar måste sluta med ett "ord" teckenX Förkortningar kan inte innehålla mellanslag eller tabX Förkortningar kan inte blanda "ord"/"icke ord" tecken, utom i slutetX "%s" är ingen förkortningX Vi kommando misslyckades: omdefinierade tangenter ignoreradeX Inga fler filer att editeraX Inga tidigare filer att editeraX Inga tidigare filer att spela tillbakaX Ingen fillista att visaX Inget tidigare kommando att ersätta "!" medX Inget filnamn att ersätta %% medX Inget filnamn att ersätta # medX Fel: execl: %sX I/O fel: %sX Filen ändrad efter sista skrivning; spara eller använd !X Kan inte hitta hemkatalogX Ny nuvarande katalog: %sX Inga "cut buffers" att visaX %s kommandot kan inte används som del i ett "global" eller v kommandoX %s/%s: inte läst: varken du eller root är ägareX %s/%s: inte läst: du är inte ägareX %s/%s: inte läst: skrivbar av annan än ägarenX %s: inte läst: varken du eller root är ägareX %s: inte läst: du är inte ägareX %s: inte läst: skrivbar av annan än ägarenX Ingen nästa rad att sätta ihop medX Det finns inget i inmatningsmappningenX Det finns inget i kommandomappningenX %s tecknet kan inte mappas omX "%s" är inte ommappat just nuX Namn på markeringar måste vara ett tecken långaX %s finns, inget sparat; använd ! för att sparaX Ny exrc fil: %sX Målraden ligger inne i området som ska flyttasX Open kommandot kräver att open flaggan är sattX Open kommandot är inte implementerat ännuX Säkerhetskopiering av filen är inte möjligtX Filen säkerhetskopieradX %s expanderade till för många filnamnX Endast vanliga filer och namngivna rör kan läsasX %s: läslåset är otillgängligtX Läser...X %s: %lu rader, %lu teckenX Inga bakgrundsfönster att visaX Script kommandot finns bara i "vi" lägeX Inget kommando att exekveraX shiftwidth flaggan satt till 0X Talet har för stort värdeX Talet har för litet värdeX Reguljärt uttryck är givet; r flaggan är meningslösX #, l och p flaggorna kan inte kombineras med c flaggan i "vi" lägeX Ingen matchande text funnenX Inget tidigare märke har givitsX Det är färre än %s märken i stacken; använd :display t[ags]X Det finns ingen fil %s i märkesstacken; använd :display t[ags]X Tryck Enter för att fortsätta: X %s: märke inte funnetX %s: korrupt märke i %sX %s: märkets radnummer är bortom filslutetX Märkesstacken är tomX %s: söksträngen inte funnenX %d filer till att editeraX Buffert %s är tomX Bekräfta ändring? [n]X AvbrutenX Ingen tidigare buffert att exekveraX Inget tidigare reguljärt uttryckX %s kommandot kräver att en fil redan lästs inX Användning: %sX Visual kommandot kräver att open flaggan är sattX Tom filX Ingen tidigare F, f, T eller t sökningX %s inte funnenX Ingen tidigare fil att editeraX Markören är inte i ett talX Det resulterande talet är för stortX Det resulterande talet är för litetX Inget matchande tecken på denna radX Matchande tecken inte funnetX Det finns inga tecken att ersättaX Det finns inget fönster att byta tillX Tecken efter söksträng, radoffset och/eller z kommandotX Ingen tidigare söksträngX Sökningen slog runt till ursprungliga positionenX Förkortning överskred expanderingsgränsen: tecken har tagits bortX Ogiltigt tecken; använd "quote" för att sätta inX Redan i början på insättningenX Inga fler tecken att ta bortX Försök att gå bortom slutet på filenX Försök att gå bortom slutet på radenX Ingen förflyttning gjordX Redan i början på filenX Försök att gå före början på filenX Redan i första kolumnenX Buffertar måste anges före kommandotX Redan i slutet av filenX Redan på slutet av radenX %s är inte ett "vi" kommandoX Användning: %sX Inga tecken att ta bortX Q kommandot kräver "ex" i terminallägeX Inget kommando att repeteraX Filen är tomX %s kan inte användas som ett förflyttningskommandoX Redan i kommando lägeX Markören är inte i ett ordX Windows flaggans värde är för stor, största värde är %uX Lägg tillX ÄndraX KommandoX Sätt inX ErsättX Förflyttning bortom fönsterslutX Förflyttning till före fönstrets börjanX Fönstret måste vara större än %d rader för delningX Det finns inga fönster i bakgrundenX Det finns inget fönster i bakgrunden som editerar filen %sX Du får inte sätta ditt enda synliga fönster i bakgrundenX Fönstret kan bara krympa till %d raderX Fönstret kan inte krympaX Fönstret kan inte växaX Detta fönster kan inte pausasX Avbrutet: omdefinierade tangenter ignoreradeX vi: temporärbuffertar inte frisläpptaX Denna terminal har ingen %s tangentX Endast en buffert kan angesX Talet är större än %luX AvbrutetX Kan inte skapa temporär filX Warning: %s är inte en normal filX %s är redan låst, detta blir en icke skrivbar sessionX %s: ta bortX %s: stängX %s: ta bortX %s: ta bortX Ej skrivbar fil, filen inte sparad; använd ! för att skriva överX Ej skrivbar fil, filen inte sparadX %s finns, ej sparad; använd ! för att utföra operationenX %s finns, filen inte sparadX Ofullständig fil, filen inte sparad, använd ! för att skriva överX Ofullständig fil, filen inte sparadX %s: filen ändrad efter denna kopia togs; använd ! för att utföra operationenX %s: filen ändrad efter denna kopia togsX %s: skrivlåset är otillgängligtX Skriver...X %s: VARNING: FILEN TRUNKERADX Redan vid första märket i denna gruppX %s: ny fil: %lu rader, %lu teckenX %s: %lu rader, %lu teckenX %s expanderade till för många filnamnX %s är inte en normal filX %s ägs inte av digX %s är åtkomstbar av andra än ägarenX Filen har ändrats efter den sparats; spara eller använd !X Filen har ändrats efter den sparats; spara eller använd :edit!X Filen har ändrats efter den sparats; spara eller använd !X Filen är temporär; exit kastar bort ändringarnaX Ej skrivbar fil, ändringar har inte automatsparatsX Loggningen startar omX bekräfta? [ynq]X Tryck på en tangent för att fortsätta: X Tryck på en tangent för att fortsätta [: för att ge fler kommandon]: X Tryck på en tangent för att fortsätta [q för att avsluta]: X Den formen av %s kräver "ex" i terminallägeX Går till "ex" inmatningsläge.X Kommandot misslyckades, ingen fil inläst ännu.X forts?X Oväntad teckenhändelseX Oväntad filslutshändelseX Sökningen hittade ingentingX Oväntad avbrottshändelseX Oväntad avslutningshändelseX Oväntad omritningshändelseX Redan vid sista märket i denna gruppX %s kommandot kräver "ex" i terminallägeX Den formen av %s är inte tillgänglig när secure edit flaggan är sattX Oväntad stränghändelseX Oväntad tidshändelseX Oväntad skrivhändelseX Skalexpansion är inte tillgänglig när secure edit flaggan är sattX %s kommandot är inte tillgänglig när secure edit flaggan är sattX set: %s kan inte slås avX Fönstret för litet.X tillagdaX ändradeX borttagnaX ihopsattaX flyttadeX flyttadeX inklistradeX radX raderX Vi har inte länkats med en Tcl tolkX Filen har ändrats efter den sparats.X Skalexpansion misslyckadesX Ingen %s edit flagga givenX Vi har inte länkats med en Perl tolkX Inga "ex" kommandon att exekveraX Tryck för att exekvera kommando, :q för att avslutaX Gör "cscope help" för hjälpX Inga cscope kopplingar körsX %s: okänd söktyp: använd en av %sX %d: ingen sådan cscope sessionX set: %s flaggan får aldrig slås påX set: %s flaggan får aldrig sättas till 0X %s: tillagt: %lu rader, %lu teckenX Oväntad storleksändringX %d filer att editeraX nvi-1.81.6/catalog/swedish.base0100644000076400001440000002745010720065506015376 0ustar skimousers002 "För långa rader" 003 "kan inte ta bort rad %lu" 004 "kan inte lägga till på rad %lu" 005 "kan inte sätta in på rad %lu" 006 "kan inte lagra rad %lu" 007 "kan inte hämta sista raden" 008 "Fel: kan inte hämta rad %lu" 009 "Loggningsfil" 010 "Loggning utförs inte, ångra är inte möjligt" 011 "Inga ändringar att ångra" 012 "Loggning utförs inte, ångra är inte möjligt" 013 "Loggning utförs inte, ångra ångra är inte möjligt" 014 "Inga ändringar att återgöra" 015 "%s/%d: fel vid loggning" 016 "Vi:s standard in och ut måste gå till en terminal" 017 "Markering %s: inte satt" 018 "Markering %s: raden har tagits bort" 019 "Markering %s: markörpositionen finns inte längre" 020 "Fel: " 021 "ny fil" 022 "namnet ändrades" 023 "ändrad" 024 "oförändrad" 025 "OLÅST" 026 "inte skrivbar" 027 "rad %lu av %lu [%ld%%]" 028 "tom fil" 029 "rad %lu" 030 "Filen %s är ingen meddelandekatalog" 031 "Kan inte sätta standardvärde för %s flaggan" 032 "Användning: %s" 033 "set: %s är en okänd flagga: "set all" visar alla flaggor" 034 "set: [no]%s flaggan kan inte ges ett värde" 035 "set: %s flaggan är inte boleansk" 036 "set: %s flaggan: %s" 037 "set: %s flaggan: %s: för stort värde" 038 "set: %s flaggan: %s är ett otillåtet tal" 039 "set: %s flaggan är inte boleansk" 040 "Fönsterkolumnerna är för få, mindre än %d" 041 "Fönsterkolumnerna är för många, fler än %d" 042 "Fönsterraderna är för få, mindre än %d" 043 "Fönsterraderna är för många, fler än %d" 044 "Lisp flaggan är inte implementerad" 045 "meddelanden är inte avslagna: %s" 046 "meddelanden är inte påslagna: %s" 048 "Paragraph flaggan måste ges i teckengrupper om två" 049 "Section flaggan måste ges i teckengrupper om två" 053 "Standardbufferten är tom" 054 "Buffer %s är tom" 055 "Filer med radmatning i namnet kan inte återskapas" 056 "Ändringar kan inte återskapas om programmet kraschar" 057 "Kopierar filen för återskapning..." 058 "Säkerhetskopiering misslyckades: %s" 059 "Ändringar kan inte återskapas om programmet kraschar" 060 "Misslyckades att säkerhetskopiera filen: %s" 061 "Kopierar filen för återskapning..." 062 "Kan inte hitta information om användaridentitet %u" 063 "Kan inte låsa återskapningsfilen" 064 "Återskapningsfilens buffer överskriven" 065 "Återskapningsfil" 066 "%s: Återskapningsfilen är korrupt" 067 "%s: Återskapningsfilen är korrupt" 068 "Det finns ingen fil %s, läsbar av dig, att återskapa" 069 "Det finns äldre versioner av denna fil som du kan återskapa" 070 "Det finns andra filer du kan återskapa" 071 "skickar inte email: %s" 072 "Filen är tom; inget att söka i" 073 "Kom till slutet på filen utan att hitta söksträngen" 074 "Ingen tidigare söksträng" 075 "Hittar inte söksträngen" 076 "Kom till början av filen utan att hitta söksträngen" 077 "Sökningen slog runt" 078 "Söker..." 079 "Inga icke skrivbara tecken funna" 080 "Okänt kommandonamn" 082 "%s: kommandot är inte tillgängligt i "ex" läge" 083 "Talet får inte vara noll" 084 "%s: Ogiltig radspecifikation" 085 "Fel i intern syntaxtabell (%s: %s)" 086 "Användning: %s" 087 "%s: temporärbuffert inte frisläppt" 088 "Offset är före rad 1" 089 "Offset är efter slutet på filen" 090 "@ med intervall exekverades när filen/fönstret ändrades" 091 "Global/v kommando exekverades när filen/fönstret ändrades" 092 "Ex kommando misslyckades: efterföljande kommandon ignorerade" 093 "Ex kommando misslyckades: omdefinierade tangenter ignorerade" 094 "Den andra adressen är mindre än den första" 095 "Inget namn på markering givet" 096 "\\ följs inte av / eller ?" 097 "Referens till ett radnummer mindre än 0" 098 "%s kommandot är inte känt" 099 "Värdet på adressen är för stort" 100 "Värdet på adressen är för litet" 101 "Otillåten adresskombination" 102 "Otillåten adress: bara %lu rader finns i filen" 103 "Otillåten adress: filen är tom" 104 "%s kommandot tillåter inte en adress som är 0" 105 "Inga förkortningar att visa" 106 "Förkortningar måste sluta med ett "ord" tecken" 107 "Förkortningar kan inte innehålla mellanslag eller tab" 108 "Förkortningar kan inte blanda "ord"/"icke ord" tecken, utom i slutet" 109 ""%s" är ingen förkortning" 110 "Vi kommando misslyckades: omdefinierade tangenter ignorerade" 111 "Inga fler filer att editera" 112 "Inga tidigare filer att editera" 113 "Inga tidigare filer att spela tillbaka" 114 "Ingen fillista att visa" 115 "Inget tidigare kommando att ersätta "!" med" 116 "Inget filnamn att ersätta %% med" 117 "Inget filnamn att ersätta # med" 118 "Fel: execl: %s" 119 "I/O fel: %s" 120 "Filen ändrad efter sista skrivning; spara eller använd !" 121 "Kan inte hitta hemkatalog" 122 "Ny nuvarande katalog: %s" 123 "Inga "cut buffers" att visa" 124 "%s kommandot kan inte används som del i ett "global" eller v kommando" 125 "%s/%s: inte läst: varken du eller root är ägare" 126 "%s/%s: inte läst: du är inte ägare" 127 "%s/%s: inte läst: skrivbar av annan än ägaren" 128 "%s: inte läst: varken du eller root är ägare" 129 "%s: inte läst: du är inte ägare" 130 "%s: inte läst: skrivbar av annan än ägaren" 131 "Ingen nästa rad att sätta ihop med" 132 "Det finns inget i inmatningsmappningen" 133 "Det finns inget i kommandomappningen" 134 "%s tecknet kan inte mappas om" 135 ""%s" är inte ommappat just nu" 136 "Namn på markeringar måste vara ett tecken långa" 137 "%s finns, inget sparat; använd ! för att spara" 138 "Ny exrc fil: %s" 139 "Målraden ligger inne i området som ska flyttas" 140 "Open kommandot kräver att open flaggan är satt" 141 "Open kommandot är inte implementerat ännu" 142 "Säkerhetskopiering av filen är inte möjligt" 143 "Filen säkerhetskopierad" 144 "%s expanderade till för många filnamn" 145 "Endast vanliga filer och namngivna rör kan läsas" 146 "%s: läslåset är otillgängligt" 147 "Läser..." 148 "%s: %lu rader, %lu tecken" 149 "Inga bakgrundsfönster att visa" 150 "Script kommandot finns bara i "vi" läge" 151 "Inget kommando att exekvera" 152 "shiftwidth flaggan satt till 0" 153 "Talet har för stort värde" 154 "Talet har för litet värde" 155 "Reguljärt uttryck är givet; r flaggan är meningslös" 156 "#, l och p flaggorna kan inte kombineras med c flaggan i "vi" läge" 157 "Ingen matchande text funnen" 158 "Inget tidigare märke har givits" 159 "Det är färre än %s märken i stacken; använd :display t[ags]" 160 "Det finns ingen fil %s i märkesstacken; använd :display t[ags]" 161 "Tryck Enter för att fortsätta: " 162 "%s: märke inte funnet" 163 "%s: korrupt märke i %s" 164 "%s: märkets radnummer är bortom filslutet" 165 "Märkesstacken är tom" 166 "%s: söksträngen inte funnen" 167 "%d filer till att editera" 168 "Buffert %s är tom" 169 "Bekräfta ändring? [n]" 170 "Avbruten" 171 "Ingen tidigare buffert att exekvera" 172 "Inget tidigare reguljärt uttryck" 173 "%s kommandot kräver att en fil redan lästs in" 174 "Användning: %s" 175 "Visual kommandot kräver att open flaggan är satt" 177 "Tom fil" 178 "Ingen tidigare F, f, T eller t sökning" 179 "%s inte funnen" 180 "Ingen tidigare fil att editera" 181 "Markören är inte i ett tal" 182 "Det resulterande talet är för stort" 183 "Det resulterande talet är för litet" 184 "Inget matchande tecken på denna rad" 185 "Matchande tecken inte funnet" 186 "Det finns inga tecken att ersätta" 187 "Det finns inget fönster att byta till" 188 "Tecken efter söksträng, radoffset och/eller z kommandot" 189 "Ingen tidigare söksträng" 190 "Sökningen slog runt till ursprungliga positionen" 191 "Förkortning överskred expanderingsgränsen: tecken har tagits bort" 192 "Ogiltigt tecken; använd "quote" för att sätta in" 193 "Redan i början på insättningen" 194 "Inga fler tecken att ta bort" 195 "Försök att gå bortom slutet på filen" 196 "Försök att gå bortom slutet på raden" 197 "Ingen förflyttning gjord" 198 "Redan i början på filen" 199 "Försök att gå före början på filen" 200 "Redan i första kolumnen" 201 "Buffertar måste anges före kommandot" 202 "Redan i slutet av filen" 203 "Redan på slutet av raden" 204 "%s är inte ett "vi" kommando" 205 "Användning: %s" 206 "Inga tecken att ta bort" 207 "Q kommandot kräver "ex" i terminalläge" 208 "Inget kommando att repetera" 209 "Filen är tom" 210 "%s kan inte användas som ett förflyttningskommando" 211 "Redan i kommando läge" 212 "Markören är inte i ett ord" 214 "Windows flaggans värde är för stor, största värde är %u" 215 "Lägg till" 216 "Ändra" 217 "Kommando" 218 "Sätt in" 219 "Ersätt" 220 "Förflyttning bortom fönsterslut" 221 "Förflyttning till före fönstrets början" 222 "Fönstret måste vara större än %d rader för delning" 223 "Det finns inga fönster i bakgrunden" 224 "Det finns inget fönster i bakgrunden som editerar filen %s" 225 "Du får inte sätta ditt enda synliga fönster i bakgrunden" 226 "Fönstret kan bara krympa till %d rader" 227 "Fönstret kan inte krympa" 228 "Fönstret kan inte växa" 230 "Detta fönster kan inte pausas" 231 "Avbrutet: omdefinierade tangenter ignorerade" 232 "vi: temporärbuffertar inte frisläppta" 233 "Denna terminal har ingen %s tangent" 234 "Endast en buffert kan anges" 235 "Talet är större än %lu" 236 "Avbrutet" 237 "Kan inte skapa temporär fil" 238 "Warning: %s är inte en normal fil" 239 "%s är redan låst, detta blir en icke skrivbar session" 240 "%s: ta bort" 241 "%s: stäng" 242 "%s: ta bort" 243 "%s: ta bort" 244 "Ej skrivbar fil, filen inte sparad; använd ! för att skriva över" 245 "Ej skrivbar fil, filen inte sparad" 246 "%s finns, ej sparad; använd ! för att utföra operationen" 247 "%s finns, filen inte sparad" 248 "Ofullständig fil, filen inte sparad, använd ! för att skriva över" 249 "Ofullständig fil, filen inte sparad" 250 "%s: filen ändrad efter denna kopia togs; använd ! för att utföra operationen" 251 "%s: filen ändrad efter denna kopia togs" 252 "%s: skrivlåset är otillgängligt" 253 "Skriver..." 254 "%s: VARNING: FILEN TRUNKERAD" 255 "Redan vid första märket i denna grupp" 256 "%s: ny fil: %lu rader, %lu tecken" 257 "%s: %lu rader, %lu tecken" 258 "%s expanderade till för många filnamn" 259 "%s är inte en normal fil" 260 "%s ägs inte av dig" 261 "%s är åtkomstbar av andra än ägaren" 262 "Filen har ändrats efter den sparats; spara eller använd !" 263 "Filen har ändrats efter den sparats; spara eller använd :edit!" 264 "Filen har ändrats efter den sparats; spara eller använd !" 265 "Filen är temporär; exit kastar bort ändringarna" 266 "Ej skrivbar fil, ändringar har inte automatsparats" 267 "Loggningen startar om" 268 "bekräfta? [ynq]" 269 "Tryck på en tangent för att fortsätta: " 270 "Tryck på en tangent för att fortsätta [: för att ge fler kommandon]: " 271 "Tryck på en tangent för att fortsätta [q för att avsluta]: " 272 "Den formen av %s kräver "ex" i terminalläge" 273 "Går till "ex" inmatningsläge." 274 "Kommandot misslyckades, ingen fil inläst ännu." 275 " forts?" 276 "Oväntad teckenhändelse" 277 "Oväntad filslutshändelse" 278 "Sökningen hittade ingenting" 279 "Oväntad avbrottshändelse" 280 "Oväntad avslutningshändelse" 281 "Oväntad omritningshändelse" 282 "Redan vid sista märket i denna grupp" 283 "%s kommandot kräver "ex" i terminalläge" 284 "Den formen av %s är inte tillgänglig när secure edit flaggan är satt" 285 "Oväntad stränghändelse" 286 "Oväntad tidshändelse" 287 "Oväntad skrivhändelse" 289 "Skalexpansion är inte tillgänglig när secure edit flaggan är satt" 290 "%s kommandot är inte tillgänglig när secure edit flaggan är satt" 291 "set: %s kan inte slås av" 292 "Fönstret för litet." 293 "tillagda" 294 "ändrade" 295 "borttagna" 296 "ihopsatta" 297 "flyttade" 298 "flyttade" 299 "inklistrade" 300 "rad" 301 "rader" 302 "Vi har inte länkats med en Tcl tolk" 303 "Filen har ändrats efter den sparats." 304 "Skalexpansion misslyckades" 305 "Ingen %s edit flagga given" 306 "Vi har inte länkats med en Perl tolk" 307 "Inga "ex" kommandon att exekvera" 308 "Tryck för att exekvera kommando, :q för att avsluta" 309 "Gör "cscope help" för hjälp" 310 "Inga cscope kopplingar körs" 311 "%s: okänd söktyp: använd en av %s" 312 "%d: ingen sådan cscope session" 313 "set: %s flaggan får aldrig slås på" 314 "set: %s flaggan får aldrig sättas till 0" 315 "%s: tillagt: %lu rader, %lu tecken" 316 "Oväntad storleksändring" 317 "%d filer att editera" nvi-1.81.6/catalog/swedish.check0100644000076400001440000000165210720065506015535 0ustar skimousersUnused message id's (this is okay): 001 047 050 051 052 081 176 213 229 288 ========================= MISSING ERROR MESSAGES (Please add!): 288 318 319 320 ========================= Extra error messages (just delete them): 280 287 ========================= MESSAGES WITH THE SAME MESSAGE ID's (FIX!): ========================= Duplicate messages, both id and message (this is okay): ========================= Duplicate messages, just message (this is okay): 2 %s expanderade till för många filnamnX 2 %s: %lu rader, %lu teckenX 2 %s: Återskapningsfilen är korruptX 2 Filen har ändrats efter den sparats; spara eller använd !X 2 Ingen tidigare söksträngX 2 Kopierar filen för återskapning...X 2 Loggning utförs inte, ångra är inte möjligtX 2 flyttadeX 2 set: %s flaggan är inte boleanskX 2 Ändringar kan inte återskapas om programmet krascharX 3 %s: ta bortX 4 Användning: %sX ========================= nvi-1.81.6/catalog/swedish.owner0100644000076400001440000000005110720065506015602 0ustar skimousersJan Djarv nvi-1.81.6/cl/0040755000076400001440000000000010720065712012052 5ustar skimousersnvi-1.81.6/cl/README.signal0100644000076400001440000002223310720065506014206 0ustar skimousers# $Id: README.signal,v 10.1 1995/06/23 10:28:17 bostic Exp $ (Berkeley) $Date: 1995/06/23 10:28:17 $ There are six (normally) asynchronous actions about which vi cares: SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGTSTP and SIGWINCH. The assumptions: 1: The DB routines are not reentrant. 2: The curses routines may not be reentrant. 3: Neither DB nor curses will restart system calls. XXX Note, most C library functions don't restart system calls. So, we should *probably* start blocking around any imported function that we don't know doesn't make a system call. This is going to be a genuine annoyance... SIGHUP, SIGTERM Used for file recovery. The DB routines can't be reentered, nor can they handle interrupted system calls, so the vi routines that call DB block signals. This means that DB routines could be called at interrupt time, if necessary. SIGQUIT Disabled by the signal initialization routines. Historically, ^\ switched vi into ex mode, and we continue that practice. SIGWINCH: The interrupt routine sets a global bit which is checked by the key-read routine, so there are no reentrancy issues. This means that the screen will not resize until vi runs out of keys, but that doesn't seem like a problem. SIGINT and SIGTSTP are a much more difficult issue to resolve. Vi has to permit the user to interrupt long-running operations. Generally, a search, substitution or read/write is done on a large file, or, the user creates a key mapping with an infinite loop. This problem will become worse as more complex semantics are added to vi, especially things like making it a pure text widget. There are four major solutions on the table, each of which have minor permutations. 1: Run in raw mode. The up side is that there's no asynchronous behavior to worry about, and obviously no reentrancy problems. The down side is that it's easy to misinterpret characters (e.g. :w big_file^Mi^V^C is going to look like an interrupt) and it's easy to get into places where we won't see interrupt characters (e.g. ":map a ixx^[hxxaXXX" infinitely loops in historic implementations of vi). Periodically reading the terminal input buffer might solve the latter problem, but it's not going to be pretty. Also, we're going to be checking for ^C's and ^Z's both, all over the place -- I hate to litter the source code with that. For example, the historic version of vi didn't permit you to suspend the screen if you were on the colon command line. This isn't right. ^Z isn't a vi command, it's a terminal event. (Dammit.) 2: Run in cbreak mode. There are two problems in this area. First, the current curses implementations (both System V and Berkeley) don't give you clean cbreak modes. For example, the IEXTEN bit is left on, turning on DISCARD and LNEXT. To clarify, what vi WANTS is 8-bit clean, with the exception that flow control and signals are turned on, and curses cbreak mode doesn't give you this. We can either set raw mode and twiddle the tty, or cbreak mode and twiddle the tty. I chose to use raw mode, on the grounds that raw mode is better defined and I'm less likely to be surprised by a curses implementation down the road. The twiddling consists of setting ISIG, IXON/IXOFF, and disabling some of the interrupt characters (see the comments in cl_init.c). This is all found in historic System V (SVID 3) and POSIX 1003.1-1992, so it should be fairly portable. The second problem is that vi permits you to enter literal signal characters, e.g. ^V^C. There are two possible solutions. First, you can turn off signals when you get a ^V, but that means that a network packet containing ^V and ^C will lose, since the ^C may take effect before vi reads the ^V. (This is particularly problematic if you're talking over a protocol that recognizes signals locally and sends OOB packets when it sees them.) Second, you can turn the ^C into a literal character in vi, but that means that there's a race between entering ^V^C, i.e. the sequence may end up being ^V^C. Also, the second solution doesn't work for flow control characters, as they aren't delivered to the program as signals. Generally, this is what historic vi did. (It didn't have the curses problems because it didn't use curses.) It entered signals following ^V characters into the input stream, (which is why there's no way to enter a literal flow control character). 3: Run in mostly raw mode; turn signals on when doing an operation the user might want to interrupt, but leave them off most of the time. This works well for things like file reads and writes. This doesn't work well for trying to detect infinite maps. The problem is that you can write the code so that you don't have to turn on interrupts per keystroke, but the code isn't pretty and it's hard to make sure that an optimization doesn't cover up an infinite loop. This also requires interaction or state between the vi parser and the key reading routines, as an infinite loop may still be returning keys to the parser. Also, if the user inserts an interrupt into the tty queue while the interrupts are turned off, the key won't be treated as an interrupt, and requiring the user to pound the keyboard to catch an interrupt window is nasty. 4: Run in mostly raw mode, leaving signals on all of the time. Done by setting raw mode, and twiddling the tty's termios ISIG bit. This works well for the interrupt cases, because the code only has to check to see if the interrupt flag has been set, and can otherwise ignore signals. It's also less likely that we'll miss a case, and we don't have to worry about synchronizing between the vi parser and the key read routines. The down side is that we have to turn signals off if the user wants to enter a literal character (e.g. ^V^C). If the user enters the combination fast enough, or as part of a single network packet, the text input routines will treat it as a signal instead of as a literal character. To some extent, we have this problem already, since we turn off flow control so that the user can enter literal XON/XOFF characters. This is probably the easiest to code, and provides the smoothest programming interface. There are a couple of other problems to consider. First, System V's curses doesn't handle SIGTSTP correctly. If you use the newterm() interface, the TSTP signal will leave you in raw mode, and the final endwin() will leave you in the correct shell mode. If you use the initscr() interface, the TSTP signal will return you to the correct shell mode, but the final endwin() will leave you in raw mode. There you have it: proof that drug testing is not making any significant headway in the computer industry. The 4BSD curses is deficient in that it does not have an interface to the terminal keypad. So, regardless, we have to do our own SIGTSTP handling. The problem with this is that if we do our own SIGTSTP handling, in either models #3 or #4, we're going to have to call curses routines at interrupt time, which means that we might be reentering curses, which is something we don't want to do. Second, SIGTSTP has its own little problems. It's broadcast to the entire process group, not sent to a single process. The scenario goes something like this: the shell execs the mail program, which execs vi. The user hits ^Z, and all three programs get the signal, in some random order. The mail program goes to sleep immediately (since it probably didn't have a SIGTSTP handler in place). The shell gets a SIGCHLD, does a wait, and finds out that the only child in its foreground process group (of which it's aware) is asleep. It then optionally resets the terminal (because the modes aren't how it left them), and starts prompting the user for input. The problem is that somewhere in the middle of all of this, vi is resetting the terminal, and getting ready to send a SIGTSTP to the process group in order to put itself to sleep. There's a solution to all of this: when vi starts, it puts itself into its own process group, and then only it (and possible child processes) receive the SIGTSTP. This permits it to clean up the terminal and switch back to the original process group, where it sends that process group a SIGTSTP, putting everyone to sleep and waking the shell. Third, handing SIGTSTP asynchronously is further complicated by the child processes vi may fork off. If vi calls ex, ex resets the terminal and starts running some filter, and SIGTSTP stops them both, vi has to know when it restarts that it can't repaint the screen until ex's child has finished running. This is solveable, but it's annoying. Well, somebody had to make a decision, and this is the way it's going to be (unless I get talked out of it). SIGINT is handled asynchronously, so that we can pretty much guarantee that the user can interrupt any operation at any time. SIGTSTP is handled synchronously, so that we don't have to reenter curses and so that we don't have to play the process group games. ^Z is recognized in the standard text input and command modes. (^Z should also be recognized during operations that may potentially take a long time. The simplest solution is probably to twiddle the tty, install a handler for SIGTSTP, and then restore normal tty modes when the operation is complete.) nvi-1.81.6/cl/cl.h0100644000076400001440000000640110720065506012620 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: cl.h,v 10.32 2001/08/28 11:33:40 skimo Exp $ (Berkeley) $Date: 2001/08/28 11:33:40 $ */ /* Avoid clash on OSF1 */ #undef DB #ifdef USE_SLANG_CURSES #include #else #ifdef HAVE_NCURSESW_NCURSES_H /* { */ #include #else /* } { */ #ifdef HAVE_NCURSES_H /* { */ #include #else /* } { */ #include #endif /* } */ #endif #endif typedef struct _cl_private { char ibuf[256]; /* Input keys. */ size_t skip; /* Remaining keys. */ CONVWIN cw; /* Conversion buffer. */ int eof_count; /* EOF count. */ struct termios orig; /* Original terminal values. */ struct termios ex_enter;/* Terminal values to enter ex. */ struct termios vi_enter;/* Terminal values to enter vi. */ char *el; /* Clear to EOL terminal string. */ char *cup; /* Cursor movement terminal string. */ char *cuu1; /* Cursor up terminal string. */ char *rmso, *smso; /* Inverse video terminal strings. */ char *smcup, *rmcup; /* Terminal start/stop strings. */ char *oname; /* Original screen window name. */ SCR *focus; /* Screen that has the "focus". */ int killersig; /* Killer signal. */ #define INDX_HUP 0 #define INDX_INT 1 #define INDX_TERM 2 #define INDX_WINCH 3 #define INDX_MAX 4 /* Original signal information. */ struct sigaction oact[INDX_MAX]; enum { /* Tty group write mode. */ TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw; enum { /* Terminal initialization strings. */ TE_SENT=0, TI_SENT } ti_te; #define CL_IN_EX 0x0001 /* Currently running ex. */ #define CL_LAYOUT 0x0002 /* Screen layout changed. */ #define CL_RENAME 0x0004 /* X11 xterm icon/window renamed. */ #define CL_RENAME_OK 0x0008 /* User wants the windows renamed. */ #define CL_SCR_EX_INIT 0x0010 /* Ex screen initialized. */ #define CL_SCR_VI_INIT 0x0020 /* Vi screen initialized. */ #define CL_SIGHUP 0x0040 /* SIGHUP arrived. */ #define CL_SIGINT 0x0080 /* SIGINT arrived. */ #define CL_SIGTERM 0x0100 /* SIGTERM arrived. */ #define CL_SIGWINCH 0x0200 /* SIGWINCH arrived. */ #define CL_STDIN_TTY 0x0400 /* Talking to a terminal. */ u_int32_t flags; } CL_PRIVATE; #define CLP(sp) ((CL_PRIVATE *)((sp)->gp->cl_private)) #define GCLP(gp) ((CL_PRIVATE *)gp->cl_private) #define CLSP(sp) ((WINDOW *)((sp)->cl_private)) /* Return possibilities from the keyboard read routine. */ typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t; /* The screen position relative to a specific window. */ /* #define RCNO(sp, cno) (sp)->coff + (cno) #define RLNO(sp, lno) (sp)->roff + (lno) */ #define RCNO(sp, cno) (cno) #define RLNO(sp, lno) (lno) /* * XXX * Some implementations of curses.h don't define these for us. Used for * compatibility only. */ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #include "extern.h" #ifdef USE_PERL_SETENV #include "../perl_api/extern.h" #define cl_setenv(sp,name,val) perl_setenv(sp,name,val) #define cl_unsetenv(sp,name) perl_setenv(sp,name,NULL) #else #define cl_setenv(sp,name,val) setenv(name,val,1) #define cl_unsetenv(sp,name) unsetenv(name) #endif nvi-1.81.6/cl/cl_bsd.c0100644000076400001440000001724210720065506013450 0ustar skimousers/*- * Copyright (c) 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_bsd.c,v 8.32 2000/12/01 13:56:17 skimo Exp $ (Berkeley) $Date: 2000/12/01 13:56:17 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #include "cl.h" static char *ke; /* Keypad on. */ static char *ks; /* Keypad off. */ static char *vb; /* Visible bell string. */ /* * HP's support the entire System V curses package except for the tigetstr * and tigetnum functions. Ultrix supports the BSD curses package except * for the idlok function. Cthulu only knows why. Break things up into a * minimal set of functions. */ #ifndef HAVE_CURSES_WADDNSTR /* * waddnstr -- * * PUBLIC: #ifndef HAVE_CURSES_WADDNSTR * PUBLIC: int waddnstr __P((WINDOW*, char *, int)); * PUBLIC: #endif */ int waddnstr(w, s, n) WINDOW *w; char *s; int n; { int ch; while (n-- && (ch = *s++)) waddch(w, ch); return (OK); } #endif #ifndef HAVE_CURSES_BEEP /* * beep -- * * PUBLIC: #ifndef HAVE_CURSES_BEEP * PUBLIC: void beep __P((void)); * PUBLIC: #endif */ void beep() { (void)write(1, "\007", 1); /* '\a' */ } #endif /* !HAVE_CURSES_BEEP */ #ifndef HAVE_CURSES_FLASH /* * flash -- * Flash the screen. * * PUBLIC: #ifndef HAVE_CURSES_FLASH * PUBLIC: void flash __P((void)); * PUBLIC: #endif */ void flash() { if (vb != NULL) { (void)tputs(vb, 1, cl_putchar); (void)fflush(stdout); } else beep(); } #endif /* !HAVE_CURSES_FLASH */ #ifndef HAVE_CURSES_IDLOK /* * idlok -- * Turn on/off hardware line insert/delete. * * PUBLIC: #ifndef HAVE_CURSES_IDLOK * PUBLIC: void idlok __P((WINDOW *, int)); * PUBLIC: #endif */ void idlok(win, bf) WINDOW *win; int bf; { return; } #endif /* !HAVE_CURSES_IDLOK */ #ifndef HAVE_CURSES_KEYPAD /* * keypad -- * Put the keypad/cursor arrows into or out of application mode. * * PUBLIC: #ifndef HAVE_CURSES_KEYPAD * PUBLIC: int keypad __P((void *, int)); * PUBLIC: #endif */ int keypad(a, on) void *a; int on; { char *p; if ((p = tigetstr(on ? "smkx" : "rmkx")) != (char *)-1) { (void)tputs(p, 0, cl_putchar); (void)fflush(stdout); } return (0); } #endif /* !HAVE_CURSES_KEYPAD */ #ifndef HAVE_CURSES_NEWTERM /* * newterm -- * Create a new curses screen. * * PUBLIC: #ifndef HAVE_CURSES_NEWTERM * PUBLIC: void *newterm __P((const char *, FILE *, FILE *)); * PUBLIC: #endif */ void * newterm(a, b, c) const char *a; FILE *b, *c; { return (initscr()); } #endif /* !HAVE_CURSES_NEWTERM */ #ifndef HAVE_CURSES_SETUPTERM /* * setupterm -- * Set up terminal. * * PUBLIC: #ifndef HAVE_CURSES_SETUPTERM * PUBLIC: void setupterm __P((char *, int, int *)); * PUBLIC: #endif */ void setupterm(ttype, fno, errp) char *ttype; int fno, *errp; { static char buf[2048]; char *p; if ((*errp = tgetent(buf, ttype)) > 0) { if (ke != NULL) free(ke); ke = ((p = tigetstr("rmkx")) == (char *)-1) ? NULL : strdup(p); if (ks != NULL) free(ks); ks = ((p = tigetstr("smkx")) == (char *)-1) ? NULL : strdup(p); if (vb != NULL) free(vb); vb = ((p = tigetstr("flash")) == (char *)-1) ? NULL : strdup(p); } } #endif /* !HAVE_CURSES_SETUPTERM */ #ifndef HAVE_CURSES_TIGETSTR /* Terminfo-to-termcap translation table. */ typedef struct _tl { char *terminfo; /* Terminfo name. */ char *termcap; /* Termcap name. */ } TL; static const TL list[] = { "cols", "co", /* Terminal columns. */ "cup", "cm", /* Cursor up. */ "cuu1", "up", /* Cursor up. */ "el", "ce", /* Clear to end-of-line. */ "flash", "vb", /* Visible bell. */ "kcub1", "kl", /* Cursor left. */ "kcud1", "kd", /* Cursor down. */ "kcuf1", "kr", /* Cursor right. */ "kcuu1", "ku", /* Cursor up. */ "kdch1", "kD", /* Delete character. */ "kdl1", "kL", /* Delete line. */ "ked", "kS", /* Delete to end of screen. */ "kel", "kE", /* Delete to eol. */ "kend", "@7", /* Go to eol. */ "khome", "kh", /* Go to sol. */ "kich1", "kI", /* Insert at cursor. */ "kil1", "kA", /* Insert line. */ "kind", "kF", /* Scroll down. */ "kll", "kH", /* Go to eol. */ "knp", "kN", /* Page down. */ "kpp", "kP", /* Page up. */ "kri", "kR", /* Scroll up. */ "lines", "li", /* Terminal lines. */ "rmcup", "te", /* Terminal end string. */ "rmkx", "ke", /* Exit "keypad-transmit" mode. */ "rmso", "se", /* Standout end. */ "smcup", "ti", /* Terminal initialization string. */ "smkx", "ks", /* Enter "keypad-transmit" mode. */ "smso", "so", /* Standout begin. */ }; #ifdef _AIX /* * AIX's implementation for function keys greater than 10 is different and * only goes as far as 36. */ static const char codes[] = { /* 0-10 */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ';', /* 11-20 */ '<', '>', '!', '@', '#', '$', '%', '^', '&', '*', /* 21-30 */ '(', ')', '-', '_', '+', ',', ':', '?', '[', ']', /* 31-36 */ '{', '}', '|', '~', '/', '=' }; #else /* * !!! * Historically, the 4BSD termcap code didn't support functions keys greater * than 9. This was silently enforced -- asking for key k12 would return the * value for k1. We try and get around this by using the tables specified in * the terminfo(TI_ENV) man page from the 3rd Edition SVID. This assumes the * implementors of any System V compatibility code or an extended termcap used * those codes. */ static const char codes[] = { /* 0-10 */ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ';', /* 11-19 */ '1', '2', '3', '4', '5', '6', '7', '8', '9', /* 20-63 */ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', }; #endif /* _AIX */ /* * lcmp -- * list comparison routine for bsearch. */ static int lcmp(a, b) const void *a, *b; { return (strcmp(a, ((TL *)b)->terminfo)); } /* * tigetstr -- * * Vendors put the prototype for tigetstr into random include files, including * , which we can't include because it makes other systems unhappy. * Try and work around the problem, since we only care about the return value. * * PUBLIC: #ifdef HAVE_CURSES_TIGETSTR * PUBLIC: char *tigetstr(); * PUBLIC: #else * PUBLIC: char *tigetstr __P((char *)); * PUBLIC: #endif */ char * tigetstr(name) char *name; { static char sbuf[256]; TL *tlp; int n; char *p, keyname[3]; if ((tlp = bsearch(name, list, sizeof(list) / sizeof(TL), sizeof(TL), lcmp)) == NULL) { #ifdef _AIX if (name[0] == 'k' && name[1] == 'f' && (n = atoi(name + 2)) <= 36) { keyname[0] = 'k'; keyname[1] = codes[n]; keyname[2] = '\0'; #else if (name[0] == 'k' && name[1] == 'f' && (n = atoi(name + 2)) <= 63) { keyname[0] = n <= 10 ? 'k' : 'F'; keyname[1] = codes[n]; keyname[2] = '\0'; #endif name = keyname; } } else name = tlp->termcap; p = sbuf; #ifdef _AIX return ((p = tgetstr(name, &p)) == NULL ? (char *)-1 : strcpy(sbuf, p)); #else return (tgetstr(name, &p) == NULL ? (char *)-1 : sbuf); #endif } /* * tigetnum -- * * PUBLIC: #ifndef HAVE_CURSES_TIGETSTR * PUBLIC: int tigetnum __P((char *)); * PUBLIC: #endif */ int tigetnum(name) char *name; { TL *tlp; int val; if ((tlp = bsearch(name, list, sizeof(list) / sizeof(TL), sizeof(TL), lcmp)) != NULL) { name = tlp->termcap; } return ((val = tgetnum(name)) == -1 ? -2 : val); } #endif /* !HAVE_CURSES_TIGETSTR */ nvi-1.81.6/cl/cl_funcs.c0100644000076400001440000005017410720065506014017 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_funcs.c,v 10.72 2002/03/02 23:18:33 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:18:33 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #include "cl.h" static void cl_rdiv __P((SCR *)); static int addstr4(SCR *sp, void *str, size_t len, int wide) { CL_PRIVATE *clp; WINDOW *win; size_t y, x; int iv; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* * If ex isn't in control, it's the last line of the screen and * it's a split screen, use inverse video. */ iv = 0; getyx(win, y, x); if (!F_ISSET(sp, SC_SCR_EXWROTE) && y == RLNO(sp, LASTLINE(sp)) && IS_SPLIT(sp)) { iv = 1; (void)wstandout(win); } #ifdef USE_WIDECHAR if (wide) { if (waddnwstr(win, str, len) == ERR) return (1); } else #endif if (waddnstr(win, str, len) == ERR) return (1); if (iv) (void)wstandend(win); return (0); } /* * cl_waddstr -- * Add len bytes from the string at the cursor, advancing the cursor. * * PUBLIC: int cl_waddstr __P((SCR *, const CHAR_T *, size_t)); */ int cl_waddstr(SCR *sp, const CHAR_T *str, size_t len) { return addstr4(sp, (void *)str, len, 1); } /* * cl_addstr -- * Add len bytes from the string at the cursor, advancing the cursor. * * PUBLIC: int cl_addstr __P((SCR *, const char *, size_t)); */ int cl_addstr(SCR *sp, const char *str, size_t len) { return addstr4(sp, (void *)str, len, 0); } /* * cl_attr -- * Toggle a screen attribute on/off. * * PUBLIC: int cl_attr __P((SCR *, scr_attr_t, int)); */ int cl_attr(SCR *sp, scr_attr_t attribute, int on) { CL_PRIVATE *clp; WINDOW *win; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; switch (attribute) { case SA_ALTERNATE: /* * !!! * There's a major layering violation here. The problem is that the * X11 xterm screen has what's known as an "alternate" screen. Some * xterm termcap/terminfo entries include sequences to switch to/from * that alternate screen as part of the ti/te (smcup/rmcup) strings. * Vi runs in the alternate screen, so that you are returned to the * same screen contents on exit from vi that you had when you entered * vi. Further, when you run :shell, or :!date or similar ex commands, * you also see the original screen contents. This wasn't deliberate * on vi's part, it's just that it historically sent terminal init/end * sequences at those times, and the addition of the alternate screen * sequences to the strings changed the behavior of vi. The problem * caused by this is that we don't want to switch back to the alternate * screen while getting a new command from the user, when the user is * continuing to enter ex commands, e.g.: * * :!date <<< switch to original screen * [Hit return to continue] <<< prompt user to continue * :command <<< get command from user * * Note that the :command input is a true vi input mode, e.g., input * maps and abbreviations are being done. So, we need to be able to * switch back into the vi screen mode, without flashing the screen. * * To make matters worse, the curses initscr() and endwin() calls will * do this automatically -- so, this attribute isn't as controlled by * the higher level screen as closely as one might like. */ if (on) { if (clp->ti_te != TI_SENT) { clp->ti_te = TI_SENT; if (clp->smcup == NULL) (void)cl_getcap(sp, "smcup", &clp->smcup); if (clp->smcup != NULL) (void)tputs(clp->smcup, 1, cl_putchar); } } else if (clp->ti_te != TE_SENT) { clp->ti_te = TE_SENT; if (clp->rmcup == NULL) (void)cl_getcap(sp, "rmcup", &clp->rmcup); if (clp->rmcup != NULL) (void)tputs(clp->rmcup, 1, cl_putchar); (void)fflush(stdout); } (void)fflush(stdout); break; case SA_INVERSE: if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) { if (clp->smso == NULL) return (1); if (on) (void)tputs(clp->smso, 1, cl_putchar); else (void)tputs(clp->rmso, 1, cl_putchar); (void)fflush(stdout); } else { if (on) (void)wstandout(win); else (void)wstandend(win); } break; default: abort(); } return (0); } /* * cl_baud -- * Return the baud rate. * * PUBLIC: int cl_baud __P((SCR *, u_long *)); */ int cl_baud(SCR *sp, u_long *ratep) { CL_PRIVATE *clp; /* * XXX * There's no portable way to get a "baud rate" -- cfgetospeed(3) * returns the value associated with some #define, which we may * never have heard of, or which may be a purely local speed. Vi * only cares if it's SLOW (w300), slow (w1200) or fast (w9600). * Try and detect the slow ones, and default to fast. */ clp = CLP(sp); switch (cfgetospeed(&clp->orig)) { case B50: case B75: case B110: case B134: case B150: case B200: case B300: case B600: *ratep = 600; break; case B1200: *ratep = 1200; break; default: *ratep = 9600; break; } return (0); } /* * cl_bell -- * Ring the bell/flash the screen. * * PUBLIC: int cl_bell __P((SCR *)); */ int cl_bell(SCR *sp) { if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE | SC_SCR_EX)) (void)write(STDOUT_FILENO, "\07", 1); /* \a */ else { /* * Vi has an edit option which determines if the terminal * should be beeped or the screen flashed. */ if (O_ISSET(sp, O_FLASH)) (void)flash(); else (void)beep(); } return (0); } /* * cl_clrtoeol -- * Clear from the current cursor to the end of the line. * * PUBLIC: int cl_clrtoeol __P((SCR *)); */ int cl_clrtoeol(SCR *sp) { WINDOW *win; size_t spcnt, y, x; win = CLSP(sp) ? CLSP(sp) : stdscr; #if 0 if (IS_VSPLIT(sp)) { /* The cursor must be returned to its original position. */ getyx(win, y, x); for (spcnt = (sp->coff + sp->cols) - x; spcnt > 0; --spcnt) (void)waddch(win, ' '); (void)wmove(win, y, x); return (0); } else #endif return (wclrtoeol(win) == ERR); } /* * cl_cursor -- * Return the current cursor position. * * PUBLIC: int cl_cursor __P((SCR *, size_t *, size_t *)); */ int cl_cursor(SCR *sp, size_t *yp, size_t *xp) { WINDOW *win; win = CLSP(sp) ? CLSP(sp) : stdscr; /* * The curses screen support splits a single underlying curses screen * into multiple screens to support split screen semantics. For this * reason the returned value must be adjusted to be relative to the * current screen, and not absolute. Screens that implement the split * using physically distinct screens won't need this hack. */ getyx(win, *yp, *xp); /* *yp -= sp->roff; *xp -= sp->coff; */ return (0); } /* * cl_deleteln -- * Delete the current line, scrolling all lines below it. * * PUBLIC: int cl_deleteln __P((SCR *)); */ int cl_deleteln(SCR *sp) { CHAR_T ch; CL_PRIVATE *clp; WINDOW *win; size_t col, lno, spcnt, y, x; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* * This clause is required because the curses screen uses reverse * video to delimit split screens. If the screen does not do this, * this code won't be necessary. * * If the bottom line was in reverse video, rewrite it in normal * video before it's scrolled. * * Check for the existence of a chgat function; XSI requires it, but * historic implementations of System V curses don't. If it's not * a #define, we'll fall back to doing it by hand, which is slow but * acceptable. * * By hand means walking through the line, retrieving and rewriting * each character. Curses has no EOL marker, so track strings of * spaces, and copy the trailing spaces only if there's a non-space * character following. */ if (!F_ISSET(sp, SC_SCR_EXWROTE) && IS_SPLIT(sp)) { getyx(win, y, x); #ifdef mvchgat mvwchgat(win, RLNO(sp, LASTLINE(sp)), 0, -1, A_NORMAL, 0, NULL); #else for (lno = RLNO(sp, LASTLINE(sp)), col = spcnt = 0;;) { (void)wmove(win, lno, col); ch = winch(win); if (isblank(ch)) ++spcnt; else { (void)wmove(win, lno, col - spcnt); for (; spcnt > 0; --spcnt) (void)waddch(win, ' '); (void)waddch(win, ch); } if (++col >= sp->cols) break; } #endif (void)wmove(win, y, x); } /* * The bottom line is expected to be blank after this operation, * and other screens must support that semantic. */ return (wdeleteln(win) == ERR); } /* * cl_discard -- * Discard a screen. * * PUBLIC: int cl_discard __P((SCR *, SCR **)); */ int cl_discard(SCR *discardp, SCR **acquirep) { CL_PRIVATE *clp; SCR* tsp; if (discardp) { clp = CLP(discardp); F_SET(clp, CL_LAYOUT); if (CLSP(discardp)) { delwin(CLSP(discardp)); discardp->cl_private = NULL; } } /* no screens got a piece; we're done */ if (!acquirep) return 0; for (; (tsp = *acquirep) != NULL; ++acquirep) { clp = CLP(tsp); F_SET(clp, CL_LAYOUT); if (CLSP(tsp)) delwin(CLSP(tsp)); tsp->cl_private = subwin(stdscr, tsp->rows, tsp->cols, tsp->roff, tsp->coff); } /* discardp is going away, acquirep is taking up its space. */ return (0); } /* * cl_ex_adjust -- * Adjust the screen for ex. This routine is purely for standalone * ex programs. All special purpose, all special case. * * PUBLIC: int cl_ex_adjust __P((SCR *, exadj_t)); */ int cl_ex_adjust(SCR *sp, exadj_t action) { CL_PRIVATE *clp; int cnt; clp = CLP(sp); switch (action) { case EX_TERM_SCROLL: /* Move the cursor up one line if that's possible. */ if (clp->cuu1 != NULL) (void)tputs(clp->cuu1, 1, cl_putchar); else if (clp->cup != NULL) (void)tputs(tgoto(clp->cup, 0, LINES - 2), 1, cl_putchar); else return (0); /* FALLTHROUGH */ case EX_TERM_CE: /* Clear the line. */ if (clp->el != NULL) { (void)putchar('\r'); (void)tputs(clp->el, 1, cl_putchar); } else { /* * Historically, ex didn't erase the line, so, if the * displayed line was only a single glyph, and * was more than one glyph, the output would not fully * overwrite the user's input. To fix this, output * the maxiumum character number of spaces. Note, * this won't help if the user entered extra prompt * or characters before the command character. * We'd have to do a lot of work to make that work, and * it's almost certainly not worth the effort. */ for (cnt = 0; cnt < MAX_CHARACTER_COLUMNS; ++cnt) (void)putchar('\b'); for (cnt = 0; cnt < MAX_CHARACTER_COLUMNS; ++cnt) (void)putchar(' '); (void)putchar('\r'); (void)fflush(stdout); } break; default: abort(); } return (0); } /* * cl_insertln -- * Push down the current line, discarding the bottom line. * * PUBLIC: int cl_insertln __P((SCR *)); */ int cl_insertln(SCR *sp) { WINDOW *win; win = CLSP(sp) ? CLSP(sp) : stdscr; /* * The current line is expected to be blank after this operation, * and the screen must support that semantic. */ return (winsertln(win) == ERR); } /* * cl_keyval -- * Return the value for a special key. * * PUBLIC: int cl_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *)); */ int cl_keyval(SCR *sp, scr_keyval_t val, CHAR_T *chp, int *dnep) { CL_PRIVATE *clp; /* * VEOF, VERASE and VKILL are required by POSIX 1003.1-1990, * VWERASE is a 4BSD extension. */ clp = CLP(sp); switch (val) { case KEY_VEOF: *dnep = (*chp = clp->orig.c_cc[VEOF]) == _POSIX_VDISABLE; break; case KEY_VERASE: *dnep = (*chp = clp->orig.c_cc[VERASE]) == _POSIX_VDISABLE; break; case KEY_VKILL: *dnep = (*chp = clp->orig.c_cc[VKILL]) == _POSIX_VDISABLE; break; #ifdef VWERASE case KEY_VWERASE: *dnep = (*chp = clp->orig.c_cc[VWERASE]) == _POSIX_VDISABLE; break; #endif default: *dnep = 1; break; } return (0); } /* * cl_move -- * Move the cursor. * * PUBLIC: int cl_move __P((SCR *, size_t, size_t)); */ int cl_move(SCR *sp, size_t lno, size_t cno) { WINDOW *win; win = CLSP(sp) ? CLSP(sp) : stdscr; /* See the comment in cl_cursor. */ if (wmove(win, RLNO(sp, lno), RCNO(sp, cno)) == ERR) { msgq(sp, M_ERR, "Error: move: l(%u + %u) c(%u + %u)", lno, sp->roff, cno, sp->coff); return (1); } return (0); } /* * cl_refresh -- * Refresh the screen. * * PUBLIC: int cl_refresh __P((SCR *, int)); */ int cl_refresh(SCR *sp, int repaint) { GS *gp; CL_PRIVATE *clp; WINDOW *win; SCR *psp, *tsp; size_t y, x; gp = sp->gp; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* * If we received a killer signal, we're done, there's no point * in refreshing the screen. */ if (clp->killersig) return (0); /* * If repaint is set, the editor is telling us that we don't know * what's on the screen, so we have to repaint from scratch. * * If repaint set or the screen layout changed, we need to redraw * any lines separating vertically split screens. If the horizontal * offsets are the same, then the split was vertical, and need to * draw a dividing line. */ if (repaint || F_ISSET(clp, CL_LAYOUT)) { getyx(stdscr, y, x); for (psp = sp; psp != (void *)&sp->wp->scrq; psp = psp->q.cqe_next) for (tsp = psp->q.cqe_next; tsp != (void *)&sp->wp->scrq; tsp = tsp->q.cqe_next) if (psp->roff == tsp->roff) { if (psp->coff + psp->cols + 1 == tsp->coff) cl_rdiv(psp); else if (tsp->coff + tsp->cols + 1 == psp->coff) cl_rdiv(tsp); } (void)wmove(stdscr, y, x); F_CLR(clp, CL_LAYOUT); } /* * In the curses library, doing wrefresh(curscr) is okay, but the * screen flashes when we then apply the refresh() to bring it up * to date. So, use clearok(). */ if (repaint) clearok(curscr, 1); /* * Only do an actual refresh, when this is the focus window, * i.e. the one holding the cursor. This assumes that refresh * is called for that window after refreshing the others. * This prevents the cursor being drawn in the other windows. */ return (wnoutrefresh(stdscr) == ERR || wnoutrefresh(win) == ERR || (sp == clp->focus && doupdate() == ERR)); } /* * cl_rdiv -- * Draw a dividing line between two vertically split screens. */ static void cl_rdiv(SCR *sp) { size_t cnt; for (cnt = 0; cnt < sp->rows - 1; ++cnt) { wmove(stdscr, sp->roff + cnt, sp->cols + sp->coff); waddch(stdscr, '|'); } } /* * cl_rename -- * Rename the file. * * PUBLIC: int cl_rename __P((SCR *, char *, int)); */ int cl_rename(SCR *sp, char *name, int on) { CL_PRIVATE *clp; FILE *pfp; GS *gp; char buf[256], *p; gp = sp->gp; clp = CLP(sp); if (on) { clp->focus = sp; if (!F_ISSET(clp, CL_RENAME_OK)) return (0); /* * XXX * We can only rename windows for xterm. */ if (strncmp(OG_STR(gp, GO_TERM), "xterm", sizeof("xterm") - 1)) return (0); /* * XXX * Try and figure out the current name of this window. There * are two forms of the xwininfo output I've seen: * * Window id: 0x400000d "name" * Window id: 0x140000d (name) */ #define COMMAND \ "expr \"`xwininfo -id $WINDOWID | grep id:`\" : '.* [\"(]\\(.*\\)[\")]'" if (clp->oname == NULL && (pfp = popen(COMMAND, "r")) != NULL) { if (fgets(buf, sizeof(buf), pfp) != NULL && (p = strchr(buf, '\n')) != NULL) { *p = '\0'; clp->oname = strdup(buf); } (void)fclose(pfp); } cl_setname(gp, name); F_SET(clp, CL_RENAME); } else if (F_ISSET(clp, CL_RENAME)) { cl_setname(gp, clp->oname); F_CLR(clp, CL_RENAME); } return (0); } /* * cl_setname -- * Set a X11 icon/window name. * * PUBLIC: void cl_setname __P((GS *, char *)); */ void cl_setname(GS *gp, char *name) { /* X11 xterm escape sequence to rename the icon/window. */ #define XTERM_RENAME "\033]0;%s\007" (void)printf(XTERM_RENAME, name == NULL ? OG_STR(gp, GO_TERM) : name); (void)fflush(stdout); } /* * cl_split -- * Split a screen. * * PUBLIC: int cl_split __P((SCR *, SCR *)); */ int cl_split(SCR *origp, SCR *newp) { CL_PRIVATE *clp; clp = CLP(origp); F_SET(clp, CL_LAYOUT); if (CLSP(origp)) delwin(CLSP(origp)); origp->cl_private = subwin(stdscr, origp->rows, origp->cols, origp->roff, origp->coff); newp->cl_private = subwin(stdscr, newp->rows, newp->cols, newp->roff, newp->coff); /* origp is the original screen, giving up space to newp. */ return (0); } /* * cl_suspend -- * Suspend a screen. * * PUBLIC: int cl_suspend __P((SCR *, int *)); */ int cl_suspend(SCR *sp, int *allowedp) { struct termios t; CL_PRIVATE *clp; WINDOW *win; GS *gp; size_t y, x; int changed; gp = sp->gp; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; *allowedp = 1; /* * The ex implementation of this function isn't needed by screens not * supporting ex commands that require full terminal canonical mode * (e.g. :suspend). * * The vi implementation of this function isn't needed by screens not * supporting vi process suspension, i.e. any screen that isn't backed * by a UNIX shell. * * Setting allowedp to 0 will cause the editor to reject the command. */ if (F_ISSET(sp, SC_EX)) { /* Save the terminal settings, and restore the original ones. */ if (F_ISSET(clp, CL_STDIN_TTY)) { (void)tcgetattr(STDIN_FILENO, &t); (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->orig); } /* Stop the process group. */ (void)kill(0, SIGTSTP); /* Time passes ... */ /* Restore terminal settings. */ if (F_ISSET(clp, CL_STDIN_TTY)) (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &t); return (0); } /* * Move to the lower left-hand corner of the screen. * * XXX * Not sure this is necessary in System V implementations, but it * shouldn't hurt. */ getyx(win, y, x); (void)wmove(win, LINES - 1, 0); (void)wrefresh(win); /* * Temporarily end the screen. System V introduced a semantic where * endwin() could be restarted. We use it because restarting curses * from scratch often fails in System V. 4BSD curses didn't support * restarting after endwin(), so we have to do what clean up we can * without calling it. */ /* Save the terminal settings. */ (void)tcgetattr(STDIN_FILENO, &t); /* Restore the cursor keys to normal mode. */ (void)keypad(stdscr, FALSE); /* Restore the window name. */ (void)cl_rename(sp, NULL, 0); #ifdef HAVE_BSD_CURSES (void)cl_attr(sp, SA_ALTERNATE, 0); #else (void)endwin(); #endif /* * XXX * Restore the original terminal settings. This is bad -- the * reset can cause character loss from the tty queue. However, * we can't call endwin() in BSD curses implementations, and too * many System V curses implementations don't get it right. */ (void)tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->orig); /* Stop the process group. */ (void)kill(0, SIGTSTP); /* Time passes ... */ /* * If we received a killer signal, we're done. Leave everything * unchanged. In addition, the terminal has already been reset * correctly, so leave it alone. */ if (clp->killersig) { F_CLR(clp, CL_SCR_EX_INIT | CL_SCR_VI_INIT); return (0); } /* Restore terminal settings. */ wrefresh(win); /* Needed on SunOs/Solaris ? */ if (F_ISSET(clp, CL_STDIN_TTY)) (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &t); #ifdef HAVE_BSD_CURSES (void)cl_attr(sp, SA_ALTERNATE, 1); #endif /* Set the window name. */ (void)cl_rename(sp, sp->frp->name, 1); /* Put the cursor keys into application mode. */ (void)keypad(stdscr, TRUE); /* Refresh and repaint the screen. */ (void)wmove(win, y, x); (void)cl_refresh(sp, 1); /* If the screen changed size, set the SIGWINCH bit. */ if (cl_ssize(sp, 1, NULL, NULL, &changed)) return (1); if (changed) F_SET(CLP(sp), CL_SIGWINCH); return (0); } /* * cl_usage -- * Print out the curses usage messages. * * PUBLIC: void cl_usage __P((void)); */ void cl_usage(void) { #define USAGE "\ usage: ex [-eFRrSsv] [-c command] [-t tag] [-w size] [file ...]\n\ usage: vi [-eFlRrSv] [-c command] [-t tag] [-w size] [file ...]\n" (void)fprintf(stderr, "%s", USAGE); #undef USAGE } #ifdef DEBUG /* * gdbrefresh -- * Stub routine so can flush out curses screen changes using gdb. */ int gdbrefresh(void) { refresh(); return (0); /* XXX Convince gdb to run it. */ } #endif nvi-1.81.6/cl/cl_main.c0100644000076400001440000002176310720065506013627 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_main.c,v 10.54 2001/07/29 19:07:27 skimo Exp $ (Berkeley) $Date: 2001/07/29 19:07:27 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ip/extern.h" #include "cl.h" #include "pathnames.h" GS *__global_list; /* GLOBAL: List of screens. */ sigset_t __sigblockset; /* GLOBAL: Blocked signals. */ static void cl_func_std __P((WIN *)); static void cl_end __P((CL_PRIVATE *)); static CL_PRIVATE *cl_init __P((WIN *)); static void perr __P((char *, char *)); static int setsig __P((int, struct sigaction *, void (*)(int))); static void sig_end __P((GS *)); static void term_init __P((char *, char *)); /* * main -- * This is the main loop for the standalone curses editor. */ int main(int argc, char **argv) { static int reenter; CL_PRIVATE *clp; GS *gp; WIN *wp; size_t rows, cols; int rval; char **p_av, **t_av, *ttype; /* If loaded at 0 and jumping through a NULL pointer, stop. */ if (reenter++) abort(); /* Create and initialize the global structure. */ __global_list = gp = gs_init(argv[0]); /* * Strip out any arguments that vi isn't going to understand. There's * no way to portably call getopt twice, so arguments parsed here must * be removed from the argument list. */ for (p_av = t_av = argv;;) { if (*t_av == NULL) { *p_av = NULL; break; } if (!strcmp(*t_av, "--")) { while ((*p_av++ = *t_av++) != NULL); break; } *p_av++ = *t_av++; } /* Create new window */ wp = gs_new_win(gp); /* Create and initialize the CL_PRIVATE structure. */ clp = cl_init(wp); /* * Initialize the terminal information. * * We have to know what terminal it is from the start, since we may * have to use termcap/terminfo to find out how big the screen is. */ if ((ttype = getenv("TERM")) == NULL) ttype = "unknown"; term_init(gp->progname, ttype); /* Add the terminal type to the global structure. */ if ((OG_D_STR(gp, GO_TERM) = OG_STR(gp, GO_TERM) = strdup(ttype)) == NULL) perr(gp->progname, NULL); /* Figure out how big the screen is. */ if (cl_ssize(NULL, 0, &rows, &cols, NULL)) exit (1); /* Add the rows and columns to the global structure. */ OG_VAL(gp, GO_LINES) = OG_D_VAL(gp, GO_LINES) = rows; OG_VAL(gp, GO_COLUMNS) = OG_D_VAL(gp, GO_COLUMNS) = cols; /* Ex wants stdout to be buffered. */ (void)setvbuf(stdout, NULL, _IOFBF, 0); /* Start catching signals. */ if (sig_init(gp, NULL)) exit (1); /* Run ex/vi. */ rval = editor(wp, argc, argv); /* Clean out the global structure. */ gs_end(gp); /* Clean up signals. */ sig_end(gp); /* Clean up the terminal. */ (void)cl_quit(gp); /* * XXX * Reset the O_MESG option. */ if (clp->tgw != TGW_UNKNOWN) (void)cl_omesg(NULL, clp, clp->tgw == TGW_SET); /* * XXX * Reset the X11 xterm icon/window name. */ if (F_ISSET(clp, CL_RENAME)) cl_setname(gp, clp->oname); /* If a killer signal arrived, pretend we just got it. */ if (clp->killersig) { (void)signal(clp->killersig, SIG_DFL); (void)kill(getpid(), clp->killersig); /* NOTREACHED */ } /* Free the global and CL private areas. */ #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) cl_end(clp); free(gp); #endif exit (rval); } /* * cl_init -- * Create and partially initialize the CL structure. */ static CL_PRIVATE * cl_init(WIN *wp) { CL_PRIVATE *clp; int fd; GS *gp; gp = wp->gp; /* Allocate the CL private structure. */ CALLOC_NOMSG(NULL, clp, CL_PRIVATE *, 1, sizeof(CL_PRIVATE)); if (clp == NULL) perr(gp->progname, NULL); gp->cl_private = clp; /* * Set the CL_STDIN_TTY flag. It's purpose is to avoid setting * and resetting the tty if the input isn't from there. We also * use the same test to determine if we're running a script or * not. */ if (isatty(STDIN_FILENO)) F_SET(clp, CL_STDIN_TTY); else F_SET(gp, G_SCRIPTED); /* * We expect that if we've lost our controlling terminal that the * open() (but not the tcgetattr()) will fail. */ if (F_ISSET(clp, CL_STDIN_TTY)) { if (tcgetattr(STDIN_FILENO, &clp->orig) == -1) goto tcfail; } else if ((fd = open(_PATH_TTY, O_RDONLY, 0)) != -1) { if (tcgetattr(fd, &clp->orig) == -1) { tcfail: perr(gp->progname, "tcgetattr"); exit (1); } (void)close(fd); } /* Initialize the list of curses functions. */ cl_func_std(wp); return (clp); } /* * cl_end -- * Discard the CL structure. */ static void cl_end(CL_PRIVATE *clp) { if (clp->oname != NULL) free(clp->oname); free(clp); } /* * term_init -- * Initialize terminal information. */ static void term_init(char *name, char *ttype) { int err; /* Set up the terminal database information. */ setupterm(ttype, STDOUT_FILENO, &err); switch (err) { case -1: (void)fprintf(stderr, "%s: No terminal database found\n", name); exit (1); case 0: (void)fprintf(stderr, "%s: %s: unknown terminal type\n", name, ttype); exit (1); } } #define GLOBAL_CLP \ CL_PRIVATE *clp = GCLP(__global_list); static void h_hup(int signo) { GLOBAL_CLP; F_SET(clp, CL_SIGHUP); clp->killersig = SIGHUP; } static void h_int(int signo) { GLOBAL_CLP; F_SET(clp, CL_SIGINT); } static void h_term(int signo) { GLOBAL_CLP; F_SET(clp, CL_SIGTERM); clp->killersig = SIGTERM; } static void h_winch(int signo) { GLOBAL_CLP; F_SET(clp, CL_SIGWINCH); } #undef GLOBAL_CLP /* * sig_init -- * Initialize signals. * * PUBLIC: int sig_init __P((GS *, SCR *)); */ int sig_init(GS *gp, SCR *sp) { CL_PRIVATE *clp; clp = GCLP(gp); if (sp == NULL) { (void)sigemptyset(&__sigblockset); if (sigaddset(&__sigblockset, SIGHUP) || setsig(SIGHUP, &clp->oact[INDX_HUP], h_hup) || sigaddset(&__sigblockset, SIGINT) || setsig(SIGINT, &clp->oact[INDX_INT], h_int) || sigaddset(&__sigblockset, SIGTERM) || setsig(SIGTERM, &clp->oact[INDX_TERM], h_term) #ifdef SIGWINCH || sigaddset(&__sigblockset, SIGWINCH) || setsig(SIGWINCH, &clp->oact[INDX_WINCH], h_winch) #endif ) { perr(gp->progname, NULL); return (1); } } else if (setsig(SIGHUP, NULL, h_hup) || setsig(SIGINT, NULL, h_int) || setsig(SIGTERM, NULL, h_term) #ifdef SIGWINCH || setsig(SIGWINCH, NULL, h_winch) #endif ) { msgq(sp, M_SYSERR, "signal-reset"); } return (0); } /* * setsig -- * Set a signal handler. */ static int setsig(int signo, struct sigaction *oactp, void (*handler) (int)) { struct sigaction act; /* * Use sigaction(2), not signal(3), since we don't always want to * restart system calls. The example is when waiting for a command * mode keystroke and SIGWINCH arrives. Besides, you can't portably * restart system calls (thanks, POSIX!). On the other hand, you * can't portably NOT restart system calls (thanks, Sun!). SunOS * used SA_INTERRUPT as their extension to NOT restart read calls. * We sure hope nobody else used it for anything else. Mom told me * there'd be days like this. She just never told me that there'd * be so many. */ act.sa_handler = handler; sigemptyset(&act.sa_mask); #ifdef SA_INTERRUPT act.sa_flags = SA_INTERRUPT; #else act.sa_flags = 0; #endif return (sigaction(signo, &act, oactp)); } /* * sig_end -- * End signal setup. */ static void sig_end(GS *gp) { CL_PRIVATE *clp; clp = GCLP(gp); (void)sigaction(SIGHUP, NULL, &clp->oact[INDX_HUP]); (void)sigaction(SIGINT, NULL, &clp->oact[INDX_INT]); (void)sigaction(SIGTERM, NULL, &clp->oact[INDX_TERM]); #ifdef SIGWINCH (void)sigaction(SIGWINCH, NULL, &clp->oact[INDX_WINCH]); #endif } /* * cl_func_std -- * Initialize the standard curses functions. */ static void cl_func_std(WIN *wp) { GS *gp; gp = wp->gp; gp->scr_addstr = cl_addstr; gp->scr_waddstr = cl_waddstr; gp->scr_attr = cl_attr; gp->scr_baud = cl_baud; gp->scr_bell = cl_bell; gp->scr_busy = NULL; gp->scr_child = NULL; gp->scr_clrtoeol = cl_clrtoeol; gp->scr_cursor = cl_cursor; gp->scr_deleteln = cl_deleteln; gp->scr_reply = NULL; gp->scr_discard = cl_discard; gp->scr_event = cl_event; gp->scr_ex_adjust = cl_ex_adjust; gp->scr_fmap = cl_fmap; gp->scr_insertln = cl_insertln; gp->scr_keyval = cl_keyval; gp->scr_move = cl_move; wp->scr_msg = NULL; gp->scr_optchange = cl_optchange; gp->scr_refresh = cl_refresh; gp->scr_rename = cl_rename; gp->scr_screen = cl_screen; gp->scr_split = cl_split; gp->scr_suspend = cl_suspend; gp->scr_usage = cl_usage; } /* * perr -- * Print system error. */ static void perr(char *name, char *msg) { (void)fprintf(stderr, "%s:", name); if (msg != NULL) (void)fprintf(stderr, "%s:", msg); (void)fprintf(stderr, "%s\n", strerror(errno)); exit(1); } nvi-1.81.6/cl/cl_read.c0100644000076400001440000001700410720065506013607 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_read.c,v 10.29 2001/08/18 21:51:59 skimo Exp $ (Berkeley) $Date: 2001/08/18 21:51:59 $"; #endif /* not lint */ #include #include #ifdef HAVE_SYS_SELECT_H #include #endif #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ex/script.h" #include "cl.h" /* Pollution by Solaris curses. */ #undef columns #undef lines static input_t cl_read __P((SCR *, u_int32_t, char *, size_t, int *, struct timeval *)); static int cl_resize __P((SCR *, size_t, size_t)); /* * cl_event -- * Return a single event. * * PUBLIC: int cl_event __P((SCR *, EVENT *, u_int32_t, int)); */ int cl_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms) { struct timeval t, *tp; CL_PRIVATE *clp; size_t lines, columns; int changed, nr; CHAR_T *wp; size_t wlen; int rc; /* * Queue signal based events. We never clear SIGHUP or SIGTERM events, * so that we just keep returning them until the editor dies. */ clp = CLP(sp); retest: if (LF_ISSET(EC_INTERRUPT) || F_ISSET(clp, CL_SIGINT)) { if (F_ISSET(clp, CL_SIGINT)) { F_CLR(clp, CL_SIGINT); evp->e_event = E_INTERRUPT; } else evp->e_event = E_TIMEOUT; return (0); } if (F_ISSET(clp, CL_SIGHUP | CL_SIGTERM | CL_SIGWINCH)) { if (F_ISSET(clp, CL_SIGHUP)) { evp->e_event = E_SIGHUP; return (0); } if (F_ISSET(clp, CL_SIGTERM)) { evp->e_event = E_SIGTERM; return (0); } if (F_ISSET(clp, CL_SIGWINCH)) { F_CLR(clp, CL_SIGWINCH); if (cl_ssize(sp, 1, &lines, &columns, &changed)) return (1); if (changed) { (void)cl_resize(sp, lines, columns); evp->e_event = E_WRESIZE; return (0); } /* No real change, ignore the signal. */ } } /* Set timer. */ if (ms == 0) tp = NULL; else { t.tv_sec = ms / 1000; t.tv_usec = (ms % 1000) * 1000; tp = &t; } /* Read input characters. */ read: switch (cl_read(sp, LF_ISSET(EC_QUOTED | EC_RAW), clp->ibuf + clp->skip, SIZE(clp->ibuf) - clp->skip, &nr, tp)) { case INP_OK: rc = INPUT2INT5(sp, clp->cw, clp->ibuf, nr + clp->skip, wp, wlen); evp->e_csp = wp; evp->e_len = wlen; evp->e_event = E_STRING; if (rc < 0) { int n = -rc; memmove(clp->ibuf, clp->ibuf + nr + clp->skip - n, n); clp->skip = n; if (wlen == 0) goto read; } else if (rc == 0) clp->skip = 0; else msgq(sp, M_ERR, "323|Invalid input. Truncated."); break; case INP_ERR: evp->e_event = E_ERR; break; case INP_EOF: evp->e_event = E_EOF; break; case INP_INTR: goto retest; case INP_TIMEOUT: evp->e_event = E_TIMEOUT; break; default: abort(); } return (0); } /* * cl_read -- * Read characters from the input. */ static input_t cl_read(SCR *sp, u_int32_t flags, char *bp, size_t blen, int *nrp, struct timeval *tp) { struct termios term1, term2; struct timeval poll; CL_PRIVATE *clp; GS *gp; SCR *tsp; fd_set rdfd; input_t rval; int maxfd, nr, term_reset; gp = sp->gp; clp = CLP(sp); term_reset = 0; /* * 1: A read from a file or a pipe. In this case, the reads * never timeout regardless. This means that we can hang * when trying to complete a map, but we're going to hang * on the next read anyway. */ if (!F_ISSET(clp, CL_STDIN_TTY)) { switch (nr = read(STDIN_FILENO, bp, blen)) { case 0: return (INP_EOF); case -1: goto err; default: *nrp = nr; return (INP_OK); } /* NOTREACHED */ } /* * 2: A read with an associated timeout, e.g., trying to complete * a map sequence. If input exists, we fall into #3. */ FD_ZERO(&rdfd); poll.tv_sec = 0; poll.tv_usec = 0; if (tp != NULL) { FD_SET(STDIN_FILENO, &rdfd); switch (select(STDIN_FILENO + 1, &rdfd, NULL, NULL, tp == NULL ? &poll : tp)) { case 0: return (INP_TIMEOUT); case -1: goto err; default: break; } } /* * The user can enter a key in the editor to quote a character. If we * get here and the next key is supposed to be quoted, do what we can. * Reset the tty so that the user can enter a ^C, ^Q, ^S. There's an * obvious race here, when the key has already been entered, but there's * nothing that we can do to fix that problem. * * The editor can ask for the next literal character even thought it's * generally running in line-at-a-time mode. Do what we can. */ if (LF_ISSET(EC_QUOTED | EC_RAW) && !tcgetattr(STDIN_FILENO, &term1)) { term_reset = 1; if (LF_ISSET(EC_QUOTED)) { term2 = term1; term2.c_lflag &= ~ISIG; term2.c_iflag &= ~(IXON | IXOFF); (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &term2); } else (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->vi_enter); } /* * 3: Wait for input. * * Select on the command input and scripting window file descriptors. * It's ugly that we wait on scripting file descriptors here, but it's * the only way to keep from locking out scripting windows. */ if (F_ISSET(gp, G_SCRWIN)) { FD_ZERO(&rdfd); FD_SET(STDIN_FILENO, &rdfd); maxfd = STDIN_FILENO; if (sscr_check_input(sp, &rdfd, maxfd)) goto err; } /* * 4: Read the input. * * !!! * What's going on here is some scary stuff. Ex runs the terminal in * canonical mode. So, the character terminating a line of * input is returned in the buffer, but a trailing character is * not similarly included. As ex uses 0 and ^ as autoindent * commands, it has to see the trailing characters to determine * the difference between the user entering "0ab" and "0ab". We * leave an extra slot in the buffer, so that we can add a trailing * character if the buffer isn't terminated by a . We * lose if the buffer is too small for the line and exactly N characters * are entered followed by an character. */ #define ONE_FOR_EOF 1 switch (nr = read(STDIN_FILENO, bp, blen - ONE_FOR_EOF)) { case 0: /* EOF. */ /* * ^D in canonical mode returns a read of 0, i.e. EOF. EOF is * a valid command, but we don't want to loop forever because * the terminal driver is returning EOF because the user has * disconnected. The editor will almost certainly try to write * something before this fires, which should kill us, but You * Never Know. */ if (++clp->eof_count < 50) { bp[0] = clp->orig.c_cc[VEOF]; *nrp = 1; rval = INP_OK; } else rval = INP_EOF; break; case -1: /* Error or interrupt. */ err: if (errno == EINTR) rval = INP_INTR; else { rval = INP_ERR; msgq(sp, M_SYSERR, "input"); } break; default: /* Input characters. */ if (F_ISSET(sp, SC_EX) && bp[nr - 1] != '\n') bp[nr++] = clp->orig.c_cc[VEOF]; *nrp = nr; clp->eof_count = 0; rval = INP_OK; break; } /* Restore the terminal state if it was modified. */ if (term_reset) (void)tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &term1); return (rval); } /* * cl_resize -- * Reset the options for a resize event. */ static int cl_resize(SCR *sp, size_t lines, size_t columns) { int rval; rval = api_opts_set(sp, L("lines"), NULL, lines, 0); if (api_opts_set(sp, L("columns"), NULL, columns, 0)) rval = 1; return (rval); } nvi-1.81.6/cl/cl_screen.c0100644000076400001440000003426010720065506014156 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_screen.c,v 10.56 2002/05/03 19:59:44 skimo Exp $ (Berkeley) $Date: 2002/05/03 19:59:44 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "cl.h" static int cl_ex_end __P((GS *)); static int cl_ex_init __P((SCR *)); static void cl_freecap __P((CL_PRIVATE *)); static int cl_vi_end __P((GS *)); static int cl_vi_init __P((SCR *)); static int cl_putenv __P((SCR *sp, char *, char *, u_long)); /* * cl_screen -- * Switch screen types. * * PUBLIC: int cl_screen __P((SCR *, u_int32_t)); */ int cl_screen(SCR *sp, u_int32_t flags) { CL_PRIVATE *clp; WINDOW *win; GS *gp; gp = sp->gp; clp = CLP(sp); win = CLSP(sp) ? CLSP(sp) : stdscr; /* See if the current information is incorrect. */ if (F_ISSET(gp, G_SRESTART)) { if (CLSP(sp)) { delwin(CLSP(sp)); sp->cl_private = NULL; } if (cl_quit(gp)) return (1); F_CLR(gp, G_SRESTART); } /* See if we're already in the right mode. */ if ((LF_ISSET(SC_EX) && F_ISSET(sp, SC_SCR_EX)) || (LF_ISSET(SC_VI) && F_ISSET(sp, SC_SCR_VI))) return (0); /* * Fake leaving ex mode. * * We don't actually exit ex or vi mode unless forced (e.g. by a window * size change). This is because many curses implementations can't be * called twice in a single program. Plus, it's faster. If the editor * "leaves" vi to enter ex, when it exits ex we'll just fall back into * vi. */ if (F_ISSET(sp, SC_SCR_EX)) F_CLR(sp, SC_SCR_EX); /* * Fake leaving vi mode. * * Clear out the rest of the screen if we're in the middle of a split * screen. Move to the last line in the current screen -- this makes * terminal scrolling happen naturally. Note: *don't* move past the * end of the screen, as there are ex commands (e.g., :read ! cat file) * that don't want to. Don't clear the info line, its contents may be * valid, e.g. :file|append. */ if (F_ISSET(sp, SC_SCR_VI)) { F_CLR(sp, SC_SCR_VI); if (sp->q.cqe_next != (void *)&sp->wp->scrq) { (void)wmove(win, RLNO(sp, sp->rows), 0); wclrtobot(win); } (void)wmove(win, RLNO(sp, sp->rows) - 1, 0); wrefresh(win); } /* Enter the requested mode. */ if (LF_ISSET(SC_EX)) { if (cl_ex_init(sp)) return (1); F_SET(clp, CL_IN_EX | CL_SCR_EX_INIT); /* * If doing an ex screen for ex mode, move to the last line * on the screen. */ if (F_ISSET(sp, SC_EX) && clp->cup != NULL) tputs(tgoto(clp->cup, 0, O_VAL(sp, O_LINES) - 1), 1, cl_putchar); } else { if (cl_vi_init(sp)) return (1); F_CLR(clp, CL_IN_EX); F_SET(clp, CL_SCR_VI_INIT); } return (0); } /* * cl_quit -- * Shutdown the screens. * * PUBLIC: int cl_quit __P((GS *)); */ int cl_quit(GS *gp) { CL_PRIVATE *clp; int rval; rval = 0; clp = GCLP(gp); /* * If we weren't really running, ignore it. This happens if the * screen changes size before we've called curses. */ if (!F_ISSET(clp, CL_SCR_EX_INIT | CL_SCR_VI_INIT)) return (0); /* Clean up the terminal mappings. */ if (cl_term_end(gp)) rval = 1; /* Really leave vi mode. */ if (F_ISSET(clp, CL_STDIN_TTY) && F_ISSET(clp, CL_SCR_VI_INIT) && cl_vi_end(gp)) rval = 1; /* Really leave ex mode. */ if (F_ISSET(clp, CL_STDIN_TTY) && F_ISSET(clp, CL_SCR_EX_INIT) && cl_ex_end(gp)) rval = 1; /* * If we were running ex when we quit, or we're using an implementation * of curses where endwin() doesn't get this right, restore the original * terminal modes. * * XXX * We always do this because it's too hard to figure out what curses * implementations get it wrong. It may discard type-ahead characters * from the tty queue. */ (void)tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->orig); F_CLR(clp, CL_SCR_EX_INIT | CL_SCR_VI_INIT); return (rval); } /* * cl_vi_init -- * Initialize the curses vi screen. */ static int cl_vi_init(SCR *sp) { CL_PRIVATE *clp; GS *gp; char *o_cols, *o_lines, *o_term, *ttype; gp = sp->gp; clp = CLP(sp); /* If already initialized, just set the terminal modes. */ if (F_ISSET(clp, CL_SCR_VI_INIT)) goto fast; /* Curses vi always reads from (and writes to) a terminal. */ if (!F_ISSET(clp, CL_STDIN_TTY) || !isatty(STDOUT_FILENO)) { msgq(sp, M_ERR, "016|Vi's standard input and output must be a terminal"); return (1); } /* We'll need a terminal type. */ if (opts_empty(sp, O_TERM, 0)) return (1); ttype = O_STR(sp, O_TERM); /* * XXX * Changing the row/column and terminal values is done by putting them * into the environment, which is then read by curses. What this loses * in ugliness, it makes up for in stupidity. We can't simply put the * values into the environment ourselves, because in the presence of a * kernel mechanism for returning the window size, entering values into * the environment will screw up future screen resizing events, e.g. if * the user enters a :shell command and then resizes their window. So, * if they weren't already in the environment, we make sure to delete * them immediately after setting them. * * XXX * Putting the TERM variable into the environment is necessary, even * though we're using newterm() here. We may be using initscr() as * the underlying function. */ o_term = getenv("TERM"); cl_putenv(sp, "TERM", ttype, 0); o_lines = getenv("LINES"); cl_putenv(sp, "LINES", NULL, (u_long)O_VAL(sp, O_LINES)); o_cols = getenv("COLUMNS"); cl_putenv(sp, "COLUMNS", NULL, (u_long)O_VAL(sp, O_COLUMNS)); /* * We don't care about the SCREEN reference returned by newterm, we * never have more than one SCREEN at a time. * * XXX * The SunOS initscr() can't be called twice. Don't even think about * using it. It fails in subtle ways (e.g. select(2) on fileno(stdin) * stops working). (The SVID notes that applications should only call * initscr() once.) * * XXX * The HP/UX newterm doesn't support the NULL first argument, so we * have to specify the terminal type. */ errno = 0; if (newterm(ttype, stdout, stdin) == NULL) { if (errno) msgq(sp, M_SYSERR, "%s", ttype); else msgq(sp, M_ERR, "%s: unknown terminal type", ttype); return (1); } if (o_term == NULL) cl_unsetenv(sp, "TERM"); if (o_lines == NULL) cl_unsetenv(sp, "LINES"); if (o_cols == NULL) cl_unsetenv(sp, "COLUMNS"); /* * XXX * Someone got let out alone without adult supervision -- the SunOS * newterm resets the signal handlers. There's a race, but it's not * worth closing. */ (void)sig_init(sp->gp, sp); /* * We use raw mode. What we want is 8-bit clean, however, signals * and flow control should continue to work. Admittedly, it sounds * like cbreak, but it isn't. Using cbreak() can get you additional * things like IEXTEN, which turns on flags like DISCARD and LNEXT. * * !!! * If raw isn't turning off echo and newlines, something's wrong. * However, it shouldn't hurt. */ noecho(); /* No character echo. */ nonl(); /* No CR/NL translation. */ raw(); /* 8-bit clean. */ idlok(stdscr, 1); /* Use hardware insert/delete line. */ /* Put the cursor keys into application mode. */ (void)keypad(stdscr, TRUE); /* * XXX * The screen TI sequence just got sent. See the comment in * cl_funcs.c:cl_attr(). */ clp->ti_te = TI_SENT; /* * XXX * Historic implementations of curses handled SIGTSTP signals * in one of three ways. They either: * * 1: Set their own handler, regardless. * 2: Did not set a handler if a handler was already installed. * 3: Set their own handler, but then called any previously set * handler after completing their own cleanup. * * We don't try and figure out which behavior is in place, we force * it to SIG_DFL after initializing the curses interface, which means * that curses isn't going to take the signal. Since curses isn't * reentrant (i.e., the whole curses SIGTSTP interface is a fantasy), * we're doing The Right Thing. */ (void)signal(SIGTSTP, SIG_DFL); /* * If flow control was on, turn it back on. Turn signals on. ISIG * turns on VINTR, VQUIT, VDSUSP and VSUSP. The main curses code * already installed a handler for VINTR. We're going to disable the * other three. * * XXX * We want to use ^Y as a vi scrolling command. If the user has the * DSUSP character set to ^Y (common practice) clean it up. As it's * equally possible that the user has VDSUSP set to 'a', we disable * it regardless. It doesn't make much sense to suspend vi at read, * so I don't think anyone will care. Alternatively, we could look * it up in the table of legal command characters and turn it off if * it matches one. VDSUSP wasn't in POSIX 1003.1-1990, so we test for * it. * * XXX * We don't check to see if the user had signals enabled originally. * If they didn't, it's unclear what we're supposed to do here, but * it's also pretty unlikely. */ if (tcgetattr(STDIN_FILENO, &clp->vi_enter)) { msgq(sp, M_SYSERR, "tcgetattr"); goto err; } if (clp->orig.c_iflag & IXON) clp->vi_enter.c_iflag |= IXON; if (clp->orig.c_iflag & IXOFF) clp->vi_enter.c_iflag |= IXOFF; clp->vi_enter.c_lflag |= ISIG; #ifdef VDSUSP clp->vi_enter.c_cc[VDSUSP] = _POSIX_VDISABLE; #endif clp->vi_enter.c_cc[VQUIT] = _POSIX_VDISABLE; clp->vi_enter.c_cc[VSUSP] = _POSIX_VDISABLE; /* * XXX * OSF/1 doesn't turn off the , or * characters when curses switches into raw mode. It should be OK * to do it explicitly for everyone. */ #ifdef VDISCARD clp->vi_enter.c_cc[VDISCARD] = _POSIX_VDISABLE; #endif #ifdef VLNEXT clp->vi_enter.c_cc[VLNEXT] = _POSIX_VDISABLE; #endif #ifdef VSTATUS clp->vi_enter.c_cc[VSTATUS] = _POSIX_VDISABLE; #endif /* Initialize terminal based information. */ if (cl_term_init(sp)) goto err; fast: /* Set the terminal modes. */ if (tcsetattr(STDIN_FILENO, TCSASOFT | TCSADRAIN, &clp->vi_enter)) { if (errno == EINTR) goto fast; msgq(sp, M_SYSERR, "tcsetattr"); err: (void)cl_vi_end(sp->gp); return (1); } return (0); } /* * cl_vi_end -- * Shutdown the vi screen. */ static int cl_vi_end(GS *gp) { CL_PRIVATE *clp; clp = GCLP(gp); /* Restore the cursor keys to normal mode. */ (void)keypad(stdscr, FALSE); /* * If we were running vi when we quit, scroll the screen up a single * line so we don't lose any information. * * Move to the bottom of the window (some endwin implementations don't * do this for you). */ if (!F_ISSET(clp, CL_IN_EX)) { (void)move(0, 0); (void)deleteln(); (void)move(LINES - 1, 0); (void)refresh(); } cl_freecap(clp); /* End curses window. */ (void)endwin(); /* * XXX * The screen TE sequence just got sent. See the comment in * cl_funcs.c:cl_attr(). */ clp->ti_te = TE_SENT; return (0); } /* * cl_ex_init -- * Initialize the ex screen. */ static int cl_ex_init(SCR *sp) { CL_PRIVATE *clp; clp = CLP(sp); /* If already initialized, just set the terminal modes. */ if (F_ISSET(clp, CL_SCR_EX_INIT)) goto fast; /* If not reading from a file, we're done. */ if (!F_ISSET(clp, CL_STDIN_TTY)) return (0); /* Get the ex termcap/terminfo strings. */ (void)cl_getcap(sp, "cup", &clp->cup); (void)cl_getcap(sp, "smso", &clp->smso); (void)cl_getcap(sp, "rmso", &clp->rmso); (void)cl_getcap(sp, "el", &clp->el); (void)cl_getcap(sp, "cuu1", &clp->cuu1); /* Enter_standout_mode and exit_standout_mode are paired. */ if (clp->smso == NULL || clp->rmso == NULL) { if (clp->smso != NULL) { free(clp->smso); clp->smso = NULL; } if (clp->rmso != NULL) { free(clp->rmso); clp->rmso = NULL; } } /* * Turn on canonical mode, with normal input and output processing. * Start with the original terminal settings as the user probably * had them (including any local extensions) set correctly for the * current terminal. * * !!! * We can't get everything that we need portably; for example, ONLCR, * mapping to on output isn't required * by POSIX 1003.1b-1993. If this turns out to be a problem, then * we'll either have to play some games on the mapping, or we'll have * to make all ex printf's output \r\n instead of \n. */ clp->ex_enter = clp->orig; clp->ex_enter.c_lflag |= ECHO | ECHOE | ECHOK | ICANON | IEXTEN | ISIG; #ifdef ECHOCTL clp->ex_enter.c_lflag |= ECHOCTL; #endif #ifdef ECHOKE clp->ex_enter.c_lflag |= ECHOKE; #endif clp->ex_enter.c_iflag |= ICRNL; clp->ex_enter.c_oflag |= OPOST; #ifdef ONLCR clp->ex_enter.c_oflag |= ONLCR; #endif fast: if (tcsetattr(STDIN_FILENO, TCSADRAIN | TCSASOFT, &clp->ex_enter)) { if (errno == EINTR) goto fast; msgq(sp, M_SYSERR, "tcsetattr"); return (1); } return (0); } /* * cl_ex_end -- * Shutdown the ex screen. */ static int cl_ex_end(GS *gp) { CL_PRIVATE *clp; clp = GCLP(gp); cl_freecap(clp); return (0); } /* * cl_getcap -- * Retrieve termcap/terminfo strings. * * PUBLIC: int cl_getcap __P((SCR *, char *, char **)); */ int cl_getcap(SCR *sp, char *name, char **elementp) { size_t len; char *t; if ((t = tigetstr(name)) != NULL && t != (char *)-1 && (len = strlen(t)) != 0) { MALLOC_RET(sp, *elementp, char *, len + 1); memmove(*elementp, t, len + 1); } return (0); } /* * cl_freecap -- * Free any allocated termcap/terminfo strings. */ static void cl_freecap(CL_PRIVATE *clp) { if (clp->el != NULL) { free(clp->el); clp->el = NULL; } if (clp->cup != NULL) { free(clp->cup); clp->cup = NULL; } if (clp->cuu1 != NULL) { free(clp->cuu1); clp->cuu1 = NULL; } if (clp->rmso != NULL) { free(clp->rmso); clp->rmso = NULL; } if (clp->smso != NULL) { free(clp->smso); clp->smso = NULL; } } /* * cl_putenv -- * Put a value into the environment. */ static int cl_putenv(SCR *sp, char *name, char *str, u_long value) { char buf[40]; if (str == NULL) { (void)snprintf(buf, sizeof(buf), "%lu", value); return (cl_setenv(sp, name, buf)); } else return (cl_setenv(sp, name, str)); } nvi-1.81.6/cl/cl_term.c0100644000076400001440000002661510720065506013653 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cl_term.c,v 10.31 2001/07/08 13:06:56 skimo Exp $ (Berkeley) $Date: 2001/07/08 13:06:56 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "cl.h" static int cl_pfmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); /* * XXX * THIS REQUIRES THAT ALL SCREENS SHARE A TERMINAL TYPE. */ typedef struct _tklist { char *ts; /* Key's termcap string. */ char *output; /* Corresponding vi command. */ char *name; /* Name. */ u_char value; /* Special value (for lookup). */ } TKLIST; static TKLIST const c_tklist[] = { /* Command mappings. */ {"kil1", "O", "insert line"}, {"kdch1", "x", "delete character"}, {"kcud1", "j", "cursor down"}, {"kel", "D", "delete to eol"}, {"kind", "\004", "scroll down"}, /* ^D */ {"kll", "$", "go to eol"}, {"kend", "$", "go to eol"}, {"khome", "^", "go to sol"}, {"kich1", "i", "insert at cursor"}, {"kdl1", "dd", "delete line"}, {"kcub1", "h", "cursor left"}, {"knp", "\006", "page down"}, /* ^F */ {"kpp", "\002", "page up"}, /* ^B */ {"kri", "\025", "scroll up"}, /* ^U */ {"ked", "dG", "delete to end of screen"}, {"kcuf1", "l", "cursor right"}, {"kcuu1", "k", "cursor up"}, {NULL}, }; static TKLIST const m1_tklist[] = { /* Input mappings (lookup). */ {NULL}, }; static TKLIST const m2_tklist[] = { /* Input mappings (set or delete). */ {"kcud1", "\033ja", "cursor down"}, /* ^[ja */ {"kcub1", "\033ha", "cursor left"}, /* ^[ha */ {"kcuu1", "\033ka", "cursor up"}, /* ^[ka */ {"kcuf1", "\033la", "cursor right"}, /* ^[la */ {NULL}, }; /* * cl_term_init -- * Initialize the special keys defined by the termcap/terminfo entry. * * PUBLIC: int cl_term_init __P((SCR *)); */ int cl_term_init(SCR *sp) { KEYLIST *kp; SEQ *qp; TKLIST const *tkp; char *t; CHAR_T name[60]; CHAR_T output[5]; CHAR_T ts[20]; CHAR_T *wp; size_t wlen; /* Command mappings. */ for (tkp = c_tklist; tkp->name != NULL; ++tkp) { if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) continue; CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); MEMCPYW(name, wp, wlen); CHAR2INT(sp, t, strlen(t), wp, wlen); MEMCPYW(ts, wp, wlen); CHAR2INT(sp, tkp->output, strlen(tkp->output), wp, wlen); MEMCPYW(output, wp, wlen); if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), output, strlen(tkp->output), SEQ_COMMAND, SEQ_NOOVERWRITE | SEQ_SCREEN)) return (1); } /* Input mappings needing to be looked up. */ for (tkp = m1_tklist; tkp->name != NULL; ++tkp) { if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) continue; for (kp = keylist;; ++kp) if (kp->value == tkp->value) break; if (kp == NULL) continue; CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); MEMCPYW(name, wp, wlen); CHAR2INT(sp, t, strlen(t), wp, wlen); MEMCPYW(ts, wp, wlen); if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), &kp->ch, 1, SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) return (1); } /* Input mappings that are already set or are text deletions. */ for (tkp = m2_tklist; tkp->name != NULL; ++tkp) { if ((t = tigetstr(tkp->ts)) == NULL || t == (char *)-1) continue; /* * !!! * Some terminals' keys send single * characters. This is okay in command mapping, but not okay * in input mapping. That combination is the only one we'll * ever see, hopefully, so kluge it here for now. */ if (!strcmp(t, "\b")) continue; if (tkp->output == NULL) { CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); MEMCPYW(name, wp, wlen); CHAR2INT(sp, t, strlen(t), wp, wlen); MEMCPYW(ts, wp, wlen); if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), NULL, 0, SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) return (1); } else { CHAR2INT(sp, tkp->name, strlen(tkp->name), wp, wlen); MEMCPYW(name, wp, wlen); CHAR2INT(sp, t, strlen(t), wp, wlen); MEMCPYW(ts, wp, wlen); CHAR2INT(sp, tkp->output, strlen(tkp->output), wp, wlen); MEMCPYW(output, wp, wlen); if (seq_set(sp, name, strlen(tkp->name), ts, strlen(t), output, strlen(tkp->output), SEQ_INPUT, SEQ_NOOVERWRITE | SEQ_SCREEN)) return (1); } } /* * Rework any function key mappings that were set before the * screen was initialized. */ for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) if (F_ISSET(qp, SEQ_FUNCMAP)) (void)cl_pfmap(sp, qp->stype, qp->input, qp->ilen, qp->output, qp->olen); return (0); } /* * cl_term_end -- * End the special keys defined by the termcap/terminfo entry. * * PUBLIC: int cl_term_end __P((GS *)); */ int cl_term_end(GS *gp) { SEQ *qp, *nqp; /* Delete screen specific mappings. */ for (qp = gp->seqq.lh_first; qp != NULL; qp = nqp) { nqp = qp->q.le_next; if (F_ISSET(qp, SEQ_SCREEN)) (void)seq_mdel(qp); } return (0); } /* * cl_fmap -- * Map a function key. * * PUBLIC: int cl_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); */ int cl_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) { /* Ignore until the screen is running, do the real work then. */ if (F_ISSET(sp, SC_VI) && !F_ISSET(sp, SC_SCR_VI)) return (0); if (F_ISSET(sp, SC_EX) && !F_ISSET(sp, SC_SCR_EX)) return (0); return (cl_pfmap(sp, stype, from, flen, to, tlen)); } /* * cl_pfmap -- * Map a function key (private version). */ static int cl_pfmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) { size_t nlen; char *p; char name[64]; CHAR_T keyname[64]; CHAR_T ts[20]; CHAR_T *wp; size_t wlen; (void)snprintf(name, sizeof(name), "kf%d", (int)STRTOL(from+1,NULL,10)); if ((p = tigetstr(name)) == NULL || p == (char *)-1 || strlen(p) == 0) p = NULL; if (p == NULL) { msgq_wstr(sp, M_ERR, from, "233|This terminal has no %s key"); return (1); } nlen = SPRINTF(keyname, SIZE(keyname), L("function key %d"), (int)STRTOL(from+1,NULL,10)); CHAR2INT(sp, p, strlen(p), wp, wlen); MEMCPYW(ts, wp, wlen); return (seq_set(sp, keyname, nlen, ts, strlen(p), to, tlen, stype, SEQ_NOOVERWRITE | SEQ_SCREEN)); } /* * cl_optchange -- * Curses screen specific "option changed" routine. * * PUBLIC: int cl_optchange __P((SCR *, int, char *, u_long *)); */ int cl_optchange(SCR *sp, int opt, char *str, u_long *valp) { CL_PRIVATE *clp; clp = CLP(sp); switch (opt) { case O_COLUMNS: case O_LINES: case O_TERM: /* * Changing the columns, lines or terminal require that * we restart the screen. */ F_SET(sp->gp, G_SRESTART); F_CLR(sp, SC_SCR_EX | SC_SCR_VI); break; case O_MESG: (void)cl_omesg(sp, clp, *valp); break; case O_WINDOWNAME: if (*valp) { F_SET(clp, CL_RENAME_OK); /* * If the screen is live, i.e. we're not reading the * .exrc file, update the window. */ if (sp->frp != NULL && sp->frp->name != NULL) (void)cl_rename(sp, sp->frp->name, 1); } else { F_CLR(clp, CL_RENAME_OK); (void)cl_rename(sp, NULL, 0); } break; } return (0); } /* * cl_omesg -- * Turn the tty write permission on or off. * * PUBLIC: int cl_omesg __P((SCR *, CL_PRIVATE *, int)); */ int cl_omesg(SCR *sp, CL_PRIVATE *clp, int on) { struct stat sb; char *tty; /* Find the tty, get the current permissions. */ if ((tty = ttyname(STDERR_FILENO)) == NULL) { if (sp != NULL) msgq(sp, M_SYSERR, "stderr"); return (1); } if (stat(tty, &sb) < 0) { if (sp != NULL) msgq(sp, M_SYSERR, "%s", tty); return (1); } /* Save the original status if it's unknown. */ if (clp->tgw == TGW_UNKNOWN) clp->tgw = sb.st_mode & S_IWGRP ? TGW_SET : TGW_UNSET; /* Toggle the permissions. */ if (on) { if (chmod(tty, sb.st_mode | S_IWGRP) < 0) { if (sp != NULL) msgq(sp, M_SYSERR, "046|messages not turned on: %s", tty); return (1); } } else if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) { if (sp != NULL) msgq(sp, M_SYSERR, "045|messages not turned off: %s", tty); return (1); } return (0); } /* * cl_ssize -- * Return the terminal size. * * PUBLIC: int cl_ssize __P((SCR *, int, size_t *, size_t *, int *)); */ int cl_ssize(SCR *sp, int sigwinch, size_t *rowp, size_t *colp, int *changedp) { #ifdef TIOCGWINSZ struct winsize win; #endif size_t col, row; int rval; char *p; /* Assume it's changed. */ if (changedp != NULL) *changedp = 1; /* * !!! * sp may be NULL. * * Get the screen rows and columns. If the values are wrong, it's * not a big deal -- as soon as the user sets them explicitly the * environment will be set and the screen package will use the new * values. * * Try TIOCGWINSZ. */ row = col = 0; #ifdef TIOCGWINSZ if (ioctl(STDERR_FILENO, TIOCGWINSZ, &win) != -1) { row = win.ws_row; col = win.ws_col; } #endif /* If here because of suspend or a signal, only trust TIOCGWINSZ. */ if (sigwinch) { /* * Somebody didn't get TIOCGWINSZ right, or has suspend * without window resizing support. The user just lost, * but there's nothing we can do. */ if (row == 0 || col == 0) { if (changedp != NULL) *changedp = 0; return (0); } /* * SunOS systems deliver SIGWINCH when windows are uncovered * as well as when they change size. In addition, we call * here when continuing after being suspended since the window * may have changed size. Since we don't want to background * all of the screens just because the window was uncovered, * ignore the signal if there's no change. */ if (sp != NULL && row == O_VAL(sp, O_LINES) && col == O_VAL(sp, O_COLUMNS)) { if (changedp != NULL) *changedp = 0; return (0); } if (rowp != NULL) *rowp = row; if (colp != NULL) *colp = col; return (0); } /* * !!! * If TIOCGWINSZ failed, or had entries of 0, try termcap. This * routine is called before any termcap or terminal information * has been set up. If there's no TERM environmental variable set, * let it go, at least ex can run. */ if (row == 0 || col == 0) { if ((p = getenv("TERM")) == NULL) goto noterm; if (row == 0) if ((rval = tigetnum("lines")) < 0) msgq(sp, M_SYSERR, "tigetnum: lines"); else row = rval; if (col == 0) if ((rval = tigetnum("cols")) < 0) msgq(sp, M_SYSERR, "tigetnum: cols"); else col = rval; } /* If nothing else, well, it's probably a VT100. */ noterm: if (row == 0) row = 24; if (col == 0) col = 80; /* * !!! * POSIX 1003.2 requires the environment to override everything. * Often, people can get nvi to stop messing up their screen by * deleting the LINES and COLUMNS environment variables from their * dot-files. */ if ((p = getenv("LINES")) != NULL) row = strtol(p, NULL, 10); if ((p = getenv("COLUMNS")) != NULL) col = strtol(p, NULL, 10); if (rowp != NULL) *rowp = row; if (colp != NULL) *colp = col; return (0); } /* * cl_putchar -- * Function version of putchar, for tputs. * * PUBLIC: int cl_putchar __P((int)); */ int cl_putchar(int ch) { return (putchar(ch)); } nvi-1.81.6/cl/extern.h0100444000076400001440000000362210720065712013526 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ #ifndef HAVE_CURSES_WADDNSTR int waddnstr __P((WINDOW*, char *, int)); #endif #ifndef HAVE_CURSES_BEEP void beep __P((void)); #endif #ifndef HAVE_CURSES_FLASH void flash __P((void)); #endif #ifndef HAVE_CURSES_IDLOK void idlok __P((WINDOW *, int)); #endif #ifndef HAVE_CURSES_KEYPAD int keypad __P((void *, int)); #endif #ifndef HAVE_CURSES_NEWTERM void *newterm __P((const char *, FILE *, FILE *)); #endif #ifndef HAVE_CURSES_SETUPTERM void setupterm __P((char *, int, int *)); #endif #ifdef HAVE_CURSES_TIGETSTR char *tigetstr(); #else char *tigetstr __P((char *)); #endif #ifndef HAVE_CURSES_TIGETSTR int tigetnum __P((char *)); #endif int cl_waddstr __P((SCR *, const CHAR_T *, size_t)); int cl_addstr __P((SCR *, const char *, size_t)); int cl_attr __P((SCR *, scr_attr_t, int)); int cl_baud __P((SCR *, u_long *)); int cl_bell __P((SCR *)); int cl_clrtoeol __P((SCR *)); int cl_cursor __P((SCR *, size_t *, size_t *)); int cl_deleteln __P((SCR *)); int cl_discard __P((SCR *, SCR **)); int cl_ex_adjust __P((SCR *, exadj_t)); int cl_insertln __P((SCR *)); int cl_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *)); int cl_move __P((SCR *, size_t, size_t)); int cl_refresh __P((SCR *, int)); int cl_rename __P((SCR *, char *, int)); void cl_setname __P((GS *, char *)); int cl_split __P((SCR *, SCR *)); int cl_suspend __P((SCR *, int *)); void cl_usage __P((void)); int sig_init __P((GS *, SCR *)); int cl_event __P((SCR *, EVENT *, u_int32_t, int)); int cl_screen __P((SCR *, u_int32_t)); int cl_quit __P((GS *)); int cl_getcap __P((SCR *, char *, char **)); int cl_term_init __P((SCR *)); int cl_term_end __P((GS *)); int cl_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); int cl_optchange __P((SCR *, int, char *, u_long *)); int cl_omesg __P((SCR *, CL_PRIVATE *, int)); int cl_ssize __P((SCR *, int, size_t *, size_t *, int *)); int cl_putchar __P((int)); nvi-1.81.6/clib/0040755000076400001440000000000010720065506012366 5ustar skimousersnvi-1.81.6/clib/bsearch.c0100644000076400001440000000673410720065506014150 0ustar skimousers/* * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include "port.h" /* * Perform a binary search. * * The code below is a bit sneaky. After a comparison fails, we * divide the work in half by moving either left or right. If lim * is odd, moving left simply involves halving lim: e.g., when lim * is 5 we look at item 2, so we change lim to 2 so that we will * look at items 0 & 1. If lim is even, the same applies. If lim * is odd, moving right again involes halving lim, this time moving * the base up one item past p: e.g., when lim is 5 we change base * to item 3 and make lim 2 so that we will look at items 3 and 4. * If lim is even, however, we have to shrink it by one before * halving: e.g., when lim is 4, we still looked at item 2, so we * have to make lim 3, then halve, obtaining 1, so that we will only * look at item 3. * * PUBLIC: #ifndef HAVE_BSEARCH * PUBLIC: void *bsearch __P((const void *, const void *, size_t, * PUBLIC: size_t, int (*)(const void *, const void *))); * PUBLIC: #endif */ void * bsearch(register const void *key, const void *base0, size_t nmemb, register size_t size, register int (*compar) (const void *, const void *)) { register const char *base = base0; register size_t lim; register int cmp; register const void *p; for (lim = nmemb; lim != 0; lim >>= 1) { p = base + (lim >> 1) * size; cmp = (*compar)(key, p); if (cmp == 0) return ((void *)p); if (cmp > 0) { /* key > p: move right */ base = (char *)p + size; lim--; } /* else move left */ } return (NULL); } nvi-1.81.6/clib/env.c0100644000076400001440000001152710720065506013325 0ustar skimousers/* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)getenv.c 8.1 (Berkeley) 6/4/93"; static const char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include /* * __findenv -- * Returns pointer to value associated with name, if any, else NULL. * Sets offset to be the offset of the name/value combination in the * environmental array, for use by setenv(3) and unsetenv(3). * Explicitly removes '=' in argument name. * * This routine *should* be a static; don't use it. */ static char * __findenv(register char *name, int *offset) { extern char **environ; register int len; register char *np; register char **p, *c; if (name == NULL || environ == NULL) return (NULL); for (np = name; *np && *np != '='; ++np) continue; len = np - name; for (p = environ; (c = *p) != NULL; ++p) if (strncmp(c, name, len) == 0 && c[len] == '=') { *offset = p - environ; return (c + len + 1); } return (NULL); } #ifndef HAVE_SETENV /* * setenv -- * Set the value of the environmental variable "name" to be * "value". If rewrite is set, replace any current value. * * PUBLIC: #ifndef HAVE_SETENV * PUBLIC: int setenv __P((const char *, const char *, int)); * PUBLIC: #endif */ setenv(name, value, rewrite) register char *name; register char *value; int rewrite; { extern char **environ; static int alloced; /* if allocated space before */ register char *c; int l_value, offset; if (*value == '=') /* no `=' in value */ ++value; l_value = strlen(value); if ((c = __findenv(name, &offset))) { /* find if already exists */ if (!rewrite) return (0); if (strlen(c) >= l_value) { /* old larger; copy over */ while (*c++ = *value++); return (0); } } else { /* create new slot */ register int cnt; register char **p; for (p = environ, cnt = 0; *p; ++p, ++cnt); if (alloced) { /* just increase size */ environ = (char **)realloc((char *)environ, (size_t)(sizeof(char *) * (cnt + 2))); if (!environ) return (-1); } else { /* get new space */ alloced = 1; /* copy old entries into it */ p = malloc((size_t)(sizeof(char *) * (cnt + 2))); if (!p) return (-1); memmove(p, environ, cnt * sizeof(char *)); environ = p; } environ[cnt + 1] = NULL; offset = cnt; } for (c = (char *)name; *c && *c != '='; ++c); /* no `=' in name */ if (!(environ[offset] = /* name + `=' + value */ malloc((size_t)((int)(c - name) + l_value + 2)))) return (-1); for (c = environ[offset]; (*c = *name++) && *c != '='; ++c); for (*c++ = '='; *c++ = *value++;); return (0); } #endif #ifndef HAVE_UNSETENV /* * unsetenv(name) -- * Delete environmental variable "name". * * PUBLIC: #ifndef HAVE_UNSETENV * PUBLIC: void unsetenv __P((const char *)); * PUBLIC: #endif */ void unsetenv(name) char *name; { extern char **environ; register char **p; int offset; while (__findenv(name, &offset)) /* if set multiple times */ for (p = &environ[offset];; ++p) if (!(*p = *(p + 1))) break; } #endif nvi-1.81.6/clib/gethostname.c0100644000076400001440000000057610720065506015055 0ustar skimousers#include "config.h" /* * Solaris doesn't include the gethostname call by default. */ #include #include #include /* * PUBLIC: #ifndef HAVE_GETHOSTNAME * PUBLIC: int gethostname __P((char *, int)); * PUBLIC: #endif */ int gethostname(host, len) char *host; int len; { return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0); } nvi-1.81.6/clib/iswblank.c0100644000076400001440000000045010720065506014340 0ustar skimousers#include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "$Id: iswblank.c,v 1.1 2001/10/11 19:22:29 skimo Exp $"; #endif /* LIBC_SCCS and not lint */ #include #include int iswblank (wint_t wc) { return iswctype(wc, wctype("blank")); } nvi-1.81.6/clib/memchr.c0100644000076400001440000000461710720065506014012 0ustar skimousers/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)memchr.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include /* * PUBLIC: #ifndef HAVE_MEMCHR * PUBLIC: void *memchr __P((const void *, int, size_t)); * PUBLIC: #endif */ void * memchr(const void *s, register unsigned char c, register size_t n) { if (n != 0) { register const unsigned char *p = s; do { if (*p++ == c) return ((void *)(p - 1)); } while (--n != 0); } return (NULL); } nvi-1.81.6/clib/memset.c0100644000076400001440000000763110720065506014030 0ustar skimousers/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Mike Hibler and Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)memset.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include /* * PUBLIC: #ifndef HAVE_MEMSET * PUBLIC: void *memset __P((void *, int, size_t)); * PUBLIC: #endif */ #define wsize sizeof(u_int) #define wmask (wsize - 1) #ifdef BZERO #define RETURN return #define VAL 0 #define WIDEVAL 0 void bzero(dst0, length) void *dst0; register size_t length; #else #define RETURN return (dst0) #define VAL c0 #define WIDEVAL c void * memset(void *dst0, register int c0, register size_t length) #endif { register size_t t; register u_int c; register u_char *dst; dst = dst0; /* * If not enough words, just fill bytes. A length >= 2 words * guarantees that at least one of them is `complete' after * any necessary alignment. For instance: * * |-----------|-----------|-----------| * |00|01|02|03|04|05|06|07|08|09|0A|00| * ^---------------------^ * dst dst+length-1 * * but we use a minimum of 3 here since the overhead of the code * to do word writes is substantial. */ if (length < 3 * wsize) { while (length != 0) { *dst++ = VAL; --length; } RETURN; } #ifndef BZERO if ((c = (u_char)c0) != 0) { /* Fill the word. */ c = (c << 8) | c; /* u_int is 16 bits. */ #if UINT_MAX > 0xffff c = (c << 16) | c; /* u_int is 32 bits. */ #endif #if UINT_MAX > 0xffffffff c = (c << 32) | c; /* u_int is 64 bits. */ #endif } #endif /* Align destination by filling in bytes. */ if ((t = (int)dst & wmask) != 0) { t = wsize - t; length -= t; do { *dst++ = VAL; } while (--t != 0); } /* Fill words. Length was >= 2*words so we know t >= 1 here. */ t = length / wsize; do { *(u_int *)dst = WIDEVAL; dst += wsize; } while (--t != 0); /* Mop up trailing bytes, if any. */ t = length & wmask; if (t != 0) do { *dst++ = VAL; } while (--t != 0); RETURN; } nvi-1.81.6/clib/mkstemp.c0100644000076400001440000000676710720065506014227 0ustar skimousers/* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include #include static int _gettemp(char *path, register int *doopen); /* * PUBLIC: #ifndef HAVE_MKSTEMP * PUBLIC: int mkstemp __P((char *)); * PUBLIC: #endif */ mkstemp(char *path) { int fd; return (_gettemp(path, &fd) ? fd : -1); } char * mktemp(char *path) { return(_gettemp(path, (int *)NULL) ? path : (char *)NULL); } static _gettemp(char *path, register int *doopen) { extern int errno; register char *start, *trv; struct stat sbuf; u_int pid; pid = getpid(); for (trv = path; *trv; ++trv); /* extra X's get set to 0's */ while (*--trv == 'X') { *trv = (pid % 10) + '0'; pid /= 10; } /* * check the target directory; if you have six X's and it * doesn't exist this runs for a *very* long time. */ for (start = trv + 1;; --trv) { if (trv <= path) break; if (*trv == '/') { *trv = '\0'; if (stat(path, &sbuf)) return(0); if (!S_ISDIR(sbuf.st_mode)) { errno = ENOTDIR; return(0); } *trv = '/'; break; } } for (;;) { if (doopen) { if ((*doopen = open(path, O_CREAT|O_EXCL|O_RDWR, 0600)) >= 0) return(1); if (errno != EEXIST) return(0); } else if (stat(path, &sbuf)) return(errno == ENOENT ? 1 : 0); /* tricky little algorithm for backward compatibility */ for (trv = start;;) { if (!*trv) return(0); if (*trv == 'z') *trv++ = 'a'; else { if (isdigit(*trv)) *trv = 'a'; else ++*trv; break; } } } /*NOTREACHED*/ } nvi-1.81.6/clib/mmap.c0100644000076400001440000000161010720065506013457 0ustar skimousers#include "config.h" #include #include #include /* * This function fakes mmap() by reading `len' bytes from the file descriptor * `fd' and returning a pointer to that memory. The "mapped" region can later * be deallocated with munmap(). * * Note: ONLY reading is supported and only reading of the exact size of the * file will work. * * PUBLIC: #ifndef HAVE_MMAP * PUBLIC: char *mmap __P((char *, size_t, int, int, int, off_t)); * PUBLIC: #endif */ char * mmap(char *addr, size_t len, int prot, int flags, int fd, off_t off) { char *ptr; if ((ptr = (char *)malloc(len)) == 0) return ((char *)-1); if (read(fd, ptr, len) < 0) { free(ptr); return ((char *)-1); } return (ptr); } /* * PUBLIC: #ifndef HAVE_MMAP * PUBLIC: int munmap __P((char *, size_t)); * PUBLIC: #endif */ int munmap(char *addr, size_t len) { free(addr); return (0); } nvi-1.81.6/clib/snprintf.c0100644000076400001440000000125610720065506014376 0ustar skimousers#include "config.h" #include #include #ifdef __STDC__ #include #else #include #endif /* * PUBLIC: #ifndef HAVE_SNPRINTF * PUBLIC: int snprintf __P((char *, size_t, const char *, ...)); * PUBLIC: #endif */ int #ifdef __STDC__ snprintf(char *str, size_t n, const char *fmt, ...) #else snprintf(str, n, fmt, va_alist) char *str; size_t n; const char *fmt; va_dcl #endif { va_list ap; int rval; #ifdef __STDC__ va_start(ap, fmt); #else va_start(ap); #endif #ifdef SPRINTF_RET_CHARPNT (void)vsprintf(str, fmt, ap); va_end(ap); return (strlen(str)); #else rval = vsprintf(str, fmt, ap); va_end(ap); return (rval); #endif } nvi-1.81.6/clib/strdup.c0100644000076400001440000000447310720065506014060 0ustar skimousers/* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strdup.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include /* * PUBLIC: #ifndef HAVE_STRDUP * PUBLIC: char *strdup __P((const char *)); * PUBLIC: #endif */ char * strdup(const char *str) { size_t len; char *copy; len = strlen(str) + 1; if (!(copy = malloc((u_int)len))) return (NULL); memcpy(copy, str, len); return (copy); } nvi-1.81.6/clib/strpbrk.c0100644000076400001440000000464510720065506014227 0ustar skimousers/* * Copyright (c) 1985, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strpbrk.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include /* * Find the first occurrence in s1 of a character in s2 (excluding NUL). * * PUBLIC: #ifndef HAVE_STRPBRK * PUBLIC: char *strpbrk __P((const char *, const char *)); * PUBLIC: #endif */ char * strpbrk(register const char *s1, register const char *s2) { register const char *scanp; register int c, sc; while ((c = *s1++) != 0) { for (scanp = s2; (sc = *scanp++) != 0;) if (sc == c) return ((char *)(s1 - 1)); } return (NULL); } nvi-1.81.6/clib/strsep.c0100644000076400001440000000567710720065506014066 0ustar skimousers/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strsep.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include /* * Get next token from string *stringp, where tokens are possibly-empty * strings separated by characters from delim. * * Writes NULs into the string at *stringp to end tokens. * delim need not remain constant from call to call. * On return, *stringp points past the last NUL written (if there might * be further tokens), or is NULL (if there are definitely no more tokens). * * If *stringp is NULL, strsep returns NULL. * * PUBLIC: #ifndef HAVE_STRSEP * PUBLIC: char *strsep __P((char **, const char *)); * PUBLIC: #endif */ char * strsep(register char **stringp, register const char *delim) { register char *s; register const char *spanp; register int c, sc; char *tok; if ((s = *stringp) == NULL) return (NULL); for (tok = s;;) { c = *s++; spanp = delim; do { if ((sc = *spanp++) == c) { if (c == 0) s = NULL; else s[-1] = 0; *stringp = s; return (tok); } } while (sc != 0); } /* NOTREACHED */ } nvi-1.81.6/clib/strtol.c0100644000076400001440000001054510720065506014063 0ustar skimousers/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strtol.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include /* * Convert a string to a long integer. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. * * PUBLIC: #ifndef HAVE_STRTOL * PUBLIC: long strtol __P((const char *, char **, int)); * PUBLIC: #endif */ long strtol(const char *nptr, char **endptr, register int base) { register const char *s = nptr; register unsigned long acc; register int c; register unsigned long cutoff; register int neg = 0, any, cutlim; /* * Skip white space and pick up leading +/- sign if any. * If base is 0, allow 0x for hex and 0 for octal, else * assume decimal; if base is already 16, allow 0x. */ do { c = *s++; } while (isspace(c)); if (c == '-') { neg = 1; c = *s++; } else if (c == '+') c = *s++; if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) { c = s[1]; s += 2; base = 16; } if (base == 0) base = c == '0' ? 8 : 10; /* * Compute the cutoff value between legal numbers and illegal * numbers. That is the largest legal value, divided by the * base. An input number that is greater than this value, if * followed by a legal input character, is too big. One that * is equal to this value may be valid or not; the limit * between valid and invalid numbers is then based on the last * digit. For instance, if the range for longs is * [-2147483648..2147483647] and the input base is 10, * cutoff will be set to 214748364 and cutlim to either * 7 (neg==0) or 8 (neg==1), meaning that if we have accumulated * a value > 214748364, or equal but the next digit is > 7 (or 8), * the number is too big, and we will return a range error. * * Set any if any `digits' consumed; make it negative to indicate * overflow. */ cutoff = neg ? -(unsigned long)LONG_MIN : LONG_MAX; cutlim = cutoff % (unsigned long)base; cutoff /= (unsigned long)base; for (acc = 0, any = 0;; c = *s++) { if (isdigit(c)) c -= '0'; else if (isalpha(c)) c -= isupper(c) ? 'A' - 10 : 'a' - 10; else break; if (c >= base) break; if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim) any = -1; else { any = 1; acc *= base; acc += c; } } if (any < 0) { acc = neg ? LONG_MIN : LONG_MAX; errno = ERANGE; } else if (neg) acc = -acc; if (endptr != 0) *endptr = (char *)(any ? s - 1 : nptr); return (acc); } nvi-1.81.6/clib/strtoul.c0100644000076400001440000000667110720065506014255 0ustar skimousers/* * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include "config.h" #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include /* * Convert a string to an unsigned long integer. * * Ignores `locale' stuff. Assumes that the upper and lower case * alphabets and digits are each contiguous. * * PUBLIC: #ifndef HAVE_STRTOUL * PUBLIC: unsigned long strtoul __P((const char *, char **, int)); * PUBLIC: #endif */ unsigned long strtoul(const char *nptr, char **endptr, register int base) { register const char *s = nptr; register unsigned long acc; register int c; register unsigned long cutoff; register int neg = 0, any, cutlim; /* * See strtol for comments as to the logic used. */ do { c = *s++; } while (isspace(c)); if (c == '-') { neg = 1; c = *s++; } else if (c == '+') c = *s++; if ((base == 0 || base == 16) && c == '0' && (*s == 'x' || *s == 'X')) { c = s[1]; s += 2; base = 16; } if (base == 0) base = c == '0' ? 8 : 10; cutoff = (unsigned long)ULONG_MAX / (unsigned long)base; cutlim = (unsigned long)ULONG_MAX % (unsigned long)base; for (acc = 0, any = 0;; c = *s++) { if (isdigit(c)) c -= '0'; else if (isalpha(c)) c -= isupper(c) ? 'A' - 10 : 'a' - 10; else break; if (c >= base) break; if (any < 0 || acc > cutoff || acc == cutoff && c > cutlim) any = -1; else { any = 1; acc *= base; acc += c; } } if (any < 0) { acc = ULONG_MAX; errno = ERANGE; } else if (neg) acc = -acc; if (endptr != 0) *endptr = (char *)(any ? s - 1 : nptr); return (acc); } nvi-1.81.6/clib/vsnprintf.c0100644000076400001440000000073710720065506014567 0ustar skimousers#include "config.h" #include #include #ifdef __STDC__ #include #else #include #endif /* * PUBLIC: #ifndef HAVE_VSNPRINTF * PUBLIC: int vsnprintf __P((char *, size_t, const char *, ...)); * PUBLIC: #endif */ int vsnprintf(str, n, fmt, ap) char *str; size_t n; const char *fmt; va_list ap; { #ifdef SPRINTF_RET_CHARPNT (void)vsprintf(str, fmt, ap); return (strlen(str)); #else return (vsprintf(str, fmt, ap)); #endif } nvi-1.81.6/common/0040755000076400001440000000000010720065712012744 5ustar skimousersnvi-1.81.6/common/api.c0100644000076400001440000002662010720065506013665 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1995 * George V. Neville-Neil. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: api.c,v 8.40 2002/06/08 19:30:33 skimo Exp $ (Berkeley) $Date: 2002/06/08 19:30:33 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ex/tag.h" extern GS *__global_list; /* XXX */ /* * api_fscreen -- * Return a pointer to the screen specified by the screen id * or a file name. * * PUBLIC: SCR *api_fscreen __P((int, char *)); */ SCR * api_fscreen(int id, char *name) { GS *gp; SCR *tsp; WIN *wp; gp = __global_list; /* Search the displayed lists. */ for (wp = gp->dq.cqh_first; wp != (void *)&gp->dq; wp = wp->q.cqe_next) for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (name == NULL) { if (id == tsp->id) return (tsp); } else if (!strcmp(name, tsp->frp->name)) return (tsp); /* Search the hidden list. */ for (tsp = gp->hq.cqh_first; tsp != (void *)&gp->hq; tsp = tsp->q.cqe_next) if (name == NULL) { if (id == tsp->id) return (tsp); } else if (!strcmp(name, tsp->frp->name)) return (tsp); return (NULL); } /* * api_aline -- * Append a line. * * PUBLIC: int api_aline __P((SCR *, db_recno_t, char *, size_t)); */ int api_aline(SCR *sp, db_recno_t lno, char *line, size_t len) { size_t wblen; CHAR_T *wbp; CHAR2INT(sp, line, len, wbp, wblen); return (db_append(sp, 1, lno, wbp, wblen)); } /* * api_extend -- * Extend file. * * PUBLIC: int api_extend __P((SCR *, db_recno_t)); */ int api_extend(SCR *sp, db_recno_t lno) { db_recno_t lastlno; if (db_last(sp, &lastlno)) return 1; while(lastlno < lno) if (db_append(sp, 1, lastlno++, NULL, 0)) return 1; return 0; } /* * api_dline -- * Delete a line. * * PUBLIC: int api_dline __P((SCR *, db_recno_t)); */ int api_dline(SCR *sp, db_recno_t lno) { if (db_delete(sp, lno)) return 1; /* change current line if deleted line is that one * or one berfore that */ if (sp->lno >= lno && sp->lno > 1) sp->lno--; return 0; } /* * api_gline -- * Get a line. * * PUBLIC: int api_gline __P((SCR *, db_recno_t, CHAR_T **, size_t *)); */ int api_gline(SCR *sp, db_recno_t lno, CHAR_T **linepp, size_t *lenp) { int isempty; if (db_eget(sp, lno, linepp, lenp, &isempty)) { if (isempty) msgq(sp, M_ERR, "209|The file is empty"); return (1); } return (0); } /* * api_iline -- * Insert a line. * * PUBLIC: int api_iline __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int api_iline(SCR *sp, db_recno_t lno, CHAR_T *line, size_t len) { return (db_insert(sp, lno, line, len)); } /* * api_lline -- * Return the line number of the last line in the file. * * PUBLIC: int api_lline __P((SCR *, db_recno_t *)); */ int api_lline(SCR *sp, db_recno_t *lnop) { return (db_last(sp, lnop)); } /* * api_sline -- * Set a line. * * PUBLIC: int api_sline __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int api_sline(SCR *sp, db_recno_t lno, CHAR_T *line, size_t len) { return (db_set(sp, lno, line, len)); } /* * api_getmark -- * Get the mark. * * PUBLIC: int api_getmark __P((SCR *, int, MARK *)); */ int api_getmark(SCR *sp, int markname, MARK *mp) { return (mark_get(sp, (ARG_CHAR_T)markname, mp, M_ERR)); } /* * api_setmark -- * Set the mark. * * PUBLIC: int api_setmark __P((SCR *, int, MARK *)); */ int api_setmark(SCR *sp, int markname, MARK *mp) { return (mark_set(sp, (ARG_CHAR_T)markname, mp, 1)); } /* * api_nextmark -- * Return the first mark if next not set, otherwise return the * subsequent mark. * * PUBLIC: int api_nextmark __P((SCR *, int, char *)); */ int api_nextmark(SCR *sp, int next, char *namep) { LMARK *mp; mp = sp->ep->marks.lh_first; if (next) for (; mp != NULL; mp = mp->q.le_next) if (mp->name == *namep) { mp = mp->q.le_next; break; } if (mp == NULL) return (1); *namep = mp->name; return (0); } /* * api_getcursor -- * Get the cursor. * * PUBLIC: int api_getcursor __P((SCR *, MARK *)); */ int api_getcursor(SCR *sp, MARK *mp) { mp->lno = sp->lno; mp->cno = sp->cno; return (0); } /* * api_setcursor -- * Set the cursor. * * PUBLIC: int api_setcursor __P((SCR *, MARK *)); */ int api_setcursor(SCR *sp, MARK *mp) { size_t len; if (db_get(sp, mp->lno, DBG_FATAL, NULL, &len)) return (1); if (mp->cno < 0 || mp->cno > len) { msgq(sp, M_ERR, "Cursor set to nonexistent column"); return (1); } /* Set the cursor. */ sp->lno = mp->lno; sp->cno = mp->cno; return (0); } /* * api_emessage -- * Print an error message. * * PUBLIC: void api_emessage __P((SCR *, char *)); */ void api_emessage(SCR *sp, char *text) { msgq(sp, M_ERR, "%s", text); } /* * api_imessage -- * Print an informational message. * * PUBLIC: void api_imessage __P((SCR *, char *)); */ void api_imessage(SCR *sp, char *text) { msgq(sp, M_INFO, "%s", text); } /* * api_edit * Create a new screen and return its id * or edit a new file in the current screen. * * PUBLIC: int api_edit __P((SCR *, char *, SCR **, int)); */ int api_edit(SCR *sp, char *file, SCR **spp, int newscreen) { EXCMD cmd; size_t wlen; CHAR_T *wp; if (file) { ex_cinit(sp, &cmd, C_EDIT, 0, OOBLNO, OOBLNO, 0); CHAR2INT(sp, file, strlen(file) + 1, wp, wlen); argv_exp0(sp, &cmd, wp, wlen - 1 /* terminating 0 */); } else ex_cinit(sp, &cmd, C_EDIT, 0, OOBLNO, OOBLNO, 0); if (newscreen) cmd.flags |= E_NEWSCREEN; /* XXX */ if (cmd.cmd->fn(sp, &cmd)) return (1); *spp = sp->nextdisp; return (0); } /* * api_escreen * End a screen. * * PUBLIC: int api_escreen __P((SCR *)); */ int api_escreen(SCR *sp) { EXCMD cmd; /* * XXX * If the interpreter exits anything other than the current * screen, vi isn't going to update everything correctly. */ ex_cinit(sp, &cmd, C_QUIT, 0, OOBLNO, OOBLNO, 0); return (cmd.cmd->fn(sp, &cmd)); } /* * api_swscreen -- * Switch to a new screen. * * PUBLIC: int api_swscreen __P((SCR *, SCR *)); */ int api_swscreen(SCR *sp, SCR *new) { /* * XXX * If the interpreter switches from anything other than the * current screen, vi isn't going to update everything correctly. */ sp->nextdisp = new; F_SET(sp, SC_SSWITCH); return (0); } /* * api_map -- * Map a key. * * PUBLIC: int api_map __P((SCR *, char *, char *, size_t)); */ int api_map(SCR *sp, char *name, char *map, size_t len) { EXCMD cmd; size_t wlen; CHAR_T *wp; ex_cinit(sp, &cmd, C_MAP, 0, OOBLNO, OOBLNO, 0); CHAR2INT(sp, name, strlen(name) + 1, wp, wlen); argv_exp0(sp, &cmd, wp, wlen - 1); CHAR2INT(sp, map, len, wp, wlen); argv_exp0(sp, &cmd, wp, wlen); return (cmd.cmd->fn(sp, &cmd)); } /* * api_unmap -- * Unmap a key. * * PUBLIC: int api_unmap __P((SCR *, char *)); */ int api_unmap(SCR *sp, char *name) { EXCMD cmd; size_t wlen; CHAR_T *wp; ex_cinit(sp, &cmd, C_UNMAP, 0, OOBLNO, OOBLNO, 0); CHAR2INT(sp, name, strlen(name) + 1, wp, wlen); argv_exp0(sp, &cmd, wp, wlen - 1); return (cmd.cmd->fn(sp, &cmd)); } /* * api_opts_get -- * Return a option value as a string, in allocated memory. * If the option is of type boolean, boolvalue is (un)set * according to the value; otherwise boolvalue is -1. * * PUBLIC: int api_opts_get __P((SCR *, CHAR_T *, char **, int *)); */ int api_opts_get(SCR *sp, CHAR_T *name, char **value, int *boolvalue) { OPTLIST const *op; int offset; if ((op = opts_search(name)) == NULL) { opts_nomatch(sp, name); return (1); } offset = op - optlist; if (boolvalue != NULL) *boolvalue = -1; switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: MALLOC_RET(sp, *value, char *, STRLEN(op->name) + 2 + 1); (void)sprintf(*value, "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name); if (boolvalue != NULL) *boolvalue = O_ISSET(sp, offset); break; case OPT_NUM: MALLOC_RET(sp, *value, char *, 20); (void)sprintf(*value, "%lu", (u_long)O_VAL(sp, offset)); break; case OPT_STR: if (O_STR(sp, offset) == NULL) { MALLOC_RET(sp, *value, char *, 2); value[0] = '\0'; } else { MALLOC_RET(sp, *value, char *, strlen(O_STR(sp, offset)) + 1); (void)sprintf(*value, "%s", O_STR(sp, offset)); } break; } return (0); } /* * api_opts_set -- * Set options. * * PUBLIC: int api_opts_set __P((SCR *, CHAR_T *, char *, u_long, int)); */ int api_opts_set(SCR *sp, CHAR_T *name, char *str_value, u_long num_value, int bool_value) { ARGS *ap[2], a, b; OPTLIST const *op; int rval; size_t blen; CHAR_T *bp; if ((op = opts_search(name)) == NULL) { opts_nomatch(sp, name); return (1); } switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: GET_SPACE_RETW(sp, bp, blen, 64); a.len = SPRINTF(bp, 64, L("%s"WS), bool_value ? "" : "no", name); break; case OPT_NUM: GET_SPACE_RETW(sp, bp, blen, 64); a.len = SPRINTF(bp, 64, L(""WS"=%lu"), name, num_value); break; case OPT_STR: GET_SPACE_RETW(sp, bp, blen, 1024); a.len = SPRINTF(bp, 1024, L(""WS"=%s"), name, str_value); break; default: bp = NULL; break; } a.bp = bp; b.len = 0; b.bp = NULL; ap[0] = &a; ap[1] = &b; rval = opts_set(sp, ap, NULL); FREE_SPACEW(sp, bp, blen); return (rval); } /* * api_run_str -- * Execute a string as an ex command. * * PUBLIC: int api_run_str __P((SCR *, char *)); */ int api_run_str(SCR *sp, char *cmd) { size_t wlen; CHAR_T *wp; CHAR2INT(sp, cmd, strlen(cmd)+1, wp, wlen); return (ex_run_str(sp, NULL, wp, wlen - 1, 0, 0)); } /* * PUBLIC: TAGQ * api_tagq_new __P((SCR*, char*)); */ TAGQ * api_tagq_new(SCR *sp, char *tag) { TAGQ *tqp; size_t len; /* Allocate and initialize the tag queue structure. */ len = strlen(tag); CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1); CIRCLEQ_INIT(&tqp->tagq); tqp->tag = tqp->buf; memcpy(tqp->tag, tag, (tqp->tlen = len) + 1); return tqp; alloc_err: return (NULL); } /* * PUBLIC: void api_tagq_add __P((SCR*, TAGQ*, char*, char *, char *)); */ void api_tagq_add(SCR *sp, TAGQ *tqp, char *filename, char *search, char *msg) { TAG *tp; CHAR_T *wp; size_t wlen; size_t flen = strlen(filename); size_t slen = strlen(search); size_t mlen = strlen(msg); CALLOC_GOTO(sp, tp, TAG *, 1, sizeof(TAG) - 1 + flen + 1 + (slen + 1 + mlen + 1) * sizeof(CHAR_T)); tp->fname = (char *)tp->buf; memcpy(tp->fname, filename, flen + 1); tp->fnlen = flen; tp->search = (CHAR_T *)((char *)tp->fname + flen + 1); CHAR2INT(sp, search, slen + 1, wp, wlen); MEMCPYW(tp->search, wp, wlen); tp->slen = slen; tp->msg = tp->search + slen + 1; CHAR2INT(sp, msg, mlen + 1, wp, wlen); MEMCPYW(tp->msg, wp, wlen); tp->mlen = mlen; CIRCLEQ_INSERT_TAIL(&tqp->tagq, tp, q); alloc_err: return; } /* * PUBLIC: int api_tagq_push __P((SCR*, TAGQ**)); */ int api_tagq_push(SCR *sp, TAGQ **tqpp) { TAGQ *tqp; tqp = *tqpp; *tqpp = 0; /* Check to see if we found anything. */ if (tqp->tagq.cqh_first == (void *)&tqp->tagq) { free(tqp); return 0; } tqp->current = tqp->tagq.cqh_first; if (tagq_push(sp, tqp, 0, 0)) return 1; return (0); } /* * PUBLIC: void api_tagq_free __P((SCR*, TAGQ*)); */ void api_tagq_free(SCR *sp, TAGQ *tqp) { if (tqp) tagq_free(sp, tqp); } nvi-1.81.6/common/args.h0100644000076400001440000000165610720065506014057 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: args.h,v 10.2 1996/03/06 19:50:07 bostic Exp $ (Berkeley) $Date: 1996/03/06 19:50:07 $ */ /* * Structure for building "argc/argv" vector of arguments. * * !!! * All arguments are nul terminated as well as having an associated length. * The argument vector is NOT necessarily NULL terminated. The proper way * to check the number of arguments is to use the argc value in the EXCMDARG * structure or to walk the array until an ARGS structure with a length of 0 * is found. */ typedef struct _args { CHAR_T *bp; /* Argument. */ size_t blen; /* Buffer length. */ size_t len; /* Argument length. */ #define A_ALLOCATED 0x01 /* If allocated space. */ u_int8_t flags; } ARGS; nvi-1.81.6/common/common.h0100644000076400001440000000575110720065506014413 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: common.h,v 10.20 2002/03/02 23:36:22 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:36:22 $ */ /* * Avoid include sys/types.h after definition of pgno_t */ #include #include #include /* * Porting information built at configuration time. Included before * any of nvi's include files. */ #include "port.h" /* * Pseudo-local includes. These are files that are unlikely to exist * on most machines to which we're porting vi, and we want to include * them in a very specific order, regardless. */ #include "db.h" #include /* * Forward structure declarations. Not pretty, but the include files * are far too interrelated for a clean solution. */ typedef struct _cb CB; typedef struct _csc CSC; typedef struct _conv CONV; typedef struct _conv_win CONVWIN; typedef struct _event EVENT; typedef struct _excmd EXCMD; typedef struct _exf EXF; typedef struct _fref FREF; typedef struct _gs GS; typedef struct _lmark LMARK; typedef struct _mark MARK; typedef struct _msg MSGS; typedef struct _option OPTION; typedef struct _optlist OPTLIST; typedef struct _scr SCR; typedef struct _script SCRIPT; typedef struct _seq SEQ; typedef struct _tag TAG; typedef struct _tagf TAGF; typedef struct _tagq TAGQ; typedef struct _text TEXT; typedef struct _win WIN; /* Autoindent state. */ typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t; /* Busy message types. */ typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t; /* * Routines that return a confirmation return: * * CONF_NO User answered no. * CONF_QUIT User answered quit, eof or an error. * CONF_YES User answered yes. */ typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t; /* Directions. */ typedef enum { NOTSET, FORWARD, BACKWARD } dir_t; /* Line operations. */ typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t; /* Lock return values. */ typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t; /* Sequence types. */ typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; /* * Local includes. */ #include "key.h" /* Required by args.h. */ #include "args.h" /* Required by options.h. */ #include "options.h" /* Required by screen.h. */ #include "msg.h" /* Required by gs.h. */ #include "cut.h" /* Required by gs.h. */ #include "seq.h" /* Required by screen.h. */ #include "util.h" /* Required by ex.h. */ #include "mark.h" /* Required by gs.h. */ #include "conv.h" /* Required by ex.h and screen.h */ #include "../ex/ex.h" /* Required by gs.h. */ #include "gs.h" /* Required by screen.h. */ #include "log.h" /* Required by screen.h */ #include "screen.h" /* Required by exf.h. */ #include "exf.h" #include "mem.h" #include "vi_auto.h" #include "extern.h" nvi-1.81.6/common/conv.c0100644000076400001440000002104210720065506014052 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: conv.c,v 1.27 2001/08/18 21:41:41 skimo Exp $ (Berkeley) $Date: 2001/08/18 21:41:41 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" #ifdef USE_ICONV #include #include #define LANGCODESET nl_langinfo(CODESET) #else typedef int iconv_t; #define LANGCODESET "" #endif #include #ifdef USE_WIDECHAR int raw2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst) { int i; CHAR_T **tostr = (CHAR_T **)&cw->bp1; size_t *blen = &cw->blen1; BINC_RETW(NULL, *tostr, *blen, len); *tolen = len; for (i = 0; i < len; ++i) (*tostr)[i] = (u_char) str[i]; *dst = cw->bp1; return 0; } #define CONV_BUFFER_SIZE 512 /* fill the buffer with codeset encoding of string pointed to by str * left has the number of bytes left in str and is adjusted * len contains the number of bytes put in the buffer */ #ifdef USE_ICONV #define CONVERT(str, left, src, len) \ do { \ size_t outleft; \ char *bp = buffer; \ outleft = CONV_BUFFER_SIZE; \ errno = 0; \ if (iconv(id, (char **)&str, &left, &bp, &outleft) == -1 /*&& \ errno != E2BIG*/) \ goto err; \ if ((len = CONV_BUFFER_SIZE - outleft) == 0) { \ error = -left; \ goto err; \ } \ src = buffer; \ } while (0) #else #define CONVERT(str, left, src, len) #endif int default_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst, char *enc) { int i = 0, j; CHAR_T **tostr = (CHAR_T **)&cw->bp1; size_t *blen = &cw->blen1; mbstate_t mbs; size_t n; ssize_t nlen = len; char *src = (char *)str; iconv_t id = (iconv_t)-1; char buffer[CONV_BUFFER_SIZE]; size_t left = len; int error = 1; MEMSET(&mbs, 0, 1); BINC_RETW(NULL, *tostr, *blen, nlen); #ifdef USE_ICONV if (strcmp(nl_langinfo(CODESET), enc)) { id = iconv_open(nl_langinfo(CODESET), enc); if (id == (iconv_t)-1) goto err; CONVERT(str, left, src, len); } #endif for (i = 0, j = 0; j < len; ) { n = mbrtowc((*tostr)+i, src+j, len-j, &mbs); /* NULL character converted */ if (n == -2) error = -(len-j); if (n == -1 || n == -2) goto err; if (n == 0) n = 1; j += n; if (++i >= *blen) { nlen += 256; BINC_RETW(NULL, *tostr, *blen, nlen); } if (id != (iconv_t)-1 && j == len && left) { CONVERT(str, left, src, len); j = 0; } } *tolen = i; if (id != (iconv_t)-1) iconv_close(id); *dst = cw->bp1; return 0; err: *tolen = i; if (id != (iconv_t)-1) iconv_close(id); *dst = cw->bp1; return error; } int fe_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst) { return default_char2int(sp, str, len, cw, tolen, dst, O_STR(sp, O_FILEENCODING)); } int ie_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst) { return default_char2int(sp, str, len, cw, tolen, dst, O_STR(sp, O_INPUTENCODING)); } int cs_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst) { return default_char2int(sp, str, len, cw, tolen, dst, LANGCODESET); } int CHAR_T_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **dst) { *tolen = len * sizeof(CHAR_T); *dst = (char*) str; return 0; } int CHAR_T_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen, CHAR_T **dst) { *tolen = len / sizeof(CHAR_T); *dst = (CHAR_T*) str; return 0; } int int2raw(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **dst) { int i; char **tostr = (char **)&cw->bp1; size_t *blen = &cw->blen1; BINC_RETC(NULL, *tostr, *blen, len); *tolen = len; for (i = 0; i < len; ++i) (*tostr)[i] = str[i]; *dst = cw->bp1; return 0; } int default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **pdst, char *enc) { int i, j, offset = 0; char **tostr = (char **)&cw->bp1; size_t *blen = &cw->blen1; mbstate_t mbs; size_t n; ssize_t nlen = len + MB_CUR_MAX; char *dst; size_t buflen; char buffer[CONV_BUFFER_SIZE]; iconv_t id = (iconv_t)-1; /* convert first len bytes of buffer and append it to cw->bp * len is adjusted => 0 * offset contains the offset in cw->bp and is adjusted * cw->bp is grown as required */ #ifdef USE_ICONV #define CONVERT2(len, cw, offset) \ do { \ char *bp = buffer; \ while (len != 0) { \ size_t outleft = cw->blen1 - offset; \ char *obp = (char *)cw->bp1 + offset; \ if (cw->blen1 < offset + MB_CUR_MAX) { \ nlen += 256; \ BINC_RETC(NULL, cw->bp1, cw->blen1, nlen); \ } \ errno = 0; \ if (iconv(id, &bp, &len, &obp, &outleft) == -1 && \ errno != E2BIG) \ goto err; \ offset = cw->blen1 - outleft; \ } \ } while (0) #else #define CONVERT2(len, cw, offset) #endif MEMSET(&mbs, 0, 1); BINC_RETC(NULL, *tostr, *blen, nlen); dst = *tostr; buflen = *blen; #ifdef USE_ICONV if (strcmp(nl_langinfo(CODESET), enc)) { id = iconv_open(enc, nl_langinfo(CODESET)); if (id == (iconv_t)-1) goto err; dst = buffer; buflen = CONV_BUFFER_SIZE; } #endif for (i = 0, j = 0; i < len; ++i) { n = wcrtomb(dst+j, str[i], &mbs); if (n == -1) goto err; j += n; if (buflen < j + MB_CUR_MAX) { if (id != (iconv_t)-1) { CONVERT2(j, cw, offset); } else { nlen += 256; BINC_RETC(NULL, *tostr, *blen, nlen); dst = *tostr; buflen = *blen; } } } n = wcrtomb(dst+j, L'\0', &mbs); j += n - 1; /* don't count NUL at the end */ *tolen = j; if (id != (iconv_t)-1) { CONVERT2(j, cw, offset); *tolen = offset; } *pdst = cw->bp1; return 0; err: *tolen = j; *pdst = cw->bp1; return 1; } int fe_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **dst) { return default_int2char(sp, str, len, cw, tolen, dst, O_STR(sp, O_FILEENCODING)); } int cs_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen, char **dst) { return default_int2char(sp, str, len, cw, tolen, dst, LANGCODESET); } #endif void conv_init (SCR *orig, SCR *sp) { if (orig != NULL) MEMCPY(&sp->conv, &orig->conv, 1); else { setlocale(LC_ALL, ""); #ifdef USE_WIDECHAR sp->conv.sys2int = cs_char2int; sp->conv.int2sys = cs_int2char; sp->conv.file2int = fe_char2int; sp->conv.int2file = fe_int2char; sp->conv.input2int = ie_char2int; #endif #ifdef USE_ICONV o_set(sp, O_FILEENCODING, OS_STRDUP, nl_langinfo(CODESET), 0); o_set(sp, O_INPUTENCODING, OS_STRDUP, nl_langinfo(CODESET), 0); #endif } } int conv_enc (SCR *sp, int option, char *enc) { #if defined(USE_WIDECHAR) && defined(USE_ICONV) iconv_t id; char2wchar_t *c2w; wchar2char_t *w2c; switch (option) { case O_FILEENCODING: c2w = &sp->conv.file2int; w2c = &sp->conv.int2file; break; case O_INPUTENCODING: c2w = &sp->conv.input2int; w2c = NULL; break; } if (!*enc) { if (c2w) *c2w = raw2int; if (w2c) *w2c = int2raw; return 0; } if (!strcmp(enc, "WCHAR_T")) { if (c2w) *c2w = CHAR_T_char2int; if (w2c) *w2c = CHAR_T_int2char; return 0; } id = iconv_open(enc, nl_langinfo(CODESET)); if (id == (iconv_t)-1) goto err; iconv_close(id); id = iconv_open(nl_langinfo(CODESET), enc); if (id == (iconv_t)-1) goto err; iconv_close(id); switch (option) { case O_FILEENCODING: *c2w = fe_char2int; *w2c = fe_int2char; break; case O_INPUTENCODING: *c2w = ie_char2int; break; } F_CLR(sp, SC_CONV_ERROR); F_SET(sp, SC_SCR_REFORMAT); return 0; err: switch (option) { case O_FILEENCODING: msgq(sp, M_ERR, "321|File encoding conversion not supported"); break; case O_INPUTENCODING: msgq(sp, M_ERR, "322|Input encoding conversion not supported"); break; } #endif return 1; } nvi-1.81.6/common/conv.h0100644000076400001440000000111210720065506014053 0ustar skimousers#define KEY_COL(sp, ch) \ (INTISWIDE(ch) ? CHAR_WIDTH(sp, ch) ? CHAR_WIDTH(sp, ch) : \ 1 : /* extra space */ \ KEY_LEN(sp,ch)) struct _conv_win { void *bp1; size_t blen1; }; typedef int (*char2wchar_t) (SCR *, const char *, ssize_t, struct _conv_win *, size_t *, CHAR_T **); typedef int (*wchar2char_t) (SCR *, const CHAR_T *, ssize_t, struct _conv_win *, size_t *, char **); struct _conv { char2wchar_t sys2int; wchar2char_t int2sys; char2wchar_t file2int; wchar2char_t int2file; char2wchar_t input2int; wchar2char_t int2disp; }; nvi-1.81.6/common/cut.c0100644000076400001440000002143710720065506013710 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: cut.c,v 10.18 2001/06/25 15:19:09 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:09 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" static void cb_rotate __P((SCR *)); /* * cut -- * Put a range of lines/columns into a TEXT buffer. * * There are two buffer areas, both found in the global structure. The first * is the linked list of all the buffers the user has named, the second is the * unnamed buffer storage. There is a pointer, too, which is the current * default buffer, i.e. it may point to the unnamed buffer or a named buffer * depending on into what buffer the last text was cut. Logically, in both * delete and yank operations, if the user names a buffer, the text is cut * into it. If it's a delete of information on more than a single line, the * contents of the numbered buffers are rotated up one, the contents of the * buffer named '9' are discarded, and the text is cut into the buffer named * '1'. The text is always cut into the unnamed buffer. * * In all cases, upper-case buffer names are the same as lower-case names, * with the exception that they cause the buffer to be appended to instead * of replaced. Note, however, that if text is appended to a buffer, the * default buffer only contains the appended text, not the entire contents * of the buffer. * * !!! * The contents of the default buffer would disappear after most operations * in historic vi. It's unclear that this is useful, so we don't bother. * * When users explicitly cut text into the numeric buffers, historic vi became * genuinely strange. I've never been able to figure out what was supposed to * happen. It behaved differently if you deleted text than if you yanked text, * and, in the latter case, the text was appended to the buffer instead of * replacing the contents. Hopefully it's not worth getting right, and here * we just treat the numeric buffers like any other named buffer. * * PUBLIC: int cut __P((SCR *, CHAR_T *, MARK *, MARK *, int)); */ int cut(SCR *sp, CHAR_T *namep, MARK *fm, MARK *tm, int flags) { CB *cbp; CHAR_T name; db_recno_t lno; int append, copy_one, copy_def; /* * If the user specified a buffer, put it there. (This may require * a copy into the numeric buffers. We do the copy so that we don't * have to reference count and so we don't have to deal with things * like appends to buffers that are used multiple times.) * * Otherwise, if it's supposed to be put in a numeric buffer (usually * a delete) put it there. The rules for putting things in numeric * buffers were historically a little strange. There were three cases. * * 1: Some motions are always line mode motions, which means * that the cut always goes into the numeric buffers. * 2: Some motions aren't line mode motions, e.g. d10w, but * can cross line boundaries. For these commands, if the * cut crosses a line boundary, it goes into the numeric * buffers. This includes most of the commands. * 3: Some motions aren't line mode motions, e.g. d`, * but always go into the numeric buffers, regardless. This * was the commands: % ` / ? ( ) N n { } -- and nvi adds ^A. * * Otherwise, put it in the unnamed buffer. */ append = copy_one = copy_def = 0; if (namep != NULL) { name = *namep; if (LF_ISSET(CUT_NUMREQ) || LF_ISSET(CUT_NUMOPT) && (LF_ISSET(CUT_LINEMODE) || fm->lno != tm->lno)) { copy_one = 1; cb_rotate(sp); } if ((append = isupper(name)) == 1) { if (!copy_one) copy_def = 1; name = tolower(name); } namecb: CBNAME(sp, cbp, name); } else if (LF_ISSET(CUT_NUMREQ) || LF_ISSET(CUT_NUMOPT) && (LF_ISSET(CUT_LINEMODE) || fm->lno != tm->lno)) { name = '1'; cb_rotate(sp); goto namecb; } else cbp = &sp->wp->dcb_store; copyloop: /* * If this is a new buffer, create it and add it into the list. * Otherwise, if it's not an append, free its current contents. */ if (cbp == NULL) { CALLOC_RET(sp, cbp, CB *, 1, sizeof(CB)); cbp->name = name; CIRCLEQ_INIT(&cbp->textq); LIST_INSERT_HEAD(&sp->wp->cutq, cbp, q); } else if (!append) { text_lfree(&cbp->textq); cbp->len = 0; cbp->flags = 0; } #define ENTIRE_LINE 0 /* In line mode, it's pretty easy, just cut the lines. */ if (LF_ISSET(CUT_LINEMODE)) { cbp->flags |= CB_LMODE; for (lno = fm->lno; lno <= tm->lno; ++lno) if (cut_line(sp, lno, 0, 0, cbp)) goto cut_line_err; } else { /* * Get the first line. A length of 0 causes cut_line * to cut from the MARK to the end of the line. */ if (cut_line(sp, fm->lno, fm->cno, fm->lno != tm->lno ? ENTIRE_LINE : (tm->cno - fm->cno) + 1, cbp)) goto cut_line_err; /* Get the intermediate lines. */ for (lno = fm->lno; ++lno < tm->lno;) if (cut_line(sp, lno, 0, ENTIRE_LINE, cbp)) goto cut_line_err; /* Get the last line. */ if (tm->lno != fm->lno && cut_line(sp, lno, 0, tm->cno + 1, cbp)) goto cut_line_err; } append = 0; /* Only append to the named buffer. */ sp->wp->dcbp = cbp; /* Repoint the default buffer on each pass. */ if (copy_one) { /* Copy into numeric buffer 1. */ name = '1'; CBNAME(sp, cbp, name); copy_one = 0; goto copyloop; } if (copy_def) { /* Copy into the default buffer. */ cbp = &sp->wp->dcb_store; copy_def = 0; goto copyloop; } return (0); cut_line_err: text_lfree(&cbp->textq); cbp->len = 0; cbp->flags = 0; return (1); } /* * cb_rotate -- * Rotate the numbered buffers up one. */ static void cb_rotate(SCR *sp) { CB *cbp, *del_cbp; del_cbp = NULL; for (cbp = sp->wp->cutq.lh_first; cbp != NULL; cbp = cbp->q.le_next) switch(cbp->name) { case '1': cbp->name = '2'; break; case '2': cbp->name = '3'; break; case '3': cbp->name = '4'; break; case '4': cbp->name = '5'; break; case '5': cbp->name = '6'; break; case '6': cbp->name = '7'; break; case '7': cbp->name = '8'; break; case '8': cbp->name = '9'; break; case '9': del_cbp = cbp; break; } if (del_cbp != NULL) { LIST_REMOVE(del_cbp, q); text_lfree(&del_cbp->textq); free(del_cbp); } } /* * cut_line -- * Cut a portion of a single line. * * PUBLIC: int cut_line __P((SCR *, db_recno_t, size_t, size_t, CB *)); */ int cut_line(SCR *sp, db_recno_t lno, size_t fcno, size_t clen, CB *cbp) { TEXT *tp; size_t len; CHAR_T *p; /* Get the line. */ if (db_get(sp, lno, DBG_FATAL, &p, &len)) return (1); /* Create a TEXT structure that can hold the entire line. */ if ((tp = text_init(sp, NULL, 0, len)) == NULL) return (1); /* * If the line isn't empty and it's not the entire line, * copy the portion we want, and reset the TEXT length. */ if (len != 0) { if (clen == 0) clen = len - fcno; MEMCPYW(tp->lb, p + fcno, clen); tp->len = clen; } /* Append to the end of the cut buffer. */ CIRCLEQ_INSERT_TAIL(&cbp->textq, tp, q); cbp->len += tp->len; return (0); } /* * cut_close -- * Discard all cut buffers. * * PUBLIC: void cut_close __P((WIN *)); */ void cut_close(WIN *wp) { CB *cbp; /* Free cut buffer list. */ while ((cbp = wp->cutq.lh_first) != NULL) { if (cbp->textq.cqh_first != (void *)&cbp->textq) text_lfree(&cbp->textq); LIST_REMOVE(cbp, q); free(cbp); } /* Free default cut storage. */ cbp = &wp->dcb_store; if (cbp->textq.cqh_first != (void *)&cbp->textq) text_lfree(&cbp->textq); } /* * text_init -- * Allocate a new TEXT structure. * * PUBLIC: TEXT *text_init __P((SCR *, const CHAR_T *, size_t, size_t)); */ TEXT * text_init(SCR *sp, const CHAR_T *p, size_t len, size_t total_len) { TEXT *tp; CALLOC(sp, tp, TEXT *, 1, sizeof(TEXT)); if (tp == NULL) return (NULL); /* ANSI C doesn't define a call to malloc(3) for 0 bytes. */ if ((tp->lb_len = total_len * sizeof(CHAR_T)) != 0) { MALLOC(sp, tp->lb, CHAR_T *, tp->lb_len * sizeof(CHAR_T)); if (tp->lb == NULL) { free(tp); return (NULL); } if (p != NULL && len != 0) MEMCPYW(tp->lb, p, len); } tp->len = len; return (tp); } /* * text_lfree -- * Free a chain of text structures. * * PUBLIC: void text_lfree __P((TEXTH *)); */ void text_lfree(TEXTH *headp) { TEXT *tp; while ((tp = headp->cqh_first) != (void *)headp) { CIRCLEQ_REMOVE(headp, tp, q); text_free(tp); } } /* * text_free -- * Free a text structure. * * PUBLIC: void text_free __P((TEXT *)); */ void text_free(TEXT *tp) { if (tp->lb != NULL) free(tp->lb); free(tp); } nvi-1.81.6/common/cut.h0100644000076400001440000000513610720065506013713 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: cut.h,v 10.9 2000/07/22 17:31:18 skimo Exp $ (Berkeley) $Date: 2000/07/22 17:31:18 $ */ typedef struct _texth TEXTH; /* TEXT list head structure. */ CIRCLEQ_HEAD(_texth, _text); /* Cut buffers. */ struct _cb { LIST_ENTRY(_cb) q; /* Linked list of cut buffers. */ TEXTH textq; /* Linked list of TEXT structures. */ /* XXXX Needed ? Can non ascii-chars be cut buffer names ? */ CHAR_T name; /* Cut buffer name. */ size_t len; /* Total length of cut text. */ #define CB_LMODE 0x01 /* Cut was in line mode. */ u_int8_t flags; }; /* Lines/blocks of text. */ struct _text { /* Text: a linked list of lines. */ CIRCLEQ_ENTRY(_text) q; /* Linked list of text structures. */ CHAR_T *lb; /* Line buffer. */ size_t lb_len; /* Line buffer length. */ size_t len; /* Line length. */ /* These fields are used by the vi text input routine. */ db_recno_t lno; /* 1-N: file line. */ size_t cno; /* 0-N: file character in line. */ size_t ai; /* 0-N: autoindent bytes. */ size_t insert; /* 0-N: bytes to insert (push). */ size_t offset; /* 0-N: initial, unerasable chars. */ size_t owrite; /* 0-N: chars to overwrite. */ size_t R_erase; /* 0-N: 'R' erase count. */ size_t sv_cno; /* 0-N: Saved line cursor. */ size_t sv_len; /* 0-N: Saved line length. */ /* * These fields returns information from the vi text input routine. * * The termination condition. Note, this field is only valid if the * text input routine returns success. * TERM_BS: User backspaced over the prompt. * TERM_CEDIT: User entered . * TERM_CR: User entered ; no data. * TERM_ESC: User entered ; no data. * TERM_OK: Data available. * TERM_SEARCH: Incremental search. */ enum { TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH } term; }; /* * Get named buffer 'name'. * Translate upper-case buffer names to lower-case buffer names. */ #define CBNAME(sp, cbp, nch) { \ CHAR_T L__name; \ L__name = isupper(nch) ? tolower(nch) : (nch); \ for (cbp = sp->wp->cutq.lh_first; \ cbp != NULL; cbp = cbp->q.le_next) \ if (cbp->name == L__name) \ break; \ } /* Flags to the cut() routine. */ #define CUT_LINEMODE 0x01 /* Cut in line mode. */ #define CUT_NUMOPT 0x02 /* Numeric buffer: optional. */ #define CUT_NUMREQ 0x04 /* Numeric buffer: required. */ nvi-1.81.6/common/db.c0100644000076400001440000003555510720065506013510 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: db.c,v 10.48 2002/06/08 19:32:52 skimo Exp $ (Berkeley) $Date: 2002/06/08 19:32:52 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" static int append __P((SCR*, db_recno_t, CHAR_T*, size_t, lnop_t, int)); /* * db_eget -- * Front-end to db_get, special case handling for empty files. * * PUBLIC: int db_eget __P((SCR *, db_recno_t, CHAR_T **, size_t *, int *)); */ int db_eget(SCR *sp, db_recno_t lno, CHAR_T **pp, size_t *lenp, int *isemptyp) /* Line number. */ /* Pointer store. */ /* Length store. */ { db_recno_t l1; if (isemptyp != NULL) *isemptyp = 0; /* If the line exists, simply return it. */ if (!db_get(sp, lno, 0, pp, lenp)) return (0); /* * If the user asked for line 0 or line 1, i.e. the only possible * line in an empty file, find the last line of the file; db_last * fails loudly. */ if ((lno == 0 || lno == 1) && db_last(sp, &l1)) return (1); /* If the file isn't empty, fail loudly. */ if ((lno != 0 && lno != 1) || l1 != 0) { db_err(sp, lno); return (1); } if (isemptyp != NULL) *isemptyp = 1; return (1); } /* * db_get -- * Look in the text buffers for a line, followed by the cache, followed * by the database. * * PUBLIC: int db_get __P((SCR *, db_recno_t, u_int32_t, CHAR_T **, size_t *)); */ int db_get(SCR *sp, db_recno_t lno, u_int32_t flags, CHAR_T **pp, size_t *lenp) /* Line number. */ /* Pointer store. */ /* Length store. */ { DBT data, key; EXF *ep; TEXT *tp; db_recno_t l1, l2; CHAR_T *wp; size_t wlen; size_t nlen; /* * The underlying recno stuff handles zero by returning NULL, but * have to have an OOB condition for the look-aside into the input * buffer anyway. */ if (lno == 0) goto err1; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); goto err3; } if (LF_ISSET(DBG_NOCACHE)) goto nocache; /* * Look-aside into the TEXT buffers and see if the line we want * is there. */ if (F_ISSET(sp, SC_TINPUT)) { l1 = ((TEXT *)sp->tiq.cqh_first)->lno; l2 = ((TEXT *)sp->tiq.cqh_last)->lno; if (l1 <= lno && l2 >= lno) { #if defined(DEBUG) && 0 vtrace(sp, "retrieve TEXT buffer line %lu\n", (u_long)lno); #endif for (tp = sp->tiq.cqh_first; tp->lno != lno; tp = tp->q.cqe_next); if (lenp != NULL) *lenp = tp->len; if (pp != NULL) *pp = tp->lb; return (0); } /* * Adjust the line number for the number of lines used * by the text input buffers. */ if (lno > l2) lno -= l2 - l1; } /* Look-aside into the cache, and see if the line we want is there. */ if (lno == sp->c_lno) { #if defined(DEBUG) && 0 vtrace(sp, "retrieve cached line %lu\n", (u_long)lno); #endif if (lenp != NULL) *lenp = sp->c_len; if (pp != NULL) *pp = sp->c_lp; return (0); } sp->c_lno = OOBLNO; nocache: nlen = 1024; retry: /* data.size contains length in bytes */ BINC_GOTO(sp, CHAR_T, sp->c_lp, sp->c_blen, nlen); /* Get the line from the underlying database. */ memset(&key, 0, sizeof(key)); key.data = &lno; key.size = sizeof(lno); memset(&data, 0, sizeof(data)); data.data = sp->c_lp; data.ulen = sp->c_blen; data.flags = DB_DBT_USERMEM; switch (ep->db->get(ep->db, NULL, &key, &data, 0)) { case DB_BUFFER_SMALL: nlen = data.size; goto retry; default: goto err2; case DB_NOTFOUND: err1: if (LF_ISSET(DBG_FATAL)) err2: db_err(sp, lno); alloc_err: err3: if (lenp != NULL) *lenp = 0; if (pp != NULL) *pp = NULL; return (1); case 0: ; } if (FILE2INT(sp, data.data, data.size, wp, wlen)) { if (!F_ISSET(sp, SC_CONV_ERROR)) { F_SET(sp, SC_CONV_ERROR); msgq(sp, M_ERR, "324|Conversion error on line %d", lno); } goto err3; } /* Reset the cache. */ if (wp != data.data) { BINC_GOTOW(sp, sp->c_lp, sp->c_blen, wlen); MEMCPYW(sp->c_lp, wp, wlen); } sp->c_lno = lno; sp->c_len = wlen; #if defined(DEBUG) && 0 vtrace(sp, "retrieve DB line %lu\n", (u_long)lno); #endif if (lenp != NULL) *lenp = wlen; if (pp != NULL) *pp = sp->c_lp; return (0); } /* * db_delete -- * Delete a line from the file. * * PUBLIC: int db_delete __P((SCR *, db_recno_t)); */ int db_delete(SCR *sp, db_recno_t lno) { DBT key; EXF *ep; #if defined(DEBUG) && 0 vtrace(sp, "delete line %lu\n", (u_long)lno); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Update marks, @ and global commands. */ if (line_insdel(sp, LINE_DELETE, lno)) return 1; /* Log before change. */ log_line(sp, lno, LOG_LINE_DELETE_B); /* Update file. */ memset(&key, 0, sizeof(key)); key.data = &lno; key.size = sizeof(lno); if ((sp->db_error = ep->db->del(ep->db, NULL, &key, 0)) != 0) { msgq(sp, M_DBERR, "003|unable to delete line %lu", (u_long)lno); return (1); } /* Flush the cache, update line count, before screen update. */ update_cache(sp, LINE_DELETE, lno); /* File now modified. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log after change. */ log_line(sp, lno, LOG_LINE_DELETE_F); /* Update screen. */ return (scr_update(sp, lno, LINE_DELETE, 1)); } /* maybe this could be simpler * * DB3 behaves differently from DB1 * * if lno != 0 just go to lno and put the new line after it * if lno == 0 then if there are any record, put in front of the first * otherwise just append to the end thus creating the first * line */ static int append(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len, lnop_t op, int update) { DBT data, key; DBC *dbcp_put; EXF *ep; char *fp; size_t flen; int rval; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Log before change. */ log_line(sp, lno + 1, LOG_LINE_APPEND_B); /* Update file. */ memset(&key, 0, sizeof(key)); key.data = &lno; key.size = sizeof(lno); memset(&data, 0, sizeof(data)); if ((sp->db_error = ep->db->cursor(ep->db, NULL, &dbcp_put, 0)) != 0) return 1; INT2FILE(sp, p, len, fp, flen); if (lno != 0) { if ((sp->db_error = dbcp_put->c_get(dbcp_put, &key, &data, DB_SET)) != 0) goto err2; data.data = fp; data.size = flen; if ((sp->db_error = dbcp_put->c_put(dbcp_put, &key, &data, DB_AFTER)) != 0) { err2: (void)dbcp_put->c_close(dbcp_put); msgq(sp, M_DBERR, (op == LINE_APPEND) ? "004|unable to append to line %lu" : "005|unable to insert at line %lu", (u_long)lno); return (1); } } else { if ((sp->db_error = dbcp_put->c_get(dbcp_put, &key, &data, DB_FIRST)) != 0) { if (sp->db_error != DB_NOTFOUND) goto err2; data.data = fp; data.size = flen; if ((sp->db_error = ep->db->put(ep->db, NULL, &key, &data, DB_APPEND)) != 0) { goto err2; } } else { key.data = &lno; key.size = sizeof(lno); data.data = fp; data.size = flen; if ((sp->db_error = dbcp_put->c_put(dbcp_put, &key, &data, DB_BEFORE)) != 0) { goto err2; } } } (void)dbcp_put->c_close(dbcp_put); /* Flush the cache, update line count, before screen update. */ update_cache(sp, LINE_INSERT, lno); /* File now dirty. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log after change. */ log_line(sp, lno + 1, LOG_LINE_APPEND_F); /* Update marks, @ and global commands. */ rval = line_insdel(sp, LINE_INSERT, lno + 1); /* * Update screen. * * comment copied from db_append * XXX * Nasty hack. If multiple lines are input by the user, they aren't * committed until an is entered. The problem is the screen was * updated/scrolled as each line was entered. So, when this routine * is called to copy the new lines from the cut buffer into the file, * it has to know not to update the screen again. */ return (scr_update(sp, lno + 1, LINE_INSERT, update) || rval); } /* * db_append -- * Append a line into the file. * * PUBLIC: int db_append __P((SCR *, int, db_recno_t, CHAR_T *, size_t)); */ int db_append(SCR *sp, int update, db_recno_t lno, CHAR_T *p, size_t len) { #if defined(DEBUG) && 0 vtrace(sp, "append to %lu: len %u {%.*s}\n", lno, len, MIN(len, 20), p); #endif /* Update file. */ return append(sp, lno, p, len, LINE_APPEND, update); } /* * db_insert -- * Insert a line into the file. * * PUBLIC: int db_insert __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int db_insert(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len) { #if defined(DEBUG) && 0 vtrace(sp, "insert before %lu: len %lu {%.*s}\n", (u_long)lno, (u_long)len, MIN(len, 20), p); #endif return append(sp, lno - 1, p, len, LINE_INSERT, 1); } /* * db_set -- * Store a line in the file. * * PUBLIC: int db_set __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int db_set(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len) { DBT data, key; EXF *ep; char *fp; size_t flen; #if defined(DEBUG) && 0 vtrace(sp, "replace line %lu: len %lu {%.*s}\n", (u_long)lno, (u_long)len, MIN(len, 20), p); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Log before change. */ log_line(sp, lno, LOG_LINE_RESET_B); INT2FILE(sp, p, len, fp, flen); /* Update file. */ memset(&key, 0, sizeof(key)); key.data = &lno; key.size = sizeof(lno); memset(&data, 0, sizeof(data)); data.data = fp; data.size = flen; if ((sp->db_error = ep->db->put(ep->db, NULL, &key, &data, 0)) != 0) { msgq(sp, M_DBERR, "006|unable to store line %lu", (u_long)lno); return (1); } /* Flush the cache, update line count, before screen update. */ update_cache(sp, LINE_RESET, lno); /* File now dirty. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log after change. */ log_line(sp, lno, LOG_LINE_RESET_F); /* Update screen. */ return (scr_update(sp, lno, LINE_RESET, 1)); } /* * db_exist -- * Return if a line exists. * * PUBLIC: int db_exist __P((SCR *, db_recno_t)); */ int db_exist(SCR *sp, db_recno_t lno) { EXF *ep; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (lno == OOBLNO) return (0); /* * Check the last-line number cache. Adjust the cached line * number for the lines used by the text input buffers. */ if (ep->c_nlines != OOBLNO) return (lno <= (F_ISSET(sp, SC_TINPUT) ? ep->c_nlines + (((TEXT *)sp->tiq.cqh_last)->lno - ((TEXT *)sp->tiq.cqh_first)->lno) : ep->c_nlines)); /* Go get the line. */ return (!db_get(sp, lno, 0, NULL, NULL)); } /* * db_last -- * Return the number of lines in the file. * * PUBLIC: int db_last __P((SCR *, db_recno_t *)); */ int db_last(SCR *sp, db_recno_t *lnop) { DBT data, key; DBC *dbcp; EXF *ep; db_recno_t lno; CHAR_T *wp; size_t wlen; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } /* * Check the last-line number cache. Adjust the cached line * number for the lines used by the text input buffers. */ if (ep->c_nlines != OOBLNO) { *lnop = ep->c_nlines; if (F_ISSET(sp, SC_TINPUT)) *lnop += ((TEXT *)sp->tiq.cqh_last)->lno - ((TEXT *)sp->tiq.cqh_first)->lno; return (0); } memset(&key, 0, sizeof(key)); key.data = &lno; key.size = sizeof(lno); memset(&data, 0, sizeof(data)); if ((sp->db_error = ep->db->cursor(ep->db, NULL, &dbcp, 0)) != 0) goto err1; switch (sp->db_error = dbcp->c_get(dbcp, &key, &data, DB_LAST)) { case DB_NOTFOUND: *lnop = 0; return (0); default: (void)dbcp->c_close(dbcp); alloc_err: err1: msgq(sp, M_DBERR, "007|unable to get last line"); *lnop = 0; return (1); case 0: ; } memcpy(&lno, key.data, sizeof(lno)); if (lno != sp->c_lno) { FILE2INT(sp, data.data, data.size, wp, wlen); /* Fill the cache. */ BINC_GOTOW(sp, sp->c_lp, sp->c_blen, wlen); MEMCPYW(sp->c_lp, wp, wlen); sp->c_lno = lno; sp->c_len = wlen; } ep->c_nlines = lno; (void)dbcp->c_close(dbcp); /* Return the value. */ *lnop = (F_ISSET(sp, SC_TINPUT) && ((TEXT *)sp->tiq.cqh_last)->lno > lno ? ((TEXT *)sp->tiq.cqh_last)->lno : lno); return (0); } /* * db_err -- * Report a line error. * * PUBLIC: void db_err __P((SCR *, db_recno_t)); */ void db_err(SCR *sp, db_recno_t lno) { msgq(sp, M_ERR, "008|Error: unable to retrieve line %lu", (u_long)lno); } /* * scr_update -- * Update all of the screens that are backed by the file that * just changed. * * PUBLIC: int scr_update __P((SCR *sp, db_recno_t lno, * PUBLIC: lnop_t op, int current)); */ int scr_update(SCR *sp, db_recno_t lno, lnop_t op, int current) { EXF *ep; SCR *tsp; WIN *wp; if (F_ISSET(sp, SC_EX)) return (0); /* XXXX goes outside of window */ ep = sp->ep; if (ep->refcnt != 1) for (wp = sp->gp->dq.cqh_first; wp != (void *)&sp->gp->dq; wp = wp->q.cqe_next) for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (sp != tsp && tsp->ep == ep) if (vs_change(tsp, lno, op)) return (1); return (current ? vs_change(sp, lno, op) : 0); } /* * PUBLIC: void update_cache __P((SCR *sp, lnop_t op, db_recno_t lno)); */ void update_cache(SCR *sp, lnop_t op, db_recno_t lno) { SCR* scrp; EXF *ep; ep = sp->ep; /* Flush the cache, update line count, before screen update. */ /* The flushing is probably not needed, since it was incorrect * for db_insert. It might be better to adjust it, like * marks, @ and global */ for (scrp = ep->scrq.cqh_first; scrp != (void *)&ep->scrq; scrp = scrp->eq.cqe_next) switch (op) { case LINE_INSERT: case LINE_DELETE: if (lno <= scrp->c_lno) scrp->c_lno = OOBLNO; break; case LINE_RESET: if (lno == scrp->c_lno) scrp->c_lno = OOBLNO; break; } if (ep->c_nlines != OOBLNO) switch (op) { case LINE_INSERT: ++ep->c_nlines; break; case LINE_DELETE: --ep->c_nlines; break; } } /* * PUBLIC: int line_insdel __P((SCR *sp, lnop_t op, db_recno_t lno)); */ int line_insdel(SCR *sp, lnop_t op, db_recno_t lno) { int rval; /* Update marks, @ and global commands. */ rval = 0; if (mark_insdel(sp, op, lno)) rval = 1; if (ex_g_insdel(sp, op, lno)) rval = 1; return rval; } nvi-1.81.6/common/db.h0100644000076400001440000000206210720065506013500 0ustar skimousers#include #ifndef DB_BUFFER_SMALL #define DB_BUFFER_SMALL ENOMEM #endif #if DB_VERSION_MAJOR >= 3 && DB_VERSION_MINOR >= 1 #define db_env_open(env,path,flags,mode) \ (env)->open(env, path, flags, mode) #define db_env_remove(env,path,flags) \ (env)->remove(env, path, flags) #else #define db_env_open(env,path,flags,mode) \ (env)->open(env, path, NULL, flags, mode) #define db_env_remove(env,path,flags) \ (env)->remove(env, path, NULL, flags) #endif #if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 #define db_open(db,file,type,flags,mode) \ (db)->open(db, NULL, file, NULL, type, flags, mode) #else #define db_open(db,file,type,flags,mode) \ (db)->open(db, file, NULL, type, flags, mode) #endif #ifdef USE_DYNAMIC_LOADING #define db_create nvi_db_create #define db_env_create nvi_db_env_create #define db_strerror nvi_db_strerror extern int (*nvi_db_create) __P((DB **, DB_ENV *, u_int32_t)); extern int (*nvi_db_env_create) __P((DB_ENV **, u_int32_t)); extern char *(*nvi_db_strerror) __P((int)); #endif nvi-1.81.6/common/db1.c0100644000076400001440000004171510720065506013564 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: db1.c,v 10.1 2002/03/09 12:53:57 skimo Exp $ (Berkeley) $Date: 2002/03/09 12:53:57 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" static int scr_update __P((SCR *, db_recno_t, lnop_t, int)); /* * db_eget -- * Front-end to db_get, special case handling for empty files. * * PUBLIC: int db_eget __P((SCR *, db_recno_t, CHAR_T **, size_t *, int *)); */ int db_eget(SCR *sp, db_recno_t lno, CHAR_T **pp, size_t *lenp, int *isemptyp) /* Line number. */ /* Pointer store. */ /* Length store. */ { db_recno_t l1; if (isemptyp != NULL) *isemptyp = 0; /* If the line exists, simply return it. */ if (!db_get(sp, lno, 0, pp, lenp)) return (0); /* * If the user asked for line 0 or line 1, i.e. the only possible * line in an empty file, find the last line of the file; db_last * fails loudly. */ if ((lno == 0 || lno == 1) && db_last(sp, &l1)) return (1); /* If the file isn't empty, fail loudly. */ if ((lno != 0 && lno != 1) || l1 != 0) { db_err(sp, lno); return (1); } if (isemptyp != NULL) *isemptyp = 1; return (1); } /* * db_get -- * Look in the text buffers for a line, followed by the cache, followed * by the database. * * PUBLIC: int db_get __P((SCR *, db_recno_t, u_int32_t, CHAR_T **, size_t *)); */ int db_get(SCR *sp, db_recno_t lno, u_int32_t flags, CHAR_T **pp, size_t *lenp) /* Line number. */ /* Pointer store. */ /* Length store. */ { DBT data, key; EXF *ep; TEXT *tp; db_recno_t l1, l2; CHAR_T *wp; size_t wlen; size_t nlen; /* * The underlying recno stuff handles zero by returning NULL, but * have to have an OOB condition for the look-aside into the input * buffer anyway. */ if (lno == 0) goto err1; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); goto err3; } if (LF_ISSET(DBG_NOCACHE)) goto nocache; /* * Look-aside into the TEXT buffers and see if the line we want * is there. */ if (F_ISSET(sp, SC_TINPUT)) { l1 = ((TEXT *)sp->tiq.cqh_first)->lno; l2 = ((TEXT *)sp->tiq.cqh_last)->lno; if (l1 <= lno && l2 >= lno) { #if defined(DEBUG) && 0 vtrace(sp, "retrieve TEXT buffer line %lu\n", (u_long)lno); #endif for (tp = sp->tiq.cqh_first; tp->lno != lno; tp = tp->q.cqe_next); if (lenp != NULL) *lenp = tp->len; if (pp != NULL) *pp = tp->lb; return (0); } /* * Adjust the line number for the number of lines used * by the text input buffers. */ if (lno > l2) lno -= l2 - l1; } /* Look-aside into the cache, and see if the line we want is there. */ /* * Line cache will not work if different screens view the same * file with different encodings. * Multiple threads accessing the same cache can be a problem as * well. * So, line cache is (temporarily) disabled. */ if (0 && lno == ep->c_lno) { #if defined(DEBUG) && 0 vtrace(sp, "retrieve cached line %lu\n", (u_long)lno); #endif if (lenp != NULL) *lenp = ep->c_len; if (pp != NULL) *pp = ep->c_lp; return (0); } ep->c_lno = OOBLNO; nocache: nlen = 1024; retry: /* data.size contains length in bytes */ BINC_GOTO(sp, CHAR_T, ep->c_lp, ep->c_blen, nlen); /* Get the line from the underlying database. */ key.data = &lno; key.size = sizeof(lno); switch (ep->db->actual_db->get(ep->db->actual_db, &key, &data, 0)) { case -1: goto err2; case 1: err1: if (LF_ISSET(DBG_FATAL)) err2: db_err(sp, lno); alloc_err: err3: if (lenp != NULL) *lenp = 0; if (pp != NULL) *pp = NULL; return (1); case 0: if (data.size > nlen) { nlen = data.size; goto retry; } else memcpy(ep->c_lp, data.data, nlen); } if (FILE2INT(sp, data.data, data.size, wp, wlen)) { if (!F_ISSET(sp, SC_CONV_ERROR)) { F_SET(sp, SC_CONV_ERROR); msgq(sp, M_ERR, "324|Conversion error on line %d", lno); } goto err3; } /* Reset the cache. */ if (wp != data.data) { BINC_GOTOW(sp, ep->c_lp, ep->c_blen, wlen); MEMCPYW(ep->c_lp, wp, wlen); } ep->c_lno = lno; ep->c_len = wlen; #if defined(DEBUG) && 0 vtrace(sp, "retrieve DB line %lu\n", (u_long)lno); #endif if (lenp != NULL) *lenp = wlen; if (pp != NULL) *pp = ep->c_lp; return (0); } /* * db_delete -- * Delete a line from the file. * * PUBLIC: int db_delete __P((SCR *, db_recno_t)); */ int db_delete(SCR *sp, db_recno_t lno) { DBT key; EXF *ep; #if defined(DEBUG) && 0 vtrace(sp, "delete line %lu\n", (u_long)lno); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Update marks, @ and global commands. */ if (mark_insdel(sp, LINE_DELETE, lno)) return (1); if (ex_g_insdel(sp, LINE_DELETE, lno)) return (1); /* Log change. */ log_line(sp, lno, LOG_LINE_DELETE); /* Update file. */ key.data = &lno; key.size = sizeof(lno); sp->db_error = ep->db->actual_db->del(ep->db->actual_db, &key, 0); if (sp->db_error != 0) { if (sp->db_error == -1) sp->db_error = errno; msgq(sp, M_DBERR, "003|unable to delete line %lu", (u_long)lno); return (1); } /* Flush the cache, update line count, before screen update. */ if (lno <= ep->c_lno) ep->c_lno = OOBLNO; if (ep->c_nlines != OOBLNO) --ep->c_nlines; /* File now modified. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Update screen. */ return (scr_update(sp, lno, LINE_DELETE, 1)); } /* * db_append -- * Append a line into the file. * * PUBLIC: int db_append __P((SCR *, int, db_recno_t, CHAR_T *, size_t)); */ int db_append(SCR *sp, int update, db_recno_t lno, CHAR_T *p, size_t len) { DBT data, key; EXF *ep; int rval; #if defined(DEBUG) && 0 vtrace(sp, "append to %lu: len %u {%.*s}\n", lno, len, MIN(len, 20), p); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Update file. */ key.data = &lno; key.size = sizeof(lno); data.data = p; data.size = len; if (ep->db->actual_db->put(ep->db->actual_db, &key, &data, R_IAFTER)) { msgq(sp, M_DBERR, "004|unable to append to line %lu", (u_long)lno); return (1); } /* Flush the cache, update line count, before screen update. */ if (lno < ep->c_lno) ep->c_lno = OOBLNO; if (ep->c_nlines != OOBLNO) ++ep->c_nlines; /* File now dirty. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log change. */ log_line(sp, lno + 1, LOG_LINE_APPEND); /* Update marks, @ and global commands. */ rval = 0; if (mark_insdel(sp, LINE_INSERT, lno + 1)) rval = 1; if (ex_g_insdel(sp, LINE_INSERT, lno + 1)) rval = 1; /* * Update screen. * * XXX * Nasty hack. If multiple lines are input by the user, they aren't * committed until an is entered. The problem is the screen was * updated/scrolled as each line was entered. So, when this routine * is called to copy the new lines from the cut buffer into the file, * it has to know not to update the screen again. */ return (scr_update(sp, lno, LINE_APPEND, update) || rval); } /* * db_insert -- * Insert a line into the file. * * PUBLIC: int db_insert __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int db_insert(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len) { DBT data, key; EXF *ep; int rval; #if defined(DEBUG) && 0 vtrace(sp, "insert before %lu: len %lu {%.*s}\n", (u_long)lno, (u_long)len, MIN(len, 20), p); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Update file. */ key.data = &lno; key.size = sizeof(lno); data.data = p; data.size = len; if (ep->db->actual_db->put(ep->db->actual_db, &key, &data, R_IBEFORE)) { msgq(sp, M_SYSERR, "005|unable to insert at line %lu", (u_long)lno); return (1); } /* Flush the cache, update line count, before screen update. */ if (lno >= ep->c_lno) ep->c_lno = OOBLNO; if (ep->c_nlines != OOBLNO) ++ep->c_nlines; /* File now dirty. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log change. */ log_line(sp, lno, LOG_LINE_INSERT); /* Update marks, @ and global commands. */ rval = 0; if (mark_insdel(sp, LINE_INSERT, lno)) rval = 1; if (ex_g_insdel(sp, LINE_INSERT, lno)) rval = 1; /* Update screen. */ return (scr_update(sp, lno, LINE_INSERT, 1) || rval); } /* * db_set -- * Store a line in the file. * * PUBLIC: int db_set __P((SCR *, db_recno_t, CHAR_T *, size_t)); */ int db_set(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len) { DBT data, key; EXF *ep; char *fp; size_t flen; #if defined(DEBUG) && 0 vtrace(sp, "replace line %lu: len %lu {%.*s}\n", (u_long)lno, (u_long)len, MIN(len, 20), p); #endif /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } /* Log before change. */ log_line(sp, lno, LOG_LINE_RESET_B); INT2FILE(sp, p, len, fp, flen); /* Update file. */ key.data = &lno; key.size = sizeof(lno); data.data = fp; data.size = flen; sp->db_error = ep->db->actual_db->put(ep->db->actual_db, &key, &data, 0); if (sp->db_error != 0) { if (sp->db_error == -1) sp->db_error = errno; msgq(sp, M_DBERR, "006|unable to store line %lu", (u_long)lno); return (1); } /* Flush the cache, before logging or screen update. */ if (lno == ep->c_lno) ep->c_lno = OOBLNO; /* File now dirty. */ if (F_ISSET(ep, F_FIRSTMODIFY)) (void)rcv_init(sp); F_SET(ep, F_MODIFIED); /* Log after change. */ log_line(sp, lno, LOG_LINE_RESET_F); /* Update screen. */ return (scr_update(sp, lno, LINE_RESET, 1)); } /* * db_exist -- * Return if a line exists. * * PUBLIC: int db_exist __P((SCR *, db_recno_t)); */ int db_exist(SCR *sp, db_recno_t lno) { EXF *ep; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } if (lno == OOBLNO) return (0); /* * Check the last-line number cache. Adjust the cached line * number for the lines used by the text input buffers. */ if (ep->c_nlines != OOBLNO) return (lno <= (F_ISSET(sp, SC_TINPUT) ? ep->c_nlines + (((TEXT *)sp->tiq.cqh_last)->lno - ((TEXT *)sp->tiq.cqh_first)->lno) : ep->c_nlines)); /* Go get the line. */ return (!db_get(sp, lno, 0, NULL, NULL)); } /* * db_last -- * Return the number of lines in the file. * * PUBLIC: int db_last __P((SCR *, db_recno_t *)); */ int db_last(SCR *sp, db_recno_t *lnop) { DBT data, key; EXF *ep; db_recno_t lno; CHAR_T *wp; size_t wlen; /* Check for no underlying file. */ if ((ep = sp->ep) == NULL) { ex_emsg(sp, NULL, EXM_NOFILEYET); return (1); } /* * Check the last-line number cache. Adjust the cached line * number for the lines used by the text input buffers. */ if (ep->c_nlines != OOBLNO) { *lnop = ep->c_nlines; if (F_ISSET(sp, SC_TINPUT)) *lnop += ((TEXT *)sp->tiq.cqh_last)->lno - ((TEXT *)sp->tiq.cqh_first)->lno; return (0); } key.data = &lno; key.size = sizeof(lno); sp->db_error = ep->db->actual_db->seq(ep->db->actual_db, &key, &data, R_LAST); switch (sp->db_error) { case 1: *lnop = 0; return (0); case -1: sp->db_error = errno; alloc_err: msgq(sp, M_DBERR, "007|unable to get last line"); *lnop = 0; return (1); case 0: ; } memcpy(&lno, key.data, sizeof(lno)); if (lno != ep->c_lno) { FILE2INT(sp, data.data, data.size, wp, wlen); /* Fill the cache. */ if (wp != data.data) { BINC_GOTOW(sp, ep->c_lp, ep->c_blen, wlen); MEMCPYW(ep->c_lp, wp, wlen); } ep->c_lno = lno; ep->c_len = wlen; } ep->c_nlines = lno; /* Return the value. */ *lnop = (F_ISSET(sp, SC_TINPUT) && ((TEXT *)sp->tiq.cqh_last)->lno > lno ? ((TEXT *)sp->tiq.cqh_last)->lno : lno); return (0); } /* * db_err -- * Report a line error. * * PUBLIC: void db_err __P((SCR *, db_recno_t)); */ void db_err(SCR *sp, db_recno_t lno) { msgq(sp, M_ERR, "008|Error: unable to retrieve line %lu", (u_long)lno); } /* * scr_update -- * Update all of the screens that are backed by the file that * just changed. */ static int scr_update(SCR *sp, db_recno_t lno, lnop_t op, int current) { EXF *ep; SCR *tsp; WIN *wp; if (F_ISSET(sp, SC_EX)) return (0); /* XXXX goes outside of window */ ep = sp->ep; if (ep->refcnt != 1) for (wp = sp->gp->dq.cqh_first; wp != (void *)&sp->gp->dq; wp = wp->q.cqe_next) for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (sp != tsp && tsp->ep == ep) if (vs_change(tsp, lno, op)) return (1); return (current ? vs_change(sp, lno, op) : 0); } /* * DB1->3 compatibility layer */ #include #include #undef O_SHLOCK #undef O_EXLOCK #include static int db1_close(DB *, u_int32_t); static int db1_open(DB *, const char *, const char *, DBTYPE, u_int32_t, int); static int db1_sync(DB *, u_int32_t); static int db1_get(DB *, DB_TXN *, DBT *, DBT *, u_int32_t); static int db1_put(DB *, DB_TXN *, DBT *, DBT *, u_int32_t); static int db1_set_flags(DB *, u_int32_t); static int db1_set_pagesize(DB *, u_int32_t); static int db1_set_re_delim(DB *, int); static int db1_set_re_source(DB *, const char *); int db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags) { assert(dbenv == NULL && flags == 0); *dbp = malloc(sizeof **dbp); if (*dbp == NULL) return -1; (*dbp)->type = DB_UNKNOWN; (*dbp)->actual_db = NULL; (*dbp)->_pagesize = 0; (*dbp)->_flags = 0; memset(&(*dbp)->_recno_info, 0, sizeof (RECNOINFO)); (*dbp)->close = db1_close; (*dbp)->open = db1_open; (*dbp)->sync = db1_sync; (*dbp)->get = db1_get; (*dbp)->put = db1_put; (*dbp)->set_flags = db1_set_flags; (*dbp)->set_pagesize = db1_set_pagesize; (*dbp)->set_re_delim = db1_set_re_delim; (*dbp)->set_re_source = db1_set_re_source; return 0; } char * db_strerror(int error) { return error > 0? strerror(error) : "record not found"; } static int db1_close(DB *db, u_int32_t flags) { if (flags & DB_NOSYNC) { /* XXX warn user? */ } db->actual_db->close(db->actual_db); db->type = DB_UNKNOWN; db->actual_db = NULL; db->_pagesize = 0; db->_flags = 0; memset(&db->_recno_info, 0, sizeof (RECNOINFO)); return 0; } static int db1_open(DB *db, const char *file, const char *database, DBTYPE type, u_int32_t flags, int mode) { int oldflags = 0; assert(database == NULL && !(flags & ~(DB_CREATE | DB_TRUNCATE))); db->type = type; if (flags & DB_CREATE) oldflags |= O_CREAT; if (flags & DB_TRUNCATE) oldflags |= O_TRUNC; if (type == DB_RECNO) { char *tmp = (char *) file; /* The interface is reversed in DB3 */ file = db->_recno_info.bfname; db->_recno_info.bfname = tmp; /* ... and so, we should avoid to truncate the main file! */ oldflags &= ~O_TRUNC; db->_recno_info.flags = db->_flags & DB_SNAPSHOT? R_SNAPSHOT : 0; db->_recno_info.psize = db->_pagesize; } db->actual_db = dbopen(file, oldflags, mode, type, type == DB_RECNO? &db->_recno_info : NULL); return db->actual_db == NULL? errno : 0; } static int db1_sync(DB *db, u_int32_t flags) { assert(flags == 0); return db->actual_db->sync(db->actual_db, db->type == DB_UNKNOWN? R_RECNOSYNC : 0) == 0? 0 : errno; } static int db1_get(DB *db, DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags) { int err; assert(flags == 0 && txnid == NULL); err = db->actual_db->get(db->actual_db, key, data, flags); return err == -1? errno : err; } static int db1_put(DB *db, DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags) { int err; assert(flags == 0 && txnid == NULL); err = db->actual_db->put(db->actual_db, key, data, flags); return err == -1? errno : err; } static int db1_set_flags(DB *db, u_int32_t flags) { assert((flags & ~(DB_RENUMBER | DB_SNAPSHOT)) == 0); /* Can't prevent renumbering from happening with DB1 */ assert((flags | db->_flags) & DB_RENUMBER); db->_flags |= flags; return 0; } static int db1_set_pagesize(DB *db, u_int32_t pagesize) { db->_pagesize = pagesize; return 0; } static int db1_set_re_delim(DB *db, int re_delim) { db->_recno_info.bval = re_delim; return 0; } static int db1_set_re_source(DB *db, const char *re_source) { db->_recno_info.bfname = (char *) re_source; return 0; } nvi-1.81.6/common/delete.c0100644000076400001440000000710410720065506014352 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: delete.c,v 10.17 2001/06/25 15:19:09 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:09 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "common.h" /* * del -- * Delete a range of text. * * PUBLIC: int del __P((SCR *, MARK *, MARK *, int)); */ int del(SCR *sp, MARK *fm, MARK *tm, int lmode) { db_recno_t lno; size_t blen, len, nlen, tlen; CHAR_T *bp, *p; int eof, rval; bp = NULL; /* Case 1 -- delete in line mode. */ if (lmode) { for (lno = tm->lno; lno >= fm->lno; --lno) { if (db_delete(sp, lno)) return (1); ++sp->rptlines[L_DELETED]; if (lno % INTERRUPT_CHECK == 0 && INTERRUPTED(sp)) break; } goto done; } /* * Case 2 -- delete to EOF. This is a special case because it's * easier to pick it off than try and find it in the other cases. */ if (db_last(sp, &lno)) return (1); if (tm->lno >= lno) { if (tm->lno == lno) { if (db_get(sp, lno, DBG_FATAL, &p, &len)) return (1); eof = tm->cno >= len ? 1 : 0; } else eof = 1; if (eof) { for (lno = tm->lno; lno > fm->lno; --lno) { if (db_delete(sp, lno)) return (1); ++sp->rptlines[L_DELETED]; if (lno % INTERRUPT_CHECK == 0 && INTERRUPTED(sp)) break; } if (db_get(sp, fm->lno, DBG_FATAL, &p, &len)) return (1); GET_SPACE_RETW(sp, bp, blen, fm->cno); MEMCPYW(bp, p, fm->cno); if (db_set(sp, fm->lno, bp, fm->cno)) return (1); goto done; } } /* Case 3 -- delete within a single line. */ if (tm->lno == fm->lno) { if (db_get(sp, fm->lno, DBG_FATAL, &p, &len)) return (1); GET_SPACE_RETW(sp, bp, blen, len); if (fm->cno != 0) MEMCPYW(bp, p, fm->cno); MEMCPYW(bp + fm->cno, p + (tm->cno + 1), len - (tm->cno + 1)); if (db_set(sp, fm->lno, bp, len - ((tm->cno - fm->cno) + 1))) goto err; goto done; } /* * Case 4 -- delete over multiple lines. * * Copy the start partial line into place. */ if ((tlen = fm->cno) != 0) { if (db_get(sp, fm->lno, DBG_FATAL, &p, NULL)) return (1); GET_SPACE_RETW(sp, bp, blen, tlen + 256); MEMCPYW(bp, p, tlen); } /* Copy the end partial line into place. */ if (db_get(sp, tm->lno, DBG_FATAL, &p, &len)) goto err; if (len != 0 && tm->cno != len - 1) { /* * XXX * We can overflow memory here, if the total length is greater * than SIZE_T_MAX. The only portable way I've found to test * is depending on the overflow being less than the value. */ nlen = (len - (tm->cno + 1)) + tlen; if (tlen > nlen) { msgq(sp, M_ERR, "002|Line length overflow"); goto err; } if (tlen == 0) { GET_SPACE_RETW(sp, bp, blen, nlen); } else ADD_SPACE_RETW(sp, bp, blen, nlen); MEMCPYW(bp + tlen, p + (tm->cno + 1), len - (tm->cno + 1)); tlen += len - (tm->cno + 1); } /* Set the current line. */ if (db_set(sp, fm->lno, bp, tlen)) goto err; /* Delete the last and intermediate lines. */ for (lno = tm->lno; lno > fm->lno; --lno) { if (db_delete(sp, lno)) goto err; ++sp->rptlines[L_DELETED]; if (lno % INTERRUPT_CHECK == 0 && INTERRUPTED(sp)) break; } done: rval = 0; if (0) err: rval = 1; if (bp != NULL) FREE_SPACEW(sp, bp, blen); return (rval); } nvi-1.81.6/common/dldb.c0100644000076400001440000000170010720065506014011 0ustar skimousers#include "config.h" #include #include "common.h" #include "pathnames.h" static void relocate __P(()); #define RELOC(func,returntype,args,proto,types) \ static returntype reloc_##func __P(proto); \ returntype (*nvi_##func) __P(proto) = reloc_##func; \ static returntype reloc_##func args \ types \ { \ relocate(); \ return nvi_##func args; \ } RELOC(db_create,int,(a,b,c),(DB **, DB_ENV *, u_int32_t), DB**a;DB_ENV*b;u_int32_t c;) RELOC(db_env_create,int,(a,b),(DB_ENV **, u_int32_t),DB_ENV ** a;u_int32_t b;); RELOC(db_strerror,char *,(a),(int),int a;) #define LOADSYM(func) \ if ((nvi_##func = dlsym(handle, #func)) == NULL) \ goto error; static void relocate() { void *handle = dlopen(_PATH_DB3, RTLD_LAZY); if (!handle) goto error; LOADSYM(db_create) LOADSYM(db_env_create) LOADSYM(db_strerror) return; error: fprintf(stderr, "Relocation error: %s\n", dlerror()); abort(); } nvi-1.81.6/common/exf.c0100644000076400001440000012707410720065506013703 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: exf.c,v 10.72 2003/08/10 09:44:01 skimo Exp $ (Berkeley) $Date: 2003/08/10 09:44:01 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #include #include /* * We include , because the flock(2) and open(2) #defines * were found there on historical systems. We also include * because the open(2) #defines are found there on newer systems. */ #include #include #include #include #include #include #include #include #include #include #include #include "common.h" static int file_backup __P((SCR *, char *, char *)); static void file_cinit __P((SCR *)); static void file_comment __P((SCR *)); static int file_spath __P((SCR *, FREF *, struct stat *, int *)); static int db_setup __P((SCR *sp, EXF *ep)); /* * file_add -- * Insert a file name into the FREF list, if it doesn't already * appear in it. * * !!! * The "if it doesn't already appear" changes vi's semantics slightly. If * you do a "vi foo bar", and then execute "next bar baz", the edit of bar * will reflect the line/column of the previous edit session. Historic nvi * did not do this. The change is a logical extension of the change where * vi now remembers the last location in any file that it has ever edited, * not just the previously edited file. * * PUBLIC: FREF *file_add __P((SCR *, char *)); */ FREF * file_add(SCR *sp, char *name) { GS *gp; FREF *frp, *tfrp; /* * Return it if it already exists. Note that we test against the * user's name, whatever that happens to be, including if it's a * temporary file. * * If the user added a file but was unable to initialize it, there * can be file list entries where the name field is NULL. Discard * them the next time we see them. */ gp = sp->gp; if (name != NULL) for (frp = gp->frefq.cqh_first; frp != (FREF *)&gp->frefq; frp = frp->q.cqe_next) { if (frp->name == NULL) { tfrp = frp->q.cqe_next; CIRCLEQ_REMOVE(&gp->frefq, frp, q); if (frp->name != NULL) free(frp->name); free(frp); frp = tfrp; continue; } if (!strcmp(frp->name, name)) return (frp); } /* Allocate and initialize the FREF structure. */ CALLOC(sp, frp, FREF *, 1, sizeof(FREF)); if (frp == NULL) return (NULL); /* * If no file name specified, or if the file name is a request * for something temporary, file_init() will allocate the file * name. Temporary files are always ignored. */ if (name != NULL && strcmp(name, TEMPORARY_FILE_STRING) && (frp->name = strdup(name)) == NULL) { free(frp); msgq(sp, M_SYSERR, NULL); return (NULL); } /* Append into the chain of file names. */ CIRCLEQ_INSERT_TAIL(&gp->frefq, frp, q); return (frp); } /* * file_init -- * Start editing a file, based on the FREF structure. If successsful, * let go of any previous file. Don't release the previous file until * absolutely sure we have the new one. * * PUBLIC: int file_init __P((SCR *, FREF *, char *, int)); */ int file_init(SCR *sp, FREF *frp, char *rcv_name, int flags) { EXF *ep; struct stat sb; size_t psize; int fd, exists, open_err, readonly, stolen; char *oname, tname[MAXPATHLEN]; stolen = open_err = readonly = 0; /* * If the file is a recovery file, let the recovery code handle it. * Clear the FR_RECOVER flag first -- the recovery code does set up, * and then calls us! If the recovery call fails, it's probably * because the named file doesn't exist. So, move boldly forward, * presuming that there's an error message the user will get to see. */ if (F_ISSET(frp, FR_RECOVER)) { F_CLR(frp, FR_RECOVER); return (rcv_read(sp, frp)); } /* * Required FRP initialization; the only flag we keep is the * cursor information. */ F_CLR(frp, ~FR_CURSORSET); /* * Scan the user's path to find the file that we're going to * try and open. */ if (file_spath(sp, frp, &sb, &exists)) return (1); /* * Check whether we already have this file opened in some * other screen. */ if (exists) { EXF *exfp; for (exfp = sp->gp->exfq.cqh_first; exfp != (EXF *)&sp->gp->exfq; exfp = exfp->q.cqe_next) { if (exfp->mdev == sb.st_dev && exfp->minode == sb.st_ino && (exfp != sp->ep || exfp->refcnt > 1)) { ep = exfp; goto postinit; } } } /* * Required EXF initialization: * Flush the line caches. * Default recover mail file fd to -1. * Set initial EXF flag bits. */ CALLOC_RET(sp, ep, EXF *, 1, sizeof(EXF)); CIRCLEQ_INIT(&ep->scrq); sp->c_lno = ep->c_nlines = OOBLNO; ep->rcv_fd = ep->fcntl_fd = -1; F_SET(ep, F_FIRSTMODIFY); /* * If no name or backing file, for whatever reason, create a backing * temporary file, saving the temp file name so we can later unlink * it. If the user never named this file, copy the temporary file name * to the real name (we display that until the user renames it). */ oname = frp->name; if (LF_ISSET(FS_OPENERR) || oname == NULL || !exists) { if (opts_empty(sp, O_TMP_DIRECTORY, 0)) goto err; (void)snprintf(tname, sizeof(tname), "%s/vi.XXXXXX", O_STR(sp, O_TMP_DIRECTORY)); if ((fd = mkstemp(tname)) == -1) { msgq(sp, M_SYSERR, "237|Unable to create temporary file"); goto err; } (void)close(fd); if (frp->name == NULL) F_SET(frp, FR_TMPFILE); if ((frp->tname = strdup(tname)) == NULL || (frp->name == NULL && (frp->name = strdup(tname)) == NULL)) { if (frp->tname != NULL) { free(frp->tname); } msgq(sp, M_SYSERR, NULL); (void)unlink(tname); goto err; } oname = frp->tname; psize = 1024; if (!LF_ISSET(FS_OPENERR)) F_SET(frp, FR_NEWFILE); time(&ep->mtime); } else { /* * XXX * A seat of the pants calculation: try to keep the file in * 15 pages or less. Don't use a page size larger than 10K * (vi should have good locality) or smaller than 1K. */ psize = ((sb.st_size / 15) + 1023) / 1024; if (psize > 10) psize = 10; if (psize == 0) psize = 1; psize *= 1024; F_SET(ep, F_DEVSET); ep->mdev = sb.st_dev; ep->minode = sb.st_ino; ep->mtime = sb.st_mtime; if (!S_ISREG(sb.st_mode)) msgq_str(sp, M_ERR, oname, "238|Warning: %s is not a regular file"); } /* Set up recovery. */ if (rcv_name == NULL) { /* ep->rcv_path NULL if rcv_tmp fails */ rcv_tmp(sp, ep, frp->name); } else { if ((ep->rcv_path = strdup(rcv_name)) == NULL) { msgq(sp, M_SYSERR, NULL); goto err; } F_SET(ep, F_MODIFIED); } if (db_setup(sp, ep)) goto err; /* Open a db structure. */ if ((sp->db_error = db_create(&ep->db, 0, 0)) != 0) { msgq(sp, M_DBERR, "db_create"); goto err; } ep->db->set_re_delim(ep->db, '\n'); /* Always set. */ ep->db->set_pagesize(ep->db, psize); ep->db->set_flags(ep->db, DB_RENUMBER | DB_SNAPSHOT); if (rcv_name == NULL) ep->db->set_re_source(ep->db, oname); /* * Don't let db use mmap when using fcntl for locking */ #ifdef HAVE_LOCK_FCNTL #define NOMMAPIFFCNTL DB_NOMMAP #else #define NOMMAPIFFCNTL 0 #endif #define _DB_OPEN_MODE S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH if ((sp->db_error = db_open(ep->db, ep->rcv_path, DB_RECNO, ((rcv_name == 0) ? DB_TRUNCATE : 0) | VI_DB_THREAD | NOMMAPIFFCNTL, _DB_OPEN_MODE)) != 0) { msgq_str(sp, M_DBERR, rcv_name == NULL ? oname : rcv_name, "%s"); /* * !!! * Historically, vi permitted users to edit files that couldn't * be read. This isn't useful for single files from a command * line, but it's quite useful for "vi *.c", since you can skip * past files that you can't read. */ ep->db = NULL; /* Don't close it; it wasn't opened */ if (LF_ISSET(FS_OPENERR)) goto err; open_err = 1; goto oerr; } /* re_source is loaded into the database. * Close it and reopen it in the environment. */ if ((sp->db_error = ep->db->close(ep->db, 0))) { msgq(sp, M_DBERR, "close"); goto err; } if ((sp->db_error = db_create(&ep->db, ep->env, 0)) != 0) { msgq(sp, M_DBERR, "db_create 2"); goto err; } if ((sp->db_error = db_open(ep->db, ep->rcv_path, DB_RECNO, VI_DB_THREAD | NOMMAPIFFCNTL, _DB_OPEN_MODE)) != 0) { msgq_str(sp, M_DBERR, ep->rcv_path, "%s"); goto err; } /* * Do the remaining things that can cause failure of the new file, * mark and logging initialization. */ if (mark_init(sp, ep) || log_init(sp, ep)) goto err; postinit: /* * Set the alternate file name to be the file we're discarding. * * !!! * Temporary files can't become alternate files, so there's no file * name. This matches historical practice, although it could only * happen in historical vi as the result of the initial command, i.e. * if vi was executed without a file name. */ if (LF_ISSET(FS_SETALT)) set_alt_name(sp, sp->frp == NULL || F_ISSET(sp->frp, FR_TMPFILE) ? NULL : sp->frp->name); /* * Close the previous file; if that fails, close the new one and run * for the border. * * !!! * There's a nasty special case. If the user edits a temporary file, * and then does an ":e! %", we need to re-initialize the backing * file, but we can't change the name. (It's worse -- we're dealing * with *names* here, we can't even detect that it happened.) Set a * flag so that the file_end routine ignores the backing information * of the old file if it happens to be the same as the new one. * * !!! * Side-effect: after the call to file_end(), sp->frp may be NULL. */ if (sp->ep != NULL) { F_SET(frp, FR_DONTDELETE); if (file_end(sp, NULL, LF_ISSET(FS_FORCE))) { (void)file_end(sp, ep, 1); goto err; } sp->ep = NULL; F_CLR(frp, FR_DONTDELETE); } /* * Lock the file; if it's a recovery file, it should already be * locked. Note, we acquire the lock after the previous file * has been ended, so that we don't get an "already locked" error * for ":edit!". * * XXX * While the user can't interrupt us between the open and here, * there's a race between the dbopen() and the lock. Not much * we can do about it. * * XXX * We don't make a big deal of not being able to lock the file. As * locking rarely works over NFS, and often fails if the file was * mmap(2)'d, it's far too common to do anything like print an error * message, let alone make the file readonly. At some future time, * when locking is a little more reliable, this should change to be * an error. */ if (rcv_name == NULL && ep->refcnt == 0) { if ((ep->fd = open(oname, O_RDWR)) == -1) goto no_lock; switch (file_lock(sp, oname, &ep->fcntl_fd, ep->fd, 1)) { case LOCK_FAILED: no_lock: F_SET(frp, FR_UNLOCKED); break; case LOCK_UNAVAIL: readonly = 1; msgq_str(sp, M_INFO, oname, "239|%s already locked, session is read-only"); break; case LOCK_SUCCESS: break; } } /* * Historically, the readonly edit option was set per edit buffer in * vi, unless the -R command-line option was specified or the program * was executed as "view". (Well, to be truthful, if the letter 'w' * occurred anywhere in the program name, but let's not get into that.) * So, the persistant readonly state has to be stored in the screen * structure, and the edit option value toggles with the contents of * the edit buffer. If the persistant readonly flag is set, set the * readonly edit option. * * Otherwise, try and figure out if a file is readonly. This is a * dangerous thing to do. The kernel is the only arbiter of whether * or not a file is writeable, and the best that a user program can * do is guess. Obvious loopholes are files that are on a file system * mounted readonly (access catches this one on a few systems), or * alternate protection mechanisms, ACL's for example, that we can't * portably check. Lots of fun, and only here because users whined. * * !!! * Historic vi displayed the readonly message if none of the file * write bits were set, or if an an access(2) call on the path * failed. This seems reasonable. If the file is mode 444, root * users may want to know that the owner of the file did not expect * it to be written. * * Historic vi set the readonly bit if no write bits were set for * a file, even if the access call would have succeeded. This makes * the superuser force the write even when vi expects that it will * succeed. I'm less supportive of this semantic, but it's historic * practice and the conservative approach to vi'ing files as root. * * It would be nice if there was some way to update this when the user * does a "^Z; chmod ...". The problem is that we'd first have to * distinguish between readonly bits set because of file permissions * and those set for other reasons. That's not too hard, but deciding * when to reevaluate the permissions is trickier. An alternative * might be to turn off the readonly bit if the user forces a write * and it succeeds. * * XXX * Access(2) doesn't consider the effective uid/gid values. This * probably isn't a problem for vi when it's running standalone. */ if (readonly || F_ISSET(sp, SC_READONLY) || (!F_ISSET(frp, FR_NEWFILE) && (!(sb.st_mode & (S_IWUSR | S_IWGRP | S_IWOTH)) || access(frp->name, W_OK)))) O_SET(sp, O_READONLY); else O_CLR(sp, O_READONLY); /* Switch... */ ++ep->refcnt; CIRCLEQ_INSERT_HEAD(&ep->scrq, sp, eq); sp->ep = ep; sp->frp = frp; /* Set the initial cursor position, queue initial command. */ file_cinit(sp); /* Report conversion errors again. */ F_CLR(sp, SC_CONV_ERROR); /* Redraw the screen from scratch, schedule a welcome message. */ F_SET(sp, SC_SCR_REFORMAT | SC_STATUS); if (frp->lno == OOBLNO) F_SET(sp, SC_SCR_TOP); /* Append into the chain of file structures. */ if (ep->refcnt == 1) CIRCLEQ_INSERT_TAIL(&sp->gp->exfq, ep, q); return (0); err: if (frp->name != NULL) { free(frp->name); frp->name = NULL; } if (frp->tname != NULL) { (void)unlink(frp->tname); free(frp->tname); frp->tname = NULL; } oerr: if (F_ISSET(ep, F_RCV_ON)) (void)unlink(ep->rcv_path); if (ep->rcv_path != NULL) { free(ep->rcv_path); ep->rcv_path = NULL; } if (ep->db != NULL) { (void)ep->db->close(ep->db, DB_NOSYNC); ep->db = NULL; } free(ep); return (open_err && !LF_ISSET(FS_OPENERR) ? file_init(sp, frp, rcv_name, flags | FS_OPENERR) : 1); } /* * file_spath -- * Scan the user's path to find the file that we're going to * try and open. */ static int file_spath(SCR *sp, FREF *frp, struct stat *sbp, int *existsp) { CHAR_T savech; size_t len; int found; char *name, *p, *t, path[MAXPATHLEN]; /* * If the name is NULL or an explicit reference (i.e., the first * component is . or ..) ignore the O_PATH option. */ name = frp->name; if (name == NULL) { *existsp = 0; return (0); } if (name[0] == '/' || (name[0] == '.' && (name[1] == '/' || (name[1] == '.' && name[2] == '/')))) { *existsp = !stat(name, sbp); return (0); } /* Try . */ if (!stat(name, sbp)) { *existsp = 1; return (0); } /* Try the O_PATH option values. */ for (found = 0, p = t = O_STR(sp, O_PATH);; ++p) if (*p == ':' || *p == '\0') { if (t < p - 1) { savech = *p; *p = '\0'; len = snprintf(path, sizeof(path), "%s/%s", t, name); *p = savech; if (!stat(path, sbp)) { found = 1; break; } } t = p + 1; if (*p == '\0') break; } /* If we found it, build a new pathname and discard the old one. */ if (found) { MALLOC_RET(sp, p, char *, len + 1); memcpy(p, path, len + 1); free(frp->name); frp->name = p; } *existsp = found; return (0); } /* * file_cinit -- * Set up the initial cursor position. */ static void file_cinit(SCR *sp) { GS *gp; MARK m; size_t len; int nb; CHAR_T *wp; size_t wlen; /* Set some basic defaults. */ sp->lno = 1; sp->cno = 0; /* * Historically, initial commands (the -c option) weren't executed * until a file was loaded, e.g. "vi +10 nofile", followed by an * :edit or :tag command, would execute the +10 on the file loaded * by the subsequent command, (assuming that it existed). This * applied as well to files loaded using the tag commands, and we * follow that historic practice. Also, all initial commands were * ex commands and were always executed on the last line of the file. * * Otherwise, if no initial command for this file: * If in ex mode, move to the last line, first nonblank character. * If the file has previously been edited, move to the last known * position, and check it for validity. * Otherwise, move to the first line, first nonblank. * * This gets called by the file init code, because we may be in a * file of ex commands and we want to execute them from the right * location in the file. */ nb = 0; gp = sp->gp; if (gp->c_option != NULL && !F_ISSET(sp->frp, FR_NEWFILE)) { if (db_last(sp, &sp->lno)) return; if (sp->lno == 0) { sp->lno = 1; sp->cno = 0; } CHAR2INT(sp, gp->c_option, strlen(gp->c_option) + 1, wp, wlen); if (ex_run_str(sp, "-c option", wp, wlen - 1, 1, 1)) return; gp->c_option = NULL; } else if (F_ISSET(sp, SC_EX)) { if (db_last(sp, &sp->lno)) return; if (sp->lno == 0) { sp->lno = 1; sp->cno = 0; return; } nb = 1; } else { if (F_ISSET(sp->frp, FR_CURSORSET)) { sp->lno = sp->frp->lno; sp->cno = sp->frp->cno; /* If returning to a file in vi, center the line. */ F_SET(sp, SC_SCR_CENTER); } else { if (O_ISSET(sp, O_COMMENT)) file_comment(sp); else sp->lno = 1; nb = 1; } if (db_get(sp, sp->lno, 0, NULL, &len)) { sp->lno = 1; sp->cno = 0; return; } if (!nb && sp->cno > len) nb = 1; } if (nb) { sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } /* * !!! * The initial column is also the most attractive column. */ sp->rcm = sp->cno; /* * !!! * Historically, vi initialized the absolute mark, but ex did not. * Which meant, that if the first command in ex mode was "visual", * or if an ex command was executed first (e.g. vi +10 file) vi was * entered without the mark being initialized. For consistency, if * the file isn't empty, we initialize it for everyone, believing * that it can't hurt, and is generally useful. Not initializing it * if the file is empty is historic practice, although it has always * been possible to set (and use) marks in empty vi files. */ m.lno = sp->lno; m.cno = sp->cno; (void)mark_set(sp, ABSMARK1, &m, 0); } /* * file_end -- * Stop editing a file. * * PUBLIC: int file_end __P((SCR *, EXF *, int)); */ int file_end(SCR *sp, EXF *ep, int force) { FREF *frp; /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. * (If argument ep is NULL, use sp->ep.) * * If multiply referenced, just decrement the count and return. */ if (ep == NULL) ep = sp->ep; CIRCLEQ_REMOVE(&ep->scrq, sp, eq); if (--ep->refcnt != 0) return (0); /* * * Clean up the FREF structure. * * Save the cursor location. * * XXX * It would be cleaner to do this somewhere else, but by the time * ex or vi knows that we're changing files it's already happened. */ frp = sp->frp; frp->lno = sp->lno; frp->cno = sp->cno; F_SET(frp, FR_CURSORSET); /* * We may no longer need the temporary backing file, so clean it * up. We don't need the FREF structure either, if the file was * never named, so lose it. * * !!! * Re: FR_DONTDELETE, see the comment above in file_init(). */ if (!F_ISSET(frp, FR_DONTDELETE) && frp->tname != NULL) { if (unlink(frp->tname)) msgq_str(sp, M_SYSERR, frp->tname, "240|%s: remove"); free(frp->tname); frp->tname = NULL; if (F_ISSET(frp, FR_TMPFILE)) { CIRCLEQ_REMOVE(&sp->gp->frefq, frp, q); if (frp->name != NULL) free(frp->name); free(frp); } sp->frp = NULL; } /* * Clean up the EXF structure. * * Close the db structure. */ if (ep->db->close != NULL) { if ((sp->db_error = ep->db->close(ep->db, DB_NOSYNC)) != 0 && !force) { msgq_str(sp, M_DBERR, frp->name, "241|%s: close"); CIRCLEQ_INSERT_HEAD(&ep->scrq, sp, eq); ++ep->refcnt; return (1); } ep->db = NULL; } /* COMMITTED TO THE CLOSE. THERE'S NO GOING BACK... */ /* Stop logging. */ (void)log_end(sp, ep); /* Free up any marks. */ (void)mark_end(sp, ep); if (ep->env) { DB_ENV *env; ep->env->close(ep->env, 0); ep->env = 0; if ((sp->db_error = db_env_create(&env, 0))) msgq(sp, M_DBERR, "env_create"); if ((sp->db_error = db_env_remove(env, ep->env_path, 0))) msgq(sp, M_DBERR, "env->remove"); if (ep->env_path != NULL && rmdir(ep->env_path)) msgq_str(sp, M_SYSERR, ep->env_path, "242|%s: remove"); } /* * Delete recovery files, close the open descriptor, free recovery * memory. See recover.c for a description of the protocol. * * XXX * Unlink backup file first, we can detect that the recovery file * doesn't reference anything when the user tries to recover it. * There's a race, here, obviously, but it's fairly small. */ if (!F_ISSET(ep, F_RCV_NORM)) { if (ep->rcv_path != NULL && unlink(ep->rcv_path)) msgq_str(sp, M_SYSERR, ep->rcv_path, "242|%s: remove"); if (ep->rcv_mpath != NULL && unlink(ep->rcv_mpath)) msgq_str(sp, M_SYSERR, ep->rcv_mpath, "243|%s: remove"); } CIRCLEQ_REMOVE(&sp->gp->exfq, ep, q); if (ep->fd != -1) (void)close(ep->fd); if (ep->fcntl_fd != -1) (void)close(ep->fcntl_fd); if (ep->rcv_fd != -1) (void)close(ep->rcv_fd); if (ep->env_path != NULL) free(ep->env_path); if (ep->rcv_path != NULL) free(ep->rcv_path); if (ep->rcv_mpath != NULL) free(ep->rcv_mpath); free(ep); return (0); } /* * file_write -- * Write the file to disk. Historic vi had fairly convoluted * semantics for whether or not writes would happen. That's * why all the flags. * * PUBLIC: int file_write __P((SCR *, MARK *, MARK *, char *, int)); */ int file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags) { enum { NEWFILE, OLDFILE } mtype; struct stat sb; EXF *ep; FILE *fp; FREF *frp; MARK from, to; size_t len; u_long nlno, nch; int fd, nf, noname, oflags, rval; char *p, *s, *t, buf[MAXPATHLEN + 64]; const char *msgstr; ep = sp->ep; frp = sp->frp; /* * Writing '%', or naming the current file explicitly, has the * same semantics as writing without a name. */ if (name == NULL || !strcmp(name, frp->name)) { noname = 1; name = frp->name; } else noname = 0; /* Can't write files marked read-only, unless forced. */ if (!LF_ISSET(FS_FORCE) && noname && O_ISSET(sp, O_READONLY)) { msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ? "244|Read-only file, not written; use ! to override" : "245|Read-only file, not written"); return (1); } /* If not forced, not appending, and "writeany" not set ... */ if (!LF_ISSET(FS_FORCE | FS_APPEND) && !O_ISSET(sp, O_WRITEANY)) { /* Don't overwrite anything but the original file. */ if ((!noname || F_ISSET(frp, FR_NAMECHANGE)) && !stat(name, &sb)) { msgq_str(sp, M_ERR, name, LF_ISSET(FS_POSSIBLE) ? "246|%s exists, not written; use ! to override" : "247|%s exists, not written"); return (1); } /* * Don't write part of any existing file. Only test for the * original file, the previous test catches anything else. */ if (!LF_ISSET(FS_ALL) && noname && !stat(name, &sb)) { msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ? "248|Partial file, not written; use ! to override" : "249|Partial file, not written"); return (1); } } /* * Figure out if the file already exists -- if it doesn't, we display * the "new file" message. The stat might not be necessary, but we * just repeat it because it's easier than hacking the previous tests. * The information is only used for the user message and modification * time test, so we can ignore the obvious race condition. * * One final test. If we're not forcing or appending the current file, * and we have a saved modification time, object if the file changed * since we last edited or wrote it, and make them force it. */ if (stat(name, &sb)) mtype = NEWFILE; else { if (noname && !LF_ISSET(FS_FORCE | FS_APPEND) && ((F_ISSET(ep, F_DEVSET) && (sb.st_dev != ep->mdev || sb.st_ino != ep->minode)) || sb.st_mtime != ep->mtime)) { msgq_str(sp, M_ERR, name, LF_ISSET(FS_POSSIBLE) ? "250|%s: file modified more recently than this copy; use ! to override" : "251|%s: file modified more recently than this copy"); return (1); } mtype = OLDFILE; } /* Set flags to create, write, and either append or truncate. */ oflags = O_CREAT | O_WRONLY | (LF_ISSET(FS_APPEND) ? O_APPEND : O_TRUNC); /* Backup the file if requested. */ if (!opts_empty(sp, O_BACKUP, 1) && file_backup(sp, name, O_STR(sp, O_BACKUP)) && !LF_ISSET(FS_FORCE)) return (1); /* Open the file. */ SIGBLOCK; if ((fd = open(name, oflags, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) < 0) { msgq_str(sp, M_SYSERR, name, "%s"); SIGUNBLOCK; return (1); } SIGUNBLOCK; /* Try and get a lock. */ if (!noname && file_lock(sp, NULL, NULL, fd, 0) == LOCK_UNAVAIL) msgq_str(sp, M_ERR, name, "252|%s: write lock was unavailable"); #if __linux__ /* * XXX * In libc 4.5.x, fdopen(fd, "w") clears the O_APPEND flag (if set). * This bug is fixed in libc 4.6.x. * * This code works around this problem for libc 4.5.x users. * Note that this code is harmless if you're using libc 4.6.x. */ if (LF_ISSET(FS_APPEND) && lseek(fd, (off_t)0, SEEK_END) < 0) { msgq(sp, M_SYSERR, name); return (1); } #endif /* * Use stdio for buffering. * * XXX * SVR4.2 requires the fdopen mode exactly match the original open * mode, i.e. you have to open with "a" if appending. */ if ((fp = fdopen(fd, LF_ISSET(FS_APPEND) ? "a" : "w")) == NULL) { msgq_str(sp, M_SYSERR, name, "%s"); (void)close(fd); return (1); } /* Build fake addresses, if necessary. */ if (fm == NULL) { from.lno = 1; from.cno = 0; fm = &from; if (db_last(sp, &to.lno)) return (1); to.cno = 0; tm = &to; } rval = ex_writefp(sp, name, fp, fm, tm, &nlno, &nch, 0); /* * Save the new last modification time -- even if the write fails * we re-init the time. That way the user can clean up the disk * and rewrite without having to force it. */ if (noname) { if (stat(name, &sb)) time(&ep->mtime); else { F_SET(ep, F_DEVSET); ep->mdev = sb.st_dev; ep->minode = sb.st_ino; ep->mtime = sb.st_mtime; } } /* * If the write failed, complain loudly. ex_writefp() has already * complained about the actual error, reinforce it if data was lost. */ if (rval) { if (!LF_ISSET(FS_APPEND)) msgq_str(sp, M_ERR, name, "254|%s: WARNING: FILE TRUNCATED"); return (1); } /* * Once we've actually written the file, it doesn't matter that the * file name was changed -- if it was, we've already whacked it. */ F_CLR(frp, FR_NAMECHANGE); /* * If wrote the entire file, and it wasn't by appending it to a file, * clear the modified bit. If the file was written to the original * file name and the file is a temporary, set the "no exit" bit. This * permits the user to write the file and use it in the context of the * filesystem, but still keeps them from discarding their changes by * exiting. */ if (LF_ISSET(FS_ALL) && !LF_ISSET(FS_APPEND)) { F_CLR(ep, F_MODIFIED); if (F_ISSET(frp, FR_TMPFILE)) { if (noname) F_SET(frp, FR_TMPEXIT); else F_CLR(frp, FR_TMPEXIT); } } p = msg_print(sp, name, &nf); switch (mtype) { case NEWFILE: msgstr = msg_cat(sp, "256|%s: new file: %lu lines, %lu characters", NULL); len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch); break; case OLDFILE: msgstr = msg_cat(sp, LF_ISSET(FS_APPEND) ? "315|%s: appended: %lu lines, %lu characters" : "257|%s: %lu lines, %lu characters", NULL); len = snprintf(buf, sizeof(buf), msgstr, p, nlno, nch); break; default: abort(); } /* * There's a nasty problem with long path names. Cscope and tags files * can result in long paths and vi will request a continuation key from * the user. Unfortunately, the user has typed ahead, and chaos will * result. If we assume that the characters in the filenames only take * a single screen column each, we can trim the filename. */ s = buf; if (len >= sp->cols) { for (s = buf, t = buf + strlen(p); s < t && (*s != '/' || len >= sp->cols - 3); ++s, --len); if (s == t) s = buf; else { *--s = '.'; /* Leading ellipses. */ *--s = '.'; *--s = '.'; } } msgq(sp, M_INFO, s); if (nf) FREE_SPACE(sp, p, 0); return (0); } /* * file_backup -- * Backup the about-to-be-written file. * * XXX * We do the backup by copying the entire file. It would be nice to do * a rename instead, but: (1) both files may not fit and we want to fail * before doing the rename; (2) the backup file may not be on the same * disk partition as the file being written; (3) there may be optional * file information (MACs, DACs, whatever) that we won't get right if we * recreate the file. So, let's not risk it. */ static int file_backup(SCR *sp, char *name, char *bname) { struct dirent *dp; struct stat sb; DIR *dirp; EXCMD cmd; off_t off; size_t blen; int flags, maxnum, nr, num, nw, rfd, wfd, version; char *bp, *estr, *p, *pct, *slash, *t, *wfname, buf[8192]; CHAR_T *wp; size_t wlen; size_t nlen; char *d = NULL; rfd = wfd = -1; bp = estr = wfname = NULL; /* * Open the current file for reading. Do this first, so that * we don't exec a shell before the most likely failure point. * If it doesn't exist, it's okay, there's just nothing to back * up. */ errno = 0; if ((rfd = open(name, O_RDONLY, 0)) < 0) { if (errno == ENOENT) return (0); estr = name; goto err; } /* * If the name starts with an 'N' character, add a version number * to the name. Strip the leading N from the string passed to the * expansion routines, for no particular reason. It would be nice * to permit users to put the version number anywhere in the backup * name, but there isn't a special character that we can use in the * name, and giving a new character a special meaning leads to ugly * hacks both here and in the supporting ex routines. * * Shell and file name expand the option's value. */ ex_cinit(sp, &cmd, 0, 0, 0, 0, 0); if (bname[0] == 'N') { version = 1; ++bname; } else version = 0; CHAR2INT(sp, bname, strlen(bname) + 1, wp, wlen); if (argv_exp2(sp, &cmd, wp, wlen - 1)) return (1); /* * 0 args: impossible. * 1 args: use it. * >1 args: object, too many args. */ if (cmd.argc != 1) { msgq_str(sp, M_ERR, bname, "258|%s expanded into too many file names"); (void)close(rfd); return (1); } /* * If appending a version number, read through the directory, looking * for file names that match the name followed by a number. Make all * of the other % characters in name literal, so the user doesn't get * surprised and sscanf doesn't drop core indirecting through pointers * that don't exist. If any such files are found, increment its number * by one. */ if (version) { GET_SPACE_GOTOC(sp, bp, blen, cmd.argv[0]->len * 2 + 50); INT2SYS(sp, cmd.argv[0]->bp, cmd.argv[0]->len + 1, p, nlen); d = strdup(p); p = d; for (t = bp, slash = NULL; p[0] != '\0'; *t++ = *p++) if (p[0] == '%') { if (p[1] != '%') *t++ = '%'; } else if (p[0] == '/') slash = t; pct = t; *t++ = '%'; *t++ = 'd'; *t = '\0'; if (slash == NULL) { dirp = opendir("."); p = bp; } else { *slash = '\0'; dirp = opendir(bp); *slash = '/'; p = slash + 1; } if (dirp == NULL) { INT2SYS(sp, cmd.argv[0]->bp, cmd.argv[0]->len + 1, estr, nlen); goto err; } for (maxnum = 0; (dp = readdir(dirp)) != NULL;) if (sscanf(dp->d_name, p, &num) == 1 && num > maxnum) maxnum = num; (void)closedir(dirp); /* Format the backup file name. */ (void)snprintf(pct, blen - (pct - bp), "%d", maxnum + 1); wfname = bp; } else { bp = NULL; INT2SYS(sp, cmd.argv[0]->bp, cmd.argv[0]->len + 1, wfname, nlen); } /* Open the backup file, avoiding lurkers. */ if (stat(wfname, &sb) == 0) { if (!S_ISREG(sb.st_mode)) { msgq_str(sp, M_ERR, bname, "259|%s: not a regular file"); goto err; } if (sb.st_uid != getuid()) { msgq_str(sp, M_ERR, bname, "260|%s: not owned by you"); goto err; } if (sb.st_mode & (S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)) { msgq_str(sp, M_ERR, bname, "261|%s: accessible by a user other than the owner"); goto err; } flags = O_TRUNC; } else flags = O_CREAT | O_EXCL; if ((wfd = open(wfname, flags | O_WRONLY, S_IRUSR | S_IWUSR)) < 0) { estr = bname; goto err; } /* Copy the file's current contents to its backup value. */ while ((nr = read(rfd, buf, sizeof(buf))) > 0) for (off = 0; nr != 0; nr -= nw, off += nw) if ((nw = write(wfd, buf + off, nr)) < 0) { estr = wfname; goto err; } if (nr < 0) { estr = name; goto err; } if (close(rfd)) { estr = name; goto err; } if (close(wfd)) { estr = wfname; goto err; } if (bp != NULL) FREE_SPACE(sp, bp, blen); return (0); alloc_err: err: if (rfd != -1) (void)close(rfd); if (wfd != -1) { (void)unlink(wfname); (void)close(wfd); } if (estr) msgq_str(sp, M_SYSERR, estr, "%s"); if (d != NULL) free(d); if (bp != NULL) FREE_SPACE(sp, bp, blen); return (1); } /* * file_comment -- * Skip the first comment. */ static void file_comment(SCR *sp) { db_recno_t lno; size_t len; CHAR_T *p; for (lno = 1; !db_get(sp, lno, 0, &p, &len) && len == 0; ++lno); if (p == NULL) return; if (p[0] == '#') { F_SET(sp, SC_SCR_TOP); while (!db_get(sp, ++lno, 0, &p, &len)) if (len < 1 || p[0] != '#') { sp->lno = lno; return; } } else if (len > 1 && p[0] == '/' && p[1] == '*') { F_SET(sp, SC_SCR_TOP); do { for (; len > 1; --len, ++p) if (p[0] == '*' && p[1] == '/') { sp->lno = lno; return; } } while (!db_get(sp, ++lno, 0, &p, &len)); } else if (len > 1 && p[0] == '/' && p[1] == '/') { F_SET(sp, SC_SCR_TOP); while (!db_get(sp, ++lno, 0, &p, &len)) if (len < 1 || p[0] != '/' || p[1] != '/') { sp->lno = lno; return; } } } /* * file_m1 -- * First modification check routine. The :next, :prev, :rewind, :tag, * :tagpush, :tagpop, ^^ modifications check. * * PUBLIC: int file_m1 __P((SCR *, int, int)); */ int file_m1(SCR *sp, int force, int flags) { EXF *ep; ep = sp->ep; /* If no file loaded, return no modifications. */ if (ep == NULL) return (0); /* * If the file has been modified, we'll want to write it back or * fail. If autowrite is set, we'll write it back automatically, * unless force is also set. Otherwise, we fail unless forced or * there's another open screen on this file. */ if (F_ISSET(ep, F_MODIFIED)) { if (O_ISSET(sp, O_AUTOWRITE)) { if (!force && file_aw(sp, flags)) return (1); } else if (ep->refcnt <= 1 && !force) { msgq(sp, M_ERR, LF_ISSET(FS_POSSIBLE) ? "262|File modified since last complete write; write or use ! to override" : "263|File modified since last complete write; write or use :edit! to override"); return (1); } } return (file_m3(sp, force)); } /* * file_m2 -- * Second modification check routine. The :edit, :quit, :recover * modifications check. * * PUBLIC: int file_m2 __P((SCR *, int)); */ int file_m2(SCR *sp, int force) { EXF *ep; ep = sp->ep; /* If no file loaded, return no modifications. */ if (ep == NULL) return (0); /* * If the file has been modified, we'll want to fail, unless forced * or there's another open screen on this file. */ if (F_ISSET(ep, F_MODIFIED) && ep->refcnt <= 1 && !force) { msgq(sp, M_ERR, "264|File modified since last complete write; write or use ! to override"); return (1); } return (file_m3(sp, force)); } /* * file_m3 -- * Third modification check routine. * * PUBLIC: int file_m3 __P((SCR *, int)); */ int file_m3(SCR *sp, int force) { EXF *ep; ep = sp->ep; /* If no file loaded, return no modifications. */ if (ep == NULL) return (0); /* * Don't exit while in a temporary files if the file was ever modified. * The problem is that if the user does a ":wq", we write and quit, * unlinking the temporary file. Not what the user had in mind at all. * We permit writing to temporary files, so that user maps using file * system names work with temporary files. */ if (F_ISSET(sp->frp, FR_TMPEXIT) && ep->refcnt <= 1 && !force) { msgq(sp, M_ERR, "265|File is a temporary; exit will discard modifications"); return (1); } return (0); } /* * file_aw -- * Autowrite routine. If modified, autowrite is set and the readonly bit * is not set, write the file. A routine so there's a place to put the * comment. * * PUBLIC: int file_aw __P((SCR *, int)); */ int file_aw(SCR *sp, int flags) { if (!F_ISSET(sp->ep, F_MODIFIED)) return (0); if (!O_ISSET(sp, O_AUTOWRITE)) return (0); /* * !!! * Historic 4BSD vi attempted to write the file if autowrite was set, * regardless of the writeability of the file (as defined by the file * readonly flag). System V changed this as some point, not attempting * autowrite if the file was readonly. This feels like a bug fix to * me (e.g. the principle of least surprise is violated if readonly is * set and vi writes the file), so I'm compatible with System V. */ if (O_ISSET(sp, O_READONLY)) { msgq(sp, M_INFO, "266|File readonly, modifications not auto-written"); return (1); } return (file_write(sp, NULL, NULL, NULL, flags)); } /* * set_alt_name -- * Set the alternate pathname. * * Set the alternate pathname. It's a routine because I wanted some place * to hang this comment. The alternate pathname (normally referenced using * the special character '#' during file expansion and in the vi ^^ command) * is set by almost all ex commands that take file names as arguments. The * rules go something like this: * * 1: If any ex command takes a file name as an argument (except for the * :next command), the alternate pathname is set to that file name. * This excludes the command ":e" and ":w !command" as no file name * was specified. Note, historically, the :source command did not set * the alternate pathname. It does in nvi, for consistency. * * 2: However, if any ex command sets the current pathname, e.g. the * ":e file" or ":rew" commands succeed, then the alternate pathname * is set to the previous file's current pathname, if it had one. * This includes the ":file" command and excludes the ":e" command. * So, by rule #1 and rule #2, if ":edit foo" fails, the alternate * pathname will be "foo", if it succeeds, the alternate pathname will * be the previous current pathname. The ":e" command will not set * the alternate or current pathnames regardless. * * 3: However, if it's a read or write command with a file argument and * the current pathname has not yet been set, the file name becomes * the current pathname, and the alternate pathname is unchanged. * * If the user edits a temporary file, there may be times when there is no * alternative file name. A name argument of NULL turns it off. * * PUBLIC: void set_alt_name __P((SCR *, char *)); */ void set_alt_name(SCR *sp, char *name) { if (sp->alt_name != NULL) free(sp->alt_name); if (name == NULL) sp->alt_name = NULL; else if ((sp->alt_name = strdup(name)) == NULL) msgq(sp, M_SYSERR, NULL); } /* * file_lock -- * Get an exclusive lock on a file and set close-on-exec flag * * XXX * The default locking is flock(2) style, not fcntl(2). The latter is * known to fail badly on some systems, and its only advantage is that * it occasionally works over NFS. * * Furthermore, the semantics of fcntl(2) are wrong. The problems are * two-fold: you can't close any file descriptor associated with the file * without losing all of the locks, and you can't get an exclusive lock * unless you have the file open for writing. Someone ought to be shot, * but it's probably too late, they may already have reproduced. To get * around these problems, nvi opens the files for writing when it can and * acquires a second file descriptor when it can't. The recovery files * are examples of the former, they're always opened for writing. The DB * files can't be opened for writing because the semantics of DB are that * files opened for writing are flushed back to disk when the DB session * is ended. So, in that case we have to acquire an extra file descriptor. * * PUBLIC: lockr_t file_lock __P((SCR *, char *, int *, int, int)); */ lockr_t file_lock(SCR *sp, char *name, int *fdp, int fd, int iswrite) { fcntl(fd, F_SETFD, 1); if (!O_ISSET(sp, O_LOCKFILES)) return (LOCK_SUCCESS); #ifdef HAVE_LOCK_FLOCK /* Hurrah! We've got flock(2). */ /* * !!! * We need to distinguish a lock not being available for the file * from the file system not supporting locking. Flock is documented * as returning EWOULDBLOCK; add EAGAIN for good measure, and assume * they are the former. There's no portable way to do this. */ errno = 0; return (flock(fd, LOCK_EX | LOCK_NB) ? errno == EAGAIN #ifdef EWOULDBLOCK || errno == EWOULDBLOCK #endif ? LOCK_UNAVAIL : LOCK_FAILED : LOCK_SUCCESS); #endif #ifdef HAVE_LOCK_FCNTL /* Gag me. We've got fcntl(2). */ { struct flock arg; int didopen, sverrno; arg.l_type = F_WRLCK; arg.l_whence = 0; /* SEEK_SET */ arg.l_start = arg.l_len = 0; arg.l_pid = 0; /* * If the file descriptor isn't opened for writing, it must fail. * If we fail because we can't get a read/write file descriptor, * we return LOCK_SUCCESS, believing that the file is readonly * and that will be sufficient to warn the user. */ if (!iswrite) { if (name == NULL || fdp == NULL) return (LOCK_FAILED); if ((fd = open(name, O_RDWR, 0)) == -1) return (LOCK_SUCCESS); *fdp = fd; didopen = 1; } errno = 0; if (!fcntl(fd, F_SETLK, &arg)) return (LOCK_SUCCESS); if (didopen) { sverrno = errno; (void)close(fd); errno = sverrno; } /* * !!! * We need to distinguish a lock not being available for the file * from the file system not supporting locking. Fcntl is documented * as returning EACCESS and EAGAIN; add EWOULDBLOCK for good measure, * and assume they are the former. There's no portable way to do this. */ return (errno == EACCES || errno == EAGAIN #ifdef EWOULDBLOCK || errno == EWOULDBLOCK #endif ? LOCK_UNAVAIL : LOCK_FAILED); } #endif #if !defined(HAVE_LOCK_FLOCK) && !defined(HAVE_LOCK_FCNTL) return (LOCK_SUCCESS); #endif } #ifdef USE_DB4_LOGGING #define VI_DB_INIT_LOG DB_INIT_LOG #else #define VI_DB_INIT_LOG 0 #endif static int db_setup(SCR *sp, EXF *ep) { char path[MAXPATHLEN]; int fd; DB_ENV *env; (void)snprintf(path, sizeof(path), "%s/vi.XXXXXX", O_STR(sp, O_RECDIR)); if ((fd = mkstemp(path)) == -1) { msgq(sp, M_SYSERR, "%s", path); goto err; } (void)close(fd); (void)unlink(path); if (mkdir(path, S_IRWXU)) { msgq(sp, M_SYSERR, "%s", path); goto err; } if (db_env_create(&env, 0)) { msgq(sp, M_ERR, "env_create"); goto err; } #ifdef USE_DB4_LOGGING if ((sp->db_error = vi_db_init_recover(env))) { msgq(sp, M_DBERR, "init_recover"); goto err; } if ((sp->db_error = __vi_init_recover(env))) { msgq(sp, M_DBERR, "init_recover"); goto err; } #endif if ((sp->db_error = db_env_open(env, path, DB_PRIVATE | DB_CREATE | DB_INIT_MPOOL | VI_DB_THREAD | VI_DB_INIT_LOG, 0)) != 0) { msgq(sp, M_DBERR, "env->open"); goto err; } if ((ep->env_path = strdup(path)) == NULL) { msgq(sp, M_SYSERR, NULL); (void)rmdir(path); goto err; } ep->env = env; return 0; err: return 1; } nvi-1.81.6/common/exf.h0100644000076400001440000000621110720065506013675 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: exf.h,v 10.19 2002/03/02 23:36:23 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:36:23 $ */ /* Undo direction. */ /* * exf -- * The file structure. */ struct _exf { CIRCLEQ_ENTRY(_exf) q; /* Linked list of file structures. */ int refcnt; /* Reference count. */ CIRCLEQ_HEAD(_escrh, _scr) scrq; /* Attached screens */ /* Underlying database state. */ DB_ENV *env; /* The DB environment. */ char *env_path; /* DB environment directory. */ DB *db; /* File db structure. */ db_recno_t c_nlines; /* Cached lines in the file. */ DB *log; /* Log db structure. */ db_recno_t l_high; /* Log last + 1 record number. */ db_recno_t l_cur; /* Log current record number. */ #ifdef USE_DB4_LOGGING DB_LSN lsn_first; DB_LSN lsn_high; /* LSN of last record. */ DB_LSN lsn_cur; /* LSN of first record to undo. */ #endif MARK l_cursor; /* Log cursor position. */ dir_t lundo; /* Last undo direction. */ WIN *l_win; /* Window owning transaction. */ LIST_HEAD(_markh, _lmark) marks;/* Linked list of file MARK's. */ /* * XXX * Mtime should be a struct timespec, but time_t is more portable. */ dev_t mdev; /* Device. */ ino_t minode; /* Inode. */ time_t mtime; /* Last modification time. */ int fcntl_fd; /* Fcntl locking fd; see exf.c. */ int fd; /* File descriptor */ /* * Recovery in general, and these fields specifically, are described * in recover.c. */ #define RCV_PERIOD 120 /* Sync every two minutes. */ char *rcv_path; /* Recover file name. */ char *rcv_mpath; /* Recover mail file name. */ int rcv_fd; /* Locked mail file descriptor. */ void *lock; /* Lock for log. */ #define F_DEVSET 0x001 /* mdev/minode fields initialized. */ #define F_FIRSTMODIFY 0x002 /* File not yet modified. */ #define F_MODIFIED 0x004 /* File is currently dirty. */ #define F_MULTILOCK 0x008 /* Multiple processes running, lock. */ #define F_NOLOG 0x010 /* Logging turned off. */ #define F_RCV_NORM 0x020 /* Don't delete recovery files. */ #define F_RCV_ON 0x040 /* Recovery is possible. */ #define F_UNDO 0x080 /* No change since last undo. */ u_int8_t flags; }; /* Flags to db_get(). */ #define DBG_FATAL 0x001 /* If DNE, error message. */ #define DBG_NOCACHE 0x002 /* Ignore the front-end cache. */ /* Flags to file_init() and file_write(). */ #define FS_ALL 0x001 /* Write the entire file. */ #define FS_APPEND 0x002 /* Append to the file. */ #define FS_FORCE 0x004 /* Force is set. */ #define FS_OPENERR 0x008 /* Open failed, try it again. */ #define FS_POSSIBLE 0x010 /* Force could have been set. */ #define FS_SETALT 0x020 /* Set alternate file name. */ /* Flags to rcv_sync(). */ #define RCV_EMAIL 0x01 /* Send the user email, IFF file modified. */ #define RCV_ENDSESSION 0x02 /* End the file session. */ #define RCV_PRESERVE 0x04 /* Preserve backup file, IFF file modified. */ #define RCV_SNAPSHOT 0x08 /* Snapshot the recovery, and send email. */ nvi-1.81.6/common/gs.c0100644000076400001440000001004210720065506013514 0ustar skimousers/*- * Copyright (c) 2000 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../perl_api/extern.h" static void perr __P((char *, char *)); /* * gs_init -- * Create and partially initialize the GS structure. * PUBLIC: GS * gs_init __P((char*)); */ GS * gs_init(char *name) { GS *gp; char *p; /* Figure out what our name is. */ if ((p = strrchr(name, '/')) != NULL) name = p + 1; /* Allocate the global structure. */ CALLOC_NOMSG(NULL, gp, GS *, 1, sizeof(GS)); if (gp == NULL) perr(name, NULL); gp->progname = name; /* Common global structure initialization. */ /* others will need to be copied from main.c */ CIRCLEQ_INIT(&gp->dq); CIRCLEQ_INIT(&gp->hq); gp->noprint = DEFAULT_NOPRINT; /* Structures shared by screens so stored in the GS structure. */ CIRCLEQ_INIT(&gp->frefq); CIRCLEQ_INIT(&gp->exfq); LIST_INIT(&gp->seqq); thread_init(gp); return (gp); } /* * gs_new_win * Create new window * PUBLIC: WIN * gs_new_win __P((GS *gp)); */ WIN * gs_new_win(GS *gp) { WIN *wp; CALLOC_NOMSG(NULL, wp, WIN *, 1, sizeof(*wp)); if (!wp) return NULL; /* Common global structure initialization. */ LIST_INIT(&wp->ecq); LIST_INSERT_HEAD(&wp->ecq, &wp->excmd, q); CIRCLEQ_INSERT_TAIL(&gp->dq, wp, q); CIRCLEQ_INIT(&wp->scrq); CIRCLEQ_INIT(&wp->dcb_store.textq); LIST_INIT(&wp->cutq); wp->gp = gp; return wp; } /* * win_end -- * Remove window. * * PUBLIC: int win_end __P((WIN *wp)); */ int win_end(WIN *wp) { SCR *sp; CIRCLEQ_REMOVE(&wp->gp->dq, wp, q); if (wp->ccl_sp != NULL) { (void)file_end(wp->ccl_sp, NULL, 1); (void)screen_end(wp->ccl_sp); } while ((sp = wp->scrq.cqh_first) != (void *)&wp->scrq) (void)screen_end(sp); /* Free key input queue. */ if (wp->i_event != NULL) free(wp->i_event); /* Free cut buffers. */ cut_close(wp); /* Free default buffer storage. */ (void)text_lfree(&wp->dcb_store.textq); #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) /* Free any temporary space. */ if (wp->tmp_bp != NULL) free(wp->tmp_bp); #endif return 0; } /* * gs_end -- * End the program, discarding screens and most of the global area. * * PUBLIC: void gs_end __P((GS *)); */ void gs_end(GS *gp) { MSGS *mp; SCR *sp; WIN *wp; /* If there are any remaining screens, kill them off. */ while ((wp = gp->dq.cqh_first) != (void *)&gp->dq) (void)win_end(wp); while ((sp = gp->hq.cqh_first) != (void *)&gp->hq) (void)screen_end(sp); #ifdef HAVE_PERL_INTERP perl_end(gp); #endif #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) { FREF *frp; /* Free FREF's. */ while ((frp = gp->frefq.cqh_first) != (FREF *)&gp->frefq) { CIRCLEQ_REMOVE(&gp->frefq, frp, q); if (frp->name != NULL) free(frp->name); if (frp->tname != NULL) free(frp->tname); free(frp); } } /* Free map sequences. */ seq_close(gp); /* Close message catalogs. */ msg_close(gp); #endif /* Ring the bell if scheduled. */ if (F_ISSET(gp, G_BELLSCHED)) (void)fprintf(stderr, "\07"); /* \a */ /* * Flush any remaining messages. If a message is here, it's almost * certainly the message about the event that killed us (although * it's possible that the user is sourcing a file that exits from the * editor). */ while ((mp = gp->msgq.lh_first) != NULL) { (void)fprintf(stderr, "%s%.*s", mp->mtype == M_ERR ? "ex/vi: " : "", (int)mp->len, mp->buf); LIST_REMOVE(mp, q); #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) free(mp->buf); free(mp); #endif } #if defined(TRACE) /* Close tracing file descriptor. */ vtrace_end(); #endif } /* * perr -- * Print system error. */ static void perr(char *name, char *msg) { (void)fprintf(stderr, "%s:", name); if (msg != NULL) (void)fprintf(stderr, "%s:", msg); (void)fprintf(stderr, "%s\n", strerror(errno)); exit(1); } nvi-1.81.6/common/gs.h0100644000076400001440000001637110720065506013534 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: gs.h,v 10.55 2001/11/01 10:28:25 skimo Exp $ (Berkeley) $Date: 2001/11/01 10:28:25 $ */ #define TEMPORARY_FILE_STRING "/tmp" /* Default temporary file name. */ /* * File reference structure (FREF). The structure contains the name of the * file, along with the information that follows the name. * * !!! * The read-only bit follows the file name, not the file itself. */ struct _fref { CIRCLEQ_ENTRY(_fref) q; /* Linked list of file references. */ char *name; /* File name. */ char *tname; /* Backing temporary file name. */ db_recno_t lno; /* 1-N: file cursor line. */ size_t cno; /* 0-N: file cursor column. */ #define FR_CURSORSET 0x0001 /* If lno/cno values valid. */ #define FR_DONTDELETE 0x0002 /* Don't delete the temporary file. */ #define FR_EXNAMED 0x0004 /* Read/write renamed the file. */ #define FR_NAMECHANGE 0x0008 /* If the name changed. */ #define FR_NEWFILE 0x0010 /* File doesn't really exist yet. */ #define FR_RECOVER 0x0020 /* File is being recovered. */ #define FR_TMPEXIT 0x0040 /* Modified temporary file, no exit. */ #define FR_TMPFILE 0x0080 /* If file has no name. */ #define FR_UNLOCKED 0x0100 /* File couldn't be locked. */ u_int16_t flags; }; /* Action arguments to scr_exadjust(). */ typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t; /* Screen attribute arguments to scr_attr(). */ typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t; /* Key type arguments to scr_keyval(). */ typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t; /* * GS: * * Structure that describes global state of the running program. */ struct _gs { char *progname; /* Programe name. */ int id; /* Last allocated screen id. */ CIRCLEQ_HEAD(_dqh, _win) dq; /* Displayed windows. */ CIRCLEQ_HEAD(_hqh, _scr) hq; /* Hidden screens. */ void *perl_interp; /* Perl interpreter. */ void *tcl_interp; /* Tcl_Interp *: Tcl interpreter. */ void *cl_private; /* Curses support private area. */ void *tk_private; /* Tk/Tcl support private area. */ /* File references. */ CIRCLEQ_HEAD(_frefh, _fref) frefq; /* File structures. */ CIRCLEQ_HEAD(_exfh, _exf) exfq; #define GO_COLUMNS 0 /* Global options: columns. */ #define GO_LINES 1 /* Global options: lines. */ #define GO_SECURE 2 /* Global options: secure. */ #define GO_TERM 3 /* Global options: terminal type. */ OPTION opts[GO_TERM + 1]; DB *msg; /* Message catalog DB. */ MSGH msgq; /* User message list. */ #define DEFAULT_NOPRINT '\1' /* Emergency non-printable character. */ CHAR_T noprint; /* Cached, unprintable character. */ char *c_option; /* Ex initial, command-line command. */ #ifdef DEBUG FILE *tracefp; /* Trace file pointer. */ #endif #define MAX_BIT_SEQ 128 /* Max + 1 fast check character. */ LIST_HEAD(_seqh, _seq) seqq; /* Linked list of maps, abbrevs. */ bitstr_t bit_decl(seqb, MAX_BIT_SEQ); #define MAX_FAST_KEY 255 /* Max fast check character.*/ #define KEY_LEN(sp, ch) \ ((UCHAR_T)(ch) <= MAX_FAST_KEY ? \ sp->gp->cname[(unsigned char)ch].len : v_key_len(sp, ch)) #define KEY_NAME(sp, ch) \ ((UCHAR_T)(ch) <= MAX_FAST_KEY ? \ sp->gp->cname[(unsigned char)ch].name : v_key_name(sp, ch)) struct { u_char name[MAX_CHARACTER_COLUMNS + 1]; u_int8_t len; } cname[MAX_FAST_KEY + 1]; /* Fast lookup table. */ #define KEY_VAL(sp, ch) \ ((UCHAR_T)(ch) <= MAX_FAST_KEY ? \ sp->gp->special_key[(UCHAR_T)ch] : \ (UCHAR_T)(ch) > sp->gp->max_special ? K_NOTUSED : v_key_val(sp,ch)) CHAR_T max_special; /* Max special character. */ u_char /* Fast lookup table. */ special_key[MAX_FAST_KEY + 1]; /* Flags. */ #define G_ABBREV 0x0001 /* If have abbreviations. */ #define G_BELLSCHED 0x0002 /* Bell scheduled. */ #define G_INTERRUPTED 0x0004 /* Interrupted. */ #define G_RECOVER_SET 0x0008 /* Recover system initialized. */ #define G_SCRIPTED 0x0010 /* Ex script session. */ #define G_SCRWIN 0x0020 /* Scripting windows running. */ #define G_SNAPSHOT 0x0040 /* Always snapshot files. */ #define G_SRESTART 0x0080 /* Screen restarted. */ u_int32_t flags; /* Screen interface functions. */ /* Add a string to the screen. */ int (*scr_addstr) __P((SCR *, const char *, size_t)); /* Add a string to the screen. */ int (*scr_waddstr) __P((SCR *, const CHAR_T *, size_t)); /* Toggle a screen attribute. */ int (*scr_attr) __P((SCR *, scr_attr_t, int)); /* Terminal baud rate. */ int (*scr_baud) __P((SCR *, u_long *)); /* Beep/bell/flash the terminal. */ int (*scr_bell) __P((SCR *)); /* Display a busy message. */ void (*scr_busy) __P((SCR *, const char *, busy_t)); /* Prepare child. */ int (*scr_child) __P((SCR *)); /* Clear to the end of the line. */ int (*scr_clrtoeol) __P((SCR *)); /* Return the cursor location. */ int (*scr_cursor) __P((SCR *, size_t *, size_t *)); /* Delete a line. */ int (*scr_deleteln) __P((SCR *)); /* Discard a screen. */ int (*scr_discard) __P((SCR *, SCR **)); /* Get a keyboard event. */ int (*scr_event) __P((SCR *, EVENT *, u_int32_t, int)); /* Ex: screen adjustment routine. */ int (*scr_ex_adjust) __P((SCR *, exadj_t)); int (*scr_fmap) /* Set a function key. */ __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); /* Get terminal key value. */ int (*scr_keyval) __P((SCR *, scr_keyval_t, CHAR_T *, int *)); /* Insert a line. */ int (*scr_insertln) __P((SCR *)); /* Handle an option change. */ int (*scr_optchange) __P((SCR *, int, char *, u_long *)); /* Move the cursor. */ int (*scr_move) __P((SCR *, size_t, size_t)); /* Refresh the screen. */ int (*scr_refresh) __P((SCR *, int)); /* Rename the file. */ int (*scr_rename) __P((SCR *, char *, int)); /* Reply to an event. */ int (*scr_reply) __P((SCR *, int, char *)); /* Set the screen type. */ int (*scr_screen) __P((SCR *, u_int32_t)); /* Split the screen. */ int (*scr_split) __P((SCR *, SCR *)); /* Suspend the editor. */ int (*scr_suspend) __P((SCR *, int *)); /* Print usage message. */ void (*scr_usage) __P((void)); /* Threading stuff */ void *th_private; int (*run) __P((WIN *, void *(*)(void*), void *)); int (*lock_init) __P((WIN *, void **)); #define LOCK_INIT(wp,s) \ wp->gp->lock_init(wp, &s->lock) int (*lock_try) __P((WIN *, void **)); #define LOCK_TRY(wp,s) \ wp->gp->lock_try(wp, &s->lock) int (*lock_unlock) __P((WIN *, void **)); #define LOCK_UNLOCK(wp,s) \ wp->gp->lock_unlock(wp, &s->lock) int (*lock_end) __P((WIN *, void **)); #define LOCK_END(wp,s) \ wp->gp->lock_end(wp, &s->lock) }; /* * XXX * Block signals if there are asynchronous events. Used to keep DB system calls * from being interrupted and not restarted, as that will result in consistency * problems. This should be handled by DB. */ #ifdef BLOCK_SIGNALS #include extern sigset_t __sigblockset; #define SIGBLOCK \ (void)sigprocmask(SIG_BLOCK, &__sigblockset, NULL) #define SIGUNBLOCK \ (void)sigprocmask(SIG_UNBLOCK, &__sigblockset, NULL); #else #define SIGBLOCK #define SIGUNBLOCK #endif nvi-1.81.6/common/key.c0100644000076400001440000005746710720065506013721 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: key.c,v 10.48 2001/06/25 15:19:10 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:10 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" static int v_event_append __P((SCR *, EVENT *)); static int v_event_grow __P((SCR *, int)); static int v_key_cmp __P((const void *, const void *)); static void v_keyval __P((SCR *, int, scr_keyval_t)); static void v_sync __P((SCR *, int)); /* * !!! * Historic vi always used: * * ^D: autoindent deletion * ^H: last character deletion * ^W: last word deletion * ^Q: quote the next character (if not used in flow control). * ^V: quote the next character * * regardless of the user's choices for these characters. The user's erase * and kill characters worked in addition to these characters. Nvi wires * down the above characters, but in addition permits the VEOF, VERASE, VKILL * and VWERASE characters described by the user's termios structure. * * Ex was not consistent with this scheme, as it historically ran in tty * cooked mode. This meant that the scroll command and autoindent erase * characters were mapped to the user's EOF character, and the character * and word deletion characters were the user's tty character and word * deletion characters. This implementation makes it all consistent, as * described above for vi. * * !!! * This means that all screens share a special key set. */ KEYLIST keylist[] = { {K_BACKSLASH, '\\'}, /* \ */ {K_CARAT, '^'}, /* ^ */ {K_CNTRLD, '\004'}, /* ^D */ {K_CNTRLR, '\022'}, /* ^R */ {K_CNTRLT, '\024'}, /* ^T */ {K_CNTRLZ, '\032'}, /* ^Z */ {K_COLON, ':'}, /* : */ {K_CR, '\r'}, /* \r */ {K_ESCAPE, '\033'}, /* ^[ */ {K_FORMFEED, '\f'}, /* \f */ {K_HEXCHAR, '\030'}, /* ^X */ {K_NL, '\n'}, /* \n */ {K_RIGHTBRACE, '}'}, /* } */ {K_RIGHTPAREN, ')'}, /* ) */ {K_TAB, '\t'}, /* \t */ {K_VERASE, '\b'}, /* \b */ {K_VKILL, '\025'}, /* ^U */ {K_VLNEXT, '\021'}, /* ^Q */ {K_VLNEXT, '\026'}, /* ^V */ {K_VWERASE, '\027'}, /* ^W */ {K_ZERO, '0'}, /* 0 */ #define ADDITIONAL_CHARACTERS 4 {K_NOTUSED, 0}, /* VEOF, VERASE, VKILL, VWERASE */ {K_NOTUSED, 0}, {K_NOTUSED, 0}, {K_NOTUSED, 0}, }; static int nkeylist = (sizeof(keylist) / sizeof(keylist[0])) - ADDITIONAL_CHARACTERS; /* * v_key_init -- * Initialize the special key lookup table. * * PUBLIC: int v_key_init __P((SCR *)); */ int v_key_init(SCR *sp) { CHAR_T ch; GS *gp; KEYLIST *kp; int cnt; gp = sp->gp; /* * XXX * 8-bit only, for now. Recompilation should get you any 8-bit * character set, as long as nul isn't a character. */ (void)setlocale(LC_ALL, ""); #if __linux__ /* * In libc 4.5.26, setlocale(LC_ALL, ""), doesn't setup the table * for ctype(3c) correctly. This bug is fixed in libc 4.6.x. * * This code works around this problem for libc 4.5.x users. * Note that this code is harmless if you're using libc 4.6.x. */ (void)setlocale(LC_CTYPE, ""); #endif v_key_ilookup(sp); v_keyval(sp, K_CNTRLD, KEY_VEOF); v_keyval(sp, K_VERASE, KEY_VERASE); v_keyval(sp, K_VKILL, KEY_VKILL); v_keyval(sp, K_VWERASE, KEY_VWERASE); /* Sort the special key list. */ qsort(keylist, nkeylist, sizeof(keylist[0]), v_key_cmp); /* Initialize the fast lookup table. */ for (gp->max_special = 0, kp = keylist, cnt = nkeylist; cnt--; ++kp) { if (gp->max_special < kp->ch) gp->max_special = kp->ch; if (kp->ch <= MAX_FAST_KEY) gp->special_key[kp->ch] = kp->value; } /* Find a non-printable character to use as a message separator. */ for (ch = 1; ch <= MAX_CHAR_T; ++ch) if (!ISPRINT(ch)) { gp->noprint = ch; break; } if (ch != gp->noprint) { msgq(sp, M_ERR, "079|No non-printable character found"); return (1); } return (0); } /* * v_keyval -- * Set key values. * * We've left some open slots in the keylist table, and if these values exist, * we put them into place. Note, they may reset (or duplicate) values already * in the table, so we check for that first. */ static void v_keyval(SCR *sp, int val, scr_keyval_t name) { KEYLIST *kp; CHAR_T ch; int dne; /* Get the key's value from the screen. */ if (sp->gp->scr_keyval(sp, name, &ch, &dne)) return; if (dne) return; /* Check for duplication. */ for (kp = keylist; kp->value != K_NOTUSED; ++kp) if (kp->ch == ch) { kp->value = val; return; } /* Add a new entry. */ if (kp->value == K_NOTUSED) { keylist[nkeylist].ch = ch; keylist[nkeylist].value = val; ++nkeylist; } } /* * v_key_ilookup -- * Build the fast-lookup key display array. * * PUBLIC: void v_key_ilookup __P((SCR *)); */ void v_key_ilookup(SCR *sp) { UCHAR_T ch; char *p, *t; GS *gp; size_t len; for (gp = sp->gp, ch = 0;; ++ch) { for (p = gp->cname[ch].name, t = v_key_name(sp, ch), len = gp->cname[ch].len = sp->clen; len--;) *p++ = *t++; if (ch == MAX_FAST_KEY) break; } } /* * v_key_len -- * Return the length of the string that will display the key. * This routine is the backup for the KEY_LEN() macro. * * PUBLIC: size_t v_key_len __P((SCR *, ARG_CHAR_T)); */ size_t v_key_len(SCR *sp, ARG_CHAR_T ch) { (void)v_key_name(sp, ch); return (sp->clen); } /* * v_key_name -- * Return the string that will display the key. This routine * is the backup for the KEY_NAME() macro. * * PUBLIC: u_char *v_key_name __P((SCR *, ARG_CHAR_T)); */ u_char * v_key_name(SCR *sp, ARG_CHAR_T ach) { static const char hexdigit[] = "0123456789abcdef"; static const char octdigit[] = "01234567"; CHAR_T ch, mask; size_t len; int cnt, shift; char *chp; ch = ach; /* See if the character was explicitly declared printable or not. */ if ((chp = O_STR(sp, O_PRINT)) != NULL) for (; *chp != '\0'; ++chp) if (*chp == ch) goto pr; if ((chp = O_STR(sp, O_NOPRINT)) != NULL) for (; *chp != '\0'; ++chp) if (*chp == ch) goto nopr; /* * Historical (ARPA standard) mappings. Printable characters are left * alone. Control characters less than 0x20 are represented as '^' * followed by the character offset from the '@' character in the ASCII * character set. Del (0x7f) is represented as '^' followed by '?'. * * XXX * The following code depends on the current locale being identical to * the ASCII map from 0x40 to 0x5f (since 0x1f + 0x40 == 0x5f). I'm * told that this is a reasonable assumption... * * XXX * This code will only work with CHAR_T's that are multiples of 8-bit * bytes. * * XXX * NB: There's an assumption here that all printable characters take * up a single column on the screen. This is not always correct. */ if (ISPRINT(ch)) { pr: sp->cname[0] = ch; len = 1; goto done; } nopr: if (ISCNTRL(ch) && (ch < 0x20 || ch == 0x7f)) { sp->cname[0] = '^'; sp->cname[1] = ch == 0x7f ? '?' : '@' + ch; len = 2; } else if (O_ISSET(sp, O_OCTAL)) { #define BITS (sizeof(CHAR_T) * 8) #define SHIFT (BITS - BITS % 3) #define TOPMASK (BITS % 3 == 2 ? 3 : 1) << (BITS - BITS % 3) sp->cname[0] = '\\'; sp->cname[1] = octdigit[(ch & TOPMASK) >> SHIFT]; shift = SHIFT - 3; for (len = 2, mask = 7 << (SHIFT - 3), cnt = BITS / 3; cnt-- > 0; mask >>= 3, shift -= 3) sp->cname[len++] = octdigit[(ch & mask) >> shift]; } else { sp->cname[0] = '\\'; sp->cname[1] = 'x'; for (len = 2, chp = (u_int8_t *)&ch, /* sizeof(CHAR_T) conflict with MAX_CHARACTER_COLUMNS * and code depends on big endian * and might not be needed in the long run */ cnt = /*sizeof(CHAR_T)*/1; cnt-- > 0; ++chp) { sp->cname[len++] = hexdigit[(*chp & 0xf0) >> 4]; sp->cname[len++] = hexdigit[*chp & 0x0f]; } } done: sp->cname[sp->clen = len] = '\0'; return (sp->cname); } /* * v_key_val -- * Fill in the value for a key. This routine is the backup * for the KEY_VAL() macro. * * PUBLIC: int v_key_val __P((SCR *, ARG_CHAR_T)); */ int v_key_val(SCR *sp, ARG_CHAR_T ch) { KEYLIST k, *kp; k.ch = ch; kp = bsearch(&k, keylist, nkeylist, sizeof(keylist[0]), v_key_cmp); return (kp == NULL ? K_NOTUSED : kp->value); } /* * v_event_push -- * Push events/keys onto the front of the buffer. * * There is a single input buffer in ex/vi. Characters are put onto the * end of the buffer by the terminal input routines, and pushed onto the * front of the buffer by various other functions in ex/vi. Each key has * an associated flag value, which indicates if it has already been quoted, * and if it is the result of a mapping or an abbreviation. * * PUBLIC: int v_event_push __P((SCR *, EVENT *, CHAR_T *, size_t, u_int)); */ int v_event_push(SCR *sp, EVENT *p_evp, CHAR_T *p_s, size_t nitems, u_int flags) /* Push event. */ /* Push characters. */ /* Number of items to push. */ /* CH_* flags. */ { EVENT *evp; GS *gp; WIN *wp; size_t total; /* If we have room, stuff the items into the buffer. */ gp = sp->gp; wp = sp->wp; if (nitems <= wp->i_next || (wp->i_event != NULL && wp->i_cnt == 0 && nitems <= wp->i_nelem)) { if (wp->i_cnt != 0) wp->i_next -= nitems; goto copy; } /* * If there are currently items in the queue, shift them up, * leaving some extra room. Get enough space plus a little * extra. */ #define TERM_PUSH_SHIFT 30 total = wp->i_cnt + wp->i_next + nitems + TERM_PUSH_SHIFT; if (total >= wp->i_nelem && v_event_grow(sp, MAX(total, 64))) return (1); if (wp->i_cnt) MEMMOVE(wp->i_event + TERM_PUSH_SHIFT + nitems, wp->i_event + wp->i_next, wp->i_cnt); wp->i_next = TERM_PUSH_SHIFT; /* Put the new items into the queue. */ copy: wp->i_cnt += nitems; for (evp = wp->i_event + wp->i_next; nitems--; ++evp) { if (p_evp != NULL) *evp = *p_evp++; else { evp->e_event = E_CHARACTER; evp->e_c = *p_s++; evp->e_value = KEY_VAL(sp, evp->e_c); FL_INIT(evp->e_flags, flags); } } return (0); } /* * v_event_append -- * Append events onto the tail of the buffer. */ static int v_event_append(SCR *sp, EVENT *argp) { CHAR_T *s; /* Characters. */ EVENT *evp; WIN *wp; size_t nevents; /* Number of events. */ /* Grow the buffer as necessary. */ nevents = argp->e_event == E_STRING ? argp->e_len : 1; wp = sp->wp; if (wp->i_event == NULL || nevents > wp->i_nelem - (wp->i_next + wp->i_cnt)) v_event_grow(sp, MAX(nevents, 64)); evp = wp->i_event + wp->i_next + wp->i_cnt; wp->i_cnt += nevents; /* Transform strings of characters into single events. */ if (argp->e_event == E_STRING) for (s = argp->e_csp; nevents--; ++evp) { evp->e_event = E_CHARACTER; evp->e_c = *s++; evp->e_value = KEY_VAL(sp, evp->e_c); evp->e_flags = 0; } else *evp = *argp; return (0); } /* Remove events from the queue. */ #define QREM(len) { \ if ((wp->i_cnt -= len) == 0) \ wp->i_next = 0; \ else \ wp->i_next += len; \ } /* * v_event_get -- * Return the next event. * * !!! * The flag EC_NODIGIT probably needs some explanation. First, the idea of * mapping keys is that one or more keystrokes act like a function key. * What's going on is that vi is reading a number, and the character following * the number may or may not be mapped (EC_MAPCOMMAND). For example, if the * user is entering the z command, a valid command is "z40+", and we don't want * to map the '+', i.e. if '+' is mapped to "xxx", we don't want to change it * into "z40xxx". However, if the user enters "35x", we want to put all of the * characters through the mapping code. * * Historical practice is a bit muddled here. (Surprise!) It always permitted * mapping digits as long as they weren't the first character of the map, e.g. * ":map ^A1 xxx" was okay. It also permitted the mapping of the digits 1-9 * (the digit 0 was a special case as it doesn't indicate the start of a count) * as the first character of the map, but then ignored those mappings. While * it's probably stupid to map digits, vi isn't your mother. * * The way this works is that the EC_MAPNODIGIT causes term_key to return the * end-of-digit without "looking" at the next character, i.e. leaving it as the * user entered it. Presumably, the next term_key call will tell us how the * user wants it handled. * * There is one more complication. Users might map keys to digits, and, as * it's described above, the commands: * * :map g 1G * d2g * * would return the keys "d21G", when the user probably wanted * "d21G". So, if a map starts off with a digit we continue as * before, otherwise, we pretend we haven't mapped the character, and return * . * * Now that that's out of the way, let's talk about Energizer Bunny macros. * It's easy to create macros that expand to a loop, e.g. map x 3x. It's * fairly easy to detect this example, because it's all internal to term_key. * If we're expanding a macro and it gets big enough, at some point we can * assume it's looping and kill it. The examples that are tough are the ones * where the parser is involved, e.g. map x "ayyx"byy. We do an expansion * on 'x', and get "ayyx"byy. We then return the first 4 characters, and then * find the looping macro again. There is no way that we can detect this * without doing a full parse of the command, because the character that might * cause the loop (in this case 'x') may be a literal character, e.g. the map * map x "ayy"xyy"byy is perfectly legal and won't cause a loop. * * Historic vi tried to detect looping macros by disallowing obvious cases in * the map command, maps that that ended with the same letter as they started * (which wrongly disallowed "map x 'x"), and detecting macros that expanded * too many times before keys were returned to the command parser. It didn't * get many (most?) of the tricky cases right, however, and it was certainly * possible to create macros that ran forever. And, even if it did figure out * what was going on, the user was usually tossed into ex mode. Finally, any * changes made before vi realized that the macro was recursing were left in * place. We recover gracefully, but the only recourse the user has in an * infinite macro loop is to interrupt. * * !!! * It is historic practice that mapping characters to themselves as the first * part of the mapped string was legal, and did not cause infinite loops, i.e. * ":map! { {^M^T" and ":map n nz." were known to work. The initial, matching * characters were returned instead of being remapped. * * !!! * It is also historic practice that the macro "map ] ]]^" caused a single ] * keypress to behave as the command ]] (the ^ got the map past the vi check * for "tail recursion"). Conversely, the mapping "map n nn^" went recursive. * What happened was that, in the historic vi, maps were expanded as the keys * were retrieved, but not all at once and not centrally. So, the keypress ] * pushed ]]^ on the stack, and then the first ] from the stack was passed to * the ]] command code. The ]] command then retrieved a key without entering * the mapping code. This could bite us anytime a user has a map that depends * on secondary keys NOT being mapped. I can't see any possible way to make * this work in here without the complete abandonment of Rationality Itself. * * XXX * The final issue is recovery. It would be possible to undo all of the work * that was done by the macro if we entered a record into the log so that we * knew when the macro started, and, in fact, this might be worth doing at some * point. Given that this might make the log grow unacceptably (consider that * cursor keys are done with maps), for now we leave any changes made in place. * * PUBLIC: int v_event_get __P((SCR *, EVENT *, int, u_int32_t)); */ int v_event_get(SCR *sp, EVENT *argp, int timeout, u_int32_t flags) { EVENT *evp, ev; GS *gp; SEQ *qp; int init_nomap, ispartial, istimeout, remap_cnt; WIN *wp; gp = sp->gp; wp = sp->wp; /* If simply checking for interrupts, argp may be NULL. */ if (argp == NULL) argp = &ev; retry: istimeout = remap_cnt = 0; /* * If the queue isn't empty and we're timing out for characters, * return immediately. */ if (wp->i_cnt != 0 && LF_ISSET(EC_TIMEOUT)) return (0); /* * If the queue is empty, we're checking for interrupts, or we're * timing out for characters, get more events. */ if (wp->i_cnt == 0 || LF_ISSET(EC_INTERRUPT | EC_TIMEOUT)) { /* * If we're reading new characters, check any scripting * windows for input. */ if (F_ISSET(gp, G_SCRWIN) && sscr_input(sp)) return (1); loop: if (gp->scr_event(sp, argp, LF_ISSET(EC_INTERRUPT | EC_QUOTED | EC_RAW), timeout)) return (1); switch (argp->e_event) { case E_ERR: case E_SIGHUP: case E_SIGTERM: /* * Fatal conditions cause the file to be synced to * disk immediately. */ v_sync(sp, RCV_ENDSESSION | RCV_PRESERVE | (argp->e_event == E_SIGTERM ? 0: RCV_EMAIL)); return (1); case E_TIMEOUT: istimeout = 1; break; case E_INTERRUPT: /* Set the global interrupt flag. */ F_SET(sp->gp, G_INTERRUPTED); /* * If the caller was interested in interrupts, return * immediately. */ if (LF_ISSET(EC_INTERRUPT)) return (0); goto append; default: append: if (v_event_append(sp, argp)) return (1); break; } } /* * If the caller was only interested in interrupts or timeouts, return * immediately. (We may have gotten characters, and that's okay, they * were queued up for later use.) */ if (LF_ISSET(EC_INTERRUPT | EC_TIMEOUT)) return (0); newmap: evp = &wp->i_event[wp->i_next]; /* * If the next event in the queue isn't a character event, return * it, we're done. */ if (evp->e_event != E_CHARACTER) { *argp = *evp; QREM(1); return (0); } /* * If the key isn't mappable because: * * + ... the timeout has expired * + ... it's not a mappable key * + ... neither the command or input map flags are set * + ... there are no maps that can apply to it * * return it forthwith. */ if (istimeout || FL_ISSET(evp->e_flags, CH_NOMAP) || !LF_ISSET(EC_MAPCOMMAND | EC_MAPINPUT) || evp->e_c < MAX_BIT_SEQ && !bit_test(gp->seqb, evp->e_c)) goto nomap; /* Search the map. */ qp = seq_find(sp, NULL, evp, NULL, wp->i_cnt, LF_ISSET(EC_MAPCOMMAND) ? SEQ_COMMAND : SEQ_INPUT, &ispartial); /* * If get a partial match, get more characters and retry the map. * If time out without further characters, return the characters * unmapped. * * !!! * characters are a problem. Cursor keys start with * characters, so there's almost always a map in place that begins with * an character. If we timeout keys in the same way * that we timeout other keys, the user will get a noticeable pause as * they enter to terminate input mode. If key timeout is set * for a slow link, users will get an even longer pause. Nvi used to * simply timeout characters at 1/10th of a second, but this * loses over PPP links where the latency is greater than 100Ms. */ if (ispartial) { if (O_ISSET(sp, O_TIMEOUT)) timeout = (evp->e_value == K_ESCAPE ? O_VAL(sp, O_ESCAPETIME) : O_VAL(sp, O_KEYTIME)) * 100; else timeout = 0; goto loop; } /* If no map, return the character. */ if (qp == NULL) { nomap: if (!ISDIGIT(evp->e_c) && LF_ISSET(EC_MAPNODIGIT)) goto not_digit; *argp = *evp; QREM(1); return (0); } /* * If looking for the end of a digit string, and the first character * of the map is it, pretend we haven't seen the character. */ if (LF_ISSET(EC_MAPNODIGIT) && qp->output != NULL && !ISDIGIT(qp->output[0])) { not_digit: argp->e_c = CH_NOT_DIGIT; argp->e_value = K_NOTUSED; argp->e_event = E_CHARACTER; FL_INIT(argp->e_flags, 0); return (0); } /* Find out if the initial segments are identical. */ init_nomap = !e_memcmp(qp->output, &wp->i_event[wp->i_next], qp->ilen); /* Delete the mapped characters from the queue. */ QREM(qp->ilen); /* If keys mapped to nothing, go get more. */ if (qp->output == NULL) goto retry; /* If remapping characters... */ if (O_ISSET(sp, O_REMAP)) { /* * Periodically check for interrupts. Always check the first * time through, because it's possible to set up a map that * will return a character every time, but will expand to more, * e.g. "map! a aaaa" will always return a 'a', but we'll never * get anywhere useful. */ if ((++remap_cnt == 1 || remap_cnt % 10 == 0) && (gp->scr_event(sp, &ev, EC_INTERRUPT, 0) || ev.e_event == E_INTERRUPT)) { F_SET(sp->gp, G_INTERRUPTED); argp->e_event = E_INTERRUPT; return (0); } /* * If an initial part of the characters mapped, they are not * further remapped -- return the first one. Push the rest * of the characters, or all of the characters if no initial * part mapped, back on the queue. */ if (init_nomap) { if (v_event_push(sp, NULL, qp->output + qp->ilen, qp->olen - qp->ilen, CH_MAPPED)) return (1); if (v_event_push(sp, NULL, qp->output, qp->ilen, CH_NOMAP | CH_MAPPED)) return (1); evp = &wp->i_event[wp->i_next]; goto nomap; } if (v_event_push(sp, NULL, qp->output, qp->olen, CH_MAPPED)) return (1); goto newmap; } /* Else, push the characters on the queue and return one. */ if (v_event_push(sp, NULL, qp->output, qp->olen, CH_MAPPED | CH_NOMAP)) return (1); goto nomap; } /* * v_sync -- * Walk the screen lists, sync'ing files to their backup copies. */ static void v_sync(SCR *sp, int flags) { GS *gp; WIN *wp; gp = sp->gp; for (wp = gp->dq.cqh_first; wp != (void *)&gp->dq; wp = wp->q.cqe_next) for (sp = wp->scrq.cqh_first; sp != (void *)&wp->scrq; sp = sp->q.cqe_next) rcv_sync(sp, flags); for (sp = gp->hq.cqh_first; sp != (void *)&gp->hq; sp = sp->q.cqe_next) rcv_sync(sp, flags); } /* * v_event_err -- * Unexpected event. * * PUBLIC: void v_event_err __P((SCR *, EVENT *)); */ void v_event_err(SCR *sp, EVENT *evp) { switch (evp->e_event) { case E_CHARACTER: msgq(sp, M_ERR, "276|Unexpected character event"); break; case E_EOF: msgq(sp, M_ERR, "277|Unexpected end-of-file event"); break; case E_INTERRUPT: msgq(sp, M_ERR, "279|Unexpected interrupt event"); break; case E_IPCOMMAND: msgq(sp, M_ERR, "318|Unexpected command or input"); break; case E_REPAINT: msgq(sp, M_ERR, "281|Unexpected repaint event"); break; case E_STRING: msgq(sp, M_ERR, "285|Unexpected string event"); break; case E_TIMEOUT: msgq(sp, M_ERR, "286|Unexpected timeout event"); break; case E_WRESIZE: msgq(sp, M_ERR, "316|Unexpected resize event"); break; /* * Theoretically, none of these can occur, as they're handled at the * top editor level. */ case E_ERR: case E_SIGHUP: case E_SIGTERM: default: abort(); } } /* * v_event_flush -- * Flush any flagged keys, returning if any keys were flushed. * * PUBLIC: int v_event_flush __P((SCR *, u_int)); */ int v_event_flush(SCR *sp, u_int flags) { WIN *wp; int rval; for (rval = 0, wp = sp->wp; wp->i_cnt != 0 && FL_ISSET(wp->i_event[wp->i_next].e_flags, flags); rval = 1) QREM(1); return (rval); } /* * v_event_grow -- * Grow the terminal queue. */ static int v_event_grow(SCR *sp, int add) { WIN *wp; size_t new_nelem, olen; wp = sp->wp; new_nelem = wp->i_nelem + add; olen = wp->i_nelem * sizeof(wp->i_event[0]); BINC_RET(sp, EVENT, wp->i_event, olen, new_nelem * sizeof(EVENT)); wp->i_nelem = olen / sizeof(wp->i_event[0]); return (0); } /* * v_key_cmp -- * Compare two keys for sorting. */ static int v_key_cmp(const void *ap, const void *bp) { return (((KEYLIST *)ap)->ch - ((KEYLIST *)bp)->ch); } nvi-1.81.6/common/key.h0100644000076400001440000002333710720065506013713 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: key.h,v 10.50 2001/06/28 17:53:58 skimo Exp $ (Berkeley) $Date: 2001/06/28 17:53:58 $ */ #include "multibyte.h" /* * Fundamental character types. * * CHAR_T An integral type that can hold any character. * ARG_CHAR_T The type of a CHAR_T when passed as an argument using * traditional promotion rules. It should also be able * to be compared against any CHAR_T for equality without * problems. * MAX_CHAR_T The maximum value of any character. * * If no integral type can hold a character, don't even try the port. */ typedef u_int ARG_CHAR_T; #ifdef USE_WIDECHAR #define FILE2INT5(sp,buf,n,nlen,w,wlen) \ sp->conv.file2int(sp, n, nlen, &buf, &wlen, &w) #define INT2FILE(sp,w,wlen,n,nlen) \ sp->conv.int2file(sp, w, wlen, &sp->wp->cw, &nlen, &n) #define CHAR2INT5(sp,buf,n,nlen,w,wlen) \ sp->conv.sys2int(sp, n, nlen, &buf, &wlen, &w) #define INT2CHAR(sp,w,wlen,n,nlen) \ sp->conv.int2sys(sp, w, wlen, &sp->wp->cw, &nlen, &n) #define INT2SYS(sp,w,wlen,n,nlen) \ sp->conv.int2sys(sp, w, wlen, &sp->wp->cw, &nlen, &n) #define INPUT2INT5(sp,cw,n,nlen,w,wlen) \ sp->conv.input2int(sp, n, nlen, &(cw), &wlen, &w) #define CONST #define ISCNTRL(ch) \ iswcntrl((ch)) #define ISDIGIT(ch) \ iswdigit((ch)) #define ISPRINT(ch) \ iswprint((ch)) #define ISBLANK(ch) \ iswblank((ch)) #define ISALPHA(ch) \ iswalpha((ch)) #define ISALNUM(ch) \ iswalnum((ch)) #define CHAR_WIDTH(sp, ch) wcwidth(ch) #define INTISWIDE(c) (!!(c >> 8)) /* XXX wrong name */ #define WS "%ls" #define WVS "%*ls" #define WC "%lc" #else #define FILE2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) #define INT2FILE(sp,w,wlen,n,nlen) \ (n = w, nlen = wlen, 0) #define CHAR2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) #define INT2CHAR(sp,w,wlen,n,nlen) \ (n = w, nlen = wlen, 0) #define INT2SYS(sp,w,wlen,n,nlen) \ (n = w, nlen = wlen, 0) #define INPUT2INT5(sp,buf,n,nlen,w,wlen) \ (w = n, wlen = nlen, 0) #define CONST const #define ISCNTRL(ch) \ iscntrl((ch)) #define ISDIGIT(ch) \ isdigit((ch)) #define ISPRINT(ch) \ isprint((ch)) #define ISBLANK(ch) \ isblank((ch)) #define ISALPHA(ch) \ isalpha((ch)) #define ISALNUM(ch) \ isalnum((ch)) #define INTISWIDE(c) 0 #define CHAR_WIDTH(sp, ch) 1 #define WS "%s" #define WVS "%*s" #define WC "%c" #endif #define FILE2INT(sp,n,nlen,w,wlen) \ FILE2INT5(sp,sp->wp->cw,n,nlen,w,wlen) #define CHAR2INT(sp,n,nlen,w,wlen) \ CHAR2INT5(sp,sp->wp->cw,n,nlen,w,wlen) #define MEMCPYW(to, from, n) \ memcpy(to, from, (n) * sizeof(CHAR_T)) #define MEMMOVEW(to, from, n) \ memmove(to, from, (n) * sizeof(CHAR_T)) /* The maximum number of columns any character can take up on a screen. */ #define MAX_CHARACTER_COLUMNS 4 /* * Event types. * * The program structure depends on the event loop being able to return * E_EOF/E_ERR multiple times -- eventually enough things will end due * to the events that vi will reach the command level for the screen, at * which point the exit flags will be set and vi will exit. */ typedef enum { E_NOTUSED = 0, /* Not set. */ E_CHARACTER, /* Input character: e_c set. */ E_EOF, /* End of input (NOT ^D). */ E_ERR, /* Input error. */ E_INTERRUPT, /* Interrupt. */ E_IPCOMMAND, /* IP command: e_ipcom set. */ E_REPAINT, /* Repaint: e_flno, e_tlno set. */ E_SIGHUP, /* SIGHUP. */ E_SIGTERM, /* SIGTERM. */ E_STRING, /* Input string: e_csp, e_len set. */ E_TIMEOUT, /* Timeout. */ E_WRESIZE, /* Window resize. */ E_FLAGS /* Flags */ } e_event_t; /* * Character values. */ typedef enum { K_NOTUSED = 0, /* Not set. */ K_BACKSLASH, /* \ */ K_CARAT, /* ^ */ K_CNTRLD, /* ^D */ K_CNTRLR, /* ^R */ K_CNTRLT, /* ^T */ K_CNTRLZ, /* ^Z */ K_COLON, /* : */ K_CR, /* \r */ K_ESCAPE, /* ^[ */ K_FORMFEED, /* \f */ K_HEXCHAR, /* ^X */ K_NL, /* \n */ K_RIGHTBRACE, /* } */ K_RIGHTPAREN, /* ) */ K_TAB, /* \t */ K_VERASE, /* set from tty: default ^H */ K_VKILL, /* set from tty: default ^U */ K_VLNEXT, /* set from tty: default ^V */ K_VWERASE, /* set from tty: default ^W */ K_ZERO /* 0 */ } e_key_t; struct _event { TAILQ_ENTRY(_event) q; /* Linked list of events. */ e_event_t e_event; /* Event type. */ int e_ipcom; /* IP command. */ #define CH_ABBREVIATED 0x01 /* Character is from an abbreviation. */ #define CH_MAPPED 0x02 /* Character is from a map. */ #define CH_NOMAP 0x04 /* Do not map the character. */ #define CH_QUOTED 0x08 /* Character is already quoted. */ CHAR_T e_c; /* Character. */ e_key_t e_value; /* Key type. */ #define e_flags e_val1 /* Flags. */ #define e_lno e_val1 /* Single location. */ #define e_cno e_val2 #define e_flno e_val1 /* Text region. */ #define e_fcno e_val2 #define e_tlno e_val3 #define e_tcno e_val4 size_t e_val1; /* Value #1. */ size_t e_val2; /* Value #2. */ size_t e_val3; /* Value #3. */ size_t e_val4; /* Value #4. */ #define e_csp e_str1 #define e_len e_len1 CHAR_T *e_str1; /* String #1. */ size_t e_len1; /* String #1 length. */ CHAR_T *e_str2; /* String #2. */ size_t e_len2; /* String #2 length. */ }; typedef struct _keylist { e_key_t value; /* Special value. */ CHAR_T ch; /* Key. */ } KEYLIST; extern KEYLIST keylist[]; /* Return if more keys in queue. */ #define KEYS_WAITING(sp) ((sp)->wp->i_cnt != 0) #define MAPPED_KEYS_WAITING(sp) \ (KEYS_WAITING(sp) && \ FL_ISSET((sp)->wp->i_event[(sp)->wp->i_next].e_flags, CH_MAPPED)) /* * Ex/vi commands are generally separated by whitespace characters. We * can't use the standard isspace(3) macro because it returns true for * characters like ^K in the ASCII character set. The 4.4BSD isblank(3) * macro does exactly what we want, but it's not portable yet. * * XXX * Note side effect, ch is evaluated multiple times. */ #ifndef isblank #define isblank(ch) ((ch) == ' ' || (ch) == '\t') #endif /* The "standard" tab width, for displaying things to users. */ #define STANDARD_TAB 6 /* Various special characters, messages. */ #define CH_BSEARCH '?' /* Backward search prompt. */ #define CH_CURSOR ' ' /* Cursor character. */ #define CH_ENDMARK '$' /* End of a range. */ #define CH_EXPROMPT ':' /* Ex prompt. */ #define CH_FSEARCH '/' /* Forward search prompt. */ #define CH_HEX '\030' /* Leading hex character. */ #define CH_LITERAL '\026' /* ASCII ^V. */ #define CH_NO 'n' /* No. */ #define CH_NOT_DIGIT 'a' /* A non-isdigit() character. */ #define CH_QUIT 'q' /* Quit. */ #define CH_YES 'y' /* Yes. */ /* * Checking for interrupts means that we look at the bit that gets set if the * screen code supports asynchronous events, and call back into the event code * so that non-asynchronous screens get a chance to post the interrupt. * * INTERRUPT_CHECK is the number of lines "operated" on before checking for * interrupts. */ #define INTERRUPT_CHECK 100 #define INTERRUPTED(sp) \ (F_ISSET((sp)->gp, G_INTERRUPTED) || \ (!v_event_get(sp, NULL, 0, EC_INTERRUPT) && \ F_ISSET((sp)->gp, G_INTERRUPTED))) #define CLR_INTERRUPT(sp) \ F_CLR((sp)->gp, G_INTERRUPTED) /* Flags describing types of characters being requested. */ #define EC_INTERRUPT 0x001 /* Checking for interrupts. */ #define EC_MAPCOMMAND 0x002 /* Apply the command map. */ #define EC_MAPINPUT 0x004 /* Apply the input map. */ #define EC_MAPNODIGIT 0x008 /* Return to a digit. */ #define EC_QUOTED 0x010 /* Try to quote next character */ #define EC_RAW 0x020 /* Any next character. XXX: not used. */ #define EC_TIMEOUT 0x040 /* Timeout to next character. */ /* Flags describing text input special cases. */ #define TXT_ADDNEWLINE 0x00000001 /* Replay starts on a new line. */ #define TXT_AICHARS 0x00000002 /* Leading autoindent chars. */ #define TXT_ALTWERASE 0x00000004 /* Option: altwerase. */ #define TXT_APPENDEOL 0x00000008 /* Appending after EOL. */ #define TXT_AUTOINDENT 0x00000010 /* Autoindent set this line. */ #define TXT_BACKSLASH 0x00000020 /* Backslashes escape characters. */ #define TXT_BEAUTIFY 0x00000040 /* Only printable characters. */ #define TXT_BS 0x00000080 /* Backspace returns the buffer. */ #define TXT_CEDIT 0x00000100 /* Can return TERM_CEDIT. */ #define TXT_CNTRLD 0x00000200 /* Control-D is a command. */ #define TXT_CNTRLT 0x00000400 /* Control-T is an indent special. */ #define TXT_CR 0x00000800 /* CR returns the buffer. */ #define TXT_DOTTERM 0x00001000 /* Leading '.' terminates the input. */ #define TXT_EMARK 0x00002000 /* End of replacement mark. */ #define TXT_EOFCHAR 0x00004000 /* ICANON set, return EOF character. */ #define TXT_ESCAPE 0x00008000 /* Escape returns the buffer. */ #define TXT_FILEC 0x00010000 /* Option: filec. */ #define TXT_INFOLINE 0x00020000 /* Editing the info line. */ #define TXT_MAPINPUT 0x00040000 /* Apply the input map. */ #define TXT_NLECHO 0x00080000 /* Echo the newline. */ #define TXT_NUMBER 0x00100000 /* Number the line. */ #define TXT_OVERWRITE 0x00200000 /* Overwrite characters. */ #define TXT_PROMPT 0x00400000 /* Display a prompt. */ #define TXT_RECORD 0x00800000 /* Record for replay. */ #define TXT_REPLACE 0x01000000 /* Replace; don't delete overwrite. */ #define TXT_REPLAY 0x02000000 /* Replay the last input. */ #define TXT_RESOLVE 0x04000000 /* Resolve the text into the file. */ #define TXT_SEARCHINCR 0x08000000 /* Incremental search. */ #define TXT_SHOWMATCH 0x10000000 /* Option: showmatch. */ #define TXT_TTYWERASE 0x20000000 /* Option: ttywerase. */ #define TXT_WRAPMARGIN 0x40000000 /* Option: wrapmargin. */ nvi-1.81.6/common/log.c0100644000076400001440000004462310720065506013700 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: log.c,v 10.26 2002/03/02 23:12:13 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:12:13 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" /* * The log consists of records, each containing a type byte and a variable * length byte string, as follows: * * LOG_CURSOR_INIT MARK * LOG_CURSOR_END MARK * LOG_LINE_APPEND_F db_recno_t char * * LOG_LINE_APPEND_B db_recno_t char * * LOG_LINE_DELETE_F db_recno_t char * * LOG_LINE_DELETE_B db_recno_t char * * LOG_LINE_RESET_F db_recno_t char * * LOG_LINE_RESET_B db_recno_t char * * LOG_MARK LMARK * * We do before image physical logging. This means that the editor layer * MAY NOT modify records in place, even if simply deleting or overwriting * characters. Since the smallest unit of logging is a line, we're using * up lots of space. This may eventually have to be reduced, probably by * doing logical logging, which is a much cooler database phrase. * * The implementation of the historic vi 'u' command, using roll-forward and * roll-back, is simple. Each set of changes has a LOG_CURSOR_INIT record, * followed by a number of other records, followed by a LOG_CURSOR_END record. * LOG_LINE_RESET records come in pairs. The first is a LOG_LINE_RESET_B * record, and is the line before the change. The second is LOG_LINE_RESET_F, * and is the line after the change. Roll-back is done by backing up to the * first LOG_CURSOR_INIT record before a change. Roll-forward is done in a * similar fashion. * * The 'U' command is implemented by rolling backward to a LOG_CURSOR_END * record for a line different from the current one. It should be noted that * this means that a subsequent 'u' command will make a change based on the * new position of the log's cursor. This is okay, and, in fact, historic vi * behaved that way. */ static int vi_log_get __P((SCR *sp, db_recno_t *lnop, size_t *size)); static int log_cursor1 __P((SCR *, int)); static void log_err __P((SCR *, char *, int)); #if defined(DEBUG) && 0 static void log_trace __P((SCR *, char *, db_recno_t, u_char *)); #endif /* Try and restart the log on failure, i.e. if we run out of memory. */ #define LOG_ERR { \ log_err(sp, __FILE__, __LINE__); \ return (1); \ } /* offset of CHAR_T string in log needs to be aligned on some systems * because it is passed to db_set as a string */ typedef struct { char data[sizeof(u_char) /* type */ + sizeof(db_recno_t)]; CHAR_T str[1]; } log_t; #define CHAR_T_OFFSET ((char *)(((log_t*)0)->str) - (char *)0) /* * log_init -- * Initialize the logging subsystem. * * PUBLIC: int log_init __P((SCR *, EXF *)); */ int log_init(SCR *sp, EXF *ep) { /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. * * Initialize the buffer. The logging subsystem has its own * buffers because the global ones are almost by definition * going to be in use when the log runs. */ sp->wp->l_lp = NULL; sp->wp->l_len = 0; ep->l_cursor.lno = 1; /* XXX Any valid recno. */ ep->l_cursor.cno = 0; ep->l_high = ep->l_cur = 1; if (db_create(&ep->log, 0, 0) != 0 || db_open(ep->log, NULL, DB_RECNO, DB_CREATE | VI_DB_THREAD, S_IRUSR | S_IWUSR) != 0) { msgq(sp, M_SYSERR, "009|Log file"); F_SET(ep, F_NOLOG); return (1); } ep->l_win = NULL; /*LOCK_INIT(sp->wp, ep);*/ return (0); } /* * log_end -- * Close the logging subsystem. * * PUBLIC: int log_end __P((SCR *, EXF *)); */ int log_end(SCR *sp, EXF *ep) { /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. */ /*LOCK_END(sp->wp, ep);*/ if (ep->log != NULL) { (void)(ep->log->close)(ep->log,DB_NOSYNC); ep->log = NULL; } if (sp->wp->l_lp != NULL) { free(sp->wp->l_lp); sp->wp->l_lp = NULL; } sp->wp->l_len = 0; ep->l_cursor.lno = 1; /* XXX Any valid recno. */ ep->l_cursor.cno = 0; ep->l_high = ep->l_cur = 1; return (0); } /* * log_cursor -- * Log the current cursor position, starting an event. * * PUBLIC: int log_cursor __P((SCR *)); */ int log_cursor(SCR *sp) { EXF *ep; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* * If any changes were made since the last cursor init, * put out the ending cursor record. */ if (ep->l_cursor.lno == OOBLNO) { if (ep->l_win && ep->l_win != sp->wp) return 0; ep->l_cursor.lno = sp->lno; ep->l_cursor.cno = sp->cno; ep->l_win = NULL; return (log_cursor1(sp, LOG_CURSOR_END)); } ep->l_cursor.lno = sp->lno; ep->l_cursor.cno = sp->cno; return (0); } /* * log_cursor1 -- * Actually push a cursor record out. */ static int log_cursor1(SCR *sp, int type) { DBT data, key; EXF *ep; ep = sp->ep; /* if (type == LOG_CURSOR_INIT && LOCK_TRY(sp->wp, ep)) return 1; */ BINC_RETC(sp, sp->wp->l_lp, sp->wp->l_len, sizeof(u_char) + sizeof(MARK)); sp->wp->l_lp[0] = type; memmove(sp->wp->l_lp + sizeof(u_char), &ep->l_cursor, sizeof(MARK)); memset(&key, 0, sizeof(key)); key.data = &ep->l_cur; key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); data.data = sp->wp->l_lp; data.size = sizeof(u_char) + sizeof(MARK); if (ep->log->put(ep->log, NULL, &key, &data, 0) == -1) LOG_ERR; #if defined(DEBUG) && 0 vtrace(sp, "%lu: %s: %u/%u\n", ep->l_cur, type == LOG_CURSOR_INIT ? "log_cursor_init" : "log_cursor_end", sp->lno, sp->cno); #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; /* if (type == LOG_CURSOR_END) LOCK_UNLOCK(sp->wp, ep); */ return (0); } /* * log_line -- * Log a line change. * * PUBLIC: int log_line __P((SCR *, db_recno_t, u_int)); */ int log_line(SCR *sp, db_recno_t lno, u_int action) { DBT data, key; EXF *ep; size_t len; CHAR_T *lp; db_recno_t lcur; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* * XXX * * Kluge for vi. Clear the EXF undo flag so that the * next 'u' command does a roll-back, regardless. */ F_CLR(ep, F_UNDO); /* Put out one initial cursor record per set of changes. */ if (ep->l_cursor.lno != OOBLNO) { if (log_cursor1(sp, LOG_CURSOR_INIT)) return (1); ep->l_cursor.lno = OOBLNO; ep->l_win = sp->wp; } /*else if (ep->l_win != sp->wp) { printf("log_line own: %p, this: %p\n", ep->l_win, sp->wp); return 1; }*/ switch (action) { /* newly added for DB4 logging */ case LOG_LINE_APPEND_B: case LOG_LINE_DELETE_F: return 0; } /* * Put out the changes. If it's a LOG_LINE_RESET_B call, it's a * special case, avoid the caches. Also, if it fails and it's * line 1, it just means that the user started with an empty file, * so fake an empty length line. */ if (action == LOG_LINE_RESET_B) { if (db_get(sp, lno, DBG_NOCACHE, &lp, &len)) { static CHAR_T nul = 0; if (lno != 1) { db_err(sp, lno); return (1); } len = 0; lp = &nul; } } else if (db_get(sp, lno, DBG_FATAL, &lp, &len)) return (1); BINC_RETC(sp, sp->wp->l_lp, sp->wp->l_len, len * sizeof(CHAR_T) + CHAR_T_OFFSET); sp->wp->l_lp[0] = action; memmove(sp->wp->l_lp + sizeof(u_char), &lno, sizeof(db_recno_t)); MEMMOVEW(sp->wp->l_lp + CHAR_T_OFFSET, lp, len); lcur = ep->l_cur; memset(&key, 0, sizeof(key)); key.data = &lcur; key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); data.data = sp->wp->l_lp; data.size = len * sizeof(CHAR_T) + CHAR_T_OFFSET; if (ep->log->put(ep->log, NULL, &key, &data, 0) == -1) LOG_ERR; #if defined(DEBUG) && 0 switch (action) { case LOG_LINE_APPEND_F: vtrace(sp, "%u: log_line: append_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_APPEND_B: vtrace(sp, "%u: log_line: append_b: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_DELETE_F: vtrace(sp, "%lu: log_line: delete_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_DELETE_B: vtrace(sp, "%lu: log_line: delete_b: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_RESET_F: vtrace(sp, "%lu: log_line: reset_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_RESET_B: vtrace(sp, "%lu: log_line: reset_b: %lu {%u}\n", ep->l_cur, lno, len); break; } #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; return (0); } /* * log_mark -- * Log a mark position. For the log to work, we assume that there * aren't any operations that just put out a log record -- this * would mean that undo operations would only reset marks, and not * cause any other change. * * PUBLIC: int log_mark __P((SCR *, LMARK *)); */ int log_mark(SCR *sp, LMARK *lmp) { DBT data, key; EXF *ep; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* Put out one initial cursor record per set of changes. */ if (ep->l_cursor.lno != OOBLNO) { if (log_cursor1(sp, LOG_CURSOR_INIT)) return (1); ep->l_cursor.lno = OOBLNO; ep->l_win = sp->wp; } BINC_RETC(sp, sp->wp->l_lp, sp->wp->l_len, sizeof(u_char) + sizeof(LMARK)); sp->wp->l_lp[0] = LOG_MARK; memmove(sp->wp->l_lp + sizeof(u_char), lmp, sizeof(LMARK)); memset(&key, 0, sizeof(key)); key.data = &ep->l_cur; key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); data.data = sp->wp->l_lp; data.size = sizeof(u_char) + sizeof(LMARK); if (ep->log->put(ep->log, NULL, &key, &data, 0) == -1) LOG_ERR; #if defined(DEBUG) && 0 vtrace(sp, "%lu: mark %c: %lu/%u\n", ep->l_cur, lmp->name, lmp->lno, lmp->cno); #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; return (0); } /* * vi_log_get -- * Get a line from the log in log buffer. */ static int vi_log_get(SCR *sp, db_recno_t *lnop, size_t *size) { DBT key, data; size_t nlen; EXF *ep; ep = sp->ep; nlen = 1024; retry: BINC_RETC(sp, sp->wp->l_lp, sp->wp->l_len, nlen); memset(&key, 0, sizeof(key)); key.data = lnop; /* Initialize db request. */ key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); data.data = sp->wp->l_lp; data.ulen = sp->wp->l_len; data.flags = DB_DBT_USERMEM; switch (ep->log->get(ep->log, NULL, &key, &data, 0)) { case ENOMEM: nlen = data.size; goto retry; case 0: *size = data.size; return 0; default: return 1; } } /* * Log_backward -- * Roll the log backward one operation. * * PUBLIC: int log_backward __P((SCR *, MARK *)); */ int log_backward(SCR *sp, MARK *rp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; int didop; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "010|Logging not being performed, undo not possible"); return (1); } if (ep->l_cur == 1) { msgq(sp, M_BERR, "011|No changes to undo"); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } ep->l_win = sp->wp; F_SET(ep, F_NOLOG); /* Turn off logging. */ for (didop = 0;;) { --ep->l_cur; if (vi_log_get(sp, &ep->l_cur, &size)) LOG_ERR; #if defined(DEBUG) && 0 log_trace(sp, "log_backward", ep->l_cur, data.data); #endif switch (*(p = (u_char *)sp->wp->l_lp)) { case LOG_CURSOR_INIT: if (didop) { memmove(rp, p + sizeof(u_char), sizeof(MARK)); F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (0); } break; case LOG_CURSOR_END: break; case LOG_LINE_APPEND_F: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_delete(sp, lno)) goto err; ++sp->rptlines[L_DELETED]; break; case LOG_LINE_DELETE_B: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_insert(sp, lno, (CHAR_T *)(p + CHAR_T_OFFSET), (size - CHAR_T_OFFSET) / sizeof(CHAR_T))) goto err; ++sp->rptlines[L_ADDED]; break; case LOG_LINE_RESET_F: break; case LOG_LINE_RESET_B: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_set(sp, lno, (CHAR_T *)(p + CHAR_T_OFFSET), (size - CHAR_T_OFFSET) / sizeof(CHAR_T))) goto err; if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } break; case LOG_MARK: didop = 1; memmove(&lm, p + sizeof(u_char), sizeof(LMARK)); m.lno = lm.lno; m.cno = lm.cno; if (mark_set(sp, lm.name, &m, 0)) goto err; break; default: abort(); } } err: F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (1); } /* * Log_setline -- * Reset the line to its original appearance. * * XXX * There's a bug in this code due to our not logging cursor movements * unless a change was made. If you do a change, move off the line, * then move back on and do a 'U', the line will be restored to the way * it was before the original change. * * PUBLIC: int log_setline __P((SCR *)); */ int log_setline(SCR *sp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "012|Logging not being performed, undo not possible"); return (1); } if (ep->l_cur == 1) return (1); if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } ep->l_win = sp->wp; F_SET(ep, F_NOLOG); /* Turn off logging. */ for (;;) { --ep->l_cur; if (vi_log_get(sp, &ep->l_cur, &size)) LOG_ERR; #if defined(DEBUG) && 0 log_trace(sp, "log_setline", ep->l_cur, data.data); #endif switch (*(p = (u_char *)sp->wp->l_lp)) { case LOG_CURSOR_INIT: memmove(&m, p + sizeof(u_char), sizeof(MARK)); if (m.lno != sp->lno || ep->l_cur == 1) { F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (0); } break; case LOG_CURSOR_END: memmove(&m, p + sizeof(u_char), sizeof(MARK)); if (m.lno != sp->lno) { ++ep->l_cur; F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (0); } break; case LOG_LINE_APPEND_F: case LOG_LINE_DELETE_B: case LOG_LINE_RESET_F: break; case LOG_LINE_RESET_B: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (lno == sp->lno && db_set(sp, lno, (CHAR_T *)(p + CHAR_T_OFFSET), (size - CHAR_T_OFFSET) / sizeof(CHAR_T))) goto err; if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } case LOG_MARK: memmove(&lm, p + sizeof(u_char), sizeof(LMARK)); m.lno = lm.lno; m.cno = lm.cno; if (mark_set(sp, lm.name, &m, 0)) goto err; break; default: abort(); } } err: F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (1); } /* * Log_forward -- * Roll the log forward one operation. * * PUBLIC: int log_forward __P((SCR *, MARK *)); */ int log_forward(SCR *sp, MARK *rp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; int didop; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "013|Logging not being performed, roll-forward not possible"); return (1); } if (ep->l_cur == ep->l_high) { msgq(sp, M_BERR, "014|No changes to re-do"); return (1); } if (ep->l_win && ep->l_win != sp->wp) { ex_emsg(sp, NULL, EXM_LOCKED); return 1; } ep->l_win = sp->wp; F_SET(ep, F_NOLOG); /* Turn off logging. */ for (didop = 0;;) { ++ep->l_cur; if (vi_log_get(sp, &ep->l_cur, &size)) LOG_ERR; #if defined(DEBUG) && 0 log_trace(sp, "log_forward", ep->l_cur, data.data); #endif switch (*(p = (u_char *)sp->wp->l_lp)) { case LOG_CURSOR_END: if (didop) { ++ep->l_cur; memmove(rp, p + sizeof(u_char), sizeof(MARK)); F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (0); } break; case LOG_CURSOR_INIT: break; case LOG_LINE_APPEND_F: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_insert(sp, lno, (CHAR_T *)(p + CHAR_T_OFFSET), (size - CHAR_T_OFFSET) / sizeof(CHAR_T))) goto err; ++sp->rptlines[L_ADDED]; break; case LOG_LINE_DELETE_B: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_delete(sp, lno)) goto err; ++sp->rptlines[L_DELETED]; break; case LOG_LINE_RESET_B: break; case LOG_LINE_RESET_F: didop = 1; memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); if (db_set(sp, lno, (CHAR_T *)(p + CHAR_T_OFFSET), (size - CHAR_T_OFFSET) / sizeof(CHAR_T))) goto err; if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } break; case LOG_MARK: didop = 1; memmove(&lm, p + sizeof(u_char), sizeof(LMARK)); m.lno = lm.lno; m.cno = lm.cno; if (mark_set(sp, lm.name, &m, 0)) goto err; break; default: abort(); } } err: F_CLR(ep, F_NOLOG); ep->l_win = NULL; return (1); } /* * log_err -- * Try and restart the log on failure, i.e. if we run out of memory. */ static void log_err(SCR *sp, char *file, int line) { EXF *ep; msgq(sp, M_SYSERR, "015|%s/%d: log put error", tail(file), line); ep = sp->ep; (void)ep->log->close(ep->log, DB_NOSYNC); if (!log_init(sp, ep)) msgq(sp, M_ERR, "267|Log restarted"); } #if defined(DEBUG) && 0 static void log_trace(sp, msg, rno, p) SCR *sp; char *msg; db_recno_t rno; u_char *p; { LMARK lm; MARK m; db_recno_t lno; switch (*p) { case LOG_CURSOR_INIT: memmove(&m, p + sizeof(u_char), sizeof(MARK)); vtrace(sp, "%lu: %s: C_INIT: %u/%u\n", rno, msg, m.lno, m.cno); break; case LOG_CURSOR_END: memmove(&m, p + sizeof(u_char), sizeof(MARK)); vtrace(sp, "%lu: %s: C_END: %u/%u\n", rno, msg, m.lno, m.cno); break; case LOG_LINE_APPEND_F: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: APPEND_F: %lu\n", rno, msg, lno); break; case LOG_LINE_APPEND_B: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: APPEND_B: %lu\n", rno, msg, lno); break; case LOG_LINE_DELETE_F: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: DELETE_F: %lu\n", rno, msg, lno); break; case LOG_LINE_DELETE_B: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: DELETE_B: %lu\n", rno, msg, lno); break; case LOG_LINE_RESET_F: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: RESET_F: %lu\n", rno, msg, lno); break; case LOG_LINE_RESET_B: memmove(&lno, p + sizeof(u_char), sizeof(db_recno_t)); vtrace(sp, "%lu: %s: RESET_B: %lu\n", rno, msg, lno); break; case LOG_MARK: memmove(&lm, p + sizeof(u_char), sizeof(LMARK)); vtrace(sp, "%lu: %s: MARK: %u/%u\n", rno, msg, lm.lno, lm.cno); break; default: abort(); } } #endif nvi-1.81.6/common/log.h0100644000076400001440000000135110720065506013674 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: log.h,v 10.4 2002/06/08 21:00:33 skimo Exp $ (Berkeley) $Date: 2002/06/08 21:00:33 $ */ #define LOG_NOTYPE 0 #define LOG_CURSOR_INIT 2 #define LOG_CURSOR_END 3 #define LOG_LINE_APPEND_B 4 #define LOG_LINE_APPEND_F 5 #define LOG_LINE_DELETE_B 6 #define LOG_LINE_DELETE_F 7 #define LOG_LINE_RESET_B 8 #define LOG_LINE_RESET_F 9 #define LOG_MARK 10 typedef enum { UNDO_FORWARD, UNDO_BACKWARD, UNDO_SETLINE } undo_t; struct _log_state { int didop; MARK pos; undo_t undo; }; nvi-1.81.6/common/log4.c0100644000076400001440000002407510720065506013763 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: log4.c,v 10.3 2002/06/08 21:00:33 skimo Exp $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" /* * The log consists of records, each containing a type byte and a variable * length byte string, as follows: * * LOG_CURSOR_INIT MARK * LOG_CURSOR_END MARK * LOG_LINE_APPEND_F db_recno_t char * * LOG_LINE_APPEND_B db_recno_t char * * LOG_LINE_DELETE_F db_recno_t char * * LOG_LINE_DELETE_B db_recno_t char * * LOG_LINE_RESET_F db_recno_t char * * LOG_LINE_RESET_B db_recno_t char * * LOG_MARK LMARK * * We do before image physical logging. This means that the editor layer * MAY NOT modify records in place, even if simply deleting or overwriting * characters. Since the smallest unit of logging is a line, we're using * up lots of space. This may eventually have to be reduced, probably by * doing logical logging, which is a much cooler database phrase. * * The implementation of the historic vi 'u' command, using roll-forward and * roll-back, is simple. Each set of changes has a LOG_CURSOR_INIT record, * followed by a number of other records, followed by a LOG_CURSOR_END record. * LOG_LINE_RESET records come in pairs. The first is a LOG_LINE_RESET_B * record, and is the line before the change. The second is LOG_LINE_RESET_F, * and is the line after the change. Roll-back is done by backing up to the * first LOG_CURSOR_INIT record before a change. Roll-forward is done in a * similar fashion. * * The 'U' command is implemented by rolling backward to a LOG_CURSOR_END * record for a line different from the current one. It should be noted that * this means that a subsequent 'u' command will make a change based on the * new position of the log's cursor. This is okay, and, in fact, historic vi * behaved that way. */ static int log_cursor1 __P((SCR *, int)); /* * log_init -- * Initialize the logging subsystem. * * PUBLIC: int log_init __P((SCR *, EXF *)); */ int log_init(SCR *sp, EXF *ep) { DB_LOGC *logc; DBT data; size_t nlen; /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. * * Initialize the buffer. The logging subsystem has its own * buffers because the global ones are almost by definition * going to be in use when the log runs. */ sp->wp->l_lp = NULL; sp->wp->l_len = 0; ep->l_cursor.lno = 1; /* XXX Any valid recno. */ ep->l_cursor.cno = 0; ep->l_high = ep->l_cur = 1; if ((sp->db_error = ep->env->log_cursor(ep->env, &logc, 0)) != 0) { msgq(sp, M_DBERR, "env->log_cursor"); F_SET(ep, F_NOLOG); return (1); } nlen = 1024; retry: BINC_GOTO(sp, sp->wp->l_lp, sp->wp->l_len, nlen); memset(&data, 0, sizeof(data)); data.data = sp->wp->l_lp; data.ulen = sp->wp->l_len; data.flags = DB_DBT_USERMEM; switch ((sp->db_error = logc->get(logc, &ep->lsn_first, &data, DB_LAST))) { case ENOMEM: nlen = data.size; goto retry; default: alloc_err: msgq(sp, M_DBERR, "logc->get"); F_SET(ep, F_NOLOG); return (1); case 0: ; } MEMCPY(&ep->lsn_cur, &ep->lsn_first, 1); MEMCPY(&ep->lsn_high, &ep->lsn_first, 1); logc->close(logc, 0); ep->l_win = NULL; /*LOCK_INIT(sp->wp, ep);*/ return (0); } /* * log_end -- * Close the logging subsystem. * * PUBLIC: int log_end __P((SCR *, EXF *)); */ int log_end(SCR *sp, EXF *ep) { /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. */ /*LOCK_END(sp->wp, ep);*/ if (sp->wp->l_lp != NULL) { free(sp->wp->l_lp); sp->wp->l_lp = NULL; } sp->wp->l_len = 0; ep->l_cursor.lno = 1; /* XXX Any valid recno. */ ep->l_cursor.cno = 0; ep->l_high = ep->l_cur = 1; return (0); } /* * log_cursor -- * Log the current cursor position, starting an event. * * PUBLIC: int log_cursor __P((SCR *)); */ int log_cursor(SCR *sp) { EXF *ep; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* * If any changes were made since the last cursor init, * put out the ending cursor record. */ if (ep->l_cursor.lno == OOBLNO) { if (ep->l_win && ep->l_win != sp->wp) return 0; ep->l_cursor.lno = sp->lno; ep->l_cursor.cno = sp->cno; ep->l_win = NULL; return (log_cursor1(sp, LOG_CURSOR_END)); } ep->l_cursor.lno = sp->lno; ep->l_cursor.cno = sp->cno; return (0); } /* * log_cursor1 -- * Actually push a cursor record out. */ static int log_cursor1(SCR *sp, int type) { DBT data, key; EXF *ep; ep = sp->ep; /* if (type == LOG_CURSOR_INIT && LOCK_TRY(sp->wp, ep)) return 1; */ if (type == LOG_CURSOR_INIT && (sp->db_error = __vi_log_truncate(ep)) != 0) { msgq(sp, M_DBERR, "truncate"); return 1; } if ((sp->db_error = __vi_cursor_log(ep->env, NULL, &ep->lsn_cur, 0, type, ep->l_cursor.lno, ep->l_cursor.cno)) != 0) { msgq(sp, M_DBERR, "cursor_log"); return 1; } if (type == LOG_CURSOR_END) { MEMCPY(&ep->lsn_high, &ep->lsn_cur, 1); /* XXXX should not be needed */ ep->env->log_flush(ep->env, NULL); } #if defined(DEBUG) && 0 vtrace(sp, "%lu: %s: %u/%u\n", ep->l_cur, type == LOG_CURSOR_INIT ? "log_cursor_init" : "log_cursor_end", sp->lno, sp->cno); #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; /* if (type == LOG_CURSOR_END) LOCK_UNLOCK(sp->wp, ep); */ return (0); } /* * log_line -- * Log a line change. * * PUBLIC: int log_line __P((SCR *, db_recno_t, u_int)); */ int log_line(SCR *sp, db_recno_t lno, u_int action) { DBT data, key; EXF *ep; size_t len; CHAR_T *lp; db_recno_t lcur; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* * XXX * * Kluge for vi. Clear the EXF undo flag so that the * next 'u' command does a roll-back, regardless. */ F_CLR(ep, F_UNDO); /* Put out one initial cursor record per set of changes. */ if (ep->l_cursor.lno != OOBLNO) { if (log_cursor1(sp, LOG_CURSOR_INIT)) return (1); ep->l_cursor.lno = OOBLNO; ep->l_win = sp->wp; } /*else if (ep->l_win != sp->wp) { printf("log_line own: %p, this: %p\n", ep->l_win, sp->wp); return 1; }*/ if ((sp->db_error = __vi_change_log(ep->env, NULL, &ep->lsn_cur, 0, action, lno)) != 0) { msgq(sp, M_DBERR, "change_log"); return 1; } #if defined(DEBUG) && 0 switch (action) { case LOG_LINE_APPEND_F: vtrace(sp, "%u: log_line: append_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_APPEND_B: vtrace(sp, "%u: log_line: append_b: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_DELETE_F: vtrace(sp, "%lu: log_line: delete_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_DELETE_B: vtrace(sp, "%lu: log_line: delete_b: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_RESET_F: vtrace(sp, "%lu: log_line: reset_f: %lu {%u}\n", ep->l_cur, lno, len); break; case LOG_LINE_RESET_B: vtrace(sp, "%lu: log_line: reset_b: %lu {%u}\n", ep->l_cur, lno, len); break; } #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; return (0); } /* * log_mark -- * Log a mark position. For the log to work, we assume that there * aren't any operations that just put out a log record -- this * would mean that undo operations would only reset marks, and not * cause any other change. * * PUBLIC: int log_mark __P((SCR *, LMARK *)); */ int log_mark(SCR *sp, LMARK *lmp) { DBT data, key; EXF *ep; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) return (0); /* Put out one initial cursor record per set of changes. */ if (ep->l_cursor.lno != OOBLNO) { if (log_cursor1(sp, LOG_CURSOR_INIT)) return (1); ep->l_cursor.lno = OOBLNO; ep->l_win = sp->wp; } if ((sp->db_error = __vi_mark_log(ep->env, NULL, &ep->lsn_cur, 0, lmp)) != 0) { msgq(sp, M_DBERR, "cursor_log"); return 1; } #if defined(DEBUG) && 0 vtrace(sp, "%lu: mark %c: %lu/%u\n", ep->l_cur, lmp->name, lmp->lno, lmp->cno); #endif /* Reset high water mark. */ ep->l_high = ++ep->l_cur; return (0); } /* * Log_backward -- * Roll the log backward one operation. * * PUBLIC: int log_backward __P((SCR *, MARK *)); */ int log_backward(SCR *sp, MARK *rp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; int didop; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "010|Logging not being performed, undo not possible"); return (1); } if (log_compare(&ep->lsn_cur, &ep->lsn_first) <= 0) { msgq(sp, M_BERR, "011|No changes to undo"); return (1); } return __vi_log_traverse(sp, UNDO_BACKWARD, rp); } /* * Log_setline -- * Reset the line to its original appearance. * * XXX * There's a bug in this code due to our not logging cursor movements * unless a change was made. If you do a change, move off the line, * then move back on and do a 'U', the line will be restored to the way * it was before the original change. * * PUBLIC: int log_setline __P((SCR *)); */ int log_setline(SCR *sp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "012|Logging not being performed, undo not possible"); return (1); } if (log_compare(&ep->lsn_cur, &ep->lsn_first) <= 0) { msgq(sp, M_BERR, "011|No changes to undo"); return (1); } return __vi_log_traverse(sp, UNDO_SETLINE, &m); } /* * Log_forward -- * Roll the log forward one operation. * * PUBLIC: int log_forward __P((SCR *, MARK *)); */ int log_forward(SCR *sp, MARK *rp) { EXF *ep; LMARK lm; MARK m; db_recno_t lno; int didop; u_char *p; size_t size; ep = sp->ep; if (F_ISSET(ep, F_NOLOG)) { msgq(sp, M_ERR, "013|Logging not being performed, roll-forward not possible"); return (1); } if (log_compare(&ep->lsn_cur, &ep->lsn_high) >= 0) { msgq(sp, M_BERR, "014|No changes to re-do"); return (1); } return __vi_log_traverse(sp, UNDO_FORWARD, rp); } nvi-1.81.6/common/main.c0100644000076400001440000002756210720065506014046 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char copyright[] = "%Z% Copyright (c) 1992, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n\ %Z% Copyright (c) 1992, 1993, 1994, 1995, 1996\n\ Keith Bostic. All rights reserved.\n"; #endif /* not lint */ #ifndef lint static const char sccsid[] = "$Id: main.c,v 10.63 2001/11/01 15:24:43 skimo Exp $ (Berkeley) $Date: 2001/11/01 15:24:43 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" #include "pathnames.h" static void attach __P((GS *)); static void v_estr __P((char *, int, char *)); static int v_obsolete __P((char *, char *[])); /* * editor -- * Main editor routine. * * PUBLIC: int editor __P((WIN *, int, char *[])); */ int editor(WIN *wp, int argc, char **argv) { extern int optind; extern char *optarg; const char *p; EVENT ev; FREF *frp; SCR *sp; GS *gp; size_t len; u_int flags; int ch, flagchk, lflag, secure, startup, readonly, rval, silent; char *tag_f, *wsizearg, path[256]; CHAR_T *w; size_t wlen; gp = wp->gp; /* Initialize the busy routine, if not defined by the screen. */ if (gp->scr_busy == NULL) gp->scr_busy = vs_busy; /* Initialize the message routine, if not defined by the screen. */ if (wp->scr_msg == NULL) wp->scr_msg = vs_msg; /* Set initial screen type and mode based on the program name. */ readonly = 0; if (!strcmp(gp->progname, "ex") || !strcmp(gp->progname, "nex")) LF_INIT(SC_EX); else { /* Nview, view are readonly. */ if (!strcmp(gp->progname, "nview") || !strcmp(gp->progname, "view")) readonly = 1; /* Vi is the default. */ LF_INIT(SC_VI); } /* Convert old-style arguments into new-style ones. */ if (v_obsolete(gp->progname, argv)) return (1); /* Parse the arguments. */ flagchk = '\0'; tag_f = wsizearg = NULL; lflag = secure = silent = 0; startup = 1; /* Set the file snapshot flag. */ F_SET(gp, G_SNAPSHOT); #ifdef DEBUG while ((ch = getopt(argc, argv, "c:D:eFlRrSsT:t:vw:")) != EOF) #else while ((ch = getopt(argc, argv, "c:eFlRrSst:vw:")) != EOF) #endif switch (ch) { case 'c': /* Run the command. */ /* * XXX * We should support multiple -c options. */ if (gp->c_option != NULL) { v_estr(gp->progname, 0, "only one -c command may be specified."); return (1); } gp->c_option = optarg; break; #ifdef DEBUG case 'D': switch (optarg[0]) { case 's': startup = 0; break; case 'w': attach(gp); break; default: v_estr(gp->progname, 0, "usage: -D requires s or w argument."); return (1); } break; #endif case 'e': /* Ex mode. */ LF_CLR(SC_VI); LF_SET(SC_EX); break; case 'F': /* No snapshot. */ v_estr(gp->progname, 0, "-F option no longer supported."); break; case 'l': /* Set lisp, showmatch options. */ lflag = 1; break; case 'R': /* Readonly. */ readonly = 1; break; case 'r': /* Recover. */ if (flagchk == 't') { v_estr(gp->progname, 0, "only one of -r and -t may be specified."); return (1); } flagchk = 'r'; break; case 'S': secure = 1; break; case 's': silent = 1; break; #ifdef TRACE case 'T': /* Trace. */ (void)vtrace_init(optarg); break; #endif case 't': /* Tag. */ if (flagchk == 'r') { v_estr(gp->progname, 0, "only one of -r and -t may be specified."); return (1); } if (flagchk == 't') { v_estr(gp->progname, 0, "only one tag file may be specified."); return (1); } flagchk = 't'; tag_f = optarg; break; case 'v': /* Vi mode. */ LF_CLR(SC_EX); LF_SET(SC_VI); break; case 'w': wsizearg = optarg; break; case '?': default: (void)gp->scr_usage(); return (1); } argc -= optind; argv += optind; /* * -s option is only meaningful to ex. * * If not reading from a terminal, it's like -s was specified. */ if (silent && !LF_ISSET(SC_EX)) { v_estr(gp->progname, 0, "-s option is only applicable to ex."); goto err; } if (LF_ISSET(SC_EX) && F_ISSET(gp, G_SCRIPTED)) silent = 1; /* * Build and initialize the first/current screen. This is a bit * tricky. If an error is returned, we may or may not have a * screen structure. If we have a screen structure, put it on a * display queue so that the error messages get displayed. * * !!! * Everything we do until we go interactive is done in ex mode. */ if (screen_init(gp, NULL, &sp)) { if (sp != NULL) { CIRCLEQ_INSERT_HEAD(&wp->scrq, sp, q); sp->wp = wp; } goto err; } F_SET(sp, SC_EX); CIRCLEQ_INSERT_HEAD(&wp->scrq, sp, q); sp->wp = wp; if (v_key_init(sp)) /* Special key initialization. */ goto err; { int oargs[5], *oargp = oargs; if (lflag) { /* Command-line options. */ *oargp++ = O_LISP; *oargp++ = O_SHOWMATCH; } if (readonly) *oargp++ = O_READONLY; if (secure) *oargp++ = O_SECURE; *oargp = -1; /* Options initialization. */ if (opts_init(sp, oargs)) goto err; } if (wsizearg != NULL) { ARGS *av[2], a, b; (void)snprintf(path, sizeof(path), "window=%s", wsizearg); a.bp = (CHAR_T *)path; a.len = strlen(path); b.bp = NULL; b.len = 0; av[0] = &a; av[1] = &b; (void)opts_set(sp, av, NULL); } if (silent) { /* Ex batch mode option values. */ O_CLR(sp, O_AUTOPRINT); O_CLR(sp, O_PROMPT); O_CLR(sp, O_VERBOSE); O_CLR(sp, O_WARN); F_SET(sp, SC_EX_SILENT); } sp->rows = O_VAL(sp, O_LINES); /* Make ex formatting work. */ sp->cols = O_VAL(sp, O_COLUMNS); if (!silent && startup) { /* Read EXINIT, exrc files. */ if (ex_exrc(sp)) goto err; if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) { if (screen_end(sp)) goto err; goto done; } } /* * List recovery files if -r specified without file arguments. * Note, options must be initialized and startup information * read before doing this. */ if (flagchk == 'r' && argv[0] == NULL) { if (rcv_list(sp)) goto err; if (screen_end(sp)) goto err; goto done; } /* * !!! * Initialize the default ^D, ^U scrolling value here, after the * user has had every opportunity to set the window option. * * It's historic practice that changing the value of the window * option did not alter the default scrolling value, only giving * a count to ^D/^U did that. */ sp->defscroll = (O_VAL(sp, O_WINDOW) + 1) / 2; /* * If we don't have a command-line option, switch into the right * editor now, so that we position default files correctly, and * so that any tags file file-already-locked messages are in the * vi screen, not the ex screen. * * XXX * If we have a command-line option, the error message can end * up in the wrong place, but I think that the combination is * unlikely. */ if (gp->c_option == NULL) { F_CLR(sp, SC_EX | SC_VI); F_SET(sp, LF_ISSET(SC_EX | SC_VI)); } /* Open a tag file if specified. */ if (tag_f != NULL) { CHAR2INT(sp, tag_f, strlen(tag_f) + 1, w, wlen); if (ex_tag_first(sp, w)) goto err; } /* * Append any remaining arguments as file names. Files are recovery * files if -r specified. If the tag option or ex startup commands * loaded a file, then any file arguments are going to come after it. */ if (*argv != NULL) { if (sp->frp != NULL) { /* Cheat -- we know we have an extra argv slot. */ MALLOC_NOMSG(sp, *--argv, char *, strlen(sp->frp->name) + 1); if (*argv == NULL) { v_estr(gp->progname, errno, NULL); goto err; } (void)strcpy(*argv, sp->frp->name); } sp->argv = sp->cargv = argv; F_SET(sp, SC_ARGNOFREE); if (flagchk == 'r') F_SET(sp, SC_ARGRECOVER); } /* * If the ex startup commands and or/the tag option haven't already * created a file, create one. If no command-line files were given, * use a temporary file. */ if (sp->frp == NULL) { if (sp->argv == NULL) { if ((frp = file_add(sp, NULL)) == NULL) goto err; } else { if ((frp = file_add(sp, sp->argv[0])) == NULL) goto err; if (F_ISSET(sp, SC_ARGRECOVER)) F_SET(frp, FR_RECOVER); } if (file_init(sp, frp, NULL, 0)) goto err; if (EXCMD_RUNNING(wp)) { (void)ex_cmd(sp); if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) { if (screen_end(sp)) goto err; goto done; } } } /* * Check to see if we need to wait for ex. If SC_SCR_EX is set, ex * was forced to initialize the screen during startup. We'd like to * wait for a single character from the user, but we can't because * we're not in raw mode. We can't switch to raw mode because the * vi initialization will switch to xterm's alternate screen, causing * us to lose the messages we're pausing to make sure the user read. * So, wait for a complete line. */ if (F_ISSET(sp, SC_SCR_EX)) { p = msg_cmsg(sp, CMSG_CONT_R, &len); (void)write(STDOUT_FILENO, p, len); for (;;) { if (v_event_get(sp, &ev, 0, 0)) goto err; if (ev.e_event == E_INTERRUPT || (ev.e_event == E_CHARACTER && (ev.e_value == K_CR || ev.e_value == K_NL))) break; (void)gp->scr_bell(sp); } } /* Switch into the right editor, regardless. */ F_CLR(sp, SC_EX | SC_VI); F_SET(sp, LF_ISSET(SC_EX | SC_VI) | SC_STATUS_CNT); /* * Main edit loop. Vi handles split screens itself, we only return * here when switching editor modes or restarting the screen. */ while (sp != NULL) if (F_ISSET(sp, SC_EX) ? ex(&sp) : vi(&sp)) goto err; done: rval = 0; if (0) err: rval = 1; return (rval); } /* * v_obsolete -- * Convert historic arguments into something getopt(3) will like. */ static int v_obsolete(char *name, char **argv) { size_t len; char *p; /* * Translate old style arguments into something getopt will like. * Make sure it's not text space memory, because ex modifies the * strings. * Change "+" into "-c$". * Change "+" into "-c". * Change "-" into "-s" * The c, T, t and w options take arguments so they can't be * special arguments. * * Stop if we find "--" as an argument, the user may want to edit * a file named "+foo". */ while (*++argv && strcmp(argv[0], "--")) if (argv[0][0] == '+') { if (argv[0][1] == '\0') { MALLOC_NOMSG(NULL, argv[0], char *, 4); if (argv[0] == NULL) goto nomem; (void)strcpy(argv[0], "-c$"); } else { p = argv[0]; len = strlen(argv[0]); MALLOC_NOMSG(NULL, argv[0], char *, len + 2); if (argv[0] == NULL) goto nomem; argv[0][0] = '-'; argv[0][1] = 'c'; (void)strcpy(argv[0] + 2, p + 1); } } else if (argv[0][0] == '-') { if (argv[0][1] == '\0') { MALLOC_NOMSG(NULL, argv[0], char *, 3); if (argv[0] == NULL) { nomem: v_estr(name, errno, NULL); return (1); } (void)strcpy(argv[0], "-s"); } else if ((argv[0][1] == 'c' || argv[0][1] == 'T' || argv[0][1] == 't' || argv[0][1] == 'w') && argv[0][2] == '\0') ++argv; } return (0); } #ifdef DEBUG static void attach(GS *gp) { int fd; char ch; if ((fd = open(_PATH_TTY, O_RDONLY, 0)) < 0) { v_estr(gp->progname, errno, _PATH_TTY); return; } (void)printf("process %lu waiting, enter to continue: ", (u_long)getpid()); (void)fflush(stdout); do { if (read(fd, &ch, 1) != 1) { (void)close(fd); return; } } while (ch != '\n' && ch != '\r'); (void)close(fd); } #endif static void v_estr(char *name, int eno, char *msg) { (void)fprintf(stderr, "%s", name); if (msg != NULL) (void)fprintf(stderr, ": %s", msg); if (eno) (void)fprintf(stderr, ": %s", strerror(errno)); (void)fprintf(stderr, "\n"); } nvi-1.81.6/common/mark.c0100644000076400001440000001515510720065506014047 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: mark.c,v 10.15 2001/06/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:11 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "common.h" static LMARK *mark_find __P((SCR *, ARG_CHAR_T)); /* * Marks are maintained in a key sorted doubly linked list. We can't * use arrays because we have no idea how big an index key could be. * The underlying assumption is that users don't have more than, say, * 10 marks at any one time, so this will be is fast enough. * * Marks are fixed, and modifications to the line don't update the mark's * position in the line. This can be hard. If you add text to the line, * place a mark in that text, undo the addition and use ` to move to the * mark, the location will have disappeared. It's tempting to try to adjust * the mark with the changes in the line, but this is hard to do, especially * if we've given the line to v_ntext.c:v_ntext() for editing. Historic vi * would move to the first non-blank on the line when the mark location was * past the end of the line. This can be complicated by deleting to a mark * that has disappeared using the ` command. Historic vi treated this as * a line-mode motion and deleted the line. This implementation complains to * the user. * * In historic vi, marks returned if the operation was undone, unless the * mark had been subsequently reset. Tricky. This is hard to start with, * but in the presence of repeated undo it gets nasty. When a line is * deleted, we delete (and log) any marks on that line. An undo will create * the mark. Any mark creations are noted as to whether the user created * it or if it was created by an undo. The former cannot be reset by another * undo, but the latter may. * * All of these routines translate ABSMARK2 to ABSMARK1. Setting either of * the absolute mark locations sets both, so that "m'" and "m`" work like * they, ah, for lack of a better word, "should". */ /* * mark_init -- * Set up the marks. * * PUBLIC: int mark_init __P((SCR *, EXF *)); */ int mark_init(SCR *sp, EXF *ep) { /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. * * Set up the marks. */ LIST_INIT(&ep->marks); return (0); } /* * mark_end -- * Free up the marks. * * PUBLIC: int mark_end __P((SCR *, EXF *)); */ int mark_end(SCR *sp, EXF *ep) { LMARK *lmp; /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. */ while ((lmp = ep->marks.lh_first) != NULL) { LIST_REMOVE(lmp, q); free(lmp); } return (0); } /* * mark_get -- * Get the location referenced by a mark. * * PUBLIC: int mark_get __P((SCR *, ARG_CHAR_T, MARK *, mtype_t)); */ int mark_get(SCR *sp, ARG_CHAR_T key, MARK *mp, mtype_t mtype) { LMARK *lmp; if (key == ABSMARK2) key = ABSMARK1; lmp = mark_find(sp, key); if (lmp == NULL || lmp->name != key) { msgq(sp, mtype, "017|Mark %s: not set", KEY_NAME(sp, key)); return (1); } if (F_ISSET(lmp, MARK_DELETED)) { msgq(sp, mtype, "018|Mark %s: the line was deleted", KEY_NAME(sp, key)); return (1); } /* * !!! * The absolute mark is initialized to lno 1/cno 0, and historically * you could use it in an empty file. Make such a mark always work. */ if ((lmp->lno != 1 || lmp->cno != 0) && !db_exist(sp, lmp->lno)) { msgq(sp, mtype, "019|Mark %s: cursor position no longer exists", KEY_NAME(sp, key)); return (1); } mp->lno = lmp->lno; mp->cno = lmp->cno; return (0); } /* * mark_set -- * Set the location referenced by a mark. * * PUBLIC: int mark_set __P((SCR *, ARG_CHAR_T, MARK *, int)); */ int mark_set(SCR *sp, ARG_CHAR_T key, MARK *value, int userset) { LMARK *lmp, *lmt; if (key == ABSMARK2) key = ABSMARK1; /* * The rules are simple. If the user is setting a mark (if it's a * new mark this is always true), it always happens. If not, it's * an undo, and we set it if it's not already set or if it was set * by a previous undo. */ lmp = mark_find(sp, key); if (lmp == NULL || lmp->name != key) { MALLOC_RET(sp, lmt, LMARK *, sizeof(LMARK)); if (lmp == NULL) { LIST_INSERT_HEAD(&sp->ep->marks, lmt, q); } else LIST_INSERT_AFTER(lmp, lmt, q); lmp = lmt; } else if (!userset && !F_ISSET(lmp, MARK_DELETED) && F_ISSET(lmp, MARK_USERSET)) return (0); lmp->lno = value->lno; lmp->cno = value->cno; lmp->name = key; lmp->flags = userset ? MARK_USERSET : 0; return (0); } /* * mark_find -- * Find the requested mark, or, the slot immediately before * where it would go. */ static LMARK * mark_find(SCR *sp, ARG_CHAR_T key) { LMARK *lmp, *lastlmp; /* * Return the requested mark or the slot immediately before * where it should go. */ for (lastlmp = NULL, lmp = sp->ep->marks.lh_first; lmp != NULL; lastlmp = lmp, lmp = lmp->q.le_next) if (lmp->name >= key) return (lmp->name == key ? lmp : lastlmp); return (lastlmp); } /* * mark_insdel -- * Update the marks based on an insertion or deletion. * * PUBLIC: int mark_insdel __P((SCR *, lnop_t, db_recno_t)); */ int mark_insdel(SCR *sp, lnop_t op, db_recno_t lno) { LMARK *lmp; db_recno_t lline; switch (op) { case LINE_APPEND: /* All insert/append operations are done as inserts. */ abort(); case LINE_DELETE: for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->lno >= lno) if (lmp->lno == lno) { F_SET(lmp, MARK_DELETED); (void)log_mark(sp, lmp); } else --lmp->lno; break; case LINE_INSERT: /* * XXX * Very nasty special case. If the file was empty, then we're * adding the first line, which is a replacement. So, we don't * modify the marks. This is a hack to make: * * mz:r!echo foo'z * * work, i.e. historically you could mark the "line" in an empty * file and replace it, and continue to use the mark. Insane, * well, yes, I know, but someone complained. * * Check for line #2 before going to the end of the file. */ if (!db_exist(sp, 2)) { if (db_last(sp, &lline)) return (1); if (lline == 1) return (0); } for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->lno >= lno) ++lmp->lno; break; case LINE_RESET: break; } return (0); } nvi-1.81.6/common/mark.h0100644000076400001440000000307510720065506014052 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: mark.h,v 10.5 2000/07/14 14:29:16 skimo Exp $ (Berkeley) $Date: 2000/07/14 14:29:16 $ */ /* * The MARK and LMARK structures define positions in the file. There are * two structures because the mark subroutines are the only places where * anything cares about something other than line and column. * * Because of the different interfaces used by the db(3) package, curses, * and users, the line number is 1 based and the column number is 0 based. * Additionally, it is known that the out-of-band line number is less than * any legal line number. The line number is of type db_recno_t, as that's * the underlying type of the database. The column number is of type size_t, * guaranteeing that we can malloc a line. */ struct _mark { #define OOBLNO 0 /* Out-of-band line number. */ db_recno_t lno; /* Line number. */ size_t cno; /* Column number. */ }; struct _lmark { LIST_ENTRY(_lmark) q; /* Linked list of marks. */ db_recno_t lno; /* Line number. */ size_t cno; /* Column number. */ /* XXXX Needed ? Can non ascii-chars be mark names ? */ CHAR_T name; /* Mark name. */ #define MARK_DELETED 0x01 /* Mark was deleted. */ #define MARK_USERSET 0x02 /* User set this mark. */ u_int8_t flags; }; #define ABSMARK1 '\'' /* Absolute mark name. */ #define ABSMARK2 '`' /* Absolute mark name. */ nvi-1.81.6/common/mem.h0100644000076400001440000001504210720065506013673 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: mem.h,v 10.13 2002/01/05 23:13:37 skimo Exp $ (Berkeley) $Date: 2002/01/05 23:13:37 $ */ #ifdef HAVE_GCC #define CHECK_TYPE(type, var) \ type L__lp __attribute__((unused)) = var; #else #define CHECK_TYPE(type, var) #endif /* Increase the size of a malloc'd buffer. Two versions, one that * returns, one that jumps to an error label. */ #define BINC_GOTO(sp, type, lp, llen, nlen) { \ CHECK_TYPE(type *, lp) \ void *L__bincp; \ if ((nlen) > llen) { \ if ((L__bincp = binc(sp, lp, &(llen), nlen)) == NULL) \ goto alloc_err; \ /* \ * !!! \ * Possible pointer conversion. \ */ \ lp = L__bincp; \ } \ } #define BINC_GOTOC(sp, lp, llen, nlen) \ BINC_GOTO(sp, char, lp, llen, nlen) #define BINC_GOTOW(sp, lp, llen, nlen) \ BINC_GOTO(sp, CHAR_T, lp, llen, (nlen) * sizeof(CHAR_T)) #define BINC_RET(sp, type, lp, llen, nlen) { \ CHECK_TYPE(type *, lp) \ void *L__bincp; \ if ((nlen) > llen) { \ if ((L__bincp = binc(sp, lp, &(llen), nlen)) == NULL) \ return (1); \ /* \ * !!! \ * Possible pointer conversion. \ */ \ lp = L__bincp; \ } \ } #define BINC_RETC(sp, lp, llen, nlen) \ BINC_RET(sp, char, lp, llen, nlen) #define BINC_RETW(sp, lp, llen, nlen) \ BINC_RET(sp, CHAR_T, lp, llen, (nlen) * sizeof(CHAR_T)) /* * Get some temporary space, preferably from the global temporary buffer, * from a malloc'd buffer otherwise. Two versions, one that returns, one * that jumps to an error label. */ #define GET_SPACE_GOTO(sp, type, bp, blen, nlen) { \ CHECK_TYPE(type *, bp) \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ if (L__wp == NULL || F_ISSET(L__wp, W_TMP_INUSE)) { \ bp = NULL; \ blen = 0; \ BINC_GOTO(sp, type, bp, blen, nlen); \ } else { \ BINC_GOTOC(sp, L__wp->tmp_bp, L__wp->tmp_blen, nlen); \ bp = (type *) L__wp->tmp_bp; \ blen = L__wp->tmp_blen; \ F_SET(L__wp, W_TMP_INUSE); \ } \ } #define GET_SPACE_GOTOC(sp, bp, blen, nlen) \ GET_SPACE_GOTO(sp, char, bp, blen, nlen) #define GET_SPACE_GOTOW(sp, bp, blen, nlen) \ GET_SPACE_GOTO(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) #define GET_SPACE_RET(sp, type, bp, blen, nlen) { \ CHECK_TYPE(type *, bp) \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ if (L__wp == NULL || F_ISSET(L__wp, W_TMP_INUSE)) { \ bp = NULL; \ blen = 0; \ BINC_RET(sp, type, bp, blen, nlen); \ } else { \ BINC_RETC(sp, L__wp->tmp_bp, L__wp->tmp_blen, nlen); \ bp = (type *) L__wp->tmp_bp; \ blen = L__wp->tmp_blen; \ F_SET(L__wp, W_TMP_INUSE); \ } \ } #define GET_SPACE_RETC(sp, bp, blen, nlen) \ GET_SPACE_RET(sp, char, bp, blen, nlen) #define GET_SPACE_RETW(sp, bp, blen, nlen) \ GET_SPACE_RET(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) /* * Add space to a GET_SPACE returned buffer. Two versions, one that * returns, one that jumps to an error label. */ #define ADD_SPACE_GOTO(sp, type, bp, blen, nlen) { \ CHECK_TYPE(type *, bp) \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ if (L__wp == NULL || bp == (type *)L__wp->tmp_bp) { \ F_CLR(L__wp, W_TMP_INUSE); \ BINC_GOTOC(sp, L__wp->tmp_bp, L__wp->tmp_blen, nlen); \ bp = (type *) L__wp->tmp_bp; \ blen = L__wp->tmp_blen; \ F_SET(L__wp, W_TMP_INUSE); \ } else \ BINC_GOTO(sp, type, bp, blen, nlen); \ } #define ADD_SPACE_GOTOW(sp, bp, blen, nlen) \ ADD_SPACE_GOTO(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) #define ADD_SPACE_RET(sp, type, bp, blen, nlen) { \ CHECK_TYPE(type *, bp) \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ if (L__wp == NULL || bp == (type *)L__wp->tmp_bp) { \ F_CLR(L__wp, W_TMP_INUSE); \ BINC_RETC(sp, L__wp->tmp_bp, L__wp->tmp_blen, nlen); \ bp = (type *) L__wp->tmp_bp; \ blen = L__wp->tmp_blen; \ F_SET(L__wp, W_TMP_INUSE); \ } else \ BINC_RET(sp, type, bp, blen, nlen); \ } #define ADD_SPACE_RETW(sp, bp, blen, nlen) \ ADD_SPACE_RET(sp, CHAR_T, bp, blen, (nlen) * sizeof(CHAR_T)) /* Free a GET_SPACE returned buffer. */ #define FREE_SPACE(sp, bp, blen) { \ WIN *L__wp = (sp) == NULL ? NULL : (sp)->wp; \ if (L__wp != NULL && bp == L__wp->tmp_bp) \ F_CLR(L__wp, W_TMP_INUSE); \ else \ free(bp); \ } #define FREE_SPACEW(sp, bp, blen) { \ CHECK_TYPE(CHAR_T *, bp) \ FREE_SPACE(sp, (char *)bp, blen); \ } /* * Malloc a buffer, casting the return pointer. Various versions. * * !!! * The cast should be unnecessary, malloc(3) and friends return void *'s, * which is all we need. However, some systems that nvi needs to run on * don't do it right yet, resulting in the compiler printing out roughly * a million warnings. After awhile, it seemed easier to put the casts * in instead of explaining it all the time. */ #define CALLOC(sp, p, cast, nmemb, size) { \ if ((p = (cast)calloc(nmemb, size)) == NULL) \ msgq(sp, M_SYSERR, NULL); \ } #define CALLOC_GOTO(sp, p, cast, nmemb, size) { \ if ((p = (cast)calloc(nmemb, size)) == NULL) \ goto alloc_err; \ } #define CALLOC_NOMSG(sp, p, cast, nmemb, size) { \ p = (cast)calloc(nmemb, size); \ } #define CALLOC_RET(sp, p, cast, nmemb, size) { \ if ((p = (cast)calloc(nmemb, size)) == NULL) { \ msgq(sp, M_SYSERR, NULL); \ return (1); \ } \ } #define MALLOC(sp, p, cast, size) { \ if ((p = (cast)malloc(size)) == NULL) \ msgq(sp, M_SYSERR, NULL); \ } #define MALLOC_GOTO(sp, p, cast, size) { \ if ((p = (cast)malloc(size)) == NULL) \ goto alloc_err; \ } #define MALLOC_NOMSG(sp, p, cast, size) { \ p = (cast)malloc(size); \ } #define MALLOC_RET(sp, p, cast, size) { \ if ((p = (cast)malloc(size)) == NULL) { \ msgq(sp, M_SYSERR, NULL); \ return (1); \ } \ } /* * XXX * Don't depend on realloc(NULL, size) working. */ #define REALLOC(sp, p, cast, size) { \ if ((p = (cast)(p == NULL ? \ malloc(size) : realloc(p, size))) == NULL) \ msgq(sp, M_SYSERR, NULL); \ } /* * Versions of memmove(3) and memset(3) that use the size of the * initial pointer to figure out how much memory to manipulate. */ #define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p))) #define MEMSET(p, value, len) memset(p, value, (len) * sizeof(*(p))) nvi-1.81.6/common/msg.c0100644000076400001440000005255410720065506013707 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: msg.c,v 10.61 2003/07/18 23:17:30 skimo Exp $ (Berkeley) $Date: 2003/07/18 23:17:30 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __STDC__ #include #else #include #endif #include "common.h" #include "../vi/vi.h" /* * msgq -- * Display a message. * * PUBLIC: void msgq __P((SCR *, mtype_t, const char *, ...)); */ void #ifdef __STDC__ msgq(SCR *sp, mtype_t mt, const char *fmt, ...) #else msgq(sp, mt, fmt, va_alist) SCR *sp; mtype_t mt; const char *fmt; va_dcl #endif { #ifndef NL_ARGMAX #define __NL_ARGMAX 20 /* Set to 9 by System V. */ struct { const char *str; /* String pointer. */ size_t arg; /* Argument number. */ size_t prefix; /* Prefix string length. */ size_t skip; /* Skipped string length. */ size_t suffix; /* Suffix string length. */ } str[__NL_ARGMAX]; #endif static int reenter; /* STATIC: Re-entrancy check. */ CHAR_T ch; GS *gp; WIN *wp; size_t blen, cnt1, cnt2, len, mlen, nlen, soff; const char *p, *t, *u; char *bp, *mp, *rbp, *s_rbp; va_list ap; /* * !!! * It's possible to enter msg when there's no screen to hold the * message. If sp is NULL, ignore the special cases and put the * message out to stderr. */ if (sp == NULL) { gp = NULL; if (mt == M_BERR) mt = M_ERR; else if (mt == M_VINFO) mt = M_INFO; } else { gp = sp->gp; wp = sp->wp; switch (mt) { case M_BERR: if (F_ISSET(sp, SC_VI) && !O_ISSET(sp, O_VERBOSE)) { F_SET(gp, G_BELLSCHED); return; } mt = M_ERR; break; case M_VINFO: if (!O_ISSET(sp, O_VERBOSE)) return; mt = M_INFO; /* FALLTHROUGH */ case M_INFO: if (F_ISSET(sp, SC_EX_SILENT)) return; break; case M_ERR: case M_SYSERR: case M_DBERR: break; default: abort(); } } /* * It's possible to reenter msg when it allocates space. We're * probably dead anyway, but there's no reason to drop core. * * XXX * Yes, there's a race, but it should only be two instructions. */ if (reenter++) return; /* Get space for the message. */ nlen = 1024; if (0) { retry: FREE_SPACE(sp, bp, blen); nlen *= 2; } bp = NULL; blen = 0; GET_SPACE_GOTOC(sp, bp, blen, nlen); /* * Error prefix. * * mp: pointer to the current next character to be written * mlen: length of the already written characters * blen: total length of the buffer */ #define REM (blen - mlen) mp = bp; mlen = 0; if (mt == M_SYSERR || mt == M_DBERR) { p = msg_cat(sp, "020|Error: ", &len); if (REM < len) goto retry; memcpy(mp, p, len); mp += len; mlen += len; } /* * If we're running an ex command that the user didn't enter, display * the file name and line number prefix. */ if ((mt == M_ERR || mt == M_SYSERR) && sp != NULL && wp != NULL && wp->if_name != NULL) { for (p = wp->if_name; *p != '\0'; ++p) { len = snprintf(mp, REM, "%s", KEY_NAME(sp, *p)); mp += len; if ((mlen += len) > blen) goto retry; } len = snprintf(mp, REM, ", %d: ", wp->if_lno); mp += len; if ((mlen += len) > blen) goto retry; } /* If nothing to format, we're done. */ if (fmt == NULL) goto nofmt; fmt = msg_cat(sp, fmt, NULL); #ifndef NL_ARGMAX /* * Nvi should run on machines that don't support the numbered argument * specifications (%[digit]*$). We do this by reformatting the string * so that we can hand it to vsprintf(3) and it will use the arguments * in the right order. When vsprintf returns, we put the string back * into the right order. It's undefined, according to SVID III, to mix * numbered argument specifications with the standard style arguments, * so this should be safe. * * In addition, we also need a character that is known to not occur in * any vi message, for separating the parts of the string. As callers * of msgq are responsible for making sure that all the non-printable * characters are formatted for printing before calling msgq, we use a * random non-printable character selected at terminal initialization * time. This code isn't fast by any means, but as messages should be * relatively short and normally have only a few arguments, it won't be * too bad. Regardless, nobody has come up with any other solution. * * The result of this loop is an array of pointers into the message * string, with associated lengths and argument numbers. The array * is in the "correct" order, and the arg field contains the argument * order. */ for (p = fmt, soff = 0; soff < __NL_ARGMAX;) { for (t = p; *p != '\0' && *p != '%'; ++p); if (*p == '\0') break; ++p; if (!isdigit(*p)) { if (*p == '%') ++p; continue; } for (u = p; *++p != '\0' && isdigit(*p);); if (*p != '$') continue; /* Up to, and including the % character. */ str[soff].str = t; str[soff].prefix = u - t; /* Up to, and including the $ character. */ str[soff].arg = atoi(u); str[soff].skip = (p - u) + 1; if (str[soff].arg >= __NL_ARGMAX) goto ret; /* Up to, and including the conversion character. */ for (u = p; (ch = *++p) != '\0';) if (isalpha(ch) && strchr("diouxXfeEgGcspn", ch) != NULL) break; str[soff].suffix = p - u; if (ch != '\0') ++p; ++soff; } /* If no magic strings, we're done. */ if (soff == 0) goto format; /* Get space for the reordered strings. */ if ((rbp = malloc(nlen)) == NULL) goto ret; s_rbp = rbp; /* * Reorder the strings into the message string based on argument * order. * * !!! * We ignore arguments that are out of order, i.e. if we don't find * an argument, we continue. Assume (almost certainly incorrectly) * that whoever created the string knew what they were doing. * * !!! * Brute force "sort", but since we don't expect more than one or two * arguments in a string, the setup cost of a fast sort will be more * expensive than the loop. */ for (cnt1 = 1; cnt1 <= soff; ++cnt1) for (cnt2 = 0; cnt2 < soff; ++cnt2) if (cnt1 == str[cnt2].arg) { memmove(s_rbp, str[cnt2].str, str[cnt2].prefix); memmove(s_rbp + str[cnt2].prefix, str[cnt2].str + str[cnt2].prefix + str[cnt2].skip, str[cnt2].suffix); s_rbp += str[cnt2].prefix + str[cnt2].suffix; *s_rbp++ = gp == NULL ? DEFAULT_NOPRINT : gp->noprint; break; } *s_rbp = '\0'; fmt = rbp; #endif format: /* Format the arguments into the string. */ #ifdef __STDC__ va_start(ap, fmt); #else va_start(ap); #endif len = vsnprintf(mp, REM, fmt, ap); va_end(ap); if (len >= nlen) goto retry; #ifndef NL_ARGMAX if (soff == 0) goto nofmt; /* * Go through the resulting string, and, for each separator character * separated string, enter its new starting position and length in the * array. */ for (p = t = mp, cnt1 = 1, ch = gp == NULL ? DEFAULT_NOPRINT : gp->noprint; *p != '\0'; ++p) if (*p == ch) { for (cnt2 = 0; cnt2 < soff; ++cnt2) if (str[cnt2].arg == cnt1) break; str[cnt2].str = t; str[cnt2].prefix = p - t; t = p + 1; ++cnt1; } /* * Reorder the strings once again, putting them back into the * message buffer. * * !!! * Note, the length of the message gets decremented once for * each substring, when we discard the separator character. */ for (s_rbp = rbp, cnt1 = 0; cnt1 < soff; ++cnt1) { memmove(rbp, str[cnt1].str, str[cnt1].prefix); rbp += str[cnt1].prefix; --len; } memmove(mp, s_rbp, rbp - s_rbp); /* Free the reordered string memory. */ free(s_rbp); #endif nofmt: mp += len; if ((mlen += len) > blen) goto retry; if (mt == M_SYSERR) { len = snprintf(mp, REM, ": %s", strerror(errno)); mp += len; if ((mlen += len) > blen) goto retry; mt = M_ERR; } if (mt == M_DBERR) { len = snprintf(mp, REM, ": %s", db_strerror(sp->db_error)); mp += len; if ((mlen += len) > blen) goto retry; mt = M_ERR; } /* Add trailing newline. */ if ((mlen += 1) > blen) goto retry; *mp = '\n'; if (sp != NULL && sp->ep != NULL) (void)ex_fflush(sp); if (wp != NULL) wp->scr_msg(sp, mt, bp, mlen); else (void)fprintf(stderr, "%.*s", (int)mlen, bp); /* Cleanup. */ ret: FREE_SPACE(sp, bp, blen); alloc_err: reenter = 0; } /* * msgq_str -- * Display a message with an embedded string. * * PUBLIC: void msgq_wstr __P((SCR *, mtype_t, CHAR_T *, char *)); */ void msgq_wstr(SCR *sp, mtype_t mtype, CHAR_T *str, char *fmt) { size_t nlen; char *nstr; if (str == NULL) { msgq(sp, mtype, fmt); return; } INT2CHAR(sp, str, STRLEN(str) + 1, nstr, nlen); msgq_str(sp, mtype, nstr, fmt); } /* * msgq_str -- * Display a message with an embedded string. * * PUBLIC: void msgq_str __P((SCR *, mtype_t, char *, char *)); */ void msgq_str(SCR *sp, mtype_t mtype, char *str, char *fmt) { int nf, sv_errno; char *p; if (str == NULL) { msgq(sp, mtype, fmt); return; } sv_errno = errno; p = msg_print(sp, str, &nf); errno = sv_errno; msgq(sp, mtype, fmt, p); if (nf) FREE_SPACE(sp, p, 0); } /* * mod_rpt -- * Report on the lines that changed. * * !!! * Historic vi documentation (USD:15-8) claimed that "The editor will also * always tell you when a change you make affects text which you cannot see." * This wasn't true -- edit a large file and do "100d|1". We don't implement * this semantic since it requires tracking each line that changes during a * command instead of just keeping count. * * Line counts weren't right in historic vi, either. For example, given the * file: * abc * def * the command 2d}, from the 'b' would report that two lines were deleted, * not one. * * PUBLIC: void mod_rpt __P((SCR *)); */ void mod_rpt(SCR *sp) { static char * const action[] = { "293|added", "294|changed", "295|deleted", "296|joined", "297|moved", "298|shifted", "299|yanked", }; static char * const lines[] = { "300|line", "301|lines", }; db_recno_t total; u_long rptval; int first, cnt; size_t blen, len, tlen; const char *t; char * const *ap; char *bp, *p; /* Change reports are turned off in batch mode. */ if (F_ISSET(sp, SC_EX_SILENT)) return; /* Reset changing line number. */ sp->rptlchange = OOBLNO; /* * Don't build a message if not enough changed. * * !!! * And now, a vi clone test. Historically, vi reported if the number * of changed lines was > than the value, not >=, unless it was a yank * command, which used >=. No lie. Furthermore, an action was never * reported for a single line action. This is consistent for actions * other than yank, but yank didn't report single line actions even if * the report edit option was set to 1. In addition, setting report to * 0 in the 4BSD historic vi was equivalent to setting it to 1, for an * unknown reason (this bug was fixed in System III/V at some point). * I got complaints, so nvi conforms to System III/V historic practice * except that we report a yank of 1 line if report is set to 1. */ #define ARSIZE(a) sizeof(a) / sizeof (*a) #define MAXNUM 25 rptval = O_VAL(sp, O_REPORT); for (cnt = 0, total = 0; cnt < ARSIZE(action); ++cnt) total += sp->rptlines[cnt]; if (total == 0) return; if (total <= rptval && sp->rptlines[L_YANKED] < rptval) { for (cnt = 0; cnt < ARSIZE(action); ++cnt) sp->rptlines[cnt] = 0; return; } /* Build and display the message. */ GET_SPACE_GOTOC(sp, bp, blen, sizeof(action) * MAXNUM + 1); for (p = bp, first = 1, tlen = 0, ap = action, cnt = 0; cnt < ARSIZE(action); ++ap, ++cnt) if (sp->rptlines[cnt] != 0) { if (first) first = 0; else { *p++ = ';'; *p++ = ' '; tlen += 2; } len = snprintf(p, MAXNUM, "%lu ", (unsigned long) sp->rptlines[cnt]); p += len; tlen += len; t = msg_cat(sp, lines[sp->rptlines[cnt] == 1 ? 0 : 1], &len); memcpy(p, t, len); p += len; tlen += len; *p++ = ' '; ++tlen; t = msg_cat(sp, *ap, &len); memcpy(p, t, len); p += len; tlen += len; sp->rptlines[cnt] = 0; } /* Add trailing newline. */ *p = '\n'; ++tlen; (void)ex_fflush(sp); sp->wp->scr_msg(sp, M_INFO, bp, tlen); FREE_SPACE(sp, bp, blen); alloc_err: return; #undef ARSIZE #undef MAXNUM } /* * msgq_status -- * Report on the file's status. * * PUBLIC: void msgq_status __P((SCR *, db_recno_t, u_int)); */ void msgq_status(SCR *sp, db_recno_t lno, u_int flags) { db_recno_t last; size_t blen, len; int cnt, needsep; const char *t; char **ap, *bp, *np, *p, *s; /* Get sufficient memory. */ len = strlen(sp->frp->name); GET_SPACE_GOTOC(sp, bp, blen, len * MAX_CHARACTER_COLUMNS + 128); p = bp; /* Copy in the filename. */ for (p = bp, t = sp->frp->name; *t != '\0'; ++t) { len = KEY_LEN(sp, *t); memcpy(p, KEY_NAME(sp, *t), len); p += len; } np = p; *p++ = ':'; *p++ = ' '; /* Copy in the argument count. */ if (F_ISSET(sp, SC_STATUS_CNT) && sp->argv != NULL) { for (cnt = 0, ap = sp->argv; *ap != NULL; ++ap, ++cnt); if (cnt > 1) { (void)sprintf(p, msg_cat(sp, "317|%d files to edit", NULL), cnt); p += strlen(p); *p++ = ':'; *p++ = ' '; } F_CLR(sp, SC_STATUS_CNT); } /* * See nvi/exf.c:file_init() for a description of how and when the * read-only bit is set. * * !!! * The historic display for "name changed" was "[Not edited]". */ needsep = 0; if (F_ISSET(sp->frp, FR_NEWFILE)) { F_CLR(sp->frp, FR_NEWFILE); t = msg_cat(sp, "021|new file", &len); memcpy(p, t, len); p += len; needsep = 1; } else { if (F_ISSET(sp->frp, FR_NAMECHANGE)) { t = msg_cat(sp, "022|name changed", &len); memcpy(p, t, len); p += len; needsep = 1; } if (needsep) { *p++ = ','; *p++ = ' '; } if (F_ISSET(sp->ep, F_MODIFIED)) t = msg_cat(sp, "023|modified", &len); else t = msg_cat(sp, "024|unmodified", &len); memcpy(p, t, len); p += len; needsep = 1; } if (F_ISSET(sp->frp, FR_UNLOCKED)) { if (needsep) { *p++ = ','; *p++ = ' '; } t = msg_cat(sp, "025|UNLOCKED", &len); memcpy(p, t, len); p += len; needsep = 1; } if (O_ISSET(sp, O_READONLY)) { if (needsep) { *p++ = ','; *p++ = ' '; } t = msg_cat(sp, "026|readonly", &len); memcpy(p, t, len); p += len; needsep = 1; } if (needsep) { *p++ = ':'; *p++ = ' '; } if (LF_ISSET(MSTAT_SHOWLAST)) { if (db_last(sp, &last)) return; if (last == 0) { t = msg_cat(sp, "028|empty file", &len); memcpy(p, t, len); p += len; } else { t = msg_cat(sp, "027|line %lu of %lu [%ld%%]", &len); (void)sprintf(p, t, lno, last, (lno * 100) / last); p += strlen(p); } } else { t = msg_cat(sp, "029|line %lu", &len); (void)sprintf(p, t, lno); p += strlen(p); } #ifdef DEBUG (void)sprintf(p, " (pid %lu)", (u_long)getpid()); p += strlen(p); #endif *p++ = '\n'; len = p - bp; /* * There's a nasty problem with long path names. Cscope and tags files * can result in long paths and vi will request a continuation key from * the user as soon as it starts the screen. Unfortunately, the user * has already typed ahead, and chaos results. If we assume that the * characters in the filenames and informational messages only take a * single screen column each, we can trim the filename. * * XXX * Status lines get put up at fairly awkward times. For example, when * you do a filter read (e.g., :read ! echo foo) in the top screen of a * split screen, we have to repaint the status lines for all the screens * below the top screen. We don't want users having to enter continue * characters for those screens. Make it really hard to screw this up. */ s = bp; if (LF_ISSET(MSTAT_TRUNCATE) && len > sp->cols) { for (; s < np && (*s != '/' || (p - s) > sp->cols - 3); ++s); if (s == np) { s = p - (sp->cols - 5); *--s = ' '; } *--s = '.'; *--s = '.'; *--s = '.'; len = p - s; } /* Flush any waiting ex messages. */ (void)ex_fflush(sp); sp->wp->scr_msg(sp, M_INFO, s, len); FREE_SPACE(sp, bp, blen); alloc_err: return; } /* * msg_open -- * Open the message catalogs. * * PUBLIC: int msg_open __P((SCR *, char *)); */ int msg_open(SCR *sp, char *file) { /* * !!! * Assume that the first file opened is the system default, and that * all subsequent ones user defined. Only display error messages * if we can't open the user defined ones -- it's useful to know if * the system one wasn't there, but if nvi is being shipped with an * installed system, the file will be there, if it's not, then the * message will be repeated every time nvi is started up. */ static int first = 1; DB *db; DBT data, key; db_recno_t msgno; char *p, *t, buf[MAXPATHLEN]; if ((p = strrchr(file, '/')) != NULL && p[1] == '\0' && (((t = getenv("LC_MESSAGES")) != NULL && t[0] != '\0') || ((t = getenv("LANG")) != NULL && t[0] != '\0'))) { (void)snprintf(buf, sizeof(buf), "%s%s", file, t); p = buf; } else p = file; if ((sp->db_error = db_create(&db, 0, 0)) != 0 || (sp->db_error = db->set_re_source(db, p)) != 0 || (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) { if (first) { first = 0; return (1); } msgq_str(sp, M_DBERR, p, "%s"); return (1); } /* * Test record 1 for the magic string. The msgq call is here so * the message catalog build finds it. */ #define VMC "VI_MESSAGE_CATALOG" memset(&key, 0, sizeof(key)); key.data = &msgno; key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); msgno = 1; if ((sp->db_error = db->get(db, NULL, &key, &data, 0)) != 0 || data.size != sizeof(VMC) - 1 || memcmp(data.data, VMC, sizeof(VMC) - 1)) { (void)db->close(db, DB_NOSYNC); if (first) { first = 0; return (1); } msgq_str(sp, M_DBERR, p, "030|The file %s is not a message catalog"); return (1); } first = 0; if (sp->gp->msg != NULL) (void)sp->gp->msg->close(sp->gp->msg, DB_NOSYNC); sp->gp->msg = db; return (0); } /* * msg_close -- * Close the message catalogs. * * PUBLIC: void msg_close __P((GS *)); */ void msg_close(GS *gp) { if (gp->msg != NULL) { (void)gp->msg->close(gp->msg, 0); gp->msg = NULL; } } /* * msg_cont -- * Return common continuation messages. * * PUBLIC: const char *msg_cmsg __P((SCR *, cmsg_t, size_t *)); */ const char * msg_cmsg(SCR *sp, cmsg_t which, size_t *lenp) { switch (which) { case CMSG_CONF: return (msg_cat(sp, "268|confirm? [ynq]", lenp)); case CMSG_CONT: return (msg_cat(sp, "269|Press any key to continue: ", lenp)); case CMSG_CONT_EX: return (msg_cat(sp, "270|Press any key to continue [: to enter more ex commands]: ", lenp)); case CMSG_CONT_R: return (msg_cat(sp, "161|Press Enter to continue: ", lenp)); case CMSG_CONT_S: return (msg_cat(sp, "275| cont?", lenp)); case CMSG_CONT_Q: return (msg_cat(sp, "271|Press any key to continue [q to quit]: ", lenp)); default: abort(); } /* NOTREACHED */ } /* * msg_cat -- * Return a single message from the catalog, plus its length. * * !!! * Only a single catalog message can be accessed at a time, if multiple * ones are needed, they must be copied into local memory. * * PUBLIC: const char *msg_cat __P((SCR *, const char *, size_t *)); */ const char * msg_cat(SCR *sp, const char *str, size_t *lenp) { GS *gp; DBT data, key; db_recno_t msgno; /* * If it's not a catalog message, i.e. has doesn't have a leading * number and '|' symbol, we're done. */ if (isdigit(str[0]) && isdigit(str[1]) && isdigit(str[2]) && str[3] == '|') { memset(&key, 0, sizeof(key)); key.data = &msgno; key.size = sizeof(db_recno_t); memset(&data, 0, sizeof(data)); msgno = atoi(str); /* * XXX * Really sleazy hack -- we put an extra character on the * end of the format string, and then we change it to be * the nul termination of the string. There ought to be * a better way. Once we can allocate multiple temporary * memory buffers, maybe we can use one of them instead. */ gp = sp == NULL ? NULL : sp->gp; if (gp != NULL && gp->msg != NULL && gp->msg->get(gp->msg, NULL, &key, &data, 0) == 0 && data.size != 0) { if (lenp != NULL) *lenp = data.size - 1; ((char *)data.data)[data.size - 1] = '\0'; return (data.data); } str = &str[4]; } if (lenp != NULL) *lenp = strlen(str); return (str); } /* * msg_print -- * Return a printable version of a string, in allocated memory. * * PUBLIC: char *msg_print __P((SCR *, const char *, int *)); */ char * msg_print(SCR *sp, const char *s, int *needfree) { size_t blen, nlen; const char *cp; char *bp, *ep, *p, *t; *needfree = 0; for (cp = s; *cp != '\0'; ++cp) if (!isprint(*cp)) break; if (*cp == '\0') return ((char *)s); /* SAFE: needfree set to 0. */ nlen = 0; if (0) { retry: if (sp == NULL) free(bp); else FREE_SPACE(sp, bp, blen); *needfree = 0; } nlen += 256; if (sp == NULL) { if ((bp = malloc(nlen)) == NULL) goto alloc_err; } else GET_SPACE_GOTOC(sp, bp, blen, nlen); if (0) { alloc_err: return (""); } *needfree = 1; for (p = bp, ep = (bp + blen) - 1, cp = s; *cp != '\0' && p < ep; ++cp) for (t = KEY_NAME(sp, *cp); *t != '\0' && p < ep; *p++ = *t++); if (p == ep) goto retry; *p = '\0'; return (bp); } nvi-1.81.6/common/msg.h0100644000076400001440000000445110720065506013705 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: msg.h,v 10.11 2000/04/21 21:26:19 skimo Exp $ (Berkeley) $Date: 2000/04/21 21:26:19 $ */ /* * Common messages (continuation or confirmation). */ typedef enum { CMSG_CONF, CMSG_CONT, CMSG_CONT_EX, CMSG_CONT_R, CMSG_CONT_S, CMSG_CONT_Q } cmsg_t; /* * Message types. * * !!! * In historical vi, O_VERBOSE didn't exist, and O_TERSE made the error * messages shorter. In this implementation, O_TERSE has no effect and * O_VERBOSE results in informational displays about common errors, for * naive users. * * M_NONE Display to the user, no reformatting, no nothing. * * M_BERR Error: M_ERR if O_VERBOSE, else bell. * M_ERR Error: Display in inverse video. * M_INFO Info: Display in normal video. * M_SYSERR Error: M_ERR, using strerror(3) message. * M_VINFO Info: M_INFO if O_VERBOSE, else ignore. * * The underlying message display routines only need to know about M_NONE, * M_ERR and M_INFO -- all the other message types are converted into one * of them by the message routines. */ typedef enum { M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t; /* * There are major problems with error messages being generated by routines * preparing the screen to display error messages. It's possible for the * editor to generate messages before we have a screen in which to display * them, or during the transition between ex (and vi startup) and a true vi. * There's a queue in the global area to hold them. * * If SC_EX/SC_VI is set, that's the mode that the editor is in. If the flag * S_SCREEN_READY is set, that means that the screen is prepared to display * messages. */ typedef struct _msgh MSGH; /* MSGS list head structure. */ LIST_HEAD(_msgh, _msg); struct _msg { LIST_ENTRY(_msg) q; /* Linked list of messages. */ mtype_t mtype; /* Message type: M_NONE, M_ERR, M_INFO. */ char *buf; /* Message buffer. */ size_t len; /* Message length. */ }; /* Flags to msgq_status(). */ #define MSTAT_SHOWLAST 0x01 /* Show the line number of the last line. */ #define MSTAT_TRUNCATE 0x02 /* Truncate the file name if it's too long. */ nvi-1.81.6/common/multibyte.h0100644000076400001440000000214510720065506015133 0ustar skimousers#ifndef MULTIBYTE_H #define MULTIBYTE_H #ifdef USE_WIDECHAR #include #include typedef wchar_t RCHAR_T; #define RCHAR_T_MAX ((1 << 24)-1) typedef wchar_t CHAR_T; #define MAX_CHAR_T 0xffffff /* XXXX */ typedef u_int UCHAR_T; #define RCHAR_BIT 24 #define STRLEN wcslen #define STRTOL wcstol #define STRTOUL wcstoul #define SPRINTF swprintf #define STRCMP wcscmp #define STRPBRK wcspbrk #define TOUPPER towupper #define STRSET wmemset #define L(ch) L ## ch #else typedef char RCHAR_T; #define RCHAR_T_MAX CHAR_MAX typedef u_char CHAR_T; #define MAX_CHAR_T 0xff typedef u_char UCHAR_T; #define RCHAR_BIT CHAR_BIT #define STRLEN strlen #define STRTOL strtol #define STRTOUL strtoul #define SPRINTF snprintf #define STRCMP strcmp #define STRPBRK strpbrk #define TOUPPER toupper #define STRSET memset #define L(ch) ch #endif #define MEMCMP(to, from, n) \ memcmp(to, from, (n) * sizeof(*(to))) #define MEMMOVE(p, t, len) memmove(p, t, (len) * sizeof(*(p))) #define MEMCPY(p, t, len) memcpy(p, t, (len) * sizeof(*(p))) #define SIZE(w) (sizeof(w)/sizeof(*w)) #endif nvi-1.81.6/common/nothread.c0100644000076400001440000000210510720065506014710 0ustar skimousers/*- * Copyright (c) 2000 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: nothread.c,v 1.4 2000/07/22 14:52:37 skimo Exp $ (Berkeley) $Date: 2000/07/22 14:52:37 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" static int vi_nothread_run __P((WIN *wp, void *(*fun)(void*), void *data)); static int vi_nothread_lock __P((WIN *, void **)); /* * thread_init * * PUBLIC: void thread_init __P((GS *gp)); */ void thread_init(GS *gp) { gp->run = vi_nothread_run; gp->lock_init = vi_nothread_lock; gp->lock_end = vi_nothread_lock; gp->lock_try = vi_nothread_lock; gp->lock_unlock = vi_nothread_lock; } static int vi_nothread_run(WIN *wp, void *(*fun)(void*), void *data) { fun(data); return 0; } static int vi_nothread_lock (WIN * wp, void **lp) { return 0; } nvi-1.81.6/common/options.awk0100644000076400001440000000034010720065506015136 0ustar skimousers# $Id: options.awk,v 10.1 1995/06/08 19:00:01 bostic Exp $ (Berkeley) $Date: 1995/06/08 19:00:01 $ /^\/\* O_[0-9A-Z_]*/ { printf("#define %s %d\n", $2, cnt++); next; } END { printf("#define O_OPTIONCOUNT %d\n", cnt); } nvi-1.81.6/common/options.c0100644000076400001440000007224710720065506014615 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: options.c,v 10.65 2002/01/18 22:34:43 skimo Exp $ (Berkeley) $Date: 2002/01/18 22:34:43 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" #include "pathnames.h" static int opts_abbcmp __P((const void *, const void *)); static int opts_cmp __P((const void *, const void *)); static int opts_print __P((SCR *, OPTLIST const *)); #ifdef USE_WIDECHAR #define OPT_WC 0 #else #define OPT_WC (OPT_NOSAVE | OPT_NDISP) #endif /* * O'Reilly noted options and abbreviations are from "Learning the VI Editor", * Fifth Edition, May 1992. There's no way of knowing what systems they are * actually from. * * HPUX noted options and abbreviations are from "The Ultimate Guide to the * VI and EX Text Editors", 1990. */ OPTLIST const optlist[] = { /* O_ALTWERASE 4.4BSD */ {L("altwerase"), f_altwerase, OPT_0BOOL, 0}, /* O_AUTOINDENT 4BSD */ {L("autoindent"), NULL, OPT_0BOOL, 0}, /* O_AUTOPRINT 4BSD */ {L("autoprint"), NULL, OPT_1BOOL, 0}, /* O_AUTOWRITE 4BSD */ {L("autowrite"), NULL, OPT_0BOOL, 0}, /* O_BACKUP 4.4BSD */ {L("backup"), NULL, OPT_STR, 0}, /* O_BEAUTIFY 4BSD */ {L("beautify"), NULL, OPT_0BOOL, 0}, /* O_CDPATH 4.4BSD */ {L("cdpath"), NULL, OPT_STR, 0}, /* O_CEDIT 4.4BSD */ {L("cedit"), NULL, OPT_STR, 0}, /* O_COLUMNS 4.4BSD */ {L("columns"), f_columns, OPT_NUM, OPT_NOSAVE}, /* O_COMBINED */ {L("combined"), NULL, OPT_0BOOL, OPT_NOSET|OPT_WC}, /* O_COMMENT 4.4BSD */ {L("comment"), NULL, OPT_0BOOL, 0}, /* O_TMP_DIRECTORY 4BSD */ {L("directory"), NULL, OPT_STR, 0}, /* O_EDCOMPATIBLE 4BSD */ {L("edcompatible"),NULL, OPT_0BOOL, 0}, /* O_ESCAPETIME 4.4BSD */ {L("escapetime"), NULL, OPT_NUM, 0}, /* O_ERRORBELLS 4BSD */ {L("errorbells"), NULL, OPT_0BOOL, 0}, /* O_EXRC System V (undocumented) */ {L("exrc"), NULL, OPT_0BOOL, 0}, /* O_EXTENDED 4.4BSD */ {L("extended"), f_recompile, OPT_0BOOL, 0}, /* O_FILEC 4.4BSD */ {L("filec"), NULL, OPT_STR, 0}, /* O_FILEENCODING */ {L("fileencoding"),f_encoding, OPT_STR, OPT_WC}, /* O_FLASH HPUX */ {L("flash"), NULL, OPT_1BOOL, 0}, /* O_HARDTABS 4BSD */ {L("hardtabs"), NULL, OPT_NUM, 0}, /* O_ICLOWER 4.4BSD */ {L("iclower"), f_recompile, OPT_0BOOL, 0}, /* O_IGNORECASE 4BSD */ {L("ignorecase"), f_recompile, OPT_0BOOL, 0}, /* O_INPUTENCODING */ {L("inputencoding"),f_encoding, OPT_STR, OPT_WC}, /* O_KEYTIME 4.4BSD */ {L("keytime"), NULL, OPT_NUM, 0}, /* O_LEFTRIGHT 4.4BSD */ {L("leftright"), f_reformat, OPT_0BOOL, 0}, /* O_LINES 4.4BSD */ {L("lines"), f_lines, OPT_NUM, OPT_NOSAVE}, /* O_LISP 4BSD * XXX * When the lisp option is implemented, delete the OPT_NOSAVE flag, * so that :mkexrc dumps it. */ {L("lisp"), f_lisp, OPT_0BOOL, OPT_NOSAVE}, /* O_LIST 4BSD */ {L("list"), f_reformat, OPT_0BOOL, 0}, /* O_LOCKFILES 4.4BSD * XXX * Locking isn't reliable enough over NFS to require it, in addition, * it's a serious startup performance problem over some remote links. */ {L("lock"), NULL, OPT_1BOOL, 0}, /* O_MAGIC 4BSD */ {L("magic"), NULL, OPT_1BOOL, 0}, /* O_MATCHTIME 4.4BSD */ {L("matchtime"), NULL, OPT_NUM, 0}, /* O_MESG 4BSD */ {L("mesg"), NULL, OPT_1BOOL, 0}, /* O_MODELINE 4BSD * !!! * This has been documented in historical systems as both "modeline" * and as "modelines". Regardless of the name, this option represents * a security problem of mammoth proportions, not to mention a stunning * example of what your intro CS professor referred to as the perils of * mixing code and data. Don't add it, or I will kill you. */ {L("modeline"), NULL, OPT_0BOOL, OPT_NOSET}, /* O_MSGCAT 4.4BSD */ {L("msgcat"), f_msgcat, OPT_STR, 0}, /* O_NOPRINT 4.4BSD */ {L("noprint"), f_print, OPT_STR, 0}, /* O_NUMBER 4BSD */ {L("number"), f_reformat, OPT_0BOOL, 0}, /* O_OCTAL 4.4BSD */ {L("octal"), f_print, OPT_0BOOL, 0}, /* O_OPEN 4BSD */ {L("open"), NULL, OPT_1BOOL, 0}, /* O_OPTIMIZE 4BSD */ {L("optimize"), NULL, OPT_1BOOL, 0}, /* O_PARAGRAPHS 4BSD */ {L("paragraphs"), f_paragraph, OPT_STR, 0}, /* O_PATH 4.4BSD */ {L("path"), NULL, OPT_STR, 0}, /* O_PRINT 4.4BSD */ {L("print"), f_print, OPT_STR, 0}, /* O_PROMPT 4BSD */ {L("prompt"), NULL, OPT_1BOOL, 0}, /* O_READONLY 4BSD (undocumented) */ {L("readonly"), f_readonly, OPT_0BOOL, OPT_ALWAYS}, /* O_RECDIR 4.4BSD */ {L("recdir"), NULL, OPT_STR, 0}, /* O_REDRAW 4BSD */ {L("redraw"), NULL, OPT_0BOOL, 0}, /* O_REMAP 4BSD */ {L("remap"), NULL, OPT_1BOOL, 0}, /* O_REPORT 4BSD */ {L("report"), NULL, OPT_NUM, 0}, /* O_RULER 4.4BSD */ {L("ruler"), NULL, OPT_0BOOL, 0}, /* O_SCROLL 4BSD */ {L("scroll"), NULL, OPT_NUM, 0}, /* O_SEARCHINCR 4.4BSD */ {L("searchincr"), NULL, OPT_0BOOL, 0}, /* O_SECTIONS 4BSD */ {L("sections"), f_section, OPT_STR, 0}, /* O_SECURE 4.4BSD */ {L("secure"), NULL, OPT_0BOOL, OPT_NOUNSET}, /* O_SHELL 4BSD */ {L("shell"), NULL, OPT_STR, 0}, /* O_SHELLMETA 4.4BSD */ {L("shellmeta"), NULL, OPT_STR, 0}, /* O_SHIFTWIDTH 4BSD */ {L("shiftwidth"), NULL, OPT_NUM, OPT_NOZERO}, /* O_SHOWMATCH 4BSD */ {L("showmatch"), NULL, OPT_0BOOL, 0}, /* O_SHOWMODE 4.4BSD */ {L("showmode"), NULL, OPT_0BOOL, 0}, /* O_SIDESCROLL 4.4BSD */ {L("sidescroll"), NULL, OPT_NUM, OPT_NOZERO}, /* O_SLOWOPEN 4BSD */ {L("slowopen"), NULL, OPT_0BOOL, 0}, /* O_SOURCEANY 4BSD (undocumented) * !!! * Historic vi, on startup, source'd $HOME/.exrc and ./.exrc, if they * were owned by the user. The sourceany option was an undocumented * feature of historic vi which permitted the startup source'ing of * .exrc files the user didn't own. This is an obvious security problem, * and we ignore the option. */ {L("sourceany"), NULL, OPT_0BOOL, OPT_NOSET}, /* O_TABSTOP 4BSD */ {L("tabstop"), f_reformat, OPT_NUM, OPT_NOZERO}, /* O_TAGLENGTH 4BSD */ {L("taglength"), NULL, OPT_NUM, 0}, /* O_TAGS 4BSD */ {L("tags"), NULL, OPT_STR, 0}, /* O_TERM 4BSD * !!! * By default, the historic vi always displayed information about two * options, redraw and term. Term seems sufficient. */ {L("term"), NULL, OPT_STR, OPT_ADISP|OPT_NOSAVE}, /* O_TERSE 4BSD */ {L("terse"), NULL, OPT_0BOOL, 0}, /* O_TILDEOP 4.4BSD */ {L("tildeop"), NULL, OPT_0BOOL, 0}, /* O_TIMEOUT 4BSD (undocumented) */ {L("timeout"), NULL, OPT_1BOOL, 0}, /* O_TTYWERASE 4.4BSD */ {L("ttywerase"), f_ttywerase, OPT_0BOOL, 0}, /* O_VERBOSE 4.4BSD */ {L("verbose"), NULL, OPT_0BOOL, 0}, /* O_W1200 4BSD */ {L("w1200"), f_w1200, OPT_NUM, OPT_NDISP|OPT_NOSAVE}, /* O_W300 4BSD */ {L("w300"), f_w300, OPT_NUM, OPT_NDISP|OPT_NOSAVE}, /* O_W9600 4BSD */ {L("w9600"), f_w9600, OPT_NUM, OPT_NDISP|OPT_NOSAVE}, /* O_WARN 4BSD */ {L("warn"), NULL, OPT_1BOOL, 0}, /* O_WINDOW 4BSD */ {L("window"), f_window, OPT_NUM, 0}, /* O_WINDOWNAME 4BSD */ {L("windowname"), NULL, OPT_0BOOL, 0}, /* O_WRAPLEN 4.4BSD */ {L("wraplen"), NULL, OPT_NUM, 0}, /* O_WRAPMARGIN 4BSD */ {L("wrapmargin"), NULL, OPT_NUM, 0}, /* O_WRAPSCAN 4BSD */ {L("wrapscan"), NULL, OPT_1BOOL, 0}, /* O_WRITEANY 4BSD */ {L("writeany"), NULL, OPT_0BOOL, 0}, {NULL}, }; typedef struct abbrev { CHAR_T *name; int offset; } OABBREV; static OABBREV const abbrev[] = { {L("ai"), O_AUTOINDENT}, /* 4BSD */ {L("ap"), O_AUTOPRINT}, /* 4BSD */ {L("aw"), O_AUTOWRITE}, /* 4BSD */ {L("bf"), O_BEAUTIFY}, /* 4BSD */ {L("co"), O_COLUMNS}, /* 4.4BSD */ {L("dir"), O_TMP_DIRECTORY}, /* 4BSD */ {L("eb"), O_ERRORBELLS}, /* 4BSD */ {L("ed"), O_EDCOMPATIBLE}, /* 4BSD */ {L("ex"), O_EXRC}, /* System V (undocumented) */ {L("fe"), O_FILEENCODING}, {L("ht"), O_HARDTABS}, /* 4BSD */ {L("ic"), O_IGNORECASE}, /* 4BSD */ {L("ie"), O_INPUTENCODING}, {L("li"), O_LINES}, /* 4.4BSD */ {L("modelines"), O_MODELINE}, /* HPUX */ {L("nu"), O_NUMBER}, /* 4BSD */ {L("opt"), O_OPTIMIZE}, /* 4BSD */ {L("para"), O_PARAGRAPHS}, /* 4BSD */ {L("re"), O_REDRAW}, /* O'Reilly */ {L("ro"), O_READONLY}, /* 4BSD (undocumented) */ {L("scr"), O_SCROLL}, /* 4BSD (undocumented) */ {L("sect"), O_SECTIONS}, /* O'Reilly */ {L("sh"), O_SHELL}, /* 4BSD */ {L("slow"), O_SLOWOPEN}, /* 4BSD */ {L("sm"), O_SHOWMATCH}, /* 4BSD */ {L("smd"), O_SHOWMODE}, /* 4BSD */ {L("sw"), O_SHIFTWIDTH}, /* 4BSD */ {L("tag"), O_TAGS}, /* 4BSD (undocumented) */ {L("tl"), O_TAGLENGTH}, /* 4BSD */ {L("to"), O_TIMEOUT}, /* 4BSD (undocumented) */ {L("ts"), O_TABSTOP}, /* 4BSD */ {L("tty"), O_TERM}, /* 4BSD (undocumented) */ {L("ttytype"), O_TERM}, /* 4BSD (undocumented) */ {L("w"), O_WINDOW}, /* O'Reilly */ {L("wa"), O_WRITEANY}, /* 4BSD */ {L("wi"), O_WINDOW}, /* 4BSD (undocumented) */ {L("wl"), O_WRAPLEN}, /* 4.4BSD */ {L("wm"), O_WRAPMARGIN}, /* 4BSD */ {L("ws"), O_WRAPSCAN}, /* 4BSD */ {NULL}, }; /* * opts_init -- * Initialize some of the options. * * PUBLIC: int opts_init __P((SCR *, int *)); */ int opts_init(SCR *sp, int *oargs) { ARGS *argv[2], a, b; OPTLIST const *op; u_long isset, v; int cnt, optindx; char *s; CHAR_T b2[1024]; CHAR_T *wp; size_t wlen; a.bp = b2; b.bp = NULL; a.len = b.len = 0; argv[0] = &a; argv[1] = &b; /* Set numeric and string default values. */ #define OI(indx, str) { \ a.len = STRLEN(str); \ if ((CHAR_T*)str != b2) /* GCC puts strings in text-space. */ \ (void)MEMCPY(b2, str, a.len+1); \ if (opts_set(sp, argv, NULL)) { \ optindx = indx; \ goto err; \ } \ } /* * Indirect global options to global space. Specifically, set up * terminal, lines, columns first, they're used by other options. * Note, don't set the flags until we've set up the indirection. */ if (o_set(sp, O_TERM, 0, NULL, GO_TERM)) goto err; F_SET(&sp->opts[O_TERM], OPT_GLOBAL); if (o_set(sp, O_LINES, 0, NULL, GO_LINES)) goto err; F_SET(&sp->opts[O_LINES], OPT_GLOBAL); if (o_set(sp, O_COLUMNS, 0, NULL, GO_COLUMNS)) goto err; F_SET(&sp->opts[O_COLUMNS], OPT_GLOBAL); if (o_set(sp, O_SECURE, 0, NULL, GO_SECURE)) goto err; F_SET(&sp->opts[O_SECURE], OPT_GLOBAL); /* Initialize string values. */ (void)SPRINTF(b2, SIZE(b2), L("cdpath=%s"), (s = getenv("CDPATH")) == NULL ? ":" : s); OI(O_CDPATH, b2); /* * !!! * Vi historically stored temporary files in /var/tmp. We store them * in /tmp by default, hoping it's a memory based file system. There * are two ways to change this -- the user can set either the directory * option or the TMPDIR environmental variable. */ (void)SPRINTF(b2, SIZE(b2), L("directory=%s"), (s = getenv("TMPDIR")) == NULL ? _PATH_TMP : s); OI(O_TMP_DIRECTORY, b2); OI(O_ESCAPETIME, L("escapetime=1")); OI(O_KEYTIME, L("keytime=6")); OI(O_MATCHTIME, L("matchtime=7")); (void)SPRINTF(b2, SIZE(b2), L("msgcat=%s"), _PATH_MSGCAT); OI(O_MSGCAT, b2); OI(O_REPORT, L("report=5")); OI(O_PARAGRAPHS, L("paragraphs=IPLPPPQPP LIpplpipbp")); (void)SPRINTF(b2, SIZE(b2), L("path=%s"), ""); OI(O_PATH, b2); (void)SPRINTF(b2, SIZE(b2), L("recdir=%s"), _PATH_PRESERVE); OI(O_RECDIR, b2); OI(O_SECTIONS, L("sections=NHSHH HUnhsh")); (void)SPRINTF(b2, SIZE(b2), L("shell=%s"), (s = getenv("SHELL")) == NULL ? _PATH_BSHELL : s); OI(O_SHELL, b2); OI(O_SHELLMETA, L("shellmeta=~{[*?$`'\"\\")); OI(O_SHIFTWIDTH, L("shiftwidth=8")); OI(O_SIDESCROLL, L("sidescroll=16")); OI(O_TABSTOP, L("tabstop=8")); (void)SPRINTF(b2, SIZE(b2), L("tags=%s"), _PATH_TAGS); OI(O_TAGS, b2); /* * XXX * Initialize O_SCROLL here, after term; initializing term should * have created a LINES/COLUMNS value. */ if ((v = (O_VAL(sp, O_LINES) - 1) / 2) == 0) v = 1; (void)SPRINTF(b2, SIZE(b2), L("scroll=%ld"), v); OI(O_SCROLL, b2); /* * The default window option values are: * 8 if baud rate <= 600 * 16 if baud rate <= 1200 * LINES - 1 if baud rate > 1200 * * Note, the windows option code will correct any too-large value * or when the O_LINES value is 1. */ if (sp->gp->scr_baud(sp, &v)) return (1); if (v <= 600) v = 8; else if (v <= 1200) v = 16; else if ((v = O_VAL(sp, O_LINES) - 1) == 0) v = 1; (void)SPRINTF(b2, SIZE(b2), L("window=%lu"), v); OI(O_WINDOW, b2); /* * Set boolean default values, and copy all settings into the default * information. OS_NOFREE is set, we're copying, not replacing. */ for (op = optlist, cnt = 0; op->name != NULL; ++op, ++cnt) switch (op->type) { case OPT_0BOOL: break; case OPT_1BOOL: O_SET(sp, cnt); O_D_SET(sp, cnt); break; case OPT_NUM: o_set(sp, cnt, OS_DEF, NULL, O_VAL(sp, cnt)); break; case OPT_STR: if (O_STR(sp, cnt) != NULL && o_set(sp, cnt, OS_DEF | OS_NOFREE | OS_STRDUP, O_STR(sp, cnt), 0)) goto err; break; default: abort(); } /* * !!! * Some options can be initialized by the command name or the * command-line arguments. They don't set the default values, * it's historic practice. */ for (; *oargs != -1; ++oargs) OI(*oargs, optlist[*oargs].name); #undef OI /* * Inform the underlying screen of the initial values of the * edit options. */ for (op = optlist, cnt = 0; op->name != NULL; ++op, ++cnt) { isset = O_ISSET(sp, cnt); (void)sp->gp->scr_optchange(sp, cnt, O_STR(sp, cnt), &isset); } return (0); err: msgq(sp, M_ERR, "031|Unable to set default %s option", optlist[optindx].name); return (1); } /* * opts_set -- * Change the values of one or more options. * * PUBLIC: int opts_set __P((SCR *, ARGS *[], char *)); */ int opts_set(SCR *sp, ARGS **argv, char *usage) { enum optdisp disp; enum nresult nret; OPTLIST const *op; OPTION *spo; u_long isset, turnoff, value; int ch, equals, nf, nf2, offset, qmark, rval; CHAR_T *endp, *name, *p, *sep, *t; char *p2, *t2; char *np; size_t nlen; disp = NO_DISPLAY; for (rval = 0; argv[0]->len != 0; ++argv) { /* * The historic vi dumped the options for each occurrence of * "all" in the set list. Puhleeze. */ if (!STRCMP(argv[0]->bp, L("all"))) { disp = ALL_DISPLAY; continue; } /* Find equals sign or question mark. */ for (sep = NULL, equals = qmark = 0, p = name = argv[0]->bp; (ch = *p) != '\0'; ++p) if (ch == '=' || ch == '?') { if (p == name) { if (usage != NULL) msgq(sp, M_ERR, "032|Usage: %s", usage); return (1); } sep = p; if (ch == '=') equals = 1; else qmark = 1; break; } turnoff = 0; op = NULL; if (sep != NULL) *sep++ = '\0'; /* Search for the name, then name without any leading "no". */ if ((op = opts_search(name)) == NULL && name[0] == L('n') && name[1] == L('o')) { turnoff = 1; name += 2; op = opts_search(name); } if (op == NULL) { opts_nomatch(sp, name); rval = 1; continue; } /* Find current option values. */ offset = op - optlist; spo = sp->opts + offset; /* * !!! * Historically, the question mark could be a separate * argument. */ if (!equals && !qmark && argv[1]->len == 1 && argv[1]->bp[0] == '?') { ++argv; qmark = 1; } /* Set name, value. */ switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: /* Some options may not be reset. */ if (F_ISSET(op, OPT_NOUNSET) && turnoff) { msgq_wstr(sp, M_ERR, name, "291|set: the %s option may not be turned off"); rval = 1; break; } /* Some options may not be set. */ if (F_ISSET(op, OPT_NOSET) && !turnoff) { msgq_wstr(sp, M_ERR, name, "313|set: the %s option may never be turned on"); rval = 1; break; } if (equals) { msgq_wstr(sp, M_ERR, name, "034|set: [no]%s option doesn't take a value"); rval = 1; break; } if (qmark) { if (!disp) disp = SELECT_DISPLAY; F_SET(spo, OPT_SELECTED); break; } /* * Do nothing if the value is unchanged, the underlying * functions can be expensive. */ isset = !turnoff; if (!F_ISSET(op, OPT_ALWAYS)) if (isset) { if (O_ISSET(sp, offset)) break; } else if (!O_ISSET(sp, offset)) break; /* Report to subsystems. */ if (op->func != NULL && op->func(sp, spo, NULL, &isset) || ex_optchange(sp, offset, NULL, &isset) || v_optchange(sp, offset, NULL, &isset) || sp->gp->scr_optchange(sp, offset, NULL, &isset)) { rval = 1; break; } /* Set the value. */ if (isset) O_SET(sp, offset); else O_CLR(sp, offset); break; case OPT_NUM: if (turnoff) { msgq_wstr(sp, M_ERR, name, "035|set: %s option isn't a boolean"); rval = 1; break; } if (qmark || !equals) { if (!disp) disp = SELECT_DISPLAY; F_SET(spo, OPT_SELECTED); break; } if (!ISDIGIT(sep[0])) goto badnum; if ((nret = nget_uslong(sp, &value, sep, &endp, 10)) != NUM_OK) { INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen); p2 = msg_print(sp, np, &nf); INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); t2 = msg_print(sp, np, &nf2); switch (nret) { case NUM_ERR: msgq(sp, M_SYSERR, "036|set: %s option: %s", p2, t2); break; case NUM_OVER: msgq(sp, M_ERR, "037|set: %s option: %s: value overflow", p2, t2); break; case NUM_OK: case NUM_UNDER: abort(); } if (nf) FREE_SPACE(sp, p2, 0); if (nf2) FREE_SPACE(sp, t2, 0); rval = 1; break; } if (*endp && !ISBLANK(*endp)) { badnum: INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen); p2 = msg_print(sp, np, &nf); INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); t2 = msg_print(sp, np, &nf2); msgq(sp, M_ERR, "038|set: %s option: %s is an illegal number", p2, t2); if (nf) FREE_SPACE(sp, p2, 0); if (nf2) FREE_SPACE(sp, t2, 0); rval = 1; break; } /* Some options may never be set to zero. */ if (F_ISSET(op, OPT_NOZERO) && value == 0) { msgq_wstr(sp, M_ERR, name, "314|set: the %s option may never be set to 0"); rval = 1; break; } /* * Do nothing if the value is unchanged, the underlying * functions can be expensive. */ if (!F_ISSET(op, OPT_ALWAYS) && O_VAL(sp, offset) == value) break; /* Report to subsystems. */ INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); if (op->func != NULL && op->func(sp, spo, np, &value) || ex_optchange(sp, offset, np, &value) || v_optchange(sp, offset, np, &value) || sp->gp->scr_optchange(sp, offset, np, &value)) { rval = 1; break; } /* Set the value. */ if (o_set(sp, offset, 0, NULL, value)) rval = 1; break; case OPT_STR: if (turnoff) { msgq_wstr(sp, M_ERR, name, "039|set: %s option isn't a boolean"); rval = 1; break; } if (qmark || !equals) { if (!disp) disp = SELECT_DISPLAY; F_SET(spo, OPT_SELECTED); break; } /* * Do nothing if the value is unchanged, the underlying * functions can be expensive. */ INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); if (!F_ISSET(op, OPT_ALWAYS) && O_STR(sp, offset) != NULL && !strcmp(O_STR(sp, offset), np)) break; /* Report to subsystems. */ if (op->func != NULL && op->func(sp, spo, np, NULL) || ex_optchange(sp, offset, np, NULL) || v_optchange(sp, offset, np, NULL) || sp->gp->scr_optchange(sp, offset, np, NULL)) { rval = 1; break; } /* Set the value. */ if (o_set(sp, offset, OS_STRDUP, np, 0)) rval = 1; break; default: abort(); } } if (disp != NO_DISPLAY) opts_dump(sp, disp); return (rval); } /* * o_set -- * Set an option's value. * * PUBLIC: int o_set __P((SCR *, int, u_int, char *, u_long)); */ int o_set(SCR *sp, int opt, u_int flags, char *str, u_long val) { OPTION *op; /* Set a pointer to the options area. */ op = F_ISSET(&sp->opts[opt], OPT_GLOBAL) ? &sp->gp->opts[sp->opts[opt].o_cur.val] : &sp->opts[opt]; /* Copy the string, if requested. */ if (LF_ISSET(OS_STRDUP) && (str = strdup(str)) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } /* Free the previous string, if requested, and set the value. */ if LF_ISSET(OS_DEF) if (LF_ISSET(OS_STR | OS_STRDUP)) { if (!LF_ISSET(OS_NOFREE) && op->o_def.str != NULL) free(op->o_def.str); op->o_def.str = str; } else op->o_def.val = val; else if (LF_ISSET(OS_STR | OS_STRDUP)) { if (!LF_ISSET(OS_NOFREE) && op->o_cur.str != NULL) free(op->o_cur.str); op->o_cur.str = str; } else op->o_cur.val = val; return (0); } /* * opts_empty -- * Return 1 if the string option is invalid, 0 if it's OK. * * PUBLIC: int opts_empty __P((SCR *, int, int)); */ int opts_empty(SCR *sp, int off, int silent) { char *p; if ((p = O_STR(sp, off)) == NULL || p[0] == '\0') { if (!silent) msgq_wstr(sp, M_ERR, optlist[off].name, "305|No %s edit option specified"); return (1); } return (0); } /* * opts_dump -- * List the current values of selected options. * * PUBLIC: void opts_dump __P((SCR *, enum optdisp)); */ void opts_dump(SCR *sp, enum optdisp type) { OPTLIST const *op; int base, b_num, cnt, col, colwidth, curlen, s_num; int numcols, numrows, row; int b_op[O_OPTIONCOUNT], s_op[O_OPTIONCOUNT]; char nbuf[20]; CHAR_T *kp; /* * Options are output in two groups -- those that fit in a column and * those that don't. Output is done on 6 character "tab" boundaries * for no particular reason. (Since we don't output tab characters, * we can ignore the terminal's tab settings.) Ignore the user's tab * setting because we have no idea how reasonable it is. * * Find a column width we can live with, testing from 10 columns to 1. */ for (numcols = 10; numcols > 1; --numcols) { colwidth = sp->cols / numcols & ~(STANDARD_TAB - 1); if (colwidth >= 10) { colwidth = (colwidth + STANDARD_TAB) & ~(STANDARD_TAB - 1); numcols = sp->cols / colwidth; break; } colwidth = 0; } /* * Get the set of options to list, entering them into * the column list or the overflow list. */ for (b_num = s_num = 0, op = optlist; op->name != NULL; ++op) { cnt = op - optlist; /* If OPT_NDISP set, it's never displayed. */ if (F_ISSET(op, OPT_NDISP)) continue; switch (type) { case ALL_DISPLAY: /* Display all. */ break; case CHANGED_DISPLAY: /* Display changed. */ /* If OPT_ADISP set, it's always "changed". */ if (F_ISSET(op, OPT_ADISP)) break; switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: case OPT_NUM: if (O_VAL(sp, cnt) == O_D_VAL(sp, cnt)) continue; break; case OPT_STR: if (O_STR(sp, cnt) == O_D_STR(sp, cnt) || O_D_STR(sp, cnt) != NULL && !strcmp(O_STR(sp, cnt), O_D_STR(sp, cnt))) continue; break; } break; case SELECT_DISPLAY: /* Display selected. */ if (!F_ISSET(&sp->opts[cnt], OPT_SELECTED)) continue; break; default: case NO_DISPLAY: abort(); } F_CLR(&sp->opts[cnt], OPT_SELECTED); curlen = STRLEN(op->name); switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: if (!O_ISSET(sp, cnt)) curlen += 2; break; case OPT_NUM: (void)snprintf(nbuf, sizeof(nbuf), "%ld", O_VAL(sp, cnt)); curlen += strlen(nbuf); break; case OPT_STR: if (O_STR(sp, cnt) != NULL) curlen += strlen(O_STR(sp, cnt)); curlen += 3; break; } /* Offset by 2 so there's a gap. */ if (curlen <= colwidth - 2) s_op[s_num++] = cnt; else b_op[b_num++] = cnt; } if (s_num > 0) { /* Figure out the number of rows. */ if (s_num > numcols) { numrows = s_num / numcols; if (s_num % numcols) ++numrows; } else numrows = 1; /* Display the options in sorted order. */ for (row = 0; row < numrows;) { for (base = row, col = 0; col < numcols; ++col) { cnt = opts_print(sp, &optlist[s_op[base]]); if ((base += numrows) >= s_num) break; (void)ex_printf(sp, "%*s", (int)(colwidth - cnt), ""); } if (++row < numrows || b_num) (void)ex_puts(sp, "\n"); } } for (row = 0; row < b_num;) { (void)opts_print(sp, &optlist[b_op[row]]); if (++row < b_num) (void)ex_puts(sp, "\n"); } (void)ex_puts(sp, "\n"); } /* * opts_print -- * Print out an option. */ static int opts_print(SCR *sp, const OPTLIST *op) { int curlen, offset; curlen = 0; offset = op - optlist; switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: curlen += ex_printf(sp, "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name); break; case OPT_NUM: curlen += ex_printf(sp, WS"=%ld", op->name, O_VAL(sp, offset)); break; case OPT_STR: curlen += ex_printf(sp, WS"=\"%s\"", op->name, O_STR(sp, offset) == NULL ? "" : O_STR(sp, offset)); break; } return (curlen); } /* * opts_save -- * Write the current configuration to a file. * * PUBLIC: int opts_save __P((SCR *, FILE *)); */ int opts_save(SCR *sp, FILE *fp) { OPTLIST const *op; CHAR_T ch, *p; char nch, *np; int cnt; for (op = optlist; op->name != NULL; ++op) { if (F_ISSET(op, OPT_NOSAVE)) continue; cnt = op - optlist; switch (op->type) { case OPT_0BOOL: case OPT_1BOOL: if (O_ISSET(sp, cnt)) (void)fprintf(fp, "set "WS"\n", op->name); else (void)fprintf(fp, "set no"WS"\n", op->name); break; case OPT_NUM: (void)fprintf(fp, "set "WS"=%-3ld\n", op->name, O_VAL(sp, cnt)); break; case OPT_STR: if (O_STR(sp, cnt) == NULL) break; (void)fprintf(fp, "set "); for (p = op->name; (ch = *p) != L('\0'); ++p) { if (ISBLANK(ch) || ch == L('\\')) (void)putc('\\', fp); fprintf(fp, WC, ch); } (void)putc('=', fp); for (np = O_STR(sp, cnt); (nch = *np) != '\0'; ++np) { if (isblank(nch) || nch == '\\') (void)putc('\\', fp); (void)putc(nch, fp); } (void)putc('\n', fp); break; } if (ferror(fp)) { msgq(sp, M_SYSERR, NULL); return (1); } } return (0); } /* * opts_search -- * Search for an option. * * PUBLIC: OPTLIST const *opts_search __P((CHAR_T *)); */ OPTLIST const * opts_search(CHAR_T *name) { OPTLIST const *op, *found; OABBREV atmp, *ap; OPTLIST otmp; size_t len; /* Check list of abbreviations. */ atmp.name = name; if ((ap = bsearch(&atmp, abbrev, sizeof(abbrev) / sizeof(OABBREV) - 1, sizeof(OABBREV), opts_abbcmp)) != NULL) return (optlist + ap->offset); /* Check list of options. */ otmp.name = name; if ((op = bsearch(&otmp, optlist, sizeof(optlist) / sizeof(OPTLIST) - 1, sizeof(OPTLIST), opts_cmp)) != NULL) return (op); /* * Check to see if the name is the prefix of one (and only one) * option. If so, return the option. */ len = STRLEN(name); for (found = NULL, op = optlist; op->name != NULL; ++op) { if (op->name[0] < name[0]) continue; if (op->name[0] > name[0]) break; if (!MEMCMP(op->name, name, len)) { if (found != NULL) return (NULL); found = op; } } return (found); } /* * opts_nomatch -- * Standard nomatch error message for options. * * PUBLIC: void opts_nomatch __P((SCR *, CHAR_T *)); */ void opts_nomatch(SCR *sp, CHAR_T *name) { msgq_wstr(sp, M_ERR, name, "033|set: no %s option: 'set all' gives all option values"); } static int opts_abbcmp(const void *a, const void *b) { return(STRCMP(((OABBREV *)a)->name, ((OABBREV *)b)->name)); } static int opts_cmp(const void *a, const void *b) { return(STRCMP(((OPTLIST *)a)->name, ((OPTLIST *)b)->name)); } /* * opts_copy -- * Copy a screen's OPTION array. * * PUBLIC: int opts_copy __P((SCR *, SCR *)); */ int opts_copy(SCR *orig, SCR *sp) { int cnt, rval; /* Copy most everything without change. */ memcpy(sp->opts, orig->opts, sizeof(orig->opts)); /* Copy the string edit options. */ for (cnt = rval = 0; cnt < O_OPTIONCOUNT; ++cnt) { if (optlist[cnt].type != OPT_STR || F_ISSET(&sp->opts[cnt], OPT_GLOBAL)) continue; /* * If never set, or already failed, NULL out the entries -- * have to continue after failure, otherwise would have two * screens referencing the same memory. */ if (rval || O_STR(sp, cnt) == NULL) { o_set(sp, cnt, OS_NOFREE | OS_STR, NULL, 0); o_set(sp, cnt, OS_DEF | OS_NOFREE | OS_STR, NULL, 0); continue; } /* Copy the current string. */ if (o_set(sp, cnt, OS_NOFREE | OS_STRDUP, O_STR(sp, cnt), 0)) { o_set(sp, cnt, OS_DEF | OS_NOFREE | OS_STR, NULL, 0); goto nomem; } /* Copy the default string. */ if (O_D_STR(sp, cnt) != NULL && o_set(sp, cnt, OS_DEF | OS_NOFREE | OS_STRDUP, O_D_STR(sp, cnt), 0)) { nomem: msgq(orig, M_SYSERR, NULL); rval = 1; } } return (rval); } /* * opts_free -- * Free all option strings * * PUBLIC: void opts_free __P((SCR *)); */ void opts_free(SCR *sp) { int cnt; for (cnt = 0; cnt < O_OPTIONCOUNT; ++cnt) { if (optlist[cnt].type != OPT_STR || F_ISSET(&sp->opts[cnt], OPT_GLOBAL)) continue; if (O_STR(sp, cnt) != NULL) free(O_STR(sp, cnt)); if (O_D_STR(sp, cnt) != NULL) free(O_D_STR(sp, cnt)); } } nvi-1.81.6/common/options.h0100644000076400001440000000721110720065506014607 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: options.h,v 10.20 2001/06/09 18:26:28 skimo Exp $ (Berkeley) $Date: 2001/06/09 18:26:28 $ */ /* * Edit option information. Historically, if you set a boolean or numeric * edit option value to its "default" value, it didn't show up in the :set * display, i.e. it wasn't considered "changed". String edit options would * show up as changed, regardless. We maintain a parallel set of values * which are the default values and never consider an edit option changed * if it was reset to the default value. * * Macros to retrieve boolean, integral and string option values, and to * set, clear and test boolean option values. Some options (secure, lines, * columns, terminal type) are global in scope, and are therefore stored * in the global area. The offset in the global options array is stored * in the screen's value field. This is set up when the options are first * initialized. */ #define O_V(sp, o, fld) \ (F_ISSET(&(sp)->opts[(o)], OPT_GLOBAL) ? \ (sp)->gp->opts[(sp)->opts[(o)].o_cur.val].fld : \ (sp)->opts[(o)].fld) /* Global option macros. */ #define OG_CLR(gp, o) ((gp)->opts[(o)].o_cur.val) = 0 #define OG_SET(gp, o) ((gp)->opts[(o)].o_cur.val) = 1 #define OG_STR(gp, o) ((gp)->opts[(o)].o_cur.str) #define OG_VAL(gp, o) ((gp)->opts[(o)].o_cur.val) #define OG_ISSET(gp, o) OG_VAL(gp, o) #define OG_D_STR(gp, o) ((gp)->opts[(o)].o_def.str) #define OG_D_VAL(gp, o) ((gp)->opts[(o)].o_def.val) /* * Flags to o_set(); need explicit OS_STR as can be setting the value to * NULL. */ #define OS_DEF 0x01 /* Set the default value. */ #define OS_NOFREE 0x02 /* Don't free the old string. */ #define OS_STR 0x04 /* Set to string argument. */ #define OS_STRDUP 0x08 /* Copy then set to string argument. */ struct _option { union { u_long val; /* Value or boolean. */ char *str; /* String. */ } o_cur; #define O_CLR(sp, o) o_set(sp, o, 0, NULL, 0) #define O_SET(sp, o) o_set(sp, o, 0, NULL, 1) #define O_STR(sp, o) O_V(sp, o, o_cur.str) #define O_VAL(sp, o) O_V(sp, o, o_cur.val) #define O_ISSET(sp, o) O_VAL(sp, o) union { u_long val; /* Value or boolean. */ char *str; /* String. */ } o_def; #define O_D_CLR(sp, o) o_set(sp, o, OS_DEF, NULL, 0) #define O_D_SET(sp, o) o_set(sp, o, OS_DEF, NULL, 1) #define O_D_STR(sp, o) O_V(sp, o, o_def.str) #define O_D_VAL(sp, o) O_V(sp, o, o_def.val) #define O_D_ISSET(sp, o) O_D_VAL(sp, o) #define OPT_GLOBAL 0x01 /* Option is global. */ #define OPT_SELECTED 0x02 /* Selected for display. */ u_int8_t flags; }; /* List of option names, associated update functions and information. */ struct _optlist { CHAR_T *name; /* Name. */ /* Change function. */ int (*func) __P((SCR *, OPTION *, char *, u_long *)); /* Type of object. */ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type; #define OPT_ADISP 0x001 /* Always display the option. */ #define OPT_ALWAYS 0x002 /* Always call the support function. */ #define OPT_NDISP 0x004 /* Never display the option. */ #define OPT_NOSAVE 0x008 /* Mkexrc command doesn't save. */ #define OPT_NOSET 0x010 /* Option may not be set. */ #define OPT_NOUNSET 0x020 /* Option may not be unset. */ #define OPT_NOZERO 0x040 /* Option may not be set to 0. */ u_int8_t flags; }; /* Option argument to opts_dump(). */ enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY }; /* Options array. */ extern OPTLIST const optlist[]; #include "options_def.h" nvi-1.81.6/common/options_f.c0100644000076400001440000001543310720065506015114 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: options_f.c,v 10.33 2001/06/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:11 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "common.h" /* * PUBLIC: int f_altwerase __P((SCR *, OPTION *, char *, u_long *)); */ int f_altwerase(SCR *sp, OPTION *op, char *str, u_long *valp) { if (*valp) O_CLR(sp, O_TTYWERASE); return (0); } /* * PUBLIC: int f_columns __P((SCR *, OPTION *, char *, u_long *)); */ int f_columns(SCR *sp, OPTION *op, char *str, u_long *valp) { /* Validate the number. */ if (*valp < MINIMUM_SCREEN_COLS) { msgq(sp, M_ERR, "040|Screen columns too small, less than %d", MINIMUM_SCREEN_COLS); return (1); } /* * !!! * It's not uncommon for allocation of huge chunks of memory to cause * core dumps on various systems. So, we prune out numbers that are * "obviously" wrong. Vi will not work correctly if it has the wrong * number of lines/columns for the screen, but at least we don't drop * core. */ #define MAXIMUM_SCREEN_COLS 500 if (*valp > MAXIMUM_SCREEN_COLS) { msgq(sp, M_ERR, "041|Screen columns too large, greater than %d", MAXIMUM_SCREEN_COLS); return (1); } return (0); } /* * PUBLIC: int f_lines __P((SCR *, OPTION *, char *, u_long *)); */ int f_lines(SCR *sp, OPTION *op, char *str, u_long *valp) { /* Validate the number. */ if (*valp < MINIMUM_SCREEN_ROWS) { msgq(sp, M_ERR, "042|Screen lines too small, less than %d", MINIMUM_SCREEN_ROWS); return (1); } /* * !!! * It's not uncommon for allocation of huge chunks of memory to cause * core dumps on various systems. So, we prune out numbers that are * "obviously" wrong. Vi will not work correctly if it has the wrong * number of lines/columns for the screen, but at least we don't drop * core. */ #define MAXIMUM_SCREEN_ROWS 500 if (*valp > MAXIMUM_SCREEN_ROWS) { msgq(sp, M_ERR, "043|Screen lines too large, greater than %d", MAXIMUM_SCREEN_ROWS); return (1); } /* * Set the value, and the related scroll value. If no window * value set, set a new default window. */ o_set(sp, O_LINES, 0, NULL, *valp); if (*valp == 1) { sp->defscroll = 1; if (O_VAL(sp, O_WINDOW) == O_D_VAL(sp, O_WINDOW) || O_VAL(sp, O_WINDOW) > *valp) { o_set(sp, O_WINDOW, 0, NULL, 1); o_set(sp, O_WINDOW, OS_DEF, NULL, 1); } } else { sp->defscroll = (*valp - 1) / 2; if (O_VAL(sp, O_WINDOW) == O_D_VAL(sp, O_WINDOW) || O_VAL(sp, O_WINDOW) > *valp) { o_set(sp, O_WINDOW, 0, NULL, *valp - 1); o_set(sp, O_WINDOW, OS_DEF, NULL, *valp - 1); } } return (0); } /* * PUBLIC: int f_lisp __P((SCR *, OPTION *, char *, u_long *)); */ int f_lisp(SCR *sp, OPTION *op, char *str, u_long *valp) { msgq(sp, M_ERR, "044|The lisp option is not implemented"); return (0); } /* * PUBLIC: int f_msgcat __P((SCR *, OPTION *, char *, u_long *)); */ int f_msgcat(SCR *sp, OPTION *op, char *str, u_long *valp) { (void)msg_open(sp, str); return (0); } /* * PUBLIC: int f_paragraph __P((SCR *, OPTION *, char *, u_long *)); */ int f_paragraph(SCR *sp, OPTION *op, char *str, u_long *valp) { if (strlen(str) & 1) { msgq(sp, M_ERR, "048|The paragraph option must be in two character groups"); return (1); } return (0); } /* * PUBLIC: int f_print __P((SCR *, OPTION *, char *, u_long *)); */ int f_print(SCR *sp, OPTION *op, char *str, u_long *valp) { int offset = op - sp->opts; /* Preset the value, needed for reinitialization of lookup table. */ if (offset == O_OCTAL) { if (*valp) O_SET(sp, offset); else O_CLR(sp, offset); } else if (o_set(sp, offset, OS_STRDUP, str, 0)) return(1); /* Reinitialize the key fast lookup table. */ v_key_ilookup(sp); /* Reformat the screen. */ F_SET(sp, SC_SCR_REFORMAT); return (0); } /* * PUBLIC: int f_readonly __P((SCR *, OPTION *, char *, u_long *)); */ int f_readonly(SCR *sp, OPTION *op, char *str, u_long *valp) { /* * !!! * See the comment in exf.c. */ if (*valp) F_SET(sp, SC_READONLY); else F_CLR(sp, SC_READONLY); return (0); } /* * PUBLIC: int f_recompile __P((SCR *, OPTION *, char *, u_long *)); */ int f_recompile(SCR *sp, OPTION *op, char *str, u_long *valp) { if (F_ISSET(sp, SC_RE_SEARCH)) { regfree(&sp->re_c); F_CLR(sp, SC_RE_SEARCH); } if (F_ISSET(sp, SC_RE_SUBST)) { regfree(&sp->subre_c); F_CLR(sp, SC_RE_SUBST); } return (0); } /* * PUBLIC: int f_reformat __P((SCR *, OPTION *, char *, u_long *)); */ int f_reformat(SCR *sp, OPTION *op, char *str, u_long *valp) { F_SET(sp, SC_SCR_REFORMAT); return (0); } /* * PUBLIC: int f_section __P((SCR *, OPTION *, char *, u_long *)); */ int f_section(SCR *sp, OPTION *op, char *str, u_long *valp) { if (strlen(str) & 1) { msgq(sp, M_ERR, "049|The section option must be in two character groups"); return (1); } return (0); } /* * PUBLIC: int f_ttywerase __P((SCR *, OPTION *, char *, u_long *)); */ int f_ttywerase(SCR *sp, OPTION *op, char *str, u_long *valp) { if (*valp) O_CLR(sp, O_ALTWERASE); return (0); } /* * PUBLIC: int f_w300 __P((SCR *, OPTION *, char *, u_long *)); */ int f_w300(SCR *sp, OPTION *op, char *str, u_long *valp) { u_long v; /* Historical behavior for w300 was < 1200. */ if (sp->gp->scr_baud(sp, &v)) return (1); if (v >= 1200) return (0); return (f_window(sp, op, str, valp)); } /* * PUBLIC: int f_w1200 __P((SCR *, OPTION *, char *, u_long *)); */ int f_w1200(SCR *sp, OPTION *op, char *str, u_long *valp) { u_long v; /* Historical behavior for w1200 was == 1200. */ if (sp->gp->scr_baud(sp, &v)) return (1); if (v < 1200 || v > 4800) return (0); return (f_window(sp, op, str, valp)); } /* * PUBLIC: int f_w9600 __P((SCR *, OPTION *, char *, u_long *)); */ int f_w9600(SCR *sp, OPTION *op, char *str, u_long *valp) { u_long v; /* Historical behavior for w9600 was > 1200. */ if (sp->gp->scr_baud(sp, &v)) return (1); if (v <= 4800) return (0); return (f_window(sp, op, str, valp)); } /* * PUBLIC: int f_window __P((SCR *, OPTION *, char *, u_long *)); */ int f_window(SCR *sp, OPTION *op, char *str, u_long *valp) { if (*valp >= O_VAL(sp, O_LINES) - 1 && (*valp = O_VAL(sp, O_LINES) - 1) == 0) *valp = 1; return (0); } /* * PUBLIC: int f_encoding __P((SCR *, OPTION *, char *, u_long *)); */ int f_encoding(SCR *sp, OPTION *op, char *str, u_long *valp) { int offset = op - sp->opts; return conv_enc(sp, offset, str); } nvi-1.81.6/common/pthread.c0100644000076400001440000000405510720065506014541 0ustar skimousers/*- * Copyright (c) 2000 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: pthread.c,v 1.4 2000/07/22 14:52:37 skimo Exp $ (Berkeley) $Date: 2000/07/22 14:52:37 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" static int vi_pthread_run __P((WIN *wp, void *(*fun)(void*), void *data)); static int vi_pthread_lock_init __P((WIN *, void **)); static int vi_pthread_lock_end __P((WIN *, void **)); static int vi_pthread_lock_try __P((WIN *, void **)); static int vi_pthread_lock_unlock __P((WIN *, void **)); /* * thread_init * * PUBLIC: void thread_init __P((GS *gp)); */ void thread_init(GS *gp) { gp->run = vi_pthread_run; gp->lock_init = vi_pthread_lock_init; gp->lock_end = vi_pthread_lock_end; gp->lock_try = vi_pthread_lock_try; gp->lock_unlock = vi_pthread_lock_unlock; } static int vi_pthread_run(WIN *wp, void *(*fun)(void*), void *data) { pthread_t *t = malloc(sizeof(pthread_t)); pthread_create(t, NULL, fun, data); return 0; } static int vi_pthread_lock_init (WIN * wp, void **p) { pthread_mutex_t *mutex; int rc; MALLOC_RET(NULL, mutex, pthread_mutex_t *, sizeof(*mutex)); if (rc = pthread_mutex_init(mutex, NULL)) { free(mutex); *p = NULL; return rc; } *p = mutex; return 0; } static int vi_pthread_lock_end (WIN * wp, void **p) { int rc; pthread_mutex_t *mutex = (pthread_mutex_t *)*p; if (rc = pthread_mutex_destroy(mutex)) return rc; free(mutex); *p = NULL; return 0; } static int vi_pthread_lock_try (WIN * wp, void **p) { printf("try %p\n", *p); fflush(stdout); return 0; return pthread_mutex_trylock((pthread_mutex_t *)*p); } static int vi_pthread_lock_unlock (WIN * wp, void **p) { printf("unlock %p\n", *p); return 0; return pthread_mutex_unlock((pthread_mutex_t *)*p); } nvi-1.81.6/common/put.c0100644000076400001440000001402710720065506013722 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: put.c,v 10.18 2001/06/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:11 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "common.h" /* * put -- * Put text buffer contents into the file. * * PUBLIC: int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int)); */ int put(SCR *sp, CB *cbp, CHAR_T *namep, MARK *cp, MARK *rp, int append) { CHAR_T name; TEXT *ltp, *tp; db_recno_t lno; size_t blen, clen, len; int rval; CHAR_T *bp, *t; CHAR_T *p; if (cbp == NULL) if (namep == NULL) { cbp = sp->wp->dcbp; if (cbp == NULL) { msgq(sp, M_ERR, "053|The default buffer is empty"); return (1); } } else { name = *namep; CBNAME(sp, cbp, name); if (cbp == NULL) { msgq(sp, M_ERR, "054|Buffer %s is empty", KEY_NAME(sp, name)); return (1); } } tp = cbp->textq.cqh_first; /* * It's possible to do a put into an empty file, meaning that the cut * buffer simply becomes the file. It's a special case so that we can * ignore it in general. * * !!! * Historically, pasting into a file with no lines in vi would preserve * the single blank line. This is surely a result of the fact that the * historic vi couldn't deal with a file that had no lines in it. This * implementation treats that as a bug, and does not retain the blank * line. * * Historical practice is that the cursor ends at the first character * in the file. */ if (cp->lno == 1) { if (db_last(sp, &lno)) return (1); if (lno == 0) { for (; tp != (void *)&cbp->textq; ++lno, ++sp->rptlines[L_ADDED], tp = tp->q.cqe_next) if (db_append(sp, 1, lno, tp->lb, tp->len)) return (1); rp->lno = 1; rp->cno = 0; return (0); } } /* If a line mode buffer, append each new line into the file. */ if (F_ISSET(cbp, CB_LMODE)) { lno = append ? cp->lno : cp->lno - 1; rp->lno = lno + 1; for (; tp != (void *)&cbp->textq; ++lno, ++sp->rptlines[L_ADDED], tp = tp->q.cqe_next) if (db_append(sp, 1, lno, tp->lb, tp->len)) return (1); rp->cno = 0; (void)nonblank(sp, rp->lno, &rp->cno); return (0); } /* * If buffer was cut in character mode, replace the current line with * one built from the portion of the first line to the left of the * split plus the first line in the CB. Append each intermediate line * in the CB. Append a line built from the portion of the first line * to the right of the split plus the last line in the CB. * * Get the first line. */ lno = cp->lno; if (db_get(sp, lno, DBG_FATAL, &p, &len)) return (1); GET_SPACE_RETW(sp, bp, blen, tp->len + len + 1); t = bp; /* Original line, left of the split. */ if (len > 0 && (clen = cp->cno + (append ? 1 : 0)) > 0) { MEMCPYW(bp, p, clen); p += clen; t += clen; } /* First line from the CB. */ if (tp->len != 0) { MEMCPYW(t, tp->lb, tp->len); t += tp->len; } /* Calculate length left in the original line. */ clen = len == 0 ? 0 : len - (cp->cno + (append ? 1 : 0)); /* * !!! * In the historical 4BSD version of vi, character mode puts within * a single line have two cursor behaviors: if the put is from the * unnamed buffer, the cursor moves to the character inserted which * appears last in the file. If the put is from a named buffer, * the cursor moves to the character inserted which appears first * in the file. In System III/V, it was changed at some point and * the cursor always moves to the first character. In both versions * of vi, character mode puts that cross line boundaries leave the * cursor on the first character. Nvi implements the System III/V * behavior, and expect POSIX.2 to do so as well. */ rp->lno = lno; rp->cno = len == 0 ? 0 : sp->cno + (append && tp->len ? 1 : 0); /* * If no more lines in the CB, append the rest of the original * line and quit. Otherwise, build the last line before doing * the intermediate lines, because the line changes will lose * the cached line. */ if (tp->q.cqe_next == (void *)&cbp->textq) { if (clen > 0) { MEMCPYW(t, p, clen); t += clen; } if (db_set(sp, lno, bp, t - bp)) goto err; if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } } else { /* * Have to build both the first and last lines of the * put before doing any sets or we'll lose the cached * line. Build both the first and last lines in the * same buffer, so we don't have to have another buffer * floating around. * * Last part of original line; check for space, reset * the pointer into the buffer. */ ltp = cbp->textq.cqh_last; len = t - bp; ADD_SPACE_RETW(sp, bp, blen, ltp->len + clen); t = bp + len; /* Add in last part of the CB. */ MEMCPYW(t, ltp->lb, ltp->len); if (clen) MEMCPYW(t + ltp->len, p, clen); clen += ltp->len; /* * Now: bp points to the first character of the first * line, t points to the last character of the last * line, t - bp is the length of the first line, and * clen is the length of the last. Just figured you'd * want to know. * * Output the line replacing the original line. */ if (db_set(sp, lno, bp, t - bp)) goto err; if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } /* Output any intermediate lines in the CB. */ for (tp = tp->q.cqe_next; tp->q.cqe_next != (void *)&cbp->textq; ++lno, ++sp->rptlines[L_ADDED], tp = tp->q.cqe_next) if (db_append(sp, 1, lno, tp->lb, tp->len)) goto err; if (db_append(sp, 1, lno, t, clen)) goto err; ++sp->rptlines[L_ADDED]; } rval = 0; if (0) err: rval = 1; FREE_SPACEW(sp, bp, blen); return (rval); } nvi-1.81.6/common/recover.c0100644000076400001440000005325510720065506014565 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: recover.c,v 10.31 2001/11/01 15:24:44 skimo Exp $ (Berkeley) $Date: 2001/11/01 15:24:44 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #include #include /* * We include , because the open #defines were found there * on historical systems. We also include because the open(2) * #defines are found there on newer systems. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "pathnames.h" /* * Recovery code. * * The basic scheme is as follows. In the EXF structure, we maintain full * paths of a b+tree file and a mail recovery file. The former is the file * used as backing store by the DB package. The latter is the file that * contains an email message to be sent to the user if we crash. The two * simple states of recovery are: * * + first starting the edit session: * the b+tree file exists and is mode 700, the mail recovery * file doesn't exist. * + after the file has been modified: * the b+tree file exists and is mode 600, the mail recovery * file exists, and is exclusively locked. * * In the EXF structure we maintain a file descriptor that is the locked * file descriptor for the mail recovery file. NOTE: we sometimes have to * do locking with fcntl(2). This is a problem because if you close(2) any * file descriptor associated with the file, ALL of the locks go away. Be * sure to remember that if you have to modify the recovery code. (It has * been rhetorically asked of what the designers could have been thinking * when they did that interface. The answer is simple: they weren't.) * * To find out if a recovery file/backing file pair are in use, try to get * a lock on the recovery file. * * To find out if a backing file can be deleted at boot time, check for an * owner execute bit. (Yes, I know it's ugly, but it's either that or put * special stuff into the backing file itself, or correlate the files at * boot time, neither of which looks like fun.) Note also that there's a * window between when the file is created and the X bit is set. It's small, * but it's there. To fix the window, check for 0 length files as well. * * To find out if a file can be recovered, check the F_RCV_ON bit. Note, * this DOES NOT mean that any initialization has been done, only that we * haven't yet failed at setting up or doing recovery. * * To preserve a recovery file/backing file pair, set the F_RCV_NORM bit. * If that bit is not set when ending a file session: * If the EXF structure paths (rcv_path and rcv_mpath) are not NULL, * they are unlink(2)'d, and free(3)'d. * If the EXF file descriptor (rcv_fd) is not -1, it is closed. * * The backing b+tree file is set up when a file is first edited, so that * the DB package can use it for on-disk caching and/or to snapshot the * file. When the file is first modified, the mail recovery file is created, * the backing file permissions are updated, the file is sync(2)'d to disk, * and the timer is started. Then, at RCV_PERIOD second intervals, the * b+tree file is synced to disk. RCV_PERIOD is measured using SIGALRM, which * means that the data structures (SCR, EXF, the underlying tree structures) * must be consistent when the signal arrives. * * The recovery mail file contains normal mail headers, with two additions, * which occur in THIS order, as the FIRST TWO headers: * * X-vi-recover-file: file_name * X-vi-recover-path: recover_path * * Since newlines delimit the headers, this means that file names cannot have * newlines in them, but that's probably okay. As these files aren't intended * to be long-lived, changing their format won't be too painful. * * Btree files are named "vi.XXXX" and recovery files are named "recover.XXXX". */ #define VI_FHEADER "X-vi-recover-file: " #define VI_PHEADER "X-vi-recover-path: " static int rcv_copy __P((SCR *, int, char *)); static void rcv_email __P((SCR *, char *)); static char *rcv_gets __P((char *, size_t, int)); static int rcv_mailfile __P((SCR *, int, char *)); static int rcv_mktemp __P((SCR *, char *, char *, int)); /* * rcv_tmp -- * Build a file name that will be used as the recovery file. * * PUBLIC: int rcv_tmp __P((SCR *, EXF *, char *)); */ int rcv_tmp(SCR *sp, EXF *ep, char *name) { struct stat sb; int fd; char *dp, path[MAXPATHLEN]; /* * !!! * ep MAY NOT BE THE SAME AS sp->ep, DON'T USE THE LATTER. * * * If the recovery directory doesn't exist, try and create it. As * the recovery files are themselves protected from reading/writing * by other than the owner, the worst that can happen is that a user * would have permission to remove other user's recovery files. If * the sticky bit has the BSD semantics, that too will be impossible. */ if (opts_empty(sp, O_RECDIR, 0)) goto err; dp = O_STR(sp, O_RECDIR); if (stat(dp, &sb)) { if (errno != ENOENT || mkdir(dp, 0)) { msgq(sp, M_SYSERR, "%s", dp); goto err; } (void)chmod(dp, S_IRWXU | S_IRWXG | S_IRWXO | S_ISVTX); } /* Newlines delimit the mail messages. */ if (strchr(name, '\n')) { msgq(sp, M_ERR, "055|Files with newlines in the name are unrecoverable"); goto err; } (void)snprintf(path, sizeof(path), "%s/vi.XXXXXX", dp); if ((fd = rcv_mktemp(sp, path, dp, S_IRWXU)) == -1) goto err; (void)close(fd); if ((ep->rcv_path = strdup(path)) == NULL) { msgq(sp, M_SYSERR, NULL); (void)unlink(path); err: msgq(sp, M_ERR, "056|Modifications not recoverable if the session fails"); return (1); } /* We believe the file is recoverable. */ F_SET(ep, F_RCV_ON); return (0); } /* * rcv_init -- * Force the file to be snapshotted for recovery. * * PUBLIC: int rcv_init __P((SCR *)); */ int rcv_init(SCR *sp) { EXF *ep; db_recno_t lno; ep = sp->ep; /* Only do this once. */ F_CLR(ep, F_FIRSTMODIFY); /* If we already know the file isn't recoverable, we're done. */ if (!F_ISSET(ep, F_RCV_ON)) return (0); /* Turn off recoverability until we figure out if this will work. */ F_CLR(ep, F_RCV_ON); /* Test if we're recovering a file, not editing one. */ if (ep->rcv_mpath == NULL) { /* Build a file to mail to the user. */ if (rcv_mailfile(sp, 0, NULL)) goto err; /* Force a read of the entire file. */ if (db_last(sp, &lno)) goto err; /* Turn on a busy message, and sync it to backing store. */ sp->gp->scr_busy(sp, "057|Copying file for recovery...", BUSY_ON); if (ep->db->sync(ep->db, 0)) { msgq_str(sp, M_SYSERR, ep->rcv_path, "058|Preservation failed: %s"); sp->gp->scr_busy(sp, NULL, BUSY_OFF); goto err; } sp->gp->scr_busy(sp, NULL, BUSY_OFF); } /* Turn off the owner execute bit. */ (void)chmod(ep->rcv_path, S_IRUSR | S_IWUSR); /* We believe the file is recoverable. */ F_SET(ep, F_RCV_ON); return (0); err: msgq(sp, M_ERR, "059|Modifications not recoverable if the session fails"); return (1); } /* * rcv_sync -- * Sync the file, optionally: * flagging the backup file to be preserved * snapshotting the backup file and send email to the user * sending email to the user if the file was modified * ending the file session * * PUBLIC: int rcv_sync __P((SCR *, u_int)); */ int rcv_sync(SCR *sp, u_int flags) { EXF *ep; int fd, rval; char *dp, buf[1024]; /* Make sure that there's something to recover/sync. */ ep = sp->ep; if (ep == NULL || !F_ISSET(ep, F_RCV_ON)) return (0); /* Sync the file if it's been modified. */ if (F_ISSET(ep, F_MODIFIED)) { if (ep->db->sync(ep->db, 0)) { F_CLR(ep, F_RCV_ON | F_RCV_NORM); msgq_str(sp, M_SYSERR, ep->rcv_path, "060|File backup failed: %s"); return (1); } /* REQUEST: don't remove backing file on exit. */ if (LF_ISSET(RCV_PRESERVE)) F_SET(ep, F_RCV_NORM); /* REQUEST: send email. */ if (LF_ISSET(RCV_EMAIL)) rcv_email(sp, ep->rcv_mpath); } /* * !!! * Each time the user exec's :preserve, we have to snapshot all of * the recovery information, i.e. it's like the user re-edited the * file. We copy the DB(3) backing file, and then create a new mail * recovery file, it's simpler than exiting and reopening all of the * underlying files. * * REQUEST: snapshot the file. */ rval = 0; if (LF_ISSET(RCV_SNAPSHOT)) { if (opts_empty(sp, O_RECDIR, 0)) goto err; dp = O_STR(sp, O_RECDIR); (void)snprintf(buf, sizeof(buf), "%s/vi.XXXXXX", dp); if ((fd = rcv_mktemp(sp, buf, dp, S_IRUSR | S_IWUSR)) == -1) goto err; sp->gp->scr_busy(sp, "061|Copying file for recovery...", BUSY_ON); if (rcv_copy(sp, fd, ep->rcv_path) || close(fd) || rcv_mailfile(sp, 1, buf)) { (void)unlink(buf); (void)close(fd); rval = 1; } sp->gp->scr_busy(sp, NULL, BUSY_OFF); } if (0) { err: rval = 1; } /* REQUEST: end the file session. */ if (LF_ISSET(RCV_ENDSESSION) && file_end(sp, NULL, 1)) rval = 1; return (rval); } /* * rcv_mailfile -- * Build the file to mail to the user. */ static int rcv_mailfile(SCR *sp, int issync, char *cp_path) { EXF *ep; GS *gp; struct passwd *pw; size_t len; time_t now; uid_t uid; int fd; char *dp, *p, *t, buf[4096], mpath[MAXPATHLEN]; char *t1, *t2, *t3; /* * XXX * MAXHOSTNAMELEN is in various places on various systems, including * and . If not found, use a large default. */ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 1024 #endif char host[MAXHOSTNAMELEN]; gp = sp->gp; if ((pw = getpwuid(uid = getuid())) == NULL) { msgq(sp, M_ERR, "062|Information on user id %u not found", uid); return (1); } if (opts_empty(sp, O_RECDIR, 0)) return (1); dp = O_STR(sp, O_RECDIR); (void)snprintf(mpath, sizeof(mpath), "%s/recover.XXXXXX", dp); if ((fd = rcv_mktemp(sp, mpath, dp, S_IRUSR | S_IWUSR)) == -1) return (1); /* * XXX * We keep an open lock on the file so that the recover option can * distinguish between files that are live and those that need to * be recovered. There's an obvious window between the mkstemp call * and the lock, but it's pretty small. */ ep = sp->ep; if (file_lock(sp, NULL, NULL, fd, 1) != LOCK_SUCCESS) msgq(sp, M_SYSERR, "063|Unable to lock recovery file"); if (!issync) { /* Save the recover file descriptor, and mail path. */ ep->rcv_fd = fd; if ((ep->rcv_mpath = strdup(mpath)) == NULL) { msgq(sp, M_SYSERR, NULL); goto err; } cp_path = ep->rcv_path; } /* * XXX * We can't use stdio(3) here. The problem is that we may be using * fcntl(2), so if ANY file descriptor into the file is closed, the * lock is lost. So, we could never close the FILE *, even if we * dup'd the fd first. */ t = sp->frp->name; if ((p = strrchr(t, '/')) == NULL) p = t; else ++p; (void)time(&now); (void)gethostname(host, sizeof(host)); len = snprintf(buf, sizeof(buf), "%s%s\n%s%s\n%s\n%s\n%s%s\n%s%s\n%s\n\n", VI_FHEADER, t, /* Non-standard. */ VI_PHEADER, cp_path, /* Non-standard. */ "Reply-To: root", "From: root (Nvi recovery program)", "To: ", pw->pw_name, "Subject: Nvi saved the file ", p, "Precedence: bulk"); /* For vacation(1). */ if (len > sizeof(buf) - 1) goto lerr; if (write(fd, buf, len) != len) goto werr; len = snprintf(buf, sizeof(buf), "%s%.24s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n\n", "On ", ctime(&now), ", the user ", pw->pw_name, " was editing a file named ", t, " on the machine ", host, ", when it was saved for recovery. ", "You can recover most, if not all, of the changes ", "to this file using the -r option to ", gp->progname, ":\n\n\t", gp->progname, " -r ", t); if (len > sizeof(buf) - 1) { lerr: msgq(sp, M_ERR, "064|Recovery file buffer overrun"); goto err; } /* * Format the message. (Yes, I know it's silly.) * Requires that the message end in a . */ #define FMTCOLS 60 for (t1 = buf; len > 0; len -= t2 - t1, t1 = t2) { /* Check for a short length. */ if (len <= FMTCOLS) { t2 = t1 + (len - 1); goto wout; } /* Check for a required . */ t2 = strchr(t1, '\n'); if (t2 - t1 <= FMTCOLS) goto wout; /* Find the closest space, if any. */ for (t3 = t2; t2 > t1; --t2) if (*t2 == ' ') { if (t2 - t1 <= FMTCOLS) goto wout; t3 = t2; } t2 = t3; /* t2 points to the last character to display. */ wout: *t2++ = '\n'; /* t2 points one after the last character to display. */ if (write(fd, t1, t2 - t1) != t2 - t1) goto werr; } if (issync) { rcv_email(sp, mpath); if (close(fd)) { werr: msgq(sp, M_SYSERR, "065|Recovery file"); goto err; } } return (0); err: if (!issync) ep->rcv_fd = -1; if (fd != -1) (void)close(fd); return (1); } /* * people making love * never exactly the same * just like a snowflake * * rcv_list -- * List the files that can be recovered by this user. * * PUBLIC: int rcv_list __P((SCR *)); */ int rcv_list(SCR *sp) { struct dirent *dp; struct stat sb; DIR *dirp; FILE *fp; int found; char *p, *t, file[MAXPATHLEN], path[MAXPATHLEN]; /* Open the recovery directory for reading. */ if (opts_empty(sp, O_RECDIR, 0)) return (1); p = O_STR(sp, O_RECDIR); if (chdir(p) || (dirp = opendir(".")) == NULL) { msgq_str(sp, M_SYSERR, p, "recdir: %s"); return (1); } /* Read the directory. */ for (found = 0; (dp = readdir(dirp)) != NULL;) { if (strncmp(dp->d_name, "recover.", 8)) continue; /* * If it's readable, it's recoverable. * * XXX * Should be "r", we don't want to write the file. However, * if we're using fcntl(2), there's no way to lock a file * descriptor that's not open for writing. */ if ((fp = fopen(dp->d_name, "r+")) == NULL) continue; switch (file_lock(sp, NULL, NULL, fileno(fp), 1)) { case LOCK_FAILED: /* * XXX * Assume that a lock can't be acquired, but that we * should permit recovery anyway. If this is wrong, * and someone else is using the file, we're going to * die horribly. */ break; case LOCK_SUCCESS: break; case LOCK_UNAVAIL: /* If it's locked, it's live. */ (void)fclose(fp); continue; } /* Check the headers. */ if (fgets(file, sizeof(file), fp) == NULL || strncmp(file, VI_FHEADER, sizeof(VI_FHEADER) - 1) || (p = strchr(file, '\n')) == NULL || fgets(path, sizeof(path), fp) == NULL || strncmp(path, VI_PHEADER, sizeof(VI_PHEADER) - 1) || (t = strchr(path, '\n')) == NULL) { msgq_str(sp, M_ERR, dp->d_name, "066|%s: malformed recovery file"); goto next; } *p = *t = '\0'; /* * If the file doesn't exist, it's an orphaned recovery file, * toss it. * * XXX * This can occur if the backup file was deleted and we crashed * before deleting the email file. */ errno = 0; if (stat(path + sizeof(VI_PHEADER) - 1, &sb) && errno == ENOENT) { (void)unlink(dp->d_name); goto next; } /* Get the last modification time and display. */ (void)fstat(fileno(fp), &sb); (void)printf("%.24s: %s\n", ctime(&sb.st_mtime), file + sizeof(VI_FHEADER) - 1); found = 1; /* Close, discarding lock. */ next: (void)fclose(fp); } if (found == 0) (void)printf("vi: no files to recover.\n"); (void)closedir(dirp); return (0); } /* * rcv_read -- * Start a recovered file as the file to edit. * * PUBLIC: int rcv_read __P((SCR *, FREF *)); */ int rcv_read(SCR *sp, FREF *frp) { struct dirent *dp; struct stat sb; DIR *dirp; EXF *ep; time_t rec_mtime; int fd, found, locked, requested, sv_fd; char *name, *p, *t, *rp, *recp, *pathp; char file[MAXPATHLEN], path[MAXPATHLEN], recpath[MAXPATHLEN]; if (opts_empty(sp, O_RECDIR, 0)) return (1); rp = O_STR(sp, O_RECDIR); if ((dirp = opendir(rp)) == NULL) { msgq_str(sp, M_ERR, rp, "%s"); return (1); } name = frp->name; sv_fd = -1; rec_mtime = 0; recp = pathp = NULL; for (found = requested = 0; (dp = readdir(dirp)) != NULL;) { if (strncmp(dp->d_name, "recover.", 8)) continue; (void)snprintf(recpath, sizeof(recpath), "%s/%s", rp, dp->d_name); /* * If it's readable, it's recoverable. It would be very * nice to use stdio(3), but, we can't because that would * require closing and then reopening the file so that we * could have a lock and still close the FP. Another tip * of the hat to fcntl(2). * * XXX * Should be O_RDONLY, we don't want to write it. However, * if we're using fcntl(2), there's no way to lock a file * descriptor that's not open for writing. */ if ((fd = open(recpath, O_RDWR, 0)) == -1) continue; switch (file_lock(sp, NULL, NULL, fd, 1)) { case LOCK_FAILED: /* * XXX * Assume that a lock can't be acquired, but that we * should permit recovery anyway. If this is wrong, * and someone else is using the file, we're going to * die horribly. */ locked = 0; break; case LOCK_SUCCESS: locked = 1; break; case LOCK_UNAVAIL: /* If it's locked, it's live. */ (void)close(fd); continue; } /* Check the headers. */ if (rcv_gets(file, sizeof(file), fd) == NULL || strncmp(file, VI_FHEADER, sizeof(VI_FHEADER) - 1) || (p = strchr(file, '\n')) == NULL || rcv_gets(path, sizeof(path), fd) == NULL || strncmp(path, VI_PHEADER, sizeof(VI_PHEADER) - 1) || (t = strchr(path, '\n')) == NULL) { msgq_str(sp, M_ERR, recpath, "067|%s: malformed recovery file"); goto next; } *p = *t = '\0'; ++found; /* * If the file doesn't exist, it's an orphaned recovery file, * toss it. * * XXX * This can occur if the backup file was deleted and we crashed * before deleting the email file. */ errno = 0; if (stat(path + sizeof(VI_PHEADER) - 1, &sb) && errno == ENOENT) { (void)unlink(dp->d_name); goto next; } /* Check the file name. */ if (strcmp(file + sizeof(VI_FHEADER) - 1, name)) goto next; ++requested; /* * If we've found more than one, take the most recent. * * XXX * Since we're using st_mtime, for portability reasons, * we only get a single second granularity, instead of * getting it right. */ (void)fstat(fd, &sb); if (recp == NULL || rec_mtime < sb.st_mtime) { p = recp; t = pathp; if ((recp = strdup(recpath)) == NULL) { msgq(sp, M_SYSERR, NULL); recp = p; goto next; } if ((pathp = strdup(path)) == NULL) { msgq(sp, M_SYSERR, NULL); free(recp); recp = p; pathp = t; goto next; } if (p != NULL) { free(p); free(t); } rec_mtime = sb.st_mtime; if (sv_fd != -1) (void)close(sv_fd); sv_fd = fd; } else next: (void)close(fd); } (void)closedir(dirp); if (recp == NULL) { msgq_str(sp, M_INFO, name, "068|No files named %s, readable by you, to recover"); return (1); } if (found) { if (requested > 1) msgq(sp, M_INFO, "069|There are older versions of this file for you to recover"); if (found > requested) msgq(sp, M_INFO, "070|There are other files for you to recover"); } /* * Create the FREF structure, start the btree file. * * XXX * file_init() is going to set ep->rcv_path. */ if (file_init(sp, frp, pathp + sizeof(VI_PHEADER) - 1, 0)) { free(recp); free(pathp); (void)close(sv_fd); return (1); } /* * We keep an open lock on the file so that the recover option can * distinguish between files that are live and those that need to * be recovered. The lock is already acquired, just copy it. */ ep = sp->ep; ep->rcv_mpath = recp; ep->rcv_fd = sv_fd; if (!locked) F_SET(frp, FR_UNLOCKED); /* We believe the file is recoverable. */ F_SET(ep, F_RCV_ON); return (0); } /* * rcv_copy -- * Copy a recovery file. */ static int rcv_copy(SCR *sp, int wfd, char *fname) { int nr, nw, off, rfd; char buf[8 * 1024]; if ((rfd = open(fname, O_RDONLY, 0)) == -1) goto err; while ((nr = read(rfd, buf, sizeof(buf))) > 0) for (off = 0; nr; nr -= nw, off += nw) if ((nw = write(wfd, buf + off, nr)) < 0) goto err; if (nr == 0) return (0); err: msgq_str(sp, M_SYSERR, fname, "%s"); return (1); } /* * rcv_gets -- * Fgets(3) for a file descriptor. */ static char * rcv_gets(char *buf, size_t len, int fd) { int nr; char *p; if ((nr = read(fd, buf, len - 1)) == -1) return (NULL); if ((p = strchr(buf, '\n')) == NULL) return (NULL); (void)lseek(fd, (off_t)((p - buf) + 1), SEEK_SET); return (buf); } /* * rcv_mktemp -- * Paranoid make temporary file routine. */ static int rcv_mktemp(SCR *sp, char *path, char *dname, int perms) { int fd; /* * !!! * We expect mkstemp(3) to set the permissions correctly. On * historic System V systems, mkstemp didn't. Do it here, on * GP's. * * XXX * The variable perms should really be a mode_t, and it would * be nice to use fchmod(2) instead of chmod(2), here. */ if ((fd = mkstemp(path)) == -1) msgq_str(sp, M_SYSERR, dname, "%s"); else (void)chmod(path, perms); return (fd); } /* * rcv_email -- * Send email. */ static void rcv_email(SCR *sp, char *fname) { struct stat sb; char buf[MAXPATHLEN * 2 + 20]; if (_PATH_SENDMAIL[0] != '/' || stat(_PATH_SENDMAIL, &sb)) msgq_str(sp, M_SYSERR, _PATH_SENDMAIL, "071|not sending email: %s"); else { /* * !!! * If you need to port this to a system that doesn't have * sendmail, the -t flag causes sendmail to read the message * for the recipients instead of specifying them some other * way. */ (void)snprintf(buf, sizeof(buf), "%s -t < %s", _PATH_SENDMAIL, fname); (void)system(buf); } } nvi-1.81.6/common/screen.c0100644000076400001440000001176510720065506014377 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: screen.c,v 10.22 2001/06/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:12 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" #include "../vi/vi.h" /* * screen_init -- * Do the default initialization of an SCR structure. * * PUBLIC: int screen_init __P((GS *, SCR *, SCR **)); */ int screen_init(GS *gp, SCR *orig, SCR **spp) { SCR *sp; size_t len; *spp = NULL; CALLOC_RET(orig, sp, SCR *, 1, sizeof(SCR)); *spp = sp; /* INITIALIZED AT SCREEN CREATE. */ sp->id = ++gp->id; sp->refcnt = 1; sp->gp = gp; /* All ref the GS structure. */ sp->ccnt = 2; /* Anything > 1 */ /* * XXX * sp->defscroll is initialized by the opts_init() code because * we don't have the option information yet. */ CIRCLEQ_INIT(&sp->tiq); /* PARTIALLY OR COMPLETELY COPIED FROM PREVIOUS SCREEN. */ if (orig == NULL) { sp->searchdir = NOTSET; } else { sp->wp = orig->wp; /* Alternate file name. */ if (orig->alt_name != NULL && (sp->alt_name = strdup(orig->alt_name)) == NULL) goto mem; /* Last executed at buffer. */ if (F_ISSET(orig, SC_AT_SET)) { F_SET(sp, SC_AT_SET); sp->at_lbuf = orig->at_lbuf; } /* Retain searching/substitution information. */ sp->searchdir = orig->searchdir == NOTSET ? NOTSET : FORWARD; if (orig->re != NULL && (sp->re = v_wstrdup(sp, orig->re, orig->re_len)) == NULL) goto mem; sp->re_len = orig->re_len; if (orig->subre != NULL && (sp->subre = v_wstrdup(sp, orig->subre, orig->subre_len)) == NULL) goto mem; sp->subre_len = orig->subre_len; if (orig->repl != NULL && (sp->repl = v_wstrdup(sp, orig->repl, orig->repl_len)) == NULL) goto mem; sp->repl_len = orig->repl_len; if (orig->newl_len) { len = orig->newl_len * sizeof(size_t); MALLOC(sp, sp->newl, size_t *, len); if (sp->newl == NULL) { mem: msgq(orig, M_SYSERR, NULL); goto err; } sp->newl_len = orig->newl_len; sp->newl_cnt = orig->newl_cnt; memcpy(sp->newl, orig->newl, len); } if (opts_copy(orig, sp)) goto err; F_SET(sp, F_ISSET(orig, SC_EX | SC_VI)); } if (ex_screen_copy(orig, sp)) /* Ex. */ goto err; if (v_screen_copy(orig, sp)) /* Vi. */ goto err; sp->cl_private = 0; /* XXX */ conv_init(orig, sp); /* XXX */ *spp = sp; return (0); err: screen_end(sp); return (1); } /* * screen_end -- * Release a screen, no matter what had (and had not) been * initialized. * * PUBLIC: int screen_end __P((SCR *)); */ int screen_end(SCR *sp) { int rval; /* If multiply referenced, just decrement the count and return. */ if (--sp->refcnt != 0) return (0); /* * Remove the screen from the displayed queue. * * If a created screen failed during initialization, it may not * be linked into the chain. */ if (sp->q.cqe_next != NULL) CIRCLEQ_REMOVE(&sp->wp->scrq, sp, q); /* The screen is no longer real. */ F_CLR(sp, SC_SCR_EX | SC_SCR_VI); rval = 0; #ifdef HAVE_PERL_INTERP if (perl_screen_end(sp)) /* End perl. */ rval = 1; #endif if (v_screen_end(sp)) /* End vi. */ rval = 1; if (ex_screen_end(sp)) /* End ex. */ rval = 1; /* Free file names. */ { char **ap; if (!F_ISSET(sp, SC_ARGNOFREE) && sp->argv != NULL) { for (ap = sp->argv; *ap != NULL; ++ap) free(*ap); free(sp->argv); } } /* Free any text input. */ if (sp->tiq.cqh_first != NULL) text_lfree(&sp->tiq); /* Free alternate file name. */ if (sp->alt_name != NULL) free(sp->alt_name); /* Free up search information. */ if (sp->re != NULL) free(sp->re); if (F_ISSET(sp, SC_RE_SEARCH)) regfree(&sp->re_c); if (sp->subre != NULL) free(sp->subre); if (F_ISSET(sp, SC_RE_SUBST)) regfree(&sp->subre_c); if (sp->repl != NULL) free(sp->repl); if (sp->newl != NULL) free(sp->newl); /* Free all the options */ opts_free(sp); /* Free the screen itself. */ free(sp); return (rval); } /* * screen_next -- * Return the next screen in the queue. * * PUBLIC: SCR *screen_next __P((SCR *)); */ SCR * screen_next(SCR *sp) { GS *gp; WIN *wp; SCR *next; /* Try the display queue, without returning the current screen. */ gp = sp->gp; wp = sp->wp; for (next = wp->scrq.cqh_first; next != (void *)&wp->scrq; next = next->q.cqe_next) if (next != sp) break; if (next != (void *)&wp->scrq) return (next); /* Try the hidden queue; if found, move screen to the display queue. */ if (gp->hq.cqh_first != (void *)&gp->hq) { next = gp->hq.cqh_first; CIRCLEQ_REMOVE(&gp->hq, next, q); CIRCLEQ_INSERT_HEAD(&wp->scrq, next, q); next->wp = sp->wp; return (next); } return (NULL); } nvi-1.81.6/common/screen.h0100644000076400001440000002472410720065506014403 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: screen.h,v 10.49 2002/03/02 23:47:02 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:47:02 $ */ /* * There are minimum values that vi has to have to display a screen. The row * minimum is fixed at 1 (the svi code can share a line between the text line * and the colon command/message line). Column calculation is a lot trickier. * For example, you have to have enough columns to display the line number, * not to mention guaranteeing that tabstop and shiftwidth values are smaller * than the current column value. It's simpler to have a fixed value and not * worry about it. * * XXX * MINIMUM_SCREEN_COLS is almost certainly wrong. */ #define MINIMUM_SCREEN_ROWS 1 #define MINIMUM_SCREEN_COLS 20 /* * WIN -- * A list of screens that are displayed as a whole. */ struct _win { CIRCLEQ_ENTRY(_win) q; /* Windows. */ CIRCLEQ_HEAD(_scrh, _scr) scrq; /* Screens */ GS *gp; /* Pointer to global area. */ SCR *ccl_sp; /* Colon command-line screen. */ void *perl_private; /* Perl interpreter. */ void *ip_private; /* IP support private area. */ void *th_private; /* Threading support private area. */ /* * Ex command structures (EXCMD). Defined here because ex commands * exist outside of any particular screen or file. */ #define EXCMD_RUNNING(wp) ((wp)->ecq.lh_first->clen != 0) LIST_HEAD(_excmdh, _excmd) ecq; /* Ex command linked list. */ EXCMD excmd; /* Default ex command structure. */ char *if_name; /* Current associated file. */ db_recno_t if_lno; /* Current associated line number. */ EVENT *i_event; /* Array of input events. */ size_t i_nelem; /* Number of array elements. */ size_t i_cnt; /* Count of events. */ size_t i_next; /* Offset of next event. */ CB *dcbp; /* Default cut buffer pointer. */ CB dcb_store; /* Default cut buffer storage. */ LIST_HEAD(_cuth, _cb) cutq; /* Linked list of cut buffers. */ /* For now, can be either char or CHAR_T buffer */ char *tmp_bp; /* Temporary buffer. */ size_t tmp_blen; /* Temporary buffer size. */ char *l_lp; /* Log buffer. */ size_t l_len; /* Log buffer length. */ CONVWIN cw; /* Flags. */ #define W_TMP_INUSE 0x0001 /* Temporary buffer in use. */ u_int32_t flags; /* Message or ex output. */ void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); }; /* * SCR -- * The screen structure. To the extent possible, all screen information * is stored in the various private areas. The only information here * is used by global routines or is shared by too many screens. */ struct _scr { /* INITIALIZED AT SCREEN CREATE. */ CIRCLEQ_ENTRY(_scr) q; /* Screens. */ CIRCLEQ_ENTRY(_scr) eq; /* Screens. */ int id; /* Screen id #. */ int refcnt; /* Reference count. */ WIN *wp; /* Pointer to window. */ GS *gp; /* Pointer to global area. */ SCR *nextdisp; /* Next display screen. */ SCR *ccl_parent; /* Colon command-line parent screen. */ EXF *ep; /* Screen's current EXF structure. */ CHAR_T *c_lp; /* Cached line. */ size_t c_len; /* Cached line length. */ /* May move out again once we use DB * to cache internal representation */ size_t c_blen; /* Cached line buffer length. */ db_recno_t c_lno; /* Cached line number. */ FREF *frp; /* FREF being edited. */ char **argv; /* NULL terminated file name array. */ char **cargv; /* Current file name. */ u_long ccnt; /* Command count. */ u_long q_ccnt; /* Quit or ZZ command count. */ /* Screen's: */ size_t rows; /* 1-N: number of rows. */ size_t cols; /* 1-N: number of columns. */ size_t t_rows; /* 1-N: cur number of text rows. */ size_t t_maxrows; /* 1-N: max number of text rows. */ size_t t_minrows; /* 1-N: min number of text rows. */ size_t coff; /* 0-N: screen col offset in display. */ size_t roff; /* 0-N: screen row offset in display. */ /* Cursor's: */ db_recno_t lno; /* 1-N: file line. */ size_t cno; /* 0-N: file character in line. */ size_t rcm; /* Vi: 0-N: Most attractive column. */ #define L_ADDED 0 /* Added lines. */ #define L_CHANGED 1 /* Changed lines. */ #define L_DELETED 2 /* Deleted lines. */ #define L_JOINED 3 /* Joined lines. */ #define L_MOVED 4 /* Moved lines. */ #define L_SHIFT 5 /* Shift lines. */ #define L_YANKED 6 /* Yanked lines. */ db_recno_t rptlchange; /* Ex/vi: last L_CHANGED lno. */ db_recno_t rptlines[L_YANKED + 1];/* Ex/vi: lines changed by last op. */ TEXTH tiq; /* Ex/vi: text input queue. */ SCRIPT *script; /* Vi: script mode information .*/ db_recno_t defscroll; /* Vi: ^D, ^U scroll information. */ /* Display character. */ u_char cname[MAX_CHARACTER_COLUMNS + 1]; size_t clen; /* Length of display character. */ enum { /* Vi editor mode. */ SM_APPEND = 0, SM_CHANGE, SM_COMMAND, SM_INSERT, SM_REPLACE } showmode; void *ex_private; /* Ex private area. */ void *vi_private; /* Vi private area. */ void *perl_private; /* Perl private area. */ void *cl_private; /* Curses private area. */ CONV conv; struct _log_state state; /* State during log traversal. */ /* PARTIALLY OR COMPLETELY COPIED FROM PREVIOUS SCREEN. */ char *alt_name; /* Ex/vi: alternate file name. */ CHAR_T at_lbuf; /* Ex/vi: Last executed at buffer. */ /* Ex/vi: re_compile flags. */ #define RE_WSTART L("[[:<:]]") /* Ex/vi: not-in-word search pattern. */ #define RE_WSTOP L("[[:>:]]") #define RE_WSTART_LEN (sizeof(RE_WSTART)/sizeof(CHAR_T)-1) #define RE_WSTOP_LEN (sizeof(RE_WSTOP)/sizeof(CHAR_T)-1) /* Ex/vi: flags to search routines. */ #define SEARCH_CSCOPE 0x000001 /* Search for a cscope pattern. */ #define SEARCH_CSEARCH 0x000002 /* Compile search replacement. */ #define SEARCH_CSUBST 0x000004 /* Compile substitute replacement. */ #define SEARCH_EOL 0x000008 /* Offset past EOL is okay. */ #define SEARCH_EXTEND 0x000010 /* Extended RE. */ #define SEARCH_FIRST 0x000020 /* Search from the first line. */ #define SEARCH_IC 0x000040 /* Ignore case. */ #define SEARCH_ICL 0x000080 /* Ignore case. */ #define SEARCH_INCR 0x000100 /* Search incrementally. */ #define SEARCH_LITERAL 0x000200 /* Literal string. */ #define SEARCH_MSG 0x000400 /* Display search messages. */ #define SEARCH_NOOPT 0x000800 /* Ignore edit options. */ #define SEARCH_PARSE 0x001000 /* Parse the search pattern. */ #define SEARCH_SET 0x002000 /* Set search direction. */ #define SEARCH_TAG 0x004000 /* Search for a tag pattern. */ #define SEARCH_WMSG 0x008000 /* Display search-wrapped messages. */ #define SEARCH_WRAP 0x010000 /* Wrap past sof/eof. */ /* Ex/vi: RE information. */ dir_t searchdir; /* Last file search direction. */ regex_t re_c; /* Search RE: compiled form. */ CHAR_T *re; /* Search RE: uncompiled form. */ size_t re_len; /* Search RE: uncompiled length. */ regex_t subre_c; /* Substitute RE: compiled form. */ CHAR_T *subre; /* Substitute RE: uncompiled form. */ size_t subre_len; /* Substitute RE: uncompiled length). */ CHAR_T *repl; /* Substitute replacement. */ size_t repl_len; /* Substitute replacement length.*/ size_t *newl; /* Newline offset array. */ size_t newl_len; /* Newline array size. */ size_t newl_cnt; /* Newlines in replacement. */ u_int8_t c_suffix; /* Edcompatible 'c' suffix value. */ u_int8_t g_suffix; /* Edcompatible 'g' suffix value. */ OPTION opts[O_OPTIONCOUNT]; /* Ex/vi: Options. */ /* * Screen flags. * * Editor screens. */ #define SC_EX 0x00000001 /* Ex editor. */ #define SC_VI 0x00000002 /* Vi editor. */ /* * Screen formatting flags, first major, then minor. * * SC_SCR_EX * Ex screen, i.e. cooked mode. * SC_SCR_VI * Vi screen, i.e. raw mode. * SC_SCR_EXWROTE * The editor had to write on the screen behind curses' back, and we can't * let curses change anything until the user agrees, e.g. entering the * commands :!utility followed by :set. We have to switch back into the * vi "editor" to read the user's command input, but we can't touch the * rest of the screen because it's known to be wrong. * SC_SCR_REFORMAT * The expected presentation of the lines on the screen have changed, * requiring that the intended screen lines be recalculated. Implies * SC_SCR_REDRAW. * SC_SCR_REDRAW * The screen doesn't correctly represent the file; repaint it. Note, * setting SC_SCR_REDRAW in the current window causes *all* windows to * be repainted. * SC_SCR_CENTER * If the current line isn't already on the screen, center it. * SC_SCR_TOP * If the current line isn't already on the screen, put it at the to@. */ #define SC_SCR_EX 0x00000004 /* Screen is in ex mode. */ #define SC_SCR_VI 0x00000008 /* Screen is in vi mode. */ #define SC_SCR_EXWROTE 0x00000010 /* Ex overwrite: see comment above. */ #define SC_SCR_REFORMAT 0x00000020 /* Reformat (refresh). */ #define SC_SCR_REDRAW 0x00000040 /* Refresh. */ #define SC_SCR_CENTER 0x00000080 /* Center the line if not visible. */ #define SC_SCR_TOP 0x00000100 /* Top the line if not visible. */ /* Screen/file changes. */ #define SC_EXIT 0x00000200 /* Exiting (not forced). */ #define SC_EXIT_FORCE 0x00000400 /* Exiting (forced). */ #define SC_FSWITCH 0x00000800 /* Switch underlying files. */ #define SC_SSWITCH 0x00001000 /* Switch screens. */ #define SC_ARGNOFREE 0x00002000 /* Argument list wasn't allocated. */ #define SC_ARGRECOVER 0x00004000 /* Argument list is recovery files. */ #define SC_AT_SET 0x00008000 /* Last at buffer set. */ #define SC_COMEDIT 0x00010000 /* Colon command-line edit window. */ #define SC_EX_GLOBAL 0x00020000 /* Ex: executing a global command. */ #define SC_EX_SILENT 0x00040000 /* Ex: batch script. */ #define SC_EX_WAIT_NO 0x00080000 /* Ex: don't wait for the user. */ #define SC_EX_WAIT_YES 0x00100000 /* Ex: do wait for the user. */ #define SC_READONLY 0x00200000 /* Persistent readonly state. */ #define SC_RE_SEARCH 0x00400000 /* Search RE has been compiled. */ #define SC_RE_SUBST 0x00800000 /* Substitute RE has been compiled. */ #define SC_SCRIPT 0x01000000 /* Shell script window. */ #define SC_STATUS 0x02000000 /* Welcome message. */ #define SC_STATUS_CNT 0x04000000 /* Welcome message plus file count. */ #define SC_TINPUT 0x08000000 /* Doing text input. */ #define SC_TINPUT_INFO 0x10000000 /* Doing text input on info line. */ #define SC_CONV_ERROR 0x20000000 /* Met with a conversion error. */ u_int32_t flags; int db_error; /* Return code from db function. */ }; nvi-1.81.6/common/search.c0100644000076400001440000002562510720065506014365 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: search.c,v 10.31 2001/06/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:12 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "common.h" typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t; static void search_msg __P((SCR *, smsg_t)); static int search_init __P((SCR *, dir_t, CHAR_T *, size_t, CHAR_T **, u_int)); /* * search_init -- * Set up a search. */ static int search_init(SCR *sp, dir_t dir, CHAR_T *ptrn, size_t plen, CHAR_T **epp, u_int flags) { db_recno_t lno; int delim; CHAR_T *p, *t; /* If the file is empty, it's a fast search. */ if (sp->lno <= 1) { if (db_last(sp, &lno)) return (1); if (lno == 0) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_EMPTY); return (1); } } if (LF_ISSET(SEARCH_PARSE)) { /* Parse the string. */ /* * Use the saved pattern if no pattern specified, or if only * one or two delimiter characters specified. * * !!! * Historically, only the pattern itself was saved, vi didn't * preserve addressing or delta information. */ if (ptrn == NULL) goto prev; if (plen == 1) { if (epp != NULL) *epp = ptrn + 1; goto prev; } if (ptrn[0] == ptrn[1]) { if (epp != NULL) *epp = ptrn + 2; /* Complain if we don't have a previous pattern. */ prev: if (sp->re == NULL) { search_msg(sp, S_NOPREV); return (1); } /* Re-compile the search pattern if necessary. */ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp, sp->re, sp->re_len, NULL, NULL, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); /* Set the search direction. */ if (LF_ISSET(SEARCH_SET)) sp->searchdir = dir; return (0); } /* * Set the delimiter, and move forward to the terminating * delimiter, handling escaped delimiters. * * QUOTING NOTE: * Only discard an escape character if it escapes a delimiter. */ for (delim = *ptrn, p = t = ++ptrn;; *t++ = *p++) { if (--plen == 0 || p[0] == delim) { if (plen != 0) ++p; break; } if (plen > 1 && p[0] == '\\' && p[1] == delim) { ++p; --plen; } } if (epp != NULL) *epp = p; plen = t - ptrn; } /* Compile the RE. */ if (re_compile(sp, ptrn, plen, &sp->re, &sp->re_len, &sp->re_c, SEARCH_CSEARCH | LF_ISSET(SEARCH_CSCOPE | SEARCH_IC | SEARCH_LITERAL | SEARCH_MSG | SEARCH_TAG))) return (1); /* Set the search direction. */ if (LF_ISSET(SEARCH_SET)) sp->searchdir = dir; return (0); } /* * f_search -- * Do a forward search. * * PUBLIC: int f_search __P((SCR *, * PUBLIC: MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int)); */ int f_search(SCR *sp, MARK *fm, MARK *rm, CHAR_T *ptrn, size_t plen, CHAR_T **eptrn, u_int flags) { busy_t btype; db_recno_t lno; regmatch_t match[1]; size_t coff, len; int cnt, eval, rval, wrapped; CHAR_T *l; if (search_init(sp, FORWARD, ptrn, plen, eptrn, flags)) return (1); /* Figure out if we're going to wrap. */ if (!LF_ISSET(SEARCH_NOOPT) && O_ISSET(sp, O_WRAPSCAN)) LF_SET(SEARCH_WRAP); if (LF_ISSET(SEARCH_FIRST)) { lno = 1; coff = 0; } else { if (db_get(sp, fm->lno, DBG_FATAL, &l, &len)) return (1); lno = fm->lno; /* * If doing incremental search, start searching at the previous * column, so that we search a minimal distance and still match * special patterns, e.g., \< for beginning of a word. * * Otherwise, start searching immediately after the cursor. If * at the end of the line, start searching on the next line. * This is incompatible (read bug fix) with the historic vi -- * searches for the '$' pattern never moved forward, and the * "-t foo" didn't work if the 'f' was the first character in * the file. */ if (LF_ISSET(SEARCH_INCR)) { if ((coff = fm->cno) != 0) --coff; } else if (fm->cno + 1 >= len) { coff = 0; lno = fm->lno + 1; if (db_get(sp, lno, 0, &l, &len)) { if (!LF_ISSET(SEARCH_WRAP)) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_EOF); return (1); } lno = 1; } } else coff = fm->cno + 1; } btype = BUSY_ON; for (cnt = INTERRUPT_CHECK, rval = 1, wrapped = 0;; ++lno, coff = 0) { if (cnt-- == 0) { if (INTERRUPTED(sp)) break; if (LF_ISSET(SEARCH_MSG)) { search_busy(sp, btype); btype = BUSY_UPDATE; } cnt = INTERRUPT_CHECK; } if (wrapped && lno > fm->lno || db_get(sp, lno, 0, &l, &len)) { if (wrapped) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_NOTFOUND); break; } if (!LF_ISSET(SEARCH_WRAP)) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_EOF); break; } lno = 0; wrapped = 1; continue; } /* If already at EOL, just keep going. */ if (len != 0 && coff == len) continue; /* Set the termination. */ match[0].rm_so = coff; match[0].rm_eo = len; #if defined(DEBUG) && 0 vtrace(sp, "F search: %lu from %u to %u\n", lno, coff, len != 0 ? len - 1 : len); #endif /* Search the line. */ eval = regexec(&sp->re_c, l, 1, match, (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); if (eval == REG_NOMATCH) continue; if (eval != 0) { if (LF_ISSET(SEARCH_MSG)) re_error(sp, eval, &sp->re_c); else (void)sp->gp->scr_bell(sp); break; } /* Warn if the search wrapped. */ if (wrapped && LF_ISSET(SEARCH_WMSG)) search_msg(sp, S_WRAP); #if defined(DEBUG) && 0 vtrace(sp, "F search: %qu to %qu\n", match[0].rm_so, match[0].rm_eo); #endif rm->lno = lno; rm->cno = match[0].rm_so; /* * If a change command, it's possible to move beyond the end * of a line. Historic vi generally got this wrong (e.g. try * "c?$"). Not all that sure this gets it right, there * are lots of strange cases. */ if (!LF_ISSET(SEARCH_EOL) && rm->cno >= len) rm->cno = len != 0 ? len - 1 : 0; rval = 0; break; } if (LF_ISSET(SEARCH_MSG)) search_busy(sp, BUSY_OFF); return (rval); } /* * b_search -- * Do a backward search. * * PUBLIC: int b_search __P((SCR *, * PUBLIC: MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int)); */ int b_search(SCR *sp, MARK *fm, MARK *rm, CHAR_T *ptrn, size_t plen, CHAR_T **eptrn, u_int flags) { busy_t btype; db_recno_t lno; regmatch_t match[1]; size_t coff, last, len; int cnt, eval, rval, wrapped; CHAR_T *l; if (search_init(sp, BACKWARD, ptrn, plen, eptrn, flags)) return (1); /* Figure out if we're going to wrap. */ if (!LF_ISSET(SEARCH_NOOPT) && O_ISSET(sp, O_WRAPSCAN)) LF_SET(SEARCH_WRAP); /* * If doing incremental search, set the "starting" position past the * current column, so that we search a minimal distance and still * match special patterns, e.g., \> for the end of a word. This is * safe when the cursor is at the end of a line because we only use * it for comparison with the location of the match. * * Otherwise, start searching immediately before the cursor. If in * the first column, start search on the previous line. */ if (LF_ISSET(SEARCH_INCR)) { lno = fm->lno; coff = fm->cno + 1; } else { if (fm->cno == 0) { if (fm->lno == 1 && !LF_ISSET(SEARCH_WRAP)) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_SOF); return (1); } lno = fm->lno - 1; } else lno = fm->lno; coff = fm->cno; } btype = BUSY_ON; for (cnt = INTERRUPT_CHECK, rval = 1, wrapped = 0;; --lno, coff = 0) { if (cnt-- == 0) { if (INTERRUPTED(sp)) break; if (LF_ISSET(SEARCH_MSG)) { search_busy(sp, btype); btype = BUSY_UPDATE; } cnt = INTERRUPT_CHECK; } if (wrapped && lno < fm->lno || lno == 0) { if (wrapped) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_NOTFOUND); break; } if (!LF_ISSET(SEARCH_WRAP)) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_SOF); break; } if (db_last(sp, &lno)) break; if (lno == 0) { if (LF_ISSET(SEARCH_MSG)) search_msg(sp, S_EMPTY); break; } ++lno; wrapped = 1; continue; } if (db_get(sp, lno, 0, &l, &len)) break; /* Set the termination. */ match[0].rm_so = 0; match[0].rm_eo = len; #if defined(DEBUG) && 0 vtrace(sp, "B search: %lu from 0 to %qu\n", lno, match[0].rm_eo); #endif /* Search the line. */ eval = regexec(&sp->re_c, l, 1, match, (match[0].rm_eo == len ? 0 : REG_NOTEOL) | REG_STARTEND); if (eval == REG_NOMATCH) continue; if (eval != 0) { if (LF_ISSET(SEARCH_MSG)) re_error(sp, eval, &sp->re_c); else (void)sp->gp->scr_bell(sp); break; } /* Check for a match starting past the cursor. */ if (coff != 0 && match[0].rm_so >= coff) continue; /* Warn if the search wrapped. */ if (wrapped && LF_ISSET(SEARCH_WMSG)) search_msg(sp, S_WRAP); #if defined(DEBUG) && 0 vtrace(sp, "B found: %qu to %qu\n", match[0].rm_so, match[0].rm_eo); #endif /* * We now have the first match on the line. Step through the * line character by character until find the last acceptable * match. This is painful, we need a better interface to regex * to make this work. */ for (;;) { last = match[0].rm_so++; if (match[0].rm_so >= len) break; match[0].rm_eo = len; eval = regexec(&sp->re_c, l, 1, match, (match[0].rm_so == 0 ? 0 : REG_NOTBOL) | REG_STARTEND); if (eval == REG_NOMATCH) break; if (eval != 0) { if (LF_ISSET(SEARCH_MSG)) re_error(sp, eval, &sp->re_c); else (void)sp->gp->scr_bell(sp); goto err; } if (coff && match[0].rm_so >= coff) break; } rm->lno = lno; /* See comment in f_search(). */ if (!LF_ISSET(SEARCH_EOL) && last >= len) rm->cno = len != 0 ? len - 1 : 0; else rm->cno = last; rval = 0; break; } err: if (LF_ISSET(SEARCH_MSG)) search_busy(sp, BUSY_OFF); return (rval); } /* * search_msg -- * Display one of the search messages. */ static void search_msg(SCR *sp, smsg_t msg) { switch (msg) { case S_EMPTY: msgq(sp, M_ERR, "072|File empty; nothing to search"); break; case S_EOF: msgq(sp, M_ERR, "073|Reached end-of-file without finding the pattern"); break; case S_NOPREV: msgq(sp, M_ERR, "074|No previous search pattern"); break; case S_NOTFOUND: msgq(sp, M_ERR, "075|Pattern not found"); break; case S_SOF: msgq(sp, M_ERR, "076|Reached top-of-file without finding the pattern"); break; case S_WRAP: msgq(sp, M_ERR, "077|Search wrapped"); break; default: abort(); } } /* * search_busy -- * Put up the busy searching message. * * PUBLIC: void search_busy __P((SCR *, busy_t)); */ void search_busy(SCR *sp, busy_t btype) { sp->gp->scr_busy(sp, "078|Searching...", btype); } nvi-1.81.6/common/seq.c0100644000076400001440000002006610720065506013702 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: seq.c,v 10.15 2001/06/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:12 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "common.h" /* * seq_set -- * Internal version to enter a sequence. * * PUBLIC: int seq_set __P((SCR *, CHAR_T *, * PUBLIC: size_t, CHAR_T *, size_t, CHAR_T *, size_t, seq_t, int)); */ int seq_set(SCR *sp, CHAR_T *name, size_t nlen, CHAR_T *input, size_t ilen, CHAR_T *output, size_t olen, seq_t stype, int flags) { CHAR_T *p; SEQ *lastqp, *qp; int sv_errno; /* * An input string must always be present. The output string * can be NULL, when set internally, that's how we throw away * input. * * Just replace the output field if the string already set. */ if ((qp = seq_find(sp, &lastqp, NULL, input, ilen, stype, NULL)) != NULL) { if (LF_ISSET(SEQ_NOOVERWRITE)) return (0); if (output == NULL || olen == 0) { p = NULL; olen = 0; } else if ((p = v_wstrdup(sp, output, olen)) == NULL) { sv_errno = errno; goto mem1; } if (qp->output != NULL) free(qp->output); qp->olen = olen; qp->output = p; return (0); } /* Allocate and initialize SEQ structure. */ CALLOC(sp, qp, SEQ *, 1, sizeof(SEQ)); if (qp == NULL) { sv_errno = errno; goto mem1; } /* Name. */ if (name == NULL || nlen == 0) qp->name = NULL; else if ((qp->name = v_wstrdup(sp, name, nlen)) == NULL) { sv_errno = errno; goto mem2; } qp->nlen = nlen; /* Input. */ if ((qp->input = v_wstrdup(sp, input, ilen)) == NULL) { sv_errno = errno; goto mem3; } qp->ilen = ilen; /* Output. */ if (output == NULL) { qp->output = NULL; olen = 0; } else if ((qp->output = v_wstrdup(sp, output, olen)) == NULL) { sv_errno = errno; free(qp->input); mem3: if (qp->name != NULL) free(qp->name); mem2: free(qp); mem1: errno = sv_errno; msgq(sp, M_SYSERR, NULL); return (1); } qp->olen = olen; /* Type, flags. */ qp->stype = stype; qp->flags = flags; /* Link into the chain. */ if (lastqp == NULL) { LIST_INSERT_HEAD(&sp->gp->seqq, qp, q); } else { LIST_INSERT_AFTER(lastqp, qp, q); } /* Set the fast lookup bit. */ if ((UCHAR_T)qp->input[0] < MAX_BIT_SEQ) bit_set(sp->gp->seqb, qp->input[0]); return (0); } /* * seq_delete -- * Delete a sequence. * * PUBLIC: int seq_delete __P((SCR *, CHAR_T *, size_t, seq_t)); */ int seq_delete(SCR *sp, CHAR_T *input, size_t ilen, seq_t stype) { SEQ *qp; if ((qp = seq_find(sp, NULL, NULL, input, ilen, stype, NULL)) == NULL) return (1); return (seq_mdel(qp)); } /* * seq_mdel -- * Delete a map entry, without lookup. * * PUBLIC: int seq_mdel __P((SEQ *)); */ int seq_mdel(SEQ *qp) { LIST_REMOVE(qp, q); if (qp->name != NULL) free(qp->name); free(qp->input); if (qp->output != NULL) free(qp->output); free(qp); return (0); } /* * seq_find -- * Search the sequence list for a match to a buffer, if ispartial * isn't NULL, partial matches count. * * PUBLIC: SEQ *seq_find * PUBLIC: __P((SCR *, SEQ **, EVENT *, CHAR_T *, size_t, seq_t, int *)); */ SEQ * seq_find(SCR *sp, SEQ **lastqp, EVENT *e_input, CHAR_T *c_input, size_t ilen, seq_t stype, int *ispartialp) { SEQ *lqp, *qp; int diff; /* * Ispartialp is a location where we return if there was a * partial match, i.e. if the string were extended it might * match something. * * XXX * Overload the meaning of ispartialp; only the terminal key * search doesn't want the search limited to complete matches, * i.e. ilen may be longer than the match. */ if (ispartialp != NULL) *ispartialp = 0; for (lqp = NULL, qp = sp->gp->seqq.lh_first; qp != NULL; lqp = qp, qp = qp->q.le_next) { /* * Fast checks on the first character and type, and then * a real comparison. */ if (e_input == NULL) { if (qp->input[0] > c_input[0]) break; if (qp->input[0] < c_input[0] || qp->stype != stype || F_ISSET(qp, SEQ_FUNCMAP)) continue; diff = MEMCMP(qp->input, c_input, MIN(qp->ilen, ilen)); } else { if (qp->input[0] > e_input->e_c) break; if (qp->input[0] < e_input->e_c || qp->stype != stype || F_ISSET(qp, SEQ_FUNCMAP)) continue; diff = e_memcmp(qp->input, e_input, MIN(qp->ilen, ilen)); } if (diff > 0) break; if (diff < 0) continue; /* * If the entry is the same length as the string, return a * match. If the entry is shorter than the string, return a * match if called from the terminal key routine. Otherwise, * keep searching for a complete match. */ if (qp->ilen <= ilen) { if (qp->ilen == ilen || ispartialp != NULL) { if (lastqp != NULL) *lastqp = lqp; return (qp); } continue; } /* * If the entry longer than the string, return partial match * if called from the terminal key routine. Otherwise, no * match. */ if (ispartialp != NULL) *ispartialp = 1; break; } if (lastqp != NULL) *lastqp = lqp; return (NULL); } /* * seq_close -- * Discard all sequences. * * PUBLIC: void seq_close __P((GS *)); */ void seq_close(GS *gp) { SEQ *qp; while ((qp = gp->seqq.lh_first) != NULL) { if (qp->name != NULL) free(qp->name); if (qp->input != NULL) free(qp->input); if (qp->output != NULL) free(qp->output); LIST_REMOVE(qp, q); free(qp); } } /* * seq_dump -- * Display the sequence entries of a specified type. * * PUBLIC: int seq_dump __P((SCR *, seq_t, int)); */ int seq_dump(SCR *sp, seq_t stype, int isname) { CHAR_T *p; GS *gp; SEQ *qp; int cnt, len, olen; cnt = 0; gp = sp->gp; for (qp = gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) { if (stype != qp->stype || F_ISSET(qp, SEQ_FUNCMAP)) continue; ++cnt; for (p = qp->input, olen = qp->ilen, len = 0; olen > 0; --olen, ++p) len += ex_puts(sp, KEY_NAME(sp, *p)); for (len = STANDARD_TAB - len % STANDARD_TAB; len > 0;) len -= ex_puts(sp, " "); if (qp->output != NULL) for (p = qp->output, olen = qp->olen, len = 0; olen > 0; --olen, ++p) len += ex_puts(sp, KEY_NAME(sp, *p)); else len = 0; if (isname && qp->name != NULL) { for (len = STANDARD_TAB - len % STANDARD_TAB; len > 0;) len -= ex_puts(sp, " "); for (p = qp->name, olen = qp->nlen; olen > 0; --olen, ++p) (void)ex_puts(sp, KEY_NAME(sp, *p)); } (void)ex_puts(sp, "\n"); } return (cnt); } /* * seq_save -- * Save the sequence entries to a file. * * PUBLIC: int seq_save __P((SCR *, FILE *, char *, seq_t)); */ int seq_save(SCR *sp, FILE *fp, char *prefix, seq_t stype) { CHAR_T *p; SEQ *qp; size_t olen; int ch; /* Write a sequence command for all keys the user defined. */ for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) { if (stype != qp->stype || !F_ISSET(qp, SEQ_USERDEF)) continue; if (prefix) (void)fprintf(fp, "%s", prefix); for (p = qp->input, olen = qp->ilen; olen > 0; --olen) { ch = *p++; if (ch == CH_LITERAL || ch == '|' || isblank(ch) || KEY_VAL(sp, ch) == K_NL) (void)putc(CH_LITERAL, fp); (void)putc(ch, fp); } (void)putc(' ', fp); if (qp->output != NULL) for (p = qp->output, olen = qp->olen; olen > 0; --olen) { ch = *p++; if (ch == CH_LITERAL || ch == '|' || KEY_VAL(sp, ch) == K_NL) (void)putc(CH_LITERAL, fp); (void)putc(ch, fp); } (void)putc('\n', fp); } return (0); } /* * e_memcmp -- * Compare a string of EVENT's to a string of CHAR_T's. * * PUBLIC: int e_memcmp __P((CHAR_T *, EVENT *, size_t)); */ int e_memcmp(CHAR_T *p1, EVENT *ep, size_t n) { if (n != 0) { do { if (*p1++ != ep->e_c) return (*--p1 - ep->e_c); ++ep; } while (--n != 0); } return (0); } nvi-1.81.6/common/seq.h0100644000076400001440000000317710720065506013713 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: seq.h,v 10.3 1996/03/06 19:51:03 bostic Exp $ (Berkeley) $Date: 1996/03/06 19:51:03 $ */ /* * Map and abbreviation structures. * * The map structure is doubly linked list, sorted by input string and by * input length within the string. (The latter is necessary so that short * matches will happen before long matches when the list is searched.) * Additionally, there is a bitmap which has bits set if there are entries * starting with the corresponding character. This keeps us from walking * the list unless it's necessary. * * The name and the output fields of a SEQ can be empty, i.e. NULL. * Only the input field is required. * * XXX * The fast-lookup bits are never turned off -- users don't usually unmap * things, though, so it's probably not a big deal. */ struct _seq { LIST_ENTRY(_seq) q; /* Linked list of all sequences. */ seq_t stype; /* Sequence type. */ CHAR_T *name; /* Sequence name (if any). */ size_t nlen; /* Name length. */ CHAR_T *input; /* Sequence input keys. */ size_t ilen; /* Input keys length. */ CHAR_T *output; /* Sequence output keys. */ size_t olen; /* Output keys length. */ #define SEQ_FUNCMAP 0x01 /* If unresolved function key.*/ #define SEQ_NOOVERWRITE 0x02 /* Don't replace existing entry. */ #define SEQ_SCREEN 0x04 /* If screen specific. */ #define SEQ_USERDEF 0x08 /* If user defined. */ u_int8_t flags; }; nvi-1.81.6/common/trace.c0100644000076400001440000000257510720065506014215 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: trace.c,v 8.4 1997/08/03 15:04:23 bostic Exp $ (Berkeley) $Date: 1997/08/03 15:04:23 $"; #endif /* not lint */ #include #include #include #ifdef __STDC__ #include #else #include #endif #include "common.h" #ifdef TRACE static FILE *tfp; /* * vtrace_end -- * End tracing. * * PUBLIC: void vtrace_end __P((void)); */ void vtrace_end() { if (tfp != NULL && tfp != stderr) (void)fclose(tfp); } /* * vtrace_init -- * Initialize tracing. * * PUBLIC: void vtrace_init __P((char *)); */ void vtrace_init(name) char *name; { if (name == NULL || (tfp = fopen(name, "w")) == NULL) tfp = stderr; vtrace("\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nTRACE\n"); } /* * vtrace -- * Debugging trace routine. * * PUBLIC: void vtrace __P((const char *, ...)); */ void #ifdef __STDC__ vtrace(const char *fmt, ...) #else vtrace(fmt, va_alist) char *fmt; va_dcl #endif { va_list ap; if (tfp == NULL) vtrace_init(NULL); #ifdef __STDC__ va_start(ap, fmt); #else va_start(ap); #endif (void)vfprintf(tfp, fmt, ap); va_end(ap); (void)fflush(tfp); } #endif nvi-1.81.6/common/util.c0100644000076400001440000000771510720065506014075 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: util.c,v 10.22 2001/06/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:12 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "common.h" /* * binc -- * Increase the size of a buffer. * * PUBLIC: void *binc __P((SCR *, void *, size_t *, size_t)); */ void * binc(SCR *sp, void *bp, size_t *bsizep, size_t min) /* sp MAY BE NULL!!! */ { size_t csize; /* If already larger than the minimum, just return. */ if (min && *bsizep >= min) return (bp); csize = *bsizep + MAX(min, 256); REALLOC(sp, bp, void *, csize); if (bp == NULL) { /* * Theoretically, realloc is supposed to leave any already * held memory alone if it can't get more. Don't trust it. */ *bsizep = 0; return (NULL); } /* * Memory is guaranteed to be zero-filled, various parts of * nvi depend on this. */ memset((char *)bp + *bsizep, 0, csize - *bsizep); *bsizep = csize; return (bp); } /* * nonblank -- * Set the column number of the first non-blank character * including or after the starting column. On error, set * the column to 0, it's safest. * * PUBLIC: int nonblank __P((SCR *, db_recno_t, size_t *)); */ int nonblank(SCR *sp, db_recno_t lno, size_t *cnop) { CHAR_T *p; size_t cnt, len, off; int isempty; /* Default. */ off = *cnop; *cnop = 0; /* Get the line, succeeding in an empty file. */ if (db_eget(sp, lno, &p, &len, &isempty)) return (!isempty); /* Set the offset. */ if (len == 0 || off >= len) return (0); for (cnt = off, p = &p[off], len -= off; len && isblank(*p); ++cnt, ++p, --len); /* Set the return. */ *cnop = len ? cnt : cnt - 1; return (0); } /* * tail -- * Return tail of a path. * * PUBLIC: char *tail __P((char *)); */ char * tail(char *path) { char *p; if ((p = strrchr(path, '/')) == NULL) return (path); return (p + 1); } /* * v_strdup -- * Strdup for wide character strings with an associated length. * * PUBLIC: char *v_strdup __P((SCR *, const char *, size_t)); */ char * v_strdup(SCR *sp, const char *str, size_t len) { char *copy; MALLOC(sp, copy, char *, (len + 1)); if (copy == NULL) return (NULL); memcpy(copy, str, len); copy[len] = '\0'; return (copy); } /* * v_strdup -- * Strdup for wide character strings with an associated length. * * PUBLIC: CHAR_T *v_wstrdup __P((SCR *, const CHAR_T *, size_t)); */ CHAR_T * v_wstrdup(SCR *sp, const CHAR_T *str, size_t len) { CHAR_T *copy; MALLOC(sp, copy, CHAR_T *, (len + 1) * sizeof(CHAR_T)); if (copy == NULL) return (NULL); MEMCPYW(copy, str, len); copy[len] = '\0'; return (copy); } /* * nget_uslong -- * Get an unsigned long, checking for overflow. * * PUBLIC: enum nresult nget_uslong __P((SCR *, u_long *, const CHAR_T *, CHAR_T **, int)); */ enum nresult nget_uslong(SCR *sp, u_long *valp, const CHAR_T *p, CHAR_T **endp, int base) { errno = 0; *valp = STRTOUL(p, endp, base); if (errno == 0) return (NUM_OK); if (errno == ERANGE && *valp == ULONG_MAX) return (NUM_OVER); return (NUM_ERR); } /* * nget_slong -- * Convert a signed long, checking for overflow and underflow. * * PUBLIC: enum nresult nget_slong __P((SCR *, long *, const CHAR_T *, CHAR_T **, int)); */ enum nresult nget_slong(SCR *sp, long int *valp, const CHAR_T *p, CHAR_T **endp, int base) { errno = 0; *valp = STRTOL(p, endp, base); if (errno == 0) return (NUM_OK); if (errno == ERANGE) { if (*valp == LONG_MAX) return (NUM_OVER); if (*valp == LONG_MIN) return (NUM_UNDER); } return (NUM_ERR); } nvi-1.81.6/common/util.h0100644000076400001440000000371010720065506014071 0ustar skimousers/*- * Copyright (c) 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: util.h,v 10.5 1996/03/16 14:42:47 bostic Exp $ (Berkeley) $Date: 1996/03/16 14:42:47 $ */ /* Macros to init/set/clear/test flags. */ #define FL_INIT(l, f) (l) = (f) /* Specific flags location. */ #define FL_SET(l, f) ((l) |= (f)) #define FL_CLR(l, f) ((l) &= ~(f)) #define FL_ISSET(l, f) ((l) & (f)) #define LF_INIT(f) FL_INIT(flags, f) /* Local variable flags. */ #define LF_SET(f) FL_SET(flags, f) #define LF_CLR(f) FL_CLR(flags, f) #define LF_ISSET(f) FL_ISSET(flags, f) #define F_INIT(p, f) FL_INIT((p)->flags, f) /* Structure element flags. */ #define F_SET(p, f) FL_SET((p)->flags, f) #define F_CLR(p, f) FL_CLR((p)->flags, f) #define F_ISSET(p, f) FL_ISSET((p)->flags, f) /* Offset to next column of stop size, e.g. tab offsets. */ #define COL_OFF(c, stop) ((stop) - ((c) % (stop))) /* Busy message types. */ typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t; /* * Number handling defines and protoypes. * * NNFITS: test for addition of two negative numbers under a limit * NPFITS: test for addition of two positive numbers under a limit * NADD_SLONG: test for addition of two signed longs * NADD_USLONG: test for addition of two unsigned longs */ enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER }; #define NNFITS(min, cur, add) \ (((long)(min)) - (cur) <= (add)) #define NPFITS(max, cur, add) \ (((unsigned long)(max)) - (cur) >= (add)) #define NADD_SLONG(sp, v1, v2) \ ((v1) < 0 ? \ ((v2) < 0 && \ NNFITS(LONG_MIN, (v1), (v2))) ? NUM_UNDER : NUM_OK : \ (v1) > 0 ? \ (v2) > 0 && \ NPFITS(LONG_MAX, (v1), (v2)) ? NUM_OK : NUM_OVER : \ NUM_OK) #define NADD_USLONG(sp, v1, v2) \ (NPFITS(ULONG_MAX, (v1), (v2)) ? NUM_OK : NUM_OVER) nvi-1.81.6/common/util2.c0100644000076400001440000000124710720065506014151 0ustar skimousers#include "config.h" #include #include #include #include #include #include #include #include #include #include #include "multibyte.h" int ucs2utf8(const CHAR_T *src, size_t len, char *dst) { int i, j; for (i = 0, j = 0; i < len; ++i) { if (src[i] < 0x80) dst[j++] = src[i]; else if (src[i] < 0x800) { dst[j++] = (src[i] >> 6) | 0xc0; dst[j++] = (src[i] & 0x3f) | 0x80; } else { dst[j++] = (src[i] >> 12) | 0xe0; dst[j++] = ((src[i] >> 6) & 0x3f) | 0x80; dst[j++] = (src[i] & 0x3f) | 0x80; } } return j; } nvi-1.81.6/common/vi.src0100644000076400001440000000131310720065506014067 0ustar skimousersPREFIX vi INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include INCLUDE #include "common.h" INCLUDE #include INCLUDE #include "db_page.h" INCLUDE #include "db_am.h" INCLUDE #include "rep.h" INCLUDE #include "txn.h" BEGIN marker 200 ARG opcode u_int32_t lu END BEGIN cursor 201 ARG opcode u_int32_t lu ARG lno db_recno_t lu ARG cno size_t d END BEGIN mark 202 POINTER lmp LMARK * % END BEGIN change 203 ARG opcode u_int32_t lu ARG lno db_recno_t lu END nvi-1.81.6/common/vi_auto.c0100644000076400001440000004440410720065506014562 0ustar skimousers/* Do not edit: automatically built by gen_rec.awk. */ #include #include #include #include #include #include #include #include #include #include #include "common.h" #include #include "db_page.h" #include "db_am.h" #include "rep.h" #include "txn.h" /* * PUBLIC: #ifdef USE_DB4_LOGGING */ /* * PUBLIC: int __vi_marker_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, * PUBLIC: u_int32_t)); */ int __vi_marker_log(dbenv, txnid, ret_lsnp, flags, opcode) DB_ENV *dbenv; DB_TXN *txnid; DB_LSN *ret_lsnp; u_int32_t flags; u_int32_t opcode; { DBT logrec; DB_LSN *lsnp, null_lsn; u_int32_t uinttmp; u_int32_t rectype, txn_num; int ret; u_int8_t *bp; rectype = DB_vi_marker; if (txnid != NULL && TAILQ_FIRST(&txnid->kids) != NULL && (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) return (ret); txn_num = txnid == NULL ? 0 : txnid->txnid; if (txnid == NULL) { ZERO_LSN(null_lsn); lsnp = &null_lsn; } else lsnp = &txnid->last_lsn; logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) + sizeof(u_int32_t); if ((ret = __os_malloc(dbenv, logrec.size, &logrec.data)) != 0) return (ret); bp = logrec.data; memcpy(bp, &rectype, sizeof(rectype)); bp += sizeof(rectype); memcpy(bp, &txn_num, sizeof(txn_num)); bp += sizeof(txn_num); memcpy(bp, lsnp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); uinttmp = (u_int32_t)opcode; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) == logrec.size); ret = dbenv->log_put(dbenv, ret_lsnp, (DBT *)&logrec, flags); if (txnid != NULL && ret == 0) txnid->last_lsn = *ret_lsnp; #ifdef LOG_DIAGNOSTIC if (ret != 0) (void)__vi_marker_print(dbenv, (DBT *)&logrec, ret_lsnp, NULL, NULL); #endif __os_free(dbenv, logrec.data, logrec.size); return (ret); } /* * PUBLIC: int __vi_marker_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_marker_getpgnos(dbenv, rec, lsnp, notused1, summary) DB_ENV *dbenv; DBT *rec; DB_LSN *lsnp; db_recops notused1; void *summary; { TXN_RECS *t; int ret; COMPQUIET(rec, NULL); COMPQUIET(notused1, DB_TXN_ABORT); t = (TXN_RECS *)summary; if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) return (ret); t->array[t->npages].flags = LSN_PAGE_NOLOCK; t->array[t->npages].lsn = *lsnp; t->array[t->npages].fid = DB_LOGFILEID_INVALID; memset(&t->array[t->npages].pgdesc, 0, sizeof(t->array[t->npages].pgdesc)); t->npages++; return (0); } /* * PUBLIC: int __vi_marker_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_marker_print(dbenv, dbtp, lsnp, notused2, notused3) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops notused2; void *notused3; { __vi_marker_args *argp; int ret; notused2 = DB_TXN_ABORT; notused3 = NULL; if ((ret = __vi_marker_read(dbenv, dbtp->data, &argp)) != 0) return (ret); (void)printf( "[%lu][%lu]vi_marker: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)argp->type, (u_long)argp->txnid->txnid, (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); (void)printf("\topcode: %lu\n", (u_long)argp->opcode); (void)printf("\n"); __os_free(dbenv, argp, 0); return (0); } /* * PUBLIC: int __vi_marker_read __P((DB_ENV *, void *, __vi_marker_args **)); */ int __vi_marker_read(dbenv, recbuf, argpp) DB_ENV *dbenv; void *recbuf; __vi_marker_args **argpp; { __vi_marker_args *argp; int ret; u_int32_t uinttmp; u_int8_t *bp; ret = __os_malloc(dbenv, sizeof(__vi_marker_args) + sizeof(DB_TXN), &argp); if (ret != 0) return (ret); argp->txnid = (DB_TXN *)&argp[1]; bp = recbuf; memcpy(&argp->type, bp, sizeof(argp->type)); bp += sizeof(argp->type); memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); bp += sizeof(argp->txnid->txnid); memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->opcode = (u_int32_t)uinttmp; bp += sizeof(uinttmp); *argpp = argp; return (0); } /* * PUBLIC: int __vi_cursor_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, * PUBLIC: u_int32_t, db_recno_t, size_t)); */ int __vi_cursor_log(dbenv, txnid, ret_lsnp, flags, opcode, lno, cno) DB_ENV *dbenv; DB_TXN *txnid; DB_LSN *ret_lsnp; u_int32_t flags; u_int32_t opcode; db_recno_t lno; size_t cno; { DBT logrec; DB_LSN *lsnp, null_lsn; u_int32_t uinttmp; u_int32_t rectype, txn_num; int ret; u_int8_t *bp; rectype = DB_vi_cursor; if (txnid != NULL && TAILQ_FIRST(&txnid->kids) != NULL && (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) return (ret); txn_num = txnid == NULL ? 0 : txnid->txnid; if (txnid == NULL) { ZERO_LSN(null_lsn); lsnp = &null_lsn; } else lsnp = &txnid->last_lsn; logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) + sizeof(u_int32_t) + sizeof(u_int32_t) + sizeof(u_int32_t); if ((ret = __os_malloc(dbenv, logrec.size, &logrec.data)) != 0) return (ret); bp = logrec.data; memcpy(bp, &rectype, sizeof(rectype)); bp += sizeof(rectype); memcpy(bp, &txn_num, sizeof(txn_num)); bp += sizeof(txn_num); memcpy(bp, lsnp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); uinttmp = (u_int32_t)opcode; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); uinttmp = (u_int32_t)lno; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); uinttmp = (u_int32_t)cno; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) == logrec.size); ret = dbenv->log_put(dbenv, ret_lsnp, (DBT *)&logrec, flags); if (txnid != NULL && ret == 0) txnid->last_lsn = *ret_lsnp; #ifdef LOG_DIAGNOSTIC if (ret != 0) (void)__vi_cursor_print(dbenv, (DBT *)&logrec, ret_lsnp, NULL, NULL); #endif __os_free(dbenv, logrec.data, logrec.size); return (ret); } /* * PUBLIC: int __vi_cursor_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_cursor_getpgnos(dbenv, rec, lsnp, notused1, summary) DB_ENV *dbenv; DBT *rec; DB_LSN *lsnp; db_recops notused1; void *summary; { TXN_RECS *t; int ret; COMPQUIET(rec, NULL); COMPQUIET(notused1, DB_TXN_ABORT); t = (TXN_RECS *)summary; if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) return (ret); t->array[t->npages].flags = LSN_PAGE_NOLOCK; t->array[t->npages].lsn = *lsnp; t->array[t->npages].fid = DB_LOGFILEID_INVALID; memset(&t->array[t->npages].pgdesc, 0, sizeof(t->array[t->npages].pgdesc)); t->npages++; return (0); } /* * PUBLIC: int __vi_cursor_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_cursor_print(dbenv, dbtp, lsnp, notused2, notused3) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops notused2; void *notused3; { __vi_cursor_args *argp; int ret; notused2 = DB_TXN_ABORT; notused3 = NULL; if ((ret = __vi_cursor_read(dbenv, dbtp->data, &argp)) != 0) return (ret); (void)printf( "[%lu][%lu]vi_cursor: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)argp->type, (u_long)argp->txnid->txnid, (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); (void)printf("\topcode: %lu\n", (u_long)argp->opcode); (void)printf("\tlno: %lu\n", (u_long)argp->lno); (void)printf("\tcno: %d\n", argp->cno); (void)printf("\n"); __os_free(dbenv, argp, 0); return (0); } /* * PUBLIC: int __vi_cursor_read __P((DB_ENV *, void *, __vi_cursor_args **)); */ int __vi_cursor_read(dbenv, recbuf, argpp) DB_ENV *dbenv; void *recbuf; __vi_cursor_args **argpp; { __vi_cursor_args *argp; int ret; u_int32_t uinttmp; u_int8_t *bp; ret = __os_malloc(dbenv, sizeof(__vi_cursor_args) + sizeof(DB_TXN), &argp); if (ret != 0) return (ret); argp->txnid = (DB_TXN *)&argp[1]; bp = recbuf; memcpy(&argp->type, bp, sizeof(argp->type)); bp += sizeof(argp->type); memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); bp += sizeof(argp->txnid->txnid); memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->opcode = (u_int32_t)uinttmp; bp += sizeof(uinttmp); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->lno = (db_recno_t)uinttmp; bp += sizeof(uinttmp); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->cno = (size_t)uinttmp; bp += sizeof(uinttmp); *argpp = argp; return (0); } /* * PUBLIC: int __vi_mark_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, * PUBLIC: LMARK *)); */ int __vi_mark_log(dbenv, txnid, ret_lsnp, flags, lmp) DB_ENV *dbenv; DB_TXN *txnid; DB_LSN *ret_lsnp; u_int32_t flags; LMARK * lmp; { DBT logrec; DB_LSN *lsnp, null_lsn; u_int32_t rectype, txn_num; int ret; u_int8_t *bp; rectype = DB_vi_mark; if (txnid != NULL && TAILQ_FIRST(&txnid->kids) != NULL && (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) return (ret); txn_num = txnid == NULL ? 0 : txnid->txnid; if (txnid == NULL) { ZERO_LSN(null_lsn); lsnp = &null_lsn; } else lsnp = &txnid->last_lsn; logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) + sizeof(*lmp); if ((ret = __os_malloc(dbenv, logrec.size, &logrec.data)) != 0) return (ret); bp = logrec.data; memcpy(bp, &rectype, sizeof(rectype)); bp += sizeof(rectype); memcpy(bp, &txn_num, sizeof(txn_num)); bp += sizeof(txn_num); memcpy(bp, lsnp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); if (lmp != NULL) memcpy(bp, lmp, sizeof(*lmp)); else memset(bp, 0, sizeof(*lmp)); bp += sizeof(*lmp); DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) == logrec.size); ret = dbenv->log_put(dbenv, ret_lsnp, (DBT *)&logrec, flags); if (txnid != NULL && ret == 0) txnid->last_lsn = *ret_lsnp; #ifdef LOG_DIAGNOSTIC if (ret != 0) (void)__vi_mark_print(dbenv, (DBT *)&logrec, ret_lsnp, NULL, NULL); #endif __os_free(dbenv, logrec.data, logrec.size); return (ret); } /* * PUBLIC: int __vi_mark_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_mark_getpgnos(dbenv, rec, lsnp, notused1, summary) DB_ENV *dbenv; DBT *rec; DB_LSN *lsnp; db_recops notused1; void *summary; { TXN_RECS *t; int ret; COMPQUIET(rec, NULL); COMPQUIET(notused1, DB_TXN_ABORT); t = (TXN_RECS *)summary; if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) return (ret); t->array[t->npages].flags = LSN_PAGE_NOLOCK; t->array[t->npages].lsn = *lsnp; t->array[t->npages].fid = DB_LOGFILEID_INVALID; memset(&t->array[t->npages].pgdesc, 0, sizeof(t->array[t->npages].pgdesc)); t->npages++; return (0); } /* * PUBLIC: int __vi_mark_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_mark_print(dbenv, dbtp, lsnp, notused2, notused3) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops notused2; void *notused3; { __vi_mark_args *argp; int ret; notused2 = DB_TXN_ABORT; notused3 = NULL; if ((ret = __vi_mark_read(dbenv, dbtp->data, &argp)) != 0) return (ret); (void)printf( "[%lu][%lu]vi_mark: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)argp->type, (u_long)argp->txnid->txnid, (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); (void)printf("\tlmp: %%\n", argp->lmp); (void)printf("\n"); __os_free(dbenv, argp, 0); return (0); } /* * PUBLIC: int __vi_mark_read __P((DB_ENV *, void *, __vi_mark_args **)); */ int __vi_mark_read(dbenv, recbuf, argpp) DB_ENV *dbenv; void *recbuf; __vi_mark_args **argpp; { __vi_mark_args *argp; int ret; u_int8_t *bp; ret = __os_malloc(dbenv, sizeof(__vi_mark_args) + sizeof(DB_TXN), &argp); if (ret != 0) return (ret); argp->txnid = (DB_TXN *)&argp[1]; bp = recbuf; memcpy(&argp->type, bp, sizeof(argp->type)); bp += sizeof(argp->type); memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); bp += sizeof(argp->txnid->txnid); memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); memcpy(&argp->lmp, bp, sizeof(argp->lmp)); bp += sizeof(argp->lmp); *argpp = argp; return (0); } /* * PUBLIC: int __vi_change_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, * PUBLIC: u_int32_t, db_recno_t)); */ int __vi_change_log(dbenv, txnid, ret_lsnp, flags, opcode, lno) DB_ENV *dbenv; DB_TXN *txnid; DB_LSN *ret_lsnp; u_int32_t flags; u_int32_t opcode; db_recno_t lno; { DBT logrec; DB_LSN *lsnp, null_lsn; u_int32_t uinttmp; u_int32_t rectype, txn_num; int ret; u_int8_t *bp; rectype = DB_vi_change; if (txnid != NULL && TAILQ_FIRST(&txnid->kids) != NULL && (ret = __txn_activekids(dbenv, rectype, txnid)) != 0) return (ret); txn_num = txnid == NULL ? 0 : txnid->txnid; if (txnid == NULL) { ZERO_LSN(null_lsn); lsnp = &null_lsn; } else lsnp = &txnid->last_lsn; logrec.size = sizeof(rectype) + sizeof(txn_num) + sizeof(DB_LSN) + sizeof(u_int32_t) + sizeof(u_int32_t); if ((ret = __os_malloc(dbenv, logrec.size, &logrec.data)) != 0) return (ret); bp = logrec.data; memcpy(bp, &rectype, sizeof(rectype)); bp += sizeof(rectype); memcpy(bp, &txn_num, sizeof(txn_num)); bp += sizeof(txn_num); memcpy(bp, lsnp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); uinttmp = (u_int32_t)opcode; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); uinttmp = (u_int32_t)lno; memcpy(bp, &uinttmp, sizeof(uinttmp)); bp += sizeof(uinttmp); DB_ASSERT((u_int32_t)(bp - (u_int8_t *)logrec.data) == logrec.size); ret = dbenv->log_put(dbenv, ret_lsnp, (DBT *)&logrec, flags); if (txnid != NULL && ret == 0) txnid->last_lsn = *ret_lsnp; #ifdef LOG_DIAGNOSTIC if (ret != 0) (void)__vi_change_print(dbenv, (DBT *)&logrec, ret_lsnp, NULL, NULL); #endif __os_free(dbenv, logrec.data, logrec.size); return (ret); } /* * PUBLIC: int __vi_change_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_change_getpgnos(dbenv, rec, lsnp, notused1, summary) DB_ENV *dbenv; DBT *rec; DB_LSN *lsnp; db_recops notused1; void *summary; { TXN_RECS *t; int ret; COMPQUIET(rec, NULL); COMPQUIET(notused1, DB_TXN_ABORT); t = (TXN_RECS *)summary; if ((ret = __rep_check_alloc(dbenv, t, 1)) != 0) return (ret); t->array[t->npages].flags = LSN_PAGE_NOLOCK; t->array[t->npages].lsn = *lsnp; t->array[t->npages].fid = DB_LOGFILEID_INVALID; memset(&t->array[t->npages].pgdesc, 0, sizeof(t->array[t->npages].pgdesc)); t->npages++; return (0); } /* * PUBLIC: int __vi_change_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, * PUBLIC: void *)); */ int __vi_change_print(dbenv, dbtp, lsnp, notused2, notused3) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops notused2; void *notused3; { __vi_change_args *argp; int ret; notused2 = DB_TXN_ABORT; notused3 = NULL; if ((ret = __vi_change_read(dbenv, dbtp->data, &argp)) != 0) return (ret); (void)printf( "[%lu][%lu]vi_change: rec: %lu txnid %lx prevlsn [%lu][%lu]\n", (u_long)lsnp->file, (u_long)lsnp->offset, (u_long)argp->type, (u_long)argp->txnid->txnid, (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset); (void)printf("\topcode: %lu\n", (u_long)argp->opcode); (void)printf("\tlno: %lu\n", (u_long)argp->lno); (void)printf("\n"); __os_free(dbenv, argp, 0); return (0); } /* * PUBLIC: int __vi_change_read __P((DB_ENV *, void *, __vi_change_args **)); */ int __vi_change_read(dbenv, recbuf, argpp) DB_ENV *dbenv; void *recbuf; __vi_change_args **argpp; { __vi_change_args *argp; int ret; u_int32_t uinttmp; u_int8_t *bp; ret = __os_malloc(dbenv, sizeof(__vi_change_args) + sizeof(DB_TXN), &argp); if (ret != 0) return (ret); argp->txnid = (DB_TXN *)&argp[1]; bp = recbuf; memcpy(&argp->type, bp, sizeof(argp->type)); bp += sizeof(argp->type); memcpy(&argp->txnid->txnid, bp, sizeof(argp->txnid->txnid)); bp += sizeof(argp->txnid->txnid); memcpy(&argp->prev_lsn, bp, sizeof(DB_LSN)); bp += sizeof(DB_LSN); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->opcode = (u_int32_t)uinttmp; bp += sizeof(uinttmp); memcpy(&uinttmp, bp, sizeof(uinttmp)); argp->lno = (db_recno_t)uinttmp; bp += sizeof(uinttmp); *argpp = argp; return (0); } /* * PUBLIC: int __vi_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, * PUBLIC: DB_LSN *, db_recops, void *), size_t *)); */ int __vi_init_print(dbenv, dtabp, dtabsizep) DB_ENV *dbenv; int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); size_t *dtabsizep; { int ret; if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_marker_print, DB_vi_marker)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_cursor_print, DB_vi_cursor)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_mark_print, DB_vi_mark)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_change_print, DB_vi_change)) != 0) return (ret); return (0); } /* * PUBLIC: int __vi_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, * PUBLIC: DB_LSN *, db_recops, void *), size_t *)); */ int __vi_init_getpgnos(dbenv, dtabp, dtabsizep) DB_ENV *dbenv; int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); size_t *dtabsizep; { int ret; if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_marker_getpgnos, DB_vi_marker)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_cursor_getpgnos, DB_vi_cursor)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_mark_getpgnos, DB_vi_mark)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, dtabp, dtabsizep, __vi_change_getpgnos, DB_vi_change)) != 0) return (ret); return (0); } /* * PUBLIC: int __vi_init_recover __P((DB_ENV *)); */ int __vi_init_recover(dbenv) DB_ENV *dbenv; { int ret; if ((ret = __db_add_recovery(dbenv, &dbenv->dtab, &dbenv->dtab_size, __vi_marker_recover, DB_vi_marker)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, &dbenv->dtab, &dbenv->dtab_size, __vi_cursor_recover, DB_vi_cursor)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, &dbenv->dtab, &dbenv->dtab_size, __vi_mark_recover, DB_vi_mark)) != 0) return (ret); if ((ret = __db_add_recovery(dbenv, &dbenv->dtab, &dbenv->dtab_size, __vi_change_recover, DB_vi_change)) != 0) return (ret); return (0); } /* * PUBLIC: #endif */ nvi-1.81.6/common/vi_auto.h0100644000076400001440000000133110720065506014557 0ustar skimousers/* Do not edit: automatically built by gen_rec.awk. */ #ifndef vi_AUTO_H #define vi_AUTO_H #define DB_vi_marker 200 typedef struct _vi_marker_args { u_int32_t type; DB_TXN *txnid; DB_LSN prev_lsn; u_int32_t opcode; } __vi_marker_args; #define DB_vi_cursor 201 typedef struct _vi_cursor_args { u_int32_t type; DB_TXN *txnid; DB_LSN prev_lsn; u_int32_t opcode; db_recno_t lno; size_t cno; } __vi_cursor_args; #define DB_vi_mark 202 typedef struct _vi_mark_args { u_int32_t type; DB_TXN *txnid; DB_LSN prev_lsn; LMARK lmp; } __vi_mark_args; #define DB_vi_change 203 typedef struct _vi_change_args { u_int32_t type; DB_TXN *txnid; DB_LSN prev_lsn; u_int32_t opcode; db_recno_t lno; } __vi_change_args; #endif nvi-1.81.6/common/vi_rec.c0100644000076400001440000001416710720065506014366 0ustar skimousers#include "db_config.h" #ifndef NO_SYSTEM_INCLUDES #include #include #endif #include "common.h" #include "db_int.h" #include "db_page.h" #include #include "hash.h" #include "btree.h" #define LOG_CURSOR_HIT -1000 /* * PUBLIC: #ifdef USE_DB4_LOGGING */ /* * __vi_marker_recover -- * Recovery function for marker. * * PUBLIC: int __vi_marker_recover * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); */ int __vi_marker_recover(dbenv, dbtp, lsnp, op, info) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops op; void *info; { __vi_marker_args *argp; int ret; REC_PRINT(__vi_marker_print); REC_NOOP_INTRO(__vi_marker_read); *lsnp = argp->prev_lsn; ret = 0; REC_NOOP_CLOSE; } /* * __vi_cursor_recover -- * Recovery function for cursor. * * PUBLIC: int __vi_cursor_recover * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); */ int __vi_cursor_recover(dbenv, dbtp, lsnp, op, info) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops op; void *info; { __vi_cursor_args *argp; int ret; SCR *sp; REC_PRINT(__vi_cursor_print); REC_NOOP_INTRO(__vi_cursor_read); sp = (SCR *)dbenv->app_private; *lsnp = argp->prev_lsn; if (sp->state.undo == UNDO_SETLINE) { /* Why the check for ep->l_cur ? (copied from log.c) */ ret = (argp->lno != sp->lno || (argp->opcode == LOG_CURSOR_INIT && sp->ep->l_cur == 1)) ? LOG_CURSOR_HIT : 0; } else { ret = argp->opcode == (DB_UNDO(op) ? LOG_CURSOR_INIT : LOG_CURSOR_END) ? LOG_CURSOR_HIT : 0; if (ret) { sp->state.pos.lno = argp->lno; sp->state.pos.cno = argp->cno; } } REC_NOOP_CLOSE; } /* * __vi_mark_recover -- * Recovery function for mark. * * PUBLIC: int __vi_mark_recover * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); */ int __vi_mark_recover(dbenv, dbtp, lsnp, op, info) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops op; void *info; { __vi_mark_args *argp; int ret; MARK m; SCR *sp; REC_PRINT(__vi_mark_print); REC_NOOP_INTRO(__vi_mark_read); sp = (SCR *)dbenv->app_private; *lsnp = argp->prev_lsn; m.lno = argp->lmp.lno; m.cno = argp->lmp.cno; ret = mark_set(sp, argp->lmp.name, &m, 0); REC_NOOP_CLOSE; } /* * __vi_change_recover -- * Recovery function for change. * * PUBLIC: int __vi_change_recover * PUBLIC: __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); */ int __vi_change_recover(dbenv, dbtp, lsnp, op, info) DB_ENV *dbenv; DBT *dbtp; DB_LSN *lsnp; db_recops op; void *info; { __vi_change_args *argp; int ret; SCR *sp; REC_PRINT(__vi_change_print); REC_NOOP_INTRO(__vi_change_read); ret = 0; sp = (SCR *)dbenv->app_private; if (DB_UNDO(op) != (argp->opcode & 1)) switch (argp->opcode) { case LOG_LINE_RESET_B: case LOG_LINE_RESET_F: ret = line_insdel(sp, LINE_RESET, argp->lno); update_cache(sp, LINE_RESET, argp->lno); ret = scr_update(sp, argp->lno, LINE_RESET, 1) || ret; break; case LOG_LINE_APPEND_B: case LOG_LINE_DELETE_F: ret = line_insdel(sp, LINE_DELETE, argp->lno); update_cache(sp, LINE_DELETE, argp->lno); ret = scr_update(sp, argp->lno, LINE_DELETE, 1) || ret; break; case LOG_LINE_DELETE_B: case LOG_LINE_APPEND_F: ret = line_insdel(sp, LINE_INSERT, argp->lno); update_cache(sp, LINE_INSERT, argp->lno); ret = scr_update(sp, argp->lno, LINE_INSERT, 1) || ret; break; } *lsnp = argp->prev_lsn; REC_NOOP_CLOSE; } /* * * PUBLIC: int __vi_log_truncate __P((EXF *ep)); */ int __vi_log_truncate(EXF *ep) { DB_LSN ckplsn; ZERO_LSN(ckplsn); return __log_vtruncate(ep->env, &ep->lsn_cur, &ckplsn); /*return __log_vtruncate(ep->env, &ep->lsn_cur, &ep->lsn_first);*/ } /* * * PUBLIC: int __vi_log_dispatch __P((DB_ENV *dbenv, DBT *data, DB_LSN *lsn, db_recops ops)); */ int __vi_log_dispatch(DB_ENV *dbenv, DBT *data, DB_LSN *lsn, db_recops ops) { u_int32_t rectype; char s[100]; memcpy(&rectype, data->data, sizeof(rectype)); snprintf(s,100,"%d\n", rectype); return dbenv->dtab[rectype](dbenv, data, lsn, ops, NULL); } static int vi_log_get(SCR *sp, DB_LOGC *logc, DBT *data, u_int32_t which) { size_t nlen; EXF *ep; ep = sp->ep; nlen = 1024; retry: BINC_GOTO(sp, sp->wp->l_lp, sp->wp->l_len, nlen); memset(data, 0, sizeof(*data)); data->data = sp->wp->l_lp; data->ulen = sp->wp->l_len; data->flags = DB_DBT_USERMEM; switch ((sp->db_error = logc->get(logc, &ep->lsn_cur, data, which))) { case ENOMEM: nlen = data->size; goto retry; default: alloc_err: msgq(sp, M_DBERR, "logc->get"); F_SET(ep, F_NOLOG); return (1); case 0: ; } return 0; } /* * * PUBLIC: int __vi_log_traverse __P((SCR *sp, undo_t undo, MARK *)); */ int __vi_log_traverse(SCR *sp, undo_t undo, MARK *rp) { DB_LOGC *logc; DBT data; EXF *ep; int ret; DB_LSN lsn; u_int32_t which; db_recops ops; ep = sp->ep; F_SET(ep, F_NOLOG); /* Turn off logging. */ sp->state.undo = undo; ep->env->app_private = sp; if ((sp->db_error = ep->env->log_cursor(ep->env, &logc, 0)) != 0) { msgq(sp, M_DBERR, "env->log_cursor"); return (1); } if (vi_log_get(sp, logc, &data, DB_SET)) return 1; if (undo == UNDO_FORWARD) { ops = DB_TXN_FORWARD_ROLL; which = DB_NEXT; if (vi_log_get(sp, logc, &data, DB_NEXT)) return 1; } else { ops = DB_TXN_BACKWARD_ROLL; which = DB_PREV; } for (;;) { MEMCPY(&lsn, &ep->lsn_cur, 1); ret = __vi_log_dispatch(ep->env, &data, &lsn, ops); if (ret != 0) { if (ret == LOG_CURSOR_HIT) break; } if (vi_log_get(sp, logc, &data, which)) return 1; if (undo == UNDO_SETLINE && log_compare(&ep->lsn_cur, &ep->lsn_first) <= 0) { /* Move to previous record without dispatching. */ undo = UNDO_BACKWARD; break; } } if (undo == UNDO_BACKWARD) if (vi_log_get(sp, logc, &data, DB_PREV)) return 1; logc->close(logc, 0); ep->env->app_private = NULL; MEMMOVE(rp, &sp->state.pos, 1); F_CLR(ep, F_NOLOG); return 0; } int vi_db_init_recover(DB_ENV *dbenv) { int ret; if ((ret = __db_init_recover(dbenv)) != 0) return (ret); if ((ret = __bam_init_recover(dbenv)) != 0) return (ret); return 0; } /* * PUBLIC: #endif */ nvi-1.81.6/common/options_def.h0100444000076400001440000000340010720065712015416 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ #define O_ALTWERASE 0 #define O_AUTOINDENT 1 #define O_AUTOPRINT 2 #define O_AUTOWRITE 3 #define O_BACKUP 4 #define O_BEAUTIFY 5 #define O_CDPATH 6 #define O_CEDIT 7 #define O_COLUMNS 8 #define O_COMBINED 9 #define O_COMMENT 10 #define O_TMP_DIRECTORY 11 #define O_EDCOMPATIBLE 12 #define O_ESCAPETIME 13 #define O_ERRORBELLS 14 #define O_EXRC 15 #define O_EXTENDED 16 #define O_FILEC 17 #define O_FILEENCODING 18 #define O_FLASH 19 #define O_HARDTABS 20 #define O_ICLOWER 21 #define O_IGNORECASE 22 #define O_INPUTENCODING 23 #define O_KEYTIME 24 #define O_LEFTRIGHT 25 #define O_LINES 26 #define O_LISP 27 #define O_LIST 28 #define O_LOCKFILES 29 #define O_MAGIC 30 #define O_MATCHTIME 31 #define O_MESG 32 #define O_MODELINE 33 #define O_MSGCAT 34 #define O_NOPRINT 35 #define O_NUMBER 36 #define O_OCTAL 37 #define O_OPEN 38 #define O_OPTIMIZE 39 #define O_PARAGRAPHS 40 #define O_PATH 41 #define O_PRINT 42 #define O_PROMPT 43 #define O_READONLY 44 #define O_RECDIR 45 #define O_REDRAW 46 #define O_REMAP 47 #define O_REPORT 48 #define O_RULER 49 #define O_SCROLL 50 #define O_SEARCHINCR 51 #define O_SECTIONS 52 #define O_SECURE 53 #define O_SHELL 54 #define O_SHELLMETA 55 #define O_SHIFTWIDTH 56 #define O_SHOWMATCH 57 #define O_SHOWMODE 58 #define O_SIDESCROLL 59 #define O_SLOWOPEN 60 #define O_SOURCEANY 61 #define O_TABSTOP 62 #define O_TAGLENGTH 63 #define O_TAGS 64 #define O_TERM 65 #define O_TERSE 66 #define O_TILDEOP 67 #define O_TIMEOUT 68 #define O_TTYWERASE 69 #define O_VERBOSE 70 #define O_W1200 71 #define O_W300 72 #define O_W9600 73 #define O_WARN 74 #define O_WINDOW 75 #define O_WINDOWNAME 76 #define O_WRAPLEN 77 #define O_WRAPMARGIN 78 #define O_WRAPSCAN 79 #define O_WRITEANY 80 #define O_OPTIONCOUNT 81 nvi-1.81.6/common/extern.h0100444000076400001440000002321710720065712014422 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ SCR *api_fscreen __P((int, char *)); int api_aline __P((SCR *, db_recno_t, char *, size_t)); int api_extend __P((SCR *, db_recno_t)); int api_dline __P((SCR *, db_recno_t)); int api_gline __P((SCR *, db_recno_t, CHAR_T **, size_t *)); int api_iline __P((SCR *, db_recno_t, CHAR_T *, size_t)); int api_lline __P((SCR *, db_recno_t *)); int api_sline __P((SCR *, db_recno_t, CHAR_T *, size_t)); int api_getmark __P((SCR *, int, MARK *)); int api_setmark __P((SCR *, int, MARK *)); int api_nextmark __P((SCR *, int, char *)); int api_getcursor __P((SCR *, MARK *)); int api_setcursor __P((SCR *, MARK *)); void api_emessage __P((SCR *, char *)); void api_imessage __P((SCR *, char *)); int api_edit __P((SCR *, char *, SCR **, int)); int api_escreen __P((SCR *)); int api_swscreen __P((SCR *, SCR *)); int api_map __P((SCR *, char *, char *, size_t)); int api_unmap __P((SCR *, char *)); int api_opts_get __P((SCR *, CHAR_T *, char **, int *)); int api_opts_set __P((SCR *, CHAR_T *, char *, u_long, int)); int api_run_str __P((SCR *, char *)); TAGQ * api_tagq_new __P((SCR*, char*)); void api_tagq_add __P((SCR*, TAGQ*, char*, char *, char *)); int api_tagq_push __P((SCR*, TAGQ**)); void api_tagq_free __P((SCR*, TAGQ*)); int cut __P((SCR *, CHAR_T *, MARK *, MARK *, int)); int cut_line __P((SCR *, db_recno_t, size_t, size_t, CB *)); void cut_close __P((WIN *)); TEXT *text_init __P((SCR *, const CHAR_T *, size_t, size_t)); void text_lfree __P((TEXTH *)); void text_free __P((TEXT *)); int db_eget __P((SCR *, db_recno_t, CHAR_T **, size_t *, int *)); int db_get __P((SCR *, db_recno_t, u_int32_t, CHAR_T **, size_t *)); int db_delete __P((SCR *, db_recno_t)); int db_append __P((SCR *, int, db_recno_t, CHAR_T *, size_t)); int db_insert __P((SCR *, db_recno_t, CHAR_T *, size_t)); int db_set __P((SCR *, db_recno_t, CHAR_T *, size_t)); int db_exist __P((SCR *, db_recno_t)); int db_last __P((SCR *, db_recno_t *)); void db_err __P((SCR *, db_recno_t)); int scr_update __P((SCR *sp, db_recno_t lno, lnop_t op, int current)); void update_cache __P((SCR *sp, lnop_t op, db_recno_t lno)); int line_insdel __P((SCR *sp, lnop_t op, db_recno_t lno)); int db_eget __P((SCR *, db_recno_t, CHAR_T **, size_t *, int *)); int db_get __P((SCR *, db_recno_t, u_int32_t, CHAR_T **, size_t *)); int db_delete __P((SCR *, db_recno_t)); int db_append __P((SCR *, int, db_recno_t, CHAR_T *, size_t)); int db_insert __P((SCR *, db_recno_t, CHAR_T *, size_t)); int db_set __P((SCR *, db_recno_t, CHAR_T *, size_t)); int db_exist __P((SCR *, db_recno_t)); int db_last __P((SCR *, db_recno_t *)); void db_err __P((SCR *, db_recno_t)); int del __P((SCR *, MARK *, MARK *, int)); FREF *file_add __P((SCR *, char *)); int file_init __P((SCR *, FREF *, char *, int)); int file_end __P((SCR *, EXF *, int)); int file_write __P((SCR *, MARK *, MARK *, char *, int)); int file_m1 __P((SCR *, int, int)); int file_m2 __P((SCR *, int)); int file_m3 __P((SCR *, int)); int file_aw __P((SCR *, int)); void set_alt_name __P((SCR *, char *)); lockr_t file_lock __P((SCR *, char *, int *, int, int)); GS * gs_init __P((char*)); WIN * gs_new_win __P((GS *gp)); int win_end __P((WIN *wp)); void gs_end __P((GS *)); int v_key_init __P((SCR *)); void v_key_ilookup __P((SCR *)); size_t v_key_len __P((SCR *, ARG_CHAR_T)); u_char *v_key_name __P((SCR *, ARG_CHAR_T)); int v_key_val __P((SCR *, ARG_CHAR_T)); int v_event_push __P((SCR *, EVENT *, CHAR_T *, size_t, u_int)); int v_event_get __P((SCR *, EVENT *, int, u_int32_t)); void v_event_err __P((SCR *, EVENT *)); int v_event_flush __P((SCR *, u_int)); int log_init __P((SCR *, EXF *)); int log_end __P((SCR *, EXF *)); int log_cursor __P((SCR *)); int log_line __P((SCR *, db_recno_t, u_int)); int log_mark __P((SCR *, LMARK *)); int log_backward __P((SCR *, MARK *)); int log_setline __P((SCR *)); int log_forward __P((SCR *, MARK *)); int log_init __P((SCR *, EXF *)); int log_end __P((SCR *, EXF *)); int log_cursor __P((SCR *)); int log_line __P((SCR *, db_recno_t, u_int)); int log_mark __P((SCR *, LMARK *)); int log_backward __P((SCR *, MARK *)); int log_setline __P((SCR *)); int log_forward __P((SCR *, MARK *)); int editor __P((WIN *, int, char *[])); int mark_init __P((SCR *, EXF *)); int mark_end __P((SCR *, EXF *)); int mark_get __P((SCR *, ARG_CHAR_T, MARK *, mtype_t)); int mark_set __P((SCR *, ARG_CHAR_T, MARK *, int)); int mark_insdel __P((SCR *, lnop_t, db_recno_t)); void msgq __P((SCR *, mtype_t, const char *, ...)); void msgq_wstr __P((SCR *, mtype_t, CHAR_T *, char *)); void msgq_str __P((SCR *, mtype_t, char *, char *)); void mod_rpt __P((SCR *)); void msgq_status __P((SCR *, db_recno_t, u_int)); int msg_open __P((SCR *, char *)); void msg_close __P((GS *)); const char *msg_cmsg __P((SCR *, cmsg_t, size_t *)); const char *msg_cat __P((SCR *, const char *, size_t *)); char *msg_print __P((SCR *, const char *, int *)); void thread_init __P((GS *gp)); int opts_init __P((SCR *, int *)); int opts_set __P((SCR *, ARGS *[], char *)); int o_set __P((SCR *, int, u_int, char *, u_long)); int opts_empty __P((SCR *, int, int)); void opts_dump __P((SCR *, enum optdisp)); int opts_save __P((SCR *, FILE *)); OPTLIST const *opts_search __P((CHAR_T *)); void opts_nomatch __P((SCR *, CHAR_T *)); int opts_copy __P((SCR *, SCR *)); void opts_free __P((SCR *)); int f_altwerase __P((SCR *, OPTION *, char *, u_long *)); int f_columns __P((SCR *, OPTION *, char *, u_long *)); int f_lines __P((SCR *, OPTION *, char *, u_long *)); int f_lisp __P((SCR *, OPTION *, char *, u_long *)); int f_msgcat __P((SCR *, OPTION *, char *, u_long *)); int f_paragraph __P((SCR *, OPTION *, char *, u_long *)); int f_print __P((SCR *, OPTION *, char *, u_long *)); int f_readonly __P((SCR *, OPTION *, char *, u_long *)); int f_recompile __P((SCR *, OPTION *, char *, u_long *)); int f_reformat __P((SCR *, OPTION *, char *, u_long *)); int f_section __P((SCR *, OPTION *, char *, u_long *)); int f_ttywerase __P((SCR *, OPTION *, char *, u_long *)); int f_w300 __P((SCR *, OPTION *, char *, u_long *)); int f_w1200 __P((SCR *, OPTION *, char *, u_long *)); int f_w9600 __P((SCR *, OPTION *, char *, u_long *)); int f_window __P((SCR *, OPTION *, char *, u_long *)); int f_encoding __P((SCR *, OPTION *, char *, u_long *)); void thread_init __P((GS *gp)); int put __P((SCR *, CB *, CHAR_T *, MARK *, MARK *, int)); int rcv_tmp __P((SCR *, EXF *, char *)); int rcv_init __P((SCR *)); int rcv_sync __P((SCR *, u_int)); int rcv_list __P((SCR *)); int rcv_read __P((SCR *, FREF *)); int screen_init __P((GS *, SCR *, SCR **)); int screen_end __P((SCR *)); SCR *screen_next __P((SCR *)); int f_search __P((SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int)); int b_search __P((SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int)); void search_busy __P((SCR *, busy_t)); int seq_set __P((SCR *, CHAR_T *, size_t, CHAR_T *, size_t, CHAR_T *, size_t, seq_t, int)); int seq_delete __P((SCR *, CHAR_T *, size_t, seq_t)); int seq_mdel __P((SEQ *)); SEQ *seq_find __P((SCR *, SEQ **, EVENT *, CHAR_T *, size_t, seq_t, int *)); void seq_close __P((GS *)); int seq_dump __P((SCR *, seq_t, int)); int seq_save __P((SCR *, FILE *, char *, seq_t)); int e_memcmp __P((CHAR_T *, EVENT *, size_t)); void vtrace_end __P((void)); void vtrace_init __P((char *)); void vtrace __P((const char *, ...)); void *binc __P((SCR *, void *, size_t *, size_t)); int nonblank __P((SCR *, db_recno_t, size_t *)); char *tail __P((char *)); char *v_strdup __P((SCR *, const char *, size_t)); CHAR_T *v_wstrdup __P((SCR *, const CHAR_T *, size_t)); enum nresult nget_uslong __P((SCR *, u_long *, const CHAR_T *, CHAR_T **, int)); enum nresult nget_slong __P((SCR *, long *, const CHAR_T *, CHAR_T **, int)); #ifdef USE_DB4_LOGGING int __vi_marker_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t)); int __vi_marker_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_marker_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_marker_read __P((DB_ENV *, void *, __vi_marker_args **)); int __vi_cursor_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_recno_t, size_t)); int __vi_cursor_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_cursor_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_cursor_read __P((DB_ENV *, void *, __vi_cursor_args **)); int __vi_mark_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, LMARK *)); int __vi_mark_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_mark_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_mark_read __P((DB_ENV *, void *, __vi_mark_args **)); int __vi_change_log __P((DB_ENV *, DB_TXN *, DB_LSN *, u_int32_t, u_int32_t, db_recno_t)); int __vi_change_getpgnos __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_change_print __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_change_read __P((DB_ENV *, void *, __vi_change_args **)); int __vi_init_print __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); int __vi_init_getpgnos __P((DB_ENV *, int (***)(DB_ENV *, DBT *, DB_LSN *, db_recops, void *), size_t *)); int __vi_init_recover __P((DB_ENV *)); #endif #ifdef USE_DB4_LOGGING int __vi_marker_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_cursor_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_mark_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_change_recover __P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *)); int __vi_log_truncate __P((EXF *ep)); int __vi_log_dispatch __P((DB_ENV *dbenv, DBT *data, DB_LSN *lsn, db_recops ops)); int __vi_log_traverse __P((SCR *sp, undo_t undo, MARK *)); #endif nvi-1.81.6/dist/0040755000076400001440000000000010720065713012420 5ustar skimousersnvi-1.81.6/dist/ExtUtils/0040755000076400001440000000000010720065506014201 5ustar skimousersnvi-1.81.6/dist/ExtUtils/Embed.pm0100644000076400001440000002735510720065506015564 0ustar skimousers# $Id: Embed.pm,v 10.2 1996/09/19 09:12:51 bostic Exp $ require 5.002; package ExtUtils::Embed; require Exporter; require FileHandle; use Config; use Getopt::Std; #Only when we need them #require ExtUtils::MakeMaker; #require ExtUtils::Liblist; use vars qw(@ISA @EXPORT $VERSION @Extensions $Verbose $lib_ext $opt_o $opt_s ); use strict; $VERSION = sprintf("%d.%02d", q$Revision: 10.2 $ =~ /(\d+)\.(\d+)/); #for the namespace change $Devel::embed::VERSION = "99.99"; sub Version { $VERSION; } @ISA = qw(Exporter); @EXPORT = qw(&xsinit &ldopts &ccopts &ccflags &ccdlflags &perl_inc &xsi_header &xsi_protos &xsi_body); #let's have Miniperl borrow from us instead #require ExtUtils::Miniperl; #*canon = \&ExtUtils::Miniperl::canon; $Verbose = 0; $lib_ext = $Config{lib_ext} || '.a'; sub xsinit { my($file, $std, $mods) = @_; my($fh,@mods,%seen); $file ||= "perlxsi.c"; if (@_) { @mods = @$mods if $mods; } else { getopts('o:s:'); $file = $opt_o if defined $opt_o; $std = $opt_s if defined $opt_s; @mods = @ARGV; } $std = 1 unless scalar @mods; if ($file eq "STDOUT") { $fh = \*STDOUT; } else { $fh = new FileHandle "> $file"; } push(@mods, static_ext()) if defined $std; @mods = grep(!$seen{$_}++, @mods); print $fh &xsi_header(); print $fh "EXTERN_C void xs_init _((void));\n\n"; print $fh &xsi_protos(@mods); print $fh "\nEXTERN_C void\nxs_init()\n{\n"; print $fh &xsi_body(@mods); print $fh "}\n"; } sub xsi_header { return < #include #ifdef __cplusplus } # ifndef EXTERN_C # define EXTERN_C extern "C" # endif #else # ifndef EXTERN_C # define EXTERN_C extern # endif #endif EOF } sub xsi_protos { my(@exts) = @_; my(@retval,%seen); foreach $_ (@exts){ my($pname) = canon('/', $_); my($mname, $cname); ($mname = $pname) =~ s!/!::!g; ($cname = $pname) =~ s!/!__!g; my($ccode) = "EXTERN_C void boot_${cname} _((CV* cv));\n"; next if $seen{$ccode}++; push(@retval, $ccode); } return join '', @retval; } sub xsi_body { my(@exts) = @_; my($pname,@retval,%seen); my($dl) = canon('/','DynaLoader'); push(@retval, "\tdXSUB_SYS;\n") if $] > 5.002; push(@retval, "\tchar *file = __FILE__;\n\n"); foreach $_ (@exts){ my($pname) = canon('/', $_); my($mname, $cname, $ccode); ($mname = $pname) =~ s!/!::!g; ($cname = $pname) =~ s!/!__!g; if ($pname eq $dl){ # Must NOT install 'DynaLoader::boot_DynaLoader' as 'bootstrap'! # boot_DynaLoader is called directly in DynaLoader.pm $ccode = "\t/* DynaLoader is a special case */\n\tnewXS(\"${mname}::boot_${cname}\", boot_${cname}, file);\n"; push(@retval, $ccode) unless $seen{$ccode}++; } else { $ccode = "\tnewXS(\"${mname}::bootstrap\", boot_${cname}, file);\n"; push(@retval, $ccode) unless $seen{$ccode}++; } } return join '', @retval; } sub static_ext { unless (scalar @Extensions) { @Extensions = sort split /\s+/, $Config{static_ext}; unshift @Extensions, qw(DynaLoader); } @Extensions; } sub ldopts { require ExtUtils::MakeMaker; require ExtUtils::Liblist; my($std,$mods,$link_args,$path) = @_; my(@mods,@link_args,@argv); my($dllib,$config_libs,@potential_libs,@path); local($") = ' ' unless $" eq ' '; my $MM = bless {} => 'MY'; if (scalar @_) { @link_args = @$link_args if $link_args; @mods = @$mods if $mods; } else { @argv = @ARGV; #hmm while($_ = shift @argv) { /^-std$/ && do { $std = 1; next; }; /^--$/ && do { @link_args = @argv; last; }; /^-I(.*)/ && do { $path = $1 || shift @argv; next; }; push(@mods, $_); } } $std = 1 unless scalar @link_args; @path = $path ? split(/:/, $path) : @INC; push(@potential_libs, @link_args) if scalar @link_args; push(@potential_libs, $Config{libs}) if defined $std; push(@mods, static_ext()) if $std; my($mod,@ns,$root,$sub,$extra,$archive,@archives); print STDERR "Searching (@path) for archives\n" if $Verbose; foreach $mod (@mods) { @ns = split('::', $mod); $sub = $ns[-1]; $root = $MM->catdir(@ns); print STDERR "searching for '$sub${lib_ext}'\n" if $Verbose; foreach (@path) { next unless -e ($archive = $MM->catdir($_,"auto",$root,"$sub$lib_ext")); push @archives, $archive; if(-e ($extra = $MM->catdir($_,"auto",$root,"extralibs.ld"))) { local(*FH); if(open(FH, $extra)) { my($libs) = ; chomp $libs; push @potential_libs, split /\s+/, $libs; } else { warn "Couldn't open '$extra'"; } } last; } } #print STDERR "\@potential_libs = @potential_libs\n"; my($extralibs, $bsloadlibs, $ldloadlibs, $ld_run_path) = $MM->ext(join ' ', $MM->catdir("-L$Config{archlib}", "CORE"), " -lperl", @potential_libs); my $ld_or_bs = $bsloadlibs || $ldloadlibs; print STDERR "bs: $bsloadlibs ** ld: $ldloadlibs" if $Verbose; my $linkage = "$Config{ldflags} @archives $ld_or_bs"; print STDERR "ldopts: '$linkage'\n" if $Verbose; return $linkage if scalar @_; print "$linkage\n"; } sub ccflags { print " $Config{ccflags} "; } sub ccdlflags { print " $Config{ccdlflags} "; } sub perl_inc { print " -I$Config{archlib}/CORE "; } sub ccopts { ccflags; ccdlflags; perl_inc; } sub canon { my($as, @ext) = @_; foreach(@ext) { # might be X::Y or lib/auto/X/Y/Y.a next if s!::!/!g; s:^(lib|ext)/(auto/)?::; s:/\w+\.\w+$::; } grep(s:/:$as:, @ext) if ($as ne '/'); @ext; } __END__ =head1 NAME ExtUtils::Embed - Utilities for embedding Perl in C/C++ applications =head1 SYNOPSIS perl -MExtUtils::Embed -e xsinit perl -MExtUtils::Embed -e ldopts =head1 DESCRIPTION ExtUtils::Embed provides utility functions for embedding a Perl interpreter and extensions in your C/C++ applications. Typically, an application B will invoke ExtUtils::Embed functions while building your application. =head1 @EXPORT ExtUtils::Embed exports the following functions: L, L, L, L, L, L, L, L, L =head1 FUNCTIONS =item xsinit() Generate C/C++ code for the XS intializer function. When invoked as C<`perl -MExtUtils::Embed -e xsinit --`> the following options are recognized: B<-o> (Defaults to B) B<-o STDOUT> will print to STDOUT. B<-std> (Write code for extensions that are linked with the current Perl.) Any additional arguments are expected to be names of modules to generate code for. When invoked with parameters the following are accepted and optional: C Where, B<$filename> is equivalent to the B<-o> option. B<$std> is boolean, equivalent to the B<-std> option. B<[@modules]> is an array ref, same as additional arguments mentioned above. =item Examples perl -MExtUtils::Embed -e xsinit -- -o xsinit.c Socket This will generate code with an B function that glues the perl B function to the C B function and writes it to a file named "xsinit.c". Note that B is a special case where it must call B directly. perl -MExtUtils::Embed -e xsinit This will generate code for linking with B and each static extension found in B<$Config{static_ext}>. The code is written to the default file name B. perl -MExtUtils::Embed -e xsinit -- -o xsinit.c -std DBI DBD::Oracle Here, code is written for all the currently linked extensions along with code for B and B. If you have a working B then there is rarely any need to statically link in any other extensions. =item ldopts() Output arguments for linking the Perl library and extensions to your application. When invoked as C<`perl -MExtUtils::Embed -e ldopts --`> the following options are recognized: B<-std> Output arguments for linking the Perl library and any extensions linked with the current Perl. B<-I> Search path for ModuleName.a archives. Default path is B<@INC>. Library archives are expected to be found as B For example, when looking for B relative to a search path, we should find B When looking for B relative to a search path, we should find B Keep in mind, you can always supply B as an additional linker argument. B<--> Additional linker arguments to be considered. Any additional arguments found before the B<--> token are expected to be names of modules to generate code for. When invoked with parameters the following are accepted and optional: C Where, B<$std> is boolean, equivalent to the B<-std> option. B<[@modules]> is equivalent to additional arguments found before the B<--> token. B<[@link_args]> is equivalent to arguments found after the B<--> token. B<$path> is equivalent to the B<-I> option. In addition, when ldopts is called with parameters, it will return the argument string rather than print it to STDOUT. =item Examples perl -MExtUtils::Embed -e ldopts This will print arguments for linking with B, B and extensions found in B<$Config{static_ext}>. This includes libraries found in B<$Config{libs}> and the first ModuleName.a library for each extension that is found by searching B<@INC> or the path specifed by the B<-I> option. In addition, when ModuleName.a is found, additional linker arguments are picked up from the B file in the same directory. perl -MExtUtils::Embed -e ldopts -- -std Socket This will do the same as the above example, along with printing additional arguments for linking with the B extension. perl -MExtUtils::Embed -e ldopts -- DynaLoader This will print arguments for linking with just the B extension and B. perl -MExtUtils::Embed -e ldopts -- -std Msql -- -L/usr/msql/lib -lmsql Any arguments after the second '--' token are additional linker arguments that will be examined for potential conflict. If there is no conflict, the additional arguments will be part of the output. =item perl_inc() For including perl header files this function simply prints: -I $Config{archlib}/CORE So, rather than having to say: perl -MConfig -e 'print "-I $Config{archlib}/CORE"' Just say: perl -MExtUtils::Embed -e perl_inc =item ccflags(), ccdlflags() These functions simply print $Config{ccflags} and $Config{ccdlflags} =item ccopts() This function combines perl_inc(), ccflags() and ccdlflags() into one. =item xsi_header() This function simply returns a string defining the same B macro as B along with #including B and B. =item xsi_protos(@modules) This function returns a string of B prototypes for each @modules. =item xsi_body(@modules) This function returns a string of calls to B that glue the module B function to B for each @modules. B uses the xsi_* functions to generate most of it's code. =head1 EXAMPLES For examples on how to use B for building C/C++ applications with embedded perl, see the eg/ directory and the I man page. =head1 SEE ALSO the I man page =head1 AUTHOR Doug MacEachern Based on ideas from Tim Bunce and B by Andreas Koenig and Tim Bunce. =cut nvi-1.81.6/dist/INSTALL0100644000076400001440000001722710720065506013457 0ustar skimousersBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. nvi-1.81.6/dist/Makefile.am0100644000076400001440000003067210720065506014461 0ustar skimousersvisrcdir= @srcdir@/.. ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libvi.la libvi_la_SOURCES = \ $(visrcdir)/common/api.c \ $(visrcdir)/common/conv.c \ $(visrcdir)/common/conv.h \ $(visrcdir)/common/cut.c \ $(visrcdir)/common/delete.c \ $(visrcdir)/common/args.h \ $(visrcdir)/common/common.h \ $(visrcdir)/common/cut.h \ $(visrcdir)/common/db.h \ $(visrcdir)/common/exf.h \ $(visrcdir)/common/gs.h \ $(visrcdir)/common/key.h \ $(visrcdir)/common/log.h \ $(visrcdir)/common/mark.h \ $(visrcdir)/common/mem.h \ $(visrcdir)/common/multibyte.h \ $(visrcdir)/common/msg.h \ $(visrcdir)/common/options.h \ $(visrcdir)/common/options_def.h \ $(visrcdir)/common/screen.h \ $(visrcdir)/common/seq.h \ $(visrcdir)/common/util.h \ $(visrcdir)/ex/ex.c \ $(visrcdir)/ex/ex_abbrev.c \ $(visrcdir)/ex/ex_append.c \ $(visrcdir)/ex/ex_args.c \ $(visrcdir)/ex/ex_argv.c \ $(visrcdir)/ex/ex_at.c \ $(visrcdir)/ex/ex_bang.c \ $(visrcdir)/ex/ex_cd.c \ $(visrcdir)/ex/ex_cmd.c \ $(visrcdir)/ex/ex_cscope.c \ $(visrcdir)/ex/ex_delete.c \ $(visrcdir)/ex/ex_display.c \ $(visrcdir)/ex/ex_edit.c \ $(visrcdir)/ex/ex_equal.c \ $(visrcdir)/ex/ex_file.c \ $(visrcdir)/ex/ex_filter.c \ $(visrcdir)/ex/ex_global.c \ $(visrcdir)/ex/ex_init.c \ $(visrcdir)/ex/ex_join.c \ $(visrcdir)/ex/ex_map.c \ $(visrcdir)/ex/ex_mark.c \ $(visrcdir)/ex/ex_mkexrc.c \ $(visrcdir)/ex/ex_move.c \ $(visrcdir)/ex/ex_open.c \ $(visrcdir)/ex/ex_perl.c \ $(visrcdir)/ex/ex_preserve.c \ $(visrcdir)/ex/ex_print.c \ $(visrcdir)/ex/ex_put.c \ $(visrcdir)/ex/ex_quit.c \ $(visrcdir)/ex/ex_read.c \ $(visrcdir)/ex/ex_screen.c \ $(visrcdir)/ex/ex_script.c \ $(visrcdir)/ex/ex_set.c \ $(visrcdir)/ex/ex_shell.c \ $(visrcdir)/ex/ex_shift.c \ $(visrcdir)/ex/ex_source.c \ $(visrcdir)/ex/ex_stop.c \ $(visrcdir)/ex/ex_subst.c \ $(visrcdir)/ex/ex_tag.c \ $(visrcdir)/ex/ex_tcl.c \ $(visrcdir)/ex/ex_txt.c \ $(visrcdir)/ex/ex_undo.c \ $(visrcdir)/ex/ex_usage.c \ $(visrcdir)/ex/ex_util.c \ $(visrcdir)/ex/ex_version.c \ $(visrcdir)/ex/ex_visual.c \ $(visrcdir)/ex/ex_write.c \ $(visrcdir)/ex/ex_yank.c \ $(visrcdir)/ex/ex_z.c \ $(visrcdir)/ex/ex.h \ $(visrcdir)/ex/ex_def.h \ $(visrcdir)/ex/script.h \ $(visrcdir)/ex/tag.h \ $(visrcdir)/ex/version.h \ $(visrcdir)/common/exf.c \ $(visrcdir)/vi/getc.c \ $(visrcdir)/vi/vi.h \ $(visrcdir)/common/gs.c \ $(visrcdir)/common/key.c \ $(visrcdir)/common/db.c \ $(visrcdir)/common/main.c \ $(visrcdir)/common/mark.c \ $(visrcdir)/common/msg.c \ $(visrcdir)/common/options.c \ $(visrcdir)/common/options_f.c \ $(visrcdir)/common/put.c \ $(visrcdir)/common/recover.c \ $(visrcdir)/common/screen.c \ $(visrcdir)/common/search.c \ $(visrcdir)/common/seq.c \ $(visrcdir)/common/trace.c \ $(visrcdir)/common/util.c \ $(visrcdir)/common/util2.c \ $(visrcdir)/vi/v_at.c \ $(visrcdir)/vi/v_ch.c \ $(visrcdir)/vi/v_cmd.c \ $(visrcdir)/vi/v_delete.c \ $(visrcdir)/vi/v_event.c \ $(visrcdir)/vi/v_ex.c \ $(visrcdir)/vi/v_increment.c \ $(visrcdir)/vi/v_init.c \ $(visrcdir)/vi/v_itxt.c \ $(visrcdir)/vi/v_left.c \ $(visrcdir)/vi/v_mark.c \ $(visrcdir)/vi/v_match.c \ $(visrcdir)/vi/v_paragraph.c \ $(visrcdir)/vi/v_put.c \ $(visrcdir)/vi/v_redraw.c \ $(visrcdir)/vi/v_replace.c \ $(visrcdir)/vi/v_right.c \ $(visrcdir)/vi/v_screen.c \ $(visrcdir)/vi/v_scroll.c \ $(visrcdir)/vi/v_search.c \ $(visrcdir)/vi/v_section.c \ $(visrcdir)/vi/v_sentence.c \ $(visrcdir)/vi/v_status.c \ $(visrcdir)/vi/v_txt.c \ $(visrcdir)/vi/v_ulcase.c \ $(visrcdir)/vi/v_undo.c \ $(visrcdir)/vi/v_util.c \ $(visrcdir)/vi/v_word.c \ $(visrcdir)/vi/v_xchar.c \ $(visrcdir)/vi/v_yank.c \ $(visrcdir)/vi/v_z.c \ $(visrcdir)/vi/v_zexit.c \ $(visrcdir)/vi/vi.c \ $(visrcdir)/vi/vs_line.c \ $(visrcdir)/vi/vs_msg.c \ $(visrcdir)/vi/vs_refresh.c \ $(visrcdir)/vi/vs_relative.c \ $(visrcdir)/vi/vs_smap.c \ $(visrcdir)/vi/vs_split.c EXTRA_libvi_la_SOURCES = \ $(visrcdir)/regex/regcomp.c \ $(visrcdir)/regex/regerror.c \ $(visrcdir)/regex/regexec.c \ $(visrcdir)/regex/regfree.c \ $(visrcdir)/regex/cclass.h \ $(visrcdir)/regex/cname.h \ $(visrcdir)/regex/regex.h \ $(visrcdir)/regex/regex2.h \ $(visrcdir)/regex/utils.h \ $(visrcdir)/common/dldb.c \ $(visrcdir)/common/log.c \ $(visrcdir)/common/log4.c \ $(visrcdir)/clib/bsearch.c \ $(visrcdir)/clib/env.c \ $(visrcdir)/clib/gethostname.c \ $(visrcdir)/clib/iswblank.c \ $(visrcdir)/clib/memchr.c \ $(visrcdir)/clib/memset.c \ $(visrcdir)/clib/mkstemp.c \ $(visrcdir)/clib/mmap.c \ $(visrcdir)/clib/snprintf.c \ $(visrcdir)/clib/strdup.c \ $(visrcdir)/clib/strpbrk.c \ $(visrcdir)/clib/strsep.c \ $(visrcdir)/clib/strtol.c \ $(visrcdir)/clib/strtoul.c \ $(visrcdir)/clib/vsnprintf.c \ $(visrcdir)/common/pthread.c \ $(visrcdir)/common/vi_auto.c \ $(visrcdir)/common/vi_rec.c \ $(visrcdir)/perl_api/perl.xs \ $(visrcdir)/perl_api/perlsfio.c \ $(visrcdir)/tcl_api/tcl.c # Is this the way to do it ? libvi_la_DEPENDENCIES = @LTLIBOBJS@ libvi_la_LIBADD = @LTLIBOBJS@ bin_PROGRAMS = @vi_programs@ @vi_ipc@ EXTRA_PROGRAMS = vi vi-ipc vi-motif vi-gtk vi_SOURCES = \ $(visrcdir)/cl/cl.h \ $(visrcdir)/cl/cl_bsd.c \ $(visrcdir)/cl/cl_funcs.c \ $(visrcdir)/cl/cl_main.c \ $(visrcdir)/cl/cl_read.c \ $(visrcdir)/cl/cl_screen.c \ $(visrcdir)/cl/cl_term.c \ $(visrcdir)/common/nothread.c vi_LDADD = libvi.la @perllibs@ @CURSLIBS@ vi_CPPFLAGS = @CURSCPPFLAGS@ @perlldflags@ $(AM_CPPFLAGS) vi_LDFLAGS = @CURSLDFLAGS@ @perlldflags@ vi_ipc_SOURCES = \ $(visrcdir)/ip/ip_funcs.c \ $(visrcdir)/ip/ip_main.c \ $(visrcdir)/ip/ip_read.c \ $(visrcdir)/ip/ip_screen.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip.h \ $(visrcdir)/ip/ip_term.c vi_ipc_LDADD = libvi.la @perllibs@ @IPCOBJS@ vi_ipc_LDFLAGS = @perlldflags@ vi_ipc_DEPENDENCIES = @IPCOBJS@ vi_gtk_SOURCES = \ $(visrcdir)/common/util2.c \ $(visrcdir)/ipc/ip_run.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip_trans.c \ $(visrcdir)/ipc/ipc_cmd.c \ $(visrcdir)/ipc/ipc_method.c \ $(visrcdir)/gtk/gtk_main.c \ $(visrcdir)/gtk/gtkvi.c \ $(visrcdir)/gtk/gtkviscreen.c \ $(visrcdir)/gtk/gtkviwindow.c vi_gtk_LDADD = @GTKLIBS@ @LIBOBJS@ vi_gtk_CFLAGS = @GTKINCS@ @XINCS@ vi_motif_SOURCES = \ $(visrcdir)/ipc/ip_run.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip_trans.c \ $(visrcdir)/ipc/ipc_cmd.c \ $(visrcdir)/ipc/ipc_method.c \ $(visrcdir)/motif/m_main.c \ $(visrcdir)/motif/m_cde.c \ $(visrcdir)/common/trace.c \ $(visrcdir)/motif_l/m_copypaste.c \ $(visrcdir)/motif_l/m_func.c \ $(visrcdir)/motif_l/m_menu.c \ $(visrcdir)/motif_l/m_options.c \ $(visrcdir)/motif_l/m_prompt.c \ $(visrcdir)/motif_l/m_ruler.c \ $(visrcdir)/motif_l/m_search.c \ $(visrcdir)/motif_l/m_tags.c \ $(visrcdir)/motif_l/m_util.c \ $(visrcdir)/motif_l/m_vi.c \ $(visrcdir)/motif_l/xtabbed.c vi_motif_LDADD = @MOTIFLIBS@ @LIBOBJS@ vi_motif_CFLAGS = @XINCS@ VI=-DVI=\"$(bindir)/`echo vi-ipc | sed '$(transform)'`\" CFLAGS= $(OPTFLAG) AM_CPPFLAGS= -D__REGEX_PRIVATE -I. -I$(visrcdir)/include $(VI) PERL= @vi_cv_path_perl@ PERLLIB=@vi_cv_perllib@ SHRPENV=@shrpenv@ perl.c: $(visrcdir)/perl_api/perl.xs $(visrcdir)/perl_api/typemap echo "#define _PATH_PERLSCRIPTS \"$(datadir)/vi/perl\"" > $@ $(PERL) -e 'unless ($$] >= 5.005) {' \ -e 'for (qw(incgv sv_undef errgv na)) {' \ -e 'print "#define PL_$$_ $$_\n" }} ' >> $@ $(PERL) $(PERLLIB)/ExtUtils/xsubpp -typemap \ $(PERLLIB)/ExtUtils/typemap $(visrcdir)/perl_api/perl.xs >> $@ ($(PERL) -ne 'print "sub $$1 {\$$curscr->$$1(\@_)}\n"' \ -e 'if /newXS\("VI::([^\":]*)"/;' $@ ; echo "1;") > VI.pm perlxsi.c: perl -MExtUtils::Embed -e xsinit -- -std VI chmod= @vi_cv_path_chmod@ cp= @vi_cv_path_cp@ ln= @vi_cv_path_ln@ mkdir= @vi_cv_path_mkdir@ rm= @vi_cv_path_rm@ strip= @vi_cv_path_strip@ dmode= 755 emode= 555 fmode= 444 install-exec-local: cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(ln) \ `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(ln) \ `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'` install-data-local: install_common @[ -d $(DESTDIR)$(mandir) ] || \ ($(mkdir) $(DESTDIR)$(mandir) && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)) @[ -d $(DESTDIR)$(mandir)/cat1 ] || \ ($(mkdir) $(DESTDIR)$(mandir)/cat1 && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)/cat1) @echo "Installing man pages: $(DESTDIR)$(mandir) ..." @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo vi.0 | sed '$(transform)'` @$(cp) $(visrcdir)/docs/vi.man/vi.0 \ $(DESTDIR)$(mandir)/cat1/`echo vi.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo ex.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo view.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \ `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \ `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'` @[ -d $(DESTDIR)$(mandir)/man1 ] || \ ($(mkdir) $(DESTDIR)$(mandir)/man1 && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)/man1) @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo vi.1 | sed '$(transform)'` @$(cp) $(visrcdir)/docs/vi.man/vi.1 \ $(DESTDIR)$(mandir)/man1/`echo vi.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo ex.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo view.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && $(ln) \ `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && $(ln) \ `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'` cat= dutch english french german ru_SU.KOI8-R spanish swedish install_common: @[ -f $(chmod) ] || (echo 'chmod not found.'; exit 1) @[ -f $(cp) ] || (echo 'cp not found.'; exit 1) @[ -f $(ln) ] || (echo 'ln not found.'; exit 1) @[ -f $(mkdir) ] || (echo 'mkdir not found.'; exit 1) @[ -f $(rm) ] || (echo 'rm not found.'; exit 1) @[ -d $(DESTDIR)$(prefix) ] || \ ($(mkdir) $(DESTDIR)$(prefix) && \ $(chmod) $(dmode) $(DESTDIR)$(prefix)) @[ -d $(DESTDIR)$(exec_prefix) ] || \ ($(mkdir) $(DESTDIR)$(exec_prefix) && \ $(chmod) $(dmode) $(DESTDIR)$(exec_prefix)) @[ -d $(DESTDIR)$(datadir) ] || \ ($(mkdir) $(DESTDIR)$(datadir) && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)) @$(rm) -rf $(DESTDIR)$(datadir)/vi @$(mkdir) $(DESTDIR)$(datadir)/vi && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi @echo "Installing message catalogs: $(datadir)/vi/catalog ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/catalog && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/catalog @(cd $(visrcdir)/catalog && \ $(cp) $(cat) $(DESTDIR)$(datadir)/vi/catalog && \ cd $(DESTDIR)$(datadir)/vi/catalog && $(chmod) $(fmode) *) @echo "Installing Perl scripts: $(datadir)/vi/perl ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/perl && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/perl @[ ! -f VI.pm ] || \ ($(cp) VI.pm $(DESTDIR)$(datadir)/vi/perl && \ (cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) VI.pm)) @(cd $(visrcdir)/perl_scripts && \ $(cp) *.pl $(DESTDIR)$(datadir)/vi/perl && \ cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) *.pl) @echo "Installing Tcl scripts: $(datadir)/vi/tcl ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/tcl && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/tcl @(cd $(visrcdir)/tcl_scripts && \ $(cp) *.tcl $(DESTDIR)$(datadir)/vi/tcl && \ cd $(DESTDIR)$(datadir)/vi/tcl && $(chmod) $(fmode) *.tcl) @echo "Installing recover script: $(datadir)/vi/recover ..." @($(cp) recover $(DESTDIR)$(datadir)/vi/recover && \ $(chmod) $(emode) $(DESTDIR)$(datadir)/vi/recover) uninstall-local: $(rm) -rf $(DESTDIR)$(datadir)/vi cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo ex.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo vi.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo view.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo ex.1 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo vi.1 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo view.1 | sed '$(transform)'` nvi-1.81.6/dist/acconfig.h0100644000076400001440000000613310720065506014342 0ustar skimousers/* $Id: acconfig.h,v 8.34 2002/01/19 23:01:35 skimo Exp $ (Berkeley) $Date: 2002/01/19 23:01:35 $ */ /* Define to `int' if doesn't define. */ #undef ssize_t /* Define if you want a debugging version. */ #undef DEBUG /* Define if you have a System V-style (broken) gettimeofday. */ #undef HAVE_BROKEN_GETTIMEOFDAY /* Define if you have a Ultrix-style (broken) vdisable. */ #undef HAVE_BROKEN_VDISABLE /* Define if you have a BSD version of curses. */ #undef HAVE_BSD_CURSES /* Define if you have wide ncurses(3). */ #undef HAVE_NCURSESW /* Define if you have the curses(3) waddnwstr function. */ #undef HAVE_CURSES_ADDNWSTR /* Define if you have the curses(3) waddnstr function. */ #undef HAVE_CURSES_WADDNSTR /* Define if you have the curses(3) beep function. */ #undef HAVE_CURSES_BEEP /* Define if you have the curses(3) flash function. */ #undef HAVE_CURSES_FLASH /* Define if you have the curses(3) idlok function. */ #undef HAVE_CURSES_IDLOK /* Define if you have the curses(3) keypad function. */ #undef HAVE_CURSES_KEYPAD /* Define if you have the curses(3) newterm function. */ #undef HAVE_CURSES_NEWTERM /* Define if you have the curses(3) setupterm function. */ #undef HAVE_CURSES_SETUPTERM /* Define if you have the curses(3) tigetstr/tigetnum functions. */ #undef HAVE_CURSES_TIGETSTR /* Define if you have the DB __hash_open call in the C library. */ #undef HAVE_DB_HASH_OPEN /* Define if you have the chsize(2) system call. */ #undef HAVE_FTRUNCATE_CHSIZE /* Define if you have the ftruncate(2) system call. */ #undef HAVE_FTRUNCATE_FTRUNCATE /* Define if you have gcc. */ #undef HAVE_GCC /* Define if you have fcntl(2) style locking. */ #undef HAVE_LOCK_FCNTL /* Define if you have flock(2) style locking. */ #undef HAVE_LOCK_FLOCK /* Define is appropriate pango is available */ #undef HAVE_PANGO /* Define if you want to compile in the Perl interpreter. */ #undef HAVE_PERL_INTERP /* Define if using pthread. */ #undef HAVE_PTHREAD /* Define if you have the Berkeley style revoke(2) system call. */ #undef HAVE_REVOKE /* Define if you have the Berkeley style strsep(3) function. */ #undef HAVE_STRSEP /* Define if you have */ #undef HAVE_SYS_MMAN_H /* Define if you have */ #undef HAVE_SYS_SELECT_H /* Define if you have the System V style pty calls. */ #undef HAVE_SYS5_PTY /* Define if you want to compile in the Tcl interpreter. */ #undef HAVE_TCL_INTERP /* Define is appropriate zvt is available */ #undef HAVE_ZVT /* Define if your sprintf returns a pointer, not a length. */ #undef SPRINTF_RET_CHARPNT /* Define when using db1 */ #undef USE_DB1 /* Define when using db4 logging */ #undef USE_DB4_LOGGING /* Define when dynamically loading DB 3 */ #undef USE_DYNAMIC_LOADING /* Define when iconv can be used */ #undef USE_ICONV /* Define when perl's setenv should be used */ #undef USE_PERL_SETENV /* Define when using S-Lang */ #undef USE_SLANG_CURSES /* Define when using wide characters */ #undef USE_WIDECHAR /* Define if you have */ #undef HAVE_NCURSES_H /* Define when fprintf prototype not in an obvious place */ #undef NEED_FPRINTF_PROTO nvi-1.81.6/dist/compile0100644000076400001440000000532610720065506013776 0ustar skimousers#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. # Copyright 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Usage: # compile PROGRAM [ARGS]... # `-o FOO.o' is removed from the args passed to the actual compile. prog=$1 shift ofile= cfile= args= while test $# -gt 0; do case "$1" in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we do something ugly here. ofile=$2 shift case "$ofile" in *.o | *.obj) ;; *) args="$args -o $ofile" ofile= ;; esac ;; *.c) cfile=$1 args="$args $1" ;; *) args="$args $1" ;; esac shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$prog" $args fi # Name of file we expect compiler to create. cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir $lockdir > /dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir $lockdir; exit 1" 1 2 15 # Run the compile. "$prog" $args status=$? if test -f "$cofile"; then mv "$cofile" "$ofile" fi rmdir $lockdir exit $status nvi-1.81.6/dist/configure.in0100644000076400001440000007704210720065506014740 0ustar skimousersdnl $Id: configure.in,v 8.192 2003/02/17 20:09:07 skimo Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(../common/main.c) AC_CONFIG_AUX_DIR(.) AM_INIT_AUTOMAKE(vi, 1.81.6) AM_CONFIG_HEADER(config.h) dnl Configure setup. AC_PROG_INSTALL() AC_CANONICAL_HOST dnl part of AM_INIT_AUTOMAKE ? dnl AC_ARG_PROGRAM() AC_PROG_LIBTOOL dnl If the user wants a debugging environment, set OPTFLAG now, some dnl compilers won't mix optimizing and debug flags.) AC_MSG_CHECKING(if --enable-debug option specified) AC_ARG_ENABLE(debug, [ --enable-debug Build a debugging version.], [vi_cv_debug=$enableval], [vi_cv_debug="no"]) AC_MSG_RESULT($vi_cv_debug) if test "$vi_cv_debug" = yes; then AC_DEFINE(DEBUG) OPTFLAG=${OPTFLAG-"-g"} no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} fi dnl This is where we handle stuff that autoconf can't handle. dnl XXX dnl Don't override anything if it's already set from the environment. dnl Compiler, preprocessor and load flags. dnl AUX: -ZP disables _BSD_SOURCE et al, but enables POSIX at link time. dnl LynxOS: We check for gcc 2.x or better, the gcc 1 that was shipped with dnl LynxOS historically wasn't good enough. AC_SUBST(CPPFLAGS) case "$host_os" in aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} OPTFLAG=${OPTFLAG-"-O3"};; aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} LDFLAGS=${LDFLAGS-"-ZP"} OPTFLAG=${OPTFLAG-"-O"};; bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; bsdi*) CC=${CC-"shlicc"} OPTFLAG=${OPTFLAG-"-O2"};; irix6*) OPTFLAG=${OPTFLAG-"-O2"};; irix*) OPTFLAG=${OPTFLAG-"-O2"};; lynxos*) AC_PROG_CC() AC_MSG_CHECKING([for GNU C (gcc) version 2.x]) ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ grep "gcc version " | sed 's/.*version //'` ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` if test "$ac_cv_gcc_major" = "2" ; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_WARN([Nvi requires gcc 2.x to build on LynxOS.]) AC_MSG_ERROR([See build/README.LynxOS for more information.]) fi;; nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} LDFLAGS=${LDFLAGS-"-posix"} OPTFLAG=${OPTFLAG-"-O2"};; osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; esac dnl The default OPTFLAG is -O AC_SUBST(OPTFLAG) OPTFLAG=${OPTFLAG-"-O"} dnl The default compiler is cc (NOT gcc), the default CFLAGS is empty, dnl NOT whatever AC_PROG_CC sets. AC_SUBST(CC) CC=${CC-cc} CFLAGS=${CFLAGS-""} AC_PROG_CC if test "$GCC" = yes; then AC_DEFINE(HAVE_GCC) fi dnl The SunOS/Solaris compiler can't optimize vi/v_txt.c; the symptom is dnl that the command 35i== turns into an infinite loop. AC_SUBST(no_op_OPTFLAG) no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} dnl Libraries. case "$host_os" in bsdi2.1) LIBS=${LIBS-"-lipc"};; dgux*) LIBS=${LIBS-"-ldgc"};; irix6*) LIBS=${LIBS-"-lbsd"};; irix*) LIBS=${LIBS-"-lc_s -lbsd"};; isc*) LIBS=${LIBS-"-lcposix -linet"};; netbsd1*) LIBS=${LIBS-"-lcrypt"};; ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; sco3.2*) LIBS=${LIBS-"-lsocket"};; sinix*) LIBS=${LIBS-"-lelf -lc"};; solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"};; wgs*) LIBS=${LIBS-"-lnsl"};; esac dnl A/UX has a broken getopt(3), strpbrk(3). case "$host_os" in aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; esac dnl Ultrix has a broken POSIX.1 VDISABLE value. case "$host_os" in ultrix*) AC_DEFINE(HAVE_BROKEN_VDISABLE);; esac AC_MSG_CHECKING(whether recording of pathnames of libraries is enabled) AC_ARG_ENABLE(runpath, [ --disable-runpath Don't record path of libraries in binary.], [vi_cv_runpath="$enableval"], [vi_cv_runpath="yes"]) AC_MSG_RESULT($vi_cv_runpath) if test "X$vi_cv_runpath" = "Xyes"; then LRscript='s/^\(.*\)/-R\1 -L\1 /' else LRscript='s/^\(.*\)/-L\1 /' fi dnl If the user wants a tracing version, add the TRACE compile flag. AC_MSG_CHECKING(if --enable-trace option specified) AC_ARG_ENABLE(trace, [ --enable-trace Build a tracing version.], [vi_cv_trace="yes"], [vi_cv_trace="no"]) if test "$vi_cv_trace" = yes; then CPPFLAGS="-DTRACE $CPPFLAGS" fi AC_MSG_RESULT($vi_cv_trace) dnl The user may have additional CPP information. CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" dnl The user may have additional load line information. LDFLAGS="$ADDLDFLAGS $LDFLAGS" dnl The user may have additional library information. LIBS="$ADDLIBS $LIBS" dnl Checks for programs. PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib" dnl Check for the shell path. AC_PATH_PROG(vi_cv_path_shell, sh, no) if test "$vi_cv_path_shell" = no; then AC_MSG_ERROR([No shell utility found.]) fi dnl Check for the sendmail path. AC_PATH_PROG(vi_cv_path_sendmail, sendmail, no) if test "$vi_cv_path_sendmail" = no; then AC_MSG_WARN([No sendmail utility found;]) AC_MSG_WARN([ users will not be told of saved files.]) fi dnl Check for the perl5/perl path. AC_SUBST(vi_cv_path_perl) AC_PATH_PROGS(vi_cv_path_perl, perl5 perl, no) dnl Check for the "preserve" path. dnl Historically, nvi has used /var/tmp/vi.recover. The Linux filesystem dnl standard (FSSTND) uses /var/preserve; we add the vi.recover directory dnl beneath it so that we don't have name collisions with other editors. dnl Other systems have /var/preserve as well, so we test first for an already dnl existing name, and then use the first one that's writeable. AC_SUBST(vi_cv_path_preserve) AC_MSG_CHECKING(for preserve directory) AC_CACHE_VAL(vi_cv_path_preserve, [dnl dirlist="/var/preserve /var/tmp /usr/tmp" vi_cv_path_preserve=no for i in $dirlist; do if test -d $i/vi.recover; then vi_cv_path_preserve=$i/vi.recover break; fi done if test "$vi_cv_path_preserve" = no; then for i in $dirlist; do if test -d $i -a -w $i; then vi_cv_path_preserve=$i/vi.recover break; fi done fi]) if test "$vi_cv_path_preserve" = no; then AC_MSG_ERROR([No writeable preserve directory found.]) fi AC_MSG_RESULT($vi_cv_path_preserve) AC_PATH_PROG(vi_cv_path_fuser, fuser, no) AC_PATH_PROG(vi_cv_path_lsof, lsof, no) AC_SUBST(INUSE) INUSE="" if test "$vi_cv_path_lsof" != no; then INUSE='test `lsof -t $i`' fi if test "$vi_cv_path_fuser" != no; then INUSE='fuser -s $i' fi dnl Check for programs used for installation AC_PROG_AWK AC_PATH_PROG(vi_cv_path_ar, ar, missing_ar) AC_PATH_PROG(vi_cv_path_chmod, chmod, missing_chmod) AC_PATH_PROG(vi_cv_path_cp, cp, missing_cp) AC_PATH_PROG(vi_cv_path_ln, ln, missing_ln) AC_PATH_PROG(vi_cv_path_mkdir, mkdir, missing_mkdir) AC_PATH_PROG(vi_cv_path_rm, rm, missing_rm) AC_PATH_PROG(vi_cv_path_ranlib, ranlib, missing_ranlib) AC_PATH_PROG(vi_cv_path_strip, strip, missing_strip) dnl Checks for libraries. dnl Find the X libraries and includes. AC_PATH_X AC_SUBST(XINCS) if test "$no_x" != yes; then if test "X$x_libraries" != "X"; then XLIBS="`echo $x_libraries | sed "$LRscript"` $XLIBS" fi XLIBS="$XLIBS -lX11" if test "X$x_includes" != "X"; then XINCS="-I$x_includes" fi fi AC_DEFUN([VI_CV_REPLACE_FUNCS], [AC_FOREACH([AC_Func], [$1], [])dnl AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)]) ]) dnl Check if the user wants widechar support. AC_MSG_CHECKING(if --enable-widechar option specified) AC_ARG_ENABLE(widechar, [ --enable-widechar Build a wide char aware vi.], [vi_cv_widechar=$enableval], [vi_cv_widechar="no"]) if test "$vi_cv_widechar" = "yes"; then AC_DEFINE(USE_WIDECHAR) fi AC_MSG_RESULT($vi_cv_widechar) dnl Check whether we can use iconv AC_CHECK_HEADER(langinfo.h, [ AC_CHECK_HEADER(iconv.h, [ AC_DEFINE(USE_ICONV) VI_CV_REPLACE_FUNCS(iswblank) ]) ]) dnl If the user wants a Gtk IPC front-end for nvi, build it. AC_SUBST(vi_programs) AC_SUBST(vi_ipc) AC_SUBST(GTKLIBS) AC_SUBST(GTKINCS) AC_MSG_CHECKING(if --enable-gtk option specified) AC_ARG_ENABLE(gtk, [ --enable-gtk Build a Gtk front-end for vi.], [vi_cv_gtk=$enableval], [vi_cv_gtk="no"]) AC_MSG_RESULT($vi_cv_gtk) if test "$vi_cv_gtk" = "yes"; then # # Find pkg-config # AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test x$PKG_CONFIG = xno ; then if test "$vi_cv_widechar" = "yes"; then AC_MSG_ERROR( [*** pkg-config not found. See http://pkgconfig.sourceforge.net]) fi else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then if test "$vi_cv_widechar" = "yes"; then AC_MSG_ERROR( [*** pkg-config too old; version 0.5 or better required.]) fi PKG_CONFIG=no fi fi if test x$PKG_CONFIG = xno ; then PKG_CONFIG=/bin/false fi vi_programs="$vi_programs vi-gtk" vi_ipc=vi-ipc AC_MSG_CHECKING(for gtk+) if $PKG_CONFIG gtk+-2.0 ; then GTKINCS=`$PKG_CONFIG --cflags gtk+-2.0` GTKLIBS=`$PKG_CONFIG --libs gtk+-2.0` AC_MSG_RESULT(ok) AC_DEFINE(HAVE_PANGO) else if test "$vi_cv_widechar" = "yes"; then AC_MSG_ERROR([ *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. ]) else AM_PATH_GTK(1.2.0) GTKINCS="$GTK_CFLAGS" GTKLIBS="$GTK_LIBS $LIBS" fi fi SAVELIBS="$LIBS" LIBS="-lutil $GTKLIBS" AC_CHECK_LIB(nvizvt, zvt_get_ptys, [vi_cv_zvt="yes"], [vi_cv_zvt="no"]) if test "$vi_cv_zvt" = "yes"; then GTKLIBS="-lnvizvt $LIBS" AC_DEFINE(HAVE_ZVT) fi LIBS="$SAVELIBS" # AC_PATH_PROG(vi_cv_gnome_config, gnome-config, no) # if test "$vi_cv_gnome_config" != "no"; then # ZVTLIBS=`$vi_cv_gnome_config zvt --libs` # GTKLIBS="$ZVTLIBS $GTKLIBS" # fi fi dnl If the user wants a Motif IPC front-end for nvi, build it. AC_SUBST(MOTIFLIBS) AC_MSG_CHECKING(if --enable-motif option specified) AC_ARG_ENABLE(motif, [ --enable-motif Build a Motif front-end for vi.], [vi_cv_motif=$enableval], [vi_cv_motif="no"]) AC_MSG_RESULT($vi_cv_motif) if test "$vi_cv_motif" = "yes"; then vi_programs="$vi_programs vi-motif" vi_ipc=vi-ipc dnl XXX dnl BSDI's Motif libraries aren't shared. case "$host_os" in bsdi*) CC=cc;; esac dnl XXX dnl The Xinside Motif distribution requires -lSM, -lICE and -lXext. dnl -lXext is generally available, the others aren't. dnl dnl XXX dnl Color icons require -lXpm, which may or may not be available, dnl depending on the version of X11. MOTIFLIBS="-lXm -lXt" AC_CHECK_LIB(SM, main, [vi_cv_smlib="yes"], [vi_cv_smlib="no"], "$XLIBS") if test "$vi_cv_smlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lSM" fi AC_CHECK_LIB(ICE, main, [vi_cv_icelib="yes"], [vi_cv_icelib="no"], "$XLIBS") if test "$vi_cv_icelib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lICE" fi AC_CHECK_LIB(Xext, main, [vi_cv_xextlib="yes"], [vi_cv_xextlib="no"], "$XLIBS") if test "$vi_cv_xextlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXext" fi AC_CHECK_LIB(Xpm, main, [vi_cv_xpmlib="yes"], [vi_cv_xpmlib="no"], "$XLIBS") if test "$vi_cv_xpmlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXpm" fi MOTIFLIBS="$MOTIFLIBS $XLIBS -lm $LIBS" fi AC_SUBST(IPCOBJS) dnl Check for threads AC_MSG_CHECKING(if --enable-threads option specified) AC_ARG_ENABLE(threads, [ --enable-threads Turn on thread support.], [vi_cv_threads=$enableval], [vi_cv_threads="no"]) AC_MSG_RESULT($vi_cv_threads) if test "$vi_cv_threads" = "yes"; then LIBS="$LIBS -lpthread" AC_CACHE_VAL(vi_cv_have_pthreads, [dnl AC_TRY_LINK([#include ], [pthread_self()], [vi_cv_have_pthreads=yes], [vi_cv_have_pthreads=no])]) if test "$vi_cv_have_pthreads" = "no"; then AC_MSG_ERROR(No threading library found) fi IPCOBJS="pthread.o $IPCOBJS" AC_DEFINE(HAVE_PTHREAD) else IPCOBJS="nothread.o $IPCOBJS" fi dnl If the user wants a Perl interpreter in nvi, load it. AC_SUBST(shrpenv) AC_SUBST(perlldflags) AC_SUBST(perllibs) AC_SUBST(vi_cv_perllib) AC_MSG_CHECKING(if --enable-perlinterp option specified) AC_ARG_ENABLE(perlinterp, [ --enable-perlinterp Include a Perl interpreter in vi.], [vi_cv_perlinterp=$enableval], [vi_cv_perlinterp="no"]) AC_MSG_RESULT($vi_cv_perlinterp) if test "$vi_cv_perlinterp" = "yes"; then if test "$vi_cv_path_perl" = no; then AC_MSG_ERROR([No perl5 utility found.]) fi $vi_cv_path_perl -e 'require 5.004' || { AC_MSG_ERROR([perl5 must be version 5.004 or later.]) } if test "$vi_cv_threads" = "yes"; then useithreads=`$vi_cv_path_perl -MConfig -e 'print $Config{useithreads}'` if test "X$useithreads" != "Xdefine"; then AC_MSG_ERROR([vi threading only compatible with perl's ithreads.]) fi fi eval `$vi_cv_path_perl -V:shrpenv` vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ -e 'ccflags;perl_inc'` if test "X$perlcppflags" != "X"; then CPPFLAGS="$perlcppflags $CPPFLAGS" fi perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ldopts'` perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ccdlflags'` LIBOBJS="perl.o perlxsi.o perlsfio.o $LIBOBJS" AC_DEFINE(HAVE_PERL_INTERP) AC_CACHE_CHECK([whether we need to use perl's setenv], vi_cv_perl_setenv, [ AC_TRY_RUN([ #include #include #include int main(){ #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV) exit(0); #else exit(1); #endif } ], [vi_cv_perl_setenv=yes], [vi_cv_perl_setenv=no])]) if test "$vi_cv_perl_setenv" = yes; then AC_DEFINE(USE_PERL_SETENV) fi fi dnl If the user wants a Tk/Tcl interpreter in nvi, load it. Make sure that dnl we can find a Tk/Tcl library. AC_MSG_CHECKING(if --enable-tclinterp option specified) AC_ARG_ENABLE(tclinterp, [ --enable-tclinterp Include a Tk/Tcl interpreter in vi.], [vi_cv_tclinterp=$enableval], [vi_cv_tclinterp="no"]) AC_MSG_RESULT($vi_cv_tclinterp) if test "$vi_cv_tclinterp" = "yes"; then AC_MSG_CHECKING([for tclConfig.sh]) AC_CACHE_VAL(vi_cv_tclconfig, [ vi_cv_tclconfig=`$srcdir/findconfig`]) AC_MSG_RESULT($vi_cv_tclconfig) if test "x$vi_cv_tclconfig" = x; then AC_MSG_ERROR([No Tcl library found;]) fi . $vi_cv_tclconfig LIBOBJS="tcl.o $LIBOBJS" LIBS="$TCL_LIB_SPEC $TCL_LIBS $LIBS" AC_DEFINE(HAVE_TCL_INTERP) fi dnl check for curses AC_SUBST(CURSLIBS) AC_SUBST(CURSCPPFLAGS) AC_SUBST(CURSLDFLAGS) AC_SUBST(HAVE_NCURSESW) dnl AC_ARG_WITH(slang, dnl [ --with-slang[=DIR] Use S-Lang instead of curses. ], dnl [ dnl if test "$withval" != yes; then dnl LDFLAGS="-L${withval}/lib $LDFLAGS" dnl CPPFLAGS="-I${withval}/include $CPPFLAGS" dnl fi dnl AC_DEFINE(USE_SLANG_CURSES) dnl AC_CHECK_LIB(slang, SLtt_get_terminfo, dnl [CURSLIBS="$CURSLIBS -lslang -lm"], dnl [AC_MSG_ERROR(unable to compile. check config.log)], -lm) dnl dnl vi_cv_curses=slcurses dnl ], dnl [ SAVELIBS="$LIBS" SAVELDFLAGS="$LDFLAGS" SAVECPPFLAGS="$CPPFLAGS" AC_ARG_WITH(curses, [ --with-curses=DIR Path to curses installation. ]) if test "x$with_curses" != "x"; then CURSLDFLAGS="`echo $with_curses/lib | sed "$LRscript"` $CURSLDFLAGS" CURSCPPFLAGS="-I$with_curses/include $CURSCPPFLAGS" fi; LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" if test "$vi_cv_widechar" = "yes"; then for vi_cv_curses in ncurses ncursesw curses; do AC_CHECK_LIB($vi_cv_curses, waddnwstr,[break]) vi_cv_curses=unknown done else for vi_cv_curses in ncurses ncursesw curses; do AC_CHECK_LIB($vi_cv_curses, initscr, [break]) vi_cv_curses=unknown done fi if test "$vi_cv_curses" != "unknown"; then CURSHEADER=curses.h if test "$vi_cv_curses" = "ncurses"; then AC_CHECK_HEADERS(ncurses.h, [CURSHEADER=ncurses.h]) fi if test "$vi_cv_curses" = "ncursesw"; then AC_CHECK_HEADERS(ncursesw/ncurses.h, [CURSHEADER=ncursesw/ncurses.h]) fi vi_programs="vi $vi_programs" CURSLIBS="-l$vi_cv_curses" else AC_MSG_WARN([*** No suitable curses library found.]) if test "$vi_programs"X = X; then AC_MSG_ERROR([No executable to build.]) fi fi dnl Check for the termcap/termlib library. These two checks must occur in the dnl current order, and -lcurses must be loaded before -ltermcap/-ltermlib. dnl On Solaris curses==termlib, but different versions of curses dnl can be used. Avoid loading termlib is curses has tgetent. AC_CHECK_LIB($vi_cv_curses, tgetent, [vi_cv_curses_tgetent=yes], [vi_cv_curses_tgetent=no]) if test "$vi_cv_curses_tgetent" = no; then AC_CHECK_LIB(termlib, tgetent, [vi_cv_termlib=-ltermlib], [vi_cv_termlib=no]) if test "$vi_cv_termlib" = no; then AC_CHECK_LIB(termcap, tgetent, [vi_cv_termlib=-ltermcap], [vi_cv_termlib=no]) fi fi if test "$vi_cv_termlib" != no; then CURSLIBS="$CURSLIBS $vi_cv_termlib" fi LIBS="$SAVELIBS" LDFLAGS="$SAVELDFLAGS" CPPFLAGS="$SAVECPPFLAGS" dnl ]) dnl Checks for header files. AC_MSG_CHECKING(for sys/mman.h) AC_CACHE_VAL(vi_cv_include_sys_mman, [dnl AC_TRY_CPP([#include ], [vi_cv_include_sys_mman=yes], [vi_cv_include_sys_mman=no])]) if test "$vi_cv_include_sys_mman" = yes; then AC_DEFINE(HAVE_SYS_MMAN_H) fi AC_MSG_RESULT($vi_cv_include_sys_mman) AC_MSG_CHECKING(for sys/select.h) AC_CACHE_VAL(vi_cv_include_sys_select, [dnl AC_TRY_CPP([#include ], [vi_cv_include_sys_select=yes], [vi_cv_include_sys_select=no])]) if test "$vi_cv_include_sys_select" = yes; then AC_DEFINE(HAVE_SYS_SELECT_H) fi AC_MSG_RESULT($vi_cv_include_sys_select) dnl Checks for typedefs, structures, and compiler characteristics. AC_CHECK_TYPE(ssize_t, int) AC_C_BIGENDIAN AC_C_CONST AC_STRUCT_ST_BLKSIZE AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl Checks for library functions. VI_CV_REPLACE_FUNCS(bsearch gethostname memchr memset) VI_CV_REPLACE_FUNCS(mkstemp mmap strdup strpbrk) VI_CV_REPLACE_FUNCS(snprintf vsnprintf) AC_CHECK_FUNCS(select) AC_CHECK_FUNCS(setenv, [need_env=no], [need_env=yes]) AC_CHECK_FUNCS(strsep, [need_strsep=no], [need_strsep=yes]) AC_CHECK_FUNCS(unsetenv,, [need_env=yes]) AC_FUNC_MMAP AC_FUNC_VFORK dnl If we needed setenv or unsetenv, add in the clib/env.c replacement file. if test "$need_env" = yes; then LIBOBJS="env.o $LIBOBJS" fi dnl If we need strsep, add it and define it so we get a prototype. if test "$need_strsep" = yes; then LIBOBJS="strsep.o $LIBOBJS" fi dnl Check for fcntl/flock dnl Use flock preferentially, since it has cleaner semantics and won't dnl hang up the editor. dnl XXX dnl Ultrix has a broken fcntl, but a working flock. dnl IRIX and DGUX have a broken flock, but working fcntl. AC_MSG_CHECKING(for fcntl/flock) AC_CACHE_VAL(vi_cv_lock, [dnl vi_cv_lock=none case "$host_os" in dgux*);; irix*);; *) AC_TRY_LINK([#include ], [flock(0, 0);], [vi_cv_lock=flock]);; esac if test "$vi_cv_lock" = none; then AC_TRY_LINK([#include ], [fcntl(0, F_SETLK, 0);], [vi_cv_lock=fcntl]) fi]) if test "$vi_cv_lock" = flock; then AC_DEFINE(HAVE_LOCK_FLOCK) fi if test "$vi_cv_lock" = fcntl; then AC_DEFINE(HAVE_LOCK_FCNTL) fi AC_MSG_RESULT($vi_cv_lock) dnl Check for ftruncate/chsize AC_MSG_CHECKING(for ftruncate/chsize) AC_CACHE_VAL(vi_cv_ftruncate, [dnl AC_TRY_LINK([#include ], [ftruncate(0, 0);], [vi_cv_ftruncate=ftruncate], AC_TRY_LINK([#include ], [chsize(0, 0);], [vi_cv_ftruncate=chsize], [vi_cv_ftruncate=no]))]) if test "$vi_cv_ftruncate" = ftruncate; then AC_DEFINE(HAVE_FTRUNCATE_FTRUNCATE) fi if test "$vi_cv_ftruncate" = chsize; then AC_DEFINE(HAVE_FTRUNCATE_CHSIZE) fi if test "$vi_cv_ftruncate" = no; then AC_MSG_ERROR([No file truncation system call.]) fi AC_MSG_RESULT($vi_cv_ftruncate) CSAVELIBS="$LIBS" CSAVELDFLAGS="$LDFLAGS" CSAVECPPFLAGS="$CPPFLAGS" LIBS="$CURSLIBS $LIBS" LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" dnl Check for the tigetstr/tigetnum functions. AC_MSG_CHECKING(for tigetstr/tigetnum) AC_CACHE_VAL(vi_cv_have_curses_tigetstr, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [tigetstr(0);], [vi_cv_have_curses_tigetstr=yes], [vi_cv_have_curses_tigetstr=no])]) if test "$vi_cv_have_curses_tigetstr" = yes; then AC_DEFINE(HAVE_CURSES_TIGETSTR) fi AC_MSG_RESULT($vi_cv_have_curses_tigetstr) dnl Check for potentially missing curses functions in system or user-specified dnl libraries. We also have to guess at whether the specified library is a dnl BSD or System V style curses. Use the newterm function, all System V dnl curses implementations have it, none, as far as I know, of the BSD ones do. if test "$vi_cv_curses" = "bundled curses"; then AC_DEFINE(HAVE_BSD_CURSES) AC_DEFINE(HAVE_CURSES_WADDNSTR) AC_DEFINE(HAVE_CURSES_IDLOK) else dnl Check for the waddnstr function. AC_MSG_CHECKING(for waddnstr) AC_CACHE_VAL(vi_cv_have_curses_waddnstr, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [waddnstr(stdscr, 0, 0);], [vi_cv_have_curses_waddnstr=yes], [vi_cv_have_curses_waddnstr=no])]) if test "$vi_cv_have_curses_waddnstr" = yes; then AC_DEFINE(HAVE_CURSES_WADDNSTR) fi AC_MSG_RESULT($vi_cv_have_curses_waddnstr) dnl Check for the beep function. AC_MSG_CHECKING(for beep) AC_CACHE_VAL(vi_cv_have_curses_beep, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [beep();], [vi_cv_have_curses_beep=yes], [vi_cv_have_curses_beep=no])]) if test "$vi_cv_have_curses_beep" = yes; then AC_DEFINE(HAVE_CURSES_BEEP) fi AC_MSG_RESULT($vi_cv_have_curses_beep) dnl Check for the flash function. AC_MSG_CHECKING(for flash) AC_CACHE_VAL(vi_cv_have_curses_flash, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [flash();], [vi_cv_have_curses_flash=yes], [vi_cv_have_curses_flash=no])]) if test "$vi_cv_have_curses_flash" = yes; then AC_DEFINE(HAVE_CURSES_FLASH) fi AC_MSG_RESULT($vi_cv_have_curses_flash) dnl Check for the idlok function. AC_MSG_CHECKING(for idlok) AC_CACHE_VAL(vi_cv_have_curses_idlok, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [idlok(0, 0);], [vi_cv_have_curses_idlok=yes], [vi_cv_have_curses_idlok=no])]) if test "$vi_cv_have_curses_idlok" = yes; then AC_DEFINE(HAVE_CURSES_IDLOK) fi AC_MSG_RESULT($vi_cv_have_curses_idlok) dnl Check for the keypad function. AC_MSG_CHECKING(for keypad) AC_CACHE_VAL(vi_cv_have_curses_keypad, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [keypad(0, 0);], [vi_cv_have_curses_keypad=yes], [vi_cv_have_curses_keypad=no])]) if test "$vi_cv_have_curses_keypad" = yes; then AC_DEFINE(HAVE_CURSES_KEYPAD) fi AC_MSG_RESULT($vi_cv_have_curses_keypad) dnl Check for the newterm function. AC_MSG_CHECKING(for newterm) AC_CACHE_VAL(vi_cv_have_curses_newterm, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [newterm(0, 0, 0);], [vi_cv_have_curses_newterm=yes], [vi_cv_have_curses_newterm=no])]) if test "$vi_cv_have_curses_newterm" = yes; then AC_DEFINE(HAVE_CURSES_NEWTERM) fi AC_MSG_RESULT($vi_cv_have_curses_newterm) if test "$vi_cv_have_curses_newterm" = no; then AC_DEFINE(HAVE_BSD_CURSES) fi fi dnl Check for the setupterm function. We make this check regardless of dnl using the system library, because it may be part of the underlying dnl termcap/termlib support, and we want to use the local one. AC_MSG_CHECKING(for setupterm) AC_CACHE_VAL(vi_cv_have_curses_setupterm, [dnl AC_TRY_LINK([#include <$CURSHEADER>], [setupterm(0, 0, 0);], [vi_cv_have_curses_setupterm=yes], [vi_cv_have_curses_setupterm=no])]) if test "$vi_cv_have_curses_setupterm" = yes; then AC_DEFINE(HAVE_CURSES_SETUPTERM) fi AC_MSG_RESULT($vi_cv_have_curses_setupterm) LIBS="$CSAVELIBS" LDFLAGS="$CSAVELDFLAGS" CPPFLAGS="$CSAVECPPFLAGS" dnl Some moron decided to drop off an argument from the gettimeofday call, dnl without changing the name. AC_MSG_CHECKING(for broken gettimeofday system call) AC_CACHE_VAL(vi_cv_gettimeofday, [dnl AC_TRY_LINK([#include #include ], [gettimeofday(0, 0);], [vi_cv_gettimeofday=okay], [vi_cv_gettimeofday=broken])]) if test "$vi_cv_gettimeofday" = broken; then AC_DEFINE(HAVE_BROKEN_GETTIMEOFDAY) fi AC_MSG_RESULT($vi_cv_gettimeofday) dnl Check for which version of openpty to use, System V or Berkeley. AC_MSG_CHECKING(for System V pty calls) AC_CACHE_VAL(vi_cv_sys5_pty, [dnl AC_TRY_LINK(, [grantpt(0);], [vi_cv_sys5_pty=yes], [vi_cv_sys5_pty=no])]) if test "$vi_cv_sys5_pty" = yes; then AC_DEFINE(HAVE_SYS5_PTY) fi AC_MSG_RESULT($vi_cv_sys5_pty) dnl Check for the revoke system call. AC_MSG_CHECKING(for revoke system call) AC_CACHE_VAL(vi_cv_revoke, [dnl AC_TRY_LINK(, [revoke("a");], [vi_cv_revoke=yes], [vi_cv_revoke=no])]) if test "$vi_cv_revoke" = yes; then AC_DEFINE(HAVE_REVOKE) fi AC_MSG_RESULT($vi_cv_revoke) dnl Some versions of sprintf return a pointer to the first argument instead dnl of a character count. We assume that the return value of snprintf and dnl vsprintf etc. will be the same as sprintf, and check the easy one. AC_MSG_CHECKING(for int type sprintf return value) AC_CACHE_VAL(vi_cv_sprintf_count, [dnl AC_TRY_RUN([main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);}], [vi_cv_sprintf_count=yes], [vi_cv_sprintf_count=no])]) if test "$vi_cv_sprintf_count" = no; then AC_DEFINE(SPRINTF_RET_CHARPNT) fi AC_MSG_RESULT($vi_cv_sprintf_count) dnl Check for the standard shorthand types. AC_SUBST(u_char_decl) AC_CACHE_CHECK([for u_char], vi_cv_uchar, [dnl AC_TRY_COMPILE([#include ], u_char foo;, [vi_cv_uchar=yes], [vi_cv_uchar=no])]) if test "$vi_cv_uchar" = no; then u_char_decl="typedef unsigned char u_char;" fi AC_SUBST(u_short_decl) AC_CACHE_CHECK([for u_short], vi_cv_ushort, [dnl AC_TRY_COMPILE([#include ], u_short foo;, [vi_cv_ushort=yes], [vi_cv_ushort=no])]) if test "$vi_cv_ushort" = no; then u_short_decl="typedef unsigned short u_short;" fi AC_SUBST(u_int_decl) AC_CACHE_CHECK([for u_int], vi_cv_uint, [dnl AC_TRY_COMPILE([#include ], u_int foo;, [vi_cv_uint=yes], [vi_cv_uint=no])]) if test "$vi_cv_uint" = no; then u_int_decl="typedef unsigned int u_int;" fi AC_SUBST(u_long_decl) AC_CACHE_CHECK([for u_long], vi_cv_ulong, [dnl AC_TRY_COMPILE([#include ], u_long foo;, [vi_cv_ulong=yes], [vi_cv_ulong=no])]) if test "$vi_cv_ulong" = no; then u_long_decl="typedef unsigned long u_long;" fi dnl DB/Vi use specific integer sizes. AC_SUBST(u_int8_decl) AC_CACHE_CHECK([for u_int8_t], vi_cv_uint8, [dnl AC_TRY_COMPILE([#include ], u_int8_t foo;, [vi_cv_uint8=yes], AC_TRY_RUN([main(){exit(sizeof(unsigned char) != 1);}], [vi_cv_uint8="unsigned char"], [vi_cv_uint8=no]))]) if test "$vi_cv_uint8" = no; then AC_MSG_ERROR(No unsigned 8-bit integral type.) fi if test "$vi_cv_uint8" != yes; then u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" fi AC_SUBST(u_int16_decl) AC_CACHE_CHECK([for u_int16_t], vi_cv_uint16, [dnl AC_TRY_COMPILE([#include ], u_int16_t foo;, [vi_cv_uint16=yes], AC_TRY_RUN([main(){exit(sizeof(unsigned short) != 2);}], [vi_cv_uint16="unsigned short"], AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 2);}], [vi_cv_uint16="unsigned int"], [vi_cv_uint16=no])))]) if test "$vi_cv_uint16" = no; then AC_MSG_ERROR([No unsigned 16-bit integral type.]) fi if test "$vi_cv_uint16" != yes; then u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" fi AC_SUBST(int16_decl) AC_CACHE_CHECK([for int16_t], vi_cv_int16, [dnl AC_TRY_COMPILE([#include ], int16_t foo;, [vi_cv_int16=yes], AC_TRY_RUN([main(){exit(sizeof(short) != 2);}], [vi_cv_int16="short"], AC_TRY_RUN([main(){exit(sizeof(int) != 2);}], [vi_cv_int16="int"], [vi_cv_int16=no])))]) if test "$vi_cv_int16" = no; then AC_MSG_ERROR([No signed 16-bit integral type.]) fi if test "$vi_cv_int16" != yes; then int16_decl="typedef $vi_cv_int16 int16_t;" fi AC_SUBST(u_int32_decl) AC_CACHE_CHECK([for u_int32_t], vi_cv_uint32, [dnl AC_TRY_COMPILE([#include ], u_int32_t foo;, [vi_cv_uint32=yes], AC_TRY_RUN([main(){exit(sizeof(unsigned int) != 4);}], [vi_cv_uint32="unsigned int"], AC_TRY_RUN([main(){exit(sizeof(unsigned long) != 4);}], [vi_cv_uint32="unsigned long"], [vi_cv_uint32=no])))]) if test "$vi_cv_uint32" = no; then AC_MSG_ERROR([No unsigned 32-bit integral type.]) fi if test "$vi_cv_uint32" != yes; then u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" fi AC_SUBST(int32_decl) AC_CACHE_CHECK([for int32_t], vi_cv_int32, [dnl AC_TRY_COMPILE([#include ], int32_t foo;, [vi_cv_int32=yes], AC_TRY_RUN([main(){exit(sizeof(int) != 4);}], [vi_cv_int32="int"], AC_TRY_RUN([main(){exit(sizeof(long) != 4);}], [vi_cv_int32="long"], [vi_cv_int32=no])))]) if test "$vi_cv_int32" = no; then AC_MSG_ERROR([No signed 32-bit integral type.]) fi if test "$vi_cv_int32" != yes; then int32_decl="typedef $vi_cv_int32 int32_t;" fi AC_CACHE_CHECK([return type of fprintf], vi_cv_type_fprintf, [AC_TRY_COMPILE([#include int fprintf (); ],[int i;], vi_cv_type_fprintf=int, vi_cv_type_fprintf=void)]) AC_SUBST(NEED_FPRINTF_PROTO) AC_CACHE_CHECK([fprintf prototype needed], vi_cv_proto_fprintf, [AC_TRY_COMPILE([ #include typedef int (*funcPtr)(); ],[funcPtr ptr = (funcPtr) fprintf;], vi_cv_proto_fprintf=no, [vi_cv_proto_fprintf=yes])]) if test "$vi_cv_proto_fprintf" = yes; then AC_DEFINE(NEED_FPRINTF_PROTO) fi AC_ARG_WITH(db_type, [ --with-db=bundled|system Which db to use. ]) case "$with_db_type" in "db1") AC_MSG_WARN([Use of db1 is not officially supported.]) AC_DEFINE(USE_DB1) ;; "system") ;; *) with_db_type="bundled" ;; esac dnl Check for DB 3 AC_ARG_WITH(db_prefix, [ --with-db-prefix=PFX Path to db installation. ]) SAVELDFLAGS="$LDFLAGS" if test "x$with_db_prefix" != "x"; then LDFLAGS="-L$with_db_prefix/lib $LDFLAGS" CPPFLAGS="-I$with_db_prefix/include $CPPFLAGS" fi if test "$with_db_type" != db1; then SAVELIBS="$LIBS" LIBS="$LIBS -ldb" AC_TRY_LINK([#include ], [db_create(NULL,NULL,0)], [vi_cv_dbfatal="no"], [vi_cv_dbfatal="yes"]) if test "$vi_cv_dbfatal" = "yes"; then AC_MSG_ERROR([Need DB 3.]) fi LIBS="$SAVELIBS" fi LDFLAGS="$SAVELDFLAGS" AC_SUBST(dl_src) AC_MSG_CHECKING(if --enable-dynamic-loading option specified) AC_ARG_ENABLE(dynamic-loading, [ --enable-dynamic-loading Load DB 3 dynamically.], [vi_cv_dl=$enableval], [vi_cv_dl="no"]) AC_MSG_RESULT($vi_cv_dl) if test "$vi_cv_dl" = yes; then AC_CHECK_LIB(dl, dlopen, [vi_cv_dlfatal="no"], [vi_cv_dlfatal="yes"]) if test "$vi_cv_dlfatal" = "yes"; then AC_MSG_ERROR([Need dl to support dynamic loading.]) fi OLDPATH="$PATH" PATH="$with_db_prefix/lib:/usr/lib:/lib" AC_PATH_PROG(vi_cv_path_db3, libdb-3.so, no) if test "$vi_cv_path_db3" = no; then AC_MSG_ERROR([Path of libdb-3.so not found.]) fi PATH="$OLDPATH" AC_DEFINE(USE_DYNAMIC_LOADING) LIBOBJS="dldb.o $LIBOBJS" dl_src=../common/dldb.c LIBS="-ldl $LIBS" else LIBS="-ldb $LIBS" if test "X$with_db_prefix" != "X"; then LDFLAGS="`echo $with_db_prefix/lib | sed "$LRscript"` $LDFLAGS" fi fi AC_ARG_WITH(db_build, [ --with-db-build=prefix Path to db build. ]) if test "x$with_db_build" != "x"; then vi_cv_dbsrc=`$AWK '/^srcdir/ {gsub("srcdir[[ \t]]*=","");print $1}' \ $with_db_build/Makefile` case $with_db_build in *[[\\/]]);; *) with_db_build="$with_db_build/";; esac case $vi_cv_dbsrc in [[\\/]]*);; *) vi_cv_dbsrc="$with_db_build$vi_cv_dbsrc";; esac fi; vi_cv_db4="no" AC_ARG_ENABLE(log4, [ --enable-db4-logging Enable experimental/broken db4 logging.], [ AC_MSG_CHECKING(for DB 4) AC_EGREP_CPP([^4], [#include DB_VERSION_MAJOR], [vi_cv_db4="yes"], [vi_cv_db4="no"]) AC_MSG_RESULT($vi_cv_db4) ]) if test "$vi_cv_db4" = "yes"; then CPPFLAGS="-I$vi_cv_dbsrc/include $CPPFLAGS" CPPFLAGS="-I$vi_cv_dbsrc/include_auto $CPPFLAGS" CPPFLAGS="-I$with_db_build $CPPFLAGS" AC_DEFINE(USE_DB4_LOGGING) LIBOBJS="log4.o vi_auto.o vi_rec.o $LIBOBJS" else LIBOBJS="log.o $LIBOBJS" fi dnl We compile in nvi's RE routines unless the user specifies otherwise. AC_MSG_CHECKING(if --disable-re option specified) AC_ARG_ENABLE(re, [ --disable-re DON'T use the nvi-provided RE routines.], [if test "$enable_re" = "yes"; then vi_cv_re_lib="bundled RE" else vi_cv_re_lib="other RE" fi],[vi_cv_re_lib="bundled RE"]) AC_MSG_RESULT($vi_cv_re_lib) case "$vi_cv_re_lib" in "bundled RE") CPPFLAGS="-I\$(visrcdir)/regex $CPPFLAGS" LIBOBJS="regcomp.o regerror.o regexec.o regfree.o $LIBOBJS";; "other RE") ;; esac AC_OUTPUT(Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in) nvi-1.81.6/dist/depcomp0100644000076400001440000002752510720065506014002 0ustar skimousers#! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 AIX compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. tmpdepfile1="$object.d" tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` if test "$libtool" = yes; then "$@" -Wc,-MD else "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. test -z "$dashmflag" && dashmflag=-M ( IFS=" " case " $* " in *" --mode=compile "*) # this is libtool, let us make it quiet for arg do # cycle over the arguments case "$arg" in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) # X makedepend ( shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift;; -*) ;; *) set fnord "$@" "$arg"; shift;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tail +3 "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. ( IFS=" " case " $* " in *" --mode=compile "*) for arg do # cycle over the arguments case $arg in "--mode=compile") # insert --quiet before "--mode=compile" set fnord "$@" --quiet shift # fnord ;; esac set fnord "$@" "$arg" shift # fnord shift # "$arg" done ;; esac "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" ) & proc=$! "$@" stat=$? wait "$proc" if test "$stat" != 0; then exit $stat; fi rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 nvi-1.81.6/dist/distrib0100755000076400001440000000426610720065506014013 0ustar skimousers#! /bin/sh # $Id: distrib,v 8.24 2001/06/25 11:20:24 skimo Exp $ (Berkeley) $Date: 2001/06/25 11:20:24 $ echo "Running libtoolize" libtoolize -c --force echo "Building aclocal.m4" rm -f aclocal.m4 aclocal -I m4 # Build autoconf structure. echo "Running autoheader" autoheader 2>&1 | sed '/warning: AC_TRY_RUN called without default/d' chmod 444 config.h.in echo "Running automake" automake -a -c --foreign $@ rm -f configure echo "Running autoconf" autoconf 2>&1 | sed '/warning: AC_TRY_RUN called without default/d' chmod 555 configure config.guess config.sub install-sh msg="/* Do not edit: automatically built by build/distrib. */" # Build automatically generated header files. f=../ipc/ipc_def.h echo "Building $f" rm -f $f (echo "$msg" && \ awk -f ../ipc/ipc.awk ../ipc/ipc_cmd.c && awk -f ../ipc/vipc.awk ../ip/ip_read.c) > $f chmod 444 $f f=../ipc/ipc_gen.c echo "Building $f" rm -f $f (echo "$msg" && \ perl -n ../ip/vipc.pl ../ip/ip_read.c) > $f chmod 444 $f f=../ex/ex_def.h echo "Building $f" rm -f $f (echo "$msg" && \ awk -f ../ex/ex.awk ../ex/ex_cmd.c) > $f chmod 444 $f f=../common/options_def.h echo "Building $f" rm -f $f (echo "$msg" && \ awk -f ../common/options.awk ../common/options.c) > $f chmod 444 $f # Build the automatically generated function prototype files. for i in cl common ex gtk ip ipc motif motif_l tcl_api vi; do f=../$i/extern.h rm -f $f echo "Building $f" (echo "$msg" && \ sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c) > $f chmod 444 $f done # Build the automatically generated function prototype files. for i in perl_api ; do f=../$i/extern.h rm -f $f echo "Building $f" (echo "$msg" && \ sed -n "s/^ \* PUBLIC: \(.*\)/\1/p" ../$i/*.c ../$i/*.xs) > $f chmod 444 $f done # Build tags files. echo "Building tags files" f=tags rm -f $f if test $USER = 'bostic'; then ctagsopt = '-d'; fi ctags $ctagsopt -w \ ../cl/*.[ch] ../common/*.[ch] ../ex/*.[ch] ../gtk/*.[ch] ../ip/*.[ch] \ ../ipc/*.[ch] ../motif/*.[ch] ../motif_l/*.[ch] ../perl_api/*.[ch] \ ../tcl_api/*.[ch] ../vi/*.[ch] chmod 444 $f date=`date +%Y-%m-%d` echo "Building ../ex/version.h" echo '#define VI_VERSION "'`git-describe` '('$date')"' > ../ex/version.h touch stamp-h.in nvi-1.81.6/dist/findconfig0100644000076400001440000000055310720065506014451 0ustar skimousers#!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" # A utility that searches for the 'tclConfig.sh' shell script # which contains platform-specific compiler/linker options for # building Tcl programs and shared libraries. foreach dir $tcl_pkgPath { if [file exists $dir/tclConfig.sh] { puts $dir/tclConfig.sh exit } } nvi-1.81.6/dist/ltconfig0100644000076400001440000026454610720065506014166 0ustar skimousers#! /bin/sh # ltconfig - Create a system-specific libtool. # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A lot of this script is taken from autoconf-2.10. # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} echo=echo if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell. exec "$SHELL" "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null`} case X$UNAME in *-DOS) PATH_SEPARATOR=';' ;; *) PATH_SEPARATOR=':' ;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi if test "X${echo_test_string+set}" != "Xset"; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string="`eval $cmd`") 2>/dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then break fi done fi if test "X`($echo '\t') 2>/dev/null`" != 'X\t' || test "X`($echo "$echo_test_string") 2>/dev/null`" != X"$echo_test_string"; then # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH /usr/ucb; do if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && test "X`($dir/echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$dir/echo" break fi done IFS="$save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && test "X`(print -r "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running ltconfig again with it. ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}" export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf "%s\n"' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && test "X`($echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then # Cool, printf works : elif test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL" export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif test "X`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null`" = 'X\t' && test "X`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null`" = X"$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec "${ORIGINAL_CONFIG_SHELL}" "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # The name of this program. progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'` # Constants: PROGRAM=ltconfig PACKAGE=libtool VERSION=1.3.2 TIMESTAMP=" (1.385.2.150 1999/05/26 00:28:32)" ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5' rm="rm -f" help="Try \`$progname --help' for more information." # Global variables: default_ofile=libtool can_build_shared=yes enable_shared=yes # All known linkers require a `.a' archive for static linking. enable_static=yes enable_fast_install=yes enable_dlopen=unknown enable_win32_dll=no ltmain= silent= srcdir= ac_config_guess= ac_config_sub= host= nonopt= ofile="$default_ofile" verify_host=yes with_gcc=no with_gnu_ld=no need_locks=yes ac_ext=c objext=o libext=a cache_file= old_AR="$AR" old_CC="$CC" old_CFLAGS="$CFLAGS" old_CPPFLAGS="$CPPFLAGS" old_LDFLAGS="$LDFLAGS" old_LD="$LD" old_LN_S="$LN_S" old_LIBS="$LIBS" old_NM="$NM" old_RANLIB="$RANLIB" old_DLLTOOL="$DLLTOOL" old_OBJDUMP="$OBJDUMP" old_AS="$AS" # Parse the command line options. args= prev= for option do case "$option" in -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then eval "$prev=\$option" prev= continue fi case "$option" in --help) cat <&2 echo "$help" 1>&2 exit 1 ;; *) if test -z "$ltmain"; then ltmain="$option" elif test -z "$host"; then # This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1 # if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then # echo "$progname: warning \`$option' is not a valid host type" 1>&2 # fi host="$option" else echo "$progname: too many arguments" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac done if test -z "$ltmain"; then echo "$progname: you must specify a LTMAIN file" 1>&2 echo "$help" 1>&2 exit 1 fi if test ! -f "$ltmain"; then echo "$progname: \`$ltmain' does not exist" 1>&2 echo "$help" 1>&2 exit 1 fi # Quote any args containing shell metacharacters. ltconfig_args= for arg do case "$arg" in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ltconfig_args="$ltconfig_args '$arg'" ;; *) ltconfig_args="$ltconfig_args $arg" ;; esac done # A relevant subset of AC_INIT. # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 5 compiler messages saved in config.log # 6 checking for... messages and results if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>>./config.log # NLS nuisances. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test -n "$cache_file" && test -r "$cache_file"; then echo "loading cache $cache_file within ltconfig" . $cache_file fi if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi if test -z "$srcdir"; then # Assume the source directory is the same one as the path to LTMAIN. srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'` test "$srcdir" = "$ltmain" && srcdir=. fi trap "$rm conftest*; exit 1" 1 2 15 if test "$verify_host" = yes; then # Check for config.guess and config.sub. ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/config.guess; then ac_aux_dir=$ac_dir break fi done if test -z "$ac_aux_dir"; then echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2 echo "$help" 1>&2 exit 1 fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub # Make sure we can run config.sub. if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then : else echo "$progname: cannot run $ac_config_sub" 1>&2 echo "$help" 1>&2 exit 1 fi echo $ac_n "checking host system type""... $ac_c" 1>&6 host_alias=$host case "$host_alias" in "") if host_alias=`$SHELL $ac_config_guess`; then : else echo "$progname: cannot guess host type; you must specify one" 1>&2 echo "$help" 1>&2 exit 1 fi ;; esac host=`$SHELL $ac_config_sub $host_alias` echo "$ac_t$host" 1>&6 # Make sure the host verified. test -z "$host" && exit 1 elif test -z "$host"; then echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2 echo "$help" 1>&2 exit 1 else host_alias=$host fi # Transform linux* to *-*-linux-gnu*, to support old configure scripts. case "$host_os" in linux-gnu*) ;; linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` esac host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` case "$host_os" in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "${COLLECT_NAMES+set}" != set; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Determine commands to create old-style static archives. old_archive_cmds='$AR cru $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= # Set a sane default for `AR'. test -z "$AR" && AR=ar # Set a sane default for `OBJDUMP'. test -z "$OBJDUMP" && OBJDUMP=objdump # If RANLIB is not set, then run the test. if test "${RANLIB+set}" != "set"; then result=no echo $ac_n "checking for ranlib... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/ranlib || test -f $dir/ranlib$ac_exeext; then RANLIB="ranlib" result="ranlib" break fi done IFS="$save_ifs" echo "$ac_t$result" 1>&6 fi if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" fi # Set sane defaults for `DLLTOOL', `OBJDUMP', and `AS', used on cygwin. test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$AS" && AS=as # Check to see if we are using GCC. if test "$with_gcc" != yes || test -z "$CC"; then # If CC is not set, then try to find GCC or a usable CC. if test -z "$CC"; then echo $ac_n "checking for gcc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/gcc || test -f $dir/gcc$ac_exeext; then CC="gcc" break fi done IFS="$save_ifs" if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi fi # Not "gcc", so try "cc", rejecting "/usr/ucb/cc". if test -z "$CC"; then echo $ac_n "checking for cc... $ac_c" 1>&6 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" cc_rejected=no for dir in $PATH; do test -z "$dir" && dir=. if test -f $dir/cc || test -f $dir/cc$ac_exeext; then if test "$dir/cc" = "/usr/ucb/cc"; then cc_rejected=yes continue fi CC="cc" break fi done IFS="$save_ifs" if test $cc_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $CC shift if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same name, so the bogon will be chosen # first if we set CC to just the name; use the full file name. shift set dummy "$dir/cc" "$@" shift CC="$@" fi fi if test -n "$CC"; then echo "$ac_t$CC" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$CC"; then echo "$progname: error: no acceptable cc found in \$PATH" 1>&2 exit 1 fi fi # Now see if the compiler is really GCC. with_gcc=no echo $ac_n "checking whether we are using GNU C... $ac_c" 1>&6 echo "$progname:579: checking whether we are using GNU C" >&5 $rm conftest.c cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then with_gcc=yes fi $rm conftest.c echo "$ac_t$with_gcc" 1>&6 fi # Allow CC to be a program name with arguments. set dummy $CC compiler="$2" echo $ac_n "checking for object suffix... $ac_c" 1>&6 $rm conftest* echo 'int i = 1;' > conftest.c echo "$progname:601: checking for object suffix" >& 5 if { (eval echo $progname:602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then # Append any warnings to the config.log. cat conftest.err 1>&5 for ac_file in conftest.*; do case $ac_file in *.c) ;; *) objext=`echo $ac_file | sed -e s/conftest.//` ;; esac done else cat conftest.err 1>&5 echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* echo "$ac_t$objext" 1>&6 echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6 pic_flag= special_shlib_compile_flags= wl= link_static_flag= no_builtin_flag= if test "$with_gcc" = yes; then wl='-Wl,' link_static_flag='-static' case "$host_os" in beos* | irix5* | irix6* | osf3* | osf4*) # PIC is the default for these OSes. ;; aix*) # Below there is a dirty hack to force normal static linking with -ldl # The problem is because libdl dynamically linked with both libc and # libC (AIX C++ library), which obviously doesn't included in libraries # list by gcc. This cause undefined symbols with -static flags. # This hack allows C programs to be linked with "-static -ldl", but # we not sure about C++ programs. link_static_flag="$link_static_flag ${wl}-lC" ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. pic_flag='-m68020 -resident32 -malways-restore-a4' ;; sysv4*MP*) if test -d /usr/nec; then pic_flag=-Kconform_pic fi ;; *) pic_flag='-fPIC' ;; esac else # PORTME Check for PIC flags for the system compiler. case "$host_os" in aix3* | aix4*) # All AIX code is PIC. link_static_flag='-bnso -bI:/lib/syscalls.exp' ;; hpux9* | hpux10* | hpux11*) # Is there a better link_static_flag that works with the bundled CC? wl='-Wl,' link_static_flag="${wl}-a ${wl}archive" pic_flag='+Z' ;; irix5* | irix6*) wl='-Wl,' link_static_flag='-non_shared' # PIC (with -KPIC) is the default. ;; cygwin* | mingw* | os2*) # We can build DLLs from non-PIC. ;; osf3* | osf4*) # All OSF/1 code is PIC. wl='-Wl,' link_static_flag='-non_shared' ;; sco3.2v5*) pic_flag='-Kpic' link_static_flag='-dn' special_shlib_compile_flags='-belf' ;; solaris*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; sunos4*) pic_flag='-PIC' link_static_flag='-Bstatic' wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) pic_flag='-KPIC' link_static_flag='-Bstatic' wl='-Wl,' ;; uts4*) pic_flag='-pic' link_static_flag='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then pic_flag='-Kconform_pic' link_static_flag='-Bstatic' fi ;; *) can_build_shared=no ;; esac fi if test -n "$pic_flag"; then echo "$ac_t$pic_flag" 1>&6 # Check to make sure the pic_flag actually works. echo $ac_n "checking if $compiler PIC flag $pic_flag works... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $pic_flag -DPIC" echo "$progname:742: checking if $compiler PIC flag $pic_flag works" >&5 if { (eval echo $progname:743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then # Append any warnings to the config.log. cat conftest.err 1>&5 case "$host_os" in hpux9* | hpux10* | hpux11*) # On HP-UX, both CC and GCC only warn that PIC is supported... then they # create non-PIC objects. So, if there were any warnings, we assume that # PIC is not supported. if test -s conftest.err; then echo "$ac_t"no 1>&6 can_build_shared=no pic_flag= else echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" fi ;; *) echo "$ac_t"yes 1>&6 pic_flag=" $pic_flag" ;; esac else # Append any errors to the config.log. cat conftest.err 1>&5 can_build_shared=no pic_flag= echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else echo "$ac_t"none 1>&6 fi # Check to see if options -o and -c are simultaneously supported by compiler echo $ac_n "checking if $compiler supports -c -o file.o... $ac_c" 1>&6 $rm -r conftest 2>/dev/null mkdir conftest cd conftest $rm conftest* echo "int some_variable = 0;" > conftest.c mkdir out # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.o" echo "$progname:795: checking if $compiler supports -c -o file.o" >&5 if { (eval echo $progname:796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then echo "$ac_t"no 1>&6 compiler_c_o=no else echo "$ac_t"yes 1>&6 compiler_c_o=yes fi else # Append any errors to the config.log. cat out/conftest.err 1>&5 compiler_c_o=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm -r conftest 2>/dev/null if test x"$compiler_c_o" = x"yes"; then # Check to see if we can write to a .lo echo $ac_n "checking if $compiler supports -c -o file.lo... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -c -o conftest.lo" echo "$progname:828: checking if $compiler supports -c -o file.lo" >&5 if { (eval echo $progname:829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.lo; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_o_lo=no else echo "$ac_t"yes 1>&6 compiler_o_lo=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_o_lo=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* else compiler_o_lo=no fi # Check to see if we can do hard links to lock some files if needed hard_links="nottested" if test "$compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$ac_t$hard_links" 1>&6 $rm conftest* if test "$hard_links" = no; then echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2 need_locks=warn fi else need_locks=no fi if test "$with_gcc" = yes; then # Check to see if options -fno-rtti -fno-exceptions are supported by compiler echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6 $rm conftest* echo "int some_variable = 0;" > conftest.c save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.c" echo "$progname:880: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 if { (eval echo $progname:881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.o; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then echo "$ac_t"no 1>&6 compiler_rtti_exceptions=no else echo "$ac_t"yes 1>&6 compiler_rtti_exceptions=yes fi else # Append any errors to the config.log. cat conftest.err 1>&5 compiler_rtti_exceptions=no echo "$ac_t"no 1>&6 fi CFLAGS="$save_CFLAGS" $rm conftest* if test "$compiler_rtti_exceptions" = "yes"; then no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions' else no_builtin_flag=' -fno-builtin' fi fi # Check for any special shared library compilation flags. if test -n "$special_shlib_compile_flags"; then echo "$progname: warning: \`$CC' requires \`$special_shlib_compile_flags' to build shared libraries" 1>&2 if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$special_shlib_compile_flags[ ]" >/dev/null; then : else echo "$progname: add \`$special_shlib_compile_flags' to the CC or CFLAGS env variable and reconfigure" 1>&2 can_build_shared=no fi fi echo $ac_n "checking if $compiler static flag $link_static_flag works... $ac_c" 1>&6 $rm conftest* echo 'main(){return(0);}' > conftest.c save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $link_static_flag" echo "$progname:924: checking if $compiler static flag $link_static_flag works" >&5 if { (eval echo $progname:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then echo "$ac_t$link_static_flag" 1>&6 else echo "$ac_t"none 1>&6 link_static_flag= fi LDFLAGS="$save_LDFLAGS" $rm conftest* if test -z "$LN_S"; then # Check to see if we can use ln -s, or we need hard links. echo $ac_n "checking whether ln -s works... $ac_c" 1>&6 $rm conftest.dat if ln -s X conftest.dat 2>/dev/null; then $rm conftest.dat LN_S="ln -s" else LN_S=ln fi if test "$LN_S" = "ln -s"; then echo "$ac_t"yes 1>&6 else echo "$ac_t"no 1>&6 fi fi # Make sure LD is an absolute path. if test -z "$LD"; then ac_prog=ld if test "$with_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC... $ac_c" 1>&6 echo "$progname:957: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we are not using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld... $ac_c" 1>&6 echo "$progname:981: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 echo "$progname:984: checking for non-GNU ld" >&5 fi if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" fi if test -n "$LD"; then echo "$ac_t$LD" 1>&6 else echo "$ac_t"no 1>&6 fi if test -z "$LD"; then echo "$progname: error: no acceptable ld found in \$PATH" 1>&2 exit 1 fi fi # Check to see if it really is or is not GNU ld. echo $ac_n "checking if the linker ($LD) is GNU ld... $ac_c" 1>&6 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LD -v 2>&1 &5; then with_gnu_ld=yes else with_gnu_ld=no fi echo "$ac_t$with_gnu_ld" 1>&6 # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6 allow_undefined_flag= no_undefined_flag= need_lib_prefix=unknown need_version=unknown # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments archive_cmds= archive_expsym_cmds= old_archive_from_new_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported runpath_var= always_export_symbols=no export_symbols_cmds='$NM $libobjs | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an egrep regular expression of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. case "$host_os" in cygwin* | mingw*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$with_gcc" != yes; then with_gnu_ld=no fi ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case "$host_os" in aix3* | aix4*) # On AIX, the GNU linker is very broken ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=yes # Extract the symbol export list from an `--export-all' def file, # then regenerate the def file from the symbol export list, so that # the compiled dll only exports the symbol export list. export_symbols_cmds='rm -f $objdir/$soname-ltdll.c~ sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $objdir/$soname-ltdll.c~ (cd $objdir && $CC -c $soname-ltdll.c)~ $DLLTOOL --export-all --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --output-def $objdir/$soname-def $objdir/$soname-ltdll.$objext $libobjs~ sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]* ; *//" < $objdir/$soname-def > $export_symbols' archive_expsym_cmds='echo EXPORTS > $objdir/$soname-def~ _lt_hint=1; for symbol in `cat $export_symbols`; do echo " \$symbol @ \$_lt_hint ; " >> $objdir/$soname-def; _lt_hint=`expr 1 + \$_lt_hint`; done~ $CC -Wl,--base-file,$objdir/$soname-base -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC -Wl,--base-file,$objdir/$soname-base $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts~ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12 --def $objdir/$soname-def --base-file $objdir/$soname-base --output-exp $objdir/$soname-exp~ $CC $objdir/$soname-exp -Wl,--dll -nostartfiles -Wl,-e,__cygwin_dll_entry@12 -o $lib $objdir/$soname-ltdll.$objext $libobjs $deplibs $linkopts' old_archive_from_new_cmds='$DLLTOOL --as=$AS --dllname $soname --def $objdir/$soname-def --output-lib $objdir/$libname.a' ;; netbsd*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib' # can we support soname and/or expsyms with a.out? -oliva fi ;; solaris*) if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linkopts' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' case $host_os in cygwin* | mingw*) # dlltool doesn't understand --whole-archive et. al. whole_archive_flag_spec= ;; *) whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' ;; esac fi else # PORTME fill in a description of your system's linker (not GNU ld) case "$host_os" in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $objdir/$soname $libobjs $deplibs $linkopts -bE:$export_symbols -T512 -H512 -bM:SRE~$AR cru $lib $objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$with_gcc" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4*) hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib' hardcode_libdir_separator=':' if test "$with_gcc" = yes; then collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi shared_flag='-shared' else shared_flag='${wl}-bM:SRE' hardcode_direct=yes fi allow_undefined_flag=' ${wl}-berok' archive_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}' archive_expsym_cmds="\$CC $shared_flag"' -o $objdir/$soname $libobjs $deplibs $linkopts ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}' case "$host_os" in aix4.[01]|aix4.[01].*) # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on always_export_symbols=yes ;; esac ;; amigaos*) archive_cmds='$rm $objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $objdir/a2ixlibrary.data~$AR cru $lib $libobjs~$RANLIB $lib~(cd $objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; cygwin* | mingw*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $linkopts `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs' fix_srcfile_path='`cygpath -w $srcfile`' ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9* | hpux10* | hpux11*) case "$host_os" in hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o $objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv $objdir/$soname $lib' ;; *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linkopts' ;; esac hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_minus_L=yes # Not in the search PATH, but as the default # location of the library. export_dynamic_flag_spec='${wl}-E' ;; irix5* | irix6*) if test "$with_gcc" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF fi hardcode_libdir_flag_spec='${wl}-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; openbsd*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def~$echo DATA >> $objdir/$libname.def~$echo " SINGLE NONSHARED" >> $objdir/$libname.def~$echo EXPORTS >> $objdir/$libname.def~emxexp $libobjs >> $objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $linkopts $objdir/$libname.def' old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def' ;; osf3* | osf4*) if test "$with_gcc" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; sco3.2v5*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) no_undefined_flag=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linkopts' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linkopts~$rm $lib.exp' hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case "$host_os" in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; sysv4*MP*) if test -d /usr/nec ;then # archive_cmds='$LD -G -z text -h $soname -o $lib$libobjs$deplibs' archive_cmds='$LD -G -h $soname -o $lib$libobjs$deplibs' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; *) ld_shlibs=no ;; esac fi echo "$ac_t$ld_shlibs" 1>&6 test "$ld_shlibs" = no && can_build_shared=no if test -z "$NM"; then echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6 case "$NM" in [\\/]* | [A-Za-z]:[\\/]*) ;; # Let the user override the test with a path. *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}" for ac_dir in $PATH /usr/ucb /usr/ccs/bin /bin; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -B" break elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then NM="$ac_dir/nm -p" break else NM=${NM="$ac_dir/nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$NM" && NM=nm ;; esac echo "$ac_t$NM" 1>&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6 # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'" # Define system-specific variables. case "$host_os" in aix*) symcode='[BCDT]' ;; cygwin* | mingw*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;; irix*) symcode='[BCDEGRST]' ;; solaris*) symcode='[BDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then symcode='[ABCDGISTW]' fi # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no $rm conftest* cat > conftest.c <&5 if { (eval echo $progname:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm if { echo "$progname:1561: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.c #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.c' cat <> conftest.c #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.c cat <<\EOF >> conftest.c {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$objext conftstm.$objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo $progname:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi LIBS="$save_LIBS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.c >&5 fi $rm conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else global_symbol_pipe= fi done if test "$pipe_works" = yes; then echo "${ac_t}ok" 1>&6 else echo "${ac_t}failed" 1>&6 fi if test -z "$global_symbol_pipe"; then global_symbol_to_cdecl= fi # Check hardcoding attributes. echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var"; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$hardcode_shlibpath_var" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$ac_t$hardcode_action" 1>&6 reload_flag= 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. reload_flag='-r' echo "$ac_t$reload_flag" 1>&6 test -n "$reload_flag" && reload_flag=" $reload_flag" # PORTME Fill in your ld.so characteristics library_names_spec= libname_spec='lib$name' soname_spec= postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" file_magic_cmd= file_magic_test_file= deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [regex]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given egrep regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6 case "$host_os" in aix3*) version_type=linux library_names_spec='${libname}${release}.so$versuffix $libname.a' shlibpath_var=LIBPATH # AIX has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}.so$major' ;; aix4*) version_type=linux # AIX has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. # We preserve .a as extension for shared libraries though AIX4.2 # and later linker supports .so library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a' shlibpath_var=LIBPATH deplibs_check_method=pass_all ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}.so' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH deplibs_check_method=pass_all lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; bsdi4*) version_type=linux library_names_spec='${libname}.so$major ${libname}.so' soname_spec='${libname}.so' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH deplibs_check_method='file_magic ELF 32-bit LSB shared object' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw*) version_type=windows if test "$with_gcc" = yes; then library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.a' else library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib' fi dynamic_linker='Win32 ld.exe' deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' file_magic_cmd='${OBJDUMP} -f' need_lib_prefix=no # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case "$version_type" in freebsd-elf*) deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' need_version=no need_lib_prefix=no ;; freebsd-*) deplibs_check_method=unknown library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix' need_version=yes ;; esac finish_cmds='PATH="\$PATH:/sbin" OBJFORMAT="'"$objformat"'" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; gnu*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}.so' shlibpath_var=LD_LIBRARY_PATH ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. dynamic_linker="$host_os dld.sl" version_type=sunos need_lib_prefix=no need_version=no shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl' soname_spec='${libname}${release}.sl$major' # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6*) version_type=irix need_lib_prefix=no need_version=no soname_spec='${libname}${release}.so.$major' library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so.$major ${libname}${release}.so $libname.so' case "$host_os" in irix5*) libsuff= shlibsuff= # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case "$LD" in # libtool.m4 will add one of these switches to LD *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib${libsuff}/libc.so*` deplibs_check_method='pass_all' ;; # No shared lib support for Linux oldld, aout, or coff. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) dynamic_linker=no ;; # This must be Linux ELF. linux-gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` if test -f /lib/ld.so.1; then dynamic_linker='GNU ld.so' else # Only the GNU ld.so supports shared libraries on MkLinux. case "$host_cpu" in powerpc*) dynamic_linker=no ;; *) dynamic_linker='Linux ld.so' ;; esac fi ;; netbsd*) version_type=sunos if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so' soname_spec='${libname}${release}.so$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH ;; openbsd*) version_type=sunos if test "$with_gnu_ld" = yes; then need_lib_prefix=no need_version=no fi library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH ;; os2*) libname_spec='$name' need_lib_prefix=no library_names_spec='$libname.dll $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4*) version_type=osf need_version=no soname_spec='${libname}${release}.so' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so' shlibpath_var=LD_LIBRARY_PATH # this will be overridden with pass_all, but let us keep it just in case deplibs_check_method='file_magic COFF format alpha shared library' file_magic_cmd=/usr/bin/file file_magic_test_file=/shlib/libc.so deplibs_check_method='pass_all' sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}.so$major' library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' deplibs_check_method="file_magic ELF [0-9][0-9]-bit [LM]SB dynamic lib" file_magic_cmd=/usr/bin/file file_magic_test_file=/lib/libc.so ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case "$host_vendor" in ncr) deplibs_check_method='pass_all' ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' file_magic_cmd=/usr/bin/file file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;; uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; *) dynamic_linker=no ;; esac echo "$ac_t$dynamic_linker" 1>&6 test "$dynamic_linker" = no && can_build_shared=no # Report the final consequences. echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6 # Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in # configure.in, otherwise build static only libraries. case "$host_os" in cygwin* | mingw* | os2*) if test x$can_build_shared = xyes; then test x$enable_win32_dll = xno && can_build_shared=no echo "checking if package supports dlls... $can_build_shared" 1>&6 fi ;; esac if test -n "$file_magic_test_file" && test -n "$file_magic_cmd"; then case "$deplibs_check_method" in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | egrep "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) test "$enable_shared" = yes && enable_static=no ;; esac echo "$ac_t$enable_shared" 1>&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "checking whether to build static libraries... $enable_static" 1>&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi echo $ac_n "checking for objdir... $ac_c" 1>&6 rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. objdir=_libs fi rmdir .libs 2>/dev/null echo "$ac_t$objdir" 1>&6 if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else if eval "test \"`echo '$''{'lt_cv_dlopen'+set}'`\" != set"; then lt_cv_dlopen=no lt_cv_dlopen_libs= echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "$progname:2123: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dlopen""... $ac_c" 1>&6 echo "$progname:2160: checking for dlopen" >&5 if eval "test \"`echo '$''{'ac_cv_func_dlopen'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else dlopen(); #endif ; return 0; } EOF if { (eval echo $progname:2187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dlopen=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_dlopen=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6 echo "$progname:2204: checking for dld_link in -ldld" >&5 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load""... $ac_c" 1>&6 echo "$progname:2241: checking for shl_load" >&5 if eval "test \"`echo '$''{'ac_cv_func_shl_load'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load(); int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else shl_load(); #endif ; return 0; } EOF if { (eval echo $progname:2268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shl_load=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shl_load=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" else echo "$ac_t""no" 1>&6 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 echo "$progname:2286: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else echo "$ac_t""no" 1>&6 fi fi fi fi fi fi if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes fi case "$lt_cv_dlopen" in dlopen) for ac_hdr in dlfcn.h; do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "$progname:2348: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int fnord = 0; EOF ac_try="$ac_compile conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo $progname:2358: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi done if test "x$ac_cv_header_dlfcn_h" = xyes; then CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" fi eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2386: checking whether a program can dlopen itself" >&5 if test "${lt_cv_dlopen_self+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) exit(0); } exit(1); } EOF if { (eval echo $progname:2440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self" 1>&6 if test "$lt_cv_dlopen_self" = yes; then LDFLAGS="$LDFLAGS $link_static_flag" echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6 echo "$progname:2459: checking whether a statically linked program can dlopen itself" >&5 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then lt_cv_dlopen_self_static=cross else cat > conftest.c < #endif #include #ifdef RTLD_GLOBAL # define LTDL_GLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LTDL_GLOBAL DL_GLOBAL # else # define LTDL_GLOBAL 0 # endif #endif /* We may have to define LTDL_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LTDL_LAZY_OR_NOW # ifdef RTLD_LAZY # define LTDL_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LTDL_LAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LTDL_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LTDL_LAZY_OR_NOW DL_NOW # else # define LTDL_LAZY_OR_NOW 0 # endif # endif # endif # endif #endif fnord() { int i=42;} main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW); if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord"); if(ptr1 || ptr2) exit(0); } exit(1); } EOF if { (eval echo $progname:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then lt_cv_dlopen_self_static=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* lt_cv_dlopen_self_static=no fi rm -fr conftest* fi fi echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6 fi ;; esac case "$lt_cv_dlopen_self" in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case "$lt_cv_dlopen_self_static" in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Copy echo and quote the copy, instead of the original, because it is # used later. ltecho="$echo" if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then ltecho="$CONFIG_SHELL \$0 --fallback-echo" fi LTSHELL="$SHELL" LTCONFIG_VERSION="$VERSION" # Only quote variables if we're using ltmain.sh. case "$ltmain" in *.sh) # Now quote all the things that may contain metacharacters. for var in ltecho old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \ AR CC LD LN_S NM LTSHELL LTCONFIG_VERSION \ reload_flag reload_cmds wl \ pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \ thread_safe_flag_spec whole_archive_flag_spec libname_spec \ library_names_spec soname_spec \ RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \ old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds postuninstall_cmds \ file_magic_cmd export_symbols_cmds deplibs_check_method allow_undefined_flag no_undefined_flag \ finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \ hardcode_libdir_flag_spec hardcode_libdir_separator \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do case "$var" in reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ export_symbols_cmds | archive_cmds | archive_expsym_cmds | \ postinstall_cmds | postuninstall_cmds | \ finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case "$ltecho" in *'\$0 --fallback-echo"') ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac trap "$rm \"$ofile\"; exit 1" 1 2 15 echo "creating $ofile" $rm "$ofile" cat < "$ofile" #! $SHELL # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh. # # Copyright (C) 1996-1999 Free Software Foundation, Inc. # Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="sed -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "\${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi ### BEGIN LIBTOOL CONFIG EOF cfgfile="$ofile" ;; *) # Double-quote the variables that need it (for aesthetics). for var in old_CC old_CFLAGS old_CPPFLAGS \ old_LD old_LDFLAGS old_LIBS \ old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do eval "$var=\\\"\$var\\\"" done # Just create a config file. cfgfile="$ofile.cfg" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 echo "creating $cfgfile" $rm "$cfgfile" cat < "$cfgfile" # `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) EOF ;; esac cat <> "$cfgfile" # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # # CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\ # LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\ # NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\ # DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\ # $0$ltconfig_args # # Compiler and other test output produced by $progname, useful for # debugging $progname, is in ./config.log if it exists. # The version of $progname that generated this script. LTCONFIG_VERSION=$LTCONFIG_VERSION # Shell to use when invoking shell scripts. SHELL=$LTSHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$ltecho # The archiver. AR=$AR # The default C compiler. CC=$CC # The linker used to build libraries. LD=$LD # Whether we need hard or soft links. LN_S=$LN_S # A BSD-compatible nm program. NM=$NM # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$reload_flag reload_cmds=$reload_cmds # How to pass a linker flag through the compiler. wl=$wl # Object file suffix (normally "o"). objext="$objext" # Old archive suffix (normally "a"). libext="$libext" # Additional compiler flags for building library objects. pic_flag=$pic_flag # Does compiler simultaneously support -c and -o options? compiler_c_o=$compiler_c_o # Can we write directly to a .lo ? compiler_o_lo=$compiler_o_lo # Must we lock files when doing compilation ? need_locks=$need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$link_static_flag # Compiler flag to turn off builtin functions. no_builtin_flag=$no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$library_names_spec # The coded name of the library, if different from the real name. soname_spec=$soname_spec # Commands used to build and install an old-style archive. RANLIB=$RANLIB old_archive_cmds=$old_archive_cmds old_postinstall_cmds=$old_postinstall_cmds old_postuninstall_cmds=$old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$old_archive_from_new_cmds # Commands used to build and install a shared archive. archive_cmds=$archive_cmds archive_expsym_cmds=$archive_expsym_cmds postinstall_cmds=$postinstall_cmds postuninstall_cmds=$postuninstall_cmds # Method to check whether dependent libraries are shared objects. deplibs_check_method=$deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$global_symbol_to_cdecl # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$hardcode_libdir_separator # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Compile-time system search path for libraries sys_lib_search_path_spec=$sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$exclude_expsyms # Symbols that must always be exported. include_expsyms=$include_expsyms EOF case "$ltmain" in *.sh) echo '### END LIBTOOL CONFIG' >> "$ofile" echo >> "$ofile" case "$host_os" in aix3*) cat <<\EOF >> "$ofile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "${COLLECT_NAMES+set}" != set; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # Append the ltmain.sh script. cat "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1) chmod +x "$ofile" ;; *) # Compile the libtool program. echo "FIXME: would compile $ltmain" ;; esac test -n "$cache_file" || exit 0 # AC_CACHE_SAVE trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: nvi-1.81.6/dist/m4/0040755000076400001440000000000010720065506012740 5ustar skimousersnvi-1.81.6/dist/m4/gtk.m40100644000076400001440000002013510720065506013765 0ustar skimousers# Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN(AM_PATH_GTK, [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) nvi-1.81.6/dist/missing0100644000076400001440000002123110720065506014010 0ustar skimousers#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.3 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar ${1+"$@"} && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar ${1+"$@"} && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" ${1+"$@"} && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 nvi-1.81.6/dist/mkinstalldirs0100644000076400001440000000132310720065506015217 0ustar skimousers#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 8.3 2001/08/27 19:52:59 skimo Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here nvi-1.81.6/dist/pathnames.h.in0100644000076400001440000000152410720065506015155 0ustar skimousers/* $Id: pathnames.h.in,v 8.5 2000/04/21 21:26:21 skimo Exp $ (Berkeley) $Date: 2000/04/21 21:26:21 $ */ #ifndef _PATH_BSHELL #define _PATH_BSHELL "@vi_cv_path_shell@" #endif #ifndef _PATH_DB3 #define _PATH_DB3 "@vi_cv_path_db3@" #endif #ifndef _PATH_EXRC #define _PATH_EXRC ".exrc" #endif #ifndef _PATH_MSGCAT #define _PATH_MSGCAT "./" #endif #ifndef _PATH_NEXRC #define _PATH_NEXRC ".nexrc" #endif #ifndef _PATH_PRESERVE #define _PATH_PRESERVE "@vi_cv_path_preserve@" #endif #ifndef _PATH_SYSV_PTY #define _PATH_SYSV_PTY "/dev/ptmx" #endif #ifndef _PATH_SENDMAIL #define _PATH_SENDMAIL "@vi_cv_path_sendmail@" #endif #ifndef _PATH_SYSEXRC #define _PATH_SYSEXRC "/etc/vi.exrc" #endif #ifndef _PATH_TAGS #define _PATH_TAGS "tags" #endif #ifndef _PATH_TMP #define _PATH_TMP "/tmp" #endif #ifndef _PATH_TTY #define _PATH_TTY "/dev/tty" #endif nvi-1.81.6/dist/port.h.in0100644000076400001440000000737210720065506014170 0ustar skimousers/* $Id: port.h.in,v 8.15 2001/01/01 20:26:48 skimo Exp $ (Berkeley) $Date: 2001/01/01 20:26:48 $ */ /* * Declare the basic types, if they aren't already declared. Named and * some system's db.h files protect them with __BIT_TYPES_DEFINED__. */ #ifndef __BIT_TYPES_DEFINED__ #define __BIT_TYPES_DEFINED__ @u_int8_decl@ @int16_decl@ @u_int16_decl@ @int32_decl@ @u_int32_decl@ #endif @u_char_decl@ @u_short_decl@ @u_int_decl@ @u_long_decl@ /* * XXX * Handle function prototypes. This steps on name space that vi doesn't * control, but all of the other solutions are worse. */ #undef __P #if defined(__STDC__) || defined(__cplusplus) #define __P(protos) protos /* ANSI C prototypes */ #else #define __P(protos) () /* K&R C preprocessor */ #endif /* * XXX * Some versions of System V changed the number of arguments to gettimeofday * without changing the name. */ #ifdef HAVE_BROKEN_GETTIMEOFDAY #define gettimeofday(tv, tz) gettimeofday(tv) #endif /* * XXX * If we don't have mmap, we fake it with read and write, but we'll * still need the header information. */ #ifndef HAVE_SYS_MMAN_H #define MAP_SHARED 1 /* share changes */ #define MAP_PRIVATE 2 /* changes are private */ #define PROT_READ 0x1 /* pages can be read */ #define PROT_WRITE 0x2 /* pages can be written */ #define PROT_EXEC 0x4 /* pages can be executed */ #endif /* * XXX * POSIX 1003.1 names for file descriptors. */ #ifndef STDERR_FILENO #define STDIN_FILENO 0 /* ANSI C #defines */ #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #endif /* * XXX * POSIX 1003.1 names for seek settings. */ #ifndef SEEK_END #define SEEK_SET 0 /* POSIX 1003.1 seek values */ #define SEEK_CUR 1 #define SEEK_END 2 #endif /* * Hack _POSIX_VDISABLE to \377 since Ultrix doesn't honor _POSIX_VDISABLE * (treats it as ^@). The symptom is that the ^@ keystroke immediately * drops core. */ #ifdef HAVE_BROKEN_VDISABLE #undef _POSIX_VDISABLE #define _POSIX_VDISABLE ((unsigned char)'\377') #endif /* * XXX * POSIX 1003.1 tty disabling character. */ #ifndef _POSIX_VDISABLE #define _POSIX_VDISABLE 0 /* Some systems used 0. */ #endif /* * XXX * 4.4BSD extension to only set the software termios bits. */ #ifndef TCSASOFT /* 4.4BSD extension. */ #define TCSASOFT 0 #endif /* * XXX * POSIX 1003.1 maximum path length. */ #ifndef MAXPATHLEN #ifdef PATH_MAX #define MAXPATHLEN PATH_MAX #else #define MAXPATHLEN 1024 #endif #endif /* * XXX * MIN, MAX, historically in */ #ifndef MAX #define MAX(_a,_b) ((_a)<(_b)?(_b):(_a)) #endif #ifndef MIN #define MIN(_a,_b) ((_a)<(_b)?(_a):(_b)) #endif /* * XXX * "DB" isn't always portable, and we want the private information. */ #define DB L__DB #undef pgno_t /* IRIX has its own version. */ #define pgno_t L__db_pgno_t /* * XXX * 4.4BSD extension to provide lock values in the open(2) call. */ #ifndef O_EXLOCK #define O_EXLOCK 0 #endif #ifndef O_SHLOCK #define O_SHLOCK 0 #endif /* * XXX * POSIX 1003.1 bad file format errno. */ #ifndef EFTYPE #define EFTYPE EINVAL #endif /* * XXX * POSIX 1003.2 RE length limit. */ #ifndef _POSIX2_RE_DUP_MAX #define _POSIX2_RE_DUP_MAX 255 #endif /* * XXX * 4.4BSD extension to determine if a program dropped core from the exit * status. */ #ifndef WCOREDUMP #define WCOREDUMP(a) 0 #endif /* * XXX * Endian-ness of the machine. */ #if !defined(LITTLE_ENDIAN) #define LITTLE_ENDIAN 1234 #endif #if !defined(BIG_ENDIAN) #define BIG_ENDIAN 4321 #endif #if !defined(BYTE_ORDER) #if WORDS_BIGENDIAN == 1 #define BYTE_ORDER BIG_ENDIAN #else #define BYTE_ORDER LITTLE_ENDIAN #endif #endif #ifndef HAVE_MEMCPY #define memcpy memmove #endif #ifdef NEED_FPRINTF_PROTO extern int fprintf( FILE *, const char *, ... ); #endif #ifdef HAVE_PTHREAD #define VI_DB_THREAD DB_THREAD #else #define VI_DB_THREAD 0 #endif nvi-1.81.6/dist/recover.in0100644000076400001440000000251210720065506014412 0ustar skimousers#!/bin/sh - # # $Id: recover.in,v 8.9 2001/08/30 13:59:23 skimo Exp $ (Berkeley) $Date: 2001/08/30 13:59:23 $ # # Script to recover nvi edit sessions. RECDIR="@vi_cv_path_preserve@" SENDMAIL="@vi_cv_path_sendmail@" echo 'Recovering nvi editor sessions.' # Check editor backup files. vibackup=`echo $RECDIR/vi.*` if [ "$vibackup" != "$RECDIR/vi.*" ]; then for i in $vibackup; do # Only test files that are readable. if test ! -r $i; then continue fi INUSE="@INUSE@" if test "$INUSE" && $INUSE; then continue fi # Unmodified nvi editor backup files either have the # execute bit set or are zero length. Delete them. if test -x $i -o ! -s $i; then rm $i fi done fi # It is possible to get incomplete recovery files, if the editor crashes # at the right time. virecovery=`echo $RECDIR/recover.*` if [ "$virecovery" != "$RECDIR/recover.*" ]; then for i in $virecovery; do # Only test files that are readable. if test ! -r $i; then continue fi INUSE="@INUSE@" if test "$INUSE" && $INUSE; then continue fi # Delete any recovery files that are zero length, corrupted, # or that have no corresponding backup file. Else send mail # to the user. recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i` if test -n "$recfile" -a -s "$recfile"; then $SENDMAIL -t < $i else rm $i fi done fi nvi-1.81.6/dist/script0100644000076400001440000000243010720065506013643 0ustar skimousers# setup # setenv VERSION 1.79 setenv VERSION tk setenv S /usr/src/nvi # Make sure everything's checked in. cd $S && allout # Increment the version numbers and dates. setenv X version.h cd $S/ex && sco $X && echo "go to $VERSION" | sccs delget $X setenv X README cd $S && sco $X && vi $X && echo "go to $VERSION" | sccs delget $X # Build the distribution. cd $S/dist && sh ./distrib cd $S/catalog && make clean all check && rm dump __ck1 __ck2 && \ chmod 444 english* *.check # Build a version. cd $S && rm -rf build.local && mkdir build.local && cd build.local && \ ~bostic/bin/viconf && (make |& tee mklog) what vi | gzip > ../ARCHIVE/history/$VERSION.gz chmod 444 ../ARCHIVE/history/$VERSION.gz # build the documents cd $S/build.local && make cleandocs docs # Clean up the tree. cd $S && mv -i {ARCHIVE,TODO,build.local} SCCS/ find . \! -path '*SCCS*' -type d \! -perm 775 find . \! -path '*SCCS*' \( -name '*.rej' -o -name '*.orig' \) find . \! -path '*SCCS*' -type f \( -perm -200 -o -perm -2 -o -perm -20 \) chown -R bin.wsrc . # Create the release. setenv T /var/spool/ftp/pub cd $S/.. && mv -i nvi nvi-$VERSION tar cFFf - nvi-$VERSION | gzip --best > $T/nvi-$VERSION.tar.gz chmod 444 $T/nvi-$VERSION.tar.gz && mv -i nvi-$VERSION nvi cd $S && mv -i SCCS/{ARCHIVE,TODO,build.local} . nvi-1.81.6/dist/spell.ok0100644000076400001440000000055210720065506014071 0ustar skimousersADDCPPFLAGS ADDLDFLAGS ADDLIBS CPPFLAGS FreeBSD LDFLAGS LIBS Lite NVI NVI'S NetBSD Nvi POSIX Perl README Tcl Tk asnvi asvi autoconf bindir cd contrib csh datadir datafiles db distclean env filesystem foo gcc ksh lcurses ldb lm lperl ltcl ltermcap ltermlib ltk mandir mkdir ncurses nex nvi nview perl perlinterp setenv sh tcl tclinterp tcsh terminfo tknvi usr vi nvi-1.81.6/dist/config.guess0100555000076400001440000012706310716643762014757 0ustar skimousers#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-05-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa:Linux:*:*) echo xtensa-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # 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. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nvi-1.81.6/dist/config.sub0100555000076400001440000007772610716643762014434 0ustar skimousers#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2007-04-29' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: nvi-1.81.6/dist/ltmain.sh0100644000076400001440000060446510716643762014267 0ustar skimousers# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.24 TIMESTAMP=" (1.1220.2.455 2007/06/24 02:13:29)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: nvi-1.81.6/dist/autom4te.cache/0040755000076400001440000000000010720065704015224 5ustar skimousersnvi-1.81.6/dist/autom4te.cache/requests0100644000076400001440000002412110720065712017016 0ustar skimousers# This file was generated. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '/usr/share/aclocal/libtool.m4', '/usr/share/aclocal-1.10/amversion.m4', '/usr/share/aclocal-1.10/auxdir.m4', '/usr/share/aclocal-1.10/cond.m4', '/usr/share/aclocal-1.10/depend.m4', '/usr/share/aclocal-1.10/depout.m4', '/usr/share/aclocal-1.10/header.m4', '/usr/share/aclocal-1.10/init.m4', '/usr/share/aclocal-1.10/install-sh.m4', '/usr/share/aclocal-1.10/lead-dot.m4', '/usr/share/aclocal-1.10/make.m4', '/usr/share/aclocal-1.10/missing.m4', '/usr/share/aclocal-1.10/mkdirp.m4', '/usr/share/aclocal-1.10/options.m4', '/usr/share/aclocal-1.10/runlog.m4', '/usr/share/aclocal-1.10/sanity.m4', '/usr/share/aclocal-1.10/strip.m4', '/usr/share/aclocal-1.10/substnot.m4', '/usr/share/aclocal-1.10/tar.m4', 'm4/gtk.m4', 'configure.in' ], { '_LT_AC_TAGCONFIG' => 1, 'AM_ENABLE_STATIC' => 1, 'VI_CV_REPLACE_FUNCS' => 1, 'm4_pattern_forbid' => 1, 'AC_LIBTOOL_COMPILER_OPTION' => 1, 'AC_LIBTOOL_LANG_RC_CONFIG' => 1, 'AM_PATH_GTK' => 1, '_LT_AC_SHELL_INIT' => 1, 'AC_DISABLE_SHARED' => 1, '_LT_COMPILER_BOILERPLATE' => 1, 'AC_DEFUN' => 1, 'AC_PROG_LIBTOOL' => 1, 'AC_LIBTOOL_SETUP' => 1, 'AC_LIBTOOL_WIN32_DLL' => 1, '_LT_AC_LANG_CXX_CONFIG' => 1, 'AM_PROG_MKDIR_P' => 1, 'AC_PROG_LD_RELOAD_FLAG' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AM_MISSING_PROG' => 1, 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, '_LT_AC_LANG_C_CONFIG' => 1, 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'AM_PROG_INSTALL_STRIP' => 1, '_m4_warn' => 1, 'AC_LIBTOOL_OBJDIR' => 1, 'AM_SANITY_CHECK' => 1, 'AC_LIBTOOL_LINKER_OPTION' => 1, 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, '_LT_AC_CHECK_DLFCN' => 1, 'LT_AC_PROG_RC' => 1, 'AC_LIBTOOL_CXX' => 1, '_AM_PROG_TAR' => 1, 'AC_LIBTOOL_GCJ' => 1, 'LT_AC_PROG_GCJ' => 1, 'AM_DEP_TRACK' => 1, '_LT_AC_PROG_CXXCPP' => 1, 'AM_DISABLE_STATIC' => 1, '_AC_PROG_LIBTOOL' => 1, 'AM_CONFIG_HEADER' => 1, '_LT_AC_LANG_F77' => 1, 'AC_LIBTOOL_CONFIG' => 1, '_AM_IF_OPTION' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_PATH_TOOL_PREFIX' => 1, 'AC_LIBTOOL_F77' => 1, '_AM_AUTOCONF_VERSION' => 1, 'm4_pattern_allow' => 1, 'AM_DISABLE_SHARED' => 1, 'AM_SET_LEADING_DOT' => 1, '_LT_AC_LANG_CXX' => 1, 'AM_PROG_LIBTOOL' => 1, '_AM_DEPENDENCIES' => 1, '_LT_AC_FILE_LTDLL_C' => 1, 'AM_PROG_LD' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, '_LT_AC_SYS_COMPILER' => 1, 'AM_PROG_NM' => 1, 'AU_DEFUN' => 1, 'AC_PROG_NM' => 1, 'AC_LIBTOOL_DLOPEN' => 1, 'AC_PROG_LD' => 1, 'AC_LIBLTDL_CONVENIENCE' => 1, 'AC_PROG_LD_GNU' => 1, 'AC_ENABLE_FAST_INSTALL' => 1, 'AC_DEPLIBS_CHECK_METHOD' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AC_LIBLTDL_INSTALLABLE' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, '_AM_SET_OPTION' => 1, '_LT_LINKER_BOILERPLATE' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1, 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_DISABLE_STATIC' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_DEFUN_ONCE' => 1, '_LT_AC_LOCK' => 1, '_LT_AC_LANG_RC_CONFIG' => 1, '_LT_AC_LANG_GCJ' => 1, 'AC_LIBTOOL_RC' => 1, '_LT_AC_PROG_ECHO_BACKSLASH' => 1, 'AC_DISABLE_FAST_INSTALL' => 1, 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1, '_LT_AC_SYS_LIBPATH_AIX' => 1, 'include' => 1, 'LT_AC_PROG_SED' => 1, 'AM_ENABLE_SHARED' => 1, 'AM_AUX_DIR_EXPAND' => 1, '_LT_AC_LANG_GCJ_CONFIG' => 1, 'AC_ENABLE_SHARED' => 1, 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, '_LT_AC_LANG_F77_CONFIG' => 1, '_AM_SET_OPTIONS' => 1, 'AM_RUN_LOG' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, 'AC_LIBTOOL_PICMODE' => 1, 'AC_ENABLE_STATIC' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, 'AC_CHECK_LIBM' => 1, '_LT_AC_TAGVAR' => 1, 'AC_LIBTOOL_SYS_LIB_STRIP' => 1, '_AM_MANGLE_OPTION' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AM_CONDITIONAL' => 1, 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'AM_SET_DEPDIR' => 1, '_LT_CC_BASENAME' => 1, 'AM_PROG_INSTALL_SH' => 1, 'm4_include' => 1, 'AC_PROG_EGREP' => 1, 'AC_PATH_MAGIC' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'AM_MAKE_INCLUDE' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.in' ], { '_LT_AC_TAGCONFIG' => 1, 'AM_PROG_F77_C_O' => 1, 'AC_INIT' => 1, 'm4_pattern_forbid' => 1, 'AC_CANONICAL_TARGET' => 1, 'AC_SUBST' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_FC_SRCEXT' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_CONFIG_LINKS' => 1, 'm4_sinclude' => 1, 'LT_SUPPORTED_TAG' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, '_m4_warn' => 1, 'AM_PROG_CXX_C_O' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_CONFIG_FILES' => 1, 'include' => 1, 'LT_INIT' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_LIBSOURCE' => 1, 'AM_PROG_FC_C_O' => 1, 'AC_CANONICAL_BUILD' => 1, 'AC_FC_FREEFORM' => 1, 'AH_OUTPUT' => 1, '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, 'AM_PROG_CC_C_O' => 1, 'm4_pattern_allow' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'm4_include' => 1, 'AC_SUBST_TRACE' => 1 } ], 'Autom4te::Request' ) ); nvi-1.81.6/dist/autom4te.cache/output.00100644000076400001440000347662510720065676016701 0ustar skimousers@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.61. @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../common/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED GREP EGREP LN_S ECHO AR RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL OPTFLAG no_op_OPTFLAG vi_cv_path_shell vi_cv_path_sendmail vi_cv_path_perl vi_cv_path_preserve vi_cv_path_fuser vi_cv_path_lsof INUSE vi_cv_path_ar vi_cv_path_chmod vi_cv_path_cp vi_cv_path_ln vi_cv_path_mkdir vi_cv_path_rm vi_cv_path_ranlib vi_cv_path_strip XMKMF XINCS LIB@&t@OBJS vi_programs vi_ipc GTKLIBS GTKINCS PKG_CONFIG GTK_CONFIG GTK_CFLAGS GTK_LIBS MOTIFLIBS IPCOBJS shrpenv perlldflags perllibs vi_cv_perllib CURSLIBS CURSCPPFLAGS CURSLDFLAGS HAVE_NCURSESW u_char_decl u_short_decl u_int_decl u_long_decl u_int8_decl u_int16_decl int16_decl u_int32_decl int32_decl NEED_FPRINTF_PROTO dl_src vi_cv_path_db3 LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Build a debugging version. --disable-runpath Don't record path of libraries in binary. --enable-trace Build a tracing version. --enable-widechar Build a wide char aware vi. --enable-gtk Build a Gtk front-end for vi. --disable-gtktest Do not try to compile and run a test GTK program --enable-motif Build a Motif front-end for vi. --enable-threads Turn on thread support. --enable-perlinterp Include a Perl interpreter in vi. --enable-tclinterp Include a Tk/Tcl interpreter in vi. --enable-dynamic-loading Load DB 3 dynamically. --enable-db4-logging Enable experimental/broken db4 logging. --disable-re DON'T use the nvi-provided RE routines. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ --with-x use the X Window System --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-curses=DIR Path to curses installation. --with-db=bundled|system Which db to use. --with-db-prefix=PFX Path to db installation. --with-db-build=prefix Path to db build. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME @%:@@%:@ --------- @%:@@%:@ @%:@@%:@ Platform. @%:@@%:@ @%:@@%:@ --------- @%:@@%:@ hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ Core tests. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX @%:@@%:@ ---------------- @%:@@%:@ @%:@@%:@ Cache variables. @%:@@%:@ @%:@@%:@ ---------------- @%:@@%:@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX @%:@@%:@ ----------------- @%:@@%:@ @%:@@%:@ Output variables. @%:@@%:@ @%:@@%:@ ----------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX @%:@@%:@ ------------------- @%:@@%:@ @%:@@%:@ File substitutions. @%:@@%:@ @%:@@%:@ ------------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ confdefs.h. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=vi VERSION=1.81.6 cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion { echo "$as_me:$LINENO: checking if --enable-debug option specified" >&5 echo $ECHO_N "checking if --enable-debug option specified... $ECHO_C" >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; vi_cv_debug=$enableval else vi_cv_debug="no" fi { echo "$as_me:$LINENO: result: $vi_cv_debug" >&5 echo "${ECHO_T}$vi_cv_debug" >&6; } if test "$vi_cv_debug" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define DEBUG 1 _ACEOF OPTFLAG=${OPTFLAG-"-g"} no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} fi case "$host_os" in aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} OPTFLAG=${OPTFLAG-"-O3"};; aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} LDFLAGS=${LDFLAGS-"-ZP"} OPTFLAG=${OPTFLAG-"-O"};; bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; bsdi*) CC=${CC-"shlicc"} OPTFLAG=${OPTFLAG-"-O2"};; irix6*) OPTFLAG=${OPTFLAG-"-O2"};; irix*) OPTFLAG=${OPTFLAG-"-O2"};; lynxos*) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for GNU C (gcc) version 2.x" >&5 echo $ECHO_N "checking for GNU C (gcc) version 2.x... $ECHO_C" >&6; } ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ grep "gcc version " | sed 's/.*version //'` ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` if test "$ac_cv_gcc_major" = "2" ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&5 echo "$as_me: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&2;} { { echo "$as_me:$LINENO: error: See build/README.LynxOS for more information." >&5 echo "$as_me: error: See build/README.LynxOS for more information." >&2;} { (exit 1); exit 1; }; } fi;; nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} LDFLAGS=${LDFLAGS-"-posix"} OPTFLAG=${OPTFLAG-"-O2"};; osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; esac OPTFLAG=${OPTFLAG-"-O"} CC=${CC-cc} CFLAGS=${CFLAGS-""} ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "$GCC" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_GCC 1 _ACEOF fi no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} case "$host_os" in bsdi2.1) LIBS=${LIBS-"-lipc"};; dgux*) LIBS=${LIBS-"-ldgc"};; irix6*) LIBS=${LIBS-"-lbsd"};; irix*) LIBS=${LIBS-"-lc_s -lbsd"};; isc*) LIBS=${LIBS-"-lcposix -linet"};; netbsd1*) LIBS=${LIBS-"-lcrypt"};; ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; sco3.2*) LIBS=${LIBS-"-lsocket"};; sinix*) LIBS=${LIBS-"-lelf -lc"};; solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"};; wgs*) LIBS=${LIBS-"-lnsl"};; esac case "$host_os" in aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; esac case "$host_os" in ultrix*) cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BROKEN_VDISABLE 1 _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether recording of pathnames of libraries is enabled" >&5 echo $ECHO_N "checking whether recording of pathnames of libraries is enabled... $ECHO_C" >&6; } # Check whether --enable-runpath was given. if test "${enable_runpath+set}" = set; then enableval=$enable_runpath; vi_cv_runpath="$enableval" else vi_cv_runpath="yes" fi { echo "$as_me:$LINENO: result: $vi_cv_runpath" >&5 echo "${ECHO_T}$vi_cv_runpath" >&6; } if test "X$vi_cv_runpath" = "Xyes"; then LRscript='s/^\(.*\)/-R\1 -L\1 /' else LRscript='s/^\(.*\)/-L\1 /' fi { echo "$as_me:$LINENO: checking if --enable-trace option specified" >&5 echo $ECHO_N "checking if --enable-trace option specified... $ECHO_C" >&6; } # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then enableval=$enable_trace; vi_cv_trace="yes" else vi_cv_trace="no" fi if test "$vi_cv_trace" = yes; then CPPFLAGS="-DTRACE $CPPFLAGS" fi { echo "$as_me:$LINENO: result: $vi_cv_trace" >&5 echo "${ECHO_T}$vi_cv_trace" >&6; } CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" LDFLAGS="$ADDLDFLAGS $LDFLAGS" LIBS="$ADDLIBS $LIBS" PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib" # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_shell+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_shell in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_shell="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no" ;; esac fi vi_cv_path_shell=$ac_cv_path_vi_cv_path_shell if test -n "$vi_cv_path_shell"; then { echo "$as_me:$LINENO: result: $vi_cv_path_shell" >&5 echo "${ECHO_T}$vi_cv_path_shell" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_shell" = no; then { { echo "$as_me:$LINENO: error: No shell utility found." >&5 echo "$as_me: error: No shell utility found." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_sendmail+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_sendmail in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_sendmail="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no" ;; esac fi vi_cv_path_sendmail=$ac_cv_path_vi_cv_path_sendmail if test -n "$vi_cv_path_sendmail"; then { echo "$as_me:$LINENO: result: $vi_cv_path_sendmail" >&5 echo "${ECHO_T}$vi_cv_path_sendmail" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_sendmail" = no; then { echo "$as_me:$LINENO: WARNING: No sendmail utility found;" >&5 echo "$as_me: WARNING: No sendmail utility found;" >&2;} { echo "$as_me:$LINENO: WARNING: users will not be told of saved files." >&5 echo "$as_me: WARNING: users will not be told of saved files." >&2;} fi for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_perl in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl if test -n "$vi_cv_path_perl"; then { echo "$as_me:$LINENO: result: $vi_cv_path_perl" >&5 echo "${ECHO_T}$vi_cv_path_perl" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$vi_cv_path_perl" && break done test -n "$vi_cv_path_perl" || vi_cv_path_perl="no" { echo "$as_me:$LINENO: checking for preserve directory" >&5 echo $ECHO_N "checking for preserve directory... $ECHO_C" >&6; } if test "${vi_cv_path_preserve+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else dirlist="/var/preserve /var/tmp /usr/tmp" vi_cv_path_preserve=no for i in $dirlist; do if test -d $i/vi.recover; then vi_cv_path_preserve=$i/vi.recover break; fi done if test "$vi_cv_path_preserve" = no; then for i in $dirlist; do if test -d $i -a -w $i; then vi_cv_path_preserve=$i/vi.recover break; fi done fi fi if test "$vi_cv_path_preserve" = no; then { { echo "$as_me:$LINENO: error: No writeable preserve directory found." >&5 echo "$as_me: error: No writeable preserve directory found." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_path_preserve" >&5 echo "${ECHO_T}$vi_cv_path_preserve" >&6; } # Extract the first word of "fuser", so it can be a program name with args. set dummy fuser; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_fuser+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_fuser in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_fuser="$vi_cv_path_fuser" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_fuser="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_fuser" && ac_cv_path_vi_cv_path_fuser="no" ;; esac fi vi_cv_path_fuser=$ac_cv_path_vi_cv_path_fuser if test -n "$vi_cv_path_fuser"; then { echo "$as_me:$LINENO: result: $vi_cv_path_fuser" >&5 echo "${ECHO_T}$vi_cv_path_fuser" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "lsof", so it can be a program name with args. set dummy lsof; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_lsof+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_lsof in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_lsof="$vi_cv_path_lsof" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_lsof="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_lsof" && ac_cv_path_vi_cv_path_lsof="no" ;; esac fi vi_cv_path_lsof=$ac_cv_path_vi_cv_path_lsof if test -n "$vi_cv_path_lsof"; then { echo "$as_me:$LINENO: result: $vi_cv_path_lsof" >&5 echo "${ECHO_T}$vi_cv_path_lsof" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi INUSE="" if test "$vi_cv_path_lsof" != no; then INUSE='test `lsof -t $i`' fi if test "$vi_cv_path_fuser" != no; then INUSE='fuser -s $i' fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ar in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ar="$vi_cv_path_ar" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ar="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ar" && ac_cv_path_vi_cv_path_ar="missing_ar" ;; esac fi vi_cv_path_ar=$ac_cv_path_vi_cv_path_ar if test -n "$vi_cv_path_ar"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ar" >&5 echo "${ECHO_T}$vi_cv_path_ar" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_chmod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_chmod in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_chmod="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod" ;; esac fi vi_cv_path_chmod=$ac_cv_path_vi_cv_path_chmod if test -n "$vi_cv_path_chmod"; then { echo "$as_me:$LINENO: result: $vi_cv_path_chmod" >&5 echo "${ECHO_T}$vi_cv_path_chmod" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_cp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_cp in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_cp="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp" ;; esac fi vi_cv_path_cp=$ac_cv_path_vi_cv_path_cp if test -n "$vi_cv_path_cp"; then { echo "$as_me:$LINENO: result: $vi_cv_path_cp" >&5 echo "${ECHO_T}$vi_cv_path_cp" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ln+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ln in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ln="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="missing_ln" ;; esac fi vi_cv_path_ln=$ac_cv_path_vi_cv_path_ln if test -n "$vi_cv_path_ln"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ln" >&5 echo "${ECHO_T}$vi_cv_path_ln" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_mkdir in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_mkdir="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir" ;; esac fi vi_cv_path_mkdir=$ac_cv_path_vi_cv_path_mkdir if test -n "$vi_cv_path_mkdir"; then { echo "$as_me:$LINENO: result: $vi_cv_path_mkdir" >&5 echo "${ECHO_T}$vi_cv_path_mkdir" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_rm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_rm in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_rm="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm" ;; esac fi vi_cv_path_rm=$ac_cv_path_vi_cv_path_rm if test -n "$vi_cv_path_rm"; then { echo "$as_me:$LINENO: result: $vi_cv_path_rm" >&5 echo "${ECHO_T}$vi_cv_path_rm" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ranlib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ranlib in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ranlib="$vi_cv_path_ranlib" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ranlib="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ranlib" && ac_cv_path_vi_cv_path_ranlib="missing_ranlib" ;; esac fi vi_cv_path_ranlib=$ac_cv_path_vi_cv_path_ranlib if test -n "$vi_cv_path_ranlib"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ranlib" >&5 echo "${ECHO_T}$vi_cv_path_ranlib" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_strip+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_strip in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_strip="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip" ;; esac fi vi_cv_path_strip=$ac_cv_path_vi_cv_path_strip if test -n "$vi_cv_path_strip"; then { echo "$as_me:$LINENO: result: $vi_cv_path_strip" >&5 echo "${ECHO_T}$vi_cv_path_strip" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" != yes; then if test "X$x_libraries" != "X"; then XLIBS="`echo $x_libraries | sed "$LRscript"` $XLIBS" fi XLIBS="$XLIBS -lX11" if test "X$x_includes" != "X"; then XINCS="-I$x_includes" fi fi { echo "$as_me:$LINENO: checking if --enable-widechar option specified" >&5 echo $ECHO_N "checking if --enable-widechar option specified... $ECHO_C" >&6; } # Check whether --enable-widechar was given. if test "${enable_widechar+set}" = set; then enableval=$enable_widechar; vi_cv_widechar=$enableval else vi_cv_widechar="no" fi if test "$vi_cv_widechar" = "yes"; then cat >>confdefs.h <<\_ACEOF @%:@define USE_WIDECHAR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_widechar" >&5 echo "${ECHO_T}$vi_cv_widechar" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking langinfo.h usability" >&5 echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking langinfo.h presence" >&5 echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then if test "${ac_cv_header_iconv_h+set}" = set; then { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking iconv.h usability" >&5 echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking iconv.h presence" >&5 echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_iconv_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } fi if test $ac_cv_header_iconv_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define USE_ICONV 1 _ACEOF for ac_func in iswblank do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done fi fi { echo "$as_me:$LINENO: checking if --enable-gtk option specified" >&5 echo $ECHO_N "checking if --enable-gtk option specified... $ECHO_C" >&6; } # Check whether --enable-gtk was given. if test "${enable_gtk+set}" = set; then enableval=$enable_gtk; vi_cv_gtk=$enableval else vi_cv_gtk="no" fi { echo "$as_me:$LINENO: result: $vi_cv_gtk" >&5 echo "${ECHO_T}$vi_cv_gtk" >&6; } if test "$vi_cv_gtk" = "yes"; then # # Find pkg-config # # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PKG_CONFIG = xno ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&5 echo "$as_me: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&2;} { (exit 1); exit 1; }; } fi else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config too old; version 0.5 or better required." >&5 echo "$as_me: error: *** pkg-config too old; version 0.5 or better required." >&2;} { (exit 1); exit 1; }; } fi PKG_CONFIG=no fi fi if test x$PKG_CONFIG = xno ; then PKG_CONFIG=/bin/false fi vi_programs="$vi_programs vi-gtk" vi_ipc=vi-ipc { echo "$as_me:$LINENO: checking for gtk+" >&5 echo $ECHO_N "checking for gtk+... $ECHO_C" >&6; } if $PKG_CONFIG gtk+-2.0 ; then GTKINCS=`$PKG_CONFIG --cflags gtk+-2.0` GTKLIBS=`$PKG_CONFIG --libs gtk+-2.0` { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PANGO 1 _ACEOF else if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&5 echo "$as_me: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&2;} { (exit 1); exit 1; }; } else # Check whether --with-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval=$with_gtk_prefix; gtk_config_prefix="$withval" else gtk_config_prefix="" fi # Check whether --with-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then withval=$with_gtk_exec_prefix; gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval=$enable_gtktest; else enable_gtktest=yes fi for module in . do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GTK_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG=$ac_cv_path_GTK_CONFIG if test -n "$GTK_CONFIG"; then { echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 echo "${ECHO_T}$GTK_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi min_gtk_version=1.2.0 { echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6; } no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" : fi rm -f conf.gtktest GTKINCS="$GTK_CFLAGS" GTKLIBS="$GTK_LIBS $LIBS" fi fi SAVELIBS="$LIBS" LIBS="-lutil $GTKLIBS" { echo "$as_me:$LINENO: checking for zvt_get_ptys in -lnvizvt" >&5 echo $ECHO_N "checking for zvt_get_ptys in -lnvizvt... $ECHO_C" >&6; } if test "${ac_cv_lib_nvizvt_zvt_get_ptys+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnvizvt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zvt_get_ptys (); int main () { return zvt_get_ptys (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_nvizvt_zvt_get_ptys=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nvizvt_zvt_get_ptys=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_nvizvt_zvt_get_ptys" >&5 echo "${ECHO_T}$ac_cv_lib_nvizvt_zvt_get_ptys" >&6; } if test $ac_cv_lib_nvizvt_zvt_get_ptys = yes; then vi_cv_zvt="yes" else vi_cv_zvt="no" fi if test "$vi_cv_zvt" = "yes"; then GTKLIBS="-lnvizvt $LIBS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_ZVT 1 _ACEOF fi LIBS="$SAVELIBS" # AC_PATH_PROG(vi_cv_gnome_config, gnome-config, no) # if test "$vi_cv_gnome_config" != "no"; then # ZVTLIBS=`$vi_cv_gnome_config zvt --libs` # GTKLIBS="$ZVTLIBS $GTKLIBS" # fi fi { echo "$as_me:$LINENO: checking if --enable-motif option specified" >&5 echo $ECHO_N "checking if --enable-motif option specified... $ECHO_C" >&6; } # Check whether --enable-motif was given. if test "${enable_motif+set}" = set; then enableval=$enable_motif; vi_cv_motif=$enableval else vi_cv_motif="no" fi { echo "$as_me:$LINENO: result: $vi_cv_motif" >&5 echo "${ECHO_T}$vi_cv_motif" >&6; } if test "$vi_cv_motif" = "yes"; then vi_programs="$vi_programs vi-motif" vi_ipc=vi-ipc case "$host_os" in bsdi*) CC=cc;; esac MOTIFLIBS="-lXm -lXt" { echo "$as_me:$LINENO: checking for main in -lSM" >&5 echo $ECHO_N "checking for main in -lSM... $ECHO_C" >&6; } if test "${ac_cv_lib_SM_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSM "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_SM_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_SM_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_SM_main" >&5 echo "${ECHO_T}$ac_cv_lib_SM_main" >&6; } if test $ac_cv_lib_SM_main = yes; then vi_cv_smlib="yes" else vi_cv_smlib="no" fi if test "$vi_cv_smlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lSM" fi { echo "$as_me:$LINENO: checking for main in -lICE" >&5 echo $ECHO_N "checking for main in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_main" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_main" >&6; } if test $ac_cv_lib_ICE_main = yes; then vi_cv_icelib="yes" else vi_cv_icelib="no" fi if test "$vi_cv_icelib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lICE" fi { echo "$as_me:$LINENO: checking for main in -lXext" >&5 echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } if test "${ac_cv_lib_Xext_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xext_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } if test $ac_cv_lib_Xext_main = yes; then vi_cv_xextlib="yes" else vi_cv_xextlib="no" fi if test "$vi_cv_xextlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXext" fi { echo "$as_me:$LINENO: checking for main in -lXpm" >&5 echo $ECHO_N "checking for main in -lXpm... $ECHO_C" >&6; } if test "${ac_cv_lib_Xpm_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xpm_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xpm_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xpm_main" >&6; } if test $ac_cv_lib_Xpm_main = yes; then vi_cv_xpmlib="yes" else vi_cv_xpmlib="no" fi if test "$vi_cv_xpmlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXpm" fi MOTIFLIBS="$MOTIFLIBS $XLIBS -lm $LIBS" fi { echo "$as_me:$LINENO: checking if --enable-threads option specified" >&5 echo $ECHO_N "checking if --enable-threads option specified... $ECHO_C" >&6; } # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; vi_cv_threads=$enableval else vi_cv_threads="no" fi { echo "$as_me:$LINENO: result: $vi_cv_threads" >&5 echo "${ECHO_T}$vi_cv_threads" >&6; } if test "$vi_cv_threads" = "yes"; then LIBS="$LIBS -lpthread" if test "${vi_cv_have_pthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_self() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_pthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_pthreads=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_pthreads" = "no"; then { { echo "$as_me:$LINENO: error: No threading library found" >&5 echo "$as_me: error: No threading library found" >&2;} { (exit 1); exit 1; }; } fi IPCOBJS="pthread.o $IPCOBJS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PTHREAD 1 _ACEOF else IPCOBJS="nothread.o $IPCOBJS" fi { echo "$as_me:$LINENO: checking if --enable-perlinterp option specified" >&5 echo $ECHO_N "checking if --enable-perlinterp option specified... $ECHO_C" >&6; } # Check whether --enable-perlinterp was given. if test "${enable_perlinterp+set}" = set; then enableval=$enable_perlinterp; vi_cv_perlinterp=$enableval else vi_cv_perlinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_perlinterp" >&5 echo "${ECHO_T}$vi_cv_perlinterp" >&6; } if test "$vi_cv_perlinterp" = "yes"; then if test "$vi_cv_path_perl" = no; then { { echo "$as_me:$LINENO: error: No perl5 utility found." >&5 echo "$as_me: error: No perl5 utility found." >&2;} { (exit 1); exit 1; }; } fi $vi_cv_path_perl -e 'require 5.004' || { { { echo "$as_me:$LINENO: error: perl5 must be version 5.004 or later." >&5 echo "$as_me: error: perl5 must be version 5.004 or later." >&2;} { (exit 1); exit 1; }; } } if test "$vi_cv_threads" = "yes"; then useithreads=`$vi_cv_path_perl -MConfig -e 'print $Config{useithreads}'` if test "X$useithreads" != "Xdefine"; then { { echo "$as_me:$LINENO: error: vi threading only compatible with perl's ithreads." >&5 echo "$as_me: error: vi threading only compatible with perl's ithreads." >&2;} { (exit 1); exit 1; }; } fi fi eval `$vi_cv_path_perl -V:shrpenv` vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ -e 'ccflags;perl_inc'` if test "X$perlcppflags" != "X"; then CPPFLAGS="$perlcppflags $CPPFLAGS" fi perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ldopts'` perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ccdlflags'` LIBOBJS="perl.o perlxsi.o perlsfio.o $LIBOBJS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PERL_INTERP 1 _ACEOF { echo "$as_me:$LINENO: checking whether we need to use perl's setenv" >&5 echo $ECHO_N "checking whether we need to use perl's setenv... $ECHO_C" >&6; } if test "${vi_cv_perl_setenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main(){ #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV) exit(0); #else exit(1); #endif } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_perl_setenv=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_perl_setenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $vi_cv_perl_setenv" >&5 echo "${ECHO_T}$vi_cv_perl_setenv" >&6; } if test "$vi_cv_perl_setenv" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define USE_PERL_SETENV 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking if --enable-tclinterp option specified" >&5 echo $ECHO_N "checking if --enable-tclinterp option specified... $ECHO_C" >&6; } # Check whether --enable-tclinterp was given. if test "${enable_tclinterp+set}" = set; then enableval=$enable_tclinterp; vi_cv_tclinterp=$enableval else vi_cv_tclinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_tclinterp" >&5 echo "${ECHO_T}$vi_cv_tclinterp" >&6; } if test "$vi_cv_tclinterp" = "yes"; then { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; } if test "${vi_cv_tclconfig+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_tclconfig=`$srcdir/findconfig` fi { echo "$as_me:$LINENO: result: $vi_cv_tclconfig" >&5 echo "${ECHO_T}$vi_cv_tclconfig" >&6; } if test "x$vi_cv_tclconfig" = x; then { { echo "$as_me:$LINENO: error: No Tcl library found;" >&5 echo "$as_me: error: No Tcl library found;" >&2;} { (exit 1); exit 1; }; } fi . $vi_cv_tclconfig LIBOBJS="tcl.o $LIBOBJS" LIBS="$TCL_LIB_SPEC $TCL_LIBS $LIBS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_TCL_INTERP 1 _ACEOF fi SAVELIBS="$LIBS" SAVELDFLAGS="$LDFLAGS" SAVECPPFLAGS="$CPPFLAGS" # Check whether --with-curses was given. if test "${with_curses+set}" = set; then withval=$with_curses; fi if test "x$with_curses" != "x"; then CURSLDFLAGS="`echo $with_curses/lib | sed "$LRscript"` $CURSLDFLAGS" CURSCPPFLAGS="-I$with_curses/include $CURSCPPFLAGS" fi; LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" if test "$vi_cv_widechar" = "yes"; then for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_waddnwstr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for waddnwstr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for waddnwstr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char waddnwstr (); int main () { return waddnwstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done else for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_initscr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for initscr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for initscr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done fi if test "$vi_cv_curses" != "unknown"; then CURSHEADER=curses.h if test "$vi_cv_curses" = "ncurses"; then for ac_header in ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncurses.h fi done fi if test "$vi_cv_curses" = "ncursesw"; then for ac_header in ncursesw/ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncursesw/ncurses.h fi done fi vi_programs="vi $vi_programs" CURSLIBS="-l$vi_cv_curses" else { echo "$as_me:$LINENO: WARNING: *** No suitable curses library found." >&5 echo "$as_me: WARNING: *** No suitable curses library found." >&2;} if test "$vi_programs"X = X; then { { echo "$as_me:$LINENO: error: No executable to build." >&5 echo "$as_me: error: No executable to build." >&2;} { (exit 1); exit 1; }; } fi fi as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_tgetent" | $as_tr_sh` { echo "$as_me:$LINENO: checking for tgetent in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for tgetent in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then vi_cv_curses_tgetent=yes else vi_cv_curses_tgetent=no fi if test "$vi_cv_curses_tgetent" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermlib" >&5 echo $ECHO_N "checking for tgetent in -ltermlib... $ECHO_C" >&6; } if test "${ac_cv_lib_termlib_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termlib_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termlib_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termlib_tgetent" >&6; } if test $ac_cv_lib_termlib_tgetent = yes; then vi_cv_termlib=-ltermlib else vi_cv_termlib=no fi if test "$vi_cv_termlib" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } if test $ac_cv_lib_termcap_tgetent = yes; then vi_cv_termlib=-ltermcap else vi_cv_termlib=no fi fi fi if test "$vi_cv_termlib" != no; then CURSLIBS="$CURSLIBS $vi_cv_termlib" fi LIBS="$SAVELIBS" LDFLAGS="$SAVELDFLAGS" CPPFLAGS="$SAVECPPFLAGS" { echo "$as_me:$LINENO: checking for sys/mman.h" >&5 echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_mman+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_mman=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_mman=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_mman" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_MMAN_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_mman" >&5 echo "${ECHO_T}$vi_cv_include_sys_mman" >&6; } { echo "$as_me:$LINENO: checking for sys/select.h" >&5 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_select=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_select=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_select" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_SELECT_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_select" >&5 echo "${ECHO_T}$vi_cv_include_sys_select" >&6; } { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef ssize_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define ssize_t int _ACEOF fi { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF @%:@define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi { echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (sizeof ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_ST_BLKSIZE 1 _ACEOF fi { echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef mode_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define mode_t int _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef pid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @%:@define TM_IN_SYS_TIME 1 _ACEOF fi for ac_func in bsearch gethostname memchr memset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in mkstemp mmap strdup strpbrk do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in snprintf vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in select do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_env=no else need_env=yes fi done for ac_func in strsep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_strsep=no else need_strsep=yes fi done for ac_func in unsetenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else need_env=yes fi done for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap for ac_header in vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF fi if test "$need_env" = yes; then LIBOBJS="env.o $LIBOBJS" fi if test "$need_strsep" = yes; then LIBOBJS="strsep.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking for fcntl/flock" >&5 echo $ECHO_N "checking for fcntl/flock... $ECHO_C" >&6; } if test "${vi_cv_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_lock=none case "$host_os" in dgux*);; irix*);; *) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { flock(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=flock else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; esac if test "$vi_cv_lock" = none; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { fcntl(0, F_SETLK, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=fcntl else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi if test "$vi_cv_lock" = flock; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_LOCK_FLOCK 1 _ACEOF fi if test "$vi_cv_lock" = fcntl; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_LOCK_FCNTL 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_lock" >&5 echo "${ECHO_T}$vi_cv_lock" >&6; } { echo "$as_me:$LINENO: checking for ftruncate/chsize" >&5 echo $ECHO_N "checking for ftruncate/chsize... $ECHO_C" >&6; } if test "${vi_cv_ftruncate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ftruncate(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=ftruncate else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { chsize(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=chsize else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ftruncate=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_ftruncate" = ftruncate; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_FTRUNCATE_FTRUNCATE 1 _ACEOF fi if test "$vi_cv_ftruncate" = chsize; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_FTRUNCATE_CHSIZE 1 _ACEOF fi if test "$vi_cv_ftruncate" = no; then { { echo "$as_me:$LINENO: error: No file truncation system call." >&5 echo "$as_me: error: No file truncation system call." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_ftruncate" >&5 echo "${ECHO_T}$vi_cv_ftruncate" >&6; } CSAVELIBS="$LIBS" CSAVELDFLAGS="$LDFLAGS" CSAVECPPFLAGS="$CPPFLAGS" LIBS="$CURSLIBS $LIBS" LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" { echo "$as_me:$LINENO: checking for tigetstr/tigetnum" >&5 echo $ECHO_N "checking for tigetstr/tigetnum... $ECHO_C" >&6; } if test "${vi_cv_have_curses_tigetstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { tigetstr(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_tigetstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_tigetstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_tigetstr" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_TIGETSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_tigetstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_tigetstr" >&6; } if test "$vi_cv_curses" = "bundled curses"; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BSD_CURSES 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_WADDNSTR 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_IDLOK 1 _ACEOF else { echo "$as_me:$LINENO: checking for waddnstr" >&5 echo $ECHO_N "checking for waddnstr... $ECHO_C" >&6; } if test "${vi_cv_have_curses_waddnstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { waddnstr(stdscr, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_waddnstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_waddnstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_waddnstr" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_WADDNSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_waddnstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_waddnstr" >&6; } { echo "$as_me:$LINENO: checking for beep" >&5 echo $ECHO_N "checking for beep... $ECHO_C" >&6; } if test "${vi_cv_have_curses_beep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { beep(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_beep=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_beep=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_beep" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_BEEP 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_beep" >&5 echo "${ECHO_T}$vi_cv_have_curses_beep" >&6; } { echo "$as_me:$LINENO: checking for flash" >&5 echo $ECHO_N "checking for flash... $ECHO_C" >&6; } if test "${vi_cv_have_curses_flash+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { flash(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_flash=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_flash=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_flash" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_FLASH 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_flash" >&5 echo "${ECHO_T}$vi_cv_have_curses_flash" >&6; } { echo "$as_me:$LINENO: checking for idlok" >&5 echo $ECHO_N "checking for idlok... $ECHO_C" >&6; } if test "${vi_cv_have_curses_idlok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { idlok(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_idlok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_idlok=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_idlok" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_IDLOK 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_idlok" >&5 echo "${ECHO_T}$vi_cv_have_curses_idlok" >&6; } { echo "$as_me:$LINENO: checking for keypad" >&5 echo $ECHO_N "checking for keypad... $ECHO_C" >&6; } if test "${vi_cv_have_curses_keypad+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { keypad(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_keypad=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_keypad=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_keypad" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_KEYPAD 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_keypad" >&5 echo "${ECHO_T}$vi_cv_have_curses_keypad" >&6; } { echo "$as_me:$LINENO: checking for newterm" >&5 echo $ECHO_N "checking for newterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_newterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { newterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_newterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_newterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_newterm" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_NEWTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_newterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_newterm" >&6; } if test "$vi_cv_have_curses_newterm" = no; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BSD_CURSES 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking for setupterm" >&5 echo $ECHO_N "checking for setupterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_setupterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { setupterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_setupterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_setupterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_setupterm" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_SETUPTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_setupterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_setupterm" >&6; } LIBS="$CSAVELIBS" LDFLAGS="$CSAVELDFLAGS" CPPFLAGS="$CSAVECPPFLAGS" { echo "$as_me:$LINENO: checking for broken gettimeofday system call" >&5 echo $ECHO_N "checking for broken gettimeofday system call... $ECHO_C" >&6; } if test "${vi_cv_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { gettimeofday(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_gettimeofday=okay else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_gettimeofday=broken fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_gettimeofday" = broken; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BROKEN_GETTIMEOFDAY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_gettimeofday" >&5 echo "${ECHO_T}$vi_cv_gettimeofday" >&6; } { echo "$as_me:$LINENO: checking for System V pty calls" >&5 echo $ECHO_N "checking for System V pty calls... $ECHO_C" >&6; } if test "${vi_cv_sys5_pty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { grantpt(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_sys5_pty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_sys5_pty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_sys5_pty" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS5_PTY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sys5_pty" >&5 echo "${ECHO_T}$vi_cv_sys5_pty" >&6; } { echo "$as_me:$LINENO: checking for revoke system call" >&5 echo $ECHO_N "checking for revoke system call... $ECHO_C" >&6; } if test "${vi_cv_revoke+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { revoke("a"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_revoke=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_revoke=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_revoke" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REVOKE 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_revoke" >&5 echo "${ECHO_T}$vi_cv_revoke" >&6; } { echo "$as_me:$LINENO: checking for int type sprintf return value" >&5 echo $ECHO_N "checking for int type sprintf return value... $ECHO_C" >&6; } if test "${vi_cv_sprintf_count+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_sprintf_count=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_sprintf_count=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi if test "$vi_cv_sprintf_count" = no; then cat >>confdefs.h <<\_ACEOF @%:@define SPRINTF_RET_CHARPNT 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sprintf_count" >&5 echo "${ECHO_T}$vi_cv_sprintf_count" >&6; } { echo "$as_me:$LINENO: checking for u_char" >&5 echo $ECHO_N "checking for u_char... $ECHO_C" >&6; } if test "${vi_cv_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_char foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uchar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uchar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uchar" >&5 echo "${ECHO_T}$vi_cv_uchar" >&6; } if test "$vi_cv_uchar" = no; then u_char_decl="typedef unsigned char u_char;" fi { echo "$as_me:$LINENO: checking for u_short" >&5 echo $ECHO_N "checking for u_short... $ECHO_C" >&6; } if test "${vi_cv_ushort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_short foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ushort=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ushort=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ushort" >&5 echo "${ECHO_T}$vi_cv_ushort" >&6; } if test "$vi_cv_ushort" = no; then u_short_decl="typedef unsigned short u_short;" fi { echo "$as_me:$LINENO: checking for u_int" >&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6; } if test "${vi_cv_uint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uint=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint" >&5 echo "${ECHO_T}$vi_cv_uint" >&6; } if test "$vi_cv_uint" = no; then u_int_decl="typedef unsigned int u_int;" fi { echo "$as_me:$LINENO: checking for u_long" >&5 echo $ECHO_N "checking for u_long... $ECHO_C" >&6; } if test "${vi_cv_ulong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_long foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ulong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ulong=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ulong" >&5 echo "${ECHO_T}$vi_cv_ulong" >&6; } if test "$vi_cv_ulong" = no; then u_long_decl="typedef unsigned long u_long;" fi { echo "$as_me:$LINENO: checking for u_int8_t" >&5 echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; } if test "${vi_cv_uint8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int8_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned char) != 1);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint8="unsigned char" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint8=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint8" >&5 echo "${ECHO_T}$vi_cv_uint8" >&6; } if test "$vi_cv_uint8" = no; then { { echo "$as_me:$LINENO: error: No unsigned 8-bit integral type." >&5 echo "$as_me: error: No unsigned 8-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint8" != yes; then u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" fi { echo "$as_me:$LINENO: checking for u_int16_t" >&5 echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; } if test "${vi_cv_uint16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint16" >&5 echo "${ECHO_T}$vi_cv_uint16" >&6; } if test "$vi_cv_uint16" = no; then { { echo "$as_me:$LINENO: error: No unsigned 16-bit integral type." >&5 echo "$as_me: error: No unsigned 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint16" != yes; then u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" fi { echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; } if test "${vi_cv_int16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int16" >&5 echo "${ECHO_T}$vi_cv_int16" >&6; } if test "$vi_cv_int16" = no; then { { echo "$as_me:$LINENO: error: No signed 16-bit integral type." >&5 echo "$as_me: error: No signed 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int16" != yes; then int16_decl="typedef $vi_cv_int16 int16_t;" fi { echo "$as_me:$LINENO: checking for u_int32_t" >&5 echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; } if test "${vi_cv_uint32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint32" >&5 echo "${ECHO_T}$vi_cv_uint32" >&6; } if test "$vi_cv_uint32" = no; then { { echo "$as_me:$LINENO: error: No unsigned 32-bit integral type." >&5 echo "$as_me: error: No unsigned 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint32" != yes; then u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" fi { echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } if test "${vi_cv_int32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int32" >&5 echo "${ECHO_T}$vi_cv_int32" >&6; } if test "$vi_cv_int32" = no; then { { echo "$as_me:$LINENO: error: No signed 32-bit integral type." >&5 echo "$as_me: error: No signed 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int32" != yes; then int32_decl="typedef $vi_cv_int32 int32_t;" fi { echo "$as_me:$LINENO: checking return type of fprintf" >&5 echo $ECHO_N "checking return type of fprintf... $ECHO_C" >&6; } if test "${vi_cv_type_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int fprintf (); int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_type_fprintf=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_type_fprintf=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_type_fprintf" >&5 echo "${ECHO_T}$vi_cv_type_fprintf" >&6; } { echo "$as_me:$LINENO: checking fprintf prototype needed" >&5 echo $ECHO_N "checking fprintf prototype needed... $ECHO_C" >&6; } if test "${vi_cv_proto_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include typedef int (*funcPtr)(); int main () { funcPtr ptr = (funcPtr) fprintf; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_proto_fprintf=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_proto_fprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_proto_fprintf" >&5 echo "${ECHO_T}$vi_cv_proto_fprintf" >&6; } if test "$vi_cv_proto_fprintf" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define NEED_FPRINTF_PROTO 1 _ACEOF fi # Check whether --with-db_type was given. if test "${with_db_type+set}" = set; then withval=$with_db_type; fi case "$with_db_type" in "db1") { echo "$as_me:$LINENO: WARNING: Use of db1 is not officially supported." >&5 echo "$as_me: WARNING: Use of db1 is not officially supported." >&2;} cat >>confdefs.h <<\_ACEOF @%:@define USE_DB1 1 _ACEOF ;; "system") ;; *) with_db_type="bundled" ;; esac # Check whether --with-db_prefix was given. if test "${with_db_prefix+set}" = set; then withval=$with_db_prefix; fi SAVELDFLAGS="$LDFLAGS" if test "x$with_db_prefix" != "x"; then LDFLAGS="-L$with_db_prefix/lib $LDFLAGS" CPPFLAGS="-I$with_db_prefix/include $CPPFLAGS" fi if test "$with_db_type" != db1; then SAVELIBS="$LIBS" LIBS="$LIBS -ldb" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { db_create(NULL,NULL,0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_dbfatal="no" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_dbfatal="yes" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$vi_cv_dbfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need DB 3." >&5 echo "$as_me: error: Need DB 3." >&2;} { (exit 1); exit 1; }; } fi LIBS="$SAVELIBS" fi LDFLAGS="$SAVELDFLAGS" { echo "$as_me:$LINENO: checking if --enable-dynamic-loading option specified" >&5 echo $ECHO_N "checking if --enable-dynamic-loading option specified... $ECHO_C" >&6; } # Check whether --enable-dynamic-loading was given. if test "${enable_dynamic_loading+set}" = set; then enableval=$enable_dynamic_loading; vi_cv_dl=$enableval else vi_cv_dl="no" fi { echo "$as_me:$LINENO: result: $vi_cv_dl" >&5 echo "${ECHO_T}$vi_cv_dl" >&6; } if test "$vi_cv_dl" = yes; then { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then vi_cv_dlfatal="no" else vi_cv_dlfatal="yes" fi if test "$vi_cv_dlfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need dl to support dynamic loading." >&5 echo "$as_me: error: Need dl to support dynamic loading." >&2;} { (exit 1); exit 1; }; } fi OLDPATH="$PATH" PATH="$with_db_prefix/lib:/usr/lib:/lib" # Extract the first word of "libdb-3.so", so it can be a program name with args. set dummy libdb-3.so; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_db3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_db3 in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_db3="$vi_cv_path_db3" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_db3="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_db3" && ac_cv_path_vi_cv_path_db3="no" ;; esac fi vi_cv_path_db3=$ac_cv_path_vi_cv_path_db3 if test -n "$vi_cv_path_db3"; then { echo "$as_me:$LINENO: result: $vi_cv_path_db3" >&5 echo "${ECHO_T}$vi_cv_path_db3" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_db3" = no; then { { echo "$as_me:$LINENO: error: Path of libdb-3.so not found." >&5 echo "$as_me: error: Path of libdb-3.so not found." >&2;} { (exit 1); exit 1; }; } fi PATH="$OLDPATH" cat >>confdefs.h <<\_ACEOF @%:@define USE_DYNAMIC_LOADING 1 _ACEOF LIBOBJS="dldb.o $LIBOBJS" dl_src=../common/dldb.c LIBS="-ldl $LIBS" else LIBS="-ldb $LIBS" if test "X$with_db_prefix" != "X"; then LDFLAGS="`echo $with_db_prefix/lib | sed "$LRscript"` $LDFLAGS" fi fi # Check whether --with-db_build was given. if test "${with_db_build+set}" = set; then withval=$with_db_build; fi if test "x$with_db_build" != "x"; then vi_cv_dbsrc=`$AWK '/^srcdir/ {gsub("srcdir[ \t]*=","");print $1}' \ $with_db_build/Makefile` case $with_db_build in *[\\/]);; *) with_db_build="$with_db_build/";; esac case $vi_cv_dbsrc in [\\/]*);; *) vi_cv_dbsrc="$with_db_build$vi_cv_dbsrc";; esac fi; vi_cv_db4="no" # Check whether --enable-log4 was given. if test "${enable_log4+set}" = set; then enableval=$enable_log4; { echo "$as_me:$LINENO: checking for DB 4" >&5 echo $ECHO_N "checking for DB 4... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include DB_VERSION_MAJOR _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "^4" >/dev/null 2>&1; then vi_cv_db4="yes" else vi_cv_db4="no" fi rm -f conftest* { echo "$as_me:$LINENO: result: $vi_cv_db4" >&5 echo "${ECHO_T}$vi_cv_db4" >&6; } fi if test "$vi_cv_db4" = "yes"; then CPPFLAGS="-I$vi_cv_dbsrc/include $CPPFLAGS" CPPFLAGS="-I$vi_cv_dbsrc/include_auto $CPPFLAGS" CPPFLAGS="-I$with_db_build $CPPFLAGS" cat >>confdefs.h <<\_ACEOF @%:@define USE_DB4_LOGGING 1 _ACEOF LIBOBJS="log4.o vi_auto.o vi_rec.o $LIBOBJS" else LIBOBJS="log.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking if --disable-re option specified" >&5 echo $ECHO_N "checking if --disable-re option specified... $ECHO_C" >&6; } # Check whether --enable-re was given. if test "${enable_re+set}" = set; then enableval=$enable_re; if test "$enable_re" = "yes"; then vi_cv_re_lib="bundled RE" else vi_cv_re_lib="other RE" fi else vi_cv_re_lib="bundled RE" fi { echo "$as_me:$LINENO: result: $vi_cv_re_lib" >&5 echo "${ECHO_T}$vi_cv_re_lib" >&6; } case "$vi_cv_re_lib" in "bundled RE") CPPFLAGS="-I\$(visrcdir)/regex $CPPFLAGS" LIBOBJS="regcomp.o regerror.o regexec.o regfree.o $LIBOBJS";; "other RE") ;; esac ac_config_files="$ac_config_files Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "port.h") CONFIG_FILES="$CONFIG_FILES port.h:port.h.in" ;; "pathnames.h") CONFIG_FILES="$CONFIG_FILES pathnames.h:pathnames.h.in" ;; "recover") CONFIG_FILES="$CONFIG_FILES recover:recover.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim OPTFLAG!$OPTFLAG$ac_delim no_op_OPTFLAG!$no_op_OPTFLAG$ac_delim vi_cv_path_shell!$vi_cv_path_shell$ac_delim vi_cv_path_sendmail!$vi_cv_path_sendmail$ac_delim vi_cv_path_perl!$vi_cv_path_perl$ac_delim vi_cv_path_preserve!$vi_cv_path_preserve$ac_delim vi_cv_path_fuser!$vi_cv_path_fuser$ac_delim vi_cv_path_lsof!$vi_cv_path_lsof$ac_delim INUSE!$INUSE$ac_delim vi_cv_path_ar!$vi_cv_path_ar$ac_delim vi_cv_path_chmod!$vi_cv_path_chmod$ac_delim vi_cv_path_cp!$vi_cv_path_cp$ac_delim vi_cv_path_ln!$vi_cv_path_ln$ac_delim vi_cv_path_mkdir!$vi_cv_path_mkdir$ac_delim vi_cv_path_rm!$vi_cv_path_rm$ac_delim vi_cv_path_ranlib!$vi_cv_path_ranlib$ac_delim vi_cv_path_strip!$vi_cv_path_strip$ac_delim XMKMF!$XMKMF$ac_delim XINCS!$XINCS$ac_delim LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim vi_programs!$vi_programs$ac_delim vi_ipc!$vi_ipc$ac_delim GTKLIBS!$GTKLIBS$ac_delim GTKINCS!$GTKINCS$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CONFIG!$GTK_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim MOTIFLIBS!$MOTIFLIBS$ac_delim IPCOBJS!$IPCOBJS$ac_delim shrpenv!$shrpenv$ac_delim perlldflags!$perlldflags$ac_delim perllibs!$perllibs$ac_delim vi_cv_perllib!$vi_cv_perllib$ac_delim CURSLIBS!$CURSLIBS$ac_delim CURSCPPFLAGS!$CURSCPPFLAGS$ac_delim CURSLDFLAGS!$CURSLDFLAGS$ac_delim HAVE_NCURSESW!$HAVE_NCURSESW$ac_delim u_char_decl!$u_char_decl$ac_delim u_short_decl!$u_short_decl$ac_delim u_int_decl!$u_int_decl$ac_delim u_long_decl!$u_long_decl$ac_delim u_int8_decl!$u_int8_decl$ac_delim u_int16_decl!$u_int16_decl$ac_delim int16_decl!$int16_decl$ac_delim u_int32_decl!$u_int32_decl$ac_delim int32_decl!$int32_decl$ac_delim NEED_FPRINTF_PROTO!$NEED_FPRINTF_PROTO$ac_delim dl_src!$dl_src$ac_delim vi_cv_path_db3!$vi_cv_path_db3$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi nvi-1.81.6/dist/autom4te.cache/traces.00100644000076400001440000162646110720065676016613 0ustar skimousersm4trace:/usr/share/aclocal/libtool.m4:55: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote AM_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or AM_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])]) m4trace:/usr/share/aclocal/libtool.m4:75: -1- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ]) m4trace:/usr/share/aclocal/libtool.m4:220: -1- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ]) m4trace:/usr/share/aclocal/libtool.m4:236: -1- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ]) m4trace:/usr/share/aclocal/libtool.m4:252: -1- AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) m4trace:/usr/share/aclocal/libtool.m4:266: -1- AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ]) m4trace:/usr/share/aclocal/libtool.m4:280: -1- AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ]) m4trace:/usr/share/aclocal/libtool.m4:307: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ]) m4trace:/usr/share/aclocal/libtool.m4:318: -1- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ]) m4trace:/usr/share/aclocal/libtool.m4:474: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])]) m4trace:/usr/share/aclocal/libtool.m4:625: -1- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ]) m4trace:/usr/share/aclocal/libtool.m4:670: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:708: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:826: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ]) m4trace:/usr/share/aclocal/libtool.m4:833: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ]) m4trace:/usr/share/aclocal/libtool.m4:924: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ]) m4trace:/usr/share/aclocal/libtool.m4:1037: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ]) m4trace:/usr/share/aclocal/libtool.m4:1089: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ]) m4trace:/usr/share/aclocal/libtool.m4:1116: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ]) m4trace:/usr/share/aclocal/libtool.m4:1133: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ]) m4trace:/usr/share/aclocal/libtool.m4:1174: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ]) m4trace:/usr/share/aclocal/libtool.m4:1204: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ]) m4trace:/usr/share/aclocal/libtool.m4:1820: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ]) m4trace:/usr/share/aclocal/libtool.m4:1925: -1- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:1933: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ]) m4trace:/usr/share/aclocal/libtool.m4:1941: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ]) m4trace:/usr/share/aclocal/libtool.m4:1971: -1- AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:1980: -1- AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ]) m4trace:/usr/share/aclocal/libtool.m4:2010: -1- AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:2019: -1- AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ]) m4trace:/usr/share/aclocal/libtool.m4:2049: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ]) m4trace:/usr/share/aclocal/libtool.m4:2058: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ]) m4trace:/usr/share/aclocal/libtool.m4:2068: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ]) m4trace:/usr/share/aclocal/libtool.m4:2146: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ]) m4trace:/usr/share/aclocal/libtool.m4:2161: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:2246: -1- AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ]) m4trace:/usr/share/aclocal/libtool.m4:2535: -1- AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ]) m4trace:/usr/share/aclocal/libtool.m4:2556: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:2581: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:/usr/share/aclocal/libtool.m4:2617: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ]) m4trace:/usr/share/aclocal/libtool.m4:2625: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ]) m4trace:/usr/share/aclocal/libtool.m4:2634: -1- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ]) m4trace:/usr/share/aclocal/libtool.m4:2646: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ]) m4trace:/usr/share/aclocal/libtool.m4:2653: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ]) m4trace:/usr/share/aclocal/libtool.m4:2661: -1- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ]) m4trace:/usr/share/aclocal/libtool.m4:2669: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ]) m4trace:/usr/share/aclocal/libtool.m4:2682: -1- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ]) m4trace:/usr/share/aclocal/libtool.m4:2691: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ]) m4trace:/usr/share/aclocal/libtool.m4:2699: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) m4trace:/usr/share/aclocal/libtool.m4:2772: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ]) m4trace:/usr/share/aclocal/libtool.m4:2780: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) m4trace:/usr/share/aclocal/libtool.m4:3806: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ]) m4trace:/usr/share/aclocal/libtool.m4:3999: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:4006: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) m4trace:/usr/share/aclocal/libtool.m4:4107: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ]) m4trace:/usr/share/aclocal/libtool.m4:4115: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) m4trace:/usr/share/aclocal/libtool.m4:4167: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ]) m4trace:/usr/share/aclocal/libtool.m4:4175: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) m4trace:/usr/share/aclocal/libtool.m4:4211: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ]) m4trace:/usr/share/aclocal/libtool.m4:4706: -1- AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ]) m4trace:/usr/share/aclocal/libtool.m4:4724: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ]) m4trace:/usr/share/aclocal/libtool.m4:4927: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) m4trace:/usr/share/aclocal/libtool.m4:5485: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) m4trace:/usr/share/aclocal/libtool.m4:6428: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ]) m4trace:/usr/share/aclocal/libtool.m4:6468: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ]) m4trace:/usr/share/aclocal/libtool.m4:6473: -1- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) m4trace:/usr/share/aclocal/libtool.m4:6477: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) m4trace:/usr/share/aclocal/libtool.m4:6478: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) m4trace:/usr/share/aclocal/libtool.m4:6479: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) m4trace:/usr/share/aclocal/libtool.m4:6480: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) m4trace:/usr/share/aclocal/libtool.m4:6481: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) m4trace:/usr/share/aclocal/libtool.m4:6482: -1- AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) m4trace:/usr/share/aclocal/libtool.m4:6483: -1- AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) m4trace:/usr/share/aclocal/libtool.m4:6492: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) m4trace:/usr/share/aclocal/libtool.m4:6496: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) m4trace:/usr/share/aclocal/libtool.m4:6585: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) m4trace:/usr/share/aclocal-1.10/amversion.m4:20: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/share/aclocal-1.10/amversion.m4:35: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) m4trace:/usr/share/aclocal-1.10/auxdir.m4:52: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) m4trace:/usr/share/aclocal-1.10/cond.m4:34: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) m4trace:/usr/share/aclocal-1.10/depend.m4:132: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) m4trace:/usr/share/aclocal-1.10/depend.m4:142: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/share/aclocal-1.10/depend.m4:158: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) m4trace:/usr/share/aclocal-1.10/depout.m4:54: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ]) m4trace:/usr/share/aclocal-1.10/depout.m4:68: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) m4trace:/usr/share/aclocal-1.10/header.m4:12: -1- AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) m4trace:/usr/share/aclocal-1.10/header.m4:12: -1- AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.])dnl AC_CONFIG_HEADERS($@)]) m4trace:/usr/share/aclocal-1.10/init.m4:103: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) m4trace:/usr/share/aclocal-1.10/init.m4:124: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/share/aclocal-1.10/install-sh.m4:14: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) m4trace:/usr/share/aclocal-1.10/lead-dot.m4:21: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) m4trace:/usr/share/aclocal-1.10/make.m4:51: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/share/aclocal-1.10/missing.m4:17: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/share/aclocal-1.10/missing.m4:35: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) m4trace:/usr/share/aclocal-1.10/mkdirp.m4:26: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) m4trace:/usr/share/aclocal-1.10/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/share/aclocal-1.10/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) m4trace:/usr/share/aclocal-1.10/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/share/aclocal-1.10/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/share/aclocal-1.10/runlog.m4:17: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/share/aclocal-1.10/sanity.m4:51: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) m4trace:/usr/share/aclocal-1.10/strip.m4:28: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/share/aclocal-1.10/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/share/aclocal-1.10/tar.m4:95: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) m4trace:m4/gtk.m4:194: -1- AC_DEFUN([AM_PATH_GTK], [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.in:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.in:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.in:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.in:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.in:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.in:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.in:6: -1- AM_INIT_AUTOMAKE([vi], [1.81.6]) m4trace:configure.in:6: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.in:6: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.in:6: -1- AM_AUTOMAKE_VERSION([1.10]) m4trace:configure.in:6: -1- _AM_AUTOCONF_VERSION([2.61]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.in:6: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.in:6: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.in:6: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.in:6: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) m4trace:configure.in:6: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.in:6: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.in:6: -1- AM_SANITY_CHECK m4trace:configure.in:6: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.in:6: -1- AM_MISSING_HAS_RUN m4trace:configure.in:6: -1- AM_AUX_DIR_EXPAND m4trace:configure.in:6: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.in:6: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.in:6: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.in:6: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.in:6: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.in:6: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.in:6: -1- AM_PROG_INSTALL_SH m4trace:configure.in:6: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.in:6: -1- AM_PROG_INSTALL_STRIP m4trace:configure.in:6: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.in:6: -1- AM_PROG_MKDIR_P m4trace:configure.in:6: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.in:6: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:6: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.in:6: -1- AM_SET_LEADING_DOT m4trace:configure.in:6: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.in:6: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.in:6: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.in:6: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.in:6: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.in:6: -1- _AM_PROG_TAR([v7]) m4trace:configure.in:6: -1- AM_MISSING_PROG([AMTAR], [tar]) m4trace:configure.in:6: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.in:6: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) m4trace:configure.in:6: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.in:7: -1- AM_CONFIG_HEADER([config.h]) m4trace:configure.in:7: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.], [/usr/share/aclocal-1.10/header.m4:12: AM_CONFIG_HEADER is expanded from... configure.in:7: the top level]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:11: -1- m4_pattern_allow([^build$]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_os$]) m4trace:configure.in:11: -1- m4_pattern_allow([^host$]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_os$]) m4trace:configure.in:15: -1- AC_PROG_LIBTOOL m4trace:configure.in:15: -1- _AC_PROG_LIBTOOL m4trace:configure.in:15: -1- AC_LIBTOOL_SETUP m4trace:configure.in:15: -1- AC_ENABLE_SHARED m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:1971: AC_ENABLE_SHARED is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_ENABLE_STATIC m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:2010: AC_ENABLE_STATIC is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_ENABLE_FAST_INSTALL m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:2049: AC_ENABLE_FAST_INSTALL is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:15: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.in:15: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.in:15: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.in:15: -1- AM_SET_DEPDIR m4trace:configure.in:15: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.in:15: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.in:15: -1- AM_MAKE_INCLUDE m4trace:configure.in:15: -1- m4_pattern_allow([^am__include$]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.in:15: -1- AM_DEP_TRACK m4trace:configure.in:15: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.in:15: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:15: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:15: -1- AC_PROG_LD m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:2246: AC_PROG_LD is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- LT_AC_PROG_SED m4trace:configure.in:15: -1- m4_pattern_allow([^SED$]) m4trace:configure.in:15: -1- AC_PROG_LD_GNU m4trace:configure.in:15: -1- AC_PROG_EGREP m4trace:configure.in:15: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:15: -1- AC_PROG_LD_RELOAD_FLAG m4trace:configure.in:15: -1- AC_PROG_NM m4trace:configure.in:15: -1- m4_pattern_allow([^LN_S$]) m4trace:configure.in:15: -1- AC_DEPLIBS_CHECK_METHOD m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_MAX_CMD_LEN m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- AC_LIBTOOL_OBJDIR m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_AC_PROG_ECHO_BACKSLASH m4trace:configure.in:15: -1- _LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ]) m4trace:configure.in:15: -1- m4_pattern_allow([^ECHO$]) m4trace:configure.in:15: -1- m4_pattern_allow([^AR$]) m4trace:configure.in:15: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.in:15: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- AC_PATH_MAGIC m4trace:configure.in:15: -1- AC_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.in:15: -1- AC_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_LIBTOOL_LANG_C_CONFIG m4trace:configure.in:15: -1- _LT_AC_LANG_C_CONFIG m4trace:configure.in:15: -1- _LT_AC_TAGVAR([objext], []) m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.in:15: -1- _LT_LINKER_BOILERPLATE m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_PIC([]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], []) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) works], [lt_prog_compiler_pic_works], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, )ifelse([],[],[ -DPIC],[ifelse([],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, )=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, )" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, )= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], []) m4trace:configure.in:15: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, )=]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_CC_C_O([]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([]) m4trace:configure.in:15: -1- _LT_AC_LOCK m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... /usr/share/aclocal/libtool.m4:625: _LT_AC_LOCK is expanded from... /usr/share/aclocal/libtool.m4:1116: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... /usr/share/aclocal/libtool.m4:2772: _LT_AC_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:2699: AC_LIBTOOL_LANG_C_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_SHLIBS([]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([reload_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([runpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_LIB_STRIP m4trace:configure.in:15: -1- AC_LIBTOOL_DLOPEN_SELF m4trace:configure.in:15: -1- _LT_AC_CHECK_DLFCN m4trace:configure.in:15: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.in:15: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=yes], [lt_cv_dlopen_self=no], [lt_cv_dlopen_self=cross]) m4trace:configure.in:15: -1- _LT_AC_TRY_DLOPEN_SELF([lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=yes], [lt_cv_dlopen_self_static=no], [lt_cv_dlopen_self_static=cross]) m4trace:configure.in:15: -1- AC_LIBTOOL_CONFIG([]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([CC], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postinstall_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postuninstall_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], []) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], []) m4trace:configure.in:15: -1- _LT_AC_TAGCONFIG m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... /usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [/usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_LIBTOOL_LANG_CXX_CONFIG m4trace:configure.in:15: -1- _LT_AC_LANG_CXX_CONFIG([CXX]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXX$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXX$]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.in:15: -1- _AM_DEPENDENCIES([CXX]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.in:15: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.in:15: -1- _LT_AC_PROG_CXXCPP m4trace:configure.in:15: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([objext], [CXX]) m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.in:15: -1- _LT_LINKER_BOILERPLATE m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:15: -1- AC_PROG_LD m4trace:configure.in:15: -1- AC_PROG_LD_GNU m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_POSTDEP_PREDEP([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_PIC([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) works], [lt_prog_compiler_pic_works_CXX], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)ifelse([CXX],[],[ -DPIC],[ifelse([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, CXX)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, CXX)=]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_CC_C_O([CXX]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_SHLIBS([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([runpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_CONFIG([CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([CC], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postinstall_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postuninstall_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [CXX]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_LANG_F77_CONFIG m4trace:configure.in:15: -1- _LT_AC_LANG_F77_CONFIG([F77]) m4trace:configure.in:15: -1- m4_pattern_allow([^F77$]) m4trace:configure.in:15: -1- m4_pattern_allow([^FFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- m4_pattern_allow([^F77$]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_F77$]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([objext], [F77]) m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.in:15: -1- _LT_LINKER_BOILERPLATE m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_PIC([F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) works], [lt_prog_compiler_pic_works_F77], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)ifelse([F77],[],[ -DPIC],[ifelse([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, F77)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, F77)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, F77)=no]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_F77], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, F77)=]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_CC_C_O([F77]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_SHLIBS([F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([reload_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([runpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_CONFIG([F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([CC], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postinstall_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postuninstall_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [F77]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [F77]) m4trace:configure.in:15: -1- AC_LIBTOOL_LANG_GCJ_CONFIG m4trace:configure.in:15: -1- _LT_AC_LANG_GCJ_CONFIG([GCJ]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:170: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:4167: _LT_AC_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:4115: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([objext], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.in:15: -1- _LT_LINKER_BOILERPLATE m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_NO_RTTI([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, GCJ) -fno-rtti -fno-exceptions"]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_COMPILER_PIC([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_pic_works], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) works], [lt_prog_compiler_pic_works_GCJ], [$_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)ifelse([GCJ],[],[ -DPIC],[ifelse([GCJ],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, GCJ)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, GCJ)=no]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_can_build_shared], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([lt_prog_compiler_static_works], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_prog_compiler_static_works_GCJ], [$lt_tmp_static_flag], [], [_LT_AC_TAGVAR(lt_prog_compiler_static, GCJ)=]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_CC_C_O([GCJ]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -3- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_HARD_LINK_LOCKS([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_SHLIBS([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_SYS_LIBPATH_AIX m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_From_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([reload_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([ld_shlibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -2- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_SYS_DYNAMIC_LINKER([GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([runpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- AC_LIBTOOL_CONFIG([GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([CC], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postinstall_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postuninstall_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [GCJ]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [GCJ]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... /usr/share/aclocal/libtool.m4:4167: _LT_AC_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:4115: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_LIBTOOL_LANG_RC_CONFIG m4trace:configure.in:15: -1- _LT_AC_LANG_RC_CONFIG([RC]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:170: AC_LANG_SAVE is expanded from... /usr/share/aclocal/libtool.m4:4211: _LT_AC_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:4175: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([objext], [RC]) m4trace:configure.in:15: -1- _LT_AC_SYS_COMPILER m4trace:configure.in:15: -1- _LT_COMPILER_BOILERPLATE m4trace:configure.in:15: -1- _LT_LINKER_BOILERPLATE m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:15: -1- _LT_CC_BASENAME([$compiler]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:15: -1- AC_LIBTOOL_CONFIG([RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([CC], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postinstall_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postuninstall_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([fix_srcfile_path], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds_need_lc], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([enable_shared_with_static_runtimes], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([GCC], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([LD], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_wl], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_pic], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_cv_prog_compiler_c_o], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_static], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([lt_prog_compiler_no_builtin_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_dynamic_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([whole_archive_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([thread_safe_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_new_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([old_archive_from_expsyms_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([archive_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([module_expsym_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predep_objects], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdep_objects], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([predeps], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([postdeps], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([compiler_lib_search_path], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([allow_undefined_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([no_undefined_flag], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_action], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_flag_spec_ld], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_libdir_separator], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_direct], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_minus_L], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_shlibpath_var], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([hardcode_automatic], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([link_all_deplibs], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([always_export_symbols], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([export_symbols_cmds], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([exclude_expsyms], [RC]) m4trace:configure.in:15: -1- _LT_AC_TAGVAR([include_expsyms], [RC]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... /usr/share/aclocal/libtool.m4:4211: _LT_AC_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:4175: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... /usr/share/aclocal/libtool.m4:1925: _LT_AC_TAGCONFIG is expanded from... /usr/share/aclocal/libtool.m4:220: AC_LIBTOOL_SETUP is expanded from... /usr/share/aclocal/libtool.m4:75: _AC_PROG_LIBTOOL is expanded from... /usr/share/aclocal/libtool.m4:55: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBTOOL$]) m4trace:configure.in:15: -1- AC_LIBTOOL_CXX m4trace:configure.in:15: -1- _LT_AC_LANG_CXX m4trace:configure.in:15: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) m4trace:configure.in:15: -1- AC_LIBTOOL_F77 m4trace:configure.in:15: -1- _LT_AC_LANG_F77 m4trace:configure.in:15: -1- _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) m4trace:configure.in:25: -1- m4_pattern_allow([^DEBUG$]) m4trace:configure.in:38: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:51: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:51: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:51: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:51: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:51: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:51: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:51: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:51: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:72: -1- m4_pattern_allow([^OPTFLAG$]) m4trace:configure.in:77: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:80: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:80: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:80: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:80: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:80: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:80: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:80: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:80: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:83: -1- m4_pattern_allow([^HAVE_GCC$]) m4trace:configure.in:88: -1- m4_pattern_allow([^no_op_OPTFLAG$]) m4trace:configure.in:113: -1- m4_pattern_allow([^HAVE_BROKEN_VDISABLE$]) m4trace:configure.in:151: -1- m4_pattern_allow([^vi_cv_path_shell$]) m4trace:configure.in:157: -1- m4_pattern_allow([^vi_cv_path_sendmail$]) m4trace:configure.in:164: -1- m4_pattern_allow([^vi_cv_path_perl$]) m4trace:configure.in:165: -1- m4_pattern_allow([^vi_cv_path_perl$]) m4trace:configure.in:173: -1- m4_pattern_allow([^vi_cv_path_preserve$]) m4trace:configure.in:197: -1- m4_pattern_allow([^vi_cv_path_fuser$]) m4trace:configure.in:198: -1- m4_pattern_allow([^vi_cv_path_lsof$]) m4trace:configure.in:199: -1- m4_pattern_allow([^INUSE$]) m4trace:configure.in:209: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:210: -1- m4_pattern_allow([^vi_cv_path_ar$]) m4trace:configure.in:211: -1- m4_pattern_allow([^vi_cv_path_chmod$]) m4trace:configure.in:212: -1- m4_pattern_allow([^vi_cv_path_cp$]) m4trace:configure.in:213: -1- m4_pattern_allow([^vi_cv_path_ln$]) m4trace:configure.in:214: -1- m4_pattern_allow([^vi_cv_path_mkdir$]) m4trace:configure.in:215: -1- m4_pattern_allow([^vi_cv_path_rm$]) m4trace:configure.in:216: -1- m4_pattern_allow([^vi_cv_path_ranlib$]) m4trace:configure.in:217: -1- m4_pattern_allow([^vi_cv_path_strip$]) m4trace:configure.in:221: -1- m4_pattern_allow([^XMKMF$]) m4trace:configure.in:222: -1- m4_pattern_allow([^XINCS$]) m4trace:configure.in:236: -1- AC_DEFUN([VI_CV_REPLACE_FUNCS], [AC_FOREACH([AC_Func], [$1], [])dnl AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)]) ]) m4trace:configure.in:244: -1- m4_pattern_allow([^USE_WIDECHAR$]) m4trace:configure.in:254: -1- m4_pattern_allow([^USE_ICONV$]) m4trace:configure.in:254: -1- VI_CV_REPLACE_FUNCS([iswblank]) m4trace:configure.in:254: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from... configure.in:254: the top level]) m4trace:configure.in:254: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:257: -1- m4_pattern_allow([^vi_programs$]) m4trace:configure.in:258: -1- m4_pattern_allow([^vi_ipc$]) m4trace:configure.in:259: -1- m4_pattern_allow([^GTKLIBS$]) m4trace:configure.in:260: -1- m4_pattern_allow([^GTKINCS$]) m4trace:configure.in:270: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.in:299: -1- m4_pattern_allow([^HAVE_PANGO$]) m4trace:configure.in:307: -1- AM_PATH_GTK([1.2.0]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_CONFIG$]) m4trace:configure.in:307: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... m4/gtk.m4:194: AM_PATH_GTK is expanded from... configure.in:307: the top level]) m4trace:configure.in:307: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... m4/gtk.m4:194: AM_PATH_GTK is expanded from... configure.in:307: the top level]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_CFLAGS$]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_LIBS$]) m4trace:configure.in:319: -1- m4_pattern_allow([^HAVE_ZVT$]) m4trace:configure.in:330: -1- m4_pattern_allow([^MOTIFLIBS$]) m4trace:configure.in:379: -1- m4_pattern_allow([^IPCOBJS$]) m4trace:configure.in:392: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:392: the top level]) m4trace:configure.in:397: -1- m4_pattern_allow([^HAVE_PTHREAD$]) m4trace:configure.in:403: -1- m4_pattern_allow([^shrpenv$]) m4trace:configure.in:404: -1- m4_pattern_allow([^perlldflags$]) m4trace:configure.in:405: -1- m4_pattern_allow([^perllibs$]) m4trace:configure.in:406: -1- m4_pattern_allow([^vi_cv_perllib$]) m4trace:configure.in:438: -1- m4_pattern_allow([^HAVE_PERL_INTERP$]) m4trace:configure.in:452: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:452: the top level]) m4trace:configure.in:452: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:452: the top level]) m4trace:configure.in:454: -1- m4_pattern_allow([^USE_PERL_SETENV$]) m4trace:configure.in:476: -1- m4_pattern_allow([^HAVE_TCL_INTERP$]) m4trace:configure.in:480: -1- m4_pattern_allow([^CURSLIBS$]) m4trace:configure.in:481: -1- m4_pattern_allow([^CURSCPPFLAGS$]) m4trace:configure.in:482: -1- m4_pattern_allow([^CURSLDFLAGS$]) m4trace:configure.in:483: -1- m4_pattern_allow([^HAVE_NCURSESW$]) m4trace:configure.in:569: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [autoconf/general.m4:2297: AC_TRY_CPP is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:569: the top level]) m4trace:configure.in:571: -1- m4_pattern_allow([^HAVE_SYS_MMAN_H$]) m4trace:configure.in:578: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [autoconf/general.m4:2297: AC_TRY_CPP is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:578: the top level]) m4trace:configure.in:580: -1- m4_pattern_allow([^HAVE_SYS_SELECT_H$]) m4trace:configure.in:585: -1- m4_pattern_allow([^ssize_t$]) m4trace:configure.in:586: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) m4trace:configure.in:587: -1- m4_pattern_allow([^const$]) m4trace:configure.in:588: -1- _m4_warn([obsolete], [The macro `AC_STRUCT_ST_BLKSIZE' is obsolete. You should run autoupdate.], [autoconf/types.m4:894: AC_STRUCT_ST_BLKSIZE is expanded from... configure.in:588: the top level]) m4trace:configure.in:588: -1- m4_pattern_allow([^HAVE_STRUCT_STAT_ST_BLKSIZE$]) m4trace:configure.in:588: -1- m4_pattern_allow([^HAVE_ST_BLKSIZE$]) m4trace:configure.in:589: -1- m4_pattern_allow([^mode_t$]) m4trace:configure.in:590: -1- m4_pattern_allow([^off_t$]) m4trace:configure.in:591: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.in:592: -1- m4_pattern_allow([^size_t$]) m4trace:configure.in:593: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.in:596: -1- VI_CV_REPLACE_FUNCS([bsearch gethostname memchr memset]) m4trace:configure.in:596: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:596: the top level]) m4trace:configure.in:596: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:597: -1- VI_CV_REPLACE_FUNCS([mkstemp mmap strdup strpbrk]) m4trace:configure.in:597: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:597: the top level]) m4trace:configure.in:597: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:598: -1- VI_CV_REPLACE_FUNCS([snprintf vsnprintf]) m4trace:configure.in:598: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:598: the top level]) m4trace:configure.in:598: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:605: -1- m4_pattern_allow([^HAVE_MMAP$]) m4trace:configure.in:606: -1- _m4_warn([obsolete], [The macro `AC_FUNC_VFORK' is obsolete. You should run autoupdate.], [autoconf/functions.m4:1956: AC_FUNC_VFORK is expanded from... configure.in:606: the top level]) m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.in:606: -1- m4_pattern_allow([^vfork$]) m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.in:637: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:637: the top level]) m4trace:configure.in:637: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:637: the top level]) m4trace:configure.in:640: -1- m4_pattern_allow([^HAVE_LOCK_FLOCK$]) m4trace:configure.in:643: -1- m4_pattern_allow([^HAVE_LOCK_FCNTL$]) m4trace:configure.in:653: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:653: the top level]) m4trace:configure.in:653: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:653: the top level]) m4trace:configure.in:655: -1- m4_pattern_allow([^HAVE_FTRUNCATE_FTRUNCATE$]) m4trace:configure.in:658: -1- m4_pattern_allow([^HAVE_FTRUNCATE_CHSIZE$]) m4trace:configure.in:676: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:676: the top level]) m4trace:configure.in:678: -1- m4_pattern_allow([^HAVE_CURSES_TIGETSTR$]) m4trace:configure.in:687: -1- m4_pattern_allow([^HAVE_BSD_CURSES$]) m4trace:configure.in:688: -1- m4_pattern_allow([^HAVE_CURSES_WADDNSTR$]) m4trace:configure.in:689: -1- m4_pattern_allow([^HAVE_CURSES_IDLOK$]) m4trace:configure.in:696: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:696: the top level]) m4trace:configure.in:698: -1- m4_pattern_allow([^HAVE_CURSES_WADDNSTR$]) m4trace:configure.in:707: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:707: the top level]) m4trace:configure.in:709: -1- m4_pattern_allow([^HAVE_CURSES_BEEP$]) m4trace:configure.in:718: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:718: the top level]) m4trace:configure.in:720: -1- m4_pattern_allow([^HAVE_CURSES_FLASH$]) m4trace:configure.in:729: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:729: the top level]) m4trace:configure.in:731: -1- m4_pattern_allow([^HAVE_CURSES_IDLOK$]) m4trace:configure.in:740: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:740: the top level]) m4trace:configure.in:742: -1- m4_pattern_allow([^HAVE_CURSES_KEYPAD$]) m4trace:configure.in:751: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:751: the top level]) m4trace:configure.in:753: -1- m4_pattern_allow([^HAVE_CURSES_NEWTERM$]) m4trace:configure.in:758: -1- m4_pattern_allow([^HAVE_BSD_CURSES$]) m4trace:configure.in:769: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:769: the top level]) m4trace:configure.in:771: -1- m4_pattern_allow([^HAVE_CURSES_SETUPTERM$]) m4trace:configure.in:784: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:784: the top level]) m4trace:configure.in:786: -1- m4_pattern_allow([^HAVE_BROKEN_GETTIMEOFDAY$]) m4trace:configure.in:794: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:794: the top level]) m4trace:configure.in:796: -1- m4_pattern_allow([^HAVE_SYS5_PTY$]) m4trace:configure.in:804: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:804: the top level]) m4trace:configure.in:806: -1- m4_pattern_allow([^HAVE_REVOKE$]) m4trace:configure.in:816: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:816: the top level]) m4trace:configure.in:816: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:816: the top level]) m4trace:configure.in:818: -1- m4_pattern_allow([^SPRINTF_RET_CHARPNT$]) m4trace:configure.in:824: -1- m4_pattern_allow([^u_char_decl$]) m4trace:configure.in:827: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:827: the top level]) m4trace:configure.in:832: -1- m4_pattern_allow([^u_short_decl$]) m4trace:configure.in:835: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:835: the top level]) m4trace:configure.in:840: -1- m4_pattern_allow([^u_int_decl$]) m4trace:configure.in:843: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:843: the top level]) m4trace:configure.in:848: -1- m4_pattern_allow([^u_long_decl$]) m4trace:configure.in:851: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:851: the top level]) m4trace:configure.in:857: -1- m4_pattern_allow([^u_int8_decl$]) m4trace:configure.in:862: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:862: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:862: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:870: -1- m4_pattern_allow([^u_int16_decl$]) m4trace:configure.in:877: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:885: -1- m4_pattern_allow([^int16_decl$]) m4trace:configure.in:892: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:900: -1- m4_pattern_allow([^u_int32_decl$]) m4trace:configure.in:907: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:915: -1- m4_pattern_allow([^int32_decl$]) m4trace:configure.in:922: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:933: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:933: the top level]) m4trace:configure.in:935: -1- m4_pattern_allow([^NEED_FPRINTF_PROTO$]) m4trace:configure.in:941: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:941: the top level]) m4trace:configure.in:943: -1- m4_pattern_allow([^NEED_FPRINTF_PROTO$]) m4trace:configure.in:951: -1- m4_pattern_allow([^USE_DB1$]) m4trace:configure.in:975: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... configure.in:975: the top level]) m4trace:configure.in:984: -1- m4_pattern_allow([^dl_src$]) m4trace:configure.in:999: -1- m4_pattern_allow([^vi_cv_path_db3$]) m4trace:configure.in:1005: -1- m4_pattern_allow([^USE_DYNAMIC_LOADING$]) m4trace:configure.in:1048: -1- m4_pattern_allow([^USE_DB4_LOGGING$]) m4trace:configure.in:1073: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) m4trace:configure.in:1073: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1073: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.in:1073: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file]) m4trace:configure.in:1073: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS nvi-1.81.6/dist/autom4te.cache/output.10100644000076400001440000347553310720065704016667 0ustar skimousers@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.61. @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @%:@ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../common/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED GREP EGREP LN_S ECHO AR RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL OPTFLAG no_op_OPTFLAG vi_cv_path_shell vi_cv_path_sendmail vi_cv_path_perl vi_cv_path_preserve vi_cv_path_fuser vi_cv_path_lsof INUSE vi_cv_path_ar vi_cv_path_chmod vi_cv_path_cp vi_cv_path_ln vi_cv_path_mkdir vi_cv_path_rm vi_cv_path_ranlib vi_cv_path_strip XMKMF XINCS LIB@&t@OBJS vi_programs vi_ipc GTKLIBS GTKINCS PKG_CONFIG GTK_CONFIG GTK_CFLAGS GTK_LIBS MOTIFLIBS IPCOBJS shrpenv perlldflags perllibs vi_cv_perllib CURSLIBS CURSCPPFLAGS CURSLDFLAGS HAVE_NCURSESW u_char_decl u_short_decl u_int_decl u_long_decl u_int8_decl u_int16_decl int16_decl u_int32_decl int32_decl NEED_FPRINTF_PROTO dl_src vi_cv_path_db3 LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=yes@:>@ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@ --enable-fast-install@<:@=PKGS@:>@ optimize for fast installation @<:@default=yes@:>@ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Build a debugging version. --disable-runpath Don't record path of libraries in binary. --enable-trace Build a tracing version. --enable-widechar Build a wide char aware vi. --enable-gtk Build a Gtk front-end for vi. --disable-gtktest Do not try to compile and run a test GTK program --enable-motif Build a Motif front-end for vi. --enable-threads Turn on thread support. --enable-perlinterp Include a Perl interpreter in vi. --enable-tclinterp Include a Tk/Tcl interpreter in vi. --enable-dynamic-loading Load DB 3 dynamically. --enable-db4-logging Enable experimental/broken db4 logging. --disable-re DON'T use the nvi-provided RE routines. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-tags@<:@=TAGS@:>@ include additional configurations @<:@automatic@:>@ --with-x use the X Window System --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-curses=DIR Path to curses installation. --with-db=bundled|system Which db to use. --with-db-prefix=PFX Path to db installation. --with-db-build=prefix Path to db build. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME @%:@@%:@ --------- @%:@@%:@ @%:@@%:@ Platform. @%:@@%:@ @%:@@%:@ --------- @%:@@%:@ hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ Core tests. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX @%:@@%:@ ---------------- @%:@@%:@ @%:@@%:@ Cache variables. @%:@@%:@ @%:@@%:@ ---------------- @%:@@%:@ _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX @%:@@%:@ ----------------- @%:@@%:@ @%:@@%:@ Output variables. @%:@@%:@ @%:@@%:@ ----------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX @%:@@%:@ ------------------- @%:@@%:@ @%:@@%:@ File substitutions. @%:@@%:@ @%:@@%:@ ------------------- @%:@@%:@ _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX @%:@@%:@ ----------- @%:@@%:@ @%:@@%:@ confdefs.h. @%:@@%:@ @%:@@%:@ ----------- @%:@@%:@ _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=vi VERSION=1.81.6 cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line __oline__ "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @%:@define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:__oline__: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion { echo "$as_me:$LINENO: checking if --enable-debug option specified" >&5 echo $ECHO_N "checking if --enable-debug option specified... $ECHO_C" >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; vi_cv_debug=$enableval else vi_cv_debug="no" fi { echo "$as_me:$LINENO: result: $vi_cv_debug" >&5 echo "${ECHO_T}$vi_cv_debug" >&6; } if test "$vi_cv_debug" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define DEBUG 1 _ACEOF OPTFLAG=${OPTFLAG-"-g"} no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} fi case "$host_os" in aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} OPTFLAG=${OPTFLAG-"-O3"};; aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} LDFLAGS=${LDFLAGS-"-ZP"} OPTFLAG=${OPTFLAG-"-O"};; bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; bsdi*) CC=${CC-"shlicc"} OPTFLAG=${OPTFLAG-"-O2"};; irix6*) OPTFLAG=${OPTFLAG-"-O2"};; irix*) OPTFLAG=${OPTFLAG-"-O2"};; lynxos*) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for GNU C (gcc) version 2.x" >&5 echo $ECHO_N "checking for GNU C (gcc) version 2.x... $ECHO_C" >&6; } ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ grep "gcc version " | sed 's/.*version //'` ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` if test "$ac_cv_gcc_major" = "2" ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&5 echo "$as_me: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&2;} { { echo "$as_me:$LINENO: error: See build/README.LynxOS for more information." >&5 echo "$as_me: error: See build/README.LynxOS for more information." >&2;} { (exit 1); exit 1; }; } fi;; nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} LDFLAGS=${LDFLAGS-"-posix"} OPTFLAG=${OPTFLAG-"-O2"};; osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; esac OPTFLAG=${OPTFLAG-"-O"} CC=${CC-cc} CFLAGS=${CFLAGS-""} ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "$GCC" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_GCC 1 _ACEOF fi no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} case "$host_os" in bsdi2.1) LIBS=${LIBS-"-lipc"};; dgux*) LIBS=${LIBS-"-ldgc"};; irix6*) LIBS=${LIBS-"-lbsd"};; irix*) LIBS=${LIBS-"-lc_s -lbsd"};; isc*) LIBS=${LIBS-"-lcposix -linet"};; netbsd1*) LIBS=${LIBS-"-lcrypt"};; ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; sco3.2*) LIBS=${LIBS-"-lsocket"};; sinix*) LIBS=${LIBS-"-lelf -lc"};; solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"};; wgs*) LIBS=${LIBS-"-lnsl"};; esac case "$host_os" in aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; esac case "$host_os" in ultrix*) cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BROKEN_VDISABLE 1 _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether recording of pathnames of libraries is enabled" >&5 echo $ECHO_N "checking whether recording of pathnames of libraries is enabled... $ECHO_C" >&6; } # Check whether --enable-runpath was given. if test "${enable_runpath+set}" = set; then enableval=$enable_runpath; vi_cv_runpath="$enableval" else vi_cv_runpath="yes" fi { echo "$as_me:$LINENO: result: $vi_cv_runpath" >&5 echo "${ECHO_T}$vi_cv_runpath" >&6; } if test "X$vi_cv_runpath" = "Xyes"; then LRscript='s/^\(.*\)/-R\1 -L\1 /' else LRscript='s/^\(.*\)/-L\1 /' fi { echo "$as_me:$LINENO: checking if --enable-trace option specified" >&5 echo $ECHO_N "checking if --enable-trace option specified... $ECHO_C" >&6; } # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then enableval=$enable_trace; vi_cv_trace="yes" else vi_cv_trace="no" fi if test "$vi_cv_trace" = yes; then CPPFLAGS="-DTRACE $CPPFLAGS" fi { echo "$as_me:$LINENO: result: $vi_cv_trace" >&5 echo "${ECHO_T}$vi_cv_trace" >&6; } CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" LDFLAGS="$ADDLDFLAGS $LDFLAGS" LIBS="$ADDLIBS $LIBS" PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib" # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_shell+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_shell in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_shell="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no" ;; esac fi vi_cv_path_shell=$ac_cv_path_vi_cv_path_shell if test -n "$vi_cv_path_shell"; then { echo "$as_me:$LINENO: result: $vi_cv_path_shell" >&5 echo "${ECHO_T}$vi_cv_path_shell" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_shell" = no; then { { echo "$as_me:$LINENO: error: No shell utility found." >&5 echo "$as_me: error: No shell utility found." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_sendmail+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_sendmail in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_sendmail="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no" ;; esac fi vi_cv_path_sendmail=$ac_cv_path_vi_cv_path_sendmail if test -n "$vi_cv_path_sendmail"; then { echo "$as_me:$LINENO: result: $vi_cv_path_sendmail" >&5 echo "${ECHO_T}$vi_cv_path_sendmail" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_sendmail" = no; then { echo "$as_me:$LINENO: WARNING: No sendmail utility found;" >&5 echo "$as_me: WARNING: No sendmail utility found;" >&2;} { echo "$as_me:$LINENO: WARNING: users will not be told of saved files." >&5 echo "$as_me: WARNING: users will not be told of saved files." >&2;} fi for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_perl in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl if test -n "$vi_cv_path_perl"; then { echo "$as_me:$LINENO: result: $vi_cv_path_perl" >&5 echo "${ECHO_T}$vi_cv_path_perl" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$vi_cv_path_perl" && break done test -n "$vi_cv_path_perl" || vi_cv_path_perl="no" { echo "$as_me:$LINENO: checking for preserve directory" >&5 echo $ECHO_N "checking for preserve directory... $ECHO_C" >&6; } if test "${vi_cv_path_preserve+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else dirlist="/var/preserve /var/tmp /usr/tmp" vi_cv_path_preserve=no for i in $dirlist; do if test -d $i/vi.recover; then vi_cv_path_preserve=$i/vi.recover break; fi done if test "$vi_cv_path_preserve" = no; then for i in $dirlist; do if test -d $i -a -w $i; then vi_cv_path_preserve=$i/vi.recover break; fi done fi fi if test "$vi_cv_path_preserve" = no; then { { echo "$as_me:$LINENO: error: No writeable preserve directory found." >&5 echo "$as_me: error: No writeable preserve directory found." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_path_preserve" >&5 echo "${ECHO_T}$vi_cv_path_preserve" >&6; } # Extract the first word of "fuser", so it can be a program name with args. set dummy fuser; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_fuser+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_fuser in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_fuser="$vi_cv_path_fuser" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_fuser="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_fuser" && ac_cv_path_vi_cv_path_fuser="no" ;; esac fi vi_cv_path_fuser=$ac_cv_path_vi_cv_path_fuser if test -n "$vi_cv_path_fuser"; then { echo "$as_me:$LINENO: result: $vi_cv_path_fuser" >&5 echo "${ECHO_T}$vi_cv_path_fuser" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "lsof", so it can be a program name with args. set dummy lsof; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_lsof+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_lsof in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_lsof="$vi_cv_path_lsof" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_lsof="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_lsof" && ac_cv_path_vi_cv_path_lsof="no" ;; esac fi vi_cv_path_lsof=$ac_cv_path_vi_cv_path_lsof if test -n "$vi_cv_path_lsof"; then { echo "$as_me:$LINENO: result: $vi_cv_path_lsof" >&5 echo "${ECHO_T}$vi_cv_path_lsof" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi INUSE="" if test "$vi_cv_path_lsof" != no; then INUSE='test `lsof -t $i`' fi if test "$vi_cv_path_fuser" != no; then INUSE='fuser -s $i' fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ar in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ar="$vi_cv_path_ar" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ar="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ar" && ac_cv_path_vi_cv_path_ar="missing_ar" ;; esac fi vi_cv_path_ar=$ac_cv_path_vi_cv_path_ar if test -n "$vi_cv_path_ar"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ar" >&5 echo "${ECHO_T}$vi_cv_path_ar" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_chmod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_chmod in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_chmod="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod" ;; esac fi vi_cv_path_chmod=$ac_cv_path_vi_cv_path_chmod if test -n "$vi_cv_path_chmod"; then { echo "$as_me:$LINENO: result: $vi_cv_path_chmod" >&5 echo "${ECHO_T}$vi_cv_path_chmod" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_cp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_cp in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_cp="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp" ;; esac fi vi_cv_path_cp=$ac_cv_path_vi_cv_path_cp if test -n "$vi_cv_path_cp"; then { echo "$as_me:$LINENO: result: $vi_cv_path_cp" >&5 echo "${ECHO_T}$vi_cv_path_cp" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ln+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ln in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ln="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="missing_ln" ;; esac fi vi_cv_path_ln=$ac_cv_path_vi_cv_path_ln if test -n "$vi_cv_path_ln"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ln" >&5 echo "${ECHO_T}$vi_cv_path_ln" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_mkdir in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_mkdir="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir" ;; esac fi vi_cv_path_mkdir=$ac_cv_path_vi_cv_path_mkdir if test -n "$vi_cv_path_mkdir"; then { echo "$as_me:$LINENO: result: $vi_cv_path_mkdir" >&5 echo "${ECHO_T}$vi_cv_path_mkdir" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_rm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_rm in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_rm="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm" ;; esac fi vi_cv_path_rm=$ac_cv_path_vi_cv_path_rm if test -n "$vi_cv_path_rm"; then { echo "$as_me:$LINENO: result: $vi_cv_path_rm" >&5 echo "${ECHO_T}$vi_cv_path_rm" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ranlib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ranlib in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ranlib="$vi_cv_path_ranlib" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ranlib="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ranlib" && ac_cv_path_vi_cv_path_ranlib="missing_ranlib" ;; esac fi vi_cv_path_ranlib=$ac_cv_path_vi_cv_path_ranlib if test -n "$vi_cv_path_ranlib"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ranlib" >&5 echo "${ECHO_T}$vi_cv_path_ranlib" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_strip+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_strip in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_strip="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip" ;; esac fi vi_cv_path_strip=$ac_cv_path_vi_cv_path_strip if test -n "$vi_cv_path_strip"; then { echo "$as_me:$LINENO: result: $vi_cv_path_strip" >&5 echo "${ECHO_T}$vi_cv_path_strip" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" != yes; then if test "X$x_libraries" != "X"; then XLIBS="`echo $x_libraries | sed "$LRscript"` $XLIBS" fi XLIBS="$XLIBS -lX11" if test "X$x_includes" != "X"; then XINCS="-I$x_includes" fi fi { echo "$as_me:$LINENO: checking if --enable-widechar option specified" >&5 echo $ECHO_N "checking if --enable-widechar option specified... $ECHO_C" >&6; } # Check whether --enable-widechar was given. if test "${enable_widechar+set}" = set; then enableval=$enable_widechar; vi_cv_widechar=$enableval else vi_cv_widechar="no" fi if test "$vi_cv_widechar" = "yes"; then cat >>confdefs.h <<\_ACEOF @%:@define USE_WIDECHAR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_widechar" >&5 echo "${ECHO_T}$vi_cv_widechar" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking langinfo.h usability" >&5 echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking langinfo.h presence" >&5 echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then if test "${ac_cv_header_iconv_h+set}" = set; then { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking iconv.h usability" >&5 echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking iconv.h presence" >&5 echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_iconv_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } fi if test $ac_cv_header_iconv_h = yes; then cat >>confdefs.h <<\_ACEOF @%:@define USE_ICONV 1 _ACEOF for ac_func in iswblank do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done fi fi { echo "$as_me:$LINENO: checking if --enable-gtk option specified" >&5 echo $ECHO_N "checking if --enable-gtk option specified... $ECHO_C" >&6; } # Check whether --enable-gtk was given. if test "${enable_gtk+set}" = set; then enableval=$enable_gtk; vi_cv_gtk=$enableval else vi_cv_gtk="no" fi { echo "$as_me:$LINENO: result: $vi_cv_gtk" >&5 echo "${ECHO_T}$vi_cv_gtk" >&6; } if test "$vi_cv_gtk" = "yes"; then # # Find pkg-config # # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PKG_CONFIG = xno ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&5 echo "$as_me: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&2;} { (exit 1); exit 1; }; } fi else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config too old; version 0.5 or better required." >&5 echo "$as_me: error: *** pkg-config too old; version 0.5 or better required." >&2;} { (exit 1); exit 1; }; } fi PKG_CONFIG=no fi fi if test x$PKG_CONFIG = xno ; then PKG_CONFIG=/bin/false fi vi_programs="$vi_programs vi-gtk" vi_ipc=vi-ipc { echo "$as_me:$LINENO: checking for gtk+" >&5 echo $ECHO_N "checking for gtk+... $ECHO_C" >&6; } if $PKG_CONFIG gtk+-2.0 ; then GTKINCS=`$PKG_CONFIG --cflags gtk+-2.0` GTKLIBS=`$PKG_CONFIG --libs gtk+-2.0` { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PANGO 1 _ACEOF else if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&5 echo "$as_me: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&2;} { (exit 1); exit 1; }; } else # Check whether --with-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval=$with_gtk_prefix; gtk_config_prefix="$withval" else gtk_config_prefix="" fi # Check whether --with-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then withval=$with_gtk_exec_prefix; gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval=$enable_gtktest; else enable_gtktest=yes fi for module in . do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GTK_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG=$ac_cv_path_GTK_CONFIG if test -n "$GTK_CONFIG"; then { echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 echo "${ECHO_T}$GTK_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi min_gtk_version=1.2.0 { echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6; } no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" : fi rm -f conf.gtktest GTKINCS="$GTK_CFLAGS" GTKLIBS="$GTK_LIBS $LIBS" fi fi SAVELIBS="$LIBS" LIBS="-lutil $GTKLIBS" { echo "$as_me:$LINENO: checking for zvt_get_ptys in -lnvizvt" >&5 echo $ECHO_N "checking for zvt_get_ptys in -lnvizvt... $ECHO_C" >&6; } if test "${ac_cv_lib_nvizvt_zvt_get_ptys+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnvizvt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zvt_get_ptys (); int main () { return zvt_get_ptys (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_nvizvt_zvt_get_ptys=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nvizvt_zvt_get_ptys=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_nvizvt_zvt_get_ptys" >&5 echo "${ECHO_T}$ac_cv_lib_nvizvt_zvt_get_ptys" >&6; } if test $ac_cv_lib_nvizvt_zvt_get_ptys = yes; then vi_cv_zvt="yes" else vi_cv_zvt="no" fi if test "$vi_cv_zvt" = "yes"; then GTKLIBS="-lnvizvt $LIBS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_ZVT 1 _ACEOF fi LIBS="$SAVELIBS" # AC_PATH_PROG(vi_cv_gnome_config, gnome-config, no) # if test "$vi_cv_gnome_config" != "no"; then # ZVTLIBS=`$vi_cv_gnome_config zvt --libs` # GTKLIBS="$ZVTLIBS $GTKLIBS" # fi fi { echo "$as_me:$LINENO: checking if --enable-motif option specified" >&5 echo $ECHO_N "checking if --enable-motif option specified... $ECHO_C" >&6; } # Check whether --enable-motif was given. if test "${enable_motif+set}" = set; then enableval=$enable_motif; vi_cv_motif=$enableval else vi_cv_motif="no" fi { echo "$as_me:$LINENO: result: $vi_cv_motif" >&5 echo "${ECHO_T}$vi_cv_motif" >&6; } if test "$vi_cv_motif" = "yes"; then vi_programs="$vi_programs vi-motif" vi_ipc=vi-ipc case "$host_os" in bsdi*) CC=cc;; esac MOTIFLIBS="-lXm -lXt" { echo "$as_me:$LINENO: checking for main in -lSM" >&5 echo $ECHO_N "checking for main in -lSM... $ECHO_C" >&6; } if test "${ac_cv_lib_SM_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSM "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_SM_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_SM_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_SM_main" >&5 echo "${ECHO_T}$ac_cv_lib_SM_main" >&6; } if test $ac_cv_lib_SM_main = yes; then vi_cv_smlib="yes" else vi_cv_smlib="no" fi if test "$vi_cv_smlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lSM" fi { echo "$as_me:$LINENO: checking for main in -lICE" >&5 echo $ECHO_N "checking for main in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_main" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_main" >&6; } if test $ac_cv_lib_ICE_main = yes; then vi_cv_icelib="yes" else vi_cv_icelib="no" fi if test "$vi_cv_icelib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lICE" fi { echo "$as_me:$LINENO: checking for main in -lXext" >&5 echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } if test "${ac_cv_lib_Xext_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xext_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } if test $ac_cv_lib_Xext_main = yes; then vi_cv_xextlib="yes" else vi_cv_xextlib="no" fi if test "$vi_cv_xextlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXext" fi { echo "$as_me:$LINENO: checking for main in -lXpm" >&5 echo $ECHO_N "checking for main in -lXpm... $ECHO_C" >&6; } if test "${ac_cv_lib_Xpm_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xpm_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xpm_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xpm_main" >&6; } if test $ac_cv_lib_Xpm_main = yes; then vi_cv_xpmlib="yes" else vi_cv_xpmlib="no" fi if test "$vi_cv_xpmlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXpm" fi MOTIFLIBS="$MOTIFLIBS $XLIBS -lm $LIBS" fi { echo "$as_me:$LINENO: checking if --enable-threads option specified" >&5 echo $ECHO_N "checking if --enable-threads option specified... $ECHO_C" >&6; } # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; vi_cv_threads=$enableval else vi_cv_threads="no" fi { echo "$as_me:$LINENO: result: $vi_cv_threads" >&5 echo "${ECHO_T}$vi_cv_threads" >&6; } if test "$vi_cv_threads" = "yes"; then LIBS="$LIBS -lpthread" if test "${vi_cv_have_pthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_self() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_pthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_pthreads=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_pthreads" = "no"; then { { echo "$as_me:$LINENO: error: No threading library found" >&5 echo "$as_me: error: No threading library found" >&2;} { (exit 1); exit 1; }; } fi IPCOBJS="pthread.o $IPCOBJS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PTHREAD 1 _ACEOF else IPCOBJS="nothread.o $IPCOBJS" fi { echo "$as_me:$LINENO: checking if --enable-perlinterp option specified" >&5 echo $ECHO_N "checking if --enable-perlinterp option specified... $ECHO_C" >&6; } # Check whether --enable-perlinterp was given. if test "${enable_perlinterp+set}" = set; then enableval=$enable_perlinterp; vi_cv_perlinterp=$enableval else vi_cv_perlinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_perlinterp" >&5 echo "${ECHO_T}$vi_cv_perlinterp" >&6; } if test "$vi_cv_perlinterp" = "yes"; then if test "$vi_cv_path_perl" = no; then { { echo "$as_me:$LINENO: error: No perl5 utility found." >&5 echo "$as_me: error: No perl5 utility found." >&2;} { (exit 1); exit 1; }; } fi $vi_cv_path_perl -e 'require 5.004' || { { { echo "$as_me:$LINENO: error: perl5 must be version 5.004 or later." >&5 echo "$as_me: error: perl5 must be version 5.004 or later." >&2;} { (exit 1); exit 1; }; } } if test "$vi_cv_threads" = "yes"; then useithreads=`$vi_cv_path_perl -MConfig -e 'print $Config{useithreads}'` if test "X$useithreads" != "Xdefine"; then { { echo "$as_me:$LINENO: error: vi threading only compatible with perl's ithreads." >&5 echo "$as_me: error: vi threading only compatible with perl's ithreads." >&2;} { (exit 1); exit 1; }; } fi fi eval `$vi_cv_path_perl -V:shrpenv` vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ -e 'ccflags;perl_inc'` if test "X$perlcppflags" != "X"; then CPPFLAGS="$perlcppflags $CPPFLAGS" fi perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ldopts'` perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ccdlflags'` LIBOBJS="perl.o perlxsi.o perlsfio.o $LIBOBJS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_PERL_INTERP 1 _ACEOF { echo "$as_me:$LINENO: checking whether we need to use perl's setenv" >&5 echo $ECHO_N "checking whether we need to use perl's setenv... $ECHO_C" >&6; } if test "${vi_cv_perl_setenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main(){ #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV) exit(0); #else exit(1); #endif } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_perl_setenv=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_perl_setenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $vi_cv_perl_setenv" >&5 echo "${ECHO_T}$vi_cv_perl_setenv" >&6; } if test "$vi_cv_perl_setenv" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define USE_PERL_SETENV 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking if --enable-tclinterp option specified" >&5 echo $ECHO_N "checking if --enable-tclinterp option specified... $ECHO_C" >&6; } # Check whether --enable-tclinterp was given. if test "${enable_tclinterp+set}" = set; then enableval=$enable_tclinterp; vi_cv_tclinterp=$enableval else vi_cv_tclinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_tclinterp" >&5 echo "${ECHO_T}$vi_cv_tclinterp" >&6; } if test "$vi_cv_tclinterp" = "yes"; then { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; } if test "${vi_cv_tclconfig+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_tclconfig=`$srcdir/findconfig` fi { echo "$as_me:$LINENO: result: $vi_cv_tclconfig" >&5 echo "${ECHO_T}$vi_cv_tclconfig" >&6; } if test "x$vi_cv_tclconfig" = x; then { { echo "$as_me:$LINENO: error: No Tcl library found;" >&5 echo "$as_me: error: No Tcl library found;" >&2;} { (exit 1); exit 1; }; } fi . $vi_cv_tclconfig LIBOBJS="tcl.o $LIBOBJS" LIBS="$TCL_LIB_SPEC $TCL_LIBS $LIBS" cat >>confdefs.h <<\_ACEOF @%:@define HAVE_TCL_INTERP 1 _ACEOF fi SAVELIBS="$LIBS" SAVELDFLAGS="$LDFLAGS" SAVECPPFLAGS="$CPPFLAGS" # Check whether --with-curses was given. if test "${with_curses+set}" = set; then withval=$with_curses; fi if test "x$with_curses" != "x"; then CURSLDFLAGS="`echo $with_curses/lib | sed "$LRscript"` $CURSLDFLAGS" CURSCPPFLAGS="-I$with_curses/include $CURSCPPFLAGS" fi; LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" if test "$vi_cv_widechar" = "yes"; then for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_waddnwstr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for waddnwstr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for waddnwstr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char waddnwstr (); int main () { return waddnwstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done else for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_initscr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for initscr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for initscr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done fi if test "$vi_cv_curses" != "unknown"; then CURSHEADER=curses.h if test "$vi_cv_curses" = "ncurses"; then for ac_header in ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncurses.h fi done fi if test "$vi_cv_curses" = "ncursesw"; then for ac_header in ncursesw/ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncursesw/ncurses.h fi done fi vi_programs="vi $vi_programs" CURSLIBS="-l$vi_cv_curses" else { echo "$as_me:$LINENO: WARNING: *** No suitable curses library found." >&5 echo "$as_me: WARNING: *** No suitable curses library found." >&2;} if test "$vi_programs"X = X; then { { echo "$as_me:$LINENO: error: No executable to build." >&5 echo "$as_me: error: No executable to build." >&2;} { (exit 1); exit 1; }; } fi fi as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_tgetent" | $as_tr_sh` { echo "$as_me:$LINENO: checking for tgetent in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for tgetent in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then vi_cv_curses_tgetent=yes else vi_cv_curses_tgetent=no fi if test "$vi_cv_curses_tgetent" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermlib" >&5 echo $ECHO_N "checking for tgetent in -ltermlib... $ECHO_C" >&6; } if test "${ac_cv_lib_termlib_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termlib_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termlib_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termlib_tgetent" >&6; } if test $ac_cv_lib_termlib_tgetent = yes; then vi_cv_termlib=-ltermlib else vi_cv_termlib=no fi if test "$vi_cv_termlib" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } if test $ac_cv_lib_termcap_tgetent = yes; then vi_cv_termlib=-ltermcap else vi_cv_termlib=no fi fi fi if test "$vi_cv_termlib" != no; then CURSLIBS="$CURSLIBS $vi_cv_termlib" fi LIBS="$SAVELIBS" LDFLAGS="$SAVELDFLAGS" CPPFLAGS="$SAVECPPFLAGS" { echo "$as_me:$LINENO: checking for sys/mman.h" >&5 echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_mman+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_mman=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_mman=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_mman" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_MMAN_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_mman" >&5 echo "${ECHO_T}$vi_cv_include_sys_mman" >&6; } { echo "$as_me:$LINENO: checking for sys/select.h" >&5 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_select=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_select=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_select" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS_SELECT_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_select" >&5 echo "${ECHO_T}$vi_cv_include_sys_select" >&6; } { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef ssize_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define ssize_t int _ACEOF fi { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF @%:@define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF @%:@define const _ACEOF fi { echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (sizeof ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_ST_BLKSIZE 1 _ACEOF fi { echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef mode_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define mode_t int _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef pid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF @%:@define TM_IN_SYS_TIME 1 _ACEOF fi for ac_func in bsearch gethostname memchr memset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in mkstemp mmap strdup strpbrk do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in snprintf vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIB@&t@OBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in select do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_env=no else need_env=yes fi done for ac_func in strsep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_strsep=no else need_strsep=yes fi done for ac_func in unsetenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else need_env=yes fi done for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap for ac_header in vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default @%:@include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ @%:@include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF @%:@define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF @%:@define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_WORKING_FORK 1 _ACEOF fi if test "$need_env" = yes; then LIBOBJS="env.o $LIBOBJS" fi if test "$need_strsep" = yes; then LIBOBJS="strsep.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking for fcntl/flock" >&5 echo $ECHO_N "checking for fcntl/flock... $ECHO_C" >&6; } if test "${vi_cv_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_lock=none case "$host_os" in dgux*);; irix*);; *) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { flock(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=flock else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; esac if test "$vi_cv_lock" = none; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { fcntl(0, F_SETLK, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=fcntl else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi if test "$vi_cv_lock" = flock; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_LOCK_FLOCK 1 _ACEOF fi if test "$vi_cv_lock" = fcntl; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_LOCK_FCNTL 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_lock" >&5 echo "${ECHO_T}$vi_cv_lock" >&6; } { echo "$as_me:$LINENO: checking for ftruncate/chsize" >&5 echo $ECHO_N "checking for ftruncate/chsize... $ECHO_C" >&6; } if test "${vi_cv_ftruncate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ftruncate(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=ftruncate else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { chsize(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=chsize else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ftruncate=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_ftruncate" = ftruncate; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_FTRUNCATE_FTRUNCATE 1 _ACEOF fi if test "$vi_cv_ftruncate" = chsize; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_FTRUNCATE_CHSIZE 1 _ACEOF fi if test "$vi_cv_ftruncate" = no; then { { echo "$as_me:$LINENO: error: No file truncation system call." >&5 echo "$as_me: error: No file truncation system call." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_ftruncate" >&5 echo "${ECHO_T}$vi_cv_ftruncate" >&6; } CSAVELIBS="$LIBS" CSAVELDFLAGS="$LDFLAGS" CSAVECPPFLAGS="$CPPFLAGS" LIBS="$CURSLIBS $LIBS" LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" { echo "$as_me:$LINENO: checking for tigetstr/tigetnum" >&5 echo $ECHO_N "checking for tigetstr/tigetnum... $ECHO_C" >&6; } if test "${vi_cv_have_curses_tigetstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { tigetstr(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_tigetstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_tigetstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_tigetstr" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_TIGETSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_tigetstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_tigetstr" >&6; } if test "$vi_cv_curses" = "bundled curses"; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BSD_CURSES 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_WADDNSTR 1 _ACEOF cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_IDLOK 1 _ACEOF else { echo "$as_me:$LINENO: checking for waddnstr" >&5 echo $ECHO_N "checking for waddnstr... $ECHO_C" >&6; } if test "${vi_cv_have_curses_waddnstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { waddnstr(stdscr, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_waddnstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_waddnstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_waddnstr" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_WADDNSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_waddnstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_waddnstr" >&6; } { echo "$as_me:$LINENO: checking for beep" >&5 echo $ECHO_N "checking for beep... $ECHO_C" >&6; } if test "${vi_cv_have_curses_beep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { beep(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_beep=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_beep=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_beep" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_BEEP 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_beep" >&5 echo "${ECHO_T}$vi_cv_have_curses_beep" >&6; } { echo "$as_me:$LINENO: checking for flash" >&5 echo $ECHO_N "checking for flash... $ECHO_C" >&6; } if test "${vi_cv_have_curses_flash+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { flash(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_flash=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_flash=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_flash" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_FLASH 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_flash" >&5 echo "${ECHO_T}$vi_cv_have_curses_flash" >&6; } { echo "$as_me:$LINENO: checking for idlok" >&5 echo $ECHO_N "checking for idlok... $ECHO_C" >&6; } if test "${vi_cv_have_curses_idlok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { idlok(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_idlok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_idlok=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_idlok" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_IDLOK 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_idlok" >&5 echo "${ECHO_T}$vi_cv_have_curses_idlok" >&6; } { echo "$as_me:$LINENO: checking for keypad" >&5 echo $ECHO_N "checking for keypad... $ECHO_C" >&6; } if test "${vi_cv_have_curses_keypad+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { keypad(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_keypad=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_keypad=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_keypad" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_KEYPAD 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_keypad" >&5 echo "${ECHO_T}$vi_cv_have_curses_keypad" >&6; } { echo "$as_me:$LINENO: checking for newterm" >&5 echo $ECHO_N "checking for newterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_newterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { newterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_newterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_newterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_newterm" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_NEWTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_newterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_newterm" >&6; } if test "$vi_cv_have_curses_newterm" = no; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BSD_CURSES 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking for setupterm" >&5 echo $ECHO_N "checking for setupterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_setupterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { setupterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_setupterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_setupterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_setupterm" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_CURSES_SETUPTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_setupterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_setupterm" >&6; } LIBS="$CSAVELIBS" LDFLAGS="$CSAVELDFLAGS" CPPFLAGS="$CSAVECPPFLAGS" { echo "$as_me:$LINENO: checking for broken gettimeofday system call" >&5 echo $ECHO_N "checking for broken gettimeofday system call... $ECHO_C" >&6; } if test "${vi_cv_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { gettimeofday(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_gettimeofday=okay else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_gettimeofday=broken fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_gettimeofday" = broken; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_BROKEN_GETTIMEOFDAY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_gettimeofday" >&5 echo "${ECHO_T}$vi_cv_gettimeofday" >&6; } { echo "$as_me:$LINENO: checking for System V pty calls" >&5 echo $ECHO_N "checking for System V pty calls... $ECHO_C" >&6; } if test "${vi_cv_sys5_pty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { grantpt(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_sys5_pty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_sys5_pty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_sys5_pty" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_SYS5_PTY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sys5_pty" >&5 echo "${ECHO_T}$vi_cv_sys5_pty" >&6; } { echo "$as_me:$LINENO: checking for revoke system call" >&5 echo $ECHO_N "checking for revoke system call... $ECHO_C" >&6; } if test "${vi_cv_revoke+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { revoke("a"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_revoke=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_revoke=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_revoke" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define HAVE_REVOKE 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_revoke" >&5 echo "${ECHO_T}$vi_cv_revoke" >&6; } { echo "$as_me:$LINENO: checking for int type sprintf return value" >&5 echo $ECHO_N "checking for int type sprintf return value... $ECHO_C" >&6; } if test "${vi_cv_sprintf_count+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_sprintf_count=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_sprintf_count=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi if test "$vi_cv_sprintf_count" = no; then cat >>confdefs.h <<\_ACEOF @%:@define SPRINTF_RET_CHARPNT 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sprintf_count" >&5 echo "${ECHO_T}$vi_cv_sprintf_count" >&6; } { echo "$as_me:$LINENO: checking for u_char" >&5 echo $ECHO_N "checking for u_char... $ECHO_C" >&6; } if test "${vi_cv_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_char foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uchar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uchar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uchar" >&5 echo "${ECHO_T}$vi_cv_uchar" >&6; } if test "$vi_cv_uchar" = no; then u_char_decl="typedef unsigned char u_char;" fi { echo "$as_me:$LINENO: checking for u_short" >&5 echo $ECHO_N "checking for u_short... $ECHO_C" >&6; } if test "${vi_cv_ushort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_short foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ushort=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ushort=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ushort" >&5 echo "${ECHO_T}$vi_cv_ushort" >&6; } if test "$vi_cv_ushort" = no; then u_short_decl="typedef unsigned short u_short;" fi { echo "$as_me:$LINENO: checking for u_int" >&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6; } if test "${vi_cv_uint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uint=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint" >&5 echo "${ECHO_T}$vi_cv_uint" >&6; } if test "$vi_cv_uint" = no; then u_int_decl="typedef unsigned int u_int;" fi { echo "$as_me:$LINENO: checking for u_long" >&5 echo $ECHO_N "checking for u_long... $ECHO_C" >&6; } if test "${vi_cv_ulong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_long foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ulong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ulong=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ulong" >&5 echo "${ECHO_T}$vi_cv_ulong" >&6; } if test "$vi_cv_ulong" = no; then u_long_decl="typedef unsigned long u_long;" fi { echo "$as_me:$LINENO: checking for u_int8_t" >&5 echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; } if test "${vi_cv_uint8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int8_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned char) != 1);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint8="unsigned char" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint8=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint8" >&5 echo "${ECHO_T}$vi_cv_uint8" >&6; } if test "$vi_cv_uint8" = no; then { { echo "$as_me:$LINENO: error: No unsigned 8-bit integral type." >&5 echo "$as_me: error: No unsigned 8-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint8" != yes; then u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" fi { echo "$as_me:$LINENO: checking for u_int16_t" >&5 echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; } if test "${vi_cv_uint16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint16" >&5 echo "${ECHO_T}$vi_cv_uint16" >&6; } if test "$vi_cv_uint16" = no; then { { echo "$as_me:$LINENO: error: No unsigned 16-bit integral type." >&5 echo "$as_me: error: No unsigned 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint16" != yes; then u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" fi { echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; } if test "${vi_cv_int16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int16" >&5 echo "${ECHO_T}$vi_cv_int16" >&6; } if test "$vi_cv_int16" = no; then { { echo "$as_me:$LINENO: error: No signed 16-bit integral type." >&5 echo "$as_me: error: No signed 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int16" != yes; then int16_decl="typedef $vi_cv_int16 int16_t;" fi { echo "$as_me:$LINENO: checking for u_int32_t" >&5 echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; } if test "${vi_cv_uint32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint32" >&5 echo "${ECHO_T}$vi_cv_uint32" >&6; } if test "$vi_cv_uint32" = no; then { { echo "$as_me:$LINENO: error: No unsigned 32-bit integral type." >&5 echo "$as_me: error: No unsigned 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint32" != yes; then u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" fi { echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } if test "${vi_cv_int32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int32" >&5 echo "${ECHO_T}$vi_cv_int32" >&6; } if test "$vi_cv_int32" = no; then { { echo "$as_me:$LINENO: error: No signed 32-bit integral type." >&5 echo "$as_me: error: No signed 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int32" != yes; then int32_decl="typedef $vi_cv_int32 int32_t;" fi { echo "$as_me:$LINENO: checking return type of fprintf" >&5 echo $ECHO_N "checking return type of fprintf... $ECHO_C" >&6; } if test "${vi_cv_type_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int fprintf (); int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_type_fprintf=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_type_fprintf=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_type_fprintf" >&5 echo "${ECHO_T}$vi_cv_type_fprintf" >&6; } { echo "$as_me:$LINENO: checking fprintf prototype needed" >&5 echo $ECHO_N "checking fprintf prototype needed... $ECHO_C" >&6; } if test "${vi_cv_proto_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include typedef int (*funcPtr)(); int main () { funcPtr ptr = (funcPtr) fprintf; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_proto_fprintf=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_proto_fprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_proto_fprintf" >&5 echo "${ECHO_T}$vi_cv_proto_fprintf" >&6; } if test "$vi_cv_proto_fprintf" = yes; then cat >>confdefs.h <<\_ACEOF @%:@define NEED_FPRINTF_PROTO 1 _ACEOF fi # Check whether --with-db_type was given. if test "${with_db_type+set}" = set; then withval=$with_db_type; fi case "$with_db_type" in "db1") { echo "$as_me:$LINENO: WARNING: Use of db1 is not officially supported." >&5 echo "$as_me: WARNING: Use of db1 is not officially supported." >&2;} cat >>confdefs.h <<\_ACEOF @%:@define USE_DB1 1 _ACEOF ;; "system") ;; *) with_db_type="bundled" ;; esac # Check whether --with-db_prefix was given. if test "${with_db_prefix+set}" = set; then withval=$with_db_prefix; fi SAVELDFLAGS="$LDFLAGS" if test "x$with_db_prefix" != "x"; then LDFLAGS="-L$with_db_prefix/lib $LDFLAGS" CPPFLAGS="-I$with_db_prefix/include $CPPFLAGS" fi if test "$with_db_type" != db1; then SAVELIBS="$LIBS" LIBS="$LIBS -ldb" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { db_create(NULL,NULL,0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_dbfatal="no" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_dbfatal="yes" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$vi_cv_dbfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need DB 3." >&5 echo "$as_me: error: Need DB 3." >&2;} { (exit 1); exit 1; }; } fi LIBS="$SAVELIBS" fi LDFLAGS="$SAVELDFLAGS" { echo "$as_me:$LINENO: checking if --enable-dynamic-loading option specified" >&5 echo $ECHO_N "checking if --enable-dynamic-loading option specified... $ECHO_C" >&6; } # Check whether --enable-dynamic-loading was given. if test "${enable_dynamic_loading+set}" = set; then enableval=$enable_dynamic_loading; vi_cv_dl=$enableval else vi_cv_dl="no" fi { echo "$as_me:$LINENO: result: $vi_cv_dl" >&5 echo "${ECHO_T}$vi_cv_dl" >&6; } if test "$vi_cv_dl" = yes; then { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then vi_cv_dlfatal="no" else vi_cv_dlfatal="yes" fi if test "$vi_cv_dlfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need dl to support dynamic loading." >&5 echo "$as_me: error: Need dl to support dynamic loading." >&2;} { (exit 1); exit 1; }; } fi OLDPATH="$PATH" PATH="$with_db_prefix/lib:/usr/lib:/lib" # Extract the first word of "libdb-3.so", so it can be a program name with args. set dummy libdb-3.so; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_db3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_db3 in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_db3="$vi_cv_path_db3" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_db3="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_db3" && ac_cv_path_vi_cv_path_db3="no" ;; esac fi vi_cv_path_db3=$ac_cv_path_vi_cv_path_db3 if test -n "$vi_cv_path_db3"; then { echo "$as_me:$LINENO: result: $vi_cv_path_db3" >&5 echo "${ECHO_T}$vi_cv_path_db3" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_db3" = no; then { { echo "$as_me:$LINENO: error: Path of libdb-3.so not found." >&5 echo "$as_me: error: Path of libdb-3.so not found." >&2;} { (exit 1); exit 1; }; } fi PATH="$OLDPATH" cat >>confdefs.h <<\_ACEOF @%:@define USE_DYNAMIC_LOADING 1 _ACEOF LIBOBJS="dldb.o $LIBOBJS" dl_src=../common/dldb.c LIBS="-ldl $LIBS" else LIBS="-ldb $LIBS" if test "X$with_db_prefix" != "X"; then LDFLAGS="`echo $with_db_prefix/lib | sed "$LRscript"` $LDFLAGS" fi fi # Check whether --with-db_build was given. if test "${with_db_build+set}" = set; then withval=$with_db_build; fi if test "x$with_db_build" != "x"; then vi_cv_dbsrc=`$AWK '/^srcdir/ {gsub("srcdir[ \t]*=","");print $1}' \ $with_db_build/Makefile` case $with_db_build in *[\\/]);; *) with_db_build="$with_db_build/";; esac case $vi_cv_dbsrc in [\\/]*);; *) vi_cv_dbsrc="$with_db_build$vi_cv_dbsrc";; esac fi; vi_cv_db4="no" # Check whether --enable-log4 was given. if test "${enable_log4+set}" = set; then enableval=$enable_log4; { echo "$as_me:$LINENO: checking for DB 4" >&5 echo $ECHO_N "checking for DB 4... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include DB_VERSION_MAJOR _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "^4" >/dev/null 2>&1; then vi_cv_db4="yes" else vi_cv_db4="no" fi rm -f conftest* { echo "$as_me:$LINENO: result: $vi_cv_db4" >&5 echo "${ECHO_T}$vi_cv_db4" >&6; } fi if test "$vi_cv_db4" = "yes"; then CPPFLAGS="-I$vi_cv_dbsrc/include $CPPFLAGS" CPPFLAGS="-I$vi_cv_dbsrc/include_auto $CPPFLAGS" CPPFLAGS="-I$with_db_build $CPPFLAGS" cat >>confdefs.h <<\_ACEOF @%:@define USE_DB4_LOGGING 1 _ACEOF LIBOBJS="log4.o vi_auto.o vi_rec.o $LIBOBJS" else LIBOBJS="log.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking if --disable-re option specified" >&5 echo $ECHO_N "checking if --disable-re option specified... $ECHO_C" >&6; } # Check whether --enable-re was given. if test "${enable_re+set}" = set; then enableval=$enable_re; if test "$enable_re" = "yes"; then vi_cv_re_lib="bundled RE" else vi_cv_re_lib="other RE" fi else vi_cv_re_lib="bundled RE" fi { echo "$as_me:$LINENO: result: $vi_cv_re_lib" >&5 echo "${ECHO_T}$vi_cv_re_lib" >&6; } case "$vi_cv_re_lib" in "bundled RE") CPPFLAGS="-I\$(visrcdir)/regex $CPPFLAGS" LIBOBJS="regcomp.o regerror.o regexec.o regfree.o $LIBOBJS";; "other RE") ;; esac ac_config_files="$ac_config_files Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "port.h") CONFIG_FILES="$CONFIG_FILES port.h:port.h.in" ;; "pathnames.h") CONFIG_FILES="$CONFIG_FILES pathnames.h:pathnames.h.in" ;; "recover") CONFIG_FILES="$CONFIG_FILES recover:recover.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim OPTFLAG!$OPTFLAG$ac_delim no_op_OPTFLAG!$no_op_OPTFLAG$ac_delim vi_cv_path_shell!$vi_cv_path_shell$ac_delim vi_cv_path_sendmail!$vi_cv_path_sendmail$ac_delim vi_cv_path_perl!$vi_cv_path_perl$ac_delim vi_cv_path_preserve!$vi_cv_path_preserve$ac_delim vi_cv_path_fuser!$vi_cv_path_fuser$ac_delim vi_cv_path_lsof!$vi_cv_path_lsof$ac_delim INUSE!$INUSE$ac_delim vi_cv_path_ar!$vi_cv_path_ar$ac_delim vi_cv_path_chmod!$vi_cv_path_chmod$ac_delim vi_cv_path_cp!$vi_cv_path_cp$ac_delim vi_cv_path_ln!$vi_cv_path_ln$ac_delim vi_cv_path_mkdir!$vi_cv_path_mkdir$ac_delim vi_cv_path_rm!$vi_cv_path_rm$ac_delim vi_cv_path_ranlib!$vi_cv_path_ranlib$ac_delim vi_cv_path_strip!$vi_cv_path_strip$ac_delim XMKMF!$XMKMF$ac_delim XINCS!$XINCS$ac_delim LIB@&t@OBJS!$LIB@&t@OBJS$ac_delim vi_programs!$vi_programs$ac_delim vi_ipc!$vi_ipc$ac_delim GTKLIBS!$GTKLIBS$ac_delim GTKINCS!$GTKINCS$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CONFIG!$GTK_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim MOTIFLIBS!$MOTIFLIBS$ac_delim IPCOBJS!$IPCOBJS$ac_delim shrpenv!$shrpenv$ac_delim perlldflags!$perlldflags$ac_delim perllibs!$perllibs$ac_delim vi_cv_perllib!$vi_cv_perllib$ac_delim CURSLIBS!$CURSLIBS$ac_delim CURSCPPFLAGS!$CURSCPPFLAGS$ac_delim CURSLDFLAGS!$CURSLDFLAGS$ac_delim HAVE_NCURSESW!$HAVE_NCURSESW$ac_delim u_char_decl!$u_char_decl$ac_delim u_short_decl!$u_short_decl$ac_delim u_int_decl!$u_int_decl$ac_delim u_long_decl!$u_long_decl$ac_delim u_int8_decl!$u_int8_decl$ac_delim u_int16_decl!$u_int16_decl$ac_delim int16_decl!$int16_decl$ac_delim u_int32_decl!$u_int32_decl$ac_delim int32_decl!$int32_decl$ac_delim NEED_FPRINTF_PROTO!$NEED_FPRINTF_PROTO$ac_delim dl_src!$dl_src$ac_delim vi_cv_path_db3!$vi_cv_path_db3$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi nvi-1.81.6/dist/autom4te.cache/traces.10100644000076400001440000024627610720065704016605 0ustar skimousersm4trace:aclocal.m4:7440: -1- m4_include([m4/gtk.m4]) m4trace:configure.in:4: -1- AC_INIT([../common/main.c]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:4: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:4: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:4: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:4: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:4: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:4: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.in:4: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.in:4: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.in:4: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:4: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:4: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.in:4: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.in:4: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.in:4: -1- m4_pattern_allow([^prefix$]) m4trace:configure.in:4: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.in:4: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.in:4: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.in:4: -1- m4_pattern_allow([^bindir$]) m4trace:configure.in:4: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.in:4: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.in:4: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.in:4: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.in:4: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.in:4: -1- m4_pattern_allow([^datadir$]) m4trace:configure.in:4: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.in:4: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.in:4: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.in:4: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.in:4: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.in:4: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.in:4: -1- m4_pattern_allow([^includedir$]) m4trace:configure.in:4: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.in:4: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.in:4: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^docdir$]) m4trace:configure.in:4: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.in:4: -1- m4_pattern_allow([^infodir$]) m4trace:configure.in:4: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.in:4: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.in:4: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.in:4: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.in:4: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.in:4: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^psdir$]) m4trace:configure.in:4: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.in:4: -1- m4_pattern_allow([^libdir$]) m4trace:configure.in:4: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.in:4: -1- m4_pattern_allow([^localedir$]) m4trace:configure.in:4: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.in:4: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.in:4: -1- m4_pattern_allow([^mandir$]) m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ #undef PACKAGE_NAME]) m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME]) m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ #undef PACKAGE_VERSION]) m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ #undef PACKAGE_STRING]) m4trace:configure.in:4: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.in:4: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:4: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT]) m4trace:configure.in:4: -1- AC_SUBST([DEFS]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.in:4: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.in:4: -1- AC_SUBST([ECHO_C]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.in:4: -1- AC_SUBST([ECHO_N]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.in:4: -1- AC_SUBST([ECHO_T]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.in:4: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.in:4: -1- AC_SUBST([LIBS]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:4: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:4: -1- AC_SUBST([build_alias]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.in:4: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.in:4: -1- AC_SUBST([host_alias]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.in:4: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.in:4: -1- AC_SUBST([target_alias]) m4trace:configure.in:4: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.in:4: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.in:5: -1- AC_CONFIG_AUX_DIR([.]) m4trace:configure.in:6: -1- AM_INIT_AUTOMAKE([vi], [1.81.6]) m4trace:configure.in:6: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.in:6: -1- AM_AUTOMAKE_VERSION([1.10]) m4trace:configure.in:6: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.in:6: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:6: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:6: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:6: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) m4trace:configure.in:6: -1- AC_SUBST_TRACE([am__isrc]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.in:6: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.in:6: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([CYGPATH_W]) m4trace:configure.in:6: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.in:6: -1- AC_SUBST([PACKAGE], [vi]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.in:6: -1- AC_SUBST([VERSION], [1.81.6]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.in:6: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.in:6: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.in:6: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ #undef PACKAGE]) m4trace:configure.in:6: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.in:6: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.in:6: -1- AH_OUTPUT([VERSION], [/* Version number of package */ #undef VERSION]) m4trace:configure.in:6: -1- AC_REQUIRE_AUX_FILE([missing]) m4trace:configure.in:6: -1- AC_SUBST([ACLOCAL]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.in:6: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.in:6: -1- AC_SUBST([AUTOCONF]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([AUTOCONF]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.in:6: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([AUTOMAKE]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.in:6: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([AUTOHEADER]) m4trace:configure.in:6: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.in:6: -1- AC_SUBST([MAKEINFO]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([MAKEINFO]) m4trace:configure.in:6: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.in:6: -1- AC_SUBST([install_sh]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([install_sh]) m4trace:configure.in:6: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.in:6: -1- AC_SUBST([STRIP]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.in:6: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.in:6: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) m4trace:configure.in:6: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.in:6: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.in:6: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([mkdir_p]) m4trace:configure.in:6: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.in:6: -1- AC_SUBST([AWK]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.in:6: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:6: -1- AC_SUBST([SET_MAKE]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.in:6: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.in:6: -1- AC_SUBST([am__leading_dot]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([am__leading_dot]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.in:6: -1- AC_SUBST([AMTAR]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([AMTAR]) m4trace:configure.in:6: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.in:6: -1- AC_SUBST([am__tar]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([am__tar]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.in:6: -1- AC_SUBST([am__untar]) m4trace:configure.in:6: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.in:6: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.in:7: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. You should run autoupdate.], [aclocal.m4:6943: AM_CONFIG_HEADER is expanded from... configure.in:7: the top level]) m4trace:configure.in:7: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.in:10: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.in:10: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:10: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:10: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.in:10: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.in:10: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:11: -1- AC_CANONICAL_HOST m4trace:configure.in:11: -1- AC_CANONICAL_BUILD m4trace:configure.in:11: -1- AC_REQUIRE_AUX_FILE([config.sub]) m4trace:configure.in:11: -1- AC_REQUIRE_AUX_FILE([config.guess]) m4trace:configure.in:11: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([build]) m4trace:configure.in:11: -1- m4_pattern_allow([^build$]) m4trace:configure.in:11: -1- AC_SUBST([build_cpu], [$[1]]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([build_cpu]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.in:11: -1- AC_SUBST([build_vendor], [$[2]]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([build_vendor]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.in:11: -1- AC_SUBST([build_os]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([build_os]) m4trace:configure.in:11: -1- m4_pattern_allow([^build_os$]) m4trace:configure.in:11: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([host]) m4trace:configure.in:11: -1- m4_pattern_allow([^host$]) m4trace:configure.in:11: -1- AC_SUBST([host_cpu], [$[1]]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([host_cpu]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.in:11: -1- AC_SUBST([host_vendor], [$[2]]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([host_vendor]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.in:11: -1- AC_SUBST([host_os]) m4trace:configure.in:11: -1- AC_SUBST_TRACE([host_os]) m4trace:configure.in:11: -1- m4_pattern_allow([^host_os$]) m4trace:configure.in:15: -1- AC_PROG_LIBTOOL m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... aclocal.m4:1982: AC_ENABLE_SHARED is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... aclocal.m4:2021: AC_ENABLE_STATIC is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... aclocal.m4:2060: AC_ENABLE_FAST_INSTALL is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_SUBST([CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LIBS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- AC_SUBST([CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- AC_SUBST([CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- AC_SUBST([CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:15: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:15: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.in:15: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.in:15: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.in:15: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.in:15: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.in:15: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.in:15: -1- AC_SUBST([am__include]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__include]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__include$]) m4trace:configure.in:15: -1- AC_SUBST([am__quote]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__quote]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.in:15: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.in:15: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([AMDEP_TRUE]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.in:15: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([AMDEP_FALSE]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.in:15: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) m4trace:configure.in:15: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.in:15: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.in:15: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:15: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:15: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:15: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... aclocal.m4:2257: AC_PROG_LD is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_SUBST([SED]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([SED]) m4trace:configure.in:15: -1- m4_pattern_allow([^SED$]) m4trace:configure.in:15: -1- AC_SUBST([GREP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.in:15: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:15: -1- AC_SUBST([GREP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.in:15: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:15: -1- AC_SUBST([EGREP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.in:15: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:15: -1- AC_SUBST([EGREP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.in:15: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:15: -1- AC_SUBST([LN_S], [$as_ln_s]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LN_S]) m4trace:configure.in:15: -1- m4_pattern_allow([^LN_S$]) m4trace:configure.in:15: -1- AC_SUBST([ECHO]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([ECHO]) m4trace:configure.in:15: -1- m4_pattern_allow([^ECHO$]) m4trace:configure.in:15: -1- AC_SUBST([AR]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([AR]) m4trace:configure.in:15: -1- m4_pattern_allow([^AR$]) m4trace:configure.in:15: -1- AC_SUBST([RANLIB]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([RANLIB]) m4trace:configure.in:15: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.in:15: -1- AC_SUBST([STRIP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.in:15: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1373: AC_ARG_ENABLE is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... aclocal.m4:636: _LT_AC_LOCK is expanded from... aclocal.m4:1127: AC_LIBTOOL_SYS_HARD_LINK_LOCKS is expanded from... aclocal.m4:2779: _LT_AC_LANG_C_CONFIG is expanded from... aclocal.m4:2710: AC_LIBTOOL_LANG_C_CONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H]) m4trace:configure.in:15: -1- AC_SUBST([CPP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:15: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([CPP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:15: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:15: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.in:15: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRING_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H]) m4trace:configure.in:15: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:15: -1- _LT_AC_TAGCONFIG m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [autoconf/general.m4:209: AC_HELP_STRING is expanded from... autoconf/general.m4:1391: AC_ARG_WITH is expanded from... aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me:$LINENO: error: tag name \"$tagname\" already exists], [aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [back quotes and double quotes must not be escaped in: $as_me: error: tag name \"$tagname\" already exists], [aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_SUBST([CXX]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXX$]) m4trace:configure.in:15: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXXFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LIBS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([CXX]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXX$]) m4trace:configure.in:15: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([ac_ct_CXX]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.in:15: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXXDEPMODE]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.in:15: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.in:15: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.in:15: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) m4trace:configure.in:15: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.in:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.in:15: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXXCPP]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.in:15: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([CXXCPP]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([CXXCPP]) m4trace:configure.in:15: -1- m4_pattern_allow([^CXXCPP$]) m4trace:configure.in:15: -1- AC_SUBST([F77]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([F77]) m4trace:configure.in:15: -1- m4_pattern_allow([^F77$]) m4trace:configure.in:15: -1- AC_SUBST([FFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([FFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^FFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:15: -1- AC_SUBST([LIBS]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:15: -1- AC_SUBST([F77]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([F77]) m4trace:configure.in:15: -1- m4_pattern_allow([^F77$]) m4trace:configure.in:15: -1- AC_SUBST([ac_ct_F77]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([ac_ct_F77]) m4trace:configure.in:15: -1- m4_pattern_allow([^ac_ct_F77$]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:170: AC_LANG_SAVE is expanded from... aclocal.m4:4166: _LT_AC_LANG_GCJ_CONFIG is expanded from... aclocal.m4:4118: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... aclocal.m4:4166: _LT_AC_LANG_GCJ_CONFIG is expanded from... aclocal.m4:4118: AC_LIBTOOL_LANG_GCJ_CONFIG is expanded from... aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:170: AC_LANG_SAVE is expanded from... aclocal.m4:4210: _LT_AC_LANG_RC_CONFIG is expanded from... aclocal.m4:4174: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete. You should run autoupdate.], [autoconf/lang.m4:176: AC_LANG_RESTORE is expanded from... aclocal.m4:4210: _LT_AC_LANG_RC_CONFIG is expanded from... aclocal.m4:4174: AC_LIBTOOL_LANG_RC_CONFIG is expanded from... aclocal.m4:1936: _LT_AC_TAGCONFIG is expanded from... aclocal.m4:231: AC_LIBTOOL_SETUP is expanded from... aclocal.m4:86: _AC_PROG_LIBTOOL is expanded from... aclocal.m4:66: AC_PROG_LIBTOOL is expanded from... configure.in:15: the top level]) m4trace:configure.in:15: -1- AC_SUBST([LIBTOOL]) m4trace:configure.in:15: -1- AC_SUBST_TRACE([LIBTOOL]) m4trace:configure.in:15: -1- m4_pattern_allow([^LIBTOOL$]) m4trace:configure.in:25: -1- AC_DEFINE_TRACE_LITERAL([DEBUG]) m4trace:configure.in:25: -1- m4_pattern_allow([^DEBUG$]) m4trace:configure.in:38: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:38: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:38: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:51: -1- AC_SUBST([CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.in:51: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:51: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:51: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:51: -1- AC_SUBST([LIBS]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:51: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:51: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:51: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:51: -1- AC_SUBST([CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- AC_SUBST([CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- AC_SUBST([CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- AC_SUBST([CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:51: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.in:51: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:51: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.in:51: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:51: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:51: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.in:51: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:51: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.in:51: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.in:51: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:51: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:51: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:72: -1- AC_SUBST([OPTFLAG]) m4trace:configure.in:72: -1- AC_SUBST_TRACE([OPTFLAG]) m4trace:configure.in:72: -1- m4_pattern_allow([^OPTFLAG$]) m4trace:configure.in:77: -1- AC_SUBST([CC]) m4trace:configure.in:77: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:77: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.in:80: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:80: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:80: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:80: -1- AC_SUBST([LIBS]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:80: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:80: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:80: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:80: -1- AC_SUBST([CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:80: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.in:80: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:80: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.in:80: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.in:80: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.in:80: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.in:80: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.in:80: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.in:80: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.in:80: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.in:80: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.in:83: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GCC]) m4trace:configure.in:83: -1- m4_pattern_allow([^HAVE_GCC$]) m4trace:configure.in:88: -1- AC_SUBST([no_op_OPTFLAG]) m4trace:configure.in:88: -1- AC_SUBST_TRACE([no_op_OPTFLAG]) m4trace:configure.in:88: -1- m4_pattern_allow([^no_op_OPTFLAG$]) m4trace:configure.in:113: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BROKEN_VDISABLE]) m4trace:configure.in:113: -1- m4_pattern_allow([^HAVE_BROKEN_VDISABLE$]) m4trace:configure.in:151: -1- AC_SUBST([vi_cv_path_shell]) m4trace:configure.in:151: -1- AC_SUBST_TRACE([vi_cv_path_shell]) m4trace:configure.in:151: -1- m4_pattern_allow([^vi_cv_path_shell$]) m4trace:configure.in:157: -1- AC_SUBST([vi_cv_path_sendmail]) m4trace:configure.in:157: -1- AC_SUBST_TRACE([vi_cv_path_sendmail]) m4trace:configure.in:157: -1- m4_pattern_allow([^vi_cv_path_sendmail$]) m4trace:configure.in:164: -1- AC_SUBST([vi_cv_path_perl]) m4trace:configure.in:164: -1- AC_SUBST_TRACE([vi_cv_path_perl]) m4trace:configure.in:164: -1- m4_pattern_allow([^vi_cv_path_perl$]) m4trace:configure.in:165: -1- AC_SUBST([vi_cv_path_perl]) m4trace:configure.in:165: -1- AC_SUBST_TRACE([vi_cv_path_perl]) m4trace:configure.in:165: -1- m4_pattern_allow([^vi_cv_path_perl$]) m4trace:configure.in:173: -1- AC_SUBST([vi_cv_path_preserve]) m4trace:configure.in:173: -1- AC_SUBST_TRACE([vi_cv_path_preserve]) m4trace:configure.in:173: -1- m4_pattern_allow([^vi_cv_path_preserve$]) m4trace:configure.in:197: -1- AC_SUBST([vi_cv_path_fuser]) m4trace:configure.in:197: -1- AC_SUBST_TRACE([vi_cv_path_fuser]) m4trace:configure.in:197: -1- m4_pattern_allow([^vi_cv_path_fuser$]) m4trace:configure.in:198: -1- AC_SUBST([vi_cv_path_lsof]) m4trace:configure.in:198: -1- AC_SUBST_TRACE([vi_cv_path_lsof]) m4trace:configure.in:198: -1- m4_pattern_allow([^vi_cv_path_lsof$]) m4trace:configure.in:199: -1- AC_SUBST([INUSE]) m4trace:configure.in:199: -1- AC_SUBST_TRACE([INUSE]) m4trace:configure.in:199: -1- m4_pattern_allow([^INUSE$]) m4trace:configure.in:209: -1- AC_SUBST([AWK]) m4trace:configure.in:209: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.in:209: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:210: -1- AC_SUBST([vi_cv_path_ar]) m4trace:configure.in:210: -1- AC_SUBST_TRACE([vi_cv_path_ar]) m4trace:configure.in:210: -1- m4_pattern_allow([^vi_cv_path_ar$]) m4trace:configure.in:211: -1- AC_SUBST([vi_cv_path_chmod]) m4trace:configure.in:211: -1- AC_SUBST_TRACE([vi_cv_path_chmod]) m4trace:configure.in:211: -1- m4_pattern_allow([^vi_cv_path_chmod$]) m4trace:configure.in:212: -1- AC_SUBST([vi_cv_path_cp]) m4trace:configure.in:212: -1- AC_SUBST_TRACE([vi_cv_path_cp]) m4trace:configure.in:212: -1- m4_pattern_allow([^vi_cv_path_cp$]) m4trace:configure.in:213: -1- AC_SUBST([vi_cv_path_ln]) m4trace:configure.in:213: -1- AC_SUBST_TRACE([vi_cv_path_ln]) m4trace:configure.in:213: -1- m4_pattern_allow([^vi_cv_path_ln$]) m4trace:configure.in:214: -1- AC_SUBST([vi_cv_path_mkdir]) m4trace:configure.in:214: -1- AC_SUBST_TRACE([vi_cv_path_mkdir]) m4trace:configure.in:214: -1- m4_pattern_allow([^vi_cv_path_mkdir$]) m4trace:configure.in:215: -1- AC_SUBST([vi_cv_path_rm]) m4trace:configure.in:215: -1- AC_SUBST_TRACE([vi_cv_path_rm]) m4trace:configure.in:215: -1- m4_pattern_allow([^vi_cv_path_rm$]) m4trace:configure.in:216: -1- AC_SUBST([vi_cv_path_ranlib]) m4trace:configure.in:216: -1- AC_SUBST_TRACE([vi_cv_path_ranlib]) m4trace:configure.in:216: -1- m4_pattern_allow([^vi_cv_path_ranlib$]) m4trace:configure.in:217: -1- AC_SUBST([vi_cv_path_strip]) m4trace:configure.in:217: -1- AC_SUBST_TRACE([vi_cv_path_strip]) m4trace:configure.in:217: -1- m4_pattern_allow([^vi_cv_path_strip$]) m4trace:configure.in:221: -1- AC_SUBST([XMKMF]) m4trace:configure.in:221: -1- AC_SUBST_TRACE([XMKMF]) m4trace:configure.in:221: -1- m4_pattern_allow([^XMKMF$]) m4trace:configure.in:222: -1- AC_SUBST([XINCS]) m4trace:configure.in:222: -1- AC_SUBST_TRACE([XINCS]) m4trace:configure.in:222: -1- m4_pattern_allow([^XINCS$]) m4trace:configure.in:244: -1- AC_DEFINE_TRACE_LITERAL([USE_WIDECHAR]) m4trace:configure.in:244: -1- m4_pattern_allow([^USE_WIDECHAR$]) m4trace:configure.in:254: -1- AC_DEFINE_TRACE_LITERAL([USE_ICONV]) m4trace:configure.in:254: -1- m4_pattern_allow([^USE_ICONV$]) m4trace:configure.in:254: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/headers.m4:92: AC_CHECK_HEADER is expanded from... configure.in:254: the top level]) m4trace:configure.in:254: -1- AH_OUTPUT([HAVE_ISWBLANK], [/* Define to 1 if you have the `iswblank\' function. */ #undef HAVE_ISWBLANK]) m4trace:configure.in:254: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $ac_func.$ac_objext"]) m4trace:configure.in:254: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:254: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:257: -1- AC_SUBST([vi_programs]) m4trace:configure.in:257: -1- AC_SUBST_TRACE([vi_programs]) m4trace:configure.in:257: -1- m4_pattern_allow([^vi_programs$]) m4trace:configure.in:258: -1- AC_SUBST([vi_ipc]) m4trace:configure.in:258: -1- AC_SUBST_TRACE([vi_ipc]) m4trace:configure.in:258: -1- m4_pattern_allow([^vi_ipc$]) m4trace:configure.in:259: -1- AC_SUBST([GTKLIBS]) m4trace:configure.in:259: -1- AC_SUBST_TRACE([GTKLIBS]) m4trace:configure.in:259: -1- m4_pattern_allow([^GTKLIBS$]) m4trace:configure.in:260: -1- AC_SUBST([GTKINCS]) m4trace:configure.in:260: -1- AC_SUBST_TRACE([GTKINCS]) m4trace:configure.in:260: -1- m4_pattern_allow([^GTKINCS$]) m4trace:configure.in:270: -1- AC_SUBST([PKG_CONFIG]) m4trace:configure.in:270: -1- AC_SUBST_TRACE([PKG_CONFIG]) m4trace:configure.in:270: -1- m4_pattern_allow([^PKG_CONFIG$]) m4trace:configure.in:299: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PANGO]) m4trace:configure.in:299: -1- m4_pattern_allow([^HAVE_PANGO$]) m4trace:configure.in:307: -1- AC_SUBST([GTK_CONFIG]) m4trace:configure.in:307: -1- AC_SUBST_TRACE([GTK_CONFIG]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_CONFIG$]) m4trace:configure.in:307: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... m4/gtk.m4:194: AM_PATH_GTK is expanded from... configure.in:307: the top level]) m4trace:configure.in:307: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... m4/gtk.m4:194: AM_PATH_GTK is expanded from... configure.in:307: the top level]) m4trace:configure.in:307: -1- AC_SUBST([GTK_CFLAGS]) m4trace:configure.in:307: -1- AC_SUBST_TRACE([GTK_CFLAGS]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_CFLAGS$]) m4trace:configure.in:307: -1- AC_SUBST([GTK_LIBS]) m4trace:configure.in:307: -1- AC_SUBST_TRACE([GTK_LIBS]) m4trace:configure.in:307: -1- m4_pattern_allow([^GTK_LIBS$]) m4trace:configure.in:319: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZVT]) m4trace:configure.in:319: -1- m4_pattern_allow([^HAVE_ZVT$]) m4trace:configure.in:330: -1- AC_SUBST([MOTIFLIBS]) m4trace:configure.in:330: -1- AC_SUBST_TRACE([MOTIFLIBS]) m4trace:configure.in:330: -1- m4_pattern_allow([^MOTIFLIBS$]) m4trace:configure.in:379: -1- AC_SUBST([IPCOBJS]) m4trace:configure.in:379: -1- AC_SUBST_TRACE([IPCOBJS]) m4trace:configure.in:379: -1- m4_pattern_allow([^IPCOBJS$]) m4trace:configure.in:392: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:392: the top level]) m4trace:configure.in:397: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD]) m4trace:configure.in:397: -1- m4_pattern_allow([^HAVE_PTHREAD$]) m4trace:configure.in:403: -1- AC_SUBST([shrpenv]) m4trace:configure.in:403: -1- AC_SUBST_TRACE([shrpenv]) m4trace:configure.in:403: -1- m4_pattern_allow([^shrpenv$]) m4trace:configure.in:404: -1- AC_SUBST([perlldflags]) m4trace:configure.in:404: -1- AC_SUBST_TRACE([perlldflags]) m4trace:configure.in:404: -1- m4_pattern_allow([^perlldflags$]) m4trace:configure.in:405: -1- AC_SUBST([perllibs]) m4trace:configure.in:405: -1- AC_SUBST_TRACE([perllibs]) m4trace:configure.in:405: -1- m4_pattern_allow([^perllibs$]) m4trace:configure.in:406: -1- AC_SUBST([vi_cv_perllib]) m4trace:configure.in:406: -1- AC_SUBST_TRACE([vi_cv_perllib]) m4trace:configure.in:406: -1- m4_pattern_allow([^vi_cv_perllib$]) m4trace:configure.in:438: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PERL_INTERP]) m4trace:configure.in:438: -1- m4_pattern_allow([^HAVE_PERL_INTERP$]) m4trace:configure.in:452: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:452: the top level]) m4trace:configure.in:452: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:452: the top level]) m4trace:configure.in:454: -1- AC_DEFINE_TRACE_LITERAL([USE_PERL_SETENV]) m4trace:configure.in:454: -1- m4_pattern_allow([^USE_PERL_SETENV$]) m4trace:configure.in:476: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TCL_INTERP]) m4trace:configure.in:476: -1- m4_pattern_allow([^HAVE_TCL_INTERP$]) m4trace:configure.in:480: -1- AC_SUBST([CURSLIBS]) m4trace:configure.in:480: -1- AC_SUBST_TRACE([CURSLIBS]) m4trace:configure.in:480: -1- m4_pattern_allow([^CURSLIBS$]) m4trace:configure.in:481: -1- AC_SUBST([CURSCPPFLAGS]) m4trace:configure.in:481: -1- AC_SUBST_TRACE([CURSCPPFLAGS]) m4trace:configure.in:481: -1- m4_pattern_allow([^CURSCPPFLAGS$]) m4trace:configure.in:482: -1- AC_SUBST([CURSLDFLAGS]) m4trace:configure.in:482: -1- AC_SUBST_TRACE([CURSLDFLAGS]) m4trace:configure.in:482: -1- m4_pattern_allow([^CURSLDFLAGS$]) m4trace:configure.in:483: -1- AC_SUBST([HAVE_NCURSESW]) m4trace:configure.in:483: -1- AC_SUBST_TRACE([HAVE_NCURSESW]) m4trace:configure.in:483: -1- m4_pattern_allow([^HAVE_NCURSESW$]) m4trace:configure.in:527: -1- AH_OUTPUT([HAVE_NCURSES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H]) m4trace:configure.in:531: -1- AH_OUTPUT([HAVE_NCURSESW_NCURSES_H], [/* Define to 1 if you have the header file. */ #undef HAVE_NCURSESW_NCURSES_H]) m4trace:configure.in:569: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [autoconf/general.m4:2297: AC_TRY_CPP is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:569: the top level]) m4trace:configure.in:571: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_MMAN_H]) m4trace:configure.in:571: -1- m4_pattern_allow([^HAVE_SYS_MMAN_H$]) m4trace:configure.in:578: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [autoconf/general.m4:2297: AC_TRY_CPP is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:578: the top level]) m4trace:configure.in:580: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SELECT_H]) m4trace:configure.in:580: -1- m4_pattern_allow([^HAVE_SYS_SELECT_H$]) m4trace:configure.in:585: -1- AC_DEFINE_TRACE_LITERAL([ssize_t]) m4trace:configure.in:585: -1- m4_pattern_allow([^ssize_t$]) m4trace:configure.in:585: -1- AH_OUTPUT([ssize_t], [/* Define to `int\' if does not define. */ #undef ssize_t]) m4trace:configure.in:586: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN]) m4trace:configure.in:586: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) m4trace:configure.in:586: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN]) m4trace:configure.in:587: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.in:587: -1- m4_pattern_allow([^const$]) m4trace:configure.in:587: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ #undef const]) m4trace:configure.in:588: -1- _m4_warn([obsolete], [The macro `AC_STRUCT_ST_BLKSIZE' is obsolete. You should run autoupdate.], [autoconf/types.m4:894: AC_STRUCT_ST_BLKSIZE is expanded from... configure.in:588: the top level]) m4trace:configure.in:588: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_STAT_ST_BLKSIZE]) m4trace:configure.in:588: -1- m4_pattern_allow([^HAVE_STRUCT_STAT_ST_BLKSIZE$]) m4trace:configure.in:588: -1- AH_OUTPUT([HAVE_STRUCT_STAT_ST_BLKSIZE], [/* Define to 1 if `st_blksize\' is member of `struct stat\'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE]) m4trace:configure.in:588: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ST_BLKSIZE]) m4trace:configure.in:588: -1- m4_pattern_allow([^HAVE_ST_BLKSIZE$]) m4trace:configure.in:588: -1- AH_OUTPUT([HAVE_ST_BLKSIZE], [/* Define to 1 if your `struct stat\' has `st_blksize\'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE\' instead. */ #undef HAVE_ST_BLKSIZE]) m4trace:configure.in:589: -1- AC_DEFINE_TRACE_LITERAL([mode_t]) m4trace:configure.in:589: -1- m4_pattern_allow([^mode_t$]) m4trace:configure.in:589: -1- AH_OUTPUT([mode_t], [/* Define to `int\' if does not define. */ #undef mode_t]) m4trace:configure.in:590: -1- AC_DEFINE_TRACE_LITERAL([off_t]) m4trace:configure.in:590: -1- m4_pattern_allow([^off_t$]) m4trace:configure.in:590: -1- AH_OUTPUT([off_t], [/* Define to `long int\' if does not define. */ #undef off_t]) m4trace:configure.in:591: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.in:591: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.in:591: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ #undef pid_t]) m4trace:configure.in:592: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.in:592: -1- m4_pattern_allow([^size_t$]) m4trace:configure.in:592: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ #undef size_t]) m4trace:configure.in:593: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) m4trace:configure.in:593: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.in:593: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ #undef TM_IN_SYS_TIME]) m4trace:configure.in:596: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:596: the top level]) m4trace:configure.in:596: -1- AH_OUTPUT([HAVE_BSEARCH], [/* Define to 1 if you have the `bsearch\' function. */ #undef HAVE_BSEARCH]) m4trace:configure.in:596: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ #undef HAVE_GETHOSTNAME]) m4trace:configure.in:596: -1- AH_OUTPUT([HAVE_MEMCHR], [/* Define to 1 if you have the `memchr\' function. */ #undef HAVE_MEMCHR]) m4trace:configure.in:596: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ #undef HAVE_MEMSET]) m4trace:configure.in:596: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $ac_func.$ac_objext"]) m4trace:configure.in:596: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:596: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:597: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:597: the top level]) m4trace:configure.in:597: -1- AH_OUTPUT([HAVE_MKSTEMP], [/* Define to 1 if you have the `mkstemp\' function. */ #undef HAVE_MKSTEMP]) m4trace:configure.in:597: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ #undef HAVE_MMAP]) m4trace:configure.in:597: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ #undef HAVE_STRDUP]) m4trace:configure.in:597: -1- AH_OUTPUT([HAVE_STRPBRK], [/* Define to 1 if you have the `strpbrk\' function. */ #undef HAVE_STRPBRK]) m4trace:configure.in:597: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $ac_func.$ac_objext"]) m4trace:configure.in:597: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:597: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:598: -1- _m4_warn([obsolete], [The macro `AC_FOREACH' is obsolete. You should run autoupdate.], [autoconf/general.m4:198: AC_FOREACH is expanded from... configure.in:236: VI_CV_REPLACE_FUNCS is expanded from... configure.in:598: the top level]) m4trace:configure.in:598: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */ #undef HAVE_SNPRINTF]) m4trace:configure.in:598: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function. */ #undef HAVE_VSNPRINTF]) m4trace:configure.in:598: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $ac_func.$ac_objext"]) m4trace:configure.in:598: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:598: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:600: -1- AH_OUTPUT([HAVE_SELECT], [/* Define to 1 if you have the `select\' function. */ #undef HAVE_SELECT]) m4trace:configure.in:601: -1- AH_OUTPUT([HAVE_SETENV], [/* Define to 1 if you have the `setenv\' function. */ #undef HAVE_SETENV]) m4trace:configure.in:602: -1- AH_OUTPUT([HAVE_STRSEP], [/* Define to 1 if you have the `strsep\' function. */ #undef HAVE_STRSEP]) m4trace:configure.in:603: -1- AH_OUTPUT([HAVE_UNSETENV], [/* Define to 1 if you have the `unsetenv\' function. */ #undef HAVE_UNSETENV]) m4trace:configure.in:605: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H]) m4trace:configure.in:605: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H]) m4trace:configure.in:605: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ #undef HAVE_GETPAGESIZE]) m4trace:configure.in:605: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMAP]) m4trace:configure.in:605: -1- m4_pattern_allow([^HAVE_MMAP$]) m4trace:configure.in:605: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have a working `mmap\' system call. */ #undef HAVE_MMAP]) m4trace:configure.in:606: -1- _m4_warn([obsolete], [The macro `AC_FUNC_VFORK' is obsolete. You should run autoupdate.], [autoconf/functions.m4:1956: AC_FUNC_VFORK is expanded from... configure.in:606: the top level]) m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H]) m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ #undef HAVE_FORK]) m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ #undef HAVE_VFORK]) m4trace:configure.in:606: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ #undef HAVE_WORKING_VFORK]) m4trace:configure.in:606: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.in:606: -1- m4_pattern_allow([^vfork$]) m4trace:configure.in:606: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ #undef vfork]) m4trace:configure.in:606: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.in:606: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.in:606: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ #undef HAVE_WORKING_FORK]) m4trace:configure.in:637: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:637: the top level]) m4trace:configure.in:637: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:637: the top level]) m4trace:configure.in:640: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LOCK_FLOCK]) m4trace:configure.in:640: -1- m4_pattern_allow([^HAVE_LOCK_FLOCK$]) m4trace:configure.in:643: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LOCK_FCNTL]) m4trace:configure.in:643: -1- m4_pattern_allow([^HAVE_LOCK_FCNTL$]) m4trace:configure.in:653: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:653: the top level]) m4trace:configure.in:653: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:653: the top level]) m4trace:configure.in:655: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FTRUNCATE_FTRUNCATE]) m4trace:configure.in:655: -1- m4_pattern_allow([^HAVE_FTRUNCATE_FTRUNCATE$]) m4trace:configure.in:658: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FTRUNCATE_CHSIZE]) m4trace:configure.in:658: -1- m4_pattern_allow([^HAVE_FTRUNCATE_CHSIZE$]) m4trace:configure.in:676: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:676: the top level]) m4trace:configure.in:678: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_TIGETSTR]) m4trace:configure.in:678: -1- m4_pattern_allow([^HAVE_CURSES_TIGETSTR$]) m4trace:configure.in:687: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BSD_CURSES]) m4trace:configure.in:687: -1- m4_pattern_allow([^HAVE_BSD_CURSES$]) m4trace:configure.in:688: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_WADDNSTR]) m4trace:configure.in:688: -1- m4_pattern_allow([^HAVE_CURSES_WADDNSTR$]) m4trace:configure.in:689: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_IDLOK]) m4trace:configure.in:689: -1- m4_pattern_allow([^HAVE_CURSES_IDLOK$]) m4trace:configure.in:696: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:696: the top level]) m4trace:configure.in:698: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_WADDNSTR]) m4trace:configure.in:698: -1- m4_pattern_allow([^HAVE_CURSES_WADDNSTR$]) m4trace:configure.in:707: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:707: the top level]) m4trace:configure.in:709: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_BEEP]) m4trace:configure.in:709: -1- m4_pattern_allow([^HAVE_CURSES_BEEP$]) m4trace:configure.in:718: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:718: the top level]) m4trace:configure.in:720: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_FLASH]) m4trace:configure.in:720: -1- m4_pattern_allow([^HAVE_CURSES_FLASH$]) m4trace:configure.in:729: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:729: the top level]) m4trace:configure.in:731: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_IDLOK]) m4trace:configure.in:731: -1- m4_pattern_allow([^HAVE_CURSES_IDLOK$]) m4trace:configure.in:740: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:740: the top level]) m4trace:configure.in:742: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_KEYPAD]) m4trace:configure.in:742: -1- m4_pattern_allow([^HAVE_CURSES_KEYPAD$]) m4trace:configure.in:751: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:751: the top level]) m4trace:configure.in:753: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_NEWTERM]) m4trace:configure.in:753: -1- m4_pattern_allow([^HAVE_CURSES_NEWTERM$]) m4trace:configure.in:758: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BSD_CURSES]) m4trace:configure.in:758: -1- m4_pattern_allow([^HAVE_BSD_CURSES$]) m4trace:configure.in:769: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:769: the top level]) m4trace:configure.in:771: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CURSES_SETUPTERM]) m4trace:configure.in:771: -1- m4_pattern_allow([^HAVE_CURSES_SETUPTERM$]) m4trace:configure.in:784: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:784: the top level]) m4trace:configure.in:786: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BROKEN_GETTIMEOFDAY]) m4trace:configure.in:786: -1- m4_pattern_allow([^HAVE_BROKEN_GETTIMEOFDAY$]) m4trace:configure.in:794: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:794: the top level]) m4trace:configure.in:796: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS5_PTY]) m4trace:configure.in:796: -1- m4_pattern_allow([^HAVE_SYS5_PTY$]) m4trace:configure.in:804: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:804: the top level]) m4trace:configure.in:806: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REVOKE]) m4trace:configure.in:806: -1- m4_pattern_allow([^HAVE_REVOKE$]) m4trace:configure.in:816: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:816: the top level]) m4trace:configure.in:816: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... configure.in:816: the top level]) m4trace:configure.in:818: -1- AC_DEFINE_TRACE_LITERAL([SPRINTF_RET_CHARPNT]) m4trace:configure.in:818: -1- m4_pattern_allow([^SPRINTF_RET_CHARPNT$]) m4trace:configure.in:824: -1- AC_SUBST([u_char_decl]) m4trace:configure.in:824: -1- AC_SUBST_TRACE([u_char_decl]) m4trace:configure.in:824: -1- m4_pattern_allow([^u_char_decl$]) m4trace:configure.in:827: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:827: the top level]) m4trace:configure.in:832: -1- AC_SUBST([u_short_decl]) m4trace:configure.in:832: -1- AC_SUBST_TRACE([u_short_decl]) m4trace:configure.in:832: -1- m4_pattern_allow([^u_short_decl$]) m4trace:configure.in:835: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:835: the top level]) m4trace:configure.in:840: -1- AC_SUBST([u_int_decl]) m4trace:configure.in:840: -1- AC_SUBST_TRACE([u_int_decl]) m4trace:configure.in:840: -1- m4_pattern_allow([^u_int_decl$]) m4trace:configure.in:843: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:843: the top level]) m4trace:configure.in:848: -1- AC_SUBST([u_long_decl]) m4trace:configure.in:848: -1- AC_SUBST_TRACE([u_long_decl]) m4trace:configure.in:848: -1- m4_pattern_allow([^u_long_decl$]) m4trace:configure.in:851: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:851: the top level]) m4trace:configure.in:857: -1- AC_SUBST([u_int8_decl]) m4trace:configure.in:857: -1- AC_SUBST_TRACE([u_int8_decl]) m4trace:configure.in:857: -1- m4_pattern_allow([^u_int8_decl$]) m4trace:configure.in:862: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:862: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:862: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:862: the top level]) m4trace:configure.in:870: -1- AC_SUBST([u_int16_decl]) m4trace:configure.in:870: -1- AC_SUBST_TRACE([u_int16_decl]) m4trace:configure.in:870: -1- m4_pattern_allow([^u_int16_decl$]) m4trace:configure.in:877: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:877: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:877: the top level]) m4trace:configure.in:885: -1- AC_SUBST([int16_decl]) m4trace:configure.in:885: -1- AC_SUBST_TRACE([int16_decl]) m4trace:configure.in:885: -1- m4_pattern_allow([^int16_decl$]) m4trace:configure.in:892: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:892: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:892: the top level]) m4trace:configure.in:900: -1- AC_SUBST([u_int32_decl]) m4trace:configure.in:900: -1- AC_SUBST_TRACE([u_int32_decl]) m4trace:configure.in:900: -1- m4_pattern_allow([^u_int32_decl$]) m4trace:configure.in:907: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:907: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:907: the top level]) m4trace:configure.in:915: -1- AC_SUBST([int32_decl]) m4trace:configure.in:915: -1- AC_SUBST_TRACE([int32_decl]) m4trace:configure.in:915: -1- m4_pattern_allow([^int32_decl$]) m4trace:configure.in:922: -3- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -3- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -2- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [autoconf/general.m4:2471: AC_RUN_IFELSE is expanded from... autoconf/general.m4:2479: AC_TRY_RUN is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:922: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:922: the top level]) m4trace:configure.in:933: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:933: the top level]) m4trace:configure.in:935: -1- AC_SUBST([NEED_FPRINTF_PROTO]) m4trace:configure.in:935: -1- AC_SUBST_TRACE([NEED_FPRINTF_PROTO]) m4trace:configure.in:935: -1- m4_pattern_allow([^NEED_FPRINTF_PROTO$]) m4trace:configure.in:941: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [autoconf/general.m4:2368: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:523: AS_IF is expanded from... autoconf/general.m4:1905: AC_CACHE_VAL is expanded from... autoconf/general.m4:1918: AC_CACHE_CHECK is expanded from... configure.in:941: the top level]) m4trace:configure.in:943: -1- AC_DEFINE_TRACE_LITERAL([NEED_FPRINTF_PROTO]) m4trace:configure.in:943: -1- m4_pattern_allow([^NEED_FPRINTF_PROTO$]) m4trace:configure.in:951: -1- AC_DEFINE_TRACE_LITERAL([USE_DB1]) m4trace:configure.in:951: -1- m4_pattern_allow([^USE_DB1$]) m4trace:configure.in:975: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [autoconf/general.m4:2415: AC_TRY_LINK is expanded from... configure.in:975: the top level]) m4trace:configure.in:984: -1- AC_SUBST([dl_src]) m4trace:configure.in:984: -1- AC_SUBST_TRACE([dl_src]) m4trace:configure.in:984: -1- m4_pattern_allow([^dl_src$]) m4trace:configure.in:999: -1- AC_SUBST([vi_cv_path_db3]) m4trace:configure.in:999: -1- AC_SUBST_TRACE([vi_cv_path_db3]) m4trace:configure.in:999: -1- m4_pattern_allow([^vi_cv_path_db3$]) m4trace:configure.in:1005: -1- AC_DEFINE_TRACE_LITERAL([USE_DYNAMIC_LOADING]) m4trace:configure.in:1005: -1- m4_pattern_allow([^USE_DYNAMIC_LOADING$]) m4trace:configure.in:1048: -1- AC_DEFINE_TRACE_LITERAL([USE_DB4_LOGGING]) m4trace:configure.in:1048: -1- m4_pattern_allow([^USE_DB4_LOGGING$]) m4trace:configure.in:1073: -1- AC_CONFIG_FILES([Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in]) m4trace:configure.in:1073: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) m4trace:configure.in:1073: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:1073: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1073: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.in:1073: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([INSTALL]) m4trace:configure.in:1073: -1- AC_SUBST_TRACE([MKDIR_P]) nvi-1.81.6/dist/aclocal.m40100644000076400001440000101140110720065677014264 0ustar skimousers# generated automatically by aclocal 1.10 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_if(m4_PACKAGE_VERSION, [2.61],, [m4_fatal([this file was generated for autoconf 2.61. You have another version of autoconf. If you want to use that, you should regenerate the build system entirely.], [63])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 51 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.10' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.10], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.10])dnl _AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.60])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/gtk.m4]) nvi-1.81.6/dist/config.h.in0100444000076400001440000001625510720065704014447 0ustar skimousers/* config.h.in. Generated from configure.in by autoheader. */ /* $Id: acconfig.h,v 8.34 2002/01/19 23:01:35 skimo Exp $ (Berkeley) $Date: 2002/01/19 23:01:35 $ */ /* Define to `int' if doesn't define. */ #undef ssize_t /* Define if you want a debugging version. */ #undef DEBUG /* Define if you have a System V-style (broken) gettimeofday. */ #undef HAVE_BROKEN_GETTIMEOFDAY /* Define if you have a Ultrix-style (broken) vdisable. */ #undef HAVE_BROKEN_VDISABLE /* Define if you have a BSD version of curses. */ #undef HAVE_BSD_CURSES /* Define if you have wide ncurses(3). */ #undef HAVE_NCURSESW /* Define if you have the curses(3) waddnwstr function. */ #undef HAVE_CURSES_ADDNWSTR /* Define if you have the curses(3) waddnstr function. */ #undef HAVE_CURSES_WADDNSTR /* Define if you have the curses(3) beep function. */ #undef HAVE_CURSES_BEEP /* Define if you have the curses(3) flash function. */ #undef HAVE_CURSES_FLASH /* Define if you have the curses(3) idlok function. */ #undef HAVE_CURSES_IDLOK /* Define if you have the curses(3) keypad function. */ #undef HAVE_CURSES_KEYPAD /* Define if you have the curses(3) newterm function. */ #undef HAVE_CURSES_NEWTERM /* Define if you have the curses(3) setupterm function. */ #undef HAVE_CURSES_SETUPTERM /* Define if you have the curses(3) tigetstr/tigetnum functions. */ #undef HAVE_CURSES_TIGETSTR /* Define if you have the DB __hash_open call in the C library. */ #undef HAVE_DB_HASH_OPEN /* Define if you have the chsize(2) system call. */ #undef HAVE_FTRUNCATE_CHSIZE /* Define if you have the ftruncate(2) system call. */ #undef HAVE_FTRUNCATE_FTRUNCATE /* Define if you have gcc. */ #undef HAVE_GCC /* Define if you have fcntl(2) style locking. */ #undef HAVE_LOCK_FCNTL /* Define if you have flock(2) style locking. */ #undef HAVE_LOCK_FLOCK /* Define is appropriate pango is available */ #undef HAVE_PANGO /* Define if you want to compile in the Perl interpreter. */ #undef HAVE_PERL_INTERP /* Define if using pthread. */ #undef HAVE_PTHREAD /* Define if you have the Berkeley style revoke(2) system call. */ #undef HAVE_REVOKE /* Define if you have the Berkeley style strsep(3) function. */ #undef HAVE_STRSEP /* Define if you have */ #undef HAVE_SYS_MMAN_H /* Define if you have */ #undef HAVE_SYS_SELECT_H /* Define if you have the System V style pty calls. */ #undef HAVE_SYS5_PTY /* Define if you want to compile in the Tcl interpreter. */ #undef HAVE_TCL_INTERP /* Define is appropriate zvt is available */ #undef HAVE_ZVT /* Define if your sprintf returns a pointer, not a length. */ #undef SPRINTF_RET_CHARPNT /* Define when using db1 */ #undef USE_DB1 /* Define when using db4 logging */ #undef USE_DB4_LOGGING /* Define when dynamically loading DB 3 */ #undef USE_DYNAMIC_LOADING /* Define when iconv can be used */ #undef USE_ICONV /* Define when perl's setenv should be used */ #undef USE_PERL_SETENV /* Define when using S-Lang */ #undef USE_SLANG_CURSES /* Define when using wide characters */ #undef USE_WIDECHAR /* Define if you have */ #undef HAVE_NCURSES_H /* Define when fprintf prototype not in an obvious place */ #undef NEED_FPRINTF_PROTO /* Define to 1 if you have the `bsearch' function. */ #undef HAVE_BSEARCH /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `iswblank' function. */ #undef HAVE_ISWBLANK /* Define to 1 if you have the `memchr' function. */ #undef HAVE_MEMCHR /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkstemp' function. */ #undef HAVE_MKSTEMP /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the header file. */ #undef HAVE_NCURSESW_NCURSES_H /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strpbrk' function. */ #undef HAVE_STRPBRK /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if `st_blksize' is member of `struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE /* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */ #undef HAVE_ST_BLKSIZE /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define as `fork' if `vfork' does not work. */ #undef vfork nvi-1.81.6/dist/install-sh0100555000076400001440000003160010720065705014420 0ustar skimousers#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: nvi-1.81.6/dist/Makefile.in0100644000076400001440000031401010720065707014464 0ustar skimousers# Makefile.in generated by automake 1.10 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ EXTRA_PROGRAMS = vi$(EXEEXT) vi-ipc$(EXEEXT) vi-motif$(EXEEXT) \ vi-gtk$(EXEEXT) subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/pathnames.h.in $(srcdir)/port.h.in \ $(srcdir)/recover.in $(top_srcdir)/configure INSTALL \ acconfig.h compile config.guess config.sub depcomp install-sh \ ltconfig ltmain.sh missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = port.h pathnames.h recover am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am_libvi_la_OBJECTS = api.lo conv.lo cut.lo delete.lo ex.lo \ ex_abbrev.lo ex_append.lo ex_args.lo ex_argv.lo ex_at.lo \ ex_bang.lo ex_cd.lo ex_cmd.lo ex_cscope.lo ex_delete.lo \ ex_display.lo ex_edit.lo ex_equal.lo ex_file.lo ex_filter.lo \ ex_global.lo ex_init.lo ex_join.lo ex_map.lo ex_mark.lo \ ex_mkexrc.lo ex_move.lo ex_open.lo ex_perl.lo ex_preserve.lo \ ex_print.lo ex_put.lo ex_quit.lo ex_read.lo ex_screen.lo \ ex_script.lo ex_set.lo ex_shell.lo ex_shift.lo ex_source.lo \ ex_stop.lo ex_subst.lo ex_tag.lo ex_tcl.lo ex_txt.lo \ ex_undo.lo ex_usage.lo ex_util.lo ex_version.lo ex_visual.lo \ ex_write.lo ex_yank.lo ex_z.lo exf.lo getc.lo gs.lo key.lo \ db.lo main.lo mark.lo msg.lo options.lo options_f.lo put.lo \ recover.lo screen.lo search.lo seq.lo trace.lo util.lo \ util2.lo v_at.lo v_ch.lo v_cmd.lo v_delete.lo v_event.lo \ v_ex.lo v_increment.lo v_init.lo v_itxt.lo v_left.lo v_mark.lo \ v_match.lo v_paragraph.lo v_put.lo v_redraw.lo v_replace.lo \ v_right.lo v_screen.lo v_scroll.lo v_search.lo v_section.lo \ v_sentence.lo v_status.lo v_txt.lo v_ulcase.lo v_undo.lo \ v_util.lo v_word.lo v_xchar.lo v_yank.lo v_z.lo v_zexit.lo \ vi.lo vs_line.lo vs_msg.lo vs_refresh.lo vs_relative.lo \ vs_smap.lo vs_split.lo libvi_la_OBJECTS = $(am_libvi_la_OBJECTS) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_vi_OBJECTS = vi-cl_bsd.$(OBJEXT) vi-cl_funcs.$(OBJEXT) \ vi-cl_main.$(OBJEXT) vi-cl_read.$(OBJEXT) \ vi-cl_screen.$(OBJEXT) vi-cl_term.$(OBJEXT) \ vi-nothread.$(OBJEXT) vi_OBJECTS = $(am_vi_OBJECTS) vi_DEPENDENCIES = libvi.la vi_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(vi_LDFLAGS) \ $(LDFLAGS) -o $@ am_vi_gtk_OBJECTS = vi_gtk-util2.$(OBJEXT) vi_gtk-ip_run.$(OBJEXT) \ vi_gtk-ip_send.$(OBJEXT) vi_gtk-ip_trans.$(OBJEXT) \ vi_gtk-ipc_cmd.$(OBJEXT) vi_gtk-ipc_method.$(OBJEXT) \ vi_gtk-gtk_main.$(OBJEXT) vi_gtk-gtkvi.$(OBJEXT) \ vi_gtk-gtkviscreen.$(OBJEXT) vi_gtk-gtkviwindow.$(OBJEXT) vi_gtk_OBJECTS = $(am_vi_gtk_OBJECTS) vi_gtk_DEPENDENCIES = @LIBOBJS@ vi_gtk_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(vi_gtk_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_vi_ipc_OBJECTS = ip_funcs.$(OBJEXT) ip_main.$(OBJEXT) \ ip_read.$(OBJEXT) ip_screen.$(OBJEXT) ip_send.$(OBJEXT) \ ip_term.$(OBJEXT) vi_ipc_OBJECTS = $(am_vi_ipc_OBJECTS) vi_ipc_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(vi_ipc_LDFLAGS) \ $(LDFLAGS) -o $@ am_vi_motif_OBJECTS = vi_motif-ip_run.$(OBJEXT) \ vi_motif-ip_send.$(OBJEXT) vi_motif-ip_trans.$(OBJEXT) \ vi_motif-ipc_cmd.$(OBJEXT) vi_motif-ipc_method.$(OBJEXT) \ vi_motif-m_main.$(OBJEXT) vi_motif-m_cde.$(OBJEXT) \ vi_motif-trace.$(OBJEXT) vi_motif-m_copypaste.$(OBJEXT) \ vi_motif-m_func.$(OBJEXT) vi_motif-m_menu.$(OBJEXT) \ vi_motif-m_options.$(OBJEXT) vi_motif-m_prompt.$(OBJEXT) \ vi_motif-m_ruler.$(OBJEXT) vi_motif-m_search.$(OBJEXT) \ vi_motif-m_tags.$(OBJEXT) vi_motif-m_util.$(OBJEXT) \ vi_motif-m_vi.$(OBJEXT) vi_motif-xtabbed.$(OBJEXT) vi_motif_OBJECTS = $(am_vi_motif_OBJECTS) vi_motif_DEPENDENCIES = @LIBOBJS@ vi_motif_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(vi_motif_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libvi_la_SOURCES) $(EXTRA_libvi_la_SOURCES) $(vi_SOURCES) \ $(vi_gtk_SOURCES) $(vi_ipc_SOURCES) $(vi_motif_SOURCES) DIST_SOURCES = $(libvi_la_SOURCES) $(EXTRA_libvi_la_SOURCES) \ $(vi_SOURCES) $(vi_gtk_SOURCES) $(vi_ipc_SOURCES) \ $(vi_motif_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = $(OPTFLAG) CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CURSCPPFLAGS = @CURSCPPFLAGS@ CURSLDFLAGS = @CURSLDFLAGS@ CURSLIBS = @CURSLIBS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ GTKINCS = @GTKINCS@ GTKLIBS = @GTKLIBS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ HAVE_NCURSESW = @HAVE_NCURSESW@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INUSE = @INUSE@ IPCOBJS = @IPCOBJS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MOTIFLIBS = @MOTIFLIBS@ NEED_FPRINTF_PROTO = @NEED_FPRINTF_PROTO@ OBJEXT = @OBJEXT@ OPTFLAG = @OPTFLAG@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XINCS = @XINCS@ XMKMF = @XMKMF@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ dl_src = @dl_src@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ int16_decl = @int16_decl@ int32_decl = @int32_decl@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ no_op_OPTFLAG = @no_op_OPTFLAG@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ perlldflags = @perlldflags@ perllibs = @perllibs@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ shrpenv = @shrpenv@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ u_char_decl = @u_char_decl@ u_int16_decl = @u_int16_decl@ u_int32_decl = @u_int32_decl@ u_int8_decl = @u_int8_decl@ u_int_decl = @u_int_decl@ u_long_decl = @u_long_decl@ u_short_decl = @u_short_decl@ vi_cv_path_ar = @vi_cv_path_ar@ vi_cv_path_chmod = @vi_cv_path_chmod@ vi_cv_path_cp = @vi_cv_path_cp@ vi_cv_path_db3 = @vi_cv_path_db3@ vi_cv_path_fuser = @vi_cv_path_fuser@ vi_cv_path_ln = @vi_cv_path_ln@ vi_cv_path_lsof = @vi_cv_path_lsof@ vi_cv_path_mkdir = @vi_cv_path_mkdir@ vi_cv_path_perl = @vi_cv_path_perl@ vi_cv_path_preserve = @vi_cv_path_preserve@ vi_cv_path_ranlib = @vi_cv_path_ranlib@ vi_cv_path_rm = @vi_cv_path_rm@ vi_cv_path_sendmail = @vi_cv_path_sendmail@ vi_cv_path_shell = @vi_cv_path_shell@ vi_cv_path_strip = @vi_cv_path_strip@ vi_cv_perllib = @vi_cv_perllib@ vi_ipc = @vi_ipc@ vi_programs = @vi_programs@ visrcdir = @srcdir@/.. ACLOCAL_AMFLAGS = -I m4 lib_LTLIBRARIES = libvi.la libvi_la_SOURCES = \ $(visrcdir)/common/api.c \ $(visrcdir)/common/conv.c \ $(visrcdir)/common/conv.h \ $(visrcdir)/common/cut.c \ $(visrcdir)/common/delete.c \ $(visrcdir)/common/args.h \ $(visrcdir)/common/common.h \ $(visrcdir)/common/cut.h \ $(visrcdir)/common/db.h \ $(visrcdir)/common/exf.h \ $(visrcdir)/common/gs.h \ $(visrcdir)/common/key.h \ $(visrcdir)/common/log.h \ $(visrcdir)/common/mark.h \ $(visrcdir)/common/mem.h \ $(visrcdir)/common/multibyte.h \ $(visrcdir)/common/msg.h \ $(visrcdir)/common/options.h \ $(visrcdir)/common/options_def.h \ $(visrcdir)/common/screen.h \ $(visrcdir)/common/seq.h \ $(visrcdir)/common/util.h \ $(visrcdir)/ex/ex.c \ $(visrcdir)/ex/ex_abbrev.c \ $(visrcdir)/ex/ex_append.c \ $(visrcdir)/ex/ex_args.c \ $(visrcdir)/ex/ex_argv.c \ $(visrcdir)/ex/ex_at.c \ $(visrcdir)/ex/ex_bang.c \ $(visrcdir)/ex/ex_cd.c \ $(visrcdir)/ex/ex_cmd.c \ $(visrcdir)/ex/ex_cscope.c \ $(visrcdir)/ex/ex_delete.c \ $(visrcdir)/ex/ex_display.c \ $(visrcdir)/ex/ex_edit.c \ $(visrcdir)/ex/ex_equal.c \ $(visrcdir)/ex/ex_file.c \ $(visrcdir)/ex/ex_filter.c \ $(visrcdir)/ex/ex_global.c \ $(visrcdir)/ex/ex_init.c \ $(visrcdir)/ex/ex_join.c \ $(visrcdir)/ex/ex_map.c \ $(visrcdir)/ex/ex_mark.c \ $(visrcdir)/ex/ex_mkexrc.c \ $(visrcdir)/ex/ex_move.c \ $(visrcdir)/ex/ex_open.c \ $(visrcdir)/ex/ex_perl.c \ $(visrcdir)/ex/ex_preserve.c \ $(visrcdir)/ex/ex_print.c \ $(visrcdir)/ex/ex_put.c \ $(visrcdir)/ex/ex_quit.c \ $(visrcdir)/ex/ex_read.c \ $(visrcdir)/ex/ex_screen.c \ $(visrcdir)/ex/ex_script.c \ $(visrcdir)/ex/ex_set.c \ $(visrcdir)/ex/ex_shell.c \ $(visrcdir)/ex/ex_shift.c \ $(visrcdir)/ex/ex_source.c \ $(visrcdir)/ex/ex_stop.c \ $(visrcdir)/ex/ex_subst.c \ $(visrcdir)/ex/ex_tag.c \ $(visrcdir)/ex/ex_tcl.c \ $(visrcdir)/ex/ex_txt.c \ $(visrcdir)/ex/ex_undo.c \ $(visrcdir)/ex/ex_usage.c \ $(visrcdir)/ex/ex_util.c \ $(visrcdir)/ex/ex_version.c \ $(visrcdir)/ex/ex_visual.c \ $(visrcdir)/ex/ex_write.c \ $(visrcdir)/ex/ex_yank.c \ $(visrcdir)/ex/ex_z.c \ $(visrcdir)/ex/ex.h \ $(visrcdir)/ex/ex_def.h \ $(visrcdir)/ex/script.h \ $(visrcdir)/ex/tag.h \ $(visrcdir)/ex/version.h \ $(visrcdir)/common/exf.c \ $(visrcdir)/vi/getc.c \ $(visrcdir)/vi/vi.h \ $(visrcdir)/common/gs.c \ $(visrcdir)/common/key.c \ $(visrcdir)/common/db.c \ $(visrcdir)/common/main.c \ $(visrcdir)/common/mark.c \ $(visrcdir)/common/msg.c \ $(visrcdir)/common/options.c \ $(visrcdir)/common/options_f.c \ $(visrcdir)/common/put.c \ $(visrcdir)/common/recover.c \ $(visrcdir)/common/screen.c \ $(visrcdir)/common/search.c \ $(visrcdir)/common/seq.c \ $(visrcdir)/common/trace.c \ $(visrcdir)/common/util.c \ $(visrcdir)/common/util2.c \ $(visrcdir)/vi/v_at.c \ $(visrcdir)/vi/v_ch.c \ $(visrcdir)/vi/v_cmd.c \ $(visrcdir)/vi/v_delete.c \ $(visrcdir)/vi/v_event.c \ $(visrcdir)/vi/v_ex.c \ $(visrcdir)/vi/v_increment.c \ $(visrcdir)/vi/v_init.c \ $(visrcdir)/vi/v_itxt.c \ $(visrcdir)/vi/v_left.c \ $(visrcdir)/vi/v_mark.c \ $(visrcdir)/vi/v_match.c \ $(visrcdir)/vi/v_paragraph.c \ $(visrcdir)/vi/v_put.c \ $(visrcdir)/vi/v_redraw.c \ $(visrcdir)/vi/v_replace.c \ $(visrcdir)/vi/v_right.c \ $(visrcdir)/vi/v_screen.c \ $(visrcdir)/vi/v_scroll.c \ $(visrcdir)/vi/v_search.c \ $(visrcdir)/vi/v_section.c \ $(visrcdir)/vi/v_sentence.c \ $(visrcdir)/vi/v_status.c \ $(visrcdir)/vi/v_txt.c \ $(visrcdir)/vi/v_ulcase.c \ $(visrcdir)/vi/v_undo.c \ $(visrcdir)/vi/v_util.c \ $(visrcdir)/vi/v_word.c \ $(visrcdir)/vi/v_xchar.c \ $(visrcdir)/vi/v_yank.c \ $(visrcdir)/vi/v_z.c \ $(visrcdir)/vi/v_zexit.c \ $(visrcdir)/vi/vi.c \ $(visrcdir)/vi/vs_line.c \ $(visrcdir)/vi/vs_msg.c \ $(visrcdir)/vi/vs_refresh.c \ $(visrcdir)/vi/vs_relative.c \ $(visrcdir)/vi/vs_smap.c \ $(visrcdir)/vi/vs_split.c EXTRA_libvi_la_SOURCES = \ $(visrcdir)/regex/regcomp.c \ $(visrcdir)/regex/regerror.c \ $(visrcdir)/regex/regexec.c \ $(visrcdir)/regex/regfree.c \ $(visrcdir)/regex/cclass.h \ $(visrcdir)/regex/cname.h \ $(visrcdir)/regex/regex.h \ $(visrcdir)/regex/regex2.h \ $(visrcdir)/regex/utils.h \ $(visrcdir)/common/dldb.c \ $(visrcdir)/common/log.c \ $(visrcdir)/common/log4.c \ $(visrcdir)/clib/bsearch.c \ $(visrcdir)/clib/env.c \ $(visrcdir)/clib/gethostname.c \ $(visrcdir)/clib/iswblank.c \ $(visrcdir)/clib/memchr.c \ $(visrcdir)/clib/memset.c \ $(visrcdir)/clib/mkstemp.c \ $(visrcdir)/clib/mmap.c \ $(visrcdir)/clib/snprintf.c \ $(visrcdir)/clib/strdup.c \ $(visrcdir)/clib/strpbrk.c \ $(visrcdir)/clib/strsep.c \ $(visrcdir)/clib/strtol.c \ $(visrcdir)/clib/strtoul.c \ $(visrcdir)/clib/vsnprintf.c \ $(visrcdir)/common/pthread.c \ $(visrcdir)/common/vi_auto.c \ $(visrcdir)/common/vi_rec.c \ $(visrcdir)/perl_api/perl.xs \ $(visrcdir)/perl_api/perlsfio.c \ $(visrcdir)/tcl_api/tcl.c # Is this the way to do it ? libvi_la_DEPENDENCIES = @LTLIBOBJS@ libvi_la_LIBADD = @LTLIBOBJS@ bin_PROGRAMS = @vi_programs@ @vi_ipc@ vi_SOURCES = \ $(visrcdir)/cl/cl.h \ $(visrcdir)/cl/cl_bsd.c \ $(visrcdir)/cl/cl_funcs.c \ $(visrcdir)/cl/cl_main.c \ $(visrcdir)/cl/cl_read.c \ $(visrcdir)/cl/cl_screen.c \ $(visrcdir)/cl/cl_term.c \ $(visrcdir)/common/nothread.c vi_LDADD = libvi.la @perllibs@ @CURSLIBS@ vi_CPPFLAGS = @CURSCPPFLAGS@ @perlldflags@ $(AM_CPPFLAGS) vi_LDFLAGS = @CURSLDFLAGS@ @perlldflags@ vi_ipc_SOURCES = \ $(visrcdir)/ip/ip_funcs.c \ $(visrcdir)/ip/ip_main.c \ $(visrcdir)/ip/ip_read.c \ $(visrcdir)/ip/ip_screen.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip.h \ $(visrcdir)/ip/ip_term.c vi_ipc_LDADD = libvi.la @perllibs@ @IPCOBJS@ vi_ipc_LDFLAGS = @perlldflags@ vi_ipc_DEPENDENCIES = @IPCOBJS@ vi_gtk_SOURCES = \ $(visrcdir)/common/util2.c \ $(visrcdir)/ipc/ip_run.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip_trans.c \ $(visrcdir)/ipc/ipc_cmd.c \ $(visrcdir)/ipc/ipc_method.c \ $(visrcdir)/gtk/gtk_main.c \ $(visrcdir)/gtk/gtkvi.c \ $(visrcdir)/gtk/gtkviscreen.c \ $(visrcdir)/gtk/gtkviwindow.c vi_gtk_LDADD = @GTKLIBS@ @LIBOBJS@ vi_gtk_CFLAGS = @GTKINCS@ @XINCS@ vi_motif_SOURCES = \ $(visrcdir)/ipc/ip_run.c \ $(visrcdir)/ipc/ip_send.c \ $(visrcdir)/ipc/ip_trans.c \ $(visrcdir)/ipc/ipc_cmd.c \ $(visrcdir)/ipc/ipc_method.c \ $(visrcdir)/motif/m_main.c \ $(visrcdir)/motif/m_cde.c \ $(visrcdir)/common/trace.c \ $(visrcdir)/motif_l/m_copypaste.c \ $(visrcdir)/motif_l/m_func.c \ $(visrcdir)/motif_l/m_menu.c \ $(visrcdir)/motif_l/m_options.c \ $(visrcdir)/motif_l/m_prompt.c \ $(visrcdir)/motif_l/m_ruler.c \ $(visrcdir)/motif_l/m_search.c \ $(visrcdir)/motif_l/m_tags.c \ $(visrcdir)/motif_l/m_util.c \ $(visrcdir)/motif_l/m_vi.c \ $(visrcdir)/motif_l/xtabbed.c vi_motif_LDADD = @MOTIFLIBS@ @LIBOBJS@ vi_motif_CFLAGS = @XINCS@ VI = -DVI=\"$(bindir)/`echo vi-ipc | sed '$(transform)'`\" AM_CPPFLAGS = -D__REGEX_PRIVATE -I. -I$(visrcdir)/include $(VI) PERL = @vi_cv_path_perl@ PERLLIB = @vi_cv_perllib@ SHRPENV = @shrpenv@ chmod = @vi_cv_path_chmod@ cp = @vi_cv_path_cp@ ln = @vi_cv_path_ln@ mkdir = @vi_cv_path_mkdir@ rm = @vi_cv_path_rm@ strip = @vi_cv_path_strip@ dmode = 755 emode = 555 fmode = 444 cat = dutch english french german ru_SU.KOI8-R spanish swedish all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps'; \ cd $(srcdir) && $(AUTOMAKE) --foreign --ignore-deps \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign --ignore-deps Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) $(top_srcdir)/acconfig.h cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 port.h: $(top_builddir)/config.status $(srcdir)/port.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ pathnames.h: $(top_builddir)/config.status $(srcdir)/pathnames.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ recover: $(top_builddir)/config.status $(srcdir)/recover.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvi.la: $(libvi_la_OBJECTS) $(libvi_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libvi_la_OBJECTS) $(libvi_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done vi$(EXEEXT): $(vi_OBJECTS) $(vi_DEPENDENCIES) @rm -f vi$(EXEEXT) $(vi_LINK) $(vi_OBJECTS) $(vi_LDADD) $(LIBS) vi-gtk$(EXEEXT): $(vi_gtk_OBJECTS) $(vi_gtk_DEPENDENCIES) @rm -f vi-gtk$(EXEEXT) $(vi_gtk_LINK) $(vi_gtk_OBJECTS) $(vi_gtk_LDADD) $(LIBS) vi-ipc$(EXEEXT): $(vi_ipc_OBJECTS) $(vi_ipc_DEPENDENCIES) @rm -f vi-ipc$(EXEEXT) $(vi_ipc_LINK) $(vi_ipc_OBJECTS) $(vi_ipc_LDADD) $(LIBS) vi-motif$(EXEEXT): $(vi_motif_OBJECTS) $(vi_motif_DEPENDENCIES) @rm -f vi-motif$(EXEEXT) $(vi_motif_LINK) $(vi_motif_OBJECTS) $(vi_motif_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< api.lo: $(visrcdir)/common/api.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api.lo `test -f '$(visrcdir)/common/api.c' || echo '$(srcdir)/'`$(visrcdir)/common/api.c conv.lo: $(visrcdir)/common/conv.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o conv.lo `test -f '$(visrcdir)/common/conv.c' || echo '$(srcdir)/'`$(visrcdir)/common/conv.c cut.lo: $(visrcdir)/common/cut.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cut.lo `test -f '$(visrcdir)/common/cut.c' || echo '$(srcdir)/'`$(visrcdir)/common/cut.c delete.lo: $(visrcdir)/common/delete.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o delete.lo `test -f '$(visrcdir)/common/delete.c' || echo '$(srcdir)/'`$(visrcdir)/common/delete.c ex.lo: $(visrcdir)/ex/ex.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex.lo `test -f '$(visrcdir)/ex/ex.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex.c ex_abbrev.lo: $(visrcdir)/ex/ex_abbrev.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_abbrev.lo `test -f '$(visrcdir)/ex/ex_abbrev.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_abbrev.c ex_append.lo: $(visrcdir)/ex/ex_append.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_append.lo `test -f '$(visrcdir)/ex/ex_append.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_append.c ex_args.lo: $(visrcdir)/ex/ex_args.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_args.lo `test -f '$(visrcdir)/ex/ex_args.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_args.c ex_argv.lo: $(visrcdir)/ex/ex_argv.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_argv.lo `test -f '$(visrcdir)/ex/ex_argv.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_argv.c ex_at.lo: $(visrcdir)/ex/ex_at.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_at.lo `test -f '$(visrcdir)/ex/ex_at.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_at.c ex_bang.lo: $(visrcdir)/ex/ex_bang.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_bang.lo `test -f '$(visrcdir)/ex/ex_bang.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_bang.c ex_cd.lo: $(visrcdir)/ex/ex_cd.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_cd.lo `test -f '$(visrcdir)/ex/ex_cd.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_cd.c ex_cmd.lo: $(visrcdir)/ex/ex_cmd.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_cmd.lo `test -f '$(visrcdir)/ex/ex_cmd.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_cmd.c ex_cscope.lo: $(visrcdir)/ex/ex_cscope.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_cscope.lo `test -f '$(visrcdir)/ex/ex_cscope.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_cscope.c ex_delete.lo: $(visrcdir)/ex/ex_delete.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_delete.lo `test -f '$(visrcdir)/ex/ex_delete.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_delete.c ex_display.lo: $(visrcdir)/ex/ex_display.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_display.lo `test -f '$(visrcdir)/ex/ex_display.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_display.c ex_edit.lo: $(visrcdir)/ex/ex_edit.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_edit.lo `test -f '$(visrcdir)/ex/ex_edit.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_edit.c ex_equal.lo: $(visrcdir)/ex/ex_equal.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_equal.lo `test -f '$(visrcdir)/ex/ex_equal.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_equal.c ex_file.lo: $(visrcdir)/ex/ex_file.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_file.lo `test -f '$(visrcdir)/ex/ex_file.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_file.c ex_filter.lo: $(visrcdir)/ex/ex_filter.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_filter.lo `test -f '$(visrcdir)/ex/ex_filter.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_filter.c ex_global.lo: $(visrcdir)/ex/ex_global.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_global.lo `test -f '$(visrcdir)/ex/ex_global.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_global.c ex_init.lo: $(visrcdir)/ex/ex_init.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_init.lo `test -f '$(visrcdir)/ex/ex_init.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_init.c ex_join.lo: $(visrcdir)/ex/ex_join.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_join.lo `test -f '$(visrcdir)/ex/ex_join.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_join.c ex_map.lo: $(visrcdir)/ex/ex_map.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_map.lo `test -f '$(visrcdir)/ex/ex_map.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_map.c ex_mark.lo: $(visrcdir)/ex/ex_mark.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_mark.lo `test -f '$(visrcdir)/ex/ex_mark.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_mark.c ex_mkexrc.lo: $(visrcdir)/ex/ex_mkexrc.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_mkexrc.lo `test -f '$(visrcdir)/ex/ex_mkexrc.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_mkexrc.c ex_move.lo: $(visrcdir)/ex/ex_move.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_move.lo `test -f '$(visrcdir)/ex/ex_move.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_move.c ex_open.lo: $(visrcdir)/ex/ex_open.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_open.lo `test -f '$(visrcdir)/ex/ex_open.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_open.c ex_perl.lo: $(visrcdir)/ex/ex_perl.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_perl.lo `test -f '$(visrcdir)/ex/ex_perl.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_perl.c ex_preserve.lo: $(visrcdir)/ex/ex_preserve.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_preserve.lo `test -f '$(visrcdir)/ex/ex_preserve.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_preserve.c ex_print.lo: $(visrcdir)/ex/ex_print.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_print.lo `test -f '$(visrcdir)/ex/ex_print.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_print.c ex_put.lo: $(visrcdir)/ex/ex_put.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_put.lo `test -f '$(visrcdir)/ex/ex_put.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_put.c ex_quit.lo: $(visrcdir)/ex/ex_quit.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_quit.lo `test -f '$(visrcdir)/ex/ex_quit.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_quit.c ex_read.lo: $(visrcdir)/ex/ex_read.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_read.lo `test -f '$(visrcdir)/ex/ex_read.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_read.c ex_screen.lo: $(visrcdir)/ex/ex_screen.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_screen.lo `test -f '$(visrcdir)/ex/ex_screen.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_screen.c ex_script.lo: $(visrcdir)/ex/ex_script.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_script.lo `test -f '$(visrcdir)/ex/ex_script.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_script.c ex_set.lo: $(visrcdir)/ex/ex_set.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_set.lo `test -f '$(visrcdir)/ex/ex_set.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_set.c ex_shell.lo: $(visrcdir)/ex/ex_shell.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_shell.lo `test -f '$(visrcdir)/ex/ex_shell.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_shell.c ex_shift.lo: $(visrcdir)/ex/ex_shift.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_shift.lo `test -f '$(visrcdir)/ex/ex_shift.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_shift.c ex_source.lo: $(visrcdir)/ex/ex_source.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_source.lo `test -f '$(visrcdir)/ex/ex_source.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_source.c ex_stop.lo: $(visrcdir)/ex/ex_stop.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_stop.lo `test -f '$(visrcdir)/ex/ex_stop.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_stop.c ex_subst.lo: $(visrcdir)/ex/ex_subst.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_subst.lo `test -f '$(visrcdir)/ex/ex_subst.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_subst.c ex_tag.lo: $(visrcdir)/ex/ex_tag.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_tag.lo `test -f '$(visrcdir)/ex/ex_tag.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_tag.c ex_tcl.lo: $(visrcdir)/ex/ex_tcl.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_tcl.lo `test -f '$(visrcdir)/ex/ex_tcl.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_tcl.c ex_txt.lo: $(visrcdir)/ex/ex_txt.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_txt.lo `test -f '$(visrcdir)/ex/ex_txt.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_txt.c ex_undo.lo: $(visrcdir)/ex/ex_undo.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_undo.lo `test -f '$(visrcdir)/ex/ex_undo.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_undo.c ex_usage.lo: $(visrcdir)/ex/ex_usage.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_usage.lo `test -f '$(visrcdir)/ex/ex_usage.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_usage.c ex_util.lo: $(visrcdir)/ex/ex_util.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_util.lo `test -f '$(visrcdir)/ex/ex_util.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_util.c ex_version.lo: $(visrcdir)/ex/ex_version.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_version.lo `test -f '$(visrcdir)/ex/ex_version.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_version.c ex_visual.lo: $(visrcdir)/ex/ex_visual.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_visual.lo `test -f '$(visrcdir)/ex/ex_visual.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_visual.c ex_write.lo: $(visrcdir)/ex/ex_write.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_write.lo `test -f '$(visrcdir)/ex/ex_write.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_write.c ex_yank.lo: $(visrcdir)/ex/ex_yank.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_yank.lo `test -f '$(visrcdir)/ex/ex_yank.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_yank.c ex_z.lo: $(visrcdir)/ex/ex_z.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ex_z.lo `test -f '$(visrcdir)/ex/ex_z.c' || echo '$(srcdir)/'`$(visrcdir)/ex/ex_z.c exf.lo: $(visrcdir)/common/exf.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o exf.lo `test -f '$(visrcdir)/common/exf.c' || echo '$(srcdir)/'`$(visrcdir)/common/exf.c getc.lo: $(visrcdir)/vi/getc.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o getc.lo `test -f '$(visrcdir)/vi/getc.c' || echo '$(srcdir)/'`$(visrcdir)/vi/getc.c gs.lo: $(visrcdir)/common/gs.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gs.lo `test -f '$(visrcdir)/common/gs.c' || echo '$(srcdir)/'`$(visrcdir)/common/gs.c key.lo: $(visrcdir)/common/key.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o key.lo `test -f '$(visrcdir)/common/key.c' || echo '$(srcdir)/'`$(visrcdir)/common/key.c db.lo: $(visrcdir)/common/db.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o db.lo `test -f '$(visrcdir)/common/db.c' || echo '$(srcdir)/'`$(visrcdir)/common/db.c main.lo: $(visrcdir)/common/main.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o main.lo `test -f '$(visrcdir)/common/main.c' || echo '$(srcdir)/'`$(visrcdir)/common/main.c mark.lo: $(visrcdir)/common/mark.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mark.lo `test -f '$(visrcdir)/common/mark.c' || echo '$(srcdir)/'`$(visrcdir)/common/mark.c msg.lo: $(visrcdir)/common/msg.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o msg.lo `test -f '$(visrcdir)/common/msg.c' || echo '$(srcdir)/'`$(visrcdir)/common/msg.c options.lo: $(visrcdir)/common/options.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o options.lo `test -f '$(visrcdir)/common/options.c' || echo '$(srcdir)/'`$(visrcdir)/common/options.c options_f.lo: $(visrcdir)/common/options_f.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o options_f.lo `test -f '$(visrcdir)/common/options_f.c' || echo '$(srcdir)/'`$(visrcdir)/common/options_f.c put.lo: $(visrcdir)/common/put.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o put.lo `test -f '$(visrcdir)/common/put.c' || echo '$(srcdir)/'`$(visrcdir)/common/put.c recover.lo: $(visrcdir)/common/recover.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o recover.lo `test -f '$(visrcdir)/common/recover.c' || echo '$(srcdir)/'`$(visrcdir)/common/recover.c screen.lo: $(visrcdir)/common/screen.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o screen.lo `test -f '$(visrcdir)/common/screen.c' || echo '$(srcdir)/'`$(visrcdir)/common/screen.c search.lo: $(visrcdir)/common/search.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o search.lo `test -f '$(visrcdir)/common/search.c' || echo '$(srcdir)/'`$(visrcdir)/common/search.c seq.lo: $(visrcdir)/common/seq.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o seq.lo `test -f '$(visrcdir)/common/seq.c' || echo '$(srcdir)/'`$(visrcdir)/common/seq.c trace.lo: $(visrcdir)/common/trace.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o trace.lo `test -f '$(visrcdir)/common/trace.c' || echo '$(srcdir)/'`$(visrcdir)/common/trace.c util.lo: $(visrcdir)/common/util.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util.lo `test -f '$(visrcdir)/common/util.c' || echo '$(srcdir)/'`$(visrcdir)/common/util.c util2.lo: $(visrcdir)/common/util2.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util2.lo `test -f '$(visrcdir)/common/util2.c' || echo '$(srcdir)/'`$(visrcdir)/common/util2.c v_at.lo: $(visrcdir)/vi/v_at.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_at.lo `test -f '$(visrcdir)/vi/v_at.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_at.c v_ch.lo: $(visrcdir)/vi/v_ch.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_ch.lo `test -f '$(visrcdir)/vi/v_ch.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_ch.c v_cmd.lo: $(visrcdir)/vi/v_cmd.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_cmd.lo `test -f '$(visrcdir)/vi/v_cmd.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_cmd.c v_delete.lo: $(visrcdir)/vi/v_delete.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_delete.lo `test -f '$(visrcdir)/vi/v_delete.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_delete.c v_event.lo: $(visrcdir)/vi/v_event.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_event.lo `test -f '$(visrcdir)/vi/v_event.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_event.c v_ex.lo: $(visrcdir)/vi/v_ex.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_ex.lo `test -f '$(visrcdir)/vi/v_ex.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_ex.c v_increment.lo: $(visrcdir)/vi/v_increment.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_increment.lo `test -f '$(visrcdir)/vi/v_increment.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_increment.c v_init.lo: $(visrcdir)/vi/v_init.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_init.lo `test -f '$(visrcdir)/vi/v_init.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_init.c v_itxt.lo: $(visrcdir)/vi/v_itxt.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_itxt.lo `test -f '$(visrcdir)/vi/v_itxt.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_itxt.c v_left.lo: $(visrcdir)/vi/v_left.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_left.lo `test -f '$(visrcdir)/vi/v_left.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_left.c v_mark.lo: $(visrcdir)/vi/v_mark.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_mark.lo `test -f '$(visrcdir)/vi/v_mark.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_mark.c v_match.lo: $(visrcdir)/vi/v_match.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_match.lo `test -f '$(visrcdir)/vi/v_match.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_match.c v_paragraph.lo: $(visrcdir)/vi/v_paragraph.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_paragraph.lo `test -f '$(visrcdir)/vi/v_paragraph.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_paragraph.c v_put.lo: $(visrcdir)/vi/v_put.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_put.lo `test -f '$(visrcdir)/vi/v_put.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_put.c v_redraw.lo: $(visrcdir)/vi/v_redraw.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_redraw.lo `test -f '$(visrcdir)/vi/v_redraw.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_redraw.c v_replace.lo: $(visrcdir)/vi/v_replace.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_replace.lo `test -f '$(visrcdir)/vi/v_replace.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_replace.c v_right.lo: $(visrcdir)/vi/v_right.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_right.lo `test -f '$(visrcdir)/vi/v_right.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_right.c v_screen.lo: $(visrcdir)/vi/v_screen.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_screen.lo `test -f '$(visrcdir)/vi/v_screen.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_screen.c v_scroll.lo: $(visrcdir)/vi/v_scroll.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_scroll.lo `test -f '$(visrcdir)/vi/v_scroll.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_scroll.c v_search.lo: $(visrcdir)/vi/v_search.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_search.lo `test -f '$(visrcdir)/vi/v_search.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_search.c v_section.lo: $(visrcdir)/vi/v_section.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_section.lo `test -f '$(visrcdir)/vi/v_section.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_section.c v_sentence.lo: $(visrcdir)/vi/v_sentence.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_sentence.lo `test -f '$(visrcdir)/vi/v_sentence.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_sentence.c v_status.lo: $(visrcdir)/vi/v_status.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_status.lo `test -f '$(visrcdir)/vi/v_status.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_status.c v_txt.lo: $(visrcdir)/vi/v_txt.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_txt.lo `test -f '$(visrcdir)/vi/v_txt.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_txt.c v_ulcase.lo: $(visrcdir)/vi/v_ulcase.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_ulcase.lo `test -f '$(visrcdir)/vi/v_ulcase.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_ulcase.c v_undo.lo: $(visrcdir)/vi/v_undo.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_undo.lo `test -f '$(visrcdir)/vi/v_undo.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_undo.c v_util.lo: $(visrcdir)/vi/v_util.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_util.lo `test -f '$(visrcdir)/vi/v_util.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_util.c v_word.lo: $(visrcdir)/vi/v_word.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_word.lo `test -f '$(visrcdir)/vi/v_word.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_word.c v_xchar.lo: $(visrcdir)/vi/v_xchar.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_xchar.lo `test -f '$(visrcdir)/vi/v_xchar.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_xchar.c v_yank.lo: $(visrcdir)/vi/v_yank.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_yank.lo `test -f '$(visrcdir)/vi/v_yank.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_yank.c v_z.lo: $(visrcdir)/vi/v_z.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_z.lo `test -f '$(visrcdir)/vi/v_z.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_z.c v_zexit.lo: $(visrcdir)/vi/v_zexit.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o v_zexit.lo `test -f '$(visrcdir)/vi/v_zexit.c' || echo '$(srcdir)/'`$(visrcdir)/vi/v_zexit.c vi.lo: $(visrcdir)/vi/vi.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi.lo `test -f '$(visrcdir)/vi/vi.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vi.c vs_line.lo: $(visrcdir)/vi/vs_line.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_line.lo `test -f '$(visrcdir)/vi/vs_line.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_line.c vs_msg.lo: $(visrcdir)/vi/vs_msg.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_msg.lo `test -f '$(visrcdir)/vi/vs_msg.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_msg.c vs_refresh.lo: $(visrcdir)/vi/vs_refresh.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_refresh.lo `test -f '$(visrcdir)/vi/vs_refresh.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_refresh.c vs_relative.lo: $(visrcdir)/vi/vs_relative.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_relative.lo `test -f '$(visrcdir)/vi/vs_relative.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_relative.c vs_smap.lo: $(visrcdir)/vi/vs_smap.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_smap.lo `test -f '$(visrcdir)/vi/vs_smap.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_smap.c vs_split.lo: $(visrcdir)/vi/vs_split.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vs_split.lo `test -f '$(visrcdir)/vi/vs_split.c' || echo '$(srcdir)/'`$(visrcdir)/vi/vs_split.c regcomp.lo: $(visrcdir)/regex/regcomp.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regcomp.lo `test -f '$(visrcdir)/regex/regcomp.c' || echo '$(srcdir)/'`$(visrcdir)/regex/regcomp.c regerror.lo: $(visrcdir)/regex/regerror.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regerror.lo `test -f '$(visrcdir)/regex/regerror.c' || echo '$(srcdir)/'`$(visrcdir)/regex/regerror.c regexec.lo: $(visrcdir)/regex/regexec.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regexec.lo `test -f '$(visrcdir)/regex/regexec.c' || echo '$(srcdir)/'`$(visrcdir)/regex/regexec.c regfree.lo: $(visrcdir)/regex/regfree.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o regfree.lo `test -f '$(visrcdir)/regex/regfree.c' || echo '$(srcdir)/'`$(visrcdir)/regex/regfree.c dldb.lo: $(visrcdir)/common/dldb.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dldb.lo `test -f '$(visrcdir)/common/dldb.c' || echo '$(srcdir)/'`$(visrcdir)/common/dldb.c log.lo: $(visrcdir)/common/log.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log.lo `test -f '$(visrcdir)/common/log.c' || echo '$(srcdir)/'`$(visrcdir)/common/log.c log4.lo: $(visrcdir)/common/log4.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o log4.lo `test -f '$(visrcdir)/common/log4.c' || echo '$(srcdir)/'`$(visrcdir)/common/log4.c bsearch.lo: $(visrcdir)/clib/bsearch.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bsearch.lo `test -f '$(visrcdir)/clib/bsearch.c' || echo '$(srcdir)/'`$(visrcdir)/clib/bsearch.c env.lo: $(visrcdir)/clib/env.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o env.lo `test -f '$(visrcdir)/clib/env.c' || echo '$(srcdir)/'`$(visrcdir)/clib/env.c gethostname.lo: $(visrcdir)/clib/gethostname.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o gethostname.lo `test -f '$(visrcdir)/clib/gethostname.c' || echo '$(srcdir)/'`$(visrcdir)/clib/gethostname.c iswblank.lo: $(visrcdir)/clib/iswblank.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o iswblank.lo `test -f '$(visrcdir)/clib/iswblank.c' || echo '$(srcdir)/'`$(visrcdir)/clib/iswblank.c memchr.lo: $(visrcdir)/clib/memchr.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memchr.lo `test -f '$(visrcdir)/clib/memchr.c' || echo '$(srcdir)/'`$(visrcdir)/clib/memchr.c memset.lo: $(visrcdir)/clib/memset.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memset.lo `test -f '$(visrcdir)/clib/memset.c' || echo '$(srcdir)/'`$(visrcdir)/clib/memset.c mkstemp.lo: $(visrcdir)/clib/mkstemp.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mkstemp.lo `test -f '$(visrcdir)/clib/mkstemp.c' || echo '$(srcdir)/'`$(visrcdir)/clib/mkstemp.c mmap.lo: $(visrcdir)/clib/mmap.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap.lo `test -f '$(visrcdir)/clib/mmap.c' || echo '$(srcdir)/'`$(visrcdir)/clib/mmap.c snprintf.lo: $(visrcdir)/clib/snprintf.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o snprintf.lo `test -f '$(visrcdir)/clib/snprintf.c' || echo '$(srcdir)/'`$(visrcdir)/clib/snprintf.c strdup.lo: $(visrcdir)/clib/strdup.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strdup.lo `test -f '$(visrcdir)/clib/strdup.c' || echo '$(srcdir)/'`$(visrcdir)/clib/strdup.c strpbrk.lo: $(visrcdir)/clib/strpbrk.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strpbrk.lo `test -f '$(visrcdir)/clib/strpbrk.c' || echo '$(srcdir)/'`$(visrcdir)/clib/strpbrk.c strsep.lo: $(visrcdir)/clib/strsep.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strsep.lo `test -f '$(visrcdir)/clib/strsep.c' || echo '$(srcdir)/'`$(visrcdir)/clib/strsep.c strtol.lo: $(visrcdir)/clib/strtol.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtol.lo `test -f '$(visrcdir)/clib/strtol.c' || echo '$(srcdir)/'`$(visrcdir)/clib/strtol.c strtoul.lo: $(visrcdir)/clib/strtoul.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o strtoul.lo `test -f '$(visrcdir)/clib/strtoul.c' || echo '$(srcdir)/'`$(visrcdir)/clib/strtoul.c vsnprintf.lo: $(visrcdir)/clib/vsnprintf.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vsnprintf.lo `test -f '$(visrcdir)/clib/vsnprintf.c' || echo '$(srcdir)/'`$(visrcdir)/clib/vsnprintf.c pthread.lo: $(visrcdir)/common/pthread.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pthread.lo `test -f '$(visrcdir)/common/pthread.c' || echo '$(srcdir)/'`$(visrcdir)/common/pthread.c vi_auto.lo: $(visrcdir)/common/vi_auto.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi_auto.lo `test -f '$(visrcdir)/common/vi_auto.c' || echo '$(srcdir)/'`$(visrcdir)/common/vi_auto.c vi_rec.lo: $(visrcdir)/common/vi_rec.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi_rec.lo `test -f '$(visrcdir)/common/vi_rec.c' || echo '$(srcdir)/'`$(visrcdir)/common/vi_rec.c perlsfio.lo: $(visrcdir)/perl_api/perlsfio.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o perlsfio.lo `test -f '$(visrcdir)/perl_api/perlsfio.c' || echo '$(srcdir)/'`$(visrcdir)/perl_api/perlsfio.c tcl.lo: $(visrcdir)/tcl_api/tcl.c $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tcl.lo `test -f '$(visrcdir)/tcl_api/tcl.c' || echo '$(srcdir)/'`$(visrcdir)/tcl_api/tcl.c vi-cl_bsd.o: $(visrcdir)/cl/cl_bsd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_bsd.o `test -f '$(visrcdir)/cl/cl_bsd.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_bsd.c vi-cl_bsd.obj: $(visrcdir)/cl/cl_bsd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_bsd.obj `if test -f '$(visrcdir)/cl/cl_bsd.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_bsd.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_bsd.c'; fi` vi-cl_funcs.o: $(visrcdir)/cl/cl_funcs.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_funcs.o `test -f '$(visrcdir)/cl/cl_funcs.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_funcs.c vi-cl_funcs.obj: $(visrcdir)/cl/cl_funcs.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_funcs.obj `if test -f '$(visrcdir)/cl/cl_funcs.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_funcs.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_funcs.c'; fi` vi-cl_main.o: $(visrcdir)/cl/cl_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_main.o `test -f '$(visrcdir)/cl/cl_main.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_main.c vi-cl_main.obj: $(visrcdir)/cl/cl_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_main.obj `if test -f '$(visrcdir)/cl/cl_main.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_main.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_main.c'; fi` vi-cl_read.o: $(visrcdir)/cl/cl_read.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_read.o `test -f '$(visrcdir)/cl/cl_read.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_read.c vi-cl_read.obj: $(visrcdir)/cl/cl_read.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_read.obj `if test -f '$(visrcdir)/cl/cl_read.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_read.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_read.c'; fi` vi-cl_screen.o: $(visrcdir)/cl/cl_screen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_screen.o `test -f '$(visrcdir)/cl/cl_screen.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_screen.c vi-cl_screen.obj: $(visrcdir)/cl/cl_screen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_screen.obj `if test -f '$(visrcdir)/cl/cl_screen.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_screen.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_screen.c'; fi` vi-cl_term.o: $(visrcdir)/cl/cl_term.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_term.o `test -f '$(visrcdir)/cl/cl_term.c' || echo '$(srcdir)/'`$(visrcdir)/cl/cl_term.c vi-cl_term.obj: $(visrcdir)/cl/cl_term.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-cl_term.obj `if test -f '$(visrcdir)/cl/cl_term.c'; then $(CYGPATH_W) '$(visrcdir)/cl/cl_term.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/cl/cl_term.c'; fi` vi-nothread.o: $(visrcdir)/common/nothread.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-nothread.o `test -f '$(visrcdir)/common/nothread.c' || echo '$(srcdir)/'`$(visrcdir)/common/nothread.c vi-nothread.obj: $(visrcdir)/common/nothread.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(vi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vi-nothread.obj `if test -f '$(visrcdir)/common/nothread.c'; then $(CYGPATH_W) '$(visrcdir)/common/nothread.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/common/nothread.c'; fi` vi_gtk-util2.o: $(visrcdir)/common/util2.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-util2.o `test -f '$(visrcdir)/common/util2.c' || echo '$(srcdir)/'`$(visrcdir)/common/util2.c vi_gtk-util2.obj: $(visrcdir)/common/util2.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-util2.obj `if test -f '$(visrcdir)/common/util2.c'; then $(CYGPATH_W) '$(visrcdir)/common/util2.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/common/util2.c'; fi` vi_gtk-ip_run.o: $(visrcdir)/ipc/ip_run.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_run.o `test -f '$(visrcdir)/ipc/ip_run.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_run.c vi_gtk-ip_run.obj: $(visrcdir)/ipc/ip_run.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_run.obj `if test -f '$(visrcdir)/ipc/ip_run.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_run.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_run.c'; fi` vi_gtk-ip_send.o: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_send.o `test -f '$(visrcdir)/ipc/ip_send.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_send.c vi_gtk-ip_send.obj: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_send.obj `if test -f '$(visrcdir)/ipc/ip_send.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_send.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_send.c'; fi` vi_gtk-ip_trans.o: $(visrcdir)/ipc/ip_trans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_trans.o `test -f '$(visrcdir)/ipc/ip_trans.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_trans.c vi_gtk-ip_trans.obj: $(visrcdir)/ipc/ip_trans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ip_trans.obj `if test -f '$(visrcdir)/ipc/ip_trans.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_trans.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_trans.c'; fi` vi_gtk-ipc_cmd.o: $(visrcdir)/ipc/ipc_cmd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ipc_cmd.o `test -f '$(visrcdir)/ipc/ipc_cmd.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ipc_cmd.c vi_gtk-ipc_cmd.obj: $(visrcdir)/ipc/ipc_cmd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ipc_cmd.obj `if test -f '$(visrcdir)/ipc/ipc_cmd.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ipc_cmd.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ipc_cmd.c'; fi` vi_gtk-ipc_method.o: $(visrcdir)/ipc/ipc_method.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ipc_method.o `test -f '$(visrcdir)/ipc/ipc_method.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ipc_method.c vi_gtk-ipc_method.obj: $(visrcdir)/ipc/ipc_method.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-ipc_method.obj `if test -f '$(visrcdir)/ipc/ipc_method.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ipc_method.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ipc_method.c'; fi` vi_gtk-gtk_main.o: $(visrcdir)/gtk/gtk_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtk_main.o `test -f '$(visrcdir)/gtk/gtk_main.c' || echo '$(srcdir)/'`$(visrcdir)/gtk/gtk_main.c vi_gtk-gtk_main.obj: $(visrcdir)/gtk/gtk_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtk_main.obj `if test -f '$(visrcdir)/gtk/gtk_main.c'; then $(CYGPATH_W) '$(visrcdir)/gtk/gtk_main.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/gtk/gtk_main.c'; fi` vi_gtk-gtkvi.o: $(visrcdir)/gtk/gtkvi.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkvi.o `test -f '$(visrcdir)/gtk/gtkvi.c' || echo '$(srcdir)/'`$(visrcdir)/gtk/gtkvi.c vi_gtk-gtkvi.obj: $(visrcdir)/gtk/gtkvi.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkvi.obj `if test -f '$(visrcdir)/gtk/gtkvi.c'; then $(CYGPATH_W) '$(visrcdir)/gtk/gtkvi.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/gtk/gtkvi.c'; fi` vi_gtk-gtkviscreen.o: $(visrcdir)/gtk/gtkviscreen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkviscreen.o `test -f '$(visrcdir)/gtk/gtkviscreen.c' || echo '$(srcdir)/'`$(visrcdir)/gtk/gtkviscreen.c vi_gtk-gtkviscreen.obj: $(visrcdir)/gtk/gtkviscreen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkviscreen.obj `if test -f '$(visrcdir)/gtk/gtkviscreen.c'; then $(CYGPATH_W) '$(visrcdir)/gtk/gtkviscreen.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/gtk/gtkviscreen.c'; fi` vi_gtk-gtkviwindow.o: $(visrcdir)/gtk/gtkviwindow.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkviwindow.o `test -f '$(visrcdir)/gtk/gtkviwindow.c' || echo '$(srcdir)/'`$(visrcdir)/gtk/gtkviwindow.c vi_gtk-gtkviwindow.obj: $(visrcdir)/gtk/gtkviwindow.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_gtk_CFLAGS) $(CFLAGS) -c -o vi_gtk-gtkviwindow.obj `if test -f '$(visrcdir)/gtk/gtkviwindow.c'; then $(CYGPATH_W) '$(visrcdir)/gtk/gtkviwindow.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/gtk/gtkviwindow.c'; fi` ip_funcs.o: $(visrcdir)/ip/ip_funcs.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_funcs.o `test -f '$(visrcdir)/ip/ip_funcs.c' || echo '$(srcdir)/'`$(visrcdir)/ip/ip_funcs.c ip_funcs.obj: $(visrcdir)/ip/ip_funcs.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_funcs.obj `if test -f '$(visrcdir)/ip/ip_funcs.c'; then $(CYGPATH_W) '$(visrcdir)/ip/ip_funcs.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ip/ip_funcs.c'; fi` ip_main.o: $(visrcdir)/ip/ip_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_main.o `test -f '$(visrcdir)/ip/ip_main.c' || echo '$(srcdir)/'`$(visrcdir)/ip/ip_main.c ip_main.obj: $(visrcdir)/ip/ip_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_main.obj `if test -f '$(visrcdir)/ip/ip_main.c'; then $(CYGPATH_W) '$(visrcdir)/ip/ip_main.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ip/ip_main.c'; fi` ip_read.o: $(visrcdir)/ip/ip_read.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_read.o `test -f '$(visrcdir)/ip/ip_read.c' || echo '$(srcdir)/'`$(visrcdir)/ip/ip_read.c ip_read.obj: $(visrcdir)/ip/ip_read.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_read.obj `if test -f '$(visrcdir)/ip/ip_read.c'; then $(CYGPATH_W) '$(visrcdir)/ip/ip_read.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ip/ip_read.c'; fi` ip_screen.o: $(visrcdir)/ip/ip_screen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_screen.o `test -f '$(visrcdir)/ip/ip_screen.c' || echo '$(srcdir)/'`$(visrcdir)/ip/ip_screen.c ip_screen.obj: $(visrcdir)/ip/ip_screen.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_screen.obj `if test -f '$(visrcdir)/ip/ip_screen.c'; then $(CYGPATH_W) '$(visrcdir)/ip/ip_screen.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ip/ip_screen.c'; fi` ip_send.o: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_send.o `test -f '$(visrcdir)/ipc/ip_send.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_send.c ip_send.obj: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_send.obj `if test -f '$(visrcdir)/ipc/ip_send.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_send.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_send.c'; fi` ip_term.o: $(visrcdir)/ip/ip_term.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_term.o `test -f '$(visrcdir)/ip/ip_term.c' || echo '$(srcdir)/'`$(visrcdir)/ip/ip_term.c ip_term.obj: $(visrcdir)/ip/ip_term.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ip_term.obj `if test -f '$(visrcdir)/ip/ip_term.c'; then $(CYGPATH_W) '$(visrcdir)/ip/ip_term.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ip/ip_term.c'; fi` vi_motif-ip_run.o: $(visrcdir)/ipc/ip_run.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_run.o `test -f '$(visrcdir)/ipc/ip_run.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_run.c vi_motif-ip_run.obj: $(visrcdir)/ipc/ip_run.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_run.obj `if test -f '$(visrcdir)/ipc/ip_run.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_run.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_run.c'; fi` vi_motif-ip_send.o: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_send.o `test -f '$(visrcdir)/ipc/ip_send.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_send.c vi_motif-ip_send.obj: $(visrcdir)/ipc/ip_send.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_send.obj `if test -f '$(visrcdir)/ipc/ip_send.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_send.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_send.c'; fi` vi_motif-ip_trans.o: $(visrcdir)/ipc/ip_trans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_trans.o `test -f '$(visrcdir)/ipc/ip_trans.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ip_trans.c vi_motif-ip_trans.obj: $(visrcdir)/ipc/ip_trans.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ip_trans.obj `if test -f '$(visrcdir)/ipc/ip_trans.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ip_trans.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ip_trans.c'; fi` vi_motif-ipc_cmd.o: $(visrcdir)/ipc/ipc_cmd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ipc_cmd.o `test -f '$(visrcdir)/ipc/ipc_cmd.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ipc_cmd.c vi_motif-ipc_cmd.obj: $(visrcdir)/ipc/ipc_cmd.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ipc_cmd.obj `if test -f '$(visrcdir)/ipc/ipc_cmd.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ipc_cmd.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ipc_cmd.c'; fi` vi_motif-ipc_method.o: $(visrcdir)/ipc/ipc_method.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ipc_method.o `test -f '$(visrcdir)/ipc/ipc_method.c' || echo '$(srcdir)/'`$(visrcdir)/ipc/ipc_method.c vi_motif-ipc_method.obj: $(visrcdir)/ipc/ipc_method.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-ipc_method.obj `if test -f '$(visrcdir)/ipc/ipc_method.c'; then $(CYGPATH_W) '$(visrcdir)/ipc/ipc_method.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/ipc/ipc_method.c'; fi` vi_motif-m_main.o: $(visrcdir)/motif/m_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_main.o `test -f '$(visrcdir)/motif/m_main.c' || echo '$(srcdir)/'`$(visrcdir)/motif/m_main.c vi_motif-m_main.obj: $(visrcdir)/motif/m_main.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_main.obj `if test -f '$(visrcdir)/motif/m_main.c'; then $(CYGPATH_W) '$(visrcdir)/motif/m_main.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif/m_main.c'; fi` vi_motif-m_cde.o: $(visrcdir)/motif/m_cde.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_cde.o `test -f '$(visrcdir)/motif/m_cde.c' || echo '$(srcdir)/'`$(visrcdir)/motif/m_cde.c vi_motif-m_cde.obj: $(visrcdir)/motif/m_cde.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_cde.obj `if test -f '$(visrcdir)/motif/m_cde.c'; then $(CYGPATH_W) '$(visrcdir)/motif/m_cde.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif/m_cde.c'; fi` vi_motif-trace.o: $(visrcdir)/common/trace.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-trace.o `test -f '$(visrcdir)/common/trace.c' || echo '$(srcdir)/'`$(visrcdir)/common/trace.c vi_motif-trace.obj: $(visrcdir)/common/trace.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-trace.obj `if test -f '$(visrcdir)/common/trace.c'; then $(CYGPATH_W) '$(visrcdir)/common/trace.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/common/trace.c'; fi` vi_motif-m_copypaste.o: $(visrcdir)/motif_l/m_copypaste.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_copypaste.o `test -f '$(visrcdir)/motif_l/m_copypaste.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_copypaste.c vi_motif-m_copypaste.obj: $(visrcdir)/motif_l/m_copypaste.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_copypaste.obj `if test -f '$(visrcdir)/motif_l/m_copypaste.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_copypaste.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_copypaste.c'; fi` vi_motif-m_func.o: $(visrcdir)/motif_l/m_func.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_func.o `test -f '$(visrcdir)/motif_l/m_func.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_func.c vi_motif-m_func.obj: $(visrcdir)/motif_l/m_func.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_func.obj `if test -f '$(visrcdir)/motif_l/m_func.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_func.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_func.c'; fi` vi_motif-m_menu.o: $(visrcdir)/motif_l/m_menu.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_menu.o `test -f '$(visrcdir)/motif_l/m_menu.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_menu.c vi_motif-m_menu.obj: $(visrcdir)/motif_l/m_menu.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_menu.obj `if test -f '$(visrcdir)/motif_l/m_menu.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_menu.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_menu.c'; fi` vi_motif-m_options.o: $(visrcdir)/motif_l/m_options.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_options.o `test -f '$(visrcdir)/motif_l/m_options.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_options.c vi_motif-m_options.obj: $(visrcdir)/motif_l/m_options.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_options.obj `if test -f '$(visrcdir)/motif_l/m_options.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_options.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_options.c'; fi` vi_motif-m_prompt.o: $(visrcdir)/motif_l/m_prompt.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_prompt.o `test -f '$(visrcdir)/motif_l/m_prompt.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_prompt.c vi_motif-m_prompt.obj: $(visrcdir)/motif_l/m_prompt.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_prompt.obj `if test -f '$(visrcdir)/motif_l/m_prompt.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_prompt.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_prompt.c'; fi` vi_motif-m_ruler.o: $(visrcdir)/motif_l/m_ruler.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_ruler.o `test -f '$(visrcdir)/motif_l/m_ruler.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_ruler.c vi_motif-m_ruler.obj: $(visrcdir)/motif_l/m_ruler.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_ruler.obj `if test -f '$(visrcdir)/motif_l/m_ruler.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_ruler.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_ruler.c'; fi` vi_motif-m_search.o: $(visrcdir)/motif_l/m_search.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_search.o `test -f '$(visrcdir)/motif_l/m_search.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_search.c vi_motif-m_search.obj: $(visrcdir)/motif_l/m_search.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_search.obj `if test -f '$(visrcdir)/motif_l/m_search.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_search.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_search.c'; fi` vi_motif-m_tags.o: $(visrcdir)/motif_l/m_tags.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_tags.o `test -f '$(visrcdir)/motif_l/m_tags.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_tags.c vi_motif-m_tags.obj: $(visrcdir)/motif_l/m_tags.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_tags.obj `if test -f '$(visrcdir)/motif_l/m_tags.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_tags.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_tags.c'; fi` vi_motif-m_util.o: $(visrcdir)/motif_l/m_util.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_util.o `test -f '$(visrcdir)/motif_l/m_util.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_util.c vi_motif-m_util.obj: $(visrcdir)/motif_l/m_util.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_util.obj `if test -f '$(visrcdir)/motif_l/m_util.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_util.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_util.c'; fi` vi_motif-m_vi.o: $(visrcdir)/motif_l/m_vi.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_vi.o `test -f '$(visrcdir)/motif_l/m_vi.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/m_vi.c vi_motif-m_vi.obj: $(visrcdir)/motif_l/m_vi.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-m_vi.obj `if test -f '$(visrcdir)/motif_l/m_vi.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/m_vi.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/m_vi.c'; fi` vi_motif-xtabbed.o: $(visrcdir)/motif_l/xtabbed.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-xtabbed.o `test -f '$(visrcdir)/motif_l/xtabbed.c' || echo '$(srcdir)/'`$(visrcdir)/motif_l/xtabbed.c vi_motif-xtabbed.obj: $(visrcdir)/motif_l/xtabbed.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(vi_motif_CFLAGS) $(CFLAGS) -c -o vi_motif-xtabbed.obj `if test -f '$(visrcdir)/motif_l/xtabbed.c'; then $(CYGPATH_W) '$(visrcdir)/motif_l/xtabbed.c'; else $(CYGPATH_W) '$(srcdir)/$(visrcdir)/motif_l/xtabbed.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d $(distdir) || mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-exec-am: install-binPROGRAMS install-exec-local \ install-libLTLIBRARIES install-html: install-html-am install-info: install-info-am install-man: install-pdf: install-pdf-am install-ps: install-ps-am installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES \ uninstall-local .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-exec-local install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-libLTLIBRARIES uninstall-local perl.c: $(visrcdir)/perl_api/perl.xs $(visrcdir)/perl_api/typemap echo "#define _PATH_PERLSCRIPTS \"$(datadir)/vi/perl\"" > $@ $(PERL) -e 'unless ($$] >= 5.005) {' \ -e 'for (qw(incgv sv_undef errgv na)) {' \ -e 'print "#define PL_$$_ $$_\n" }} ' >> $@ $(PERL) $(PERLLIB)/ExtUtils/xsubpp -typemap \ $(PERLLIB)/ExtUtils/typemap $(visrcdir)/perl_api/perl.xs >> $@ ($(PERL) -ne 'print "sub $$1 {\$$curscr->$$1(\@_)}\n"' \ -e 'if /newXS\("VI::([^\":]*)"/;' $@ ; echo "1;") > VI.pm perlxsi.c: perl -MExtUtils::Embed -e xsinit -- -std VI install-exec-local: cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(ln) \ `echo vi | sed '$(transform)'` `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(ln) \ `echo vi | sed '$(transform)'` `echo view | sed '$(transform)'` install-data-local: install_common @[ -d $(DESTDIR)$(mandir) ] || \ ($(mkdir) $(DESTDIR)$(mandir) && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)) @[ -d $(DESTDIR)$(mandir)/cat1 ] || \ ($(mkdir) $(DESTDIR)$(mandir)/cat1 && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)/cat1) @echo "Installing man pages: $(DESTDIR)$(mandir) ..." @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo vi.0 | sed '$(transform)'` @$(cp) $(visrcdir)/docs/vi.man/vi.0 \ $(DESTDIR)$(mandir)/cat1/`echo vi.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(chmod) $(fmode) `echo vi.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo ex.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo view.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \ `echo vi.0 | sed '$(transform)'` `echo ex.0 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/cat1 && $(ln) \ `echo vi.0 | sed '$(transform)'` `echo view.0 | sed '$(transform)'` @[ -d $(DESTDIR)$(mandir)/man1 ] || \ ($(mkdir) $(DESTDIR)$(mandir)/man1 && \ $(chmod) $(dmode) $(DESTDIR)$(mandir)/man1) @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo vi.1 | sed '$(transform)'` @$(cp) $(visrcdir)/docs/vi.man/vi.1 \ $(DESTDIR)$(mandir)/man1/`echo vi.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(chmod) $(fmode) `echo vi.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo ex.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo view.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && $(ln) \ `echo vi.1 | sed '$(transform)'` `echo ex.1 | sed '$(transform)'` @cd $(DESTDIR)$(mandir)/man1 && $(ln) \ `echo vi.1 | sed '$(transform)'` `echo view.1 | sed '$(transform)'` install_common: @[ -f $(chmod) ] || (echo 'chmod not found.'; exit 1) @[ -f $(cp) ] || (echo 'cp not found.'; exit 1) @[ -f $(ln) ] || (echo 'ln not found.'; exit 1) @[ -f $(mkdir) ] || (echo 'mkdir not found.'; exit 1) @[ -f $(rm) ] || (echo 'rm not found.'; exit 1) @[ -d $(DESTDIR)$(prefix) ] || \ ($(mkdir) $(DESTDIR)$(prefix) && \ $(chmod) $(dmode) $(DESTDIR)$(prefix)) @[ -d $(DESTDIR)$(exec_prefix) ] || \ ($(mkdir) $(DESTDIR)$(exec_prefix) && \ $(chmod) $(dmode) $(DESTDIR)$(exec_prefix)) @[ -d $(DESTDIR)$(datadir) ] || \ ($(mkdir) $(DESTDIR)$(datadir) && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)) @$(rm) -rf $(DESTDIR)$(datadir)/vi @$(mkdir) $(DESTDIR)$(datadir)/vi && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi @echo "Installing message catalogs: $(datadir)/vi/catalog ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/catalog && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/catalog @(cd $(visrcdir)/catalog && \ $(cp) $(cat) $(DESTDIR)$(datadir)/vi/catalog && \ cd $(DESTDIR)$(datadir)/vi/catalog && $(chmod) $(fmode) *) @echo "Installing Perl scripts: $(datadir)/vi/perl ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/perl && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/perl @[ ! -f VI.pm ] || \ ($(cp) VI.pm $(DESTDIR)$(datadir)/vi/perl && \ (cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) VI.pm)) @(cd $(visrcdir)/perl_scripts && \ $(cp) *.pl $(DESTDIR)$(datadir)/vi/perl && \ cd $(DESTDIR)$(datadir)/vi/perl && $(chmod) $(fmode) *.pl) @echo "Installing Tcl scripts: $(datadir)/vi/tcl ..." @$(mkdir) $(DESTDIR)$(datadir)/vi/tcl && \ $(chmod) $(dmode) $(DESTDIR)$(datadir)/vi/tcl @(cd $(visrcdir)/tcl_scripts && \ $(cp) *.tcl $(DESTDIR)$(datadir)/vi/tcl && \ cd $(DESTDIR)$(datadir)/vi/tcl && $(chmod) $(fmode) *.tcl) @echo "Installing recover script: $(datadir)/vi/recover ..." @($(cp) recover $(DESTDIR)$(datadir)/vi/recover && \ $(chmod) $(emode) $(DESTDIR)$(datadir)/vi/recover) uninstall-local: $(rm) -rf $(DESTDIR)$(datadir)/vi cd $(DESTDIR)$(bindir) && $(rm) -f `echo ex | sed '$(transform)'` cd $(DESTDIR)$(bindir) && $(rm) -f `echo view | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo ex.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo vi.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/cat1 && \ $(rm) -f `echo view.0 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo ex.1 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo vi.1 | sed '$(transform)'` cd $(DESTDIR)$(mandir)/man1 && \ $(rm) -f `echo view.1 | sed '$(transform)'` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: nvi-1.81.6/dist/configure0100555000076400001440000347333610720065712014344 0ustar skimousers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="../common/main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA am__isrc CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED GREP EGREP LN_S ECHO AR RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL OPTFLAG no_op_OPTFLAG vi_cv_path_shell vi_cv_path_sendmail vi_cv_path_perl vi_cv_path_preserve vi_cv_path_fuser vi_cv_path_lsof INUSE vi_cv_path_ar vi_cv_path_chmod vi_cv_path_cp vi_cv_path_ln vi_cv_path_mkdir vi_cv_path_rm vi_cv_path_ranlib vi_cv_path_strip XMKMF XINCS LIBOBJS vi_programs vi_ipc GTKLIBS GTKINCS PKG_CONFIG GTK_CONFIG GTK_CFLAGS GTK_LIBS MOTIFLIBS IPCOBJS shrpenv perlldflags perllibs vi_cv_perllib CURSLIBS CURSCPPFLAGS CURSLDFLAGS HAVE_NCURSESW u_char_decl u_short_decl u_int_decl u_long_decl u_int8_decl u_int16_decl int16_decl u_int32_decl int32_decl NEED_FPRINTF_PROTO dl_src vi_cv_path_db3 LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Build a debugging version. --disable-runpath Don't record path of libraries in binary. --enable-trace Build a tracing version. --enable-widechar Build a wide char aware vi. --enable-gtk Build a Gtk front-end for vi. --disable-gtktest Do not try to compile and run a test GTK program --enable-motif Build a Motif front-end for vi. --enable-threads Turn on thread support. --enable-perlinterp Include a Perl interpreter in vi. --enable-tclinterp Include a Tk/Tcl interpreter in vi. --enable-dynamic-loading Load DB 3 dynamically. --enable-db4-logging Enable experimental/broken db4 logging. --disable-re DON'T use the nvi-provided RE routines. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-x use the X Window System --with-gtk-prefix=PFX Prefix where GTK is installed (optional) --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional) --with-curses=DIR Path to curses installation. --with-db=bundled|system Which db to use. --with-db-prefix=PFX Path to db installation. --with-db-build=prefix Path to db build. Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.10' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. test -d ./--version && rmdir ./--version MKDIR_P="$ac_install_sh -d" fi fi { echo "$as_me:$LINENO: result: $MKDIR_P" >&5 echo "${ECHO_T}$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=vi VERSION=1.81.6 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4459 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7196: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7200: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7486: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7490: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7590: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7594: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12459: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12463: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12563: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12567: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14125: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14129: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14229: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14233: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16416: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16420: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16706: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16710: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16810: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16814: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion { echo "$as_me:$LINENO: checking if --enable-debug option specified" >&5 echo $ECHO_N "checking if --enable-debug option specified... $ECHO_C" >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; vi_cv_debug=$enableval else vi_cv_debug="no" fi { echo "$as_me:$LINENO: result: $vi_cv_debug" >&5 echo "${ECHO_T}$vi_cv_debug" >&6; } if test "$vi_cv_debug" = yes; then cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF OPTFLAG=${OPTFLAG-"-g"} no_op_OPTFLAG=${no_op_OPTFLAG-"-g"} fi case "$host_os" in aix3.2.5) OPTFLAG=${OPTFLAG-"-O"};; aix4.1*) CFLAGS=${CFLAGS-"-qstrict"} OPTFLAG=${OPTFLAG-"-O3"};; aux*) CPPFLAGS=${CPPFLAGS-"-ZP -D_BSD_SOURCE -D_SYSV_SOURCE -D_AUX_SOURCE"} LDFLAGS=${LDFLAGS-"-ZP"} OPTFLAG=${OPTFLAG-"-O"};; bsd4.4) OPTFLAG=${OPTFLAG-"-O2"};; bsdi*) CC=${CC-"shlicc"} OPTFLAG=${OPTFLAG-"-O2"};; irix6*) OPTFLAG=${OPTFLAG-"-O2"};; irix*) OPTFLAG=${OPTFLAG-"-O2"};; lynxos*) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for GNU C (gcc) version 2.x" >&5 echo $ECHO_N "checking for GNU C (gcc) version 2.x... $ECHO_C" >&6; } ac_cv_gcc_vers=`${CC-cc} -v 2>&1 | \ grep "gcc version " | sed 's/.*version //'` ac_cv_gcc_major=`echo "$ac_cv_gcc_vers" | sed 's/\..*//'` if test "$ac_cv_gcc_major" = "2" ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } { echo "$as_me:$LINENO: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&5 echo "$as_me: WARNING: Nvi requires gcc 2.x to build on LynxOS." >&2;} { { echo "$as_me:$LINENO: error: See build/README.LynxOS for more information." >&5 echo "$as_me: error: See build/README.LynxOS for more information." >&2;} { (exit 1); exit 1; }; } fi;; nextstep3) CPPFLAGS=${CPPFLAGS-"-w -pipe -posix"} LDFLAGS=${LDFLAGS-"-posix"} OPTFLAG=${OPTFLAG-"-O2"};; osf*) CFLAGS=${CFLAGS-"-Olimit 1000"};; solaris*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; sunos*) no_op_OPTFLAG=${no_op_OPTFLAG-""};; esac OPTFLAG=${OPTFLAG-"-O"} CC=${CC-cc} CFLAGS=${CFLAGS-""} ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "$GCC" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_GCC 1 _ACEOF fi no_op_OPTFLAG=${no_op_OPTFLAG-"$OPTFLAG"} case "$host_os" in bsdi2.1) LIBS=${LIBS-"-lipc"};; dgux*) LIBS=${LIBS-"-ldgc"};; irix6*) LIBS=${LIBS-"-lbsd"};; irix*) LIBS=${LIBS-"-lc_s -lbsd"};; isc*) LIBS=${LIBS-"-lcposix -linet"};; netbsd1*) LIBS=${LIBS-"-lcrypt"};; ptx*) LIBS=${LIBS-"-lseq -linet -lsocket"};; sco3.2*) LIBS=${LIBS-"-lsocket"};; sinix*) LIBS=${LIBS-"-lelf -lc"};; solaris*) LIBS=${LIBS-"-lsocket -lnsl -ldl"};; wgs*) LIBS=${LIBS-"-lnsl"};; esac case "$host_os" in aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; esac case "$host_os" in ultrix*) cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_VDISABLE 1 _ACEOF ;; esac { echo "$as_me:$LINENO: checking whether recording of pathnames of libraries is enabled" >&5 echo $ECHO_N "checking whether recording of pathnames of libraries is enabled... $ECHO_C" >&6; } # Check whether --enable-runpath was given. if test "${enable_runpath+set}" = set; then enableval=$enable_runpath; vi_cv_runpath="$enableval" else vi_cv_runpath="yes" fi { echo "$as_me:$LINENO: result: $vi_cv_runpath" >&5 echo "${ECHO_T}$vi_cv_runpath" >&6; } if test "X$vi_cv_runpath" = "Xyes"; then LRscript='s/^\(.*\)/-R\1 -L\1 /' else LRscript='s/^\(.*\)/-L\1 /' fi { echo "$as_me:$LINENO: checking if --enable-trace option specified" >&5 echo $ECHO_N "checking if --enable-trace option specified... $ECHO_C" >&6; } # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then enableval=$enable_trace; vi_cv_trace="yes" else vi_cv_trace="no" fi if test "$vi_cv_trace" = yes; then CPPFLAGS="-DTRACE $CPPFLAGS" fi { echo "$as_me:$LINENO: result: $vi_cv_trace" >&5 echo "${ECHO_T}$vi_cv_trace" >&6; } CPPFLAGS="$ADDCPPFLAGS $CPPFLAGS" LDFLAGS="$ADDLDFLAGS $LDFLAGS" LIBS="$ADDLIBS $LIBS" PATH="$PATH:/usr/bin:/usr/sbin:/sbin:/etc:/usr/etc:/usr/lib:/usr/ucblib" # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_shell+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_shell in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_shell="$vi_cv_path_shell" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_shell="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_shell" && ac_cv_path_vi_cv_path_shell="no" ;; esac fi vi_cv_path_shell=$ac_cv_path_vi_cv_path_shell if test -n "$vi_cv_path_shell"; then { echo "$as_me:$LINENO: result: $vi_cv_path_shell" >&5 echo "${ECHO_T}$vi_cv_path_shell" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_shell" = no; then { { echo "$as_me:$LINENO: error: No shell utility found." >&5 echo "$as_me: error: No shell utility found." >&2;} { (exit 1); exit 1; }; } fi # Extract the first word of "sendmail", so it can be a program name with args. set dummy sendmail; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_sendmail+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_sendmail in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_sendmail="$vi_cv_path_sendmail" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_sendmail="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_sendmail" && ac_cv_path_vi_cv_path_sendmail="no" ;; esac fi vi_cv_path_sendmail=$ac_cv_path_vi_cv_path_sendmail if test -n "$vi_cv_path_sendmail"; then { echo "$as_me:$LINENO: result: $vi_cv_path_sendmail" >&5 echo "${ECHO_T}$vi_cv_path_sendmail" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_sendmail" = no; then { echo "$as_me:$LINENO: WARNING: No sendmail utility found;" >&5 echo "$as_me: WARNING: No sendmail utility found;" >&2;} { echo "$as_me:$LINENO: WARNING: users will not be told of saved files." >&5 echo "$as_me: WARNING: users will not be told of saved files." >&2;} fi for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_perl+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_perl in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_perl="$vi_cv_path_perl" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_perl="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi vi_cv_path_perl=$ac_cv_path_vi_cv_path_perl if test -n "$vi_cv_path_perl"; then { echo "$as_me:$LINENO: result: $vi_cv_path_perl" >&5 echo "${ECHO_T}$vi_cv_path_perl" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$vi_cv_path_perl" && break done test -n "$vi_cv_path_perl" || vi_cv_path_perl="no" { echo "$as_me:$LINENO: checking for preserve directory" >&5 echo $ECHO_N "checking for preserve directory... $ECHO_C" >&6; } if test "${vi_cv_path_preserve+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else dirlist="/var/preserve /var/tmp /usr/tmp" vi_cv_path_preserve=no for i in $dirlist; do if test -d $i/vi.recover; then vi_cv_path_preserve=$i/vi.recover break; fi done if test "$vi_cv_path_preserve" = no; then for i in $dirlist; do if test -d $i -a -w $i; then vi_cv_path_preserve=$i/vi.recover break; fi done fi fi if test "$vi_cv_path_preserve" = no; then { { echo "$as_me:$LINENO: error: No writeable preserve directory found." >&5 echo "$as_me: error: No writeable preserve directory found." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_path_preserve" >&5 echo "${ECHO_T}$vi_cv_path_preserve" >&6; } # Extract the first word of "fuser", so it can be a program name with args. set dummy fuser; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_fuser+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_fuser in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_fuser="$vi_cv_path_fuser" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_fuser="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_fuser" && ac_cv_path_vi_cv_path_fuser="no" ;; esac fi vi_cv_path_fuser=$ac_cv_path_vi_cv_path_fuser if test -n "$vi_cv_path_fuser"; then { echo "$as_me:$LINENO: result: $vi_cv_path_fuser" >&5 echo "${ECHO_T}$vi_cv_path_fuser" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "lsof", so it can be a program name with args. set dummy lsof; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_lsof+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_lsof in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_lsof="$vi_cv_path_lsof" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_lsof="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_lsof" && ac_cv_path_vi_cv_path_lsof="no" ;; esac fi vi_cv_path_lsof=$ac_cv_path_vi_cv_path_lsof if test -n "$vi_cv_path_lsof"; then { echo "$as_me:$LINENO: result: $vi_cv_path_lsof" >&5 echo "${ECHO_T}$vi_cv_path_lsof" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi INUSE="" if test "$vi_cv_path_lsof" != no; then INUSE='test `lsof -t $i`' fi if test "$vi_cv_path_fuser" != no; then INUSE='fuser -s $i' fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ar in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ar="$vi_cv_path_ar" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ar="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ar" && ac_cv_path_vi_cv_path_ar="missing_ar" ;; esac fi vi_cv_path_ar=$ac_cv_path_vi_cv_path_ar if test -n "$vi_cv_path_ar"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ar" >&5 echo "${ECHO_T}$vi_cv_path_ar" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "chmod", so it can be a program name with args. set dummy chmod; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_chmod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_chmod in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_chmod="$vi_cv_path_chmod" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_chmod="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_chmod" && ac_cv_path_vi_cv_path_chmod="missing_chmod" ;; esac fi vi_cv_path_chmod=$ac_cv_path_vi_cv_path_chmod if test -n "$vi_cv_path_chmod"; then { echo "$as_me:$LINENO: result: $vi_cv_path_chmod" >&5 echo "${ECHO_T}$vi_cv_path_chmod" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_cp+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_cp in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_cp="$vi_cv_path_cp" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_cp="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_cp" && ac_cv_path_vi_cv_path_cp="missing_cp" ;; esac fi vi_cv_path_cp=$ac_cv_path_vi_cv_path_cp if test -n "$vi_cv_path_cp"; then { echo "$as_me:$LINENO: result: $vi_cv_path_cp" >&5 echo "${ECHO_T}$vi_cv_path_cp" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ln+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ln in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ln="$vi_cv_path_ln" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ln="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ln" && ac_cv_path_vi_cv_path_ln="missing_ln" ;; esac fi vi_cv_path_ln=$ac_cv_path_vi_cv_path_ln if test -n "$vi_cv_path_ln"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ln" >&5 echo "${ECHO_T}$vi_cv_path_ln" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_mkdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_mkdir in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_mkdir="$vi_cv_path_mkdir" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_mkdir="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_mkdir" && ac_cv_path_vi_cv_path_mkdir="missing_mkdir" ;; esac fi vi_cv_path_mkdir=$ac_cv_path_vi_cv_path_mkdir if test -n "$vi_cv_path_mkdir"; then { echo "$as_me:$LINENO: result: $vi_cv_path_mkdir" >&5 echo "${ECHO_T}$vi_cv_path_mkdir" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_rm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_rm in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_rm="$vi_cv_path_rm" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_rm="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_rm" && ac_cv_path_vi_cv_path_rm="missing_rm" ;; esac fi vi_cv_path_rm=$ac_cv_path_vi_cv_path_rm if test -n "$vi_cv_path_rm"; then { echo "$as_me:$LINENO: result: $vi_cv_path_rm" >&5 echo "${ECHO_T}$vi_cv_path_rm" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_ranlib+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_ranlib in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_ranlib="$vi_cv_path_ranlib" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_ranlib="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_ranlib" && ac_cv_path_vi_cv_path_ranlib="missing_ranlib" ;; esac fi vi_cv_path_ranlib=$ac_cv_path_vi_cv_path_ranlib if test -n "$vi_cv_path_ranlib"; then { echo "$as_me:$LINENO: result: $vi_cv_path_ranlib" >&5 echo "${ECHO_T}$vi_cv_path_ranlib" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_strip+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_strip in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_strip="$vi_cv_path_strip" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_strip="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_strip" && ac_cv_path_vi_cv_path_strip="missing_strip" ;; esac fi vi_cv_path_strip=$ac_cv_path_vi_cv_path_strip if test -n "$vi_cv_path_strip"; then { echo "$as_me:$LINENO: result: $vi_cv_path_strip" >&5 echo "${ECHO_T}$vi_cv_path_strip" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking for X" >&5 echo $ECHO_N "checking for X... $ECHO_C" >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 echo "$as_me: error: Cannot use X directory names containing '" >&2;} { (exit 1); exit 1; }; };; #( *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # We can compile using X headers with no special include directory. ac_x_includes= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { echo "$as_me:$LINENO: result: $have_x" >&5 echo "${ECHO_T}$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" != yes; then if test "X$x_libraries" != "X"; then XLIBS="`echo $x_libraries | sed "$LRscript"` $XLIBS" fi XLIBS="$XLIBS -lX11" if test "X$x_includes" != "X"; then XINCS="-I$x_includes" fi fi { echo "$as_me:$LINENO: checking if --enable-widechar option specified" >&5 echo $ECHO_N "checking if --enable-widechar option specified... $ECHO_C" >&6; } # Check whether --enable-widechar was given. if test "${enable_widechar+set}" = set; then enableval=$enable_widechar; vi_cv_widechar=$enableval else vi_cv_widechar="no" fi if test "$vi_cv_widechar" = "yes"; then cat >>confdefs.h <<\_ACEOF #define USE_WIDECHAR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_widechar" >&5 echo "${ECHO_T}$vi_cv_widechar" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking langinfo.h usability" >&5 echo $ECHO_N "checking langinfo.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking langinfo.h presence" >&5 echo $ECHO_N "checking langinfo.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: langinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: langinfo.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: langinfo.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: langinfo.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: langinfo.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: langinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: langinfo.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: langinfo.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: langinfo.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for langinfo.h" >&5 echo $ECHO_N "checking for langinfo.h... $ECHO_C" >&6; } if test "${ac_cv_header_langinfo_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_langinfo_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_langinfo_h" >&5 echo "${ECHO_T}$ac_cv_header_langinfo_h" >&6; } fi if test $ac_cv_header_langinfo_h = yes; then if test "${ac_cv_header_iconv_h+set}" = set; then { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking iconv.h usability" >&5 echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking iconv.h presence" >&5 echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for iconv.h" >&5 echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6; } if test "${ac_cv_header_iconv_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_iconv_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5 echo "${ECHO_T}$ac_cv_header_iconv_h" >&6; } fi if test $ac_cv_header_iconv_h = yes; then cat >>confdefs.h <<\_ACEOF #define USE_ICONV 1 _ACEOF for ac_func in iswblank do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done fi fi { echo "$as_me:$LINENO: checking if --enable-gtk option specified" >&5 echo $ECHO_N "checking if --enable-gtk option specified... $ECHO_C" >&6; } # Check whether --enable-gtk was given. if test "${enable_gtk+set}" = set; then enableval=$enable_gtk; vi_cv_gtk=$enableval else vi_cv_gtk="no" fi { echo "$as_me:$LINENO: result: $vi_cv_gtk" >&5 echo "${ECHO_T}$vi_cv_gtk" >&6; } if test "$vi_cv_gtk" = "yes"; then # # Find pkg-config # # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$PKG_CONFIG = xno ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&5 echo "$as_me: error: *** pkg-config not found. See http://pkgconfig.sourceforge.net" >&2;} { (exit 1); exit 1; }; } fi else if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** pkg-config too old; version 0.5 or better required." >&5 echo "$as_me: error: *** pkg-config too old; version 0.5 or better required." >&2;} { (exit 1); exit 1; }; } fi PKG_CONFIG=no fi fi if test x$PKG_CONFIG = xno ; then PKG_CONFIG=/bin/false fi vi_programs="$vi_programs vi-gtk" vi_ipc=vi-ipc { echo "$as_me:$LINENO: checking for gtk+" >&5 echo $ECHO_N "checking for gtk+... $ECHO_C" >&6; } if $PKG_CONFIG gtk+-2.0 ; then GTKINCS=`$PKG_CONFIG --cflags gtk+-2.0` GTKLIBS=`$PKG_CONFIG --libs gtk+-2.0` { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_PANGO 1 _ACEOF else if test "$vi_cv_widechar" = "yes"; then { { echo "$as_me:$LINENO: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&5 echo "$as_me: error: *** gtk+-2.0 is required. The latest version of gtk *** is always available from ftp://ftp.gtk.org/. " >&2;} { (exit 1); exit 1; }; } else # Check whether --with-gtk-prefix was given. if test "${with_gtk_prefix+set}" = set; then withval=$with_gtk_prefix; gtk_config_prefix="$withval" else gtk_config_prefix="" fi # Check whether --with-gtk-exec-prefix was given. if test "${with_gtk_exec_prefix+set}" = set; then withval=$with_gtk_exec_prefix; gtk_config_exec_prefix="$withval" else gtk_config_exec_prefix="" fi # Check whether --enable-gtktest was given. if test "${enable_gtktest+set}" = set; then enableval=$enable_gtktest; else enable_gtktest=yes fi for module in . do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi # Extract the first word of "gtk-config", so it can be a program name with args. set dummy gtk-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GTK_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG=$ac_cv_path_GTK_CONFIG if test -n "$GTK_CONFIG"; then { echo "$as_me:$LINENO: result: $GTK_CONFIG" >&5 echo "${ECHO_T}$GTK_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi min_gtk_version=1.2.0 { echo "$as_me:$LINENO: checking for GTK - version >= $min_gtk_version" >&5 echo $ECHO_N "checking for GTK - version >= $min_gtk_version... $ECHO_C" >&6; } no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_gtk=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" : fi rm -f conf.gtktest GTKINCS="$GTK_CFLAGS" GTKLIBS="$GTK_LIBS $LIBS" fi fi SAVELIBS="$LIBS" LIBS="-lutil $GTKLIBS" { echo "$as_me:$LINENO: checking for zvt_get_ptys in -lnvizvt" >&5 echo $ECHO_N "checking for zvt_get_ptys in -lnvizvt... $ECHO_C" >&6; } if test "${ac_cv_lib_nvizvt_zvt_get_ptys+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnvizvt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zvt_get_ptys (); int main () { return zvt_get_ptys (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_nvizvt_zvt_get_ptys=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_nvizvt_zvt_get_ptys=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_nvizvt_zvt_get_ptys" >&5 echo "${ECHO_T}$ac_cv_lib_nvizvt_zvt_get_ptys" >&6; } if test $ac_cv_lib_nvizvt_zvt_get_ptys = yes; then vi_cv_zvt="yes" else vi_cv_zvt="no" fi if test "$vi_cv_zvt" = "yes"; then GTKLIBS="-lnvizvt $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_ZVT 1 _ACEOF fi LIBS="$SAVELIBS" # AC_PATH_PROG(vi_cv_gnome_config, gnome-config, no) # if test "$vi_cv_gnome_config" != "no"; then # ZVTLIBS=`$vi_cv_gnome_config zvt --libs` # GTKLIBS="$ZVTLIBS $GTKLIBS" # fi fi { echo "$as_me:$LINENO: checking if --enable-motif option specified" >&5 echo $ECHO_N "checking if --enable-motif option specified... $ECHO_C" >&6; } # Check whether --enable-motif was given. if test "${enable_motif+set}" = set; then enableval=$enable_motif; vi_cv_motif=$enableval else vi_cv_motif="no" fi { echo "$as_me:$LINENO: result: $vi_cv_motif" >&5 echo "${ECHO_T}$vi_cv_motif" >&6; } if test "$vi_cv_motif" = "yes"; then vi_programs="$vi_programs vi-motif" vi_ipc=vi-ipc case "$host_os" in bsdi*) CC=cc;; esac MOTIFLIBS="-lXm -lXt" { echo "$as_me:$LINENO: checking for main in -lSM" >&5 echo $ECHO_N "checking for main in -lSM... $ECHO_C" >&6; } if test "${ac_cv_lib_SM_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lSM "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_SM_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_SM_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_SM_main" >&5 echo "${ECHO_T}$ac_cv_lib_SM_main" >&6; } if test $ac_cv_lib_SM_main = yes; then vi_cv_smlib="yes" else vi_cv_smlib="no" fi if test "$vi_cv_smlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lSM" fi { echo "$as_me:$LINENO: checking for main in -lICE" >&5 echo $ECHO_N "checking for main in -lICE... $ECHO_C" >&6; } if test "${ac_cv_lib_ICE_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ICE_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ICE_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_main" >&5 echo "${ECHO_T}$ac_cv_lib_ICE_main" >&6; } if test $ac_cv_lib_ICE_main = yes; then vi_cv_icelib="yes" else vi_cv_icelib="no" fi if test "$vi_cv_icelib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lICE" fi { echo "$as_me:$LINENO: checking for main in -lXext" >&5 echo $ECHO_N "checking for main in -lXext... $ECHO_C" >&6; } if test "${ac_cv_lib_Xext_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xext_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xext_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xext_main" >&6; } if test $ac_cv_lib_Xext_main = yes; then vi_cv_xextlib="yes" else vi_cv_xextlib="no" fi if test "$vi_cv_xextlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXext" fi { echo "$as_me:$LINENO: checking for main in -lXpm" >&5 echo $ECHO_N "checking for main in -lXpm... $ECHO_C" >&6; } if test "${ac_cv_lib_Xpm_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm "$XLIBS" $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_Xpm_main=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_Xpm_main=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_main" >&5 echo "${ECHO_T}$ac_cv_lib_Xpm_main" >&6; } if test $ac_cv_lib_Xpm_main = yes; then vi_cv_xpmlib="yes" else vi_cv_xpmlib="no" fi if test "$vi_cv_xpmlib" = "yes"; then MOTIFLIBS="$MOTIFLIBS -lXpm" fi MOTIFLIBS="$MOTIFLIBS $XLIBS -lm $LIBS" fi { echo "$as_me:$LINENO: checking if --enable-threads option specified" >&5 echo $ECHO_N "checking if --enable-threads option specified... $ECHO_C" >&6; } # Check whether --enable-threads was given. if test "${enable_threads+set}" = set; then enableval=$enable_threads; vi_cv_threads=$enableval else vi_cv_threads="no" fi { echo "$as_me:$LINENO: result: $vi_cv_threads" >&5 echo "${ECHO_T}$vi_cv_threads" >&6; } if test "$vi_cv_threads" = "yes"; then LIBS="$LIBS -lpthread" if test "${vi_cv_have_pthreads+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { pthread_self() ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_pthreads=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_pthreads=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_pthreads" = "no"; then { { echo "$as_me:$LINENO: error: No threading library found" >&5 echo "$as_me: error: No threading library found" >&2;} { (exit 1); exit 1; }; } fi IPCOBJS="pthread.o $IPCOBJS" cat >>confdefs.h <<\_ACEOF #define HAVE_PTHREAD 1 _ACEOF else IPCOBJS="nothread.o $IPCOBJS" fi { echo "$as_me:$LINENO: checking if --enable-perlinterp option specified" >&5 echo $ECHO_N "checking if --enable-perlinterp option specified... $ECHO_C" >&6; } # Check whether --enable-perlinterp was given. if test "${enable_perlinterp+set}" = set; then enableval=$enable_perlinterp; vi_cv_perlinterp=$enableval else vi_cv_perlinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_perlinterp" >&5 echo "${ECHO_T}$vi_cv_perlinterp" >&6; } if test "$vi_cv_perlinterp" = "yes"; then if test "$vi_cv_path_perl" = no; then { { echo "$as_me:$LINENO: error: No perl5 utility found." >&5 echo "$as_me: error: No perl5 utility found." >&2;} { (exit 1); exit 1; }; } fi $vi_cv_path_perl -e 'require 5.004' || { { { echo "$as_me:$LINENO: error: perl5 must be version 5.004 or later." >&5 echo "$as_me: error: perl5 must be version 5.004 or later." >&2;} { (exit 1); exit 1; }; } } if test "$vi_cv_threads" = "yes"; then useithreads=`$vi_cv_path_perl -MConfig -e 'print $Config{useithreads}'` if test "X$useithreads" != "Xdefine"; then { { echo "$as_me:$LINENO: error: vi threading only compatible with perl's ithreads." >&5 echo "$as_me: error: vi threading only compatible with perl's ithreads." >&2;} { (exit 1); exit 1; }; } fi fi eval `$vi_cv_path_perl -V:shrpenv` vi_cv_perllib=`$vi_cv_path_perl -MConfig -e 'print $Config{privlib}'` perlcppflags=`$vi_cv_path_perl -Mlib=$srcdir -MExtUtils::Embed \ -e 'ccflags;perl_inc'` if test "X$perlcppflags" != "X"; then CPPFLAGS="$perlcppflags $CPPFLAGS" fi perllibs=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ldopts'` perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ -e 'ccdlflags'` LIBOBJS="perl.o perlxsi.o perlsfio.o $LIBOBJS" cat >>confdefs.h <<\_ACEOF #define HAVE_PERL_INTERP 1 _ACEOF { echo "$as_me:$LINENO: checking whether we need to use perl's setenv" >&5 echo $ECHO_N "checking whether we need to use perl's setenv... $ECHO_C" >&6; } if test "${vi_cv_perl_setenv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main(){ #if defined(USE_ENVIRON_ARRAY) && !defined(PERL_USE_SAFE_PUTENV) exit(0); #else exit(1); #endif } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_perl_setenv=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_perl_setenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $vi_cv_perl_setenv" >&5 echo "${ECHO_T}$vi_cv_perl_setenv" >&6; } if test "$vi_cv_perl_setenv" = yes; then cat >>confdefs.h <<\_ACEOF #define USE_PERL_SETENV 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking if --enable-tclinterp option specified" >&5 echo $ECHO_N "checking if --enable-tclinterp option specified... $ECHO_C" >&6; } # Check whether --enable-tclinterp was given. if test "${enable_tclinterp+set}" = set; then enableval=$enable_tclinterp; vi_cv_tclinterp=$enableval else vi_cv_tclinterp="no" fi { echo "$as_me:$LINENO: result: $vi_cv_tclinterp" >&5 echo "${ECHO_T}$vi_cv_tclinterp" >&6; } if test "$vi_cv_tclinterp" = "yes"; then { echo "$as_me:$LINENO: checking for tclConfig.sh" >&5 echo $ECHO_N "checking for tclConfig.sh... $ECHO_C" >&6; } if test "${vi_cv_tclconfig+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_tclconfig=`$srcdir/findconfig` fi { echo "$as_me:$LINENO: result: $vi_cv_tclconfig" >&5 echo "${ECHO_T}$vi_cv_tclconfig" >&6; } if test "x$vi_cv_tclconfig" = x; then { { echo "$as_me:$LINENO: error: No Tcl library found;" >&5 echo "$as_me: error: No Tcl library found;" >&2;} { (exit 1); exit 1; }; } fi . $vi_cv_tclconfig LIBOBJS="tcl.o $LIBOBJS" LIBS="$TCL_LIB_SPEC $TCL_LIBS $LIBS" cat >>confdefs.h <<\_ACEOF #define HAVE_TCL_INTERP 1 _ACEOF fi SAVELIBS="$LIBS" SAVELDFLAGS="$LDFLAGS" SAVECPPFLAGS="$CPPFLAGS" # Check whether --with-curses was given. if test "${with_curses+set}" = set; then withval=$with_curses; fi if test "x$with_curses" != "x"; then CURSLDFLAGS="`echo $with_curses/lib | sed "$LRscript"` $CURSLDFLAGS" CURSCPPFLAGS="-I$with_curses/include $CURSCPPFLAGS" fi; LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" if test "$vi_cv_widechar" = "yes"; then for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_waddnwstr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for waddnwstr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for waddnwstr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char waddnwstr (); int main () { return waddnwstr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done else for vi_cv_curses in ncurses ncursesw curses; do as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_initscr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for initscr in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for initscr in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then break fi vi_cv_curses=unknown done fi if test "$vi_cv_curses" != "unknown"; then CURSHEADER=curses.h if test "$vi_cv_curses" = "ncurses"; then for ac_header in ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncurses.h fi done fi if test "$vi_cv_curses" = "ncursesw"; then for ac_header in ncursesw/ncurses.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF CURSHEADER=ncursesw/ncurses.h fi done fi vi_programs="vi $vi_programs" CURSLIBS="-l$vi_cv_curses" else { echo "$as_me:$LINENO: WARNING: *** No suitable curses library found." >&5 echo "$as_me: WARNING: *** No suitable curses library found." >&2;} if test "$vi_programs"X = X; then { { echo "$as_me:$LINENO: error: No executable to build." >&5 echo "$as_me: error: No executable to build." >&2;} { (exit 1); exit 1; }; } fi fi as_ac_Lib=`echo "ac_cv_lib_$vi_cv_curses''_tgetent" | $as_tr_sh` { echo "$as_me:$LINENO: checking for tgetent in -l$vi_cv_curses" >&5 echo $ECHO_N "checking for tgetent in -l$vi_cv_curses... $ECHO_C" >&6; } if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$vi_cv_curses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_Lib=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi ac_res=`eval echo '${'$as_ac_Lib'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Lib'}'` = yes; then vi_cv_curses_tgetent=yes else vi_cv_curses_tgetent=no fi if test "$vi_cv_curses_tgetent" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermlib" >&5 echo $ECHO_N "checking for tgetent in -ltermlib... $ECHO_C" >&6; } if test "${ac_cv_lib_termlib_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermlib $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termlib_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termlib_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termlib_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termlib_tgetent" >&6; } if test $ac_cv_lib_termlib_tgetent = yes; then vi_cv_termlib=-ltermlib else vi_cv_termlib=no fi if test "$vi_cv_termlib" = no; then { echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6; } if test "${ac_cv_lib_termcap_tgetent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_termcap_tgetent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_termcap_tgetent=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6; } if test $ac_cv_lib_termcap_tgetent = yes; then vi_cv_termlib=-ltermcap else vi_cv_termlib=no fi fi fi if test "$vi_cv_termlib" != no; then CURSLIBS="$CURSLIBS $vi_cv_termlib" fi LIBS="$SAVELIBS" LDFLAGS="$SAVELDFLAGS" CPPFLAGS="$SAVECPPFLAGS" { echo "$as_me:$LINENO: checking for sys/mman.h" >&5 echo $ECHO_N "checking for sys/mman.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_mman+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_mman=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_mman=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_mman" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_MMAN_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_mman" >&5 echo "${ECHO_T}$vi_cv_include_sys_mman" >&6; } { echo "$as_me:$LINENO: checking for sys/select.h" >&5 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6; } if test "${vi_cv_include_sys_select+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then vi_cv_include_sys_select=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_include_sys_select=no fi rm -f conftest.err conftest.$ac_ext fi if test "$vi_cv_include_sys_select" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_SELECT_H 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_include_sys_select" >&5 echo "${ECHO_T}$vi_cv_include_sys_select" >&6; } { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef ssize_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } if test "${ac_cv_c_bigendian+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # See if sys/param.h defines the BYTE_ORDER macro. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then # It does; now see whether it defined to BIG_ENDIAN or not. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_bigendian=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # It does not; compile a test program. if test "$cross_compiling" = yes; then # try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } int main () { _ascii (); _ebcdic (); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_bigendian=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 echo "${ECHO_T}$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in yes) cat >>confdefs.h <<\_ACEOF #define WORDS_BIGENDIAN 1 _ACEOF ;; no) ;; *) { { echo "$as_me:$LINENO: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&5 echo "$as_me: error: unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} { (exit 1); exit 1; }; } ;; esac { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { static struct stat ac_aggr; if (sizeof ac_aggr.st_blksize) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_stat_st_blksize=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_stat_st_blksize=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5 echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; } if test $ac_cv_member_struct_stat_st_blksize = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_ST_BLKSIZE 1 _ACEOF fi { echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef mode_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef pid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi for ac_func in bsearch gethostname memchr memset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in mkstemp mmap strdup strpbrk do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in snprintf vsnprintf do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else case " $LIBOBJS " in *" $ac_func.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; esac fi done for ac_func in select do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_env=no else need_env=yes fi done for ac_func in strsep do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF need_strsep=no else need_strsep=yes fi done for ac_func in unsetenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF else need_env=yes fi done for ac_header in stdlib.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for working mmap" >&5 echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_mmap_fixed_mapped=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # ifndef HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 1; if (write (fd, data, pagesize) != pagesize) return 1; close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 1; data2 = (char *) malloc (2 * pagesize); if (!data2) return 1; data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 1; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 1; if (read (fd, data3, pagesize) != pagesize) return 1; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 1; close (fd); return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_mmap_fixed_mapped=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MMAP 1 _ACEOF fi rm -f conftest.mmap for ac_header in vfork.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in fork vfork do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { echo "$as_me:$LINENO: checking for working fork" >&5 echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } if test "${ac_cv_func_fork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_fork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_fork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { echo "$as_me:$LINENO: checking for working vfork" >&5 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_vfork_works=cross else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_vfork_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_VFORK 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define vfork fork _ACEOF fi if test "x$ac_cv_func_fork_works" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_WORKING_FORK 1 _ACEOF fi if test "$need_env" = yes; then LIBOBJS="env.o $LIBOBJS" fi if test "$need_strsep" = yes; then LIBOBJS="strsep.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking for fcntl/flock" >&5 echo $ECHO_N "checking for fcntl/flock... $ECHO_C" >&6; } if test "${vi_cv_lock+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else vi_cv_lock=none case "$host_os" in dgux*);; irix*);; *) cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { flock(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=flock else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext;; esac if test "$vi_cv_lock" = none; then cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { fcntl(0, F_SETLK, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_lock=fcntl else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi if test "$vi_cv_lock" = flock; then cat >>confdefs.h <<\_ACEOF #define HAVE_LOCK_FLOCK 1 _ACEOF fi if test "$vi_cv_lock" = fcntl; then cat >>confdefs.h <<\_ACEOF #define HAVE_LOCK_FCNTL 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_lock" >&5 echo "${ECHO_T}$vi_cv_lock" >&6; } { echo "$as_me:$LINENO: checking for ftruncate/chsize" >&5 echo $ECHO_N "checking for ftruncate/chsize... $ECHO_C" >&6; } if test "${vi_cv_ftruncate+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { ftruncate(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=ftruncate else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { chsize(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_ftruncate=chsize else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ftruncate=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_ftruncate" = ftruncate; then cat >>confdefs.h <<\_ACEOF #define HAVE_FTRUNCATE_FTRUNCATE 1 _ACEOF fi if test "$vi_cv_ftruncate" = chsize; then cat >>confdefs.h <<\_ACEOF #define HAVE_FTRUNCATE_CHSIZE 1 _ACEOF fi if test "$vi_cv_ftruncate" = no; then { { echo "$as_me:$LINENO: error: No file truncation system call." >&5 echo "$as_me: error: No file truncation system call." >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $vi_cv_ftruncate" >&5 echo "${ECHO_T}$vi_cv_ftruncate" >&6; } CSAVELIBS="$LIBS" CSAVELDFLAGS="$LDFLAGS" CSAVECPPFLAGS="$CPPFLAGS" LIBS="$CURSLIBS $LIBS" LDFLAGS="$CURSLDFLAGS $LDFLAGS" CPPFLAGS="$CURSCPPFLAGS $CPPFLAGS" { echo "$as_me:$LINENO: checking for tigetstr/tigetnum" >&5 echo $ECHO_N "checking for tigetstr/tigetnum... $ECHO_C" >&6; } if test "${vi_cv_have_curses_tigetstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { tigetstr(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_tigetstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_tigetstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_tigetstr" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_TIGETSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_tigetstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_tigetstr" >&6; } if test "$vi_cv_curses" = "bundled curses"; then cat >>confdefs.h <<\_ACEOF #define HAVE_BSD_CURSES 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_WADDNSTR 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_IDLOK 1 _ACEOF else { echo "$as_me:$LINENO: checking for waddnstr" >&5 echo $ECHO_N "checking for waddnstr... $ECHO_C" >&6; } if test "${vi_cv_have_curses_waddnstr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { waddnstr(stdscr, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_waddnstr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_waddnstr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_waddnstr" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_WADDNSTR 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_waddnstr" >&5 echo "${ECHO_T}$vi_cv_have_curses_waddnstr" >&6; } { echo "$as_me:$LINENO: checking for beep" >&5 echo $ECHO_N "checking for beep... $ECHO_C" >&6; } if test "${vi_cv_have_curses_beep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { beep(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_beep=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_beep=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_beep" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_BEEP 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_beep" >&5 echo "${ECHO_T}$vi_cv_have_curses_beep" >&6; } { echo "$as_me:$LINENO: checking for flash" >&5 echo $ECHO_N "checking for flash... $ECHO_C" >&6; } if test "${vi_cv_have_curses_flash+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { flash(); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_flash=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_flash=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_flash" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_FLASH 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_flash" >&5 echo "${ECHO_T}$vi_cv_have_curses_flash" >&6; } { echo "$as_me:$LINENO: checking for idlok" >&5 echo $ECHO_N "checking for idlok... $ECHO_C" >&6; } if test "${vi_cv_have_curses_idlok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { idlok(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_idlok=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_idlok=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_idlok" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_IDLOK 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_idlok" >&5 echo "${ECHO_T}$vi_cv_have_curses_idlok" >&6; } { echo "$as_me:$LINENO: checking for keypad" >&5 echo $ECHO_N "checking for keypad... $ECHO_C" >&6; } if test "${vi_cv_have_curses_keypad+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { keypad(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_keypad=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_keypad=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_keypad" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_KEYPAD 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_keypad" >&5 echo "${ECHO_T}$vi_cv_have_curses_keypad" >&6; } { echo "$as_me:$LINENO: checking for newterm" >&5 echo $ECHO_N "checking for newterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_newterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { newterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_newterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_newterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_newterm" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_NEWTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_newterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_newterm" >&6; } if test "$vi_cv_have_curses_newterm" = no; then cat >>confdefs.h <<\_ACEOF #define HAVE_BSD_CURSES 1 _ACEOF fi fi { echo "$as_me:$LINENO: checking for setupterm" >&5 echo $ECHO_N "checking for setupterm... $ECHO_C" >&6; } if test "${vi_cv_have_curses_setupterm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$CURSHEADER> int main () { setupterm(0, 0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_have_curses_setupterm=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_have_curses_setupterm=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_have_curses_setupterm" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CURSES_SETUPTERM 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_have_curses_setupterm" >&5 echo "${ECHO_T}$vi_cv_have_curses_setupterm" >&6; } LIBS="$CSAVELIBS" LDFLAGS="$CSAVELDFLAGS" CPPFLAGS="$CSAVECPPFLAGS" { echo "$as_me:$LINENO: checking for broken gettimeofday system call" >&5 echo $ECHO_N "checking for broken gettimeofday system call... $ECHO_C" >&6; } if test "${vi_cv_gettimeofday+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { gettimeofday(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_gettimeofday=okay else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_gettimeofday=broken fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_gettimeofday" = broken; then cat >>confdefs.h <<\_ACEOF #define HAVE_BROKEN_GETTIMEOFDAY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_gettimeofday" >&5 echo "${ECHO_T}$vi_cv_gettimeofday" >&6; } { echo "$as_me:$LINENO: checking for System V pty calls" >&5 echo $ECHO_N "checking for System V pty calls... $ECHO_C" >&6; } if test "${vi_cv_sys5_pty+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { grantpt(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_sys5_pty=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_sys5_pty=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_sys5_pty" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS5_PTY 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sys5_pty" >&5 echo "${ECHO_T}$vi_cv_sys5_pty" >&6; } { echo "$as_me:$LINENO: checking for revoke system call" >&5 echo $ECHO_N "checking for revoke system call... $ECHO_C" >&6; } if test "${vi_cv_revoke+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { revoke("a"); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_revoke=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_revoke=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$vi_cv_revoke" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REVOKE 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_revoke" >&5 echo "${ECHO_T}$vi_cv_revoke" >&6; } { echo "$as_me:$LINENO: checking for int type sprintf return value" >&5 echo $ECHO_N "checking for int type sprintf return value... $ECHO_C" >&6; } if test "${vi_cv_sprintf_count+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){char buf[20]; exit(sprintf(buf, "XXX") != 3);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_sprintf_count=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_sprintf_count=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi if test "$vi_cv_sprintf_count" = no; then cat >>confdefs.h <<\_ACEOF #define SPRINTF_RET_CHARPNT 1 _ACEOF fi { echo "$as_me:$LINENO: result: $vi_cv_sprintf_count" >&5 echo "${ECHO_T}$vi_cv_sprintf_count" >&6; } { echo "$as_me:$LINENO: checking for u_char" >&5 echo $ECHO_N "checking for u_char... $ECHO_C" >&6; } if test "${vi_cv_uchar+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_char foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uchar=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uchar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uchar" >&5 echo "${ECHO_T}$vi_cv_uchar" >&6; } if test "$vi_cv_uchar" = no; then u_char_decl="typedef unsigned char u_char;" fi { echo "$as_me:$LINENO: checking for u_short" >&5 echo $ECHO_N "checking for u_short... $ECHO_C" >&6; } if test "${vi_cv_ushort+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_short foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ushort=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ushort=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ushort" >&5 echo "${ECHO_T}$vi_cv_ushort" >&6; } if test "$vi_cv_ushort" = no; then u_short_decl="typedef unsigned short u_short;" fi { echo "$as_me:$LINENO: checking for u_int" >&5 echo $ECHO_N "checking for u_int... $ECHO_C" >&6; } if test "${vi_cv_uint+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_uint=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint" >&5 echo "${ECHO_T}$vi_cv_uint" >&6; } if test "$vi_cv_uint" = no; then u_int_decl="typedef unsigned int u_int;" fi { echo "$as_me:$LINENO: checking for u_long" >&5 echo $ECHO_N "checking for u_long... $ECHO_C" >&6; } if test "${vi_cv_ulong+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_long foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_ulong=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_ulong=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_ulong" >&5 echo "${ECHO_T}$vi_cv_ulong" >&6; } if test "$vi_cv_ulong" = no; then u_long_decl="typedef unsigned long u_long;" fi { echo "$as_me:$LINENO: checking for u_int8_t" >&5 echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; } if test "${vi_cv_uint8+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int8_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint8=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned char) != 1);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint8="unsigned char" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint8=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint8" >&5 echo "${ECHO_T}$vi_cv_uint8" >&6; } if test "$vi_cv_uint8" = no; then { { echo "$as_me:$LINENO: error: No unsigned 8-bit integral type." >&5 echo "$as_me: error: No unsigned 8-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint8" != yes; then u_int8_decl="typedef $vi_cv_uint8 u_int8_t;" fi { echo "$as_me:$LINENO: checking for u_int16_t" >&5 echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; } if test "${vi_cv_uint16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint16="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint16" >&5 echo "${ECHO_T}$vi_cv_uint16" >&6; } if test "$vi_cv_uint16" = no; then { { echo "$as_me:$LINENO: error: No unsigned 16-bit integral type." >&5 echo "$as_me: error: No unsigned 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint16" != yes; then u_int16_decl="typedef $vi_cv_uint16 u_int16_t;" fi { echo "$as_me:$LINENO: checking for int16_t" >&5 echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; } if test "${vi_cv_int16+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int16_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int16=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(short) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="short" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 2);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int16="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int16=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int16" >&5 echo "${ECHO_T}$vi_cv_int16" >&6; } if test "$vi_cv_int16" = no; then { { echo "$as_me:$LINENO: error: No signed 16-bit integral type." >&5 echo "$as_me: error: No signed 16-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int16" != yes; then int16_decl="typedef $vi_cv_int16 int16_t;" fi { echo "$as_me:$LINENO: checking for u_int32_t" >&5 echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; } if test "${vi_cv_uint32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { u_int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_uint32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(unsigned long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_uint32="unsigned long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_uint32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_uint32" >&5 echo "${ECHO_T}$vi_cv_uint32" >&6; } if test "$vi_cv_uint32" = no; then { { echo "$as_me:$LINENO: error: No unsigned 32-bit integral type." >&5 echo "$as_me: error: No unsigned 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_uint32" != yes; then u_int32_decl="typedef $vi_cv_uint32 u_int32_t;" fi { echo "$as_me:$LINENO: checking for int32_t" >&5 echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; } if test "${vi_cv_int32+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int32_t foo; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_int32=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(int) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="int" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$cross_compiling" = yes; then { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling See \`config.log' for more details." >&5 echo "$as_me: error: cannot run test program while cross compiling See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ main(){exit(sizeof(long) != 4);} _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then vi_cv_int32="long" else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) vi_cv_int32=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_int32" >&5 echo "${ECHO_T}$vi_cv_int32" >&6; } if test "$vi_cv_int32" = no; then { { echo "$as_me:$LINENO: error: No signed 32-bit integral type." >&5 echo "$as_me: error: No signed 32-bit integral type." >&2;} { (exit 1); exit 1; }; } fi if test "$vi_cv_int32" != yes; then int32_decl="typedef $vi_cv_int32 int32_t;" fi { echo "$as_me:$LINENO: checking return type of fprintf" >&5 echo $ECHO_N "checking return type of fprintf... $ECHO_C" >&6; } if test "${vi_cv_type_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int fprintf (); int main () { int i; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_type_fprintf=int else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_type_fprintf=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_type_fprintf" >&5 echo "${ECHO_T}$vi_cv_type_fprintf" >&6; } { echo "$as_me:$LINENO: checking fprintf prototype needed" >&5 echo $ECHO_N "checking fprintf prototype needed... $ECHO_C" >&6; } if test "${vi_cv_proto_fprintf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include typedef int (*funcPtr)(); int main () { funcPtr ptr = (funcPtr) fprintf; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then vi_cv_proto_fprintf=no else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_proto_fprintf=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $vi_cv_proto_fprintf" >&5 echo "${ECHO_T}$vi_cv_proto_fprintf" >&6; } if test "$vi_cv_proto_fprintf" = yes; then cat >>confdefs.h <<\_ACEOF #define NEED_FPRINTF_PROTO 1 _ACEOF fi # Check whether --with-db_type was given. if test "${with_db_type+set}" = set; then withval=$with_db_type; fi case "$with_db_type" in "db1") { echo "$as_me:$LINENO: WARNING: Use of db1 is not officially supported." >&5 echo "$as_me: WARNING: Use of db1 is not officially supported." >&2;} cat >>confdefs.h <<\_ACEOF #define USE_DB1 1 _ACEOF ;; "system") ;; *) with_db_type="bundled" ;; esac # Check whether --with-db_prefix was given. if test "${with_db_prefix+set}" = set; then withval=$with_db_prefix; fi SAVELDFLAGS="$LDFLAGS" if test "x$with_db_prefix" != "x"; then LDFLAGS="-L$with_db_prefix/lib $LDFLAGS" CPPFLAGS="-I$with_db_prefix/include $CPPFLAGS" fi if test "$with_db_type" != db1; then SAVELIBS="$LIBS" LIBS="$LIBS -ldb" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { db_create(NULL,NULL,0) ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then vi_cv_dbfatal="no" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 vi_cv_dbfatal="yes" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$vi_cv_dbfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need DB 3." >&5 echo "$as_me: error: Need DB 3." >&2;} { (exit 1); exit 1; }; } fi LIBS="$SAVELIBS" fi LDFLAGS="$SAVELDFLAGS" { echo "$as_me:$LINENO: checking if --enable-dynamic-loading option specified" >&5 echo $ECHO_N "checking if --enable-dynamic-loading option specified... $ECHO_C" >&6; } # Check whether --enable-dynamic-loading was given. if test "${enable_dynamic_loading+set}" = set; then enableval=$enable_dynamic_loading; vi_cv_dl=$enableval else vi_cv_dl="no" fi { echo "$as_me:$LINENO: result: $vi_cv_dl" >&5 echo "${ECHO_T}$vi_cv_dl" >&6; } if test "$vi_cv_dl" = yes; then { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then vi_cv_dlfatal="no" else vi_cv_dlfatal="yes" fi if test "$vi_cv_dlfatal" = "yes"; then { { echo "$as_me:$LINENO: error: Need dl to support dynamic loading." >&5 echo "$as_me: error: Need dl to support dynamic loading." >&2;} { (exit 1); exit 1; }; } fi OLDPATH="$PATH" PATH="$with_db_prefix/lib:/usr/lib:/lib" # Extract the first word of "libdb-3.so", so it can be a program name with args. set dummy libdb-3.so; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_vi_cv_path_db3+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $vi_cv_path_db3 in [\\/]* | ?:[\\/]*) ac_cv_path_vi_cv_path_db3="$vi_cv_path_db3" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_vi_cv_path_db3="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_vi_cv_path_db3" && ac_cv_path_vi_cv_path_db3="no" ;; esac fi vi_cv_path_db3=$ac_cv_path_vi_cv_path_db3 if test -n "$vi_cv_path_db3"; then { echo "$as_me:$LINENO: result: $vi_cv_path_db3" >&5 echo "${ECHO_T}$vi_cv_path_db3" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$vi_cv_path_db3" = no; then { { echo "$as_me:$LINENO: error: Path of libdb-3.so not found." >&5 echo "$as_me: error: Path of libdb-3.so not found." >&2;} { (exit 1); exit 1; }; } fi PATH="$OLDPATH" cat >>confdefs.h <<\_ACEOF #define USE_DYNAMIC_LOADING 1 _ACEOF LIBOBJS="dldb.o $LIBOBJS" dl_src=../common/dldb.c LIBS="-ldl $LIBS" else LIBS="-ldb $LIBS" if test "X$with_db_prefix" != "X"; then LDFLAGS="`echo $with_db_prefix/lib | sed "$LRscript"` $LDFLAGS" fi fi # Check whether --with-db_build was given. if test "${with_db_build+set}" = set; then withval=$with_db_build; fi if test "x$with_db_build" != "x"; then vi_cv_dbsrc=`$AWK '/^srcdir/ {gsub("srcdir[ \t]*=","");print $1}' \ $with_db_build/Makefile` case $with_db_build in *[\\/]);; *) with_db_build="$with_db_build/";; esac case $vi_cv_dbsrc in [\\/]*);; *) vi_cv_dbsrc="$with_db_build$vi_cv_dbsrc";; esac fi; vi_cv_db4="no" # Check whether --enable-log4 was given. if test "${enable_log4+set}" = set; then enableval=$enable_log4; { echo "$as_me:$LINENO: checking for DB 4" >&5 echo $ECHO_N "checking for DB 4... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include DB_VERSION_MAJOR _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "^4" >/dev/null 2>&1; then vi_cv_db4="yes" else vi_cv_db4="no" fi rm -f conftest* { echo "$as_me:$LINENO: result: $vi_cv_db4" >&5 echo "${ECHO_T}$vi_cv_db4" >&6; } fi if test "$vi_cv_db4" = "yes"; then CPPFLAGS="-I$vi_cv_dbsrc/include $CPPFLAGS" CPPFLAGS="-I$vi_cv_dbsrc/include_auto $CPPFLAGS" CPPFLAGS="-I$with_db_build $CPPFLAGS" cat >>confdefs.h <<\_ACEOF #define USE_DB4_LOGGING 1 _ACEOF LIBOBJS="log4.o vi_auto.o vi_rec.o $LIBOBJS" else LIBOBJS="log.o $LIBOBJS" fi { echo "$as_me:$LINENO: checking if --disable-re option specified" >&5 echo $ECHO_N "checking if --disable-re option specified... $ECHO_C" >&6; } # Check whether --enable-re was given. if test "${enable_re+set}" = set; then enableval=$enable_re; if test "$enable_re" = "yes"; then vi_cv_re_lib="bundled RE" else vi_cv_re_lib="other RE" fi else vi_cv_re_lib="bundled RE" fi { echo "$as_me:$LINENO: result: $vi_cv_re_lib" >&5 echo "${ECHO_T}$vi_cv_re_lib" >&6; } case "$vi_cv_re_lib" in "bundled RE") CPPFLAGS="-I\$(visrcdir)/regex $CPPFLAGS" LIBOBJS="regcomp.o regerror.o regexec.o regfree.o $LIBOBJS";; "other RE") ;; esac ac_config_files="$ac_config_files Makefile port.h:port.h.in pathnames.h:pathnames.h.in recover:recover.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "port.h") CONFIG_FILES="$CONFIG_FILES port.h:port.h.in" ;; "pathnames.h") CONFIG_FILES="$CONFIG_FILES pathnames.h:pathnames.h.in" ;; "recover") CONFIG_FILES="$CONFIG_FILES recover:recover.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim am__isrc!$am__isrc$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim OPTFLAG!$OPTFLAG$ac_delim no_op_OPTFLAG!$no_op_OPTFLAG$ac_delim vi_cv_path_shell!$vi_cv_path_shell$ac_delim vi_cv_path_sendmail!$vi_cv_path_sendmail$ac_delim vi_cv_path_perl!$vi_cv_path_perl$ac_delim vi_cv_path_preserve!$vi_cv_path_preserve$ac_delim vi_cv_path_fuser!$vi_cv_path_fuser$ac_delim vi_cv_path_lsof!$vi_cv_path_lsof$ac_delim INUSE!$INUSE$ac_delim vi_cv_path_ar!$vi_cv_path_ar$ac_delim vi_cv_path_chmod!$vi_cv_path_chmod$ac_delim vi_cv_path_cp!$vi_cv_path_cp$ac_delim vi_cv_path_ln!$vi_cv_path_ln$ac_delim vi_cv_path_mkdir!$vi_cv_path_mkdir$ac_delim vi_cv_path_rm!$vi_cv_path_rm$ac_delim vi_cv_path_ranlib!$vi_cv_path_ranlib$ac_delim vi_cv_path_strip!$vi_cv_path_strip$ac_delim XMKMF!$XMKMF$ac_delim XINCS!$XINCS$ac_delim LIBOBJS!$LIBOBJS$ac_delim vi_programs!$vi_programs$ac_delim vi_ipc!$vi_ipc$ac_delim GTKLIBS!$GTKLIBS$ac_delim GTKINCS!$GTKINCS$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GTK_CONFIG!$GTK_CONFIG$ac_delim GTK_CFLAGS!$GTK_CFLAGS$ac_delim GTK_LIBS!$GTK_LIBS$ac_delim MOTIFLIBS!$MOTIFLIBS$ac_delim IPCOBJS!$IPCOBJS$ac_delim shrpenv!$shrpenv$ac_delim perlldflags!$perlldflags$ac_delim perllibs!$perllibs$ac_delim vi_cv_perllib!$vi_cv_perllib$ac_delim CURSLIBS!$CURSLIBS$ac_delim CURSCPPFLAGS!$CURSCPPFLAGS$ac_delim CURSLDFLAGS!$CURSLDFLAGS$ac_delim HAVE_NCURSESW!$HAVE_NCURSESW$ac_delim u_char_decl!$u_char_decl$ac_delim u_short_decl!$u_short_decl$ac_delim u_int_decl!$u_int_decl$ac_delim u_long_decl!$u_long_decl$ac_delim u_int8_decl!$u_int8_decl$ac_delim u_int16_decl!$u_int16_decl$ac_delim int16_decl!$int16_decl$ac_delim u_int32_decl!$u_int32_decl$ac_delim int32_decl!$int32_decl$ac_delim NEED_FPRINTF_PROTO!$NEED_FPRINTF_PROTO$ac_delim dl_src!$dl_src$ac_delim vi_cv_path_db3!$vi_cv_path_db3$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 56; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi nvi-1.81.6/dist/tags0100444000076400001440000077626410720065713013322 0ustar skimousers!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted/ !_TAG_PROGRAM_AUTHOR Darren Hiebert /darren@hiebert.com/ !_TAG_PROGRAM_NAME Exuberant Ctags // !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ !_TAG_PROGRAM_VERSION 5.1 // ABSMARK1 ../common/mark.h 42;" d ABSMARK2 ../common/mark.h 43;" d AB_INWORD ../vi/vi.h /^typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t;$/;" e AB_NOTSET ../vi/vi.h /^typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t;$/;" e AB_NOTWORD ../vi/vi.h /^typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t;$/;" e ADDITIONAL_CHARACTERS ../common/key.c 87;" d file: ADD_SPACE_GOTO ../common/mem.h 103;" d ADD_SPACE_GOTOW ../common/mem.h 115;" d ADD_SPACE_RET ../common/mem.h 117;" d ADD_SPACE_RETW ../common/mem.h 129;" d AGV_ALL ../ex/ex.h 100;" d AGV_AT ../ex/ex.h 96;" d AGV_AT_NORANGE ../ex/ex.h 97;" d AGV_GLOBAL ../ex/ex.h 98;" d AGV_V ../ex/ex.h 99;" d ALL_DISPLAY ../common/options.h /^enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY };$/;" e enum:optdisp APPEND ../ex/ex_append.c /^enum which {APPEND, CHANGE, INSERT};$/;" e enum:which file: ARG ../ex/ex_display.c 43;" d file: ARG ../ex/ex_display.c 44;" d file: ARG ../ex/ex_display.c 50;" d file: ARG ../ex/ex_display.c 51;" d file: ARG ../ex/ex_display.c 57;" d file: ARG ../ex/ex_display.c 58;" d file: ARG ../ex/ex_display.c 64;" d file: ARG ../ex/ex_display.c 65;" d file: ARGS ../common/args.h /^} ARGS;$/;" t ARGS ../perl_api/perlsfio.c 38;" d file: ARGS ../perl_api/perlsfio.c 39;" d file: ARG_0 ../gtk/gtkviscreen.c /^ ARG_0,$/;" e file: ARG_CHAR_T ../common/key.h /^typedef u_int ARG_CHAR_T;$/;" t ARG_VADJUSTMENT ../gtk/gtkviscreen.c /^ ARG_VADJUSTMENT,$/;" e file: ARSIZE ../common/msg.c 476;" d file: ARSIZE ../common/msg.c 530;" d file: A_ALLOCATED ../common/args.h 27;" d A_COMBO ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" e enum:badaddr A_DECREASE ../vi/vi.h /^typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t;$/;" e A_EMPTY ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" e enum:badaddr A_EOF ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" e enum:badaddr A_INCREASE ../vi/vi.h /^typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t;$/;" e A_NOTSET ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" e enum:badaddr A_SET ../vi/vi.h /^typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t;$/;" e A_ZERO ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" e enum:badaddr ArgcType ../motif/m_main.c 41;" d file: ArgcType ../motif/m_main.c 43;" d file: ArgcType ../motif_l/m_ruler.c 285;" d file: ArgcType ../motif_l/m_ruler.c 287;" d file: ArgcType ../motif_l/m_tags.c 464;" d file: ArgcType ../motif_l/m_tags.c 466;" d file: Atoms ../motif/m_cde.c /^} Atoms[] = {$/;" v file: BACKWARD ../common/common.h /^typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;$/;" e BCENTRE ../motif_l/xtabbed.c 69;" d file: BIGWORD ../vi/v_word.c /^enum which {BIGWORD, LITTLEWORD};$/;" e enum:which file: BINC_GOTO ../common/mem.h 22;" d BINC_GOTOC ../common/mem.h 35;" d BINC_GOTOW ../common/mem.h 37;" d BINC_RET ../common/mem.h 39;" d BINC_RETC ../common/mem.h 52;" d BINC_RETW ../common/mem.h 54;" d BITS ../common/key.c 290;" d file: BLEFT ../motif_l/xtabbed.c 68;" d file: BQMARK ../vi/v_mark.c /^enum which {BQMARK, FQMARK};$/;" e enum:which file: BRIGHT ../motif_l/xtabbed.c 70;" d file: BUILD ../ex/ex_subst.c 317;" d file: BUSY_OFF ../common/common.h /^typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;$/;" e BUSY_ON ../common/common.h /^typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;$/;" e BUSY_UPDATE ../common/common.h /^typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;$/;" e B_NONE ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e B_OFF ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e B_READ ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e B_RECOVER ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e B_SEARCH ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e B_WRITE ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" e BufferSize ../motif_l/m_menu.c 64;" d file: BufferSize ../motif_l/m_vi.c 56;" d file: ButtonData ../motif_l/m_search.c /^} ButtonData;$/;" t file: ButtonData ../motif_l/m_tags.c /^} ButtonData;$/;" t file: CACHE_BITMAPS ../motif_l/xtabbed.c 1491;" d file: CACHE_SIZE_LIMIT ../motif_l/xtabbed.c 1484;" d file: CALLOC ../common/mem.h 155;" d CALLOC_GOTO ../common/mem.h 159;" d CALLOC_NOMSG ../common/mem.h 163;" d CALLOC_RET ../common/mem.h 166;" d CB ../common/common.h /^typedef struct _cb CB;$/;" t CBNAME ../common/cut.h 66;" d CB_LMODE ../common/cut.h 23;" d CC ../ex/ex_cscope.c /^} CC;$/;" t file: CHANGE ../ex/ex_append.c /^enum which {APPEND, CHANGE, INSERT};$/;" e enum:which file: CHANGED_DISPLAY ../common/options.h /^enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY };$/;" e enum:optdisp CHAR2INT ../common/key.h 93;" d CHAR2INT5 ../common/key.h 33;" d CHAR2INT5 ../common/key.h 64;" d CHAR_T ../common/multibyte.h /^typedef u_char CHAR_T;$/;" t CHAR_T ../common/multibyte.h /^typedef wchar_t CHAR_T;$/;" t CHAR_T_OFFSET ../common/log.c 86;" d file: CHAR_T_char2int ../common/conv.c /^CHAR_T_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, $/;" f CHAR_T_int2char ../common/conv.c /^CHAR_T_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, $/;" f CHAR_WIDTH ../common/key.h 54;" d CHAR_WIDTH ../common/key.h 86;" d CHAR_WIDTH ../gtk/gtkviscreen.c 12;" d file: CHAR_WIDTH ../gtk/gtkviscreen.c 14;" d file: CHECK_TYPE ../common/mem.h 13;" d CHECK_TYPE ../common/mem.h 16;" d CHK_INTR ../vi/v_txt.c 2194;" d file: CHLEN ../vi/vs_relative.c 139;" d file: CH_ABBREVIATED ../common/key.h 160;" d CH_BSEARCH ../common/key.h 216;" d CH_CURSOR ../common/key.h 217;" d CH_CURSOR ../vi/v_txt.c 55;" d file: CH_CURSOR ../vi/v_txt.c 56;" d file: CH_ENDMARK ../common/key.h 218;" d CH_EXPROMPT ../common/key.h 219;" d CH_FSEARCH ../common/key.h 220;" d CH_HEX ../common/key.h 221;" d CH_LITERAL ../common/key.h 222;" d CH_MAPPED ../common/key.h 161;" d CH_NO ../common/key.h 223;" d CH_NOMAP ../common/key.h 162;" d CH_NOT_DIGIT ../common/key.h 224;" d CH_QUIT ../common/key.h 225;" d CH_QUOTED ../common/key.h 163;" d CH_YES ../common/key.h 226;" d CLEAR_EX_CMD ../ex/ex.h 104;" d CLEAR_EX_PARSER ../ex/ex.h 79;" d CLP ../cl/cl.h 80;" d CLR_INTERRUPT ../common/key.h 241;" d CLSP ../cl/cl.h 82;" d CL_IN_EX ../cl/cl.h 66;" d CL_LAYOUT ../cl/cl.h 67;" d CL_PRIVATE ../cl/cl.h /^} CL_PRIVATE;$/;" t CL_RENAME ../cl/cl.h 68;" d CL_RENAME_OK ../cl/cl.h 69;" d CL_SCR_EX_INIT ../cl/cl.h 70;" d CL_SCR_VI_INIT ../cl/cl.h 71;" d CL_SIGHUP ../cl/cl.h 72;" d CL_SIGINT ../cl/cl.h 73;" d CL_SIGTERM ../cl/cl.h 74;" d CL_SIGWINCH ../cl/cl.h 75;" d CL_STDIN_TTY ../cl/cl.h 76;" d CMSG_CONF ../common/msg.h /^ CMSG_CONF, CMSG_CONT, CMSG_CONT_EX,$/;" e CMSG_CONT ../common/msg.h /^ CMSG_CONF, CMSG_CONT, CMSG_CONT_EX,$/;" e CMSG_CONT_EX ../common/msg.h /^ CMSG_CONF, CMSG_CONT, CMSG_CONT_EX,$/;" e CMSG_CONT_Q ../common/msg.h /^ CMSG_CONT_R, CMSG_CONT_S, CMSG_CONT_Q } cmsg_t;$/;" e CMSG_CONT_R ../common/msg.h /^ CMSG_CONT_R, CMSG_CONT_S, CMSG_CONT_Q } cmsg_t;$/;" e CMSG_CONT_S ../common/msg.h /^ CMSG_CONT_R, CMSG_CONT_S, CMSG_CONT_Q } cmsg_t;$/;" e CNO ../vi/vs_refresh.c 153;" d file: CNO ../vi/vs_refresh.c 733;" d file: CNOTSET ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" e CNTRL_B ../vi/vi.h /^ CNTRL_B, CNTRL_D, CNTRL_E, CNTRL_F,$/;" e CNTRL_D ../vi/vi.h /^ CNTRL_B, CNTRL_D, CNTRL_E, CNTRL_F,$/;" e CNTRL_E ../vi/vi.h /^ CNTRL_B, CNTRL_D, CNTRL_E, CNTRL_F,$/;" e CNTRL_F ../vi/vi.h /^ CNTRL_B, CNTRL_D, CNTRL_E, CNTRL_F,$/;" e CNTRL_U ../vi/vi.h /^ CNTRL_U, CNTRL_Y, Z_CARAT, Z_PLUS$/;" e CNTRL_Y ../vi/vi.h /^ CNTRL_U, CNTRL_Y, Z_CARAT, Z_PLUS$/;" e CODE_OOB ../ipc/ip.h 173;" d COLOR_CARET ../motif_l/m_motif.h 25;" d COLOR_INVALID ../motif_l/m_motif.h 15;" d COLOR_INVERSE ../motif_l/m_motif.h 22;" d COLOR_SELECT ../motif_l/m_motif.h 26;" d COLOR_STANDARD ../gtk/gtkviscreen.c 75;" d file: COLOR_STANDARD ../motif_l/m_motif.h 21;" d COLOR_STANDOUT ../gtk/gtkviscreen.c 76;" d file: COLUMN ../motif_l/m_motif.h 48;" d COL_OFF ../common/util.h 29;" d COMMAND ../cl/cl_funcs.c 661;" d file: CONF_NO ../common/common.h /^typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;$/;" e CONF_QUIT ../common/common.h /^typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;$/;" e CONF_YES ../common/common.h /^typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;$/;" e CONST ../common/key.h 41;" d CONST ../common/key.h 72;" d CONV ../common/common.h /^typedef struct _conv CONV;$/;" t CONVERT ../common/conv.c 69;" d file: CONVERT ../common/conv.c 85;" d file: CONVERT2 ../common/conv.c 230;" d file: CONVERT2 ../common/conv.c 248;" d file: CONVWIN ../common/common.h /^typedef struct _conv_win CONVWIN;$/;" t CONV_BUFFER_SIZE ../common/conv.c 63;" d file: CSC ../common/common.h /^typedef struct _csc CSC;$/;" t CSCOPE_CMD_FMT ../ex/ex_cscope.c 404;" d file: CSCOPE_DBFILE ../ex/ex_cscope.c 39;" d file: CSCOPE_LEN ../ex/ex_subst.c 1247;" d file: CSCOPE_NLINES_FMT ../ex/ex_cscope.c 672;" d file: CSCOPE_PATHS ../ex/ex_cscope.c 40;" d file: CSCOPE_PROMPT ../ex/ex_cscope.c 1021;" d file: CSCOPE_QUERIES ../ex/ex_cscope.c 598;" d file: CSCOPE_RE_SPACE ../ex/ex_subst.c 1246;" d file: CS_EMP ../vi/vi.h 157;" d CS_EOF ../vi/vi.h 158;" d CS_EOL ../vi/vi.h 159;" d CS_SOF ../vi/vi.h 160;" d CUT_LINEMODE ../common/cut.h 76;" d CUT_NUMOPT ../common/cut.h 77;" d CUT_NUMREQ ../common/cut.h 78;" d C_ABBR ../ex/ex_def.h 12;" d C_APPEND ../ex/ex_def.h 11;" d C_ARGS ../ex/ex_def.h 13;" d C_AT ../ex/ex_def.h 10;" d C_BANG ../ex/ex_def.h 3;" d C_BG ../ex/ex_def.h 14;" d C_CARATSET ../common/common.h /^typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;$/;" e C_CD ../ex/ex_def.h 16;" d C_CHANGE ../ex/ex_def.h 15;" d C_CHDIR ../ex/ex_def.h 17;" d C_COPY ../ex/ex_def.h 18;" d C_CSCOPE ../ex/ex_def.h 19;" d C_DELETE ../ex/ex_def.h 20;" d C_DISPLAY ../ex/ex_def.h 21;" d C_EDIT ../ex/ex_def.h 22;" d C_EQUAL ../ex/ex_def.h 8;" d C_EX ../ex/ex_def.h 23;" d C_EXUSAGE ../ex/ex_def.h 24;" d C_FG ../ex/ex_def.h 26;" d C_FILE ../ex/ex_def.h 25;" d C_GLOBAL ../ex/ex_def.h 27;" d C_HASH ../ex/ex_def.h 4;" d C_HELP ../ex/ex_def.h 28;" d C_INSERT ../ex/ex_def.h 29;" d C_JOIN ../ex/ex_def.h 30;" d C_K ../ex/ex_def.h 31;" d C_LIST ../ex/ex_def.h 32;" d C_MAP ../ex/ex_def.h 35;" d C_MARK ../ex/ex_def.h 34;" d C_MKEXRC ../ex/ex_def.h 36;" d C_MOVE ../ex/ex_def.h 33;" d C_NEXT ../ex/ex_def.h 37;" d C_NOCHANGE ../common/common.h /^typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;$/;" e C_NOTSET ../common/common.h /^typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;$/;" e C_NUMBER ../ex/ex_def.h 38;" d C_OPEN ../ex/ex_def.h 39;" d C_PERLCMD ../ex/ex_def.h 41;" d C_PERLDOCMD ../ex/ex_def.h 42;" d C_PRESERVE ../ex/ex_def.h 43;" d C_PREVIOUS ../ex/ex_def.h 44;" d C_PRINT ../ex/ex_def.h 40;" d C_PUT ../ex/ex_def.h 45;" d C_QUIT ../ex/ex_def.h 46;" d C_READ ../ex/ex_def.h 47;" d C_RECOVER ../ex/ex_def.h 48;" d C_RESIZE ../ex/ex_def.h 49;" d C_REWIND ../ex/ex_def.h 50;" d C_SCRIPT ../ex/ex_def.h 52;" d C_SCROLL ../ex/ex_def.h 2;" d C_SET ../ex/ex_def.h 53;" d C_SHELL ../ex/ex_def.h 54;" d C_SHIFTL ../ex/ex_def.h 7;" d C_SHIFTR ../ex/ex_def.h 9;" d C_SOURCE ../ex/ex_def.h 55;" d C_STAR ../ex/ex_def.h 6;" d C_STOP ../ex/ex_def.h 56;" d C_SUBAGAIN ../ex/ex_def.h 5;" d C_SUBSTITUTE ../ex/ex_def.h 51;" d C_SUBTILDE ../ex/ex_def.h 80;" d C_SUSPEND ../ex/ex_def.h 57;" d C_T ../ex/ex_def.h 58;" d C_TAG ../ex/ex_def.h 59;" d C_TAGNEXT ../ex/ex_def.h 60;" d C_TAGPOP ../ex/ex_def.h 61;" d C_TAGPREV ../ex/ex_def.h 62;" d C_TAGTOP ../ex/ex_def.h 63;" d C_TCLCMD ../ex/ex_def.h 64;" d C_UNABBREVIATE ../ex/ex_def.h 66;" d C_UNDO ../ex/ex_def.h 65;" d C_UNMAP ../ex/ex_def.h 67;" d C_V ../ex/ex_def.h 68;" d C_VERSION ../ex/ex_def.h 69;" d C_VISUAL_EX ../ex/ex_def.h 70;" d C_VISUAL_VI ../ex/ex_def.h 71;" d C_VIUSAGE ../ex/ex_def.h 72;" d C_VSPLIT ../ex/ex_def.h 73;" d C_WN ../ex/ex_def.h 75;" d C_WQ ../ex/ex_def.h 76;" d C_WRITE ../ex/ex_def.h 74;" d C_XIT ../ex/ex_def.h 77;" d C_YANK ../ex/ex_def.h 78;" d C_Z ../ex/ex_def.h 79;" d C_ZEROSET ../common/common.h /^typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;$/;" e CharAt ../gtk/gtkviscreen.c 71;" d file: CharAt ../motif_l/m_motif.h 33;" d ColAt ../gtk/gtkviscreen.c 73;" d file: DB ../cl/cl.h 13;" d DBG_FATAL ../common/exf.h 75;" d DBG_NOCACHE ../common/exf.h 76;" d DB_BUFFER_SMALL ../common/db.h 4;" d DB_vi_change ../common/vi_auto.h 31;" d DB_vi_cursor ../common/vi_auto.h 13;" d DB_vi_mark ../common/vi_auto.h 23;" d DB_vi_marker ../common/vi_auto.h 5;" d DEBUG ../perl_api/perlsfio.c 36;" d file: DEBUG_PRINT1 ../motif_l/xtabbed.c 1507;" d file: DEBUG_PRINT2 ../motif_l/xtabbed.c 1508;" d file: DEBUG_PRINT3 ../motif_l/xtabbed.c 1509;" d file: DEBUG_PRINT4 ../motif_l/xtabbed.c 1510;" d file: DEBUG_PRINT5 ../motif_l/xtabbed.c 1511;" d file: DEC ../vi/v_increment.c 32;" d file: DEFAULT_NOPRINT ../common/gs.h 81;" d DEFAULT_VI_SCREEN_HEIGHT_LINES ../gtk/gtkviscreen.c 20;" d file: DEFAULT_VI_SCREEN_WIDTH_CHARS ../gtk/gtkviscreen.c 19;" d file: DIVIDESTR ../vi/vs_msg.c 858;" d file: DOT ../vi/vi.c 54;" d file: DOTMOTION ../vi/vi.c 55;" d file: EC_INTERRUPT ../common/key.h 245;" d EC_MAPCOMMAND ../common/key.h 246;" d EC_MAPINPUT ../common/key.h 247;" d EC_MAPNODIGIT ../common/key.h 248;" d EC_QUOTED ../common/key.h 249;" d EC_RAW ../common/key.h 250;" d EC_TIMEOUT ../common/key.h 251;" d ENDMESSAGE ../tcl_api/tcl.c 49;" d file: ENTIRE_LINE ../common/cut.c 135;" d file: EQUAL ../ex/ex_tag.c 1255;" d file: EVENT ../common/common.h /^typedef struct _event EVENT;$/;" t EXCMD ../common/common.h /^typedef struct _excmd EXCMD;$/;" t EXCMDLIST ../ex/ex.h /^} EXCMDLIST;$/;" t EXCMD_RUNNING ../common/screen.h 50;" d EXF ../common/common.h /^typedef struct _exf EXF;$/;" t EXM_EMPTYBUF ../ex/ex.h /^ EXM_EMPTYBUF, \/* Empty buffer. *\/$/;" e EXM_FILECOUNT ../ex/ex.h /^ EXM_FILECOUNT, \/* Too many file names. *\/$/;" e EXM_LOCKED ../ex/ex.h /^ EXM_LOCKED, \/* Another thread is active. *\/$/;" e EXM_NOCANON ../ex/ex.h /^ EXM_NOCANON, \/* No terminal interface. *\/$/;" e EXM_NOCANON_F ../ex/ex.h /^ EXM_NOCANON_F, \/* EXM_NOCANO: filter version. *\/$/;" e EXM_NOFILEYET ../ex/ex.h /^ EXM_NOFILEYET, \/* Illegal until a file read in. *\/$/;" e EXM_NOPREVBUF ../ex/ex.h /^ EXM_NOPREVBUF, \/* No previous buffer specified. *\/$/;" e EXM_NOPREVRE ../ex/ex.h /^ EXM_NOPREVRE, \/* No previous RE specified. *\/$/;" e EXM_NOSUSPEND ../ex/ex.h /^ EXM_NOSUSPEND, \/* No suspension. *\/$/;" e EXM_SECURE ../ex/ex.h /^ EXM_SECURE, \/* Illegal if secure edit option set. *\/$/;" e EXM_SECURE_F ../ex/ex.h /^ EXM_SECURE_F, \/* EXM_SECURE: filter version *\/$/;" e EXM_USAGE ../ex/ex.h /^ EXM_USAGE \/* Standard usage message. *\/$/;" e EXP ../ex/ex.h 191;" d EXP_CSCINIT ../ex/ex.h 188;" d EX_PRIVATE ../ex/ex.h /^} EX_PRIVATE;$/;" t EX_TERM_CE ../common/gs.h /^typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t;$/;" e EX_TERM_SCROLL ../common/gs.h /^typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t;$/;" e E_ABSMARK ../ex/ex.h 146;" d E_ADDR1 ../ex/ex.h 18;" d E_ADDR2 ../ex/ex.h 19;" d E_ADDR2_ALL ../ex/ex.h 20;" d E_ADDR2_NONE ../ex/ex.h 21;" d E_ADDR_DEF ../ex/ex.h 147;" d E_ADDR_ZERO ../ex/ex.h 22;" d E_ADDR_ZERODEF ../ex/ex.h 23;" d E_AUTOPRINT ../ex/ex.h 24;" d E_BLIGNORE ../ex/ex.h 137;" d E_CHARACTER ../common/key.h /^ E_CHARACTER, \/* Input character: e_c set. *\/$/;" e E_CLRFLAG ../ex/ex.h 25;" d E_C_BUFFER ../ex/ex.h 121;" d E_C_CARAT ../ex/ex.h 122;" d E_C_COUNT ../ex/ex.h 123;" d E_C_COUNT_NEG ../ex/ex.h 124;" d E_C_COUNT_POS ../ex/ex.h 125;" d E_C_DASH ../ex/ex.h 126;" d E_C_DOT ../ex/ex.h 127;" d E_C_EQUAL ../ex/ex.h 128;" d E_C_FORCE ../ex/ex.h 129;" d E_C_HASH ../ex/ex.h 130;" d E_C_LIST ../ex/ex.h 131;" d E_C_PLUS ../ex/ex.h 132;" d E_C_PRINT ../ex/ex.h 133;" d E_DELTA ../ex/ex.h 148;" d E_EOF ../common/key.h /^ E_EOF, \/* End of input (NOT ^D). *\/$/;" e E_ERR ../common/key.h /^ E_ERR, \/* Input error. *\/$/;" e E_FLAGS ../common/key.h /^ E_FLAGS \/* Flags *\/$/;" e E_INTERRUPT ../common/key.h /^ E_INTERRUPT, \/* Interrupt. *\/$/;" e E_IPCOMMAND ../common/key.h /^ E_IPCOMMAND, \/* IP command: e_ipcom set. *\/$/;" e E_MODIFY ../ex/ex.h 149;" d E_MOVETOEND ../ex/ex.h 150;" d E_NAMEDISCARD ../ex/ex.h 138;" d E_NEWLINE ../ex/ex.h 151;" d E_NEWSCREEN ../ex/ex.h 26;" d E_NOAUTO ../ex/ex.h 139;" d E_NOPRDEF ../ex/ex.h 140;" d E_NOTUSED ../common/key.h /^ E_NOTUSED = 0, \/* Not set. *\/$/;" e E_NRSEP ../ex/ex.h 141;" d E_OPTNUM ../ex/ex.h 142;" d E_PRESERVE ../ex/ex.h 144;" d E_REPAINT ../common/key.h /^ E_REPAINT, \/* Repaint: e_flno, e_tlno set. *\/$/;" e E_SEARCH_WMSG ../ex/ex.h 152;" d E_SECURE ../ex/ex.h 27;" d E_SIGHUP ../common/key.h /^ E_SIGHUP, \/* SIGHUP. *\/$/;" e E_SIGTERM ../common/key.h /^ E_SIGTERM, \/* SIGTERM. *\/$/;" e E_STRING ../common/key.h /^ E_STRING, \/* Input string: e_csp, e_len set. *\/$/;" e E_TIMEOUT ../common/key.h /^ E_TIMEOUT, \/* Timeout. *\/$/;" e E_USELASTCMD ../ex/ex.h 153;" d E_VIONLY ../ex/ex.h 28;" d E_VISEARCH ../ex/ex.h 154;" d E_VLITONLY ../ex/ex.h 143;" d E_WRESIZE ../common/key.h /^ E_WRESIZE, \/* Window resize. *\/$/;" e FALSE ../cl/cl.h 104;" d FILE2INT ../common/key.h 91;" d FILE2INT5 ../common/key.h 29;" d FILE2INT5 ../common/key.h 60;" d FILTER_BANG ../ex/ex.h /^enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE };$/;" e enum:filtertype FILTER_RBANG ../ex/ex.h /^enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE };$/;" e enum:filtertype FILTER_READ ../ex/ex.h /^enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE };$/;" e enum:filtertype FILTER_WRITE ../ex/ex.h /^enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE };$/;" e enum:filtertype FINDHELP ../ex/ex_cscope.c 54;" d file: FLUSH ../vi/vs_line.c 409;" d file: FLUSH ../vi/vs_msg.c 458;" d file: FL_CLR ../common/util.h 15;" d FL_INIT ../common/util.h 13;" d FL_ISSET ../common/util.h 16;" d FL_SET ../common/util.h 14;" d FMTCOLS ../common/recover.c 421;" d file: FORWARD ../common/common.h /^typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;$/;" e FQMARK ../vi/v_mark.c /^enum which {BQMARK, FQMARK};$/;" e enum:which file: FREE_SPACE ../common/mem.h 133;" d FREE_SPACEW ../common/mem.h 140;" d FREF ../common/common.h /^typedef struct _fref FREF;$/;" t FR_CURSORSET ../common/gs.h 29;" d FR_DONTDELETE ../common/gs.h 30;" d FR_EXNAMED ../common/gs.h 31;" d FR_NAMECHANGE ../common/gs.h 32;" d FR_NEWFILE ../common/gs.h 33;" d FR_RECOVER ../common/gs.h 34;" d FR_TMPEXIT ../common/gs.h 35;" d FR_TMPFILE ../common/gs.h 36;" d FR_UNLOCKED ../common/gs.h 37;" d FSEARCH ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" e FS_ALL ../common/exf.h 79;" d FS_APPEND ../common/exf.h 80;" d FS_FORCE ../common/exf.h 81;" d FS_OPENERR ../common/exf.h 82;" d FS_POSSIBLE ../common/exf.h 83;" d FS_SETALT ../common/exf.h 84;" d F_CLR ../common/util.h 25;" d F_DEVSET ../common/exf.h 63;" d F_FIRSTMODIFY ../common/exf.h 64;" d F_INIT ../common/util.h 23;" d F_ISSET ../common/util.h 26;" d F_MODIFIED ../common/exf.h 65;" d F_MULTILOCK ../common/exf.h 66;" d F_NOLOG ../common/exf.h 67;" d F_RCV_NORM ../common/exf.h 68;" d F_RCV_ON ../common/exf.h 69;" d F_SET ../common/util.h 24;" d F_UNDO ../common/exf.h 70;" d FlagAt ../gtk/gtkviscreen.c 72;" d file: FlagAt ../motif_l/m_motif.h 35;" d GCLP ../cl/cl.h 81;" d GC_ERR ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GC_ERR_NOFLUSH ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GC_EVENT ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GC_FATAL ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GC_INTERRUPT ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GC_OK ../vi/vi.c /^ GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK$/;" e file: GET_SPACE_GOTO ../common/mem.h 62;" d GET_SPACE_GOTOC ../common/mem.h 76;" d GET_SPACE_GOTOW ../common/mem.h 78;" d GET_SPACE_RET ../common/mem.h 80;" d GET_SPACE_RETC ../common/mem.h 94;" d GET_SPACE_RETW ../common/mem.h 96;" d GLOBAL ../ex/ex_global.c /^enum which {GLOBAL, V};$/;" e enum:which file: GLOBAL_CLP ../cl/cl_main.c 248;" d file: GLOBAL_CLP ../cl/cl_main.c 283;" d file: GO_COLUMNS ../common/gs.h 73;" d GO_LINES ../common/gs.h 74;" d GO_SECURE ../common/gs.h 75;" d GO_TERM ../common/gs.h 76;" d GREATER ../ex/ex_tag.c 1256;" d file: GS ../common/common.h /^typedef struct _gs GS;$/;" t GTK_CLASS_TYPE ../gtk/gtkviscreen.h 15;" d GTK_CLASS_TYPE ../gtk/gtkviwindow.h 6;" d GTK_IS_VI_SCREEN ../gtk/gtkviscreen.h 21;" d GTK_IS_VI_SCREEN_CLASS ../gtk/gtkviscreen.h 22;" d GTK_IS_VI_WINDOW ../gtk/gtkviwindow.h 12;" d GTK_IS_VI_WINDOW_CLASS ../gtk/gtkviwindow.h 13;" d GTK_TYPE_VI_SCREEN ../gtk/gtkviscreen.h 18;" d GTK_TYPE_VI_WINDOW ../gtk/gtkviwindow.h 9;" d GTK_VI_SCREEN ../gtk/gtkviscreen.h 19;" d GTK_VI_SCREEN_CLASS ../gtk/gtkviscreen.h 20;" d GTK_VI_WINDOW ../gtk/gtkviwindow.h 10;" d GTK_VI_WINDOW_CLASS ../gtk/gtkviwindow.h 11;" d G_ABBREV ../common/gs.h 115;" d G_BELLSCHED ../common/gs.h 116;" d G_INTERRUPTED ../common/gs.h 117;" d G_RECOVER_SET ../common/gs.h 118;" d G_SCRIPTED ../common/gs.h 119;" d G_SCRWIN ../common/gs.h 120;" d G_SNAPSHOT ../common/gs.h 121;" d G_SRESTART ../common/gs.h 122;" d GtkVi ../gtk/gtkvi.h /^typedef struct _GtkVi GtkVi;$/;" t GtkViScreen ../gtk/gtkviscreen.h /^typedef struct _GtkViScreen GtkViScreen;$/;" t GtkViScreenClass ../gtk/gtkviscreen.h /^typedef struct _GtkViScreenClass GtkViScreenClass;$/;" t GtkViWindow ../gtk/gtkviwindow.h /^typedef struct _GtkViWindow GtkViWindow;$/;" t GtkViWindowClass ../gtk/gtkviwindow.h /^typedef struct _GtkViWindowClass GtkViWindowClass;$/;" t HALFSCREEN ../vi/vi.h 342;" d HALFTEXT ../vi/vi.h 340;" d HANDLE_WEIRDNESS ../vi/vs_smap.c 289;" d file: HEXC ../vi/v_increment.c 36;" d file: HEXL ../vi/v_increment.c 38;" d file: HMAP ../vi/vi.h 291;" d HORIZ_FOLLOW ../vi/vs_split.c /^typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t;$/;" e file: HORIZ_PRECEDE ../vi/vs_split.c /^typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t;$/;" e file: INCREMENT ../ex/ex_argv.c 424;" d file: INDX_HUP ../cl/cl.h 53;" d INDX_INT ../cl/cl.h 54;" d INDX_MAX ../cl/cl.h 57;" d INDX_TERM ../cl/cl.h 55;" d INDX_WINCH ../cl/cl.h 56;" d INITMESSAGE ../tcl_api/tcl.c 46;" d file: INPUT2INT5 ../common/key.h 39;" d INPUT2INT5 ../common/key.h 70;" d INP_EOF ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" e INP_EOF ../ip/ip_read.c /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t;$/;" e file: INP_ERR ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" e INP_ERR ../ip/ip_read.c /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t;$/;" e file: INP_INTR ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" e INP_OK ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" e INP_OK ../ip/ip_read.c /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t;$/;" e file: INP_TIMEOUT ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" e INP_TIMEOUT ../ip/ip_read.c /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t;$/;" e file: INSERT ../ex/ex_append.c /^enum which {APPEND, CHANGE, INSERT};$/;" e enum:which file: INT2CHAR ../common/key.h 35;" d INT2CHAR ../common/key.h 66;" d INT2FILE ../common/key.h 31;" d INT2FILE ../common/key.h 62;" d INT2SYS ../common/key.h 37;" d INT2SYS ../common/key.h 68;" d INTERRUPTED ../common/key.h 237;" d INTERRUPT_CHECK ../common/key.h 236;" d INTEXT_CHECK ../vi/v_paragraph.c 30;" d file: INTISUCS ../gtk/gtkviscreen.c 9;" d file: INTISWIDE ../common/key.h 55;" d INTISWIDE ../common/key.h 85;" d INTUCS ../gtk/gtkviscreen.c 10;" d file: IPCMSGHDR ../ipc/ip.h /^} IPCMSGHDR;$/;" t IPFUNLIST ../ipc/ip.h /^} IPFUNLIST;$/;" t IPFunc ../ipc/ip.h /^typedef int (*IPFunc) (struct _ip_vi_win *);$/;" t IPFunc_1 ../ipc/ip.h /^typedef int (*IPFunc_1) (struct _ip_vi_win *, u_int32_t);$/;" t IPFunc_12 ../ipc/ip.h /^typedef int (*IPFunc_12) (struct _ip_vi_win *, u_int32_t, u_int32_t);$/;" t IPFunc_123 ../ipc/ip.h /^typedef int (*IPFunc_123) (struct _ip_vi_win *, u_int32_t, u_int32_t, u_int32_t);$/;" t IPFunc_1a ../ipc/ip.h /^typedef int (*IPFunc_1a) (struct _ip_vi_win *, u_int32_t, const char *, u_int32_t);$/;" t IPFunc_a ../ipc/ip.h /^typedef int (*IPFunc_a) (struct _ip_vi_win *, const char *, u_int32_t);$/;" t IPFunc_ab1 ../ipc/ip.h /^typedef int (*IPFunc_ab1) (struct _ip_vi_win *, const char *, u_int32_t, $/;" t IPO_CODE_LEN ../ipc/ip.h 54;" d IPO_INT_LEN ../ipc/ip.h 55;" d IPP ../ipc/ip.h 47;" d IPSIOPS ../ipc/ip.h /^} IPSIOPS;$/;" t IPUnmarshall ../ipc/ip.h /^typedef int (*IPUnmarshall) (struct _ip_vi_win *, IP_BUF *, IPFunc);$/;" t IPVI ../ipc/ip.h /^typedef struct _ip_vi IPVI;$/;" t IPVISET ../ipc/ipc_method.c 124;" d file: IPVIWIN ../ipc/ip.h /^typedef struct _ip_vi_win IPVIWIN;$/;" t IP_BUF ../ipc/ip.h /^} IP_BUF;$/;" t IP_IN_EX ../ipc/ip.h 41;" d IP_ON_ALTERNATE ../ipc/ip.h 42;" d IP_PRIVATE ../ipc/ip.h /^} IP_PRIVATE;$/;" t IP_SCR_VI_INIT ../ipc/ip.h 43;" d ISALNUM ../common/key.h 52;" d ISALNUM ../common/key.h 83;" d ISALPHA ../common/key.h 50;" d ISALPHA ../common/key.h 81;" d ISBLANK ../common/key.h 48;" d ISBLANK ../common/key.h 79;" d ISCMD ../vi/vi.h 26;" d ISCNTRL ../common/key.h 42;" d ISCNTRL ../common/key.h 73;" d ISDIGIT ../common/key.h 44;" d ISDIGIT ../common/key.h 75;" d ISMOTION ../vi/vi.h 28;" d ISPRINT ../common/key.h 46;" d ISPRINT ../common/key.h 77;" d IS_ESCAPE ../ex/ex.h 48;" d IS_HSPLIT ../vi/vi.h 358;" d IS_ONELINE ../vi/vi.h 338;" d IS_RESTART ../vi/v_txt.c 269;" d file: IS_RUNNING ../vi/v_txt.c 270;" d file: IS_SMALL ../vi/vi.h 337;" d IS_SPLIT ../vi/vi.h 364;" d IS_VSPLIT ../vi/vi.h 361;" d Inverse ../gtk/gtkviscreen.c 655;" d file: KEY ../vi/vi.c 413;" d file: KEYLIST ../common/key.h /^} KEYLIST;$/;" t KEYS_WAITING ../common/key.h 194;" d KEY_COL ../common/conv.h 1;" d KEY_LEN ../common/gs.h 95;" d KEY_NAME ../common/gs.h 98;" d KEY_VAL ../common/gs.h 106;" d KEY_VEOF ../common/gs.h /^typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;$/;" e KEY_VERASE ../common/gs.h /^typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;$/;" e KEY_VKILL ../common/gs.h /^typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;$/;" e KEY_VWERASE ../common/gs.h /^typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;$/;" e K_BACKSLASH ../common/key.h /^ K_BACKSLASH, \/* \\ *\/$/;" e K_CARAT ../common/key.h /^ K_CARAT, \/* ^ *\/$/;" e K_CNTRLD ../common/key.h /^ K_CNTRLD, \/* ^D *\/$/;" e K_CNTRLR ../common/key.h /^ K_CNTRLR, \/* ^R *\/$/;" e K_CNTRLT ../common/key.h /^ K_CNTRLT, \/* ^T *\/$/;" e K_CNTRLZ ../common/key.h /^ K_CNTRLZ, \/* ^Z *\/$/;" e K_COLON ../common/key.h /^ K_COLON, \/* : *\/$/;" e K_CR ../common/key.h /^ K_CR, \/* \\r *\/$/;" e K_ESCAPE ../common/key.h /^ K_ESCAPE, \/* ^[ *\/$/;" e K_FORMFEED ../common/key.h /^ K_FORMFEED, \/* \\f *\/$/;" e K_HEXCHAR ../common/key.h /^ K_HEXCHAR, \/* ^X *\/$/;" e K_NL ../common/key.h /^ K_NL, \/* \\n *\/$/;" e K_NOTUSED ../common/key.h /^ K_NOTUSED = 0, \/* Not set. *\/$/;" e K_RIGHTBRACE ../common/key.h /^ K_RIGHTBRACE, \/* } *\/$/;" e K_RIGHTPAREN ../common/key.h /^ K_RIGHTPAREN, \/* ) *\/$/;" e K_TAB ../common/key.h /^ K_TAB, \/* \\t *\/$/;" e K_VERASE ../common/key.h /^ K_VERASE, \/* set from tty: default ^H *\/$/;" e K_VKILL ../common/key.h /^ K_VKILL, \/* set from tty: default ^U *\/$/;" e K_VLNEXT ../common/key.h /^ K_VLNEXT, \/* set from tty: default ^V *\/$/;" e K_VWERASE ../common/key.h /^ K_VWERASE, \/* set from tty: default ^W *\/$/;" e K_ZERO ../common/key.h /^ K_ZERO \/* 0 *\/$/;" e L ../common/multibyte.h 24;" d L ../common/multibyte.h 43;" d LANGCODESET ../common/conv.c 34;" d file: LANGCODESET ../common/conv.c 38;" d file: LASTLINE ../vi/vi.h 330;" d LAST_SIGNAL ../gtk/gtkviscreen.c /^ LAST_SIGNAL$/;" e file: LAST_SIGNAL ../gtk/gtkviwindow.c /^ LAST_SIGNAL$/;" e file: LEFT ../ex/ex_shift.c /^enum which {LEFT, RIGHT};$/;" e enum:which file: LESS ../ex/ex_tag.c 1257;" d file: LF_CLR ../common/util.h 20;" d LF_INIT ../common/util.h 18;" d LF_ISSET ../common/util.h 21;" d LF_SET ../common/util.h 19;" d LINE_APPEND ../common/common.h /^typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;$/;" e LINE_DELETE ../common/common.h /^typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;$/;" e LINE_INSERT ../common/common.h /^typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;$/;" e LINE_RESET ../common/common.h /^typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;$/;" e LINE_RESOLVE ../vi/v_txt.c 692;" d file: LITTLEWORD ../vi/v_word.c /^enum which {BIGWORD, LITTLEWORD};$/;" e enum:which file: LMARK ../common/common.h /^typedef struct _lmark LMARK;$/;" t LNO ../vi/vs_refresh.c 151;" d file: LNO ../vi/vs_refresh.c 731;" d file: LOADSYM ../common/dldb.c 25;" d file: LOCK_END ../common/gs.h 192;" d LOCK_FAILED ../common/common.h /^typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;$/;" e LOCK_INIT ../common/gs.h 183;" d LOCK_SUCCESS ../common/common.h /^typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;$/;" e LOCK_SUCCESS ../motif/m_cde.c 26;" d file: LOCK_SUCCESS ../motif/m_main.c 29;" d file: LOCK_SUCCESS ../motif_l/m_copypaste.c 28;" d file: LOCK_SUCCESS ../motif_l/m_func.c 27;" d file: LOCK_SUCCESS ../motif_l/m_menu.c 30;" d file: LOCK_SUCCESS ../motif_l/m_options.c 35;" d file: LOCK_SUCCESS ../motif_l/m_prompt.c 28;" d file: LOCK_SUCCESS ../motif_l/m_ruler.c 43;" d file: LOCK_SUCCESS ../motif_l/m_search.c 33;" d file: LOCK_SUCCESS ../motif_l/m_tags.c 64;" d file: LOCK_SUCCESS ../motif_l/m_util.c 28;" d file: LOCK_SUCCESS ../motif_l/m_vi.c 38;" d file: LOCK_TRY ../common/gs.h 186;" d LOCK_UNAVAIL ../common/common.h /^typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;$/;" e LOCK_UNLOCK ../common/gs.h 189;" d LOG_CORRECT ../vi/v_itxt.c 55;" d file: LOG_CURSOR_END ../common/log.h 14;" d LOG_CURSOR_HIT ../common/vi_rec.c 17;" d file: LOG_CURSOR_INIT ../common/log.h 13;" d LOG_ERR ../common/log.c 74;" d file: LOG_LINE_APPEND_B ../common/log.h 15;" d LOG_LINE_APPEND_F ../common/log.h 16;" d LOG_LINE_DELETE_B ../common/log.h 17;" d LOG_LINE_DELETE_F ../common/log.h 18;" d LOG_LINE_RESET_B ../common/log.h 19;" d LOG_LINE_RESET_F ../common/log.h 20;" d LOG_MARK ../common/log.h 21;" d LOG_NOTYPE ../common/log.h 12;" d L_ADDED ../common/screen.h 132;" d L_CHANGED ../common/screen.h 133;" d L_DELETED ../common/screen.h 134;" d L_JOINED ../common/screen.h 135;" d L_MOVED ../common/screen.h 136;" d L_NAME ../ex/ex_tag.c 499;" d file: L_SHIFT ../common/screen.h 137;" d L_SLOP ../ex/ex_tag.c 500;" d file: L_SPACE ../ex/ex_tag.c 501;" d file: L_TAG ../ex/ex_tag.c 502;" d file: L_YANKED ../common/screen.h 138;" d Linear ../motif_l/m_motif.h 31;" d MALLOC ../common/mem.h 173;" d MALLOC_GOTO ../common/mem.h 177;" d MALLOC_NOMSG ../common/mem.h 181;" d MALLOC_RET ../common/mem.h 184;" d MAPPED_KEYS_WAITING ../common/key.h 195;" d MAP_FILE ../ex/ex_tag.c 1069;" d file: MARK ../common/common.h /^typedef struct _mark MARK;$/;" t MARK_DELETED ../common/mark.h 37;" d MARK_USERSET ../common/mark.h 38;" d MAXCMDNAMELEN ../ex/ex.h 37;" d MAXHOSTNAMELEN ../common/recover.c 338;" d file: MAXIMUM_SCREEN_COLS ../common/options_f.c 63;" d file: MAXIMUM_SCREEN_ROWS ../common/options_f.c 93;" d file: MAXNUM ../common/msg.c 477;" d file: MAXNUM ../common/msg.c 531;" d file: MAXVIKEY ../vi/vi.h 146;" d MAX_ABBREVIATION_EXPANSION ../vi/v_txt.c 576;" d file: MAX_BIT_SEQ ../common/gs.h 90;" d MAX_CHARACTER_COLUMNS ../common/key.h 102;" d MAX_CHAR_T ../common/multibyte.h 11;" d MAX_CHAR_T ../common/multibyte.h 30;" d MAX_FAST_KEY ../common/gs.h 94;" d MCENTRE ../motif_l/xtabbed.c 66;" d file: MEGABYTE ../ex/ex_source.c 61;" d file: MEMCMP ../common/multibyte.h 47;" d MEMCPY ../common/multibyte.h 50;" d MEMCPYW ../common/key.h 96;" d MEMMOVE ../common/mem.h 204;" d MEMMOVE ../common/multibyte.h 49;" d MEMMOVEW ../common/key.h 98;" d MEMSET ../common/mem.h 205;" d MINIMUM_SCREEN_COLS ../common/screen.h 25;" d MINIMUM_SCREEN_ROWS ../common/screen.h 24;" d MINREAD ../ex/ex_script.c 480;" d file: MLEFT ../motif_l/xtabbed.c 65;" d file: MODESIZE ../vi/vs_refresh.c 843;" d file: MRIGHT ../motif_l/xtabbed.c 67;" d file: MSGH ../common/msg.h /^typedef struct _msgh MSGH; \/* MSGS list head structure. *\/$/;" t MSGS ../common/common.h /^typedef struct _msg MSGS;$/;" t MSTAT_SHOWLAST ../common/msg.h 64;" d MSTAT_TRUNCATE ../common/msg.h 65;" d MULTIBYTE_H ../common/multibyte.h 2;" d M_BERR ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_DBERR ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_ERR ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_INFO ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_NONE ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_PI ../motif_l/xtabbed.c 1518;" d file: M_SYSERR ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e M_VINFO ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" e MakeXImage ../motif_l/xtabbed.c /^static XImage *MakeXImage(Display *dpy, int w, int h)$/;" f file: NADD_SLONG ../common/util.h 47;" d NADD_USLONG ../common/util.h 55;" d NEEDFILE ../ex/ex.h 57;" d NEEDNEWLINE ../ex/ex_subst.c 305;" d file: NEEDSP ../ex/ex_subst.c 330;" d file: NIL ../perl_api/perlsfio.c 51;" d file: NNFITS ../common/util.h 43;" d NOEXIST ../ex/ex_init.c /^enum rc { NOEXIST, NOPERM, RCOK };$/;" e enum:rc file: NOMMAPIFFCNTL ../common/exf.c 283;" d file: NOMMAPIFFCNTL ../common/exf.c 285;" d file: NONE ../motif_l/xtabbed.c 61;" d file: NOPERM ../ex/ex_init.c /^enum rc { NOEXIST, NOPERM, RCOK };$/;" e enum:rc file: NOTSET ../common/common.h /^typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;$/;" e NO_DISPLAY ../common/options.h /^enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY };$/;" e enum:optdisp NPFITS ../common/util.h 45;" d NSEARCH ../motif_l/m_options.c 239;" d file: NSEARCH ../motif_l/m_options.c 240;" d file: NSEARCH ../motif_l/m_options.c 673;" d file: NSEARCH ../motif_l/m_options.c 674;" d file: NUM_ERR ../common/util.h /^enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER };$/;" e enum:nresult NUM_OK ../common/util.h /^enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER };$/;" e enum:nresult NUM_OVER ../common/util.h /^enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER };$/;" e enum:nresult NUM_UNDER ../common/util.h /^enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER };$/;" e enum:nresult OABBREV ../common/options.c /^} OABBREV;$/;" t file: OCNO ../vi/vs_refresh.c 154;" d file: OCNO ../vi/vs_refresh.c 734;" d file: OCTAL ../vi/v_increment.c 40;" d file: OFFSET ../ipc/ipc_cmd.c 22;" d file: OG_CLR ../common/options.h 33;" d OG_D_STR ../common/options.h 39;" d OG_D_VAL ../common/options.h 40;" d OG_ISSET ../common/options.h 37;" d OG_SET ../common/options.h 34;" d OG_STR ../common/options.h 35;" d OG_VAL ../common/options.h 36;" d OI ../common/options.c 317;" d file: OI ../common/options.c 444;" d file: OLNO ../vi/vs_refresh.c 152;" d file: OLNO ../vi/vs_refresh.c 732;" d file: ONE_FOR_EOF ../cl/cl_read.c 256;" d file: OOBLNO ../common/mark.h 25;" d OPTION ../common/common.h /^typedef struct _option OPTION;$/;" t OPTLIST ../common/common.h /^typedef struct _optlist OPTLIST;$/;" t OPT_0BOOL ../common/options.h /^ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type;$/;" e enum:_optlist:: OPT_1BOOL ../common/options.h /^ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type;$/;" e enum:_optlist:: OPT_ADISP ../common/options.h 85;" d OPT_ALWAYS ../common/options.h 86;" d OPT_GLOBAL ../common/options.h 72;" d OPT_NDISP ../common/options.h 87;" d OPT_NOSAVE ../common/options.h 88;" d OPT_NOSET ../common/options.h 89;" d OPT_NOUNSET ../common/options.h 90;" d OPT_NOZERO ../common/options.h 91;" d OPT_NUM ../common/options.h /^ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type;$/;" e enum:_optlist:: OPT_SELECTED ../common/options.h 73;" d OPT_STR ../common/options.h /^ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type;$/;" e enum:_optlist:: OPT_WC ../common/options.c 39;" d file: OPT_WC ../common/options.c 41;" d file: OS_DEF ../common/options.h 46;" d OS_NOFREE ../common/options.h 47;" d OS_STR ../common/options.h 48;" d OS_STRDUP ../common/options.h 49;" d OUTCH ../ex/ex_subst.c 1354;" d file: O_ALTWERASE ../common/options_def.h 2;" d O_AUTOINDENT ../common/options_def.h 3;" d O_AUTOPRINT ../common/options_def.h 4;" d O_AUTOWRITE ../common/options_def.h 5;" d O_BACKUP ../common/options_def.h 6;" d O_BEAUTIFY ../common/options_def.h 7;" d O_CDPATH ../common/options_def.h 8;" d O_CEDIT ../common/options_def.h 9;" d O_CLR ../common/options.h 56;" d O_COLUMNS ../common/options_def.h 10;" d O_COMBINED ../common/options_def.h 11;" d O_COMMENT ../common/options_def.h 12;" d O_D_CLR ../common/options.h 66;" d O_D_ISSET ../common/options.h 70;" d O_D_SET ../common/options.h 67;" d O_D_STR ../common/options.h 68;" d O_D_VAL ../common/options.h 69;" d O_EDCOMPATIBLE ../common/options_def.h 14;" d O_ERRORBELLS ../common/options_def.h 16;" d O_ESCAPETIME ../common/options_def.h 15;" d O_EXLOCK ../common/db1.c 633;" d file: O_EXRC ../common/options_def.h 17;" d O_EXTENDED ../common/options_def.h 18;" d O_FILEC ../common/options_def.h 19;" d O_FILEENCODING ../common/options_def.h 20;" d O_FLASH ../common/options_def.h 21;" d O_HARDTABS ../common/options_def.h 22;" d O_ICLOWER ../common/options_def.h 23;" d O_IGNORECASE ../common/options_def.h 24;" d O_INPUTENCODING ../common/options_def.h 25;" d O_ISSET ../common/options.h 60;" d O_KEYTIME ../common/options_def.h 26;" d O_LEFTRIGHT ../common/options_def.h 27;" d O_LINES ../common/options_def.h 28;" d O_LISP ../common/options_def.h 29;" d O_LIST ../common/options_def.h 30;" d O_LOCKFILES ../common/options_def.h 31;" d O_MAGIC ../common/options_def.h 32;" d O_MATCHTIME ../common/options_def.h 33;" d O_MESG ../common/options_def.h 34;" d O_MODELINE ../common/options_def.h 35;" d O_MSGCAT ../common/options_def.h 36;" d O_NOPRINT ../common/options_def.h 37;" d O_NUMBER ../common/options_def.h 38;" d O_NUMBER_FMT ../vi/vi.h 320;" d O_NUMBER_LENGTH ../vi/vi.h 321;" d O_OCTAL ../common/options_def.h 39;" d O_OPEN ../common/options_def.h 40;" d O_OPTIMIZE ../common/options_def.h 41;" d O_OPTIONCOUNT ../common/options_def.h 83;" d O_PARAGRAPHS ../common/options_def.h 42;" d O_PATH ../common/options_def.h 43;" d O_PRINT ../common/options_def.h 44;" d O_PROMPT ../common/options_def.h 45;" d O_READONLY ../common/options_def.h 46;" d O_RECDIR ../common/options_def.h 47;" d O_REDRAW ../common/options_def.h 48;" d O_REMAP ../common/options_def.h 49;" d O_REPORT ../common/options_def.h 50;" d O_RULER ../common/options_def.h 51;" d O_SCROLL ../common/options_def.h 52;" d O_SEARCHINCR ../common/options_def.h 53;" d O_SECTIONS ../common/options_def.h 54;" d O_SECURE ../common/options_def.h 55;" d O_SET ../common/options.h 57;" d O_SHELL ../common/options_def.h 56;" d O_SHELLMETA ../common/options_def.h 57;" d O_SHIFTWIDTH ../common/options_def.h 58;" d O_SHLOCK ../common/db1.c 632;" d file: O_SHOWMATCH ../common/options_def.h 59;" d O_SHOWMODE ../common/options_def.h 60;" d O_SIDESCROLL ../common/options_def.h 61;" d O_SLOWOPEN ../common/options_def.h 62;" d O_SOURCEANY ../common/options_def.h 63;" d O_STR ../common/options.h 58;" d O_TABSTOP ../common/options_def.h 64;" d O_TAGLENGTH ../common/options_def.h 65;" d O_TAGS ../common/options_def.h 66;" d O_TERM ../common/options_def.h 67;" d O_TERSE ../common/options_def.h 68;" d O_TILDEOP ../common/options_def.h 69;" d O_TIMEOUT ../common/options_def.h 70;" d O_TMP_DIRECTORY ../common/options_def.h 13;" d O_TTYWERASE ../common/options_def.h 71;" d O_V ../common/options.h 27;" d O_VAL ../common/options.h 59;" d O_VERBOSE ../common/options_def.h 72;" d O_W1200 ../common/options_def.h 73;" d O_W300 ../common/options_def.h 74;" d O_W9600 ../common/options_def.h 75;" d O_WARN ../common/options_def.h 76;" d O_WINDOW ../common/options_def.h 77;" d O_WINDOWNAME ../common/options_def.h 78;" d O_WRAPLEN ../common/options_def.h 79;" d O_WRAPMARGIN ../common/options_def.h 80;" d O_WRAPSCAN ../common/options_def.h 81;" d O_WRITEANY ../common/options_def.h 82;" d O_cmd ../vi/v_itxt.c /^enum which { o_cmd, O_cmd };$/;" e enum:which file: PACKAGE ../perl_api/perlsfio.c 37;" d file: PFI ../motif_l/m_copypaste.c /^typedef int (*PFI)();$/;" t file: PROMPTCHAR ../ex/ex.h 12;" d P_BOTTOM ../vi/vi.h /^typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;$/;" e P_FILL ../vi/vi.h /^typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;$/;" e P_MIDDLE ../vi/vi.h /^typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;$/;" e P_TOP ../vi/vi.h /^typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;$/;" e PatternWidget ../motif_l/m_search.c /^static String PatternWidget = "text";$/;" v file: Present ../motif/m_cde.c 38;" d file: QREM ../common/key.c 432;" d file: Q_BNEXT ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" e Q_BTHIS ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" e Q_NOTSET ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" e Q_VNEXT ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" e Q_VTHIS ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" e RANGE ../ex/ex.h /^typedef struct _range RANGE;$/;" t RCHAR_BIT ../common/multibyte.h 13;" d RCHAR_BIT ../common/multibyte.h 32;" d RCHAR_T ../common/multibyte.h /^typedef char RCHAR_T;$/;" t RCHAR_T ../common/multibyte.h /^typedef wchar_t RCHAR_T;$/;" t RCHAR_T_MAX ../common/multibyte.h 28;" d RCHAR_T_MAX ../common/multibyte.h 9;" d RCNO ../cl/cl.h 92;" d RCNO ../ipc/ip.h 52;" d RCOK ../ex/ex_init.c /^enum rc { NOEXIST, NOPERM, RCOK };$/;" e enum:rc file: RCV_EMAIL ../common/exf.h 87;" d RCV_ENDSESSION ../common/exf.h 88;" d RCV_PERIOD ../common/exf.h 56;" d RCV_PRESERVE ../common/exf.h 89;" d RCV_SNAPSHOT ../common/exf.h 90;" d REALLOC ../common/mem.h 194;" d REALLOC ../motif_l/m_vi.c 167;" d file: REALLOC ../motif_l/m_vi.c 170;" d file: RELOC ../common/dldb.c 10;" d file: REM ../common/msg.c 145;" d file: RENAME ../gtk/gtkviwindow.c /^ RENAME,$/;" e file: RESIZED ../gtk/gtkviscreen.c /^ RESIZED,$/;" e file: RE_WSTART ../common/screen.h 171;" d RE_WSTART_LEN ../common/screen.h 173;" d RE_WSTOP ../common/screen.h 172;" d RE_WSTOP_LEN ../common/screen.h 174;" d RIGHT ../ex/ex_shift.c /^enum which {LEFT, RIGHT};$/;" e enum:which file: RLNO ../cl/cl.h 93;" d RLNO ../ipc/ip.h 51;" d ROW ../motif_l/m_motif.h 45;" d R_erase ../common/cut.h /^ size_t R_erase; \/* 0-N: 'R' erase count. *\/$/;" m struct:_text Required ../motif/m_cde.c 36;" d file: RotatedTextItem ../motif_l/xtabbed.c /^} RotatedTextItem;$/;" t file: SA_ALTERNATE ../common/gs.h /^typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t;$/;" e SA_ALTERNATE ../gtk/gtkviscreen.c /^enum { SA_ALTERNATE, SA_INVERSE };$/;" e file: SA_INVERSE ../common/gs.h /^typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t;$/;" e SA_INVERSE ../gtk/gtkviscreen.c /^enum { SA_ALTERNATE, SA_INVERSE };$/;" e file: SCNO ../vi/vs_refresh.c 155;" d file: SCNO ../vi/vs_refresh.c 735;" d file: SCR ../common/common.h /^typedef struct _scr SCR;$/;" t SCREEN_COLS ../vi/vi.h 322;" d SCRIPT ../common/common.h /^typedef struct _script SCRIPT;$/;" t SCROLL_W ../vi/vs_msg.c /^ SCROLL_W, \/* User wait. *\/$/;" e file: SCROLL_W_EX ../vi/vs_msg.c /^ SCROLL_W_EX, \/* User wait, or enter : to continue. *\/$/;" e file: SCROLL_W_QUIT ../vi/vs_msg.c /^ SCROLL_W_QUIT \/* User wait, or enter q to quit. *\/$/;" e file: SC_ARGNOFREE ../common/screen.h 261;" d SC_ARGRECOVER ../common/screen.h 262;" d SC_AT_SET ../common/screen.h 263;" d SC_COMEDIT ../common/screen.h 264;" d SC_CONV_ERROR ../common/screen.h 277;" d SC_EX ../common/screen.h 217;" d SC_EXIT ../common/screen.h 256;" d SC_EXIT_FORCE ../common/screen.h 257;" d SC_EX_GLOBAL ../common/screen.h 265;" d SC_EX_SILENT ../common/screen.h 266;" d SC_EX_WAIT_NO ../common/screen.h 267;" d SC_EX_WAIT_YES ../common/screen.h 268;" d SC_FSWITCH ../common/screen.h 258;" d SC_READONLY ../common/screen.h 269;" d SC_RE_SEARCH ../common/screen.h 270;" d SC_RE_SUBST ../common/screen.h 271;" d SC_SCRIPT ../common/screen.h 272;" d SC_SCR_CENTER ../common/screen.h 252;" d SC_SCR_EX ../common/screen.h 246;" d SC_SCR_EXWROTE ../common/screen.h 248;" d SC_SCR_REDRAW ../common/screen.h 250;" d SC_SCR_REFORMAT ../common/screen.h 249;" d SC_SCR_TOP ../common/screen.h 253;" d SC_SCR_VI ../common/screen.h 247;" d SC_SSWITCH ../common/screen.h 259;" d SC_STATUS ../common/screen.h 273;" d SC_STATUS_CNT ../common/screen.h 274;" d SC_TINPUT ../common/screen.h 275;" d SC_TINPUT_INFO ../common/screen.h 276;" d SC_VI ../common/screen.h 218;" d SDEC ../vi/v_increment.c 34;" d file: SEARCH_CSCOPE ../common/screen.h 176;" d SEARCH_CSEARCH ../common/screen.h 177;" d SEARCH_CSUBST ../common/screen.h 178;" d SEARCH_EOL ../common/screen.h 179;" d SEARCH_EXTEND ../common/screen.h 180;" d SEARCH_FIRST ../common/screen.h 181;" d SEARCH_IC ../common/screen.h 182;" d SEARCH_ICL ../common/screen.h 183;" d SEARCH_INCR ../common/screen.h 184;" d SEARCH_LITERAL ../common/screen.h 185;" d SEARCH_MSG ../common/screen.h 186;" d SEARCH_NOOPT ../common/screen.h 187;" d SEARCH_PARSE ../common/screen.h 188;" d SEARCH_SET ../common/screen.h 189;" d SEARCH_TAG ../common/screen.h 190;" d SEARCH_WMSG ../common/screen.h 191;" d SEARCH_WRAP ../common/screen.h 192;" d SELECT_DISPLAY ../common/options.h /^enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY };$/;" e enum:optdisp SEQ ../common/common.h /^typedef struct _seq SEQ;$/;" t SEQ_ABBREV ../common/common.h /^typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;$/;" e SEQ_COMMAND ../common/common.h /^typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;$/;" e SEQ_FUNCMAP ../common/seq.h 39;" d SEQ_INPUT ../common/common.h /^typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;$/;" e SEQ_NOOVERWRITE ../common/seq.h 40;" d SEQ_SCREEN ../common/seq.h 41;" d SEQ_USERDEF ../common/seq.h 42;" d SHELLECHO ../ex/ex_argv.c 138;" d file: SHELLOFFSET ../ex/ex_argv.c 139;" d file: SHIFT ../common/key.c 291;" d file: SIGBLOCK ../common/gs.h 205;" d SIGBLOCK ../common/gs.h 210;" d SIGS ../ex/ex_shell.c /^} SIGS;$/;" t file: SIGUNBLOCK ../common/gs.h 207;" d SIGUNBLOCK ../common/gs.h 211;" d SINGLE_CHAR_COMMANDS ../ex/ex.c 386;" d file: SIZE ../common/multibyte.h 51;" d SIZE_HMAP ../vi/vi.h 281;" d SI_ADDSTR ../ipc/ip.h 225;" d SI_ADDSTR ../ipc/ipc_def.h 2;" d SI_ATTRIBUTE ../ipc/ip.h 226;" d SI_ATTRIBUTE ../ipc/ipc_def.h 3;" d SI_BELL ../ipc/ip.h 227;" d SI_BELL ../ipc/ipc_def.h 4;" d SI_BUSY_OFF ../ipc/ip.h 228;" d SI_BUSY_OFF ../ipc/ipc_def.h 5;" d SI_BUSY_ON ../ipc/ip.h 229;" d SI_BUSY_ON ../ipc/ipc_def.h 6;" d SI_CLRTOEOL ../ipc/ip.h 230;" d SI_CLRTOEOL ../ipc/ipc_def.h 7;" d SI_DELETELN ../ipc/ip.h 231;" d SI_DELETELN ../ipc/ipc_def.h 8;" d SI_DISCARD ../ipc/ip.h 232;" d SI_DISCARD ../ipc/ipc_def.h 9;" d SI_EDITOPT ../ipc/ip.h 233;" d SI_EDITOPT ../ipc/ipc_def.h 10;" d SI_EVENT_MAX ../ipc/ip.h 245;" d SI_EVENT_SUP ../ipc/ipc_def.h 23;" d SI_INSERTLN ../ipc/ip.h 234;" d SI_INSERTLN ../ipc/ipc_def.h 11;" d SI_MOVE ../ipc/ip.h 235;" d SI_MOVE ../ipc/ipc_def.h 12;" d SI_QUIT ../ipc/ip.h 236;" d SI_QUIT ../ipc/ipc_def.h 13;" d SI_REDRAW ../ipc/ip.h 237;" d SI_REDRAW ../ipc/ipc_def.h 14;" d SI_REFRESH ../ipc/ip.h 238;" d SI_REFRESH ../ipc/ipc_def.h 15;" d SI_RENAME ../ipc/ip.h 239;" d SI_RENAME ../ipc/ipc_def.h 16;" d SI_REPLY ../ipc/ip.h 240;" d SI_REPLY ../ipc/ipc_def.h 17;" d SI_REWRITE ../ipc/ip.h 241;" d SI_REWRITE ../ipc/ipc_def.h 18;" d SI_SCROLLBAR ../ipc/ip.h 242;" d SI_SCROLLBAR ../ipc/ipc_def.h 19;" d SI_SELECT ../ipc/ip.h 243;" d SI_SELECT ../ipc/ipc_def.h 20;" d SI_SPLIT ../ipc/ip.h 244;" d SI_SPLIT ../ipc/ipc_def.h 21;" d SI_WADDSTR ../ipc/ipc_def.h 22;" d SKIP_PAST_NEWLINE ../ex/ex_tag.c 1259;" d file: SMAP ../vi/vi.h /^} SMAP;$/;" t SMAP_CACHE ../vi/vi.h 213;" d SMAP_FLUSH ../vi/vi.h 214;" d SM_APPEND ../common/screen.h /^ SM_APPEND = 0, SM_CHANGE, SM_COMMAND, SM_INSERT,$/;" e enum:_scr:: SM_CHANGE ../common/screen.h /^ SM_APPEND = 0, SM_CHANGE, SM_COMMAND, SM_INSERT,$/;" e enum:_scr:: SM_COMMAND ../common/screen.h /^ SM_APPEND = 0, SM_CHANGE, SM_COMMAND, SM_INSERT,$/;" e enum:_scr:: SM_INSERT ../common/screen.h /^ SM_APPEND = 0, SM_CHANGE, SM_COMMAND, SM_INSERT,$/;" e enum:_scr:: SM_REPLACE ../common/screen.h /^ SM_REPLACE } showmode;$/;" e enum:_scr:: SPRINTF ../common/multibyte.h 18;" d SPRINTF ../common/multibyte.h 37;" d STANDARD_TAB ../common/key.h 213;" d STRCMP ../common/multibyte.h 19;" d STRCMP ../common/multibyte.h 38;" d STRLEN ../common/multibyte.h 15;" d STRLEN ../common/multibyte.h 34;" d STRPBRK ../common/multibyte.h 20;" d STRPBRK ../common/multibyte.h 39;" d STRSET ../common/multibyte.h 22;" d STRSET ../common/multibyte.h 41;" d STRTOL ../common/multibyte.h 16;" d STRTOL ../common/multibyte.h 35;" d STRTOUL ../common/multibyte.h 17;" d STRTOUL ../common/multibyte.h 36;" d SUB_FIRST ../ex/ex_subst.c 32;" d file: SUB_MUSTSETR ../ex/ex_subst.c 33;" d file: S_EMPTY ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: S_EOF ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: S_NOPREV ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: S_NOTFOUND ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: S_SOF ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: S_WRAP ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" e file: SpacingRatio ../motif_l/m_search.c 225;" d file: SpacingRatio ../motif_l/m_tags.c 130;" d file: StringArray ../motif_l/xtabbed.c /^typedef String * StringArray;$/;" t file: TABCH ../vi/vs_line.c 29;" d file: TABCH ../vi/vs_line.c 31;" d file: TABHT ../motif_l/xtabbed.c 3034;" d file: TAB_OFF ../vi/vi.h 355;" d TAB_RESET ../vi/vs_relative.c 149;" d file: TAG ../common/common.h /^typedef struct _tag TAG;$/;" t TAGF ../common/common.h /^typedef struct _tagf TAGF;$/;" t TAGF_ERR ../ex/tag.h 47;" d TAGF_ERR_WARN ../ex/tag.h 48;" d TAGQ ../common/common.h /^typedef struct _tagq TAGQ;$/;" t TAG_BADLNO ../ex/ex.h /^ TAG_BADLNO, \/* Tag line doesn't exist. *\/$/;" e TAG_CSCOPE ../ex/tag.h 105;" d TAG_EMPTY ../ex/ex.h /^ TAG_EMPTY, \/* Tags stack is empty. *\/$/;" e TAG_SEARCH ../ex/ex.h /^ TAG_SEARCH \/* Tags search pattern wasn't found. *\/$/;" e TCC ../tcl_api/tcl.c 754;" d file: TCENTRE ../motif_l/xtabbed.c 63;" d file: TEMPORARY_FILE_STRING ../common/gs.h 12;" d TERM_BS ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TERM_CEDIT ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TERM_CR ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TERM_ESC ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TERM_OK ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TERM_PUSH_SHIFT ../common/key.c 373;" d file: TERM_SEARCH ../common/cut.h /^ TERM_BS, TERM_CEDIT, TERM_CR, TERM_ESC, TERM_OK, TERM_SEARCH$/;" e enum:_text:: TEXT ../common/common.h /^typedef struct _text TEXT;$/;" t TEXTH ../common/cut.h /^typedef struct _texth TEXTH; \/* TEXT list head structure. *\/$/;" t TE_SENT ../cl/cl.h /^ TE_SENT=0, TI_SENT } ti_te;$/;" e enum:_cl_private:: TGW_SET ../cl/cl.h /^ TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;$/;" e enum:_cl_private:: TGW_UNKNOWN ../cl/cl.h /^ TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;$/;" e enum:_cl_private:: TGW_UNSET ../cl/cl.h /^ TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;$/;" e enum:_cl_private:: TI_SENT ../cl/cl.h /^ TE_SENT=0, TI_SENT } ti_te;$/;" e enum:_cl_private:: TKLIST ../cl/cl_term.c /^} TKLIST;$/;" t file: TL ../cl/cl_bsd.c /^} TL;$/;" t file: TLEFT ../motif_l/xtabbed.c 62;" d file: TMAP ../vi/vi.h 293;" d TOPMASK ../common/key.c 292;" d file: TOUPPER ../common/multibyte.h 21;" d TOUPPER ../common/multibyte.h 40;" d TRIGHT ../motif_l/xtabbed.c 64;" d file: TRUE ../cl/cl.h 101;" d TSEARCH ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" e TXT_ADDNEWLINE ../common/key.h 254;" d TXT_AICHARS ../common/key.h 255;" d TXT_ALTWERASE ../common/key.h 256;" d TXT_APPENDEOL ../common/key.h 257;" d TXT_AUTOINDENT ../common/key.h 258;" d TXT_BACKSLASH ../common/key.h 259;" d TXT_BEAUTIFY ../common/key.h 260;" d TXT_BS ../common/key.h 261;" d TXT_CEDIT ../common/key.h 262;" d TXT_CNTRLD ../common/key.h 263;" d TXT_CNTRLT ../common/key.h 264;" d TXT_CR ../common/key.h 265;" d TXT_DOTTERM ../common/key.h 266;" d TXT_EMARK ../common/key.h 267;" d TXT_EOFCHAR ../common/key.h 268;" d TXT_ESCAPE ../common/key.h 269;" d TXT_FILEC ../common/key.h 270;" d TXT_INFOLINE ../common/key.h 271;" d TXT_MAPINPUT ../common/key.h 272;" d TXT_NLECHO ../common/key.h 273;" d TXT_NUMBER ../common/key.h 274;" d TXT_OVERWRITE ../common/key.h 275;" d TXT_PROMPT ../common/key.h 276;" d TXT_RECORD ../common/key.h 277;" d TXT_REPLACE ../common/key.h 278;" d TXT_REPLAY ../common/key.h 279;" d TXT_RESOLVE ../common/key.h 280;" d TXT_SEARCHINCR ../common/key.h 281;" d TXT_SHOWMATCH ../common/key.h 282;" d TXT_TTYWERASE ../common/key.h 283;" d TXT_WRAPMARGIN ../common/key.h 284;" d TabData ../motif_l/xtabbed.c /^} *TabData;$/;" t file: TabsOrientation ../motif_l/xtabbed.c /^ } TabsOrientation;$/;" t file: ToRowCol ../motif_l/m_motif.h 28;" d UCHAR_T ../common/multibyte.h /^typedef u_char UCHAR_T;$/;" t UCHAR_T ../common/multibyte.h /^typedef u_int UCHAR_T;$/;" t UNDO_BACKWARD ../common/log.h /^typedef enum { UNDO_FORWARD, UNDO_BACKWARD, UNDO_SETLINE } undo_t;$/;" e UNDO_FORWARD ../common/log.h /^typedef enum { UNDO_FORWARD, UNDO_BACKWARD, UNDO_SETLINE } undo_t;$/;" e UNDO_SETLINE ../common/log.h /^typedef enum { UNDO_FORWARD, UNDO_BACKWARD, UNDO_SETLINE } undo_t;$/;" e UNMAP_TST ../vi/v_txt.c 222;" d file: UPDATE_CURSOR ../vi/vs_refresh.c 30;" d file: UPDATE_POSITION ../vi/v_txt.c 229;" d file: UPDATE_SCREEN ../vi/vs_refresh.c 31;" d file: USAGE ../cl/cl_funcs.c 872;" d file: USAGE ../cl/cl_funcs.c 876;" d file: USAGE ../ip/ip_funcs.c 516;" d file: USAGE ../ip/ip_funcs.c 519;" d file: USE_DYNAMIC_LOADING ../perl_api/perlsfio.c 35;" d file: Useful ../motif/m_cde.c 37;" d file: V ../ex/ex_global.c /^enum which {GLOBAL, V};$/;" e enum:which file: VCS ../vi/vi.h /^} VCS;$/;" t VC_BUFFER ../vi/vi.h 70;" d VC_C1RESET ../vi/vi.h 71;" d VC_C1SET ../vi/vi.h 72;" d VC_C2SET ../vi/vi.h 73;" d VC_ISDOT ../vi/vi.h 74;" d VERT_FOLLOW ../vi/vs_split.c /^typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t;$/;" e file: VERT_PRECEDE ../vi/vs_split.c /^typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t;$/;" e file: VICMD ../vi/vi.h /^} VICMD;$/;" t VIKEYS ../vi/vi.h /^typedef struct _vikeys VIKEYS;$/;" t VIM_COMBUF ../vi/vi.h /^ VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL,$/;" e VIM_EMPTY ../vi/vi.h /^ VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL,$/;" e VIM_EOF ../vi/vi.h /^ VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL,$/;" e VIM_EOL ../vi/vi.h /^ VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL,$/;" e VIM_NOCOM ../vi/vi.h /^ VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE$/;" e VIM_NOCOM_B ../vi/vi.h /^ VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE$/;" e VIM_USAGE ../vi/vi.h /^ VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE$/;" e VIM_WRESIZE ../vi/vi.h /^ VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE$/;" e VIP ../vi/vi.h 318;" d VIPFUNLIST ../ipc/ip.h /^} VIPFUNLIST;$/;" t VIP_CUR_INVALID ../vi/vi.h 305;" d VIP_DIVIDER ../vi/vi.h 306;" d VIP_N_EX_PAINT ../vi/vi.h 307;" d VIP_N_EX_REDRAW ../vi/vi.h 308;" d VIP_N_REFRESH ../vi/vi.h 309;" d VIP_N_RENUMBER ../vi/vi.h 310;" d VIP_RCM_LAST ../vi/vi.h 311;" d VIP_S_MODELINE ../vi/vi.h 312;" d VIP_S_REFRESH ../vi/vi.h 313;" d VI_C_BOL ../ipc/ip.h 175;" d VI_C_BOL ../ipc/ipc_def.h 24;" d VI_C_BOTTOM ../ipc/ip.h 176;" d VI_C_BOTTOM ../ipc/ipc_def.h 25;" d VI_C_DEL ../ipc/ip.h 177;" d VI_C_DEL ../ipc/ipc_def.h 26;" d VI_C_DOWN ../ipc/ip.h 178;" d VI_C_DOWN ../ipc/ipc_def.h 27;" d VI_C_EOL ../ipc/ip.h 179;" d VI_C_EOL ../ipc/ipc_def.h 28;" d VI_C_INSERT ../ipc/ip.h 180;" d VI_C_INSERT ../ipc/ipc_def.h 29;" d VI_C_LEFT ../ipc/ip.h 181;" d VI_C_LEFT ../ipc/ipc_def.h 30;" d VI_C_PGDOWN ../ipc/ip.h 182;" d VI_C_PGDOWN ../ipc/ipc_def.h 31;" d VI_C_PGUP ../ipc/ip.h 183;" d VI_C_PGUP ../ipc/ipc_def.h 32;" d VI_C_RIGHT ../ipc/ip.h 184;" d VI_C_RIGHT ../ipc/ipc_def.h 33;" d VI_C_SEARCH ../ipc/ip.h 185;" d VI_C_SEARCH ../ipc/ipc_def.h 34;" d VI_C_SETTOP ../ipc/ip.h 186;" d VI_C_SETTOP ../ipc/ipc_def.h 35;" d VI_C_TOP ../ipc/ip.h 187;" d VI_C_TOP ../ipc/ipc_def.h 36;" d VI_C_UP ../ipc/ip.h 188;" d VI_C_UP ../ipc/ipc_def.h 37;" d VI_DB_INIT_LOG ../common/exf.c 1589;" d file: VI_DB_INIT_LOG ../common/exf.c 1591;" d file: VI_EDIT ../ipc/ip.h 189;" d VI_EDIT ../ipc/ipc_def.h 38;" d VI_EDITOPT ../ipc/ip.h 190;" d VI_EDITOPT ../ipc/ipc_def.h 39;" d VI_EDITSPLIT ../ipc/ip.h 191;" d VI_EDITSPLIT ../ipc/ipc_def.h 40;" d VI_EOF ../ipc/ip.h 192;" d VI_EOF ../ipc/ipc_def.h 41;" d VI_ERR ../ipc/ip.h 193;" d VI_ERR ../ipc/ipc_def.h 42;" d VI_EVENT_SUP ../ipc/ipc_def.h 60;" d VI_FHEADER ../common/recover.c 109;" d file: VI_FLAGS ../ipc/ip.h 210;" d VI_FLAGS ../ipc/ipc_def.h 43;" d VI_INTERRUPT ../ipc/ip.h 194;" d VI_INTERRUPT ../ipc/ipc_def.h 44;" d VI_MOUSE_MOVE ../ipc/ip.h 195;" d VI_MOUSE_MOVE ../ipc/ipc_def.h 45;" d VI_PHEADER ../common/recover.c 110;" d file: VI_PRIVATE ../vi/vi.h /^} VI_PRIVATE;$/;" t VI_QUIT ../ipc/ip.h 196;" d VI_QUIT ../ipc/ipc_def.h 46;" d VI_RESIZE ../ipc/ip.h 197;" d VI_RESIZE ../ipc/ipc_def.h 47;" d VI_SCREEN_BORDER_ROOM ../gtk/gtkviscreen.c 21;" d file: VI_SCR_CFLUSH ../vi/vi.h 297;" d VI_SEARCH_EXT ../ipc/ip.h 213;" d VI_SEARCH_IC ../ipc/ip.h 214;" d VI_SEARCH_ICL ../ipc/ip.h 215;" d VI_SEARCH_INCR ../ipc/ip.h 216;" d VI_SEARCH_LIT ../ipc/ip.h 217;" d VI_SEARCH_REV ../ipc/ip.h 218;" d VI_SEARCH_WR ../ipc/ip.h 219;" d VI_SEL_END ../ipc/ip.h 198;" d VI_SEL_END ../ipc/ipc_def.h 48;" d VI_SEL_START ../ipc/ip.h 199;" d VI_SEL_START ../ipc/ipc_def.h 49;" d VI_SIGHUP ../ipc/ip.h 200;" d VI_SIGHUP ../ipc/ipc_def.h 50;" d VI_SIGTERM ../ipc/ip.h 201;" d VI_SIGTERM ../ipc/ipc_def.h 51;" d VI_STRING ../ipc/ip.h 202;" d VI_STRING ../ipc/ipc_def.h 52;" d VI_TAG ../ipc/ip.h 203;" d VI_TAG ../ipc/ipc_def.h 53;" d VI_TAGAS ../ipc/ip.h 204;" d VI_TAGAS ../ipc/ipc_def.h 54;" d VI_TAGSPLIT ../ipc/ip.h 205;" d VI_TAGSPLIT ../ipc/ipc_def.h 55;" d VI_UNDO ../ipc/ip.h 206;" d VI_UNDO ../ipc/ipc_def.h 56;" d VI_WQ ../ipc/ip.h 207;" d VI_WQ ../ipc/ipc_def.h 57;" d VI_WRITE ../ipc/ip.h 208;" d VI_WRITE ../ipc/ipc_def.h 58;" d VI_WRITEAS ../ipc/ip.h 209;" d VI_WRITEAS ../ipc/ipc_def.h 59;" d VMC ../common/msg.c 742;" d file: VM_CMDFAILED ../vi/vi.h 52;" d VM_COMMASK ../vi/vi.h 56;" d VM_CUTREQ ../vi/vi.h 53;" d VM_LDOUBLE ../vi/vi.h 54;" d VM_LMODE ../vi/vi.h 55;" d VM_RCM ../vi/vi.h 62;" d VM_RCM_MASK ../vi/vi.h 67;" d VM_RCM_SET ../vi/vi.h 63;" d VM_RCM_SETFNB ../vi/vi.h 64;" d VM_RCM_SETLAST ../vi/vi.h 65;" d VM_RCM_SETNNB ../vi/vi.h 66;" d V_ABS ../vi/vi.h 130;" d V_ABS_C ../vi/vi.h 131;" d V_ABS_L ../vi/vi.h 132;" d V_CHAR ../vi/vi.h 133;" d V_CNT ../vi/vi.h 134;" d V_C_SETTOP ../vi/v_event.c 316;" d file: V_DOT ../vi/vi.h 135;" d V_EDIT ../vi/v_event.c 318;" d file: V_EDITOPT ../vi/v_event.c 320;" d file: V_EDITSPLIT ../vi/v_event.c 322;" d file: V_EMARK ../vi/v_event.c 324;" d file: V_KEYW ../vi/vi.h 136;" d V_MOTION ../vi/vi.h 137;" d V_MOVE ../vi/vi.h 138;" d V_OBUF ../vi/vi.h 139;" d V_QUIT ../vi/v_event.c 326;" d file: V_RBUF ../vi/vi.h 140;" d V_SEARCH ../vi/v_event.c 328;" d file: V_SECURE ../vi/vi.h 141;" d V_TAG ../vi/v_event.c 330;" d file: V_TAGAS ../vi/v_event.c 332;" d file: V_TAGSPLIT ../vi/v_event.c 334;" d file: V_WQ ../vi/v_event.c 336;" d file: V_WRITE ../vi/v_event.c 338;" d file: V_WRITEAS ../vi/v_event.c 340;" d file: WC ../common/key.h 58;" d WC ../common/key.h 89;" d WIN ../common/common.h /^typedef struct _win WIN;$/;" t WIPP ../ipc/ip.h 48;" d WMTSPACE ../vi/v_txt.c 809;" d file: WN ../ex/ex_write.c /^enum which {WN, WQ, WRITE, XIT};$/;" e enum:which file: WQ ../ex/ex_write.c /^enum which {WN, WQ, WRITE, XIT};$/;" e enum:which file: WRITE ../ex/ex_write.c /^enum which {WN, WQ, WRITE, XIT};$/;" e enum:which file: WS ../common/key.h 56;" d WS ../common/key.h 87;" d WVS ../common/key.h 57;" d WVS ../common/key.h 88;" d W_TMP_INUSE ../common/screen.h 75;" d XIT ../ex/ex_write.c /^enum which {WN, WQ, WRITE, XIT};$/;" e enum:which file: XPOS ../motif_l/m_motif.h 38;" d XRotAddToLinkedList ../motif_l/xtabbed.c /^static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item)$/;" f file: XRotCreateTextItem ../motif_l/xtabbed.c /^static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font, float angle, char *text, int align)$/;" f file: XRotDrawAlignedImageString ../motif_l/xtabbed.c /^int XRotDrawAlignedImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align)$/;" f file: XRotDrawAlignedString ../motif_l/xtabbed.c /^int XRotDrawAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align)$/;" f file: XRotDrawHorizontalString ../motif_l/xtabbed.c /^static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)$/;" f file: XRotDrawImageString ../motif_l/xtabbed.c /^int XRotDrawImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str)$/;" f file: XRotDrawString ../motif_l/xtabbed.c /^int XRotDrawString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str)$/;" f file: XRotFreeTextItem ../motif_l/xtabbed.c /^static void XRotFreeTextItem(Display *dpy, RotatedTextItem *item)$/;" f file: XRotMagnifyImage ../motif_l/xtabbed.c /^static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage)$/;" f file: XRotPaintAlignedString ../motif_l/xtabbed.c /^static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg)$/;" f file: XRotRetrieveFromCache ../motif_l/xtabbed.c /^static RotatedTextItem *XRotRetrieveFromCache(Display *dpy, XFontStruct *font, float angle, char *text, int align)$/;" f file: XRotSetBoundingBoxPad ../motif_l/xtabbed.c /^void XRotSetBoundingBoxPad(int p)$/;" f file: XRotSetMagnification ../motif_l/xtabbed.c /^void XRotSetMagnification(float m)$/;" f file: XRotTextExtents ../motif_l/xtabbed.c /^XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, float angle, int x, int y, char *text, int align)$/;" f file: XRotVersion ../motif_l/xtabbed.c /^float XRotVersion(char *str, int n)$/;" f file: XTERM_RENAME ../cl/cl_funcs.c 696;" d file: XV_COPYRIGHT ../motif_l/xtabbed.c 52;" d file: XV_VERSION ../motif_l/xtabbed.c 51;" d file: XfwfDownTabs ../motif_l/xtabbed.c /^ XfwfUpTabs, XfwfDownTabs, XfwfLeftTabs, XfwfRightTabs,$/;" e file: XfwfLeftTabs ../motif_l/xtabbed.c /^ XfwfUpTabs, XfwfDownTabs, XfwfLeftTabs, XfwfRightTabs,$/;" e file: XfwfRightTabs ../motif_l/xtabbed.c /^ XfwfUpTabs, XfwfDownTabs, XfwfLeftTabs, XfwfRightTabs,$/;" e file: XfwfUpTabs ../motif_l/xtabbed.c /^ XfwfUpTabs, XfwfDownTabs, XfwfLeftTabs, XfwfRightTabs,$/;" e file: XmTabsClassPart ../motif_l/xtabbed.c /^} XmTabsClassPart;$/;" t file: XmTabsClassRec ../motif_l/xtabbed.c /^} XmTabsClassRec;$/;" t file: XmTabsConstraintPart ../motif_l/xtabbed.c /^} XmTabsConstraintPart;$/;" t file: XmTabsConstraintRec ../motif_l/xtabbed.c /^} XmTabsConstraintRec;$/;" t file: XmTabsPart ../motif_l/xtabbed.c /^} XmTabsPart;$/;" t file: XmTabsRec ../motif_l/xtabbed.c /^} XmTabsRec;$/;" t file: XmTabsWidget ../motif_l/xtabbed.c /^typedef struct _XmTabsRec *XmTabsWidget;$/;" t file: XmTabsWidgetClass ../motif_l/xtabbed.c /^typedef struct _XmTabsClassRec *XmTabsWidgetClass;$/;" t file: XtCActivateCallback ../motif_l/xtabbed.c 309;" d file: XtCCornerheight ../motif_l/xtabbed.c 269;" d file: XtCCornerwidth ../motif_l/xtabbed.c 259;" d file: XtCFont ../motif_l/xtabbed.c 299;" d file: XtCLabels ../motif_l/xtabbed.c 239;" d file: XtCLefttabs ../motif_l/xtabbed.c 219;" d file: XtCOrientation ../motif_l/xtabbed.c 209;" d file: XtCRighttabs ../motif_l/xtabbed.c 229;" d file: XtCTabWidthPercentage ../motif_l/xtabbed.c 249;" d file: XtCTabcolor ../motif_l/xtabbed.c 289;" d file: XtCTextmargin ../motif_l/xtabbed.c 279;" d file: XtInherit_border_highlight ../motif_l/xtabbed.c 342;" d file: XtInherit_border_unhighlight ../motif_l/xtabbed.c 348;" d file: XtNactivateCallback ../motif_l/xtabbed.c 306;" d file: XtNcornerheight ../motif_l/xtabbed.c 266;" d file: XtNcornerwidth ../motif_l/xtabbed.c 256;" d file: XtNfont ../motif_l/xtabbed.c 296;" d file: XtNlabels ../motif_l/xtabbed.c 236;" d file: XtNlefttabs ../motif_l/xtabbed.c 216;" d file: XtNorientation ../motif_l/xtabbed.c 206;" d file: XtNrighttabs ../motif_l/xtabbed.c 226;" d file: XtNtabWidthPercentage ../motif_l/xtabbed.c 246;" d file: XtNtabcolor ../motif_l/xtabbed.c 286;" d file: XtNtextmargin ../motif_l/xtabbed.c 276;" d file: XtRCallback ../motif_l/xtabbed.c 312;" d file: XtRCardinal ../motif_l/xtabbed.c 262;" d file: XtRCardinal ../motif_l/xtabbed.c 272;" d file: XtRFontStruct ../motif_l/xtabbed.c 302;" d file: XtRInt ../motif_l/xtabbed.c 222;" d file: XtRInt ../motif_l/xtabbed.c 232;" d file: XtRInt ../motif_l/xtabbed.c 252;" d file: XtRInt ../motif_l/xtabbed.c 282;" d file: XtRPixel ../motif_l/xtabbed.c 292;" d file: XtRStringArray ../motif_l/xtabbed.c 242;" d file: XtRTabsOrientation ../motif_l/xtabbed.c 212;" d file: XutInstallColormap ../motif/m_main.c /^XutInstallColormap(String name, Widget wid)$/;" f file: XutRKboolean ../motif_l/m_motif.h /^ XutRKboolean,$/;" e XutRKcursor ../motif_l/m_motif.h /^ XutRKcursor$/;" e XutRKfont ../motif_l/m_motif.h /^ XutRKfont,$/;" e XutRKinteger ../motif_l/m_motif.h /^ XutRKinteger,$/;" e XutRKpixel ../motif_l/m_motif.h /^ XutRKpixel,$/;" e XutRKpixelBackup ../motif_l/m_motif.h /^ XutRKpixelBackup, \/* if XutRKpixel fails *\/$/;" e XutResource ../motif_l/m_motif.h /^} XutResource;$/;" t XutResourceKind ../motif_l/m_motif.h /^} XutResourceKind;$/;" t XutSetIcon ../motif/m_main.c /^XutSetIcon(Widget wid, int height, int width, Pixmap p)$/;" f file: XutShowWidgetTree ../motif_l/m_util.c /^void XutShowWidgetTree( FILE *fp, Widget root, int indent )$/;" f YPOS ../motif_l/m_motif.h 42;" d YTOP ../motif_l/m_motif.h 40;" d Z_CARAT ../vi/vi.h /^ CNTRL_U, CNTRL_Y, Z_CARAT, Z_PLUS$/;" e Z_PLUS ../vi/vi.h /^ CNTRL_U, CNTRL_Y, Z_CARAT, Z_PLUS$/;" e _DB_OPEN_MODE ../common/exf.c 288;" d file: _GtkVi ../gtk/gtkvi.h /^struct _GtkVi$/;" s _GtkViScreen ../gtk/gtkviscreen.h /^struct _GtkViScreen$/;" s _GtkViScreenClass ../gtk/gtkviscreen.h /^struct _GtkViScreenClass$/;" s _GtkViWindow ../gtk/gtkviwindow.h /^struct _GtkViWindow$/;" s _GtkViWindowClass ../gtk/gtkviwindow.h /^struct _GtkViWindowClass$/;" s _HMAP ../vi/vi.h 290;" d _TMAP ../vi/vi.h 292;" d _TRACE ../motif/m_cde.c 31;" d file: _TRACE ../motif/m_cde.c 33;" d file: _XVERTEXT_INCLUDED_ ../motif_l/xtabbed.c 48;" d file: _XmTabsClassRec ../motif_l/xtabbed.c /^typedef struct _XmTabsClassRec {$/;" s file: _XmTabsConstraintRec ../motif_l/xtabbed.c /^typedef struct _XmTabsConstraintRec {$/;" s file: _XmTabsP_H_ ../motif_l/xtabbed.c 329;" d file: _XmTabsRec ../motif_l/xtabbed.c /^typedef struct _XmTabsRec {$/;" s file: _XmTabs_H_ ../motif_l/xtabbed.c 200;" d file: __GTK_VI_H__ ../gtk/gtkvi.h 2;" d __GTK_VI_SCREEN_H__ ../gtk/gtkviscreen.h 2;" d __GTK_VI_WINDOW_H__ ../gtk/gtkviwindow.h 2;" d __INUSE1 ../ex/ex.h 29;" d __INUSE2 ../ex/ex.h 136;" d __NL_ARGMAX ../common/msg.c 59;" d file: __XutConvertResources ../motif_l/m_util.c /^void __XutConvertResources(Widget wid, String root, XutResource *resources, int count)$/;" f __global_list ../cl/cl_main.c /^GS *__global_list; \/* GLOBAL: List of screens. *\/$/;" v __global_list ../ip/ip_main.c /^GS *__global_list; \/* GLOBAL: List of screens. *\/$/;" v __room_for_fd ../ipc/ip.h /^ int __room_for_fd;$/;" m struct:ipcmsghdr __sigblockset ../cl/cl_main.c /^sigset_t __sigblockset; \/* GLOBAL: Blocked signals. *\/$/;" v __vi_AcquirePrimary ../motif_l/m_copypaste.c /^__vi_AcquirePrimary(Widget widget)$/;" f __vi_CreateTabbedFolder ../motif_l/xtabbed.c /^Widget __vi_CreateTabbedFolder( String name,$/;" f __vi_InitCopyPaste ../motif_l/m_copypaste.c /^__vi_InitCopyPaste(PFI f_copy, PFI f_paste, PFI f_clear, PFI f_error)$/;" f __vi_PasteFromClipboard ../motif_l/m_copypaste.c /^__vi_PasteFromClipboard(Widget widget)$/;" f __vi_cancel_cb ../motif_l/m_menu.c /^__vi_cancel_cb(Widget w, XtPointer client_data, XtPointer call_data)$/;" f __vi_cancel_cb ../motif_l/m_options.c /^void __vi_cancel_cb()$/;" f __vi_change_args ../common/vi_auto.h /^} __vi_change_args;$/;" t __vi_change_getpgnos ../common/vi_auto.c /^__vi_change_getpgnos(dbenv, rec, lsnp, notused1, summary)$/;" f __vi_change_log ../common/vi_auto.c /^__vi_change_log(dbenv, txnid, ret_lsnp, flags,$/;" f __vi_change_print ../common/vi_auto.c /^__vi_change_print(dbenv, dbtp, lsnp, notused2, notused3)$/;" f __vi_change_read ../common/vi_auto.c /^__vi_change_read(dbenv, recbuf, argpp)$/;" f __vi_change_recover ../common/vi_rec.c /^__vi_change_recover(dbenv, dbtp, lsnp, op, info)$/;" f __vi_clear_scroll_block ../motif_l/m_vi.c /^__vi_clear_scroll_block(void)$/;" f __vi_clear_tag ../motif_l/m_tags.c /^void __vi_clear_tag(void)$/;" f __vi_clear_text_ruler_dialog ../motif_l/m_ruler.c /^void __vi_clear_text_ruler_dialog()$/;" f __vi_copy_gc ../motif_l/m_vi.c /^ GC __vi_copy_gc;$/;" v __vi_create_search_toggles ../motif_l/m_options.c /^__vi_create_search_toggles(Widget parent, optData *list)$/;" f __vi_cursor_args ../common/vi_auto.h /^} __vi_cursor_args;$/;" t __vi_cursor_getpgnos ../common/vi_auto.c /^__vi_cursor_getpgnos(dbenv, rec, lsnp, notused1, summary)$/;" f __vi_cursor_log ../common/vi_auto.c /^__vi_cursor_log(dbenv, txnid, ret_lsnp, flags,$/;" f __vi_cursor_print ../common/vi_auto.c /^__vi_cursor_print(dbenv, dbtp, lsnp, notused2, notused3)$/;" f __vi_cursor_read ../common/vi_auto.c /^__vi_cursor_read(dbenv, recbuf, argpp)$/;" f __vi_cursor_recover ../common/vi_rec.c /^__vi_cursor_recover(dbenv, dbtp, lsnp, op, info)$/;" f __vi_draw_text ../motif_l/m_vi.c /^__vi_draw_text(xvi_screen *this_screen, int row, int start_col, int len)$/;" f __vi_editopt ../motif_l/m_options.c /^__vi_editopt(IPVI *ipvi, const char *str1, u_int32_t len1, const char *str2, u_int32_t len2, u_int32_t val1)$/;" f __vi_erase_caret ../motif_l/m_vi.c /^__vi_erase_caret(xvi_screen *this_screen)$/;" f __vi_exitp ../motif_l/m_vi.c /^void (*__vi_exitp)(); \/* Exit function. *\/$/;" v __vi_expose_func ../motif_l/m_vi.c /^__vi_expose_func(Widget wid, XtPointer client_data, XtPointer call_data)$/;" f __vi_get_word_at_caret ../motif_l/m_vi.c /^String __vi_get_word_at_caret(xvi_screen *this_screen)$/;" f __vi_init_getpgnos ../common/vi_auto.c /^__vi_init_getpgnos(dbenv, dtabp, dtabsizep)$/;" f __vi_init_print ../common/vi_auto.c /^__vi_init_print(dbenv, dtabp, dtabsizep)$/;" f __vi_init_recover ../common/vi_auto.c /^__vi_init_recover(dbenv)$/;" f __vi_log_dispatch ../common/vi_rec.c /^__vi_log_dispatch(DB_ENV *dbenv, DBT *data, DB_LSN *lsn, db_recops ops)$/;" f __vi_log_traverse ../common/vi_rec.c /^__vi_log_traverse(SCR *sp, undo_t undo, MARK *rp)$/;" f __vi_log_truncate ../common/vi_rec.c /^__vi_log_truncate(EXF *ep)$/;" f __vi_mark_args ../common/vi_auto.h /^} __vi_mark_args;$/;" t __vi_mark_getpgnos ../common/vi_auto.c /^__vi_mark_getpgnos(dbenv, rec, lsnp, notused1, summary)$/;" f __vi_mark_log ../common/vi_auto.c /^__vi_mark_log(dbenv, txnid, ret_lsnp, flags,$/;" f __vi_mark_print ../common/vi_auto.c /^__vi_mark_print(dbenv, dbtp, lsnp, notused2, notused3)$/;" f __vi_mark_read ../common/vi_auto.c /^__vi_mark_read(dbenv, recbuf, argpp)$/;" f __vi_mark_recover ../common/vi_rec.c /^__vi_mark_recover(dbenv, dbtp, lsnp, op, info)$/;" f __vi_marker_args ../common/vi_auto.h /^} __vi_marker_args;$/;" t __vi_marker_getpgnos ../common/vi_auto.c /^__vi_marker_getpgnos(dbenv, rec, lsnp, notused1, summary)$/;" f __vi_marker_log ../common/vi_auto.c /^__vi_marker_log(dbenv, txnid, ret_lsnp, flags,$/;" f __vi_marker_print ../common/vi_auto.c /^__vi_marker_print(dbenv, dbtp, lsnp, notused2, notused3)$/;" f __vi_marker_read ../common/vi_auto.c /^__vi_marker_read(dbenv, recbuf, argpp)$/;" f __vi_marker_recover ../common/vi_rec.c /^__vi_marker_recover(dbenv, dbtp, lsnp, op, info)$/;" f __vi_modal_dialog ../motif_l/m_menu.c /^__vi_modal_dialog(Widget db)$/;" f __vi_move_caret ../motif_l/m_vi.c /^__vi_move_caret(xvi_screen *this_screen, int newy, int newx)$/;" f __vi_pop_tag ../motif_l/m_tags.c /^void __vi_pop_tag(void)$/;" f __vi_push_tag ../motif_l/m_tags.c /^void __vi_push_tag(String text)$/;" f __vi_screen ../motif_l/m_vi.c /^ xvi_screen *__vi_screen = NULL;$/;" v __vi_search ../motif_l/m_search.c /^__vi_search(Widget w)$/;" f __vi_send_command_string ../motif_l/m_menu.c /^__vi_send_command_string(String str)$/;" f __vi_set_cursor ../motif_l/m_vi.c /^__vi_set_cursor(xvi_screen *cur_screen, int is_busy)$/;" f __vi_set_scroll_block ../motif_l/m_vi.c /^__vi_set_scroll_block(void)$/;" f __vi_set_tag_text ../motif_l/m_tags.c /^void __vi_set_tag_text(String text)$/;" f __vi_set_text_ruler ../motif_l/m_ruler.c /^__vi_set_text_ruler(int row, int col)$/;" f __vi_set_word_at_caret ../motif_l/m_vi.c /^__vi_set_word_at_caret(xvi_screen *this_screen)$/;" f __vi_show_options_dialog ../motif_l/m_options.c /^__vi_show_options_dialog(Widget parent, String title)$/;" f __vi_show_search_dialog ../motif_l/m_search.c /^void __vi_show_search_dialog( Widget parent, String title )$/;" f __vi_show_tags_dialog ../motif_l/m_tags.c /^void __vi_show_tags_dialog( Widget parent, String title )$/;" f __vi_show_text_ruler_dialog ../motif_l/m_ruler.c /^void __vi_show_text_ruler_dialog( Widget parent, String title )$/;" f __vi_toggle ../motif_l/m_options.c /^__vi_toggle(char *name)$/;" f _args ../common/args.h /^typedef struct _args {$/;" s _cb ../common/cut.h /^struct _cb {$/;" s _cc ../ex/ex_cscope.c /^typedef struct _cc {$/;" s file: _cl_private ../cl/cl.h /^typedef struct _cl_private {$/;" s _conv ../common/conv.h /^struct _conv {$/;" s _conv_win ../common/conv.h /^struct _conv_win {$/;" s _csc ../ex/tag.h /^struct _csc {$/;" s _event ../common/key.h /^struct _event {$/;" s _ex_private ../ex/ex.h /^typedef struct _ex_private {$/;" s _excmd ../ex/ex.h /^struct _excmd {$/;" s _excmdlist ../ex/ex.h /^typedef struct _excmdlist { \/* Ex command table structure. *\/$/;" s _exf ../common/exf.h /^struct _exf {$/;" s _fref ../common/gs.h /^struct _fref {$/;" s _gs ../common/gs.h /^struct _gs {$/;" s _ip_buf ../ipc/ip.h /^typedef struct _ip_buf {$/;" s _ip_private ../ipc/ip.h /^typedef struct _ip_private {$/;" s _ip_vi ../ipc/ip.h /^struct _ip_vi {$/;" s _ip_vi_win ../ipc/ip.h /^struct _ip_vi_win {$/;" s _ipfunlist ../ipc/ip.h /^typedef struct _ipfunlist {$/;" s _keylist ../common/key.h /^typedef struct _keylist {$/;" s _lmark ../common/mark.h /^struct _lmark {$/;" s _log_state ../common/log.h /^struct _log_state {$/;" s _mark ../common/mark.h /^struct _mark {$/;" s _msg ../common/msg.h /^struct _msg {$/;" s _option ../common/options.h /^struct _option {$/;" s _optlist ../common/options.h /^struct _optlist {$/;" s _range ../ex/ex.h /^struct _range { \/* Global command range. *\/$/;" s _resolve_inheritance ../motif_l/xtabbed.c /^static void _resolve_inheritance(WidgetClass class)$/;" f file: _scr ../common/screen.h /^struct _scr {$/;" s _script ../ex/script.h /^struct _script {$/;" s _seq ../common/seq.h /^struct _seq {$/;" s _sigs ../ex/ex_shell.c /^typedef struct _sigs {$/;" s file: _smap ../vi/vi.h /^typedef struct _smap {$/;" s _strarray_h_ ../motif_l/xtabbed.c 123;" d file: _tag ../ex/tag.h /^struct _tag { \/* Tag list. *\/$/;" s _tagf ../ex/tag.h /^struct _tagf { \/* Tag files. *\/$/;" s _tagq ../ex/tag.h /^struct _tagq { \/* Tag queue. *\/$/;" s _text ../common/cut.h /^struct _text { \/* Text: a linked list of lines. *\/$/;" s _tklist ../cl/cl_term.c /^typedef struct _tklist {$/;" s file: _tl ../cl/cl_bsd.c /^typedef struct _tl {$/;" s file: _vcs ../vi/vi.h /^typedef struct _vcs {$/;" s _vi_change_args ../common/vi_auto.h /^typedef struct _vi_change_args {$/;" s _vi_cursor_args ../common/vi_auto.h /^typedef struct _vi_cursor_args {$/;" s _vi_mark_args ../common/vi_auto.h /^typedef struct _vi_mark_args {$/;" s _vi_marker_args ../common/vi_auto.h /^typedef struct _vi_marker_args {$/;" s _vi_private ../vi/vi.h /^typedef struct _vi_private {$/;" s _vicmd ../vi/vi.h /^typedef struct _vicmd {$/;" s _vikeys ../vi/vi.h /^struct _vikeys { \/* Underlying function. *\/$/;" s _vipfunlist ../ipc/ip.h /^typedef struct _vipfunlist {$/;" s _win ../common/screen.h /^struct _win {$/;" s abb_t ../vi/vi.h /^typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t;$/;" t abbrev ../common/options.c /^static OABBREV const abbrev[] = {$/;" v file: abbrev ../common/options.c /^typedef struct abbrev {$/;" s file: abs ../motif_l/xtabbed.c 481;" d file: accel ../motif_l/m_menu.c /^ String accel; \/* for Motif *\/$/;" m struct: file: accel_text ../motif_l/m_menu.c /^ String accel_text; \/* for the user *\/$/;" m struct: file: action ../motif_l/m_menu.c /^ void (*action)();$/;" m struct: file: actions ../motif_l/m_menu.c /^ pull_down *actions;$/;" m struct: file: actionsList ../motif_l/xtabbed.c /^static XtActionsRec actionsList[] = {$/;" v file: activate ../motif_l/xtabbed.c /^static void activate(Widget self, XEvent *event, String *params, Cardinal *num_params)$/;" f file: activateCallback ../motif_l/xtabbed.c /^XtCallbackList activateCallback;$/;" m struct: file: activate_func ../motif_l/xtabbed.c /^ void (*activate_func)();$/;" m struct:tab_data file: active ../motif_l/m_ruler.c /^static Boolean active = False;$/;" v file: active ../motif_l/m_tags.c /^static Boolean active = False;$/;" v file: add_a_tag ../motif_l/m_tags.c /^static void add_a_tag( Widget w )$/;" f file: add_entries ../motif_l/m_menu.c /^static void add_entries( Widget parent, pull_down *actions )$/;" f file: add_string_options ../motif_l/m_options.c /^static void add_string_options( Widget parent,$/;" f file: add_to_clip ../motif_l/m_vi.c /^static void add_to_clip( xvi_screen *cur_screen, int x, int y, int width, int height )$/;" f file: add_toggle ../motif_l/m_options.c /^static void add_toggle( Widget parent, optData *option )$/;" f file: addr1 ../ex/ex.h /^ MARK addr1; \/* Command: 1st address. *\/$/;" m struct:_excmd addr2 ../ex/ex.h /^ MARK addr2; \/* Command: 2nd address. *\/$/;" m struct:_excmd addrcnt ../ex/ex.h /^ int addrcnt; \/* Command: addresses (0, 1 or 2). *\/$/;" m struct:_excmd addstr ../ipc/ip.h /^ IPFunc_a addstr;$/;" m struct:ip_si_operations addstr4 ../cl/cl_funcs.c /^addstr4(SCR *sp, void *str, size_t len, int wide)$/;" f file: adj_t ../vi/vi.h /^typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t;$/;" t agv_flags ../ex/ex.h /^ u_int8_t agv_flags;$/;" m struct:_excmd ai ../common/cut.h /^ size_t ai; \/* 0-N: autoindent bytes. *\/$/;" m struct:_text align ../motif_l/xtabbed.c /^ int align;$/;" m struct:rotated_text_item_template file: alist ../gtk/gtkviscreen.h /^ PangoAttrList* alist;$/;" m struct:_GtkViScreen alt_name ../common/screen.h /^ char *alt_name; \/* Ex\/vi: alternate file name. *\/$/;" m struct:_scr angle ../motif_l/xtabbed.c /^ float angle;$/;" m struct:rotated_text_item_template file: api_aline ../common/api.c /^api_aline(SCR *sp, db_recno_t lno, char *line, size_t len)$/;" f api_dline ../common/api.c /^api_dline(SCR *sp, db_recno_t lno)$/;" f api_edit ../common/api.c /^api_edit(SCR *sp, char *file, SCR **spp, int newscreen)$/;" f api_emessage ../common/api.c /^api_emessage(SCR *sp, char *text)$/;" f api_escreen ../common/api.c /^api_escreen(SCR *sp)$/;" f api_extend ../common/api.c /^api_extend(SCR *sp, db_recno_t lno)$/;" f api_fscreen ../common/api.c /^api_fscreen(int id, char *name)$/;" f api_getcursor ../common/api.c /^api_getcursor(SCR *sp, MARK *mp)$/;" f api_getmark ../common/api.c /^api_getmark(SCR *sp, int markname, MARK *mp)$/;" f api_gline ../common/api.c /^api_gline(SCR *sp, db_recno_t lno, CHAR_T **linepp, size_t *lenp)$/;" f api_iline ../common/api.c /^api_iline(SCR *sp, db_recno_t lno, CHAR_T *line, size_t len)$/;" f api_imessage ../common/api.c /^api_imessage(SCR *sp, char *text)$/;" f api_lline ../common/api.c /^api_lline(SCR *sp, db_recno_t *lnop)$/;" f api_map ../common/api.c /^api_map(SCR *sp, char *name, char *map, size_t len)$/;" f api_nextmark ../common/api.c /^api_nextmark(SCR *sp, int next, char *namep)$/;" f api_opts_get ../common/api.c /^api_opts_get(SCR *sp, CHAR_T *name, char **value, int *boolvalue)$/;" f api_opts_set ../common/api.c /^api_opts_set(SCR *sp, CHAR_T *name, $/;" f api_run_str ../common/api.c /^api_run_str(SCR *sp, char *cmd)$/;" f api_setcursor ../common/api.c /^api_setcursor(SCR *sp, MARK *mp)$/;" f api_setmark ../common/api.c /^api_setmark(SCR *sp, int markname, MARK *mp)$/;" f api_sline ../common/api.c /^api_sline(SCR *sp, db_recno_t lno, CHAR_T *line, size_t len)$/;" f api_swscreen ../common/api.c /^api_swscreen(SCR *sp, SCR *new)$/;" f api_tagq_add ../common/api.c /^api_tagq_add(SCR *sp, TAGQ *tqp, char *filename, char *search, char *msg)$/;" f api_tagq_free ../common/api.c /^api_tagq_free(SCR *sp, TAGQ *tqp)$/;" f api_tagq_new ../common/api.c /^api_tagq_new(SCR *sp, char *tag)$/;" f api_tagq_push ../common/api.c /^api_tagq_push(SCR *sp, TAGQ **tqpp)$/;" f api_unmap ../common/api.c /^api_unmap(SCR *sp, char *name)$/;" f append ../common/db.c /^append(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len, lnop_t op, int update)$/;" f file: area ../motif_l/m_motif.h /^ area, \/* text goes here *\/$/;" m struct: areaTrans ../motif_l/m_vi.c /^char areaTrans[] =$/;" v area_actions ../motif_l/m_vi.c /^static XtActionsRec area_actions[] = {$/;" v file: area_trans ../motif_l/m_vi.c /^static XtTranslations area_trans;$/;" v file: arg_format ../ipc/ip_run.c /^arg_format(execp, argcp, argvp, i_fd, o_fd)$/;" f file: argc ../ex/ex.h /^ int argc; \/* Command: count of arguments. *\/$/;" m struct:_excmd argc ../ipc/ip.h /^ int argc;$/;" m struct:_ip_private args ../ex/ex.h /^ ARGS **args; \/* Command: argument list. *\/$/;" m struct:_ex_private argscnt ../ex/ex.h /^ int argscnt; \/* Command: argument list count. *\/$/;" m struct:_ex_private argsoff ../ex/ex.h /^ int argsoff; \/* Command: offset into arguments. *\/$/;" m struct:_ex_private argv ../common/screen.h /^ char **argv; \/* NULL terminated file name array. *\/$/;" m struct:_scr argv ../ex/ex.h /^ ARGS **argv; \/* Command: array of arguments. *\/$/;" m struct:_excmd argv ../ipc/ip.h /^ char **argv;$/;" m struct:_ip_private argv_alloc ../ex/ex_argv.c /^argv_alloc(SCR *sp, size_t len)$/;" f file: argv_comp ../ex/ex_argv.c /^argv_comp(const void *a, const void *b)$/;" f file: argv_exp0 ../ex/ex_argv.c /^argv_exp0(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)$/;" f argv_exp1 ../ex/ex_argv.c /^argv_exp1(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen, int is_bang)$/;" f argv_exp2 ../ex/ex_argv.c /^argv_exp2(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)$/;" f argv_exp3 ../ex/ex_argv.c /^argv_exp3(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen)$/;" f argv_fexp ../ex/ex_argv.c /^argv_fexp(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen, CHAR_T *p, size_t *lenp, CHAR_T **bpp, size_t *blenp, int is_bang)$/;" f file: argv_free ../ex/ex_argv.c /^argv_free(SCR *sp)$/;" f argv_init ../ex/ex_argv.c /^argv_init(SCR *sp, EXCMD *excp)$/;" f argv_lexp ../ex/ex_argv.c /^argv_lexp(SCR *sp, EXCMD *excp, char *path)$/;" f file: argv_sexp ../ex/ex_argv.c /^argv_sexp(SCR *sp, CHAR_T **bpp, size_t *blenp, size_t *lenp)$/;" f file: at_lbuf ../common/screen.h /^ CHAR_T at_lbuf; \/* Ex\/vi: Last executed at buffer. *\/$/;" m struct:_scr attach ../common/main.c /^attach(GS *gp)$/;" f file: attach ../ipc/ip_run.c /^attach()$/;" f file: attribute ../ipc/ip.h /^ IPFunc_12 attribute;$/;" m struct:ip_si_operations b_search ../common/search.c /^b_search(SCR *sp, MARK *fm, MARK *rm, CHAR_T *ptrn, size_t plen, CHAR_T **eptrn, u_int flags)$/;" f backgc ../motif_l/xtabbed.c /^GC backgc;$/;" m struct: file: badaddr ../ex/ex.h /^enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO };$/;" g bbx_pad ../motif_l/xtabbed.c /^ int bbx_pad;$/;" m struct:style_template file: bdisplay ../ex/ex_display.c /^bdisplay(SCR *sp)$/;" f file: beep ../cl/cl_bsd.c /^beep()$/;" f beep ../motif_l/m_vi.c /^static void beep( Widget w )$/;" f file: bell ../ipc/ip.h /^ IPFunc bell;$/;" m struct:ip_si_operations binary_search ../ex/ex_tag.c /^binary_search(register char *string, register char *front, register char *back)$/;" f file: binc ../common/util.c /^binc(SCR *sp, void *bp, size_t *bsizep, size_t min)$/;" f bitmap ../motif_l/xtabbed.c /^ Pixmap bitmap;$/;" m struct:rotated_text_item_template file: blen ../common/args.h /^ size_t blen; \/* Buffer length. *\/$/;" m struct:_args blen1 ../common/conv.h /^ size_t blen1;$/;" m struct:_conv_win bmsg_t ../common/util.h /^typedef enum { B_NONE, B_OFF, B_READ, B_RECOVER, B_SEARCH, B_WRITE } bmsg_t;$/;" t border_highlight ../motif_l/xtabbed.c /^border_highlight_Proc border_highlight;$/;" m struct: file: border_highlight ../motif_l/xtabbed.c /^static void border_highlight(void)$/;" f file: border_highlight_Proc ../motif_l/xtabbed.c /^typedef void (*border_highlight_Proc)($/;" t file: border_unhighlight ../motif_l/xtabbed.c /^border_unhighlight_Proc border_unhighlight;$/;" m struct: file: border_unhighlight ../motif_l/xtabbed.c /^static void border_unhighlight(void)$/;" f file: border_unhighlight_Proc ../motif_l/xtabbed.c /^typedef void (*border_unhighlight_Proc)($/;" t file: bottomgc ../motif_l/xtabbed.c /^GC bottomgc;$/;" m struct: file: bp ../common/args.h /^ CHAR_T *bp; \/* Argument. *\/$/;" m struct:_args bp1 ../common/conv.h /^ void *bp1;$/;" m struct:_conv_win buf ../common/msg.h /^ char *buf; \/* Message buffer. *\/$/;" m struct:_msg buf ../ex/tag.h /^ CHAR_T buf[1]; \/* Variable length buffer. *\/$/;" m struct:_tag buf ../ex/tag.h /^ char buf[1]; \/* Variable length buffer. *\/$/;" m struct:_csc buf ../ex/tag.h /^ char buf[1]; \/* Variable length buffer. *\/$/;" m struct:_tagq buffer ../ex/ex.h /^ CHAR_T buffer; \/* Command: named buffer. *\/$/;" m struct:_excmd buffer ../vi/vi.h /^ CHAR_T buffer; \/* Buffer. *\/$/;" m struct:_vicmd busy_ch ../vi/vi.h /^ int busy_ch; \/* Busy character. *\/$/;" m struct:_vi_private busy_cursor ../motif_l/m_vi.c /^static Cursor busy_cursor;$/;" v file: busy_fx ../vi/vi.h /^ size_t busy_fx; \/* Busy character x coordinate. *\/$/;" m struct:_vi_private busy_off ../ipc/ip.h /^ IPFunc busy_off;$/;" m struct:ip_si_operations busy_oldx ../vi/vi.h /^ size_t busy_oldx; \/* Saved x coordinate. *\/$/;" m struct:_vi_private busy_oldy ../vi/vi.h /^ size_t busy_oldy; \/* Saved y coordinate. *\/$/;" m struct:_vi_private busy_on ../ipc/ip.h /^ IPFunc_a busy_on;$/;" m struct:ip_si_operations busy_ref ../vi/vi.h /^ int busy_ref; \/* Busy reference count. *\/$/;" m struct:_vi_private busy_t ../common/common.h /^typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;$/;" t busy_tv ../vi/vi.h /^ struct timeval busy_tv; \/* Busy timer. *\/$/;" m struct:_vi_private button_data ../motif_l/m_search.c /^static ButtonData button_data[] = {$/;" v file: button_data ../motif_l/m_tags.c /^static ButtonData button_data[] = {$/;" v file: bword ../vi/v_word.c /^bword(SCR *sp, VICMD *vp, enum which type)$/;" f file: c_blen ../common/screen.h /^ size_t c_blen; \/* Cached line buffer length. *\/$/;" m struct:_scr c_bol ../ipc/ip.h /^ int (*c_bol) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_bottom ../ipc/ip.h /^ int (*c_bottom) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_del ../ipc/ip.h /^ int (*c_del) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_eboff ../vi/vi.h /^ size_t c_eboff; \/* 0-N: offset of last character on screen. *\/$/;" m struct:_smap c_eclen ../vi/vi.h /^ u_int8_t c_eclen; \/* 1-N: columns from the last character. *\/$/;" m struct:_smap c_ecsize ../vi/vi.h /^ u_int8_t c_ecsize; \/* 1-N: size of the last character. *\/$/;" m struct:_smap c_eol ../ipc/ip.h /^ int (*c_eol) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_insert ../ipc/ip.h /^ int (*c_insert) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_left ../ipc/ip.h /^ int (*c_left) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_len ../common/screen.h /^ size_t c_len; \/* Cached line length. *\/$/;" m struct:_scr c_lno ../common/screen.h /^ db_recno_t c_lno; \/* Cached line number. *\/$/;" m struct:_scr c_lp ../common/screen.h /^ CHAR_T *c_lp; \/* Cached line. *\/$/;" m struct:_scr c_nlines ../common/exf.h /^ db_recno_t c_nlines; \/* Cached lines in the file. *\/$/;" m struct:_exf c_option ../common/gs.h /^ char *c_option; \/* Ex initial, command-line command. *\/$/;" m struct:_gs c_right ../ipc/ip.h /^ int (*c_right) __P((IPVIWIN*));$/;" m struct:_ip_vi_win c_sboff ../vi/vi.h /^ size_t c_sboff; \/* 0-N: offset of first character on screen. *\/$/;" m struct:_smap c_scoff ../vi/vi.h /^ u_int8_t c_scoff; \/* 0-N: offset into the first character. *\/$/;" m struct:_smap c_settop ../ipc/ip.h /^ int (*c_settop) __P((IPVIWIN*, u_int32_t));$/;" m struct:_ip_vi_win c_suffix ../common/screen.h /^ u_int8_t c_suffix; \/* Edcompatible 'c' suffix value. *\/$/;" m struct:_scr c_tklist ../cl/cl_term.c /^static TKLIST const c_tklist[] = { \/* Command mappings. *\/$/;" v file: c_top ../ipc/ip.h /^ int (*c_top) __P((IPVIWIN*));$/;" m struct:_ip_vi_win cached ../motif_l/xtabbed.c /^ int cached;$/;" m struct:rotated_text_item_template file: cancel_cb ../motif_l/m_ruler.c /^cancel_cb(void)$/;" f file: cancel_cb ../motif_l/m_tags.c /^cancel_cb(void)$/;" f file: carat_t ../common/common.h /^typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t;$/;" t cargv ../common/screen.h /^ char **cargv; \/* Current file name. *\/$/;" m struct:_scr cb ../motif_l/m_search.c /^ void (*cb)();$/;" m struct: file: cb ../motif_l/m_tags.c /^ void (*cb)();$/;" m struct: file: cb_rotate ../common/cut.c /^cb_rotate(SCR *sp)$/;" f file: ccl_parent ../common/screen.h /^ SCR *ccl_parent; \/* Colon command-line parent screen. *\/$/;" m struct:_scr ccl_sp ../common/screen.h /^ SCR *ccl_sp; \/* Colon command-line screen. *\/$/;" m struct:_win ccnt ../common/screen.h /^ u_long ccnt; \/* Command count. *\/$/;" m struct:_scr cdir_t ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" t ch ../common/key.h /^ CHAR_T ch; \/* Key. *\/$/;" m struct:_keylist ch_ascent ../gtk/gtkviscreen.h /^ gint ch_width, ch_height, ch_ascent;$/;" m struct:_GtkViScreen ch_descent ../motif_l/m_motif.h /^ ch_descent;$/;" m struct: ch_height ../gtk/gtkviscreen.h /^ gint ch_width, ch_height, ch_ascent;$/;" m struct:_GtkViScreen ch_height ../motif_l/m_motif.h /^ ch_height,$/;" m struct: ch_width ../gtk/gtkviscreen.h /^ gint ch_width, ch_height, ch_ascent;$/;" m struct:_GtkViScreen ch_width ../motif_l/m_motif.h /^ int ch_width,$/;" m struct: change_pos ../motif_l/m_ruler.c /^static void change_pos( Widget w )$/;" f file: change_sheet ../motif_l/m_options.c /^static void change_sheet(Widget parent, int current)$/;" f file: channel ../ipc/ip_run.c /^int channel(int rpipe[2], int wpipe[2])$/;" f file: char2wchar_t ../common/conv.h /^typedef int (*char2wchar_t) $/;" t character ../vi/vi.h /^ CHAR_T character; \/* Character. *\/$/;" m struct:_vicmd characters ../motif_l/m_motif.h /^ char *characters;$/;" m struct: chars ../gtk/gtkviscreen.h /^ CHAR_T *chars;$/;" m struct:_GtkViScreen cl_addstr ../cl/cl_funcs.c /^cl_addstr(SCR *sp, const char *str, size_t len)$/;" f cl_attr ../cl/cl_funcs.c /^cl_attr(SCR *sp, scr_attr_t attribute, int on)$/;" f cl_baud ../cl/cl_funcs.c /^cl_baud(SCR *sp, u_long *ratep)$/;" f cl_bell ../cl/cl_funcs.c /^cl_bell(SCR *sp)$/;" f cl_clrtoeol ../cl/cl_funcs.c /^cl_clrtoeol(SCR *sp)$/;" f cl_cursor ../cl/cl_funcs.c /^cl_cursor(SCR *sp, size_t *yp, size_t *xp)$/;" f cl_deleteln ../cl/cl_funcs.c /^cl_deleteln(SCR *sp)$/;" f cl_discard ../cl/cl_funcs.c /^cl_discard(SCR *discardp, SCR **acquirep)$/;" f cl_end ../cl/cl_main.c /^cl_end(CL_PRIVATE *clp)$/;" f file: cl_event ../cl/cl_read.c /^cl_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms)$/;" f cl_ex_adjust ../cl/cl_funcs.c /^cl_ex_adjust(SCR *sp, exadj_t action)$/;" f cl_ex_end ../cl/cl_screen.c /^cl_ex_end(GS *gp)$/;" f file: cl_ex_init ../cl/cl_screen.c /^cl_ex_init(SCR *sp)$/;" f file: cl_fmap ../cl/cl_term.c /^cl_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen)$/;" f cl_freecap ../cl/cl_screen.c /^cl_freecap(CL_PRIVATE *clp)$/;" f file: cl_func_std ../cl/cl_main.c /^cl_func_std(WIN *wp)$/;" f file: cl_getcap ../cl/cl_screen.c /^cl_getcap(SCR *sp, char *name, char **elementp)$/;" f cl_init ../cl/cl_main.c /^cl_init(WIN *wp)$/;" f file: cl_insertln ../cl/cl_funcs.c /^cl_insertln(SCR *sp)$/;" f cl_keyval ../cl/cl_funcs.c /^cl_keyval(SCR *sp, scr_keyval_t val, CHAR_T *chp, int *dnep)$/;" f cl_move ../cl/cl_funcs.c /^cl_move(SCR *sp, size_t lno, size_t cno)$/;" f cl_omesg ../cl/cl_term.c /^cl_omesg(SCR *sp, CL_PRIVATE *clp, int on)$/;" f cl_optchange ../cl/cl_term.c /^cl_optchange(SCR *sp, int opt, char *str, u_long *valp)$/;" f cl_pfmap ../cl/cl_term.c /^cl_pfmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen)$/;" f file: cl_private ../common/gs.h /^ void *cl_private; \/* Curses support private area. *\/$/;" m struct:_gs cl_private ../common/screen.h /^ void *cl_private; \/* Curses private area. *\/$/;" m struct:_scr cl_putchar ../cl/cl_term.c /^cl_putchar(int ch)$/;" f cl_putenv ../cl/cl_screen.c /^cl_putenv(SCR *sp, char *name, char *str, u_long value)$/;" f file: cl_quit ../cl/cl_screen.c /^cl_quit(GS *gp)$/;" f cl_rdiv ../cl/cl_funcs.c /^cl_rdiv(SCR *sp)$/;" f file: cl_read ../cl/cl_read.c /^cl_read(SCR *sp, u_int32_t flags, char *bp, size_t blen, int *nrp, struct timeval *tp)$/;" f file: cl_refresh ../cl/cl_funcs.c /^cl_refresh(SCR *sp, int repaint)$/;" f cl_rename ../cl/cl_funcs.c /^cl_rename(SCR *sp, char *name, int on)$/;" f cl_resize ../cl/cl_read.c /^cl_resize(SCR *sp, size_t lines, size_t columns)$/;" f file: cl_screen ../cl/cl_screen.c /^cl_screen(SCR *sp, u_int32_t flags)$/;" f cl_setenv ../cl/cl.h 111;" d cl_setenv ../cl/cl.h 114;" d cl_setname ../cl/cl_funcs.c /^cl_setname(GS *gp, char *name)$/;" f cl_split ../cl/cl_funcs.c /^cl_split(SCR *origp, SCR *newp)$/;" f cl_ssize ../cl/cl_term.c /^cl_ssize(SCR *sp, int sigwinch, size_t *rowp, size_t *colp, int *changedp)$/;" f cl_suspend ../cl/cl_funcs.c /^cl_suspend(SCR *sp, int *allowedp)$/;" f cl_term_end ../cl/cl_term.c /^cl_term_end(GS *gp)$/;" f cl_term_init ../cl/cl_term.c /^cl_term_init(SCR *sp)$/;" f cl_unsetenv ../cl/cl.h 112;" d cl_unsetenv ../cl/cl.h 115;" d cl_usage ../cl/cl_funcs.c /^cl_usage(void)$/;" f cl_vi_end ../cl/cl_screen.c /^cl_vi_end(GS *gp)$/;" f file: cl_vi_init ../cl/cl_screen.c /^cl_vi_init(SCR *sp)$/;" f file: cl_waddstr ../cl/cl_funcs.c /^cl_waddstr(SCR *sp, const CHAR_T *str, size_t len)$/;" f class_initialize ../motif_l/xtabbed.c /^static void class_initialize(void)$/;" f file: cleartoel ../gtk/gtkviscreen.c /^cleartoel (GtkViScreen *vi, guint row, guint col)$/;" f file: clen ../common/screen.h /^ size_t clen; \/* Length of display character. *\/$/;" m struct:_scr clen ../ex/ex.h /^ size_t clen; \/* Current command length. *\/$/;" m struct:_excmd clip ../motif_l/m_motif.h /^ Region clip;$/;" m struct: clipboard ../motif_l/m_vi.c /^static char *clipboard = NULL;$/;" v file: clipboard_length ../motif_l/m_vi.c /^ clipboard_length;$/;" v file: clipboard_size ../motif_l/m_vi.c /^static int clipboard_size = 0,$/;" v file: close ../ipc/ip.h /^ int (*close) __P((IPVI*));$/;" m struct:_ip_vi close ../ipc/ip.h /^ int (*close) __P((IPVIWIN*));$/;" m struct:_ip_vi_win clrtoeol ../ipc/ip.h /^ IPFunc clrtoeol;$/;" m struct:ip_si_operations cmap_ignore ../motif/m_main.c /^static enum { cmap_look, cmap_use, cmap_ignore } cmap_state = cmap_look;$/;" e file: cmap_look ../motif/m_main.c /^static enum { cmap_look, cmap_use, cmap_ignore } cmap_state = cmap_look;$/;" e file: cmap_state ../motif/m_main.c /^static enum { cmap_look, cmap_use, cmap_ignore } cmap_state = cmap_look;$/;" v file: cmap_use ../motif/m_main.c /^static enum { cmap_look, cmap_use, cmap_ignore } cmap_state = cmap_look;$/;" e file: cmd ../ex/ex.h /^ EXCMDLIST const *cmd; \/* Command: entry in command table. *\/$/;" m struct:_excmd cmd ../vi/vi.h /^ VICMD cmd; \/* Current command, motion. *\/$/;" m struct:_vi_private cmds ../ex/ex_cmd.c /^EXCMDLIST const cmds[] = {$/;" v cmsg_t ../common/msg.h /^ CMSG_CONT_R, CMSG_CONT_S, CMSG_CONT_Q } cmsg_t;$/;" t cname ../common/gs.h /^ } cname[MAX_FAST_KEY + 1]; \/* Fast lookup table. *\/$/;" m struct:_gs cname ../common/screen.h /^ u_char cname[MAX_CHARACTER_COLUMNS + 1];$/;" m struct:_scr cno ../common/cut.h /^ size_t cno; \/* 0-N: file character in line. *\/$/;" m struct:_text cno ../common/gs.h /^ size_t cno; \/* 0-N: file cursor column. *\/$/;" m struct:_fref cno ../common/mark.h /^ size_t cno; \/* Column number. *\/$/;" m struct:_lmark cno ../common/mark.h /^ size_t cno; \/* Column number. *\/$/;" m struct:_mark cno ../common/screen.h /^ size_t cno; \/* 0-N: file character in line. *\/$/;" m struct:_scr cno ../common/vi_auto.h /^ size_t cno;$/;" m struct:_vi_cursor_args cno ../ex/tag.h /^ size_t cno; \/* Saved column number. *\/$/;" m struct:_tag code ../ipc/ip.h /^ int code; \/* Event code. *\/$/;" m struct:_ip_buf codes ../cl/cl_bsd.c /^static const char codes[] = {$/;" v file: coff ../common/screen.h /^ size_t coff; \/* 0-N: screen col offset in display. *\/$/;" m struct:_scr coff ../vi/vi.h /^ size_t coff; \/* 0-N: Column offset in the line. *\/$/;" m struct:_smap col ../ipc/ip.h /^ size_t col; \/* Current column. *\/$/;" m struct:_ip_private color ../gtk/gtkviscreen.h /^ guchar color;$/;" m struct:_GtkViScreen color ../motif_l/m_motif.h /^ int color;$/;" m struct: colormap_resources ../motif/m_main.c /^static XutResource colormap_resources[] = {$/;" v file: cols ../common/screen.h /^ size_t cols; \/* 1-N: number of columns. *\/$/;" m struct:_scr cols ../gtk/gtkviscreen.h /^ gint cols, rows;$/;" m struct:_GtkViScreen cols ../motif_l/m_motif.h /^ cols;$/;" m struct: cols_in ../motif_l/xtabbed.c /^ int cols_in;$/;" m struct:rotated_text_item_template file: cols_out ../motif_l/xtabbed.c /^ int cols_out;$/;" m struct:rotated_text_item_template file: columns ../cl/cl_read.c 38;" d file: command ../motif_l/m_vi.c /^command(Widget widget, XKeyEvent *event, String *str, Cardinal *cardinal)$/;" f file: comp_hor_tab_shape ../motif_l/xtabbed.c /^static void comp_hor_tab_shape(Widget self,int i,XPoint p[12],int * x0,int * x1,int * midy)$/;" f file: comp_ver_tab_shape ../motif_l/xtabbed.c /^static void comp_ver_tab_shape(Widget self,int i,XPoint p[12],int * y0,int * y1,int * midx)$/;" f file: compare ../ex/ex_tag.c /^compare(register char *s1, register char *s2, register char *back)$/;" f file: composite ../motif_l/xtabbed.c /^CompositePart composite;$/;" m struct:_XmTabsRec file: composite_class ../motif_l/xtabbed.c /^CompositeClassPart composite_class;$/;" m struct:_XmTabsClassRec file: compute_tabsizes ../motif_l/xtabbed.c /^static void compute_tabsizes(Widget self)$/;" f file: conf_t ../common/common.h /^typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;$/;" t constraint ../motif_l/xtabbed.c /^ConstraintPart constraint;$/;" m struct:_XmTabsRec file: constraint_class ../motif_l/xtabbed.c /^ConstraintClassPart constraint_class;$/;" m struct:_XmTabsClassRec file: conv ../common/screen.h /^ CONV conv;$/;" m struct:_scr conv_enc ../common/conv.c /^conv_enc (SCR *sp, int option, char *enc)$/;" f conv_init ../common/conv.c /^conv_init (SCR *orig, SCR *sp)$/;" f convertProc ../motif_l/m_copypaste.c /^static int convertProc( Widget widget,$/;" f file: conx ../gtk/gtkviscreen.h /^ PangoContext *conx;$/;" m struct:_GtkViScreen copy_bg ../motif_l/xtabbed.c /^static void copy_bg(Widget self,int offset,XrmValue * value)$/;" f file: copy_to_clipboard ../motif_l/m_vi.c /^static void copy_to_clipboard( xvi_screen *cur_screen )$/;" f file: copyright ../common/main.c /^static const char copyright[] =$/;" v file: core ../motif_l/xtabbed.c /^CorePart core;$/;" m struct:_XmTabsRec file: core_class ../motif_l/xtabbed.c /^CoreClassPart core_class;$/;" m struct:_XmTabsClassRec file: cornerheight ../motif_l/xtabbed.c /^Cardinal cornerheight;$/;" m struct: file: corners_x ../motif_l/xtabbed.c /^ float *corners_x;$/;" m struct:rotated_text_item_template file: corners_y ../motif_l/xtabbed.c /^ float *corners_y;$/;" m struct:rotated_text_item_template file: cornerwidth ../motif_l/xtabbed.c /^Cardinal cornerwidth;$/;" m struct: file: count ../ex/ex.h /^ long count; \/* Command: signed count. *\/$/;" m struct:_excmd count ../vi/vi.h /^ u_long count; \/* Count. *\/$/;" m struct:_vicmd count2 ../vi/vi.h /^ u_long count2; \/* Second count (only used by z). *\/$/;" m struct:_vicmd cp ../ex/ex.h /^ CHAR_T *cp; \/* Current command text. *\/$/;" m struct:_excmd create_backgc ../motif_l/xtabbed.c /^static void create_backgc(Widget self)$/;" f file: create_bottomgc ../motif_l/xtabbed.c /^static void create_bottomgc(Widget self)$/;" f file: create_check_boxes ../motif_l/m_search.c /^static Widget create_check_boxes( Widget parent,$/;" f file: create_cs_cmd ../ex/ex_cscope.c /^create_cs_cmd(SCR *sp, char *pattern, size_t *searchp)$/;" f file: create_fillgc ../motif_l/xtabbed.c /^static void create_fillgc(Widget self)$/;" f file: create_options_dialog ../motif_l/m_options.c /^static Widget create_options_dialog( Widget parent, String title )$/;" f file: create_push_buttons ../motif_l/m_search.c /^static Widget create_push_buttons( Widget parent,$/;" f file: create_push_buttons ../motif_l/m_tags.c /^static Widget create_push_buttons( Widget parent,$/;" f file: create_screen ../motif_l/m_vi.c /^static xvi_screen *create_screen( Widget parent, int rows, int cols )$/;" f file: create_search_dialog ../motif_l/m_search.c /^static Widget create_search_dialog( Widget parent, String title )$/;" f file: create_sheet ../motif_l/m_options.c /^static Widget create_sheet( Widget parent, optSheet *sheet )$/;" f file: create_tags_dialog ../motif_l/m_tags.c /^static Widget create_tags_dialog( Widget parent, String title )$/;" f file: create_text_ruler_dialog ../motif_l/m_ruler.c /^static Widget create_text_ruler_dialog( Widget parent, String title )$/;" f file: create_textgc ../motif_l/xtabbed.c /^static void create_textgc(Widget self)$/;" f file: create_toggles ../motif_l/m_options.c /^static Widget create_toggles(Widget outer, optData *toggles)$/;" f file: create_top_level_shell ../motif/m_main.c /^static void create_top_level_shell( int *argc, char **argv )$/;" f file: create_topgc ../motif_l/xtabbed.c /^static void create_topgc(Widget self)$/;" f file: create_toplevel ../gtk/gtk_main.c /^void create_toplevel(GtkVi *vi)$/;" f file: cs_bblank ../vi/getc.c /^cs_bblank(SCR *sp, VCS *csp)$/;" f cs_bp ../vi/vi.h /^ CHAR_T *cs_bp; \/* Buffer. *\/$/;" m struct:_vcs cs_ch ../vi/vi.h /^ CHAR_T cs_ch; \/* Character. *\/$/;" m struct:_vcs cs_char2int ../common/conv.c /^cs_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, $/;" f cs_cno ../vi/vi.h /^ size_t cs_cno; \/* Column. *\/$/;" m struct:_vcs cs_fblank ../vi/getc.c /^cs_fblank(SCR *sp, VCS *csp)$/;" f cs_flags ../vi/vi.h /^ int cs_flags; \/* Return flags. *\/$/;" m struct:_vcs cs_fspace ../vi/getc.c /^cs_fspace(SCR *sp, VCS *csp)$/;" f cs_init ../vi/getc.c /^cs_init(SCR *sp, VCS *csp)$/;" f cs_int2char ../common/conv.c /^cs_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, $/;" f cs_len ../vi/vi.h /^ size_t cs_len; \/* Length. *\/$/;" m struct:_vcs cs_lno ../vi/vi.h /^ db_recno_t cs_lno; \/* Line. *\/$/;" m struct:_vcs cs_next ../vi/getc.c /^cs_next(SCR *sp, VCS *csp)$/;" f cs_prev ../vi/getc.c /^cs_prev(SCR *sp, VCS *csp)$/;" f csc_file ../ex/ex_cscope.c /^csc_file(SCR *sp, CSC *csc, char *name, char **dirp, size_t *dlenp, int *isolderp)$/;" f file: csc_help ../ex/ex_cscope.c /^csc_help(SCR *sp, char *cmd)$/;" f file: cscope_add ../ex/ex_cscope.c /^cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T *dname)$/;" f file: cscope_cmds ../ex/ex_cscope.c /^static CC const cscope_cmds[] = {$/;" v file: cscope_display ../ex/ex_cscope.c /^cscope_display(SCR *sp)$/;" f cscope_find ../ex/ex_cscope.c /^cscope_find(SCR *sp, EXCMD *cmdp, CHAR_T *pattern)$/;" f file: cscope_help ../ex/ex_cscope.c /^cscope_help(SCR *sp, EXCMD *cmdp, CHAR_T *subcmd)$/;" f file: cscope_kill ../ex/ex_cscope.c /^cscope_kill(SCR *sp, EXCMD *cmdp, CHAR_T *cn)$/;" f file: cscope_reset ../ex/ex_cscope.c /^cscope_reset(SCR *sp, EXCMD *cmdp, CHAR_T *notusedp)$/;" f file: cscope_search ../ex/ex_cscope.c /^cscope_search(SCR *sp, TAGQ *tqp, TAG *tp)$/;" f csearchdir ../vi/vi.h /^ cdir_t csearchdir; \/* Character search direction. *\/$/;" m struct:_vi_private ctag_file ../ex/ex_tag.c /^ctag_file(SCR *sp, TAGF *tfp, char *name, char **dirp, size_t *dlenp)$/;" f file: ctag_search ../ex/ex_tag.c /^ctag_search(SCR *sp, CHAR_T *search, size_t slen, char *tag)$/;" f file: ctag_sfile ../ex/ex_tag.c /^ctag_sfile(SCR *sp, TAGF *tfp, TAGQ *tqp, char *tname)$/;" f file: ctag_slist ../ex/ex_tag.c /^ctag_slist(SCR *sp, CHAR_T *tag)$/;" f file: ctx ../motif/m_main.c /^static XtAppContext ctx;$/;" v file: ctx ../motif_l/m_vi.c /^static XtAppContext ctx;$/;" v file: cup ../cl/cl.h /^ char *cup; \/* Cursor movement terminal string. *\/$/;" m struct:_cl_private cur ../motif_l/xtabbed.c /^ int cur,$/;" m struct:tab_data file: cur_word ../motif_l/m_vi.c /^static String cur_word = NULL;$/;" v file: current ../ex/tag.h /^ TAG *current; \/* Current TAG within the queue. *\/$/;" m struct:_tagq curx ../gtk/gtkviscreen.h /^ gint curx, cury; \/* character position *\/$/;" m struct:_GtkViScreen curx ../motif_l/m_motif.h /^ int curx, cury;$/;" m struct: cury ../gtk/gtkviscreen.h /^ gint curx, cury; \/* character position *\/$/;" m struct:_GtkViScreen cury ../motif_l/m_motif.h /^ int curx, cury;$/;" m struct: cut ../common/cut.c /^cut(SCR *sp, CHAR_T *namep, MARK *fm, MARK *tm, int flags)$/;" f cut_close ../common/cut.c /^cut_close(WIN *wp)$/;" f cut_line ../common/cut.c /^cut_line(SCR *sp, db_recno_t lno, size_t fcno, size_t clen, CB *cbp)$/;" f cuu1 ../cl/cl.h /^ char *cuu1; \/* Cursor up terminal string. *\/$/;" m struct:_cl_private cvtStringToStringArray ../motif_l/xtabbed.c /^Boolean cvtStringToStringArray(Display *display, XrmValuePtr args, Cardinal *num_args, XrmValuePtr from, XrmValuePtr to, XtPointer *converter_data)$/;" f file: cvtStringToTabsOrientation ../motif_l/xtabbed.c /^static Boolean cvtStringToTabsOrientation(Display * display,XrmValuePtr args,Cardinal * num_args,XrmValuePtr from,XrmValuePtr to,XtPointer * converter_data)$/;" f file: cvtTabsOrientationToString ../motif_l/xtabbed.c /^static Boolean cvtTabsOrientationToString(Display * display,XrmValuePtr args,Cardinal * num_args,XrmValuePtr from,XrmValuePtr to,XtPointer * converter_data)$/;" f file: cw ../cl/cl.h /^ CONVWIN cw; \/* Conversion buffer. *\/$/;" m struct:_cl_private cw ../common/screen.h /^ CONVWIN cw;$/;" m struct:_win data ../common/log.c /^ char data[sizeof(u_char) \/* type *\/ + sizeof(db_recno_t)];$/;" m struct: file: db ../common/exf.h /^ DB *db; \/* File db structure. *\/$/;" m struct:_exf db ../ex/ex_display.c /^db(SCR *sp, CB *cbp, u_char *name)$/;" f file: db1_close ../common/db1.c /^db1_close(DB *db, u_int32_t flags) {$/;" f file: db1_get ../common/db1.c /^db1_get(DB *db, DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags) {$/;" f file: db1_open ../common/db1.c /^db1_open(DB *db, const char *file, const char *database, DBTYPE type,$/;" f file: db1_put ../common/db1.c /^db1_put(DB *db, DB_TXN *txnid, DBT *key, DBT *data, u_int32_t flags) {$/;" f file: db1_set_flags ../common/db1.c /^db1_set_flags(DB *db, u_int32_t flags) {$/;" f file: db1_set_pagesize ../common/db1.c /^db1_set_pagesize(DB *db, u_int32_t pagesize) {$/;" f file: db1_set_re_delim ../common/db1.c /^db1_set_re_delim(DB *db, int re_delim) {$/;" f file: db1_set_re_source ../common/db1.c /^db1_set_re_source(DB *db, const char *re_source) {$/;" f file: db1_sync ../common/db1.c /^db1_sync(DB *db, u_int32_t flags) {$/;" f file: db_append ../common/db.c /^db_append(SCR *sp, int update, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_append ../common/db1.c /^db_append(SCR *sp, int update, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_create ../common/db.h 28;" d db_create ../common/db1.c /^db_create(DB **dbp, DB_ENV *dbenv, u_int32_t flags) {$/;" f db_delete ../common/db.c /^db_delete(SCR *sp, db_recno_t lno)$/;" f db_delete ../common/db1.c /^db_delete(SCR *sp, db_recno_t lno)$/;" f db_eget ../common/db.c /^db_eget(SCR *sp, db_recno_t lno, CHAR_T **pp, size_t *lenp, int *isemptyp)$/;" f db_eget ../common/db1.c /^db_eget(SCR *sp, db_recno_t lno, CHAR_T **pp, size_t *lenp, int *isemptyp)$/;" f db_env_create ../common/db.h 29;" d db_env_open ../common/db.h 13;" d db_env_open ../common/db.h 8;" d db_env_remove ../common/db.h 10;" d db_env_remove ../common/db.h 15;" d db_err ../common/db.c /^db_err(SCR *sp, db_recno_t lno)$/;" f db_err ../common/db1.c /^db_err(SCR *sp, db_recno_t lno)$/;" f db_error ../common/screen.h /^ int db_error; \/* Return code from db function. *\/$/;" m struct:_scr db_exist ../common/db.c /^db_exist(SCR *sp, db_recno_t lno)$/;" f db_exist ../common/db1.c /^db_exist(SCR *sp, db_recno_t lno)$/;" f db_get ../common/db.c /^db_get(SCR *sp, db_recno_t lno, u_int32_t flags, CHAR_T **pp, size_t *lenp)$/;" f db_get ../common/db1.c /^db_get(SCR *sp, db_recno_t lno, u_int32_t flags, CHAR_T **pp, size_t *lenp)$/;" f db_insert ../common/db.c /^db_insert(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_insert ../common/db1.c /^db_insert(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_last ../common/db.c /^db_last(SCR *sp, db_recno_t *lnop)$/;" f db_last ../common/db1.c /^db_last(SCR *sp, db_recno_t *lnop)$/;" f db_list ../motif_l/m_tags.c /^ db_list;$/;" v file: db_open ../common/db.h 20;" d db_open ../common/db.h 23;" d db_ruler ../motif_l/m_ruler.c /^static Widget db_ruler = NULL;$/;" v file: db_set ../common/db.c /^db_set(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_set ../common/db1.c /^db_set(SCR *sp, db_recno_t lno, CHAR_T *p, size_t len)$/;" f db_setup ../common/exf.c /^db_setup(SCR *sp, EXF *ep)$/;" f file: db_strerror ../common/db.h 30;" d db_strerror ../common/db1.c /^db_strerror(int error) {$/;" f db_tabs ../motif_l/m_tags.c /^static Widget db_tabs = NULL,$/;" v file: db_text ../motif_l/m_tags.c /^ db_text,$/;" v file: dcb_store ../common/screen.h /^ CB dcb_store; \/* Default cut buffer storage. *\/$/;" m struct:_win dcbp ../common/screen.h /^ CB *dcbp; \/* Default cut buffer pointer. *\/$/;" m struct:_win debug ../motif_l/xtabbed.c /^static int debug=0;$/;" v file: debug ../motif_l/xtabbed.c /^static int debug=1;$/;" v file: defaultTranslations ../motif_l/xtabbed.c /^static char defaultTranslations[] = "\\$/;" v file: default_char2int ../common/conv.c /^default_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, $/;" f default_int2char ../common/conv.c /^default_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, $/;" f defscroll ../common/screen.h /^ db_recno_t defscroll; \/* Vi: ^D, ^U scroll information. *\/$/;" m struct:_scr del ../common/delete.c /^del(SCR *sp, MARK *fm, MARK *tm, int lmode)$/;" f deleteln ../ipc/ip.h /^ IPFunc deleteln;$/;" m struct:ip_si_operations description ../motif_l/m_motif.h /^ String description;$/;" m struct: destroy ../motif_l/xtabbed.c /^static void destroy(Widget self)$/;" f file: destroyed ../motif_l/m_options.c /^static void destroyed(void)$/;" f file: destroyed ../motif_l/m_ruler.c /^static void destroyed(void)$/;" f file: destroyed ../motif_l/m_tags.c /^static void destroyed(void)$/;" f file: dialogs ../motif_l/m_search.c /^static save_dialog *dialogs = NULL;$/;" v file: didop ../common/log.h /^ int didop;$/;" m struct:_log_state dir_t ../common/common.h /^typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;$/;" t discard ../ipc/ip.h /^ IPFunc discard;$/;" m struct:ip_si_operations display ../motif_l/m_options.c /^static optData display[] = {$/;" v file: display_int ../motif_l/m_options.c /^}, display_int[] = {$/;" v file: display_str ../motif_l/m_options.c /^}, display_str[] = {$/;" v file: dlen ../ex/tag.h /^ size_t dlen; \/* Length of base directory. *\/$/;" m struct:_csc dname ../ex/tag.h /^ char *dname; \/* Base directory of this cscope connection. *\/$/;" m struct:_csc done ../motif_l/xtabbed.c 549;" d file: done_bert ../motif_l/xtabbed.c 2981;" d file: done_func ../motif_l/m_search.c /^static void done_func( Widget w )$/;" f file: draw_border ../motif_l/xtabbed.c /^static void draw_border(Widget self,XPoint poly[12])$/;" f file: draw_caret ../motif_l/m_vi.c /^draw_caret(xvi_screen *this_screen)$/;" f file: draw_hor_tab ../motif_l/xtabbed.c /^static void draw_hor_tab(Widget self,Region region,int i)$/;" f file: draw_lines ../gtk/gtkviscreen.c /^draw_lines(GtkViScreen *vi, gint ymin, gint xmin, gint ymax, gint xmax)$/;" f file: draw_ver_tab ../motif_l/xtabbed.c /^static void draw_ver_tab(Widget self,Region region,int i)$/;" f file: dummy ../motif_l/xtabbed.c /^int dummy;$/;" m struct: file: e_c ../common/key.h /^ CHAR_T e_c; \/* Character. *\/$/;" m struct:_event e_cno ../common/key.h 169;" d e_csp ../common/key.h 179;" d e_event ../common/key.h /^ e_event_t e_event; \/* Event type. *\/$/;" m struct:_event e_event ../ipc/ip.h /^ e_event_t e_event;$/;" m struct:_vipfunlist e_event_t ../common/key.h /^} e_event_t;$/;" t e_fcno ../common/key.h 171;" d e_flags ../common/key.h 167;" d e_flno ../common/key.h 170;" d e_ipcom ../common/key.h /^ int e_ipcom; \/* IP command. *\/$/;" m struct:_event e_key_t ../common/key.h /^} e_key_t;$/;" t e_len ../common/key.h 180;" d e_len1 ../common/key.h /^ size_t e_len1; \/* String #1 length. *\/$/;" m struct:_event e_len2 ../common/key.h /^ size_t e_len2; \/* String #2 length. *\/$/;" m struct:_event e_lno ../common/key.h 168;" d e_memcmp ../common/seq.c /^e_memcmp(CHAR_T *p1, EVENT *ep, size_t n)$/;" f e_str1 ../common/key.h /^ CHAR_T *e_str1; \/* String #1. *\/$/;" m struct:_event e_str2 ../common/key.h /^ CHAR_T *e_str2; \/* String #2. *\/$/;" m struct:_event e_tcno ../common/key.h 173;" d e_tlno ../common/key.h 172;" d e_val1 ../common/key.h /^ size_t e_val1; \/* Value #1. *\/$/;" m struct:_event e_val2 ../common/key.h /^ size_t e_val2; \/* Value #2. *\/$/;" m struct:_event e_val3 ../common/key.h /^ size_t e_val3; \/* Value #3. *\/$/;" m struct:_event e_val4 ../common/key.h /^ size_t e_val4; \/* Value #4. *\/$/;" m struct:_event e_value ../common/key.h /^ e_key_t e_value; \/* Key type. *\/$/;" m struct:_event edit_menu ../motif_l/m_menu.c /^static pull_down edit_menu[] = {$/;" v file: editopt ../ipc/ip.h /^ IPFunc_ab1 editopt;$/;" m struct:ip_si_operations editor ../common/main.c /^editor(WIN *wp, int argc, char **argv)$/;" f el ../cl/cl.h /^ char *el; \/* Clear to EOL terminal string. *\/$/;" m struct:_cl_private endcol ../gtk/gtkviscreen.h /^ guchar *endcol; $/;" m struct:_GtkViScreen env ../common/exf.h /^ DB_ENV *env; \/* The DB environment. *\/$/;" m struct:_exf env_path ../common/exf.h /^ char *env_path; \/* DB environment directory. *\/$/;" m struct:_exf eof_count ../cl/cl.h /^ int eof_count; \/* EOF count. *\/$/;" m struct:_cl_private ep ../common/screen.h /^ EXF *ep; \/* Screen's current EXF structure. *\/$/;" m struct:_scr erase_selection ../motif_l/m_vi.c /^static void erase_selection( xvi_screen *cur_screen, int start, int end )$/;" f file: errnum ../ex/tag.h /^ int errnum; \/* Errno. *\/$/;" m struct:_tagf ev ../vi/vi.h /^ EVENT ev; \/* Associated event. *\/$/;" m struct:_vicmd eword ../vi/v_word.c /^eword(SCR *sp, VICMD *vp, enum which type)$/;" f file: ex ../ex/ex.c /^ex(SCR **spp)$/;" f ex_N_edit ../ex/ex_edit.c /^ex_N_edit(SCR *sp, EXCMD *cmdp, FREF *frp, int attach)$/;" f file: ex_N_next ../ex/ex_args.c /^ex_N_next(SCR *sp, EXCMD *cmdp)$/;" f file: ex_abbr ../ex/ex_abbrev.c /^ex_abbr(SCR *sp, EXCMD *cmdp)$/;" f ex_aci ../ex/ex_append.c /^ex_aci(SCR *sp, EXCMD *cmdp, enum which cmd)$/;" f file: ex_append ../ex/ex_append.c /^ex_append(SCR *sp, EXCMD *cmdp)$/;" f ex_args ../ex/ex_args.c /^ex_args(SCR *sp, EXCMD *cmdp)$/;" f ex_at ../ex/ex_at.c /^ex_at(SCR *sp, EXCMD *cmdp)$/;" f ex_badaddr ../ex/ex.c /^ex_badaddr(SCR *sp, const EXCMDLIST *cp, enum badaddr ba, enum nresult nret)$/;" f ex_bang ../ex/ex_bang.c /^ex_bang(SCR *sp, EXCMD *cmdp)$/;" f ex_bg ../ex/ex_screen.c /^ex_bg(SCR *sp, EXCMD *cmdp)$/;" f ex_buildargv ../ex/ex_args.c /^ex_buildargv(SCR *sp, EXCMD *cmdp, char *name)$/;" f ex_cd ../ex/ex_cd.c /^ex_cd(SCR *sp, EXCMD *cmdp)$/;" f ex_change ../ex/ex_append.c /^ex_change(SCR *sp, EXCMD *cmdp)$/;" f ex_cinit ../ex/ex_util.c /^ex_cinit(SCR *sp, EXCMD *cmdp, int cmd_id, int naddr, db_recno_t lno1, db_recno_t lno2, int force)$/;" f ex_cmd ../ex/ex.c /^ex_cmd(SCR *sp)$/;" f ex_comlog ../ex/ex.c /^ex_comlog(sp, ecp)$/;" f file: ex_comm_search ../ex/ex.c /^ex_comm_search(SCR *sp, CHAR_T *name, size_t len)$/;" f file: ex_copy ../ex/ex_move.c /^ex_copy(SCR *sp, EXCMD *cmdp)$/;" f ex_cscope ../ex/ex_cscope.c /^ex_cscope(SCR *sp, EXCMD *cmdp)$/;" f ex_delete ../ex/ex_delete.c /^ex_delete(SCR *sp, EXCMD *cmdp)$/;" f ex_discard ../ex/ex.c /^ex_discard(SCR *sp)$/;" f file: ex_display ../ex/ex_display.c /^ex_display(SCR *sp, EXCMD *cmdp)$/;" f ex_edit ../ex/ex_edit.c /^ex_edit(SCR *sp, EXCMD *cmdp)$/;" f ex_emsg ../ex/ex_util.c /^ex_emsg(SCR *sp, char *p, exm_t which)$/;" f ex_enter ../cl/cl.h /^ struct termios ex_enter;\/* Terminal values to enter ex. *\/$/;" m struct:_cl_private ex_equal ../ex/ex_equal.c /^ex_equal(SCR *sp, EXCMD *cmdp)$/;" f ex_exec_proc ../ex/ex_shell.c /^ex_exec_proc(SCR *sp, EXCMD *cmdp, char *cmd, const char *msg, int need_newline)$/;" f ex_exrc ../ex/ex_init.c /^ex_exrc(SCR *sp)$/;" f ex_fflush ../ex/ex_print.c /^ex_fflush(SCR *sp)$/;" f ex_fg ../ex/ex_screen.c /^ex_fg(SCR *sp, EXCMD *cmdp)$/;" f ex_file ../ex/ex_file.c /^ex_file(SCR *sp, EXCMD *cmdp)$/;" f ex_filter ../ex/ex_filter.c /^ex_filter(SCR *sp, EXCMD *cmdp, MARK *fm, MARK *tm, MARK *rp, CHAR_T *cmd, enum filtertype ftype)$/;" f ex_g_insdel ../ex/ex_global.c /^ex_g_insdel(SCR *sp, lnop_t op, db_recno_t lno)$/;" f ex_g_setup ../ex/ex_global.c /^ex_g_setup(SCR *sp, EXCMD *cmdp, enum which cmd)$/;" f file: ex_getline ../ex/ex_util.c /^ex_getline(SCR *sp, FILE *fp, size_t *lenp)$/;" f ex_global ../ex/ex_global.c /^ex_global(SCR *sp, EXCMD *cmdp)$/;" f ex_help ../ex/ex_usage.c /^ex_help(SCR *sp, EXCMD *cmdp)$/;" f ex_init ../ex/ex_util.c /^ex_init(SCR *sp)$/;" f ex_insert ../ex/ex_append.c /^ex_insert(SCR *sp, EXCMD *cmdp)$/;" f ex_is_abbrev ../ex/ex.c /^ex_is_abbrev(SCR *sp, CHAR_T *name, size_t len)$/;" f ex_is_unmap ../ex/ex.c /^ex_is_unmap(SCR *sp, CHAR_T *name, size_t len)$/;" f ex_join ../ex/ex_join.c /^ex_join(SCR *sp, EXCMD *cmdp)$/;" f ex_ldisplay ../ex/ex_print.c /^ex_ldisplay(SCR *sp, const CHAR_T *p, size_t len, size_t col, u_int flags)$/;" f ex_line ../ex/ex.c /^ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp)$/;" f file: ex_list ../ex/ex_print.c /^ex_list(SCR *sp, EXCMD *cmdp)$/;" f ex_load ../ex/ex.c /^ex_load(SCR *sp)$/;" f file: ex_map ../ex/ex_map.c /^ex_map(SCR *sp, EXCMD *cmdp)$/;" f ex_mark ../ex/ex_mark.c /^ex_mark(SCR *sp, EXCMD *cmdp)$/;" f ex_mkexrc ../ex/ex_mkexrc.c /^ex_mkexrc(SCR *sp, EXCMD *cmdp)$/;" f ex_move ../ex/ex_move.c /^ex_move(SCR *sp, EXCMD *cmdp)$/;" f ex_ncheck ../ex/ex_util.c /^ex_ncheck(SCR *sp, int force)$/;" f ex_next ../ex/ex_args.c /^ex_next(SCR *sp, EXCMD *cmdp)$/;" f ex_number ../ex/ex_print.c /^ex_number(SCR *sp, EXCMD *cmdp)$/;" f ex_open ../ex/ex_open.c /^ex_open(SCR *sp, EXCMD *cmdp)$/;" f ex_optchange ../ex/ex_init.c /^ex_optchange(SCR *sp, int offset, char *str, u_long *valp)$/;" f ex_perl ../ex/ex_perl.c /^ex_perl(SCR *sp, EXCMD *cmdp)$/;" f ex_pr ../ex/ex_print.c /^ex_pr(SCR *sp, EXCMD *cmdp)$/;" f ex_prchars ../ex/ex_print.c /^ex_prchars(SCR *sp, const CHAR_T *p, size_t *colp, size_t len, $/;" f file: ex_preserve ../ex/ex_preserve.c /^ex_preserve(SCR *sp, EXCMD *cmdp)$/;" f ex_prev ../ex/ex_args.c /^ex_prev(SCR *sp, EXCMD *cmdp)$/;" f ex_print ../ex/ex_print.c /^ex_print(SCR *sp, EXCMD *cmdp, MARK *fp, MARK *tp, u_int32_t flags)$/;" f ex_printf ../ex/ex_print.c /^ex_printf(SCR *sp, const char *fmt, ...)$/;" f ex_private ../common/screen.h /^ void *ex_private; \/* Ex private area. *\/$/;" m struct:_scr ex_put ../ex/ex_put.c /^ex_put(SCR *sp, EXCMD *cmdp)$/;" f ex_puts ../ex/ex_print.c /^ex_puts(SCR *sp, const char *str)$/;" f ex_quit ../ex/ex_quit.c /^ex_quit(SCR *sp, EXCMD *cmdp)$/;" f ex_range ../ex/ex.c /^ex_range(SCR *sp, EXCMD *ecp, int *errp)$/;" f ex_read ../ex/ex_read.c /^ex_read(SCR *sp, EXCMD *cmdp)$/;" f ex_readfp ../ex/ex_read.c /^ex_readfp(SCR *sp, char *name, FILE *fp, MARK *fm, db_recno_t *nlinesp, int silent)$/;" f ex_recover ../ex/ex_preserve.c /^ex_recover(SCR *sp, EXCMD *cmdp)$/;" f ex_resize ../ex/ex_screen.c /^ex_resize(SCR *sp, EXCMD *cmdp)$/;" f ex_rew ../ex/ex_args.c /^ex_rew(SCR *sp, EXCMD *cmdp)$/;" f ex_run_file ../ex/ex_init.c /^ex_run_file(SCR *sp, char *name)$/;" f file: ex_run_str ../ex/ex_init.c /^ex_run_str(SCR *sp, char *name, CHAR_T *str, size_t len, int ex_flags, int nocopy)$/;" f ex_s ../ex/ex_subst.c /^ex_s(SCR *sp, EXCMD *cmdp)$/;" f ex_scprint ../ex/ex_print.c /^ex_scprint(SCR *sp, MARK *fp, MARK *tp)$/;" f ex_screen_copy ../ex/ex_init.c /^ex_screen_copy(SCR *orig, SCR *sp)$/;" f ex_screen_end ../ex/ex_init.c /^ex_screen_end(SCR *sp)$/;" f ex_script ../ex/ex_script.c /^ex_script(SCR *sp, EXCMD *cmdp)$/;" f ex_sdisplay ../ex/ex_screen.c /^ex_sdisplay(SCR *sp)$/;" f ex_set ../ex/ex_set.c /^ex_set(SCR *sp, EXCMD *cmdp)$/;" f ex_shell ../ex/ex_shell.c /^ex_shell(SCR *sp, EXCMD *cmdp)$/;" f ex_shiftl ../ex/ex_shift.c /^ex_shiftl(SCR *sp, EXCMD *cmdp)$/;" f ex_shiftr ../ex/ex_shift.c /^ex_shiftr(SCR *sp, EXCMD *cmdp)$/;" f ex_source ../ex/ex_source.c /^ex_source(SCR *sp, EXCMD *cmdp)$/;" f ex_stop ../ex/ex_stop.c /^ex_stop(SCR *sp, EXCMD *cmdp)$/;" f ex_subagain ../ex/ex_subst.c /^ex_subagain(SCR *sp, EXCMD *cmdp)$/;" f ex_subtilde ../ex/ex_subst.c /^ex_subtilde(SCR *sp, EXCMD *cmdp)$/;" f ex_tag_Nswitch ../ex/ex_tag.c /^ex_tag_Nswitch(SCR *sp, TAG *tp, int force)$/;" f ex_tag_copy ../ex/ex_tag.c /^ex_tag_copy(SCR *orig, SCR *sp)$/;" f ex_tag_display ../ex/ex_tag.c /^ex_tag_display(SCR *sp)$/;" f ex_tag_first ../ex/ex_tag.c /^ex_tag_first(SCR *sp, CHAR_T *tagarg)$/;" f ex_tag_free ../ex/ex_tag.c /^ex_tag_free(SCR *sp)$/;" f ex_tag_next ../ex/ex_tag.c /^ex_tag_next(SCR *sp, EXCMD *cmdp)$/;" f ex_tag_nswitch ../ex/ex_tag.c /^ex_tag_nswitch(SCR *sp, TAG *tp, int force)$/;" f ex_tag_pop ../ex/ex_tag.c /^ex_tag_pop(SCR *sp, EXCMD *cmdp)$/;" f ex_tag_prev ../ex/ex_tag.c /^ex_tag_prev(SCR *sp, EXCMD *cmdp)$/;" f ex_tag_push ../ex/ex_tag.c /^ex_tag_push(SCR *sp, EXCMD *cmdp)$/;" f ex_tag_top ../ex/ex_tag.c /^ex_tag_top(SCR *sp, EXCMD *cmdp)$/;" f ex_tagf_alloc ../ex/ex_tag.c /^ex_tagf_alloc(SCR *sp, char *str)$/;" f ex_tcl ../ex/ex_tcl.c /^ex_tcl(SCR *sp, EXCMD *cmdp)$/;" f ex_txt ../ex/ex_txt.c /^ex_txt(SCR *sp, TEXTH *tiqh, ARG_CHAR_T prompt, u_int32_t flags)$/;" f ex_unabbr ../ex/ex_abbrev.c /^ex_unabbr(SCR *sp, EXCMD *cmdp)$/;" f ex_undo ../ex/ex_undo.c /^ex_undo(SCR *sp, EXCMD *cmdp)$/;" f ex_unknown ../ex/ex.c /^ex_unknown(SCR *sp, CHAR_T *cmd, size_t len)$/;" f file: ex_unmap ../ex/ex_map.c /^ex_unmap(SCR *sp, EXCMD *cmdp)$/;" f ex_usage ../ex/ex_usage.c /^ex_usage(SCR *sp, EXCMD *cmdp)$/;" f ex_v ../ex/ex_global.c /^ex_v(SCR *sp, EXCMD *cmdp)$/;" f ex_version ../ex/ex_version.c /^ex_version(SCR *sp, EXCMD *cmdp)$/;" f ex_visual ../ex/ex_visual.c /^ex_visual(SCR *sp, EXCMD *cmdp)$/;" f ex_viusage ../ex/ex_usage.c /^ex_viusage(SCR *sp, EXCMD *cmdp)$/;" f ex_wemsg ../ex/ex_util.c /^ex_wemsg(SCR* sp, CHAR_T *p, exm_t which)$/;" f ex_wn ../ex/ex_write.c /^ex_wn(SCR *sp, EXCMD *cmdp)$/;" f ex_wq ../ex/ex_write.c /^ex_wq(SCR *sp, EXCMD *cmdp)$/;" f ex_write ../ex/ex_write.c /^ex_write(SCR *sp, EXCMD *cmdp)$/;" f ex_writefp ../ex/ex_write.c /^ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_long *nch, int silent)$/;" f ex_xit ../ex/ex_write.c /^ex_xit(SCR *sp, EXCMD *cmdp)$/;" f ex_yank ../ex/ex_yank.c /^ex_yank(SCR *sp, EXCMD *cmdp)$/;" f ex_z ../ex/ex_z.c /^ex_z(SCR *sp, EXCMD *cmdp)$/;" f exadj_t ../common/gs.h /^typedef enum { EX_TERM_CE, EX_TERM_SCROLL } exadj_t;$/;" t excmd ../common/screen.h /^ EXCMD excmd; \/* Default ex command structure. *\/$/;" m struct:_win exm_t ../ex/ex.h /^} exm_t;$/;" t expose ../motif_l/xtabbed.c /^static void expose(Widget self,XEvent * event,Region region)$/;" f file: expose_text ../gtk/gtkviscreen.c /^expose_text (GtkViScreen* vi, GdkRectangle *area, gboolean cursor)$/;" f file: exrc_isok ../ex/ex_init.c /^exrc_isok(SCR *sp, struct stat *sbp, char *path, int rootown, int rootid)$/;" f file: exwr ../ex/ex_write.c /^exwr(SCR *sp, EXCMD *cmdp, enum which cmd)$/;" f file: fSEARCH ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" e f_altwerase ../common/options_f.c /^f_altwerase(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_clear ../motif_l/m_vi.c /^static void f_clear( Widget widget )$/;" f file: f_columns ../common/options_f.c /^f_columns(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_copy ../motif_l/m_vi.c /^static void f_copy( String *buffer, int *len )$/;" f file: f_encoding ../common/options_f.c /^f_encoding(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_lines ../common/options_f.c /^f_lines(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_lisp ../common/options_f.c /^f_lisp(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_msgcat ../common/options_f.c /^f_msgcat(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_paragraph ../common/options_f.c /^f_paragraph(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_paste ../motif_l/m_vi.c /^static void f_paste(int widget, int buffer, int length)$/;" f file: f_print ../common/options_f.c /^f_print(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_readonly ../common/options_f.c /^f_readonly(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_recompile ../common/options_f.c /^f_recompile(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_reformat ../common/options_f.c /^f_reformat(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_search ../common/search.c /^f_search(SCR *sp, MARK *fm, MARK *rm, CHAR_T *ptrn, size_t plen, CHAR_T **eptrn, u_int flags)$/;" f f_section ../common/options_f.c /^f_section(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_ttywerase ../common/options_f.c /^f_ttywerase(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_w1200 ../common/options_f.c /^f_w1200(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_w300 ../common/options_f.c /^f_w300(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_w9600 ../common/options_f.c /^f_w9600(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f f_window ../common/options_f.c /^f_window(SCR *sp, OPTION *op, char *str, u_long *valp)$/;" f fallback_rsrcs ../motif/m_main.c /^String fallback_rsrcs[] = {$/;" v fatal ../ipc/ip_run.c /^fatal()$/;" f file: fcntl_fd ../common/exf.h /^ int fcntl_fd; \/* Fcntl locking fd; see exf.c. *\/$/;" m struct:_exf fd ../common/exf.h /^ int fd; \/* File descriptor *\/$/;" m struct:_exf fdef ../ex/ex.h /^ u_int32_t fdef; \/* Saved E_C_* default command flags. *\/$/;" m struct:_ex_private fe_char2int ../common/conv.c /^fe_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, $/;" f fe_int2char ../common/conv.c /^fe_int2char(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, $/;" f fid ../motif_l/xtabbed.c /^ Font fid;$/;" m struct:rotated_text_item_template file: file2int ../common/conv.h /^ char2wchar_t file2int;$/;" m struct:_conv file_add ../common/exf.c /^file_add(SCR *sp, char *name)$/;" f file_aw ../common/exf.c /^file_aw(SCR *sp, int flags)$/;" f file_backup ../common/exf.c /^file_backup(SCR *sp, char *name, char *bname)$/;" f file: file_cinit ../common/exf.c /^file_cinit(SCR *sp)$/;" f file: file_command ../motif_l/m_menu.c /^file_command(Widget w, int code, String prompt)$/;" f file: file_comment ../common/exf.c /^file_comment(SCR *sp)$/;" f file: file_end ../common/exf.c /^file_end(SCR *sp, EXF *ep, int force)$/;" f file_init ../common/exf.c /^file_init(SCR *sp, FREF *frp, char *rcv_name, int flags)$/;" f file_lock ../common/exf.c /^file_lock(SCR *sp, char *name, int *fdp, int fd, int iswrite)$/;" f file_m1 ../common/exf.c /^file_m1(SCR *sp, int force, int flags)$/;" f file_m2 ../common/exf.c /^file_m2(SCR *sp, int force)$/;" f file_m3 ../common/exf.c /^file_m3(SCR *sp, int force)$/;" f file_menu ../motif_l/m_menu.c /^static pull_down file_menu[] = {$/;" v file: file_name ../motif_l/m_menu.c /^static String file_name;$/;" v file: file_spath ../common/exf.c /^file_spath(SCR *sp, FREF *frp, struct stat *sbp, int *existsp)$/;" f file: file_write ../common/exf.c /^file_write(SCR *sp, MARK *fm, MARK *tm, char *name, int flags)$/;" f files ../motif_l/m_options.c /^}, files[] = {$/;" v file: files_str ../motif_l/m_options.c /^}, files_str[] = {$/;" v file: fillgc ../motif_l/xtabbed.c /^GC fillgc;$/;" m struct: file: filter_ldisplay ../ex/ex_filter.c /^filter_ldisplay(SCR *sp, FILE *fp)$/;" f file: filtertype ../ex/ex.h /^enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE };$/;" g find ../motif_l/m_vi.c /^static void find( Widget w )$/;" f file: first_text_item ../motif_l/xtabbed.c /^RotatedTextItem *first_text_item=NULL;$/;" v flagoff ../ex/ex.h /^ long flagoff; \/* Command: signed flag offset. *\/$/;" m struct:_excmd flags ../cl/cl.h /^ u_int32_t flags;$/;" m struct:_cl_private flags ../common/args.h /^ u_int8_t flags;$/;" m struct:_args flags ../common/cut.h /^ u_int8_t flags;$/;" m struct:_cb flags ../common/exf.h /^ u_int8_t flags;$/;" m struct:_exf flags ../common/gs.h /^ u_int16_t flags;$/;" m struct:_fref flags ../common/gs.h /^ u_int32_t flags;$/;" m struct:_gs flags ../common/mark.h /^ u_int8_t flags;$/;" m struct:_lmark flags ../common/options.h /^ u_int8_t flags;$/;" m struct:_option flags ../common/options.h /^ u_int8_t flags;$/;" m struct:_optlist flags ../common/screen.h /^ u_int32_t flags;$/;" m struct:_scr flags ../common/screen.h /^ u_int32_t flags;$/;" m struct:_win flags ../common/seq.h /^ u_int8_t flags;$/;" m struct:_seq flags ../ex/ex.h /^ u_int16_t flags;$/;" m struct:_excmdlist flags ../ex/ex.h /^ u_int32_t flags; \/* Current flags. *\/$/;" m struct:_excmd flags ../ex/ex.h /^ u_int8_t flags;$/;" m struct:_ex_private flags ../ex/tag.h /^ u_int8_t flags;$/;" m struct:_tagf flags ../ex/tag.h /^ u_int8_t flags;$/;" m struct:_tagq flags ../ipc/ip.h /^ u_int32_t flags;$/;" m struct:_ip_private flags ../ipc/ip.h /^ u_int32_t flags;$/;" m struct:_ip_vi flags ../motif_l/m_motif.h /^ u_int flags; \/* Associated flags. *\/$/;" m struct: flags ../motif_l/m_motif.h /^ char *flags;$/;" m struct: flags ../vi/vi.h /^ u_int16_t flags;$/;" m struct:_vi_private flags ../vi/vi.h /^ u_int32_t flags;$/;" m struct:_vicmd flags ../vi/vi.h /^ u_int32_t flags;$/;" m struct:_vikeys flash ../cl/cl_bsd.c /^flash()$/;" f fmt ../vi/v_increment.c /^static char * const fmt[] = {$/;" v file: fn ../ex/ex.h /^ int (*fn) __P((SCR *, EXCMD *));$/;" m struct:_excmdlist fname ../ex/tag.h /^ char *fname; \/* Filename. *\/$/;" m struct:_tag fnlen ../ex/tag.h /^ size_t fnlen; \/* Filename length. *\/$/;" m struct:_tag focus ../cl/cl.h /^ SCR *focus; \/* Screen that has the "focus". *\/$/;" m struct:_cl_private font ../motif_l/m_vi.c /^static XFontStruct *font;$/;" v file: font ../motif_l/xtabbed.c /^XFontStruct * font;$/;" m struct: file: font_name ../motif_l/xtabbed.c /^ char *font_name;$/;" m struct:rotated_text_item_template file: form ../motif_l/m_motif.h /^ form, \/* holds text and scrollbar *\/$/;" m struct: form ../motif_l/xtabbed.c /^ Widget form;$/;" m struct:tab_data file: format ../ipc/ip.h /^ char *format;$/;" m struct:_ipfunlist format ../ipc/ip.h /^ char *format;$/;" m struct:_vipfunlist from_fd ../ex/tag.h /^ int from_fd; \/* from cscope: file descriptor. *\/$/;" m struct:_csc from_fp ../ex/tag.h /^ FILE *from_fp; \/* from cscope: FILE. *\/$/;" m struct:_csc frp ../common/screen.h /^ FREF *frp; \/* FREF being edited. *\/$/;" m struct:_scr frp ../ex/tag.h /^ FREF *frp; \/* Saved file. *\/$/;" m struct:_tag func ../common/options.h /^ int (*func) __P((SCR *, OPTION *, char *, u_long *));$/;" m struct:_optlist func ../vi/vi.h /^ int (*func) __P((SCR *, VICMD *));$/;" m struct:_vikeys function ../ex/ex_cscope.c /^ int (*function) __P((SCR *, EXCMD *, CHAR_T *));$/;" m struct:_cc file: fword ../vi/v_word.c /^fword(SCR *sp, VICMD *vp, enum which type)$/;" f file: g_suffix ../common/screen.h /^ u_int8_t g_suffix; \/* Edcompatible 'g' suffix value. *\/$/;" m struct:_scr gb_font ../gtk/gtkviscreen.c /^static GdkFont *gb_font;$/;" v file: gc ../gtk/gtkviscreen.h /^ GdkGC *gc;$/;" m struct:_GtkViScreen gc ../motif_l/m_vi.c /^static GC gc;$/;" v file: gc_ruler ../motif_l/m_ruler.c /^static GC gc_ruler;$/;" v file: gcret_t ../vi/vi.c /^} gcret_t;$/;" t file: gdbrefresh ../cl/cl_funcs.c /^gdbrefresh(void)$/;" f general ../motif_l/m_options.c /^}, general[] = {$/;" v file: general_int ../motif_l/m_options.c /^}, general_int[] = {$/;" v file: general_str ../motif_l/m_options.c /^}, general_str[] = {$/;" v file: get_child_widget ../motif_l/m_search.c /^static Widget get_child_widget( Widget parent, String name )$/;" f file: get_connection ../ip/ip_main.c /^get_connection(WIN *wp, int main_ifd, int main_ofd, $/;" f file: get_fallback_rsrcs ../motif/m_main.c /^static String *get_fallback_rsrcs( String name )$/;" f file: get_fds ../ip/ip_main.c /^get_fds(char *ip_arg, int *i_fd, int *o_fd)$/;" f file: get_file ../motif_l/m_menu.c /^static String get_file( Widget w, String prompt )$/;" f file: get_paths ../ex/ex_cscope.c /^get_paths(SCR *sp, CSC *csc)$/;" f file: get_state ../motif_l/m_search.c /^static void get_state( Widget w )$/;" f file: getint ../tcl_api/tcl.c /^getint(interp, msg, s, intp)$/;" f file: getscreenid ../tcl_api/tcl.c /^getscreenid(interp, spp, id, name)$/;" f file: go_to_tag ../motif_l/m_tags.c /^static void go_to_tag( Widget w )$/;" f file: gotProc ../motif_l/m_copypaste.c /^static void gotProc( Widget widget,$/;" f file: goto_adjust ../vi/v_scroll.c /^goto_adjust(VICMD *vp)$/;" f file: gp ../common/screen.h /^ GS *gp; \/* Pointer to global area. *\/$/;" m struct:_scr gp ../common/screen.h /^ GS *gp; \/* Pointer to global area. *\/$/;" m struct:_win gs_end ../common/gs.c /^gs_end(GS *gp)$/;" f gs_init ../common/gs.c /^gs_init(char *name)$/;" f gs_new_win ../common/gs.c /^gs_new_win(GS *gp)$/;" f gtk_marshal_VOID__STRING ../gtk/gtkviwindow.h 5;" d gtk_vi ../gtk/gtk.h /^} gtk_vi;$/;" t gtk_vi_init ../gtk/gtkvi.c /^gtk_vi_init(GtkVi **vip, int argc, char **argv)$/;" f gtk_vi_key_press_event ../gtk/gtkviwindow.c /^gtk_vi_key_press_event(window, event)$/;" f gtk_vi_quit ../gtk/gtkviwindow.c /^gtk_vi_quit(vi, write)$/;" f gtk_vi_screen_addstr ../gtk/gtkviscreen.c /^gtk_vi_screen_addstr(GtkViScreen *vi, const char *str, int len)$/;" f gtk_vi_screen_attribute ../gtk/gtkviscreen.c /^gtk_vi_screen_attribute(GtkViScreen *vi, gint attribute, gint on)$/;" f gtk_vi_screen_class_init ../gtk/gtkviscreen.c /^gtk_vi_screen_class_init (GtkViScreenClass *class)$/;" f file: gtk_vi_screen_clrtoel ../gtk/gtkviscreen.c /^gtk_vi_screen_clrtoel (GtkViScreen *vi)$/;" f gtk_vi_screen_deleteln ../gtk/gtkviscreen.c /^gtk_vi_screen_deleteln(GtkViScreen *vi)$/;" f gtk_vi_screen_destroy ../gtk/gtkviscreen.c /^gtk_vi_screen_destroy (GtkObject *object)$/;" f file: gtk_vi_screen_expose ../gtk/gtkviscreen.c /^gtk_vi_screen_expose (GtkWidget *widget,$/;" f file: gtk_vi_screen_get_arg ../gtk/gtkviscreen.c /^gtk_vi_screen_get_arg (GtkObject *object,$/;" f file: gtk_vi_screen_get_type ../gtk/gtkviscreen.c /^gtk_vi_screen_get_type (void)$/;" f gtk_vi_screen_init ../gtk/gtkviscreen.c /^gtk_vi_screen_init (GtkViScreen *vi)$/;" f file: gtk_vi_screen_insertln ../gtk/gtkviscreen.c /^gtk_vi_screen_insertln(GtkViScreen *vi)$/;" f gtk_vi_screen_move ../gtk/gtkviscreen.c /^gtk_vi_screen_move(GtkViScreen *vi, gint row, gint col)$/;" f gtk_vi_screen_new ../gtk/gtkviscreen.c /^gtk_vi_screen_new (GtkAdjustment *vadj)$/;" f gtk_vi_screen_realize ../gtk/gtkviscreen.c /^gtk_vi_screen_realize (GtkWidget *widget)$/;" f file: gtk_vi_screen_refresh ../gtk/gtkviscreen.c /^gtk_vi_screen_refresh(GtkViScreen *vi)$/;" f gtk_vi_screen_rewrite ../gtk/gtkviscreen.c /^gtk_vi_screen_rewrite(GtkViScreen *vi, gint row)$/;" f gtk_vi_screen_set_adjustment ../gtk/gtkviscreen.c /^gtk_vi_screen_set_adjustment (GtkViScreen *vi_screen,$/;" f gtk_vi_screen_set_arg ../gtk/gtkviscreen.c /^gtk_vi_screen_set_arg (GtkObject *object,$/;" f file: gtk_vi_screen_size_allocate ../gtk/gtkviscreen.c /^gtk_vi_screen_size_allocate (GtkWidget *widget,$/;" f file: gtk_vi_screen_size_request ../gtk/gtkviscreen.c /^gtk_vi_screen_size_request (GtkWidget *widget,$/;" f file: gtk_vi_screen_waddstr ../gtk/gtkviscreen.c /^gtk_vi_screen_waddstr(GtkViScreen *vi, const CHAR_T *str, int len)$/;" f gtk_vi_show_term ../gtk/gtkviwindow.c /^gtk_vi_show_term(window, show)$/;" f gtk_vi_window_class_init ../gtk/gtkviwindow.c /^gtk_vi_window_class_init (GtkViWindowClass *class)$/;" f file: gtk_vi_window_destroy ../gtk/gtkviwindow.c /^gtk_vi_window_destroy (GtkObject *object)$/;" f file: gtk_vi_window_get_type ../gtk/gtkviwindow.c /^gtk_vi_window_get_type (void)$/;" f gtk_vi_window_init ../gtk/gtkviwindow.c /^gtk_vi_window_init (GtkViWindow *vi)$/;" f file: gtk_vi_window_new ../gtk/gtkviwindow.c /^gtk_vi_window_new (GtkVi *vi)$/;" f gtk_vi_window_scrollbar ../gtk/gtkviwindow.c /^gtk_vi_window_scrollbar(GtkViWindow *vi, guint top, guint size, guint max)$/;" f h_hup ../cl/cl_main.c /^h_hup(int signo)$/;" f file: h_int ../cl/cl_main.c /^h_int(int signo)$/;" f file: h_smap ../vi/vi.h /^ SMAP *h_smap; \/* First slot of the line map. *\/$/;" m struct:_vi_private h_term ../cl/cl_main.c /^h_term(int signo)$/;" f file: h_winch ../cl/cl_main.c /^h_winch(int signo)$/;" f file: handle_click ../motif_l/xtabbed.c /^static void handle_click( Widget w, TabData td, XtPointer call_data )$/;" f file: have_answer ../motif_l/m_menu.c /^static Bool have_answer;$/;" v file: header ../ipc/ip.h /^ struct cmsghdr header;$/;" m struct:ipcmsghdr help ../ex/ex.h /^ char *help; \/* Help line. *\/$/;" m struct:_excmdlist help ../vi/vi.h /^ char *help; \/* Help line. *\/$/;" m struct:_vikeys help_menu ../motif_l/m_menu.c /^static pull_down help_menu[] = {$/;" v file: help_msg ../ex/ex_cscope.c /^ char *help_msg;$/;" m struct:_cc file: holder ../motif_l/m_motif.h /^ Widget holder;$/;" m struct: i_cnt ../common/screen.h /^ size_t i_cnt; \/* Count of events. *\/$/;" m struct:_win i_event ../common/screen.h /^ EVENT *i_event; \/* Array of input events. *\/$/;" m struct:_win i_fd ../ipc/ip.h /^ int i_fd; \/* Input file descriptor. *\/$/;" m struct:_ip_private i_nelem ../common/screen.h /^ size_t i_nelem; \/* Number of array elements. *\/$/;" m struct:_win i_next ../common/screen.h /^ size_t i_next; \/* Offset of next event. *\/$/;" m struct:_win ibcw ../ex/ex.h /^ CONVWIN ibcw; \/* File line input conversion buffer. *\/$/;" m struct:_ex_private iblen ../ipc/ip.h /^ size_t iblen; \/* Input buffer length. *\/$/;" m struct:_ip_private ibp ../ex/ex.h /^ char *ibp; \/* File line input buffer. *\/$/;" m struct:_ex_private ibp_len ../ex/ex.h /^ size_t ibp_len; \/* File line input buffer length. *\/$/;" m struct:_ex_private ibuf ../cl/cl.h /^ char ibuf[256]; \/* Input keys. *\/$/;" m struct:_cl_private ibuf ../ipc/ip.h /^ char ibuf[256]; \/* Input buffer. *\/$/;" m struct:_ip_private ibuf ../ipc/ip_trans.c /^static char ibuf[2048]; \/* Input buffer. *\/$/;" v file: ibuf_len ../ipc/ip_trans.c /^static size_t ibuf_len; \/* Length of current input. *\/$/;" v file: icccm_clear ../motif_l/m_copypaste.c /^ icccm_clear,$/;" v file: icccm_copy ../motif_l/m_copypaste.c /^ icccm_copy,$/;" v file: icccm_error ../motif_l/m_copypaste.c /^ icccm_error;$/;" v file: icccm_paste ../motif_l/m_copypaste.c /^static PFI icccm_paste,$/;" v file: icon_bg ../motif/m_main.c /^ icon_bg;$/;" v file: icon_fg ../motif/m_main.c /^static Pixel icon_fg,$/;" v file: icon_pm ../motif/m_main.c /^static Pixmap icon_pm;$/;" v file: iconv_t ../common/conv.c /^typedef int iconv_t;$/;" t file: id ../common/gs.h /^ int id; \/* Last allocated screen id. *\/$/;" m struct:_gs id ../common/screen.h /^ int id; \/* Screen id #. *\/$/;" m struct:_scr idlok ../cl/cl_bsd.c /^idlok(win, bf)$/;" f ie_char2int ../common/conv.c /^ie_char2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, $/;" f if_lno ../common/screen.h /^ db_recno_t if_lno; \/* Current associated line number. *\/$/;" m struct:_win if_lno ../ex/ex.h /^ db_recno_t if_lno; \/* Associated line number. *\/$/;" m struct:_excmd if_name ../common/screen.h /^ char *if_name; \/* Current associated file. *\/$/;" m struct:_win if_name ../ex/ex.h /^ char *if_name; \/* Associated file. *\/$/;" m struct:_excmd ifd ../ipc/ip.h /^ int ifd; \/* Input file descriptor. *\/$/;" m struct:_ip_vi ifd ../ipc/ip.h /^ int ifd; \/* Input file descriptor. *\/$/;" m struct:_ip_vi_win iflags ../ex/ex.h /^ u_int16_t iflags; \/* User input information. *\/$/;" m struct:_excmd ilen ../common/seq.h /^ size_t ilen; \/* Input keys length. *\/$/;" m struct:_seq inc_buf ../vi/v_put.c /^inc_buf(SCR *sp, VICMD *vp)$/;" f file: inc_err ../vi/v_increment.c /^inc_err(SCR *sp, enum nresult nret)$/;" f file: init ../motif_l/m_motif.h /^ Boolean init;$/;" m struct: initialize ../motif_l/xtabbed.c /^static void initialize(Widget request,Widget self,ArgList args,Cardinal * num_args)$/;" f file: input ../common/seq.h /^ CHAR_T *input; \/* Sequence input keys. *\/$/;" m struct:_seq input ../ipc/ip.h /^ int (*input) __P((IPVIWIN*, int));$/;" m struct:_ip_vi_win input ../motif_l/m_options.c /^}, input[] = {$/;" v file: input2int ../common/conv.h /^ char2wchar_t input2int;$/;" m struct:_conv input_func ../gtk/gtk.h /^ gint input_func;$/;" m struct: input_func ../gtk/gtkviwindow.h /^ gint input_func;$/;" m struct:_GtkViWindow input_int ../motif_l/m_options.c /^}, input_int[] = {$/;" v file: input_str ../motif_l/m_options.c /^}, input_str[] = {$/;" v file: input_t ../cl/cl.h /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;$/;" t input_t ../ip/ip_read.c /^typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t;$/;" t file: insert ../common/cut.h /^ size_t insert; \/* 0-N: bytes to insert (push). *\/$/;" m struct:_text insert_here ../motif_l/m_vi.c /^static Cardinal insert_here( Widget wid )$/;" f file: insert_string ../motif_l/m_vi.c /^static void insert_string( Widget widget, $/;" f file: insertln ../ipc/ip.h /^ IPFunc insertln;$/;" m struct:ip_si_operations int2disp ../common/conv.h /^ wchar2char_t int2disp;$/;" m struct:_conv int2file ../common/conv.h /^ wchar2char_t int2file;$/;" m struct:_conv int2raw ../common/conv.c /^int2raw(SCR *sp, const CHAR_T * str, ssize_t len, CONVWIN *cw, size_t *tolen,$/;" f int2sys ../common/conv.h /^ wchar2char_t int2sys;$/;" m struct:_conv ints ../motif_l/m_motif.h /^ optData *ints;$/;" m struct: inword ../vi/vi.h 13;" d io ../vi/v_itxt.c /^io(SCR *sp, VICMD *vp, enum which cmd)$/;" f file: ip_addstr ../ip/ip_funcs.c /^ip_addstr(SCR *sp, const char *str, size_t len)$/;" f ip_attr ../ip/ip_funcs.c /^ip_attr(SCR *sp, scr_attr_t attribute, int on)$/;" f ip_baud ../ip/ip_funcs.c /^ip_baud(SCR *sp, u_long *ratep)$/;" f ip_bell ../ip/ip_funcs.c /^ip_bell(SCR *sp)$/;" f ip_busy ../ip/ip_funcs.c /^ip_busy(SCR *sp, const char *str, busy_t bval)$/;" f ip_child ../ip/ip_funcs.c /^ip_child(SCR *sp)$/;" f ip_clrtoeol ../ip/ip_funcs.c /^ip_clrtoeol(SCR *sp)$/;" f ip_cursor ../ip/ip_funcs.c /^ip_cursor(SCR *sp, size_t *yp, size_t *xp)$/;" f ip_deleteln ../ip/ip_funcs.c /^ip_deleteln(SCR *sp)$/;" f ip_discard ../ip/ip_funcs.c /^ip_discard(SCR *discardp, SCR **acquirep)$/;" f ip_event ../ip/ip_read.c /^ip_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms)$/;" f ip_ex_adjust ../ip/ip_funcs.c /^ip_ex_adjust(SCR *sp, exadj_t action)$/;" f ip_fmap ../ip/ip_term.c /^ip_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen)$/;" f ip_func_std ../ip/ip_main.c /^ip_func_std(WIN *wp)$/;" f file: ip_init ../ip/ip_main.c /^ip_init(WIN *wp, int i_fd, int o_fd, int t_fd, int argc, char *argv[])$/;" f file: ip_insertln ../ip/ip_funcs.c /^ip_insertln(SCR *sp)$/;" f ip_keyval ../ip/ip_funcs.c /^ip_keyval(SCR *sp, scr_keyval_t val, CHAR_T *chp, int *dnep)$/;" f ip_move ../ip/ip_funcs.c /^ip_move(SCR *sp, size_t lno, size_t cno)$/;" f ip_msg ../ip/ip_funcs.c /^ip_msg(SCR *sp, mtype_t mtype, char *line, size_t len)$/;" f ip_optchange ../ip/ip_term.c /^ip_optchange(SCR *sp, int offset, char *str, u_long *valp)$/;" f ip_private ../common/screen.h /^ void *ip_private; \/* IP support private area. *\/$/;" m struct:_win ip_quit ../ip/ip_screen.c /^ip_quit(WIN *wp)$/;" f ip_read ../ip/ip_read.c /^ip_read(SCR *sp, IP_PRIVATE *ipp, struct timeval *tp, int termread, int *nr)$/;" f file: ip_refresh ../ip/ip_funcs.c /^ip_refresh(SCR *sp, int repaint)$/;" f ip_rename ../ip/ip_funcs.c /^ip_rename(SCR *sp, char *name, int on)$/;" f ip_reply ../ip/ip_funcs.c /^ip_reply(SCR *sp, int status, char *msg)$/;" f ip_resize ../ip/ip_read.c /^ip_resize(SCR *sp, u_int32_t lines, u_int32_t columns)$/;" f file: ip_screen ../ip/ip_screen.c /^ip_screen(SCR *sp, u_int32_t flags)$/;" f ip_si_operations ../ipc/ip.h /^typedef struct ip_si_operations {$/;" s ip_split ../ip/ip_funcs.c /^ip_split(SCR *origp, SCR *newp)$/;" f ip_suspend ../ip/ip_funcs.c /^ip_suspend(SCR *sp, int *allowedp)$/;" f ip_term_end ../ip/ip_term.c /^ip_term_end(GS *gp)$/;" f ip_term_init ../ip/ip_term.c /^ip_term_init(SCR *sp)$/;" f ip_trans ../ip/ip_read.c /^ip_trans(SCR *sp, IP_PRIVATE *ipp, EVENT *evp)$/;" f file: ip_usage ../ip/ip_funcs.c /^ip_usage(void)$/;" f ip_waddstr ../ip/ip_funcs.c /^ip_waddstr(SCR *sp, const CHAR_T *str, size_t len)$/;" f ip_wevent ../ip/ip_read.c /^ip_wevent(WIN *wp, SCR *sp, EVENT *evp, u_int32_t flags, int ms)$/;" f ipc_unmarshall ../ipc/ipc_cmd.c /^ipc_unmarshall(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_1 ../ipc/ipc_cmd.c /^ipc_unmarshall_1(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_12 ../ipc/ipc_cmd.c /^ipc_unmarshall_12(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_123 ../ipc/ipc_cmd.c /^ipc_unmarshall_123(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_1a ../ipc/ipc_cmd.c /^ipc_unmarshall_1a(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_a ../ipc/ipc_cmd.c /^ipc_unmarshall_a(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipc_unmarshall_ab1 ../ipc/ipc_cmd.c /^ipc_unmarshall_ab1(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func)$/;" f file: ipcmsghdr ../ipc/ip.h /^typedef struct ipcmsghdr {$/;" s ipfuns ../ipc/ipc_cmd.c /^IPFUNLIST const ipfuns[] = {$/;" v ipsi_ops_motif ../motif_l/m_func.c /^IPSIOPS ipsi_ops_motif = {$/;" v ipvi ../gtk/gtk.h /^ IPVI *ipvi;$/;" m struct: ipvi ../gtk/gtkvi.h /^ IPVI *ipvi;$/;" m struct:_GtkVi ipvi_motif ../motif/m_main.c /^IPVIWIN *ipvi_motif;$/;" v ipviwin ../gtk/gtkviwindow.h /^ IPVIWIN *ipviwin;$/;" m struct:_GtkViWindow is_cde ../motif/m_cde.c /^is_cde(Display *d)$/;" f is_default ../motif_l/m_tags.c /^ Boolean is_default;$/;" m struct: file: isblank ../common/key.h 209;" d ishex ../vi/v_increment.c 101;" d file: ishex ../vi/v_increment.c 102;" d file: iskip ../ipc/ip.h /^ size_t iskip; \/* Returned input buffer. *\/$/;" m struct:_ip_private isoctal ../vi/v_increment.c 103;" d file: isoctal ../vi/v_increment.c 104;" d file: jdir_t ../vi/vs_split.c /^typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t;$/;" t file: ke ../cl/cl_bsd.c /^static char *ke; \/* Keypad on. *\/$/;" v file: key ../vi/vi.h /^ CHAR_T key; \/* Command key. *\/$/;" m struct:_vicmd key_press ../motif_l/m_vi.c /^static void key_press( Widget widget, $/;" f file: keylist ../common/key.c /^KEYLIST keylist[] = {$/;" v keypad ../cl/cl_bsd.c /^keypad(a, on)$/;" f keyw ../vi/vi.h /^ CHAR_T *keyw; \/* Keyword buffer. *\/$/;" m struct:_vi_private keywlen ../vi/vi.h /^ size_t keywlen; \/* Keyword buffer length. *\/$/;" m struct:_vi_private killersig ../cl/cl.h /^ int killersig; \/* Killer signal. *\/$/;" m struct:_cl_private kind ../motif_l/m_motif.h /^ optKind kind; \/* Option type. *\/$/;" m struct: kind ../motif_l/m_motif.h /^ XutResourceKind kind;$/;" m struct: klen ../vi/vi.h /^ size_t klen; \/* Keyword length. *\/$/;" m struct:_vi_private kp ../vi/vi.h /^ VIKEYS const *kp; \/* Command\/Motion VIKEYS entry. *\/$/;" m struct:_vicmd ks ../cl/cl_bsd.c /^static char *ks; \/* Keypad off. *\/$/;" v file: l_cur ../common/exf.h /^ db_recno_t l_cur; \/* Log current record number. *\/$/;" m struct:_exf l_cursor ../common/exf.h /^ MARK l_cursor; \/* Log cursor position. *\/$/;" m struct:_exf l_high ../common/exf.h /^ db_recno_t l_high; \/* Log last + 1 record number. *\/$/;" m struct:_exf l_len ../common/screen.h /^ size_t l_len; \/* Log buffer length. *\/$/;" m struct:_win l_lp ../common/screen.h /^ char *l_lp; \/* Log buffer. *\/$/;" m struct:_win l_win ../common/exf.h /^ WIN *l_win; \/* Window owning transaction. *\/$/;" m struct:_exf labels ../motif_l/xtabbed.c /^StringArray labels;$/;" m struct: file: last_click ../motif_l/m_vi.c /^static int last_click;$/;" v file: lastbcomm ../ex/ex.h /^ CHAR_T *lastbcomm; \/* Last bang command. *\/$/;" m struct:_ex_private lastckey ../vi/vi.h /^ CHAR_T lastckey; \/* Last search character. *\/$/;" m struct:_vi_private lastx ../gtk/gtkviscreen.h /^ gint lastx, lasty;$/;" m struct:_GtkViScreen lasty ../gtk/gtkviscreen.h /^ gint lastx, lasty;$/;" m struct:_GtkViScreen lb ../common/cut.h /^ CHAR_T *lb; \/* Line buffer. *\/$/;" m struct:_text lb_len ../common/cut.h /^ size_t lb_len; \/* Line buffer length. *\/$/;" m struct:_text lcmp ../cl/cl_bsd.c /^lcmp(a, b)$/;" f file: lcontinue ../vi/vi.h /^ size_t lcontinue; \/* 1-N: Output line continue value. *\/$/;" m struct:_vi_private left_expand_selection ../motif_l/m_vi.c /^static void left_expand_selection( xvi_screen *cur_screen, int *start )$/;" f file: lefttabs ../motif_l/xtabbed.c /^int lefttabs;$/;" m struct: file: len ../common/args.h /^ size_t len; \/* Argument length. *\/$/;" m struct:_args len ../common/cut.h /^ size_t len; \/* Line length. *\/$/;" m struct:_text len ../common/cut.h /^ size_t len; \/* Total length of cut text. *\/$/;" m struct:_cb len ../common/gs.h /^ u_int8_t len;$/;" m struct:_gs:: len ../common/msg.h /^ size_t len; \/* Message length. *\/$/;" m struct:_msg len1 ../ipc/ip.h /^ u_int32_t len1; \/* String #1 length. *\/$/;" m struct:_ip_buf len2 ../ipc/ip.h /^ u_int32_t len2; \/* String #1 length. *\/$/;" m struct:_ip_buf line_insdel ../common/db.c /^line_insdel(SCR *sp, lnop_t op, db_recno_t lno)$/;" f linear_search ../ex/ex_tag.c /^linear_search(char *string, char *front, char *back, long tl)$/;" f file: linecount ../vi/vi.h /^ size_t linecount; \/* 1-N: Output overwrite count. *\/$/;" m struct:_vi_private lineno ../ex/ex.h /^ db_recno_t lineno; \/* Command: line number. *\/$/;" m struct:_excmd lines ../cl/cl_read.c 39;" d file: list ../cl/cl_bsd.c /^static const TL list[] = {$/;" v file: lmp ../common/vi_auto.h /^ LMARK lmp;$/;" m struct:_vi_mark_args lno ../common/cut.h /^ db_recno_t lno; \/* 1-N: file line. *\/$/;" m struct:_text lno ../common/gs.h /^ db_recno_t lno; \/* 1-N: file cursor line. *\/$/;" m struct:_fref lno ../common/mark.h /^ db_recno_t lno; \/* Line number. *\/$/;" m struct:_lmark lno ../common/mark.h /^ db_recno_t lno; \/* Line number. *\/$/;" m struct:_mark lno ../common/screen.h /^ db_recno_t lno; \/* 1-N: file line. *\/$/;" m struct:_scr lno ../common/vi_auto.h /^ db_recno_t lno;$/;" m struct:_vi_change_args lno ../common/vi_auto.h /^ db_recno_t lno;$/;" m struct:_vi_cursor_args lno ../ex/tag.h /^ db_recno_t lno; \/* Saved line number. *\/$/;" m struct:_tag lno ../vi/vi.h /^ db_recno_t lno; \/* 1-N: Physical file line number. *\/$/;" m struct:_smap lnop_t ../common/common.h /^typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;$/;" t lock ../common/exf.h /^ void *lock; \/* Lock for log. *\/$/;" m struct:_exf lock_end ../common/gs.h /^ int (*lock_end) __P((WIN *, void **));$/;" m struct:_gs lock_init ../common/gs.h /^ int (*lock_init) __P((WIN *, void **));$/;" m struct:_gs lock_try ../common/gs.h /^ int (*lock_try) __P((WIN *, void **));$/;" m struct:_gs lock_unlock ../common/gs.h /^ int (*lock_unlock) __P((WIN *, void **));$/;" m struct:_gs lockr_t ../common/common.h /^typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;$/;" t log ../common/exf.h /^ DB *log; \/* Log db structure. *\/$/;" m struct:_exf log_backward ../common/log.c /^log_backward(SCR *sp, MARK *rp)$/;" f log_backward ../common/log4.c /^log_backward(SCR *sp, MARK *rp)$/;" f log_cursor ../common/log.c /^log_cursor(SCR *sp)$/;" f log_cursor ../common/log4.c /^log_cursor(SCR *sp)$/;" f log_cursor1 ../common/log.c /^log_cursor1(SCR *sp, int type)$/;" f file: log_cursor1 ../common/log4.c /^log_cursor1(SCR *sp, int type)$/;" f file: log_end ../common/log.c /^log_end(SCR *sp, EXF *ep)$/;" f log_end ../common/log4.c /^log_end(SCR *sp, EXF *ep)$/;" f log_err ../common/log.c /^log_err(SCR *sp, char *file, int line)$/;" f file: log_forward ../common/log.c /^log_forward(SCR *sp, MARK *rp)$/;" f log_forward ../common/log4.c /^log_forward(SCR *sp, MARK *rp)$/;" f log_init ../common/log.c /^log_init(SCR *sp, EXF *ep)$/;" f log_init ../common/log4.c /^log_init(SCR *sp, EXF *ep)$/;" f log_line ../common/log.c /^log_line(SCR *sp, db_recno_t lno, u_int action)$/;" f log_line ../common/log4.c /^log_line(SCR *sp, db_recno_t lno, u_int action)$/;" f log_mark ../common/log.c /^log_mark(SCR *sp, LMARK *lmp)$/;" f log_mark ../common/log4.c /^log_mark(SCR *sp, LMARK *lmp)$/;" f log_setline ../common/log.c /^log_setline(SCR *sp)$/;" f log_setline ../common/log4.c /^log_setline(SCR *sp)$/;" f log_t ../common/log.c /^} log_t;$/;" t file: log_trace ../common/log.c /^log_trace(sp, msg, rno, p)$/;" f file: lookup_ccmd ../ex/ex_cscope.c /^lookup_ccmd(char *name)$/;" f file: loseProc ../motif_l/m_copypaste.c /^static void loseProc( Widget widget )$/;" f file: lsn_cur ../common/exf.h /^ DB_LSN lsn_cur; \/* LSN of first record to undo. *\/$/;" m struct:_exf lsn_first ../common/exf.h /^ DB_LSN lsn_first;$/;" m struct:_exf lsn_high ../common/exf.h /^ DB_LSN lsn_high; \/* LSN of last record. *\/$/;" m struct:_exf lundo ../common/exf.h /^ dir_t lundo; \/* Last undo direction. *\/$/;" m struct:_exf m1_tklist ../cl/cl_term.c /^static TKLIST const m1_tklist[] = { \/* Input mappings (lookup). *\/$/;" v file: m2_tklist ../cl/cl_term.c /^static TKLIST const m2_tklist[] = { \/* Input mappings (set or delete). *\/$/;" v file: m_final ../vi/vi.h /^ MARK m_final; \/* mark: final cursor position. *\/$/;" m struct:_vicmd m_start ../vi/vi.h /^ MARK m_start; \/* mark: initial cursor, range start. *\/$/;" m struct:_vicmd m_stop ../vi/vi.h /^ MARK m_stop; \/* mark: range end. *\/$/;" m struct:_vicmd ma_copy ../motif_l/m_menu.c /^static void ma_copy( Widget w,$/;" f file: ma_cut ../motif_l/m_menu.c /^static void ma_cut( Widget w,$/;" f file: ma_edit_file ../motif_l/m_menu.c /^ma_edit_file(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_find ../motif_l/m_menu.c /^ma_find(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_find_next ../motif_l/m_menu.c /^ma_find_next(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_paste ../motif_l/m_menu.c /^static void ma_paste( Widget w,$/;" f file: ma_preferences ../motif_l/m_menu.c /^static void ma_preferences( Widget w,$/;" f file: ma_quit ../motif_l/m_menu.c /^ma_quit(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_save ../motif_l/m_menu.c /^ma_save(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_save_as ../motif_l/m_menu.c /^ma_save_as(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_split ../motif_l/m_menu.c /^ma_split(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_tagpop ../motif_l/m_menu.c /^ma_tagpop(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_tags ../motif_l/m_menu.c /^ma_tags(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_tagtop ../motif_l/m_menu.c /^ma_tagtop(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_undo ../motif_l/m_menu.c /^ma_undo(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: ma_wq ../motif_l/m_menu.c /^ma_wq(Widget w, XtPointer call_data, XtPointer client_data)$/;" f file: magnify ../motif_l/xtabbed.c /^ float magnify;$/;" m struct:rotated_text_item_template file: magnify ../motif_l/xtabbed.c /^ float magnify;$/;" m struct:style_template file: main ../cl/cl_main.c /^main(int argc, char **argv)$/;" f main ../gtk/gtk.h /^ GtkWidget *main;$/;" m struct: main ../gtk/gtk_main.c /^main(int argc, char **argv)$/;" f main ../ip/ip_main.c /^main(int argc, char **argv)$/;" f main ../motif/m_cde.c /^main () {$/;" f main ../motif/m_main.c /^main(int argc, char **argv)$/;" f main ../motif_l/m_options.c /^main( int argc, char *argv[] )$/;" f main ../motif_l/m_ruler.c /^main( int argc, char *argv[] )$/;" f main ../motif_l/m_search.c /^main( int argc, char *argv[] )$/;" f main ../motif_l/m_tags.c /^main( int argc, char *argv[] )$/;" f main_menu ../motif_l/m_menu.c /^static menu_bar main_menu[] = {$/;" v file: main_widget ../motif_l/m_menu.c /^static Widget main_widget = NULL;$/;" v file: manager_extension ../motif_l/xtabbed.c 1150;" d file: mark ../vi/v_mark.c /^mark(SCR *sp, VICMD *vp, int getmark, enum which cmd)$/;" f file: mark_end ../common/mark.c /^mark_end(SCR *sp, EXF *ep)$/;" f mark_find ../common/mark.c /^mark_find(SCR *sp, ARG_CHAR_T key)$/;" f file: mark_get ../common/mark.c /^mark_get(SCR *sp, ARG_CHAR_T key, MARK *mp, mtype_t mtype)$/;" f mark_init ../common/mark.c /^mark_init(SCR *sp, EXF *ep)$/;" f mark_insdel ../common/mark.c /^mark_insdel(SCR *sp, lnop_t op, db_recno_t lno)$/;" f mark_lines ../gtk/gtkviscreen.c /^mark_lines(GtkViScreen *vi, gint ymin, gint xmin, gint ymax, gint xmax)$/;" f file: mark_selection ../motif_l/m_vi.c /^static void mark_selection( xvi_screen *cur_screen, int start, int end )$/;" f file: mark_set ../common/mark.c /^mark_set(SCR *sp, ARG_CHAR_T key, MARK *value, int userset)$/;" f marked_maxx ../gtk/gtkviscreen.h /^ gint marked_x, marked_y, marked_maxx, marked_maxy;$/;" m struct:_GtkViScreen marked_maxy ../gtk/gtkviscreen.h /^ gint marked_x, marked_y, marked_maxx, marked_maxy;$/;" m struct:_GtkViScreen marked_x ../gtk/gtkviscreen.h /^ gint marked_x, marked_y, marked_maxx, marked_maxy;$/;" m struct:_GtkViScreen marked_y ../gtk/gtkviscreen.h /^ gint marked_x, marked_y, marked_maxx, marked_maxy;$/;" m struct:_GtkViScreen max_special ../common/gs.h /^ CHAR_T max_special; \/* Max special character. *\/$/;" m struct:_gs max_width ../motif_l/xtabbed.c /^ int max_width;$/;" m struct:rotated_text_item_template file: mdev ../common/exf.h /^ dev_t mdev; \/* Device. *\/$/;" m struct:_exf menu_bar ../motif_l/m_menu.c /^} menu_bar;$/;" t file: menu_items ../gtk/gtk_main.c /^static GtkItemFactoryEntry menu_items[] = {$/;" v file: message ../ex/ex_shell.c /^ char *message; \/* related message *\/$/;" m struct:_sigs file: min ../motif_l/xtabbed.c 478;" d file: minode ../common/exf.h /^ ino_t minode; \/* Inode. *\/$/;" m struct:_exf mlen ../ex/tag.h /^ size_t mlen; \/* Message string length. *\/$/;" m struct:_tag mnemonic ../motif_l/m_menu.c /^ char mnemonic;$/;" m struct: file: mod_rpt ../common/msg.c /^mod_rpt(SCR *sp)$/;" f motion ../vi/vi.h /^ VICMD motion;$/;" m struct:_vi_private move ../ipc/ip.h /^ IPFunc_12 move;$/;" m struct:ip_si_operations msg ../common/gs.h /^ DB *msg; \/* Message catalog DB. *\/$/;" m struct:_gs msg ../ex/tag.h /^ CHAR_T *msg; \/* Message string. *\/$/;" m struct:_tag msg_cat ../common/msg.c /^msg_cat(SCR *sp, const char *str, size_t *lenp)$/;" f msg_close ../common/msg.c /^msg_close(GS *gp)$/;" f msg_cmsg ../common/msg.c /^msg_cmsg(SCR *sp, cmsg_t which, size_t *lenp)$/;" f msg_open ../common/msg.c /^msg_open(SCR *sp, char *file)$/;" f msg_print ../common/msg.c /^msg_print(SCR *sp, const char *s, int *needfree)$/;" f msghandler ../tcl_api/tcl.c /^msghandler(sp, mtype, msg, len)$/;" f file: msgq ../common/gs.h /^ MSGH msgq; \/* User message list. *\/$/;" m struct:_gs msgq ../common/msg.c /^msgq(SCR *sp, mtype_t mt, const char *fmt, ...)$/;" f msgq_status ../common/msg.c /^msgq_status(SCR *sp, db_recno_t lno, u_int flags)$/;" f msgq_str ../common/msg.c /^msgq_str(SCR *sp, mtype_t mtype, char *str, char *fmt)$/;" f msgq_wstr ../common/msg.c /^msgq_wstr(SCR *sp, mtype_t mtype, CHAR_T *str, char *fmt)$/;" f mtime ../common/exf.h /^ time_t mtime; \/* Last modification time. *\/$/;" m struct:_exf mtime ../ex/tag.h /^ time_t mtime; \/* Last modification time of cscope database. *\/$/;" m struct:_csc mtype ../common/msg.h /^ mtype_t mtype; \/* Message type: M_NONE, M_ERR, M_INFO. *\/$/;" m struct:_msg mtype ../vi/vi.h /^ mtype_t mtype; \/* Last displayed message type. *\/$/;" m struct:_vi_private mtype_t ../common/msg.h /^ M_NONE = 1, M_BERR, M_ERR, M_INFO, M_SYSERR, M_VINFO, M_DBERR } mtype_t;$/;" t multi_click_length ../motif_l/m_vi.c /^static int multi_click_length;$/;" v file: my_strdup ../motif_l/xtabbed.c /^static char *my_strdup(char *str)$/;" f file: my_strtok ../motif_l/xtabbed.c /^static char *my_strtok(char *str1, char *str2)$/;" f file: n_toplevel ../gtk/gtk_main.c /^static int n_toplevel = 0;$/;" v file: name ../cl/cl_term.c /^ char *name; \/* Name. *\/$/;" m struct:_tklist file: name ../common/cut.h /^ CHAR_T name; \/* Cut buffer name. *\/$/;" m struct:_cb name ../common/gs.h /^ u_char name[MAX_CHARACTER_COLUMNS + 1];$/;" m struct:_gs:: name ../common/gs.h /^ char *name; \/* File name. *\/$/;" m struct:_fref name ../common/mark.h /^ CHAR_T name; \/* Mark name. *\/$/;" m struct:_lmark name ../common/options.c /^ CHAR_T *name;$/;" m struct:abbrev file: name ../common/options.h /^ CHAR_T *name; \/* Name. *\/$/;" m struct:_optlist name ../common/seq.h /^ CHAR_T *name; \/* Sequence name (if any). *\/$/;" m struct:_seq name ../ex/ex.h /^ CHAR_T *name; \/* Command name, underlying function. *\/$/;" m struct:_excmdlist name ../ex/ex_cscope.c /^ char *name;$/;" m struct:_cc file: name ../ex/tag.h /^ char *name; \/* Tag file name. *\/$/;" m struct:_tagf name ../motif/m_cde.c /^ char *name;$/;" m struct: file: name ../motif_l/m_motif.h /^ String name; \/* Option name. *\/$/;" m struct: name ../motif_l/m_motif.h /^ String name;$/;" m struct: name ../motif_l/m_motif.h /^ String name;$/;" m struct: name ../motif_l/m_search.c /^ String name;$/;" m struct: file: name ../motif_l/m_tags.c /^ String name;$/;" m struct: file: new_window ../ipc/ip.h /^ int (*new_window) __P((IPVI *, IPVIWIN **, int));$/;" m struct:_ip_vi newl ../common/screen.h /^ size_t *newl; \/* Newline offset array. *\/$/;" m struct:_scr newl_cnt ../common/screen.h /^ size_t newl_cnt; \/* Newlines in replacement. *\/$/;" m struct:_scr newl_len ../common/screen.h /^ size_t newl_len; \/* Newline array size. *\/$/;" m struct:_scr newterm ../cl/cl_bsd.c /^newterm(a, b, c)$/;" f next ../motif_l/m_search.c /^ struct sds *next;$/;" m struct:sds file: next ../motif_l/xtabbed.c /^ struct rotated_text_item_template *next;$/;" m struct:rotated_text_item_template file: next_func ../motif_l/m_search.c /^next_func(Widget w)$/;" f file: nextdisp ../common/screen.h /^ SCR *nextdisp; \/* Next display screen. *\/$/;" m struct:_scr nget_slong ../common/util.c /^nget_slong(SCR *sp, long int *valp, const CHAR_T *p, CHAR_T **endp, int base)$/;" f nget_uslong ../common/util.c /^nget_uslong(SCR *sp, u_long *valp, const CHAR_T *p, CHAR_T **endp, int base)$/;" f nkeylist ../common/key.c /^static int nkeylist =$/;" v file: nl ../motif_l/xtabbed.c /^ int nl;$/;" m struct:rotated_text_item_template file: nlen ../common/seq.h /^ size_t nlen; \/* Name length. *\/$/;" m struct:_seq nonblank ../common/util.c /^nonblank(SCR *sp, db_recno_t lno, size_t *cnop)$/;" f noprev ../vi/v_ch.c /^noprev(SCR *sp)$/;" f file: noprint ../common/gs.h /^ CHAR_T noprint; \/* Cached, unprintable character. *\/$/;" m struct:_gs notebook ../gtk/gtkviwindow.h /^ GtkNotebook notebook;$/;" m struct:_GtkViWindow notfound ../vi/v_ch.c /^notfound(SCR *sp, ARG_CHAR_T ch)$/;" f file: nresult ../common/util.h /^enum nresult { NUM_ERR, NUM_OK, NUM_OVER, NUM_UNDER };$/;" g num_tabs ../motif_l/xtabbed.c /^ num_tabs;$/;" m struct:tab_data file: number ../ex/ex_shell.c /^ int number; \/* signal number *\/$/;" m struct:_sigs file: o_clen ../ex/ex.h /^ size_t o_clen; \/* Original @\/global command length. *\/$/;" m struct:_excmd o_cmd ../vi/v_itxt.c /^enum which { o_cmd, O_cmd };$/;" e enum:which file: o_cp ../ex/ex.h /^ CHAR_T *o_cp; \/* Original @\/global command. *\/$/;" m struct:_excmd o_cur ../common/options.h /^ } o_cur;$/;" m struct:_option o_def ../common/options.h /^ } o_def;$/;" m struct:_option o_fd ../ipc/ip.h /^ int o_fd; \/* Output file descriptor. *\/$/;" m struct:_ip_private o_set ../common/options.c /^o_set(SCR *sp, int opt, u_int flags, char *str, u_long val)$/;" f oact ../cl/cl.h /^ struct sigaction oact[INDX_MAX];$/;" m struct:_cl_private obp ../ex/ex.h /^ char obp[1024]; \/* Ex output buffer. *\/$/;" m struct:_ex_private obp_len ../ex/ex.h /^ size_t obp_len; \/* Ex output buffer length. *\/$/;" m struct:_ex_private ocno ../vi/vi.h /^ size_t ocno; \/* 0-N: old file cursor column. *\/$/;" m struct:_vi_private ofd ../ipc/ip.h /^ int ofd; \/* Output file descriptor. *\/$/;" m struct:_ip_vi ofd ../ipc/ip.h /^ int ofd; \/* Output file descriptor. *\/$/;" m struct:_ip_vi_win offset ../common/cut.h /^ size_t offset; \/* 0-N: initial, unerasable chars. *\/$/;" m struct:_text offset ../common/options.c /^ int offset;$/;" m struct:abbrev file: offset ../ipc/ip.h /^ size_t offset;$/;" m struct:_ipfunlist offsets ../motif_l/xtabbed.c /^int * offsets;$/;" m struct: file: ok_file_name ../motif_l/m_menu.c /^static void ok_file_name( Widget w,$/;" f file: olen ../common/seq.h /^ size_t olen; \/* Output keys length. *\/$/;" m struct:_seq olno ../vi/vi.h /^ db_recno_t olno; \/* 1-N: old cursor file line. *\/$/;" m struct:_vi_private oname ../cl/cl.h /^ char *oname; \/* Original screen window name. *\/$/;" m struct:_cl_private onchld ../motif/m_main.c /^onchld(int signo)$/;" f file: onexit ../motif/m_main.c /^onexit(void)$/;" f file: opcode ../common/vi_auto.h /^ u_int32_t opcode;$/;" m struct:_vi_change_args opcode ../common/vi_auto.h /^ u_int32_t opcode;$/;" m struct:_vi_cursor_args opcode ../common/vi_auto.h /^ u_int32_t opcode;$/;" m struct:_vi_marker_args optData ../motif_l/m_motif.h /^} optData;$/;" t optFile ../motif_l/m_motif.h /^ optFile,$/;" e optInteger ../motif_l/m_motif.h /^ optInteger,$/;" e optKind ../motif_l/m_motif.h /^} optKind;$/;" t optSheet ../motif_l/m_motif.h /^} optSheet;$/;" t optString ../motif_l/m_motif.h /^ optString,$/;" e optTerminator ../motif_l/m_motif.h /^ optTerminator$/;" e optToggle ../motif_l/m_motif.h /^ optToggle,$/;" e optdisp ../common/options.h /^enum optdisp { NO_DISPLAY, ALL_DISPLAY, CHANGED_DISPLAY, SELECT_DISPLAY };$/;" g options_menu ../motif_l/m_menu.c /^static pull_down options_menu[] = {$/;" v file: optlist ../common/options.c /^OPTLIST const optlist[] = {$/;" v opts ../common/gs.h /^ OPTION opts[GO_TERM + 1];$/;" m struct:_gs opts ../common/screen.h /^ OPTION opts[O_OPTIONCOUNT]; \/* Ex\/vi: Options. *\/$/;" m struct:_scr opts_abbcmp ../common/options.c /^opts_abbcmp(const void *a, const void *b)$/;" f file: opts_cmp ../common/options.c /^opts_cmp(const void *a, const void *b)$/;" f file: opts_copy ../common/options.c /^opts_copy(SCR *orig, SCR *sp)$/;" f opts_dump ../common/options.c /^opts_dump(SCR *sp, enum optdisp type)$/;" f opts_empty ../common/options.c /^opts_empty(SCR *sp, int off, int silent)$/;" f opts_free ../common/options.c /^opts_free(SCR *sp)$/;" f opts_init ../common/options.c /^opts_init(SCR *sp, int *oargs)$/;" f opts_nomatch ../common/options.c /^opts_nomatch(SCR *sp, CHAR_T *name)$/;" f opts_print ../common/options.c /^opts_print(SCR *sp, const OPTLIST *op)$/;" f file: opts_save ../common/options.c /^opts_save(SCR *sp, FILE *fp)$/;" f opts_search ../common/options.c /^opts_search(CHAR_T *name)$/;" f opts_set ../common/options.c /^opts_set(SCR *sp, ARGS **argv, char *usage)$/;" f orientation ../motif_l/xtabbed.c /^TabsOrientation orientation;$/;" m struct: file: orig ../cl/cl.h /^ struct termios orig; \/* Original terminal values. *\/$/;" m struct:_cl_private others ../motif_l/m_motif.h /^ optData *others;$/;" m struct: output ../cl/cl_term.c /^ char *output; \/* Corresponding vi command. *\/$/;" m struct:_tklist file: output ../common/seq.h /^ CHAR_T *output; \/* Sequence output keys. *\/$/;" m struct:_seq owrite ../common/cut.h /^ size_t owrite; \/* 0-N: chars to overwrite. *\/$/;" m struct:_text parent ../motif_l/m_motif.h /^ Widget parent, \/* the pane *\/$/;" m struct: parent_class ../gtk/gtkviscreen.c /^static GtkWidgetClass *parent_class = NULL;$/;" v file: parent_class ../gtk/gtkviscreen.h /^ GtkWidgetClass parent_class;$/;" m struct:_GtkViScreenClass parent_class ../gtk/gtkviwindow.c /^static GtkWidgetClass *parent_class = NULL;$/;" v file: parent_class ../gtk/gtkviwindow.h /^ GtkNotebookClass parent_class;$/;" m struct:_GtkViWindowClass parse ../ex/ex_cscope.c /^parse(SCR *sp, CSC *csc, TAGQ *tqp, int *matchesp)$/;" f file: paths ../ex/tag.h /^ char **paths; \/* Array of search paths for this cscope. *\/$/;" m struct:_csc pattern ../motif_l/m_search.c /^static String pattern = NULL;$/;" v file: pblen ../ex/tag.h /^ size_t pblen; \/* Search path buffer length. *\/$/;" m struct:_csc pbuf ../ex/tag.h /^ char *pbuf; \/* Search path buffer. *\/$/;" m struct:_csc peekProc ../motif_l/m_copypaste.c /^static void peekProc( Widget widget,$/;" f file: perl_interp ../common/gs.h /^ void *perl_interp; \/* Perl interpreter. *\/$/;" m struct:_gs perl_private ../common/screen.h /^ void *perl_private; \/* Perl interpreter. *\/$/;" m struct:_win perl_private ../common/screen.h /^ void *perl_private; \/* Perl private area. *\/$/;" m struct:_scr perr ../cl/cl_main.c /^perr(char *name, char *msg)$/;" f file: perr ../common/gs.c /^perr(char *name, char *msg)$/;" f file: perr ../ip/ip_main.c /^perr(char *name, char *msg)$/;" f file: pid ../ex/tag.h /^ pid_t pid; \/* PID of the connected cscope process. *\/$/;" m struct:_csc pid ../ipc/ip.h /^ pid_t pid;$/;" m struct:_ip_vi pid ../motif/m_main.c /^static pid_t pid;$/;" v file: pop_tag ../motif_l/m_tags.c /^static void pop_tag( Widget w )$/;" f file: pos ../common/log.h /^ MARK pos;$/;" m struct:_log_state pos_t ../vi/vi.h /^typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t;$/;" t preferences ../motif_l/m_options.c /^static Widget preferences = NULL;$/;" v file: prev_func ../motif_l/m_search.c /^prev_func(Widget w)$/;" f file: prev_lsn ../common/vi_auto.h /^ DB_LSN prev_lsn;$/;" m struct:_vi_change_args prev_lsn ../common/vi_auto.h /^ DB_LSN prev_lsn;$/;" m struct:_vi_cursor_args prev_lsn ../common/vi_auto.h /^ DB_LSN prev_lsn;$/;" m struct:_vi_mark_args prev_lsn ../common/vi_auto.h /^ DB_LSN prev_lsn;$/;" m struct:_vi_marker_args private_data ../ipc/ip.h /^ void *private_data;$/;" m struct:_ip_vi private_data ../ipc/ip.h /^ void *private_data;$/;" m struct:_ip_vi_win proc_wait ../ex/ex_shell.c /^proc_wait(SCR *sp, long int pid, const char *cmd, int silent, int okpipe)$/;" f progname ../common/gs.h /^ char *progname; \/* Programe name. *\/$/;" m struct:_gs ps ../vi/vi.h /^ char *ps; \/* Paragraph plus section list. *\/$/;" m struct:_vi_private ptym_open ../ex/ex_script.c /^ptym_open(char *pts_name)$/;" f file: ptys_open ../ex/ex_script.c /^ptys_open(int fdm, char *pts_name)$/;" f file: pull_down ../motif_l/m_menu.c /^} pull_down;$/;" t file: put ../common/put.c /^put(SCR *sp, CB *cbp, CHAR_T *namep, MARK *cp, MARK *rp, int append)$/;" f q_ccnt ../common/screen.h /^ u_long q_ccnt; \/* Quit or ZZ command count. *\/$/;" m struct:_scr quit ../ipc/ip.h /^ IPFunc quit;$/;" m struct:ip_si_operations quit ../ipc/ip.h /^ int (*quit) __P((IPVIWIN*));$/;" m struct:_ip_vi_win quote_t ../vi/vi.h /^typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t;$/;" t range_lno ../ex/ex.h /^ db_recno_t range_lno; \/* @\/global range: set line number. *\/$/;" m struct:_excmd raw2int ../common/conv.c /^raw2int(SCR *sp, const char * str, ssize_t len, CONVWIN *cw, size_t *tolen,$/;" f rc ../ex/ex_init.c /^enum rc { NOEXIST, NOPERM, RCOK };$/;" g file: rcm ../common/screen.h /^ size_t rcm; \/* Vi: 0-N: Most attractive column. *\/$/;" m struct:_scr rcmd ../ex/ex.h /^ EXCMDLIST rcmd; \/* Command: table entry\/replacement. *\/$/;" m struct:_excmd rcv_copy ../common/recover.c /^rcv_copy(SCR *sp, int wfd, char *fname)$/;" f file: rcv_email ../common/recover.c /^rcv_email(SCR *sp, char *fname)$/;" f file: rcv_fd ../common/exf.h /^ int rcv_fd; \/* Locked mail file descriptor. *\/$/;" m struct:_exf rcv_gets ../common/recover.c /^rcv_gets(char *buf, size_t len, int fd)$/;" f file: rcv_init ../common/recover.c /^rcv_init(SCR *sp)$/;" f rcv_list ../common/recover.c /^rcv_list(SCR *sp)$/;" f rcv_mailfile ../common/recover.c /^rcv_mailfile(SCR *sp, int issync, char *cp_path)$/;" f file: rcv_mktemp ../common/recover.c /^rcv_mktemp(SCR *sp, char *path, char *dname, int perms)$/;" f file: rcv_mpath ../common/exf.h /^ char *rcv_mpath; \/* Recover mail file name. *\/$/;" m struct:_exf rcv_path ../common/exf.h /^ char *rcv_path; \/* Recover file name. *\/$/;" m struct:_exf rcv_read ../common/recover.c /^rcv_read(SCR *sp, FREF *frp)$/;" f rcv_sync ../common/recover.c /^rcv_sync(SCR *sp, u_int flags)$/;" f rcv_tmp ../common/recover.c /^rcv_tmp(SCR *sp, EXF *ep, char *name)$/;" f re ../common/screen.h /^ CHAR_T *re; \/* Search RE: uncompiled form. *\/$/;" m struct:_scr re_c ../common/screen.h /^ regex_t re_c; \/* Search RE: compiled form. *\/$/;" m struct:_scr re_compile ../ex/ex_subst.c /^re_compile(SCR *sp, CHAR_T *ptrn, size_t plen, CHAR_T **ptrnp, size_t *lenp, regex_t *rep, u_int flags)$/;" f re_conv ../ex/ex_subst.c /^re_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp)$/;" f file: re_cscope_conv ../ex/ex_subst.c /^re_cscope_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp)$/;" f file: re_error ../ex/ex_subst.c /^re_error(SCR *sp, int errcode, regex_t *preg)$/;" f re_len ../common/screen.h /^ size_t re_len; \/* Search RE: uncompiled length. *\/$/;" m struct:_scr re_sub ../ex/ex_subst.c /^re_sub(SCR *sp, CHAR_T *ip, CHAR_T **lbp, size_t *lbclenp, size_t *lblenp, regmatch_t *match)$/;" f file: re_tag_conv ../ex/ex_subst.c /^re_tag_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp)$/;" f file: read_prompt ../ex/ex_cscope.c /^read_prompt(SCR *sp, CSC *csc)$/;" f file: realize ../motif_l/xtabbed.c /^static void realize(Widget self,XtValueMask * mask,XSetWindowAttributes * attributes)$/;" f file: recompute_geometry ../gtk/gtkviscreen.c /^recompute_geometry (GtkViScreen* vi)$/;" f file: redraw ../ipc/ip.h /^ IPFunc redraw;$/;" m struct:ip_si_operations redraw_text ../motif_l/m_ruler.c /^redraw_text(void)$/;" f file: refcnt ../common/exf.h /^ int refcnt; \/* Reference count. *\/$/;" m struct:_exf refcnt ../common/screen.h /^ int refcnt; \/* Reference count. *\/$/;" m struct:_scr refresh ../ipc/ip.h /^ IPFunc refresh;$/;" m struct:ip_si_operations relocate ../common/dldb.c /^relocate()$/;" f file: rename ../gtk/gtkviscreen.h /^ void (*rename) (GtkViScreen *vi, gchar *name, gint len);$/;" m struct:_GtkViScreenClass rename ../ipc/ip.h /^ IPFunc_a rename;$/;" m struct:ip_si_operations rep ../vi/vi.h /^ EVENT *rep; \/* Input replay buffer. *\/$/;" m struct:_vi_private rep_cnt ../vi/vi.h /^ size_t rep_cnt; \/* Input replay buffer characters. *\/$/;" m struct:_vi_private rep_len ../vi/vi.h /^ size_t rep_len; \/* Input replay buffer length. *\/$/;" m struct:_vi_private repl ../common/screen.h /^ CHAR_T *repl; \/* Substitute replacement. *\/$/;" m struct:_scr repl_len ../common/screen.h /^ size_t repl_len; \/* Substitute replacement length.*\/$/;" m struct:_scr resize ../ipc/ip.h /^ int (*resize) __P((IPVIWIN*, u_int32_t, u_int32_t));$/;" m struct:_ip_vi_win resize ../motif_l/xtabbed.c /^static void resize(Widget self)$/;" f file: resize_backing_store ../motif_l/m_vi.c /^static void resize_backing_store( xvi_screen *this_screen )$/;" f file: resize_func ../motif_l/m_vi.c /^static void resize_func( Widget wid,$/;" f file: resized ../gtk/gtk.h /^ int resized;$/;" m struct: resized ../gtk/gtkviscreen.h /^ void (*resized) (GtkViScreen *vi, gint width, gint height);$/;" m struct:_GtkViScreenClass resized ../gtk/gtkviwindow.h /^ int resized;$/;" m struct:_GtkViWindow resource ../motif/m_main.c /^static XutResource resource[] = {$/;" v file: resource ../motif_l/m_ruler.c /^static XutResource resource[] = {$/;" v file: resource ../motif_l/m_vi.c /^static XutResource resource[] = {$/;" v file: resources ../motif_l/xtabbed.c /^static XtResource resources[] = {$/;" v file: reverse ../gtk/gtkviscreen.h /^ guchar *reverse;$/;" m struct:_GtkViScreen reverse_gc ../gtk/gtkviscreen.h /^ GdkGC *reverse_gc;$/;" m struct:_GtkViScreen rewrite ../ipc/ip.h /^ IPFunc_1 rewrite;$/;" m struct:ip_si_operations right_expand_selection ../motif_l/m_vi.c /^static void right_expand_selection( xvi_screen *cur_screen, int *end )$/;" f file: righttabs ../motif_l/xtabbed.c /^int righttabs;$/;" m struct: file: rkp ../vi/vi.h /^ VIKEYS const *rkp; \/* Related C\/M VIKEYS entry. *\/$/;" m struct:_vicmd rlast ../vi/vi.h /^ CHAR_T rlast; \/* Last 'r' replacement character. *\/$/;" m struct:_vi_private rmcup ../cl/cl.h /^ char *smcup, *rmcup; \/* Terminal start\/stop strings. *\/$/;" m struct:_cl_private rmso ../cl/cl.h /^ char *rmso, *smso; \/* Inverse video terminal strings. *\/$/;" m struct:_cl_private roff ../common/screen.h /^ size_t roff; \/* 0-N: screen row offset in display. *\/$/;" m struct:_scr rotated_text_item_template ../motif_l/xtabbed.c /^typedef struct rotated_text_item_template {$/;" s file: row ../ipc/ip.h /^ size_t row; \/* Current row. *\/$/;" m struct:_ip_private rows ../common/screen.h /^ size_t rows; \/* 1-N: number of rows. *\/$/;" m struct:_scr rows ../gtk/gtkviscreen.h /^ gint cols, rows;$/;" m struct:_GtkViScreen rows ../motif_l/m_motif.h /^ int rows,$/;" m struct: rows_in ../motif_l/xtabbed.c /^ int rows_in;$/;" m struct:rotated_text_item_template file: rows_out ../motif_l/xtabbed.c /^ int rows_out;$/;" m struct:rotated_text_item_template file: rptlchange ../common/screen.h /^ db_recno_t rptlchange; \/* Ex\/vi: last L_CHANGED lno. *\/$/;" m struct:_scr rptlines ../common/screen.h /^ db_recno_t rptlines[L_YANKED + 1];\/* Ex\/vi: lines changed by last op. *\/$/;" m struct:_scr ruler_asc ../motif_l/m_ruler.c /^ ruler_asc;$/;" v file: ruler_border ../motif_l/m_ruler.c /^static int ruler_border = 5,$/;" v file: ruler_font ../motif_l/m_ruler.c /^static XFontStruct *ruler_font;$/;" v file: run ../common/gs.h /^ int (*run) __P((WIN *, void *(*)(void*), void *));$/;" m struct:_gs run ../ipc/ip.h /^ int (*run) __P((IPVI*, int, char*[]));$/;" m struct:_ip_vi run_cscope ../ex/ex_cscope.c /^run_cscope(SCR *sp, CSC *csc, char *dbname)$/;" f file: run_editor ../ip/ip_main.c /^run_editor(void * vp)$/;" f file: rvalue ../vi/vi.h /^ e_key_t rvalue; \/* Value of last replacement character. *\/$/;" m struct:_vi_private s ../ex/ex_subst.c /^s(SCR *sp, EXCMD *cmdp, CHAR_T *s, regex_t *re, u_int flags)$/;" f file: save_cmd ../ex/ex.h /^ CHAR_T *save_cmd; \/* Remaining command. *\/$/;" m struct:_excmd save_cmdlen ../ex/ex.h /^ size_t save_cmdlen; \/* Remaining command length. *\/$/;" m struct:_excmd save_dialog ../motif_l/m_search.c /^} save_dialog;$/;" t file: sb_num ../ipc/ip.h /^ size_t sb_num; \/* scrollbar: number of lines on screen. *\/$/;" m struct:_ip_private sb_top ../ipc/ip.h /^ db_recno_t sb_top; \/* scrollbar: top line on screen. *\/$/;" m struct:_ip_private sb_total ../ipc/ip.h /^ db_recno_t sb_total; \/* scrollbar: total lines in file. *\/$/;" m struct:_ip_private sc_col ../vi/vi.h /^ size_t sc_col; \/* 0-N: LOGICAL screen column. *\/$/;" m struct:_vi_private sc_smap ../vi/vi.h /^ SMAP *sc_smap; \/* SMAP entry where sc_col occurs. *\/$/;" m struct:_vi_private sccsid ../cl/cl_bsd.c /^static const char sccsid[] = "$Id: cl_bsd.c,v 8.32 2000\/12\/01 13:56:17 skimo Exp $ (Berkeley) $Date: 2000\/12\/01 13:56:17 $";$/;" v file: sccsid ../cl/cl_funcs.c /^static const char sccsid[] = "$Id: cl_funcs.c,v 10.72 2002\/03\/02 23:18:33 skimo Exp $ (Berkeley) $Date: 2002\/03\/02 23:18:33 $";$/;" v file: sccsid ../cl/cl_main.c /^static const char sccsid[] = "$Id: cl_main.c,v 10.54 2001\/07\/29 19:07:27 skimo Exp $ (Berkeley) $Date: 2001\/07\/29 19:07:27 $";$/;" v file: sccsid ../cl/cl_read.c /^static const char sccsid[] = "$Id: cl_read.c,v 10.29 2001\/08\/18 21:51:59 skimo Exp $ (Berkeley) $Date: 2001\/08\/18 21:51:59 $";$/;" v file: sccsid ../cl/cl_screen.c /^static const char sccsid[] = "$Id: cl_screen.c,v 10.56 2002\/05\/03 19:59:44 skimo Exp $ (Berkeley) $Date: 2002\/05\/03 19:59:44 $";$/;" v file: sccsid ../cl/cl_term.c /^static const char sccsid[] = "$Id: cl_term.c,v 10.31 2001\/07\/08 13:06:56 skimo Exp $ (Berkeley) $Date: 2001\/07\/08 13:06:56 $";$/;" v file: sccsid ../common/api.c /^static const char sccsid[] = "$Id: api.c,v 8.40 2002\/06\/08 19:30:33 skimo Exp $ (Berkeley) $Date: 2002\/06\/08 19:30:33 $";$/;" v file: sccsid ../common/conv.c /^static const char sccsid[] = "$Id: conv.c,v 1.27 2001\/08\/18 21:41:41 skimo Exp $ (Berkeley) $Date: 2001\/08\/18 21:41:41 $";$/;" v file: sccsid ../common/cut.c /^static const char sccsid[] = "$Id: cut.c,v 10.18 2001\/06\/25 15:19:09 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:09 $";$/;" v file: sccsid ../common/db.c /^static const char sccsid[] = "$Id: db.c,v 10.48 2002\/06\/08 19:32:52 skimo Exp $ (Berkeley) $Date: 2002\/06\/08 19:32:52 $";$/;" v file: sccsid ../common/db1.c /^static const char sccsid[] = "$Id: db1.c,v 10.1 2002\/03\/09 12:53:57 skimo Exp $ (Berkeley) $Date: 2002\/03\/09 12:53:57 $";$/;" v file: sccsid ../common/delete.c /^static const char sccsid[] = "$Id: delete.c,v 10.17 2001\/06\/25 15:19:09 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:09 $";$/;" v file: sccsid ../common/exf.c /^static const char sccsid[] = "$Id: exf.c,v 10.72 2003\/08\/10 09:44:01 skimo Exp $ (Berkeley) $Date: 2003\/08\/10 09:44:01 $";$/;" v file: sccsid ../common/key.c /^static const char sccsid[] = "$Id: key.c,v 10.48 2001\/06\/25 15:19:10 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:10 $";$/;" v file: sccsid ../common/log.c /^static const char sccsid[] = "$Id: log.c,v 10.26 2002\/03\/02 23:12:13 skimo Exp $ (Berkeley) $Date: 2002\/03\/02 23:12:13 $";$/;" v file: sccsid ../common/log4.c /^static const char sccsid[] = "$Id: log4.c,v 10.3 2002\/06\/08 21:00:33 skimo Exp $";$/;" v file: sccsid ../common/main.c /^static const char sccsid[] = "$Id: main.c,v 10.63 2001\/11\/01 15:24:43 skimo Exp $ (Berkeley) $Date: 2001\/11\/01 15:24:43 $";$/;" v file: sccsid ../common/mark.c /^static const char sccsid[] = "$Id: mark.c,v 10.15 2001\/06\/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:11 $";$/;" v file: sccsid ../common/msg.c /^static const char sccsid[] = "$Id: msg.c,v 10.61 2003\/07\/18 23:17:30 skimo Exp $ (Berkeley) $Date: 2003\/07\/18 23:17:30 $";$/;" v file: sccsid ../common/nothread.c /^static const char sccsid[] = "$Id: nothread.c,v 1.4 2000\/07\/22 14:52:37 skimo Exp $ (Berkeley) $Date: 2000\/07\/22 14:52:37 $";$/;" v file: sccsid ../common/options.c /^static const char sccsid[] = "$Id: options.c,v 10.65 2002\/01\/18 22:34:43 skimo Exp $ (Berkeley) $Date: 2002\/01\/18 22:34:43 $";$/;" v file: sccsid ../common/options_f.c /^static const char sccsid[] = "$Id: options_f.c,v 10.33 2001\/06\/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:11 $";$/;" v file: sccsid ../common/pthread.c /^static const char sccsid[] = "$Id: pthread.c,v 1.4 2000\/07\/22 14:52:37 skimo Exp $ (Berkeley) $Date: 2000\/07\/22 14:52:37 $";$/;" v file: sccsid ../common/put.c /^static const char sccsid[] = "$Id: put.c,v 10.18 2001\/06\/25 15:19:11 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:11 $";$/;" v file: sccsid ../common/recover.c /^static const char sccsid[] = "$Id: recover.c,v 10.31 2001\/11\/01 15:24:44 skimo Exp $ (Berkeley) $Date: 2001\/11\/01 15:24:44 $";$/;" v file: sccsid ../common/screen.c /^static const char sccsid[] = "$Id: screen.c,v 10.22 2001\/06\/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:12 $";$/;" v file: sccsid ../common/search.c /^static const char sccsid[] = "$Id: search.c,v 10.31 2001\/06\/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:12 $";$/;" v file: sccsid ../common/seq.c /^static const char sccsid[] = "$Id: seq.c,v 10.15 2001\/06\/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:12 $";$/;" v file: sccsid ../common/trace.c /^static const char sccsid[] = "$Id: trace.c,v 8.4 1997\/08\/03 15:04:23 bostic Exp $ (Berkeley) $Date: 1997\/08\/03 15:04:23 $";$/;" v file: sccsid ../common/util.c /^static const char sccsid[] = "$Id: util.c,v 10.22 2001\/06\/25 15:19:12 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:12 $";$/;" v file: sccsid ../ex/ex.c /^static const char sccsid[] = "$Id: ex.c,v 10.75 2004\/03\/16 14:13:35 skimo Exp $ (Berkeley) $Date: 2004\/03\/16 14:13:35 $";$/;" v file: sccsid ../ex/ex_abbrev.c /^static const char sccsid[] = "$Id: ex_abbrev.c,v 10.10 2001\/12\/16 18:18:54 skimo Exp $ (Berkeley) $Date: 2001\/12\/16 18:18:54 $";$/;" v file: sccsid ../ex/ex_append.c /^static const char sccsid[] = "$Id: ex_append.c,v 10.34 2001\/06\/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:14 $";$/;" v file: sccsid ../ex/ex_args.c /^static const char sccsid[] = "$Id: ex_args.c,v 10.18 2001\/06\/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:14 $";$/;" v file: sccsid ../ex/ex_argv.c /^static const char sccsid[] = "$Id: ex_argv.c,v 10.39 2003\/11\/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:11:54 $";$/;" v file: sccsid ../ex/ex_at.c /^static const char sccsid[] = "$Id: ex_at.c,v 10.16 2001\/06\/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:14 $";$/;" v file: sccsid ../ex/ex_bang.c /^static const char sccsid[] = "$Id: ex_bang.c,v 10.36 2001\/06\/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:14 $";$/;" v file: sccsid ../ex/ex_cd.c /^static const char sccsid[] = "$Id: ex_cd.c,v 10.12 2001\/06\/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:14 $";$/;" v file: sccsid ../ex/ex_cmd.c /^static const char sccsid[] = "$Id: ex_cmd.c,v 10.25 2001\/06\/10 10:23:44 skimo Exp $ (Berkeley) $Date: 2001\/06\/10 10:23:44 $";$/;" v file: sccsid ../ex/ex_cscope.c /^static const char sccsid[] = "$Id: ex_cscope.c,v 10.21 2003\/11\/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:11:54 $";$/;" v file: sccsid ../ex/ex_delete.c /^static const char sccsid[] = "$Id: ex_delete.c,v 10.11 2001\/06\/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:15 $";$/;" v file: sccsid ../ex/ex_display.c /^static const char sccsid[] = "$Id: ex_display.c,v 10.15 2001\/06\/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:15 $";$/;" v file: sccsid ../ex/ex_edit.c /^static const char sccsid[] = "$Id: ex_edit.c,v 10.14 2001\/08\/28 13:29:15 skimo Exp $ (Berkeley) $Date: 2001\/08\/28 13:29:15 $";$/;" v file: sccsid ../ex/ex_equal.c /^static const char sccsid[] = "$Id: ex_equal.c,v 10.12 2001\/06\/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:15 $";$/;" v file: sccsid ../ex/ex_file.c /^static const char sccsid[] = "$Id: ex_file.c,v 10.14 2001\/06\/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:16 $";$/;" v file: sccsid ../ex/ex_filter.c /^static const char sccsid[] = "$Id: ex_filter.c,v 10.44 2003\/11\/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:11:54 $";$/;" v file: sccsid ../ex/ex_global.c /^static const char sccsid[] = "$Id: ex_global.c,v 10.30 2001\/06\/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:16 $";$/;" v file: sccsid ../ex/ex_init.c /^static const char sccsid[] = "$Id: ex_init.c,v 10.31 2001\/06\/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:16 $";$/;" v file: sccsid ../ex/ex_join.c /^static const char sccsid[] = "$Id: ex_join.c,v 10.17 2004\/03\/16 14:14:04 skimo Exp $ (Berkeley) $Date: 2004\/03\/16 14:14:04 $";$/;" v file: sccsid ../ex/ex_map.c /^static const char sccsid[] = "$Id: ex_map.c,v 10.11 2001\/06\/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:17 $";$/;" v file: sccsid ../ex/ex_mark.c /^static const char sccsid[] = "$Id: ex_mark.c,v 10.9 2001\/06\/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:17 $";$/;" v file: sccsid ../ex/ex_mkexrc.c /^static const char sccsid[] = "$Id: ex_mkexrc.c,v 10.13 2001\/06\/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:17 $";$/;" v file: sccsid ../ex/ex_move.c /^static const char sccsid[] = "$Id: ex_move.c,v 10.15 2001\/06\/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:17 $";$/;" v file: sccsid ../ex/ex_open.c /^static const char sccsid[] = "$Id: ex_open.c,v 10.8 2001\/06\/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:17 $";$/;" v file: sccsid ../ex/ex_perl.c /^static const char sccsid[] = "$Id: ex_perl.c,v 8.11 2001\/06\/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:18 $";$/;" v file: sccsid ../ex/ex_preserve.c /^static const char sccsid[] = "$Id: ex_preserve.c,v 10.15 2001\/06\/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:18 $";$/;" v file: sccsid ../ex/ex_print.c /^static const char sccsid[] = "$Id: ex_print.c,v 10.24 2001\/07\/29 19:07:29 skimo Exp $ (Berkeley) $Date: 2001\/07\/29 19:07:29 $";$/;" v file: sccsid ../ex/ex_put.c /^static const char sccsid[] = "$Id: ex_put.c,v 10.8 2001\/06\/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:18 $";$/;" v file: sccsid ../ex/ex_quit.c /^static const char sccsid[] = "$Id: ex_quit.c,v 10.8 2001\/06\/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:18 $";$/;" v file: sccsid ../ex/ex_read.c /^static const char sccsid[] = "$Id: ex_read.c,v 10.44 2001\/06\/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:19 $";$/;" v file: sccsid ../ex/ex_screen.c /^static const char sccsid[] = "$Id: ex_screen.c,v 10.12 2001\/06\/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:19 $";$/;" v file: sccsid ../ex/ex_script.c /^static const char sccsid[] = "$Id: ex_script.c,v 10.38 2001\/06\/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:19 $";$/;" v file: sccsid ../ex/ex_set.c /^static const char sccsid[] = "$Id: ex_set.c,v 10.8 2001\/06\/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:19 $";$/;" v file: sccsid ../ex/ex_shell.c /^static const char sccsid[] = "$Id: ex_shell.c,v 10.42 2003\/11\/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:11:54 $";$/;" v file: sccsid ../ex/ex_shift.c /^static const char sccsid[] = "$Id: ex_shift.c,v 10.17 2001\/06\/25 15:19:20 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:20 $";$/;" v file: sccsid ../ex/ex_source.c /^static const char sccsid[] = "$Id: ex_source.c,v 10.16 2001\/08\/18 21:49:58 skimo Exp $ (Berkeley) $Date: 2001\/08\/18 21:49:58 $";$/;" v file: sccsid ../ex/ex_stop.c /^static const char sccsid[] = "$Id: ex_stop.c,v 10.11 2001\/06\/25 15:19:20 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:20 $";$/;" v file: sccsid ../ex/ex_subst.c /^static const char sccsid[] = "$Id: ex_subst.c,v 10.50 2002\/02\/09 21:18:23 skimo Exp $ (Berkeley) $Date: 2002\/02\/09 21:18:23 $";$/;" v file: sccsid ../ex/ex_tag.c /^static const char sccsid[] = "$Id: ex_tag.c,v 10.50 2004\/03\/16 14:09:11 skimo Exp $ (Berkeley) $Date: 2004\/03\/16 14:09:11 $";$/;" v file: sccsid ../ex/ex_tcl.c /^static const char sccsid[] = "$Id: ex_tcl.c,v 8.11 2001\/06\/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:21 $";$/;" v file: sccsid ../ex/ex_txt.c /^static const char sccsid[] = "$Id: ex_txt.c,v 10.23 2001\/06\/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:21 $";$/;" v file: sccsid ../ex/ex_undo.c /^static const char sccsid[] = "$Id: ex_undo.c,v 10.7 2001\/06\/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:21 $";$/;" v file: sccsid ../ex/ex_usage.c /^static const char sccsid[] = "$Id: ex_usage.c,v 10.15 2001\/06\/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:21 $";$/;" v file: sccsid ../ex/ex_util.c /^static const char sccsid[] = "$Id: ex_util.c,v 10.32 2001\/06\/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:21 $";$/;" v file: sccsid ../ex/ex_version.c /^static const char sccsid[] = "$Id: ex_version.c,v 10.32 2001\/06\/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:22 $";$/;" v file: sccsid ../ex/ex_visual.c /^static const char sccsid[] = "$Id: ex_visual.c,v 10.16 2001\/08\/29 11:04:13 skimo Exp $ (Berkeley) $Date: 2001\/08\/29 11:04:13 $";$/;" v file: sccsid ../ex/ex_write.c /^static const char sccsid[] = "$Id: ex_write.c,v 10.38 2001\/06\/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:22 $";$/;" v file: sccsid ../ex/ex_yank.c /^static const char sccsid[] = "$Id: ex_yank.c,v 10.8 2001\/06\/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:22 $";$/;" v file: sccsid ../ex/ex_z.c /^static const char sccsid[] = "$Id: ex_z.c,v 10.12 2001\/06\/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:22 $";$/;" v file: sccsid ../ip/ip_funcs.c /^static const char sccsid[] = "$Id: ip_funcs.c,v 8.23 2001\/06\/25 15:19:23 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:23 $";$/;" v file: sccsid ../ip/ip_main.c /^static const char sccsid[] = "$Id: ip_main.c,v 8.24 2001\/07\/29 19:07:30 skimo Exp $ (Berkeley) $Date: 2001\/07\/29 19:07:30 $";$/;" v file: sccsid ../ip/ip_read.c /^static const char sccsid[] = "$Id: ip_read.c,v 8.23 2001\/06\/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:24 $";$/;" v file: sccsid ../ip/ip_screen.c /^static const char sccsid[] = "$Id: ip_screen.c,v 8.8 2001\/06\/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:24 $";$/;" v file: sccsid ../ip/ip_term.c /^static const char sccsid[] = "$Id: ip_term.c,v 8.9 2001\/06\/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:24 $";$/;" v file: sccsid ../ipc/ip_run.c /^static const char sccsid[] = "$Id: ip_run.c,v 8.17 2000\/07\/04 21:48:54 skimo Exp $ (Berkeley) $Date: 2000\/07\/04 21:48:54 $";$/;" v file: sccsid ../ipc/ip_send.c /^static const char sccsid[] = "$Id: ip_send.c,v 8.10 2001\/06\/25 15:19:25 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:25 $";$/;" v file: sccsid ../ipc/ip_trans.c /^static const char sccsid[] = "$Id: ip_trans.c,v 8.18 2001\/06\/25 15:19:25 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:25 $";$/;" v file: sccsid ../motif/m_cde.c /^static const char sccsid[] = "$Id: m_cde.c,v 8.11 2003\/11\/05 17:09:58 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:58 $";$/;" v file: sccsid ../motif/m_main.c /^static const char sccsid[] = "$Id: m_main.c,v 8.40 2003\/11\/05 17:09:58 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:58 $";$/;" v file: sccsid ../motif_l/m_copypaste.c /^static const char sccsid[] = "$Id: m_copypaste.c,v 8.10 2003\/11\/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:59 $";$/;" v file: sccsid ../motif_l/m_func.c /^static const char sccsid[] = "$Id: m_func.c,v 8.28 2003\/11\/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:59 $";$/;" v file: sccsid ../motif_l/m_menu.c /^static const char sccsid[] = "$Id: m_menu.c,v 8.26 2003\/11\/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:59 $";$/;" v file: sccsid ../motif_l/m_options.c /^static const char sccsid[] = "$Id: m_options.c,v 8.22 2003\/11\/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:09:59 $";$/;" v file: sccsid ../motif_l/m_prompt.c /^static const char sccsid[] = "$Id: m_prompt.c,v 8.8 2003\/11\/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:00 $";$/;" v file: sccsid ../motif_l/m_ruler.c /^static const char sccsid[] = "$Id: m_ruler.c,v 8.6 2003\/11\/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:00 $";$/;" v file: sccsid ../motif_l/m_search.c /^static const char sccsid[] = "$Id: m_search.c,v 8.14 2003\/11\/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:00 $";$/;" v file: sccsid ../motif_l/m_tags.c /^static const char sccsid[] = "$Id: m_tags.c,v 8.9 2003\/11\/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:00 $";$/;" v file: sccsid ../motif_l/m_util.c /^static const char sccsid[] = "$Id: m_util.c,v 8.12 2003\/11\/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:00 $";$/;" v file: sccsid ../motif_l/m_vi.c /^static const char sccsid[] = "$Id: m_vi.c,v 8.41 2003\/11\/05 17:10:01 skimo Exp $ (Berkeley) $Date: 2003\/11\/05 17:10:01 $";$/;" v file: sccsid ../perl_api/perlsfio.c /^static const char sccsid[] = "$Id: perlsfio.c,v 8.3 2000\/04\/30 17:00:15 skimo Exp $ (Berkeley) $Date: 2000\/04\/30 17:00:15 $";$/;" v file: sccsid ../tcl_api/tcl.c /^static const char sccsid[] = "$Id: tcl.c,v 8.19 2001\/08\/24 12:17:27 skimo Exp $ (Berkeley) $Date: 2001\/08\/24 12:17:27 $";$/;" v file: sccsid ../vi/getc.c /^static const char sccsid[] = "$Id: getc.c,v 10.12 2001\/06\/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:30 $";$/;" v file: sccsid ../vi/v_at.c /^static const char sccsid[] = "$Id: v_at.c,v 10.11 2001\/06\/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:30 $";$/;" v file: sccsid ../vi/v_ch.c /^static const char sccsid[] = "$Id: v_ch.c,v 10.10 2001\/06\/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:30 $";$/;" v file: sccsid ../vi/v_cmd.c /^static const char sccsid[] = "$Id: v_cmd.c,v 10.9 1996\/03\/28 15:18:39 bostic Exp $ (Berkeley) $Date: 1996\/03\/28 15:18:39 $";$/;" v file: sccsid ../vi/v_delete.c /^static const char sccsid[] = "$Id: v_delete.c,v 10.11 2001\/06\/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:31 $";$/;" v file: sccsid ../vi/v_event.c /^static const char sccsid[] = "$Id: v_event.c,v 8.21 2001\/06\/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:31 $";$/;" v file: sccsid ../vi/v_ex.c /^static const char sccsid[] = "$Id: v_ex.c,v 10.60 2003\/07\/19 21:04:00 skimo Exp $ (Berkeley) $Date: 2003\/07\/19 21:04:00 $";$/;" v file: sccsid ../vi/v_increment.c /^static const char sccsid[] = "$Id: v_increment.c,v 10.16 2001\/06\/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:31 $";$/;" v file: sccsid ../vi/v_init.c /^static const char sccsid[] = "$Id: v_init.c,v 10.9 2001\/06\/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:31 $";$/;" v file: sccsid ../vi/v_itxt.c /^static const char sccsid[] = "$Id: v_itxt.c,v 10.21 2001\/06\/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:32 $";$/;" v file: sccsid ../vi/v_left.c /^static const char sccsid[] = "$Id: v_left.c,v 10.9 2001\/06\/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:32 $";$/;" v file: sccsid ../vi/v_mark.c /^static const char sccsid[] = "$Id: v_mark.c,v 10.12 2001\/06\/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:32 $";$/;" v file: sccsid ../vi/v_match.c /^static const char sccsid[] = "$Id: v_match.c,v 10.10 2001\/06\/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:32 $";$/;" v file: sccsid ../vi/v_paragraph.c /^static const char sccsid[] = "$Id: v_paragraph.c,v 10.10 2001\/06\/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:32 $";$/;" v file: sccsid ../vi/v_put.c /^static const char sccsid[] = "$Id: v_put.c,v 10.6 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_redraw.c /^static const char sccsid[] = "$Id: v_redraw.c,v 10.7 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_replace.c /^static const char sccsid[] = "$Id: v_replace.c,v 10.24 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_right.c /^static const char sccsid[] = "$Id: v_right.c,v 10.8 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_screen.c /^static const char sccsid[] = "$Id: v_screen.c,v 10.12 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_scroll.c /^static const char sccsid[] = "$Id: v_scroll.c,v 10.12 2001\/06\/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:34 $";$/;" v file: sccsid ../vi/v_search.c /^static const char sccsid[] = "$Id: v_search.c,v 10.30 2001\/09\/11 20:52:46 skimo Exp $ (Berkeley) $Date: 2001\/09\/11 20:52:46 $";$/;" v file: sccsid ../vi/v_section.c /^static const char sccsid[] = "$Id: v_section.c,v 10.10 2001\/06\/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:35 $";$/;" v file: sccsid ../vi/v_sentence.c /^static const char sccsid[] = "$Id: v_sentence.c,v 10.9 2001\/06\/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:35 $";$/;" v file: sccsid ../vi/v_status.c /^static const char sccsid[] = "$Id: v_status.c,v 10.10 2001\/06\/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:35 $";$/;" v file: sccsid ../vi/v_txt.c /^static const char sccsid[] = "$Id: v_txt.c,v 10.108 2003\/07\/18 21:27:42 skimo Exp $ (Berkeley) $Date: 2003\/07\/18 21:27:42 $";$/;" v file: sccsid ../vi/v_ulcase.c /^static const char sccsid[] = "$Id: v_ulcase.c,v 10.11 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_undo.c /^static const char sccsid[] = "$Id: v_undo.c,v 10.6 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_util.c /^static const char sccsid[] = "$Id: v_util.c,v 10.14 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_word.c /^static const char sccsid[] = "$Id: v_word.c,v 10.6 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_xchar.c /^static const char sccsid[] = "$Id: v_xchar.c,v 10.10 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_yank.c /^static const char sccsid[] = "$Id: v_yank.c,v 10.10 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_z.c /^static const char sccsid[] = "$Id: v_z.c,v 10.12 2001\/06\/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:36 $";$/;" v file: sccsid ../vi/v_zexit.c /^static const char sccsid[] = "$Id: v_zexit.c,v 10.7 2001\/06\/25 15:19:37 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:37 $";$/;" v file: sccsid ../vi/vi.c /^static const char sccsid[] = "$Id: vi.c,v 10.73 2002\/04\/11 19:49:30 skimo Exp $ (Berkeley) $Date: 2002\/04\/11 19:49:30 $";$/;" v file: sccsid ../vi/vs_line.c /^static const char sccsid[] = "$Id: vs_line.c,v 10.38 2002\/01\/19 21:59:07 skimo Exp $ (Berkeley) $Date: 2002\/01\/19 21:59:07 $";$/;" v file: sccsid ../vi/vs_msg.c /^static const char sccsid[] = "$Id: vs_msg.c,v 10.85 2001\/07\/29 19:07:31 skimo Exp $ (Berkeley) $Date: 2001\/07\/29 19:07:31 $";$/;" v file: sccsid ../vi/vs_refresh.c /^static const char sccsid[] = "$Id: vs_refresh.c,v 10.50 2001\/06\/25 15:19:37 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:37 $";$/;" v file: sccsid ../vi/vs_relative.c /^static const char sccsid[] = "$Id: vs_relative.c,v 10.18 2001\/07\/08 13:02:48 skimo Exp $ (Berkeley) $Date: 2001\/07\/08 13:02:48 $";$/;" v file: sccsid ../vi/vs_smap.c /^static const char sccsid[] = "$Id: vs_smap.c,v 10.30 2002\/01\/19 21:59:07 skimo Exp $ (Berkeley) $Date: 2002\/01\/19 21:59:07 $";$/;" v file: sccsid ../vi/vs_split.c /^static const char sccsid[] = "$Id: vs_split.c,v 10.42 2001\/06\/25 15:19:38 skimo Exp $ (Berkeley) $Date: 2001\/06\/25 15:19:38 $";$/;" v file: scr_addstr ../common/gs.h /^ int (*scr_addstr) __P((SCR *, const char *, size_t));$/;" m struct:_gs scr_attr ../common/gs.h /^ int (*scr_attr) __P((SCR *, scr_attr_t, int));$/;" m struct:_gs scr_attr_t ../common/gs.h /^typedef enum { SA_ALTERNATE, SA_INVERSE } scr_attr_t;$/;" t scr_baud ../common/gs.h /^ int (*scr_baud) __P((SCR *, u_long *));$/;" m struct:_gs scr_bell ../common/gs.h /^ int (*scr_bell) __P((SCR *));$/;" m struct:_gs scr_busy ../common/gs.h /^ void (*scr_busy) __P((SCR *, const char *, busy_t));$/;" m struct:_gs scr_child ../common/gs.h /^ int (*scr_child) __P((SCR *));$/;" m struct:_gs scr_clrtoeol ../common/gs.h /^ int (*scr_clrtoeol) __P((SCR *));$/;" m struct:_gs scr_cursor ../common/gs.h /^ int (*scr_cursor) __P((SCR *, size_t *, size_t *));$/;" m struct:_gs scr_deleteln ../common/gs.h /^ int (*scr_deleteln) __P((SCR *));$/;" m struct:_gs scr_discard ../common/gs.h /^ int (*scr_discard) __P((SCR *, SCR **));$/;" m struct:_gs scr_event ../common/gs.h /^ int (*scr_event) __P((SCR *, EVENT *, u_int32_t, int));$/;" m struct:_gs scr_ex_adjust ../common/gs.h /^ int (*scr_ex_adjust) __P((SCR *, exadj_t));$/;" m struct:_gs scr_fmap ../common/gs.h /^ int (*scr_fmap) \/* Set a function key. *\/$/;" m struct:_gs scr_insertln ../common/gs.h /^ int (*scr_insertln) __P((SCR *));$/;" m struct:_gs scr_keyval ../common/gs.h /^ int (*scr_keyval) __P((SCR *, scr_keyval_t, CHAR_T *, int *));$/;" m struct:_gs scr_keyval_t ../common/gs.h /^typedef enum { KEY_VEOF, KEY_VERASE, KEY_VKILL, KEY_VWERASE } scr_keyval_t;$/;" t scr_move ../common/gs.h /^ int (*scr_move) __P((SCR *, size_t, size_t));$/;" m struct:_gs scr_msg ../common/screen.h /^ void (*scr_msg) __P((SCR *, mtype_t, char *, size_t));$/;" m struct:_win scr_optchange ../common/gs.h /^ int (*scr_optchange) __P((SCR *, int, char *, u_long *));$/;" m struct:_gs scr_refresh ../common/gs.h /^ int (*scr_refresh) __P((SCR *, int));$/;" m struct:_gs scr_rename ../common/gs.h /^ int (*scr_rename) __P((SCR *, char *, int));$/;" m struct:_gs scr_reply ../common/gs.h /^ int (*scr_reply) __P((SCR *, int, char *));$/;" m struct:_gs scr_screen ../common/gs.h /^ int (*scr_screen) __P((SCR *, u_int32_t));$/;" m struct:_gs scr_split ../common/gs.h /^ int (*scr_split) __P((SCR *, SCR *));$/;" m struct:_gs scr_suspend ../common/gs.h /^ int (*scr_suspend) __P((SCR *, int *));$/;" m struct:_gs scr_update ../common/db.c /^scr_update(SCR *sp, db_recno_t lno, lnop_t op, int current)$/;" f scr_update ../common/db1.c /^scr_update(SCR *sp, db_recno_t lno, lnop_t op, int current)$/;" f file: scr_usage ../common/gs.h /^ void (*scr_usage) __P((void));$/;" m struct:_gs scr_waddstr ../common/gs.h /^ int (*scr_waddstr) __P((SCR *, const CHAR_T *, size_t));$/;" m struct:_gs screen_end ../common/screen.c /^screen_end(SCR *sp)$/;" f screen_init ../common/screen.c /^screen_init(GS *gp, SCR *orig, SCR **spp)$/;" f screen_next ../common/screen.c /^screen_next(SCR *sp)$/;" f script ../common/screen.h /^ SCRIPT *script; \/* Vi: script mode information .*\/$/;" m struct:_scr scroll ../motif_l/m_motif.h /^ scroll; \/* not connected yet *\/$/;" m struct: scroll_block ../motif_l/m_vi.c /^static Boolean scroll_block = False;$/;" v file: scroll_t ../vi/vi.h /^} scroll_t;$/;" t scrollbar ../ipc/ip.h /^ IPFunc_123 scrollbar;$/;" m struct:ip_si_operations scrollbar_moved ../motif_l/m_vi.c /^static void scrollbar_moved( Widget widget,$/;" f file: sdot ../vi/vi.h /^ VICMD sdot; \/* Saved dot, motion command. *\/$/;" m struct:_vi_private sdotmotion ../vi/vi.h /^ VICMD sdotmotion;$/;" m struct:_vi_private sds ../motif_l/m_search.c /^typedef struct sds {$/;" s file: search ../ex/tag.h /^ CHAR_T *search; \/* Search string. *\/$/;" m struct:_tag search ../motif_l/m_options.c /^}, search[] = {$/;" v file: search ../motif_l/m_search.c /^search(Widget w, int flags)$/;" f file: search_busy ../common/search.c /^search_busy(SCR *sp, busy_t btype)$/;" f search_init ../common/search.c /^search_init(SCR *sp, dir_t dir, CHAR_T *ptrn, size_t plen, CHAR_T **epp, u_int flags)$/;" f file: search_msg ../common/search.c /^search_msg(SCR *sp, smsg_t msg)$/;" f file: search_str ../motif_l/m_options.c /^}, search_str[] = {$/;" v file: search_toggles ../motif_l/m_search.c /^static optData search_toggles[] = {$/;" v file: searchdir ../common/screen.h /^ dir_t searchdir; \/* Last file search direction. *\/$/;" m struct:_scr sel ../vi/vi.h /^ MARK sel; \/* Select start position. *\/$/;" m struct:_vi_private select ../ipc/ip.h /^ IPFunc_a select;$/;" m struct:ip_si_operations select_char ../motif_l/m_vi.c /^ select_char, select_word, select_line$/;" e enum:select_enum file: select_enum ../motif_l/m_vi.c /^static enum select_enum {$/;" g file: select_extend ../motif_l/m_vi.c /^static void select_extend( Widget widget, $/;" f file: select_line ../motif_l/m_vi.c /^ select_char, select_word, select_line$/;" e enum:select_enum file: select_paste ../motif_l/m_vi.c /^static void select_paste( Widget widget, $/;" f file: select_start ../motif_l/m_vi.c /^static void select_start( Widget widget, $/;" f file: select_type ../motif_l/m_vi.c /^ } select_type = select_char;$/;" v file: select_word ../motif_l/m_vi.c /^ select_char, select_word, select_line$/;" e enum:select_enum file: selection_anchor ../motif_l/m_vi.c /^static int selection_start, selection_end, selection_anchor;$/;" v file: selection_end ../motif_l/m_vi.c /^static int selection_start, selection_end, selection_anchor;$/;" v file: selection_start ../motif_l/m_vi.c /^static int selection_start, selection_end, selection_anchor;$/;" v file: send_beep ../motif_l/m_menu.c /^static void send_beep( Widget w )$/;" f file: send_resize ../motif_l/m_vi.c /^static void send_resize( xvi_screen *this_screen )$/;" f file: seq_close ../common/seq.c /^seq_close(GS *gp)$/;" f seq_delete ../common/seq.c /^seq_delete(SCR *sp, CHAR_T *input, size_t ilen, seq_t stype)$/;" f seq_dump ../common/seq.c /^seq_dump(SCR *sp, seq_t stype, int isname)$/;" f seq_find ../common/seq.c /^seq_find(SCR *sp, SEQ **lastqp, EVENT *e_input, CHAR_T *c_input, size_t ilen, seq_t stype, int *ispartialp)$/;" f seq_mdel ../common/seq.c /^seq_mdel(SEQ *qp)$/;" f seq_save ../common/seq.c /^seq_save(SCR *sp, FILE *fp, char *prefix, seq_t stype)$/;" f seq_set ../common/seq.c /^seq_set(SCR *sp, CHAR_T *name, size_t nlen, CHAR_T *input, size_t ilen, CHAR_T *output, size_t olen, seq_t stype, int flags)$/;" f seq_t ../common/common.h /^typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;$/;" t set_alt_name ../common/exf.c /^set_alt_name(SCR *sp, char *name)$/;" f set_gc_colors ../motif_l/m_vi.c /^static void set_gc_colors( xvi_screen *this_screen, int val )$/;" f file: set_ops ../ipc/ip.h /^ int (*set_ops) __P((IPVIWIN*, IPSIOPS*));$/;" m struct:_ip_vi_win set_opt ../motif_l/m_options.c /^set_opt(Widget w, XtPointer closure, XtPointer call_data)$/;" f file: set_ruler_text ../motif_l/m_ruler.c /^set_ruler_text(int row, int col, int *h, int *w, int *asc)$/;" f file: set_shape ../motif_l/xtabbed.c /^static void set_shape(Widget self)$/;" f file: set_text_field ../motif_l/m_tags.c /^static void set_text_field(Widget w, XtPointer ptr, XmListCallbackStruct *cbs)$/;" f file: set_txt_std ../vi/v_itxt.c /^set_txt_std(SCR *sp, VICMD *vp, u_int32_t flags)$/;" f file: set_values ../motif_l/xtabbed.c /^static Boolean set_values(Widget old,Widget request,Widget self,ArgList args,Cardinal * num_args)$/;" f file: setsig ../cl/cl_main.c /^setsig(int signo, struct sigaction *oactp, void (*handler) (int))$/;" f file: setupterm ../cl/cl_bsd.c /^setupterm(ttype, fno, errp)$/;" f sfdcnewnvi ../perl_api/perlsfio.c /^sfdcnewnvi(scrp)$/;" f sfnviwrite ../perl_api/perlsfio.c /^sfnviwrite(f, buf, n, disc)$/;" f file: sh_master ../ex/script.h /^ int sh_master; \/* Master pty fd. *\/$/;" m struct:_script sh_name ../ex/script.h /^ char sh_name[64]; \/* Pty name *\/$/;" m struct:_script sh_pid ../ex/script.h /^ pid_t sh_pid; \/* Shell pid. *\/$/;" m struct:_script sh_prompt ../ex/script.h /^ char *sh_prompt; \/* Prompt. *\/$/;" m struct:_script sh_prompt_len ../ex/script.h /^ size_t sh_prompt_len; \/* Prompt length. *\/$/;" m struct:_script sh_slave ../ex/script.h /^ int sh_slave; \/* Slave pty fd. *\/$/;" m struct:_script sh_term ../ex/script.h /^ struct termios sh_term; \/* Terminal information. *\/$/;" m struct:_script sh_win ../ex/script.h /^ struct winsize sh_win; \/* Window size. *\/$/;" m struct:_script sheets ../motif_l/m_options.c /^static optSheet sheets[] = {$/;" v file: shell ../motif_l/m_search.c /^ Widget shell;$/;" m struct:sds file: shift ../ex/ex_shift.c /^shift(SCR *sp, EXCMD *cmdp, enum which rl)$/;" f file: show_options ../motif_l/m_options.c /^static void show_options( Widget w, XtPointer data, XtPointer cbs )$/;" f file: show_search ../motif_l/m_search.c /^static void show_search( Widget w, XtPointer data, XtPointer cbs )$/;" f file: show_tags ../motif_l/m_tags.c /^static void show_tags( Widget w, XtPointer data, XtPointer cbs )$/;" f file: show_text_ruler ../motif_l/m_ruler.c /^static void show_text_ruler( Widget w, XtPointer data, XtPointer cbs )$/;" f file: showmode ../common/screen.h /^ SM_REPLACE } showmode;$/;" m struct:_scr si_ops ../ipc/ip.h /^ IPSIOPS *si_ops;$/;" m struct:_ip_vi_win sig_end ../cl/cl_main.c /^sig_end(GS *gp)$/;" f file: sig_init ../cl/cl_main.c /^sig_init(GS *gp, SCR *sp)$/;" f sigmsg ../ex/ex_shell.c /^sigmsg(int signo)$/;" f file: sigs ../ex/ex_shell.c /^SIGS const sigs[] = {$/;" v size ../motif_l/xtabbed.c /^ long int size;$/;" m struct:rotated_text_item_template file: skip ../cl/cl.h /^ size_t skip; \/* Remaining keys. *\/$/;" m struct:_cl_private slen ../ex/tag.h /^ size_t slen; \/* Search string length. *\/$/;" m struct:_tag slno ../ex/tag.h /^ db_recno_t slno; \/* Search line number. *\/$/;" m struct:_tag smcup ../cl/cl.h /^ char *smcup, *rmcup; \/* Terminal start\/stop strings. *\/$/;" m struct:_cl_private smsg_t ../common/search.c /^typedef enum { S_EMPTY, S_EOF, S_NOPREV, S_NOTFOUND, S_SOF, S_WRAP } smsg_t;$/;" t file: smso ../cl/cl.h /^ char *rmso, *smso; \/* Inverse video terminal strings. *\/$/;" m struct:_cl_private soff ../vi/vi.h /^ size_t soff; \/* 1-N: Screen offset in the line. *\/$/;" m struct:_smap special_key ../common/gs.h /^ special_key[MAX_FAST_KEY + 1];$/;" m struct:_gs split ../ipc/ip.h /^ IPFunc split;$/;" m struct:ip_si_operations split_screen ../motif_l/m_vi.c /^static xvi_screen *split_screen(void)$/;" f file: split_to_tag ../motif_l/m_tags.c /^static void split_to_tag( Widget w )$/;" f file: srows ../vi/vi.h /^ size_t srows; \/* 1-N: rows in the terminal\/window. *\/$/;" m struct:_vi_private ss_lno ../vi/vi.h /^ db_recno_t ss_lno; \/* 1-N: vi_opt_screens cached line number. *\/$/;" m struct:_vi_private ss_screens ../vi/vi.h /^ size_t ss_screens; \/* vi_opt_screens cached return value. *\/$/;" m struct:_vi_private sscr_check ../ex/ex_script.c /^sscr_check(SCR *sp)$/;" f file: sscr_check_input ../ex/ex_script.c /^sscr_check_input(SCR *sp, fd_set *fdset, int maxfd)$/;" f sscr_end ../ex/ex_script.c /^sscr_end(SCR *sp)$/;" f sscr_exec ../ex/ex_script.c /^sscr_exec(SCR *sp, db_recno_t lno)$/;" f sscr_getprompt ../ex/ex_script.c /^sscr_getprompt(SCR *sp)$/;" f file: sscr_init ../ex/ex_script.c /^sscr_init(SCR *sp)$/;" f file: sscr_input ../ex/ex_script.c /^sscr_input(SCR *sp)$/;" f sscr_insert ../ex/ex_script.c /^sscr_insert(SCR *sp)$/;" f file: sscr_matchprompt ../ex/ex_script.c /^sscr_matchprompt(SCR *sp, CHAR_T *lp, size_t line_len, size_t *lenp)$/;" f file: sscr_pty ../ex/ex_script.c /^sscr_pty(amaster, aslave, name, termp, winp)$/;" f file: sscr_pty ../ex/ex_script.c /^sscr_pty(int *amaster, int *aslave, char *name, struct termios *termp, void *winp)$/;" f file: sscr_setprompt ../ex/ex_script.c /^sscr_setprompt(SCR *sp, CHAR_T *buf, size_t len)$/;" f file: start ../ex/ex.h /^ db_recno_t start, stop; \/* Start\/stop of the range. *\/$/;" m struct:_range start_cscopes ../ex/ex_cscope.c /^start_cscopes(SCR *sp, EXCMD *cmdp)$/;" f file: state ../common/screen.h /^ struct _log_state state; \/* State during log traversal. *\/$/;" m struct:_scr std_cursor ../motif_l/m_vi.c /^static Cursor std_cursor;$/;" v file: stop ../ex/ex.h /^ db_recno_t start, stop; \/* Start\/stop of the range. *\/$/;" m struct:_range str ../common/log.c /^ CHAR_T str[1];$/;" m struct: file: str ../common/options.h /^ char *str; \/* String. *\/$/;" m union:_option:: str1 ../ipc/ip.h /^ const char *str1; \/* String #1. *\/$/;" m struct:_ip_buf str2 ../ipc/ip.h /^ const char *str2; \/* String #1. *\/$/;" m struct:_ip_buf string ../ipc/ip.h /^ int (*string) __P((IPVIWIN*, const char*, u_int32_t));$/;" m struct:_ip_vi_win strtocard ../motif_l/xtabbed.c /^Boolean strtocard( Display *dsp,$/;" f file: style ../motif_l/xtabbed.c /^} style={$/;" v file: style_template ../motif_l/xtabbed.c /^static struct style_template {$/;" s file: stype ../common/seq.h /^ seq_t stype; \/* Sequence type. *\/$/;" m struct:_seq subre ../common/screen.h /^ CHAR_T *subre; \/* Substitute RE: uncompiled form. *\/$/;" m struct:_scr subre_c ../common/screen.h /^ regex_t subre_c; \/* Substitute RE: compiled form. *\/$/;" m struct:_scr subre_len ../common/screen.h /^ size_t subre_len; \/* Substitute RE: uncompiled length). *\/$/;" m struct:_scr sv_cno ../common/cut.h /^ size_t sv_cno; \/* 0-N: Saved line cursor. *\/$/;" m struct:_text sv_len ../common/cut.h /^ size_t sv_len; \/* 0-N: Saved line length. *\/$/;" m struct:_text sv_t_maxrows ../vi/vi.h /^ size_t sv_t_maxrows; \/* tcmd: saved t_maxrows. *\/$/;" m struct:_vi_private sv_t_minrows ../vi/vi.h /^ size_t sv_t_minrows; \/* tcmd: saved t_minrows. *\/$/;" m struct:_vi_private sv_t_rows ../vi/vi.h /^ size_t sv_t_rows; \/* tcmd: saved t_rows. *\/$/;" m struct:_vi_private sv_tm_coff ../vi/vi.h /^ size_t sv_tm_coff; \/* tcmd: saved TMAP coff field. *\/$/;" m struct:_vi_private sv_tm_lno ../vi/vi.h /^ db_recno_t sv_tm_lno; \/* tcmd: saved TMAP lno field. *\/$/;" m struct:_vi_private sv_tm_soff ../vi/vi.h /^ size_t sv_tm_soff; \/* tcmd: saved TMAP soff field. *\/$/;" m struct:_vi_private sw_t ../vi/vs_msg.c /^} sw_t;$/;" t file: syntax ../ex/ex.h /^ char *syntax; \/* Syntax script. *\/$/;" m struct:_excmdlist sys2int ../common/conv.h /^ char2wchar_t sys2int;$/;" m struct:_conv tSEARCH ../vi/vi.h /^typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t;$/;" e t_fd ../ipc/ip.h /^ int t_fd; \/* Terminal file descriptor. *\/$/;" m struct:_ip_private t_maxrows ../common/screen.h /^ size_t t_maxrows; \/* 1-N: max number of text rows. *\/$/;" m struct:_scr t_minrows ../common/screen.h /^ size_t t_minrows; \/* 1-N: min number of text rows. *\/$/;" m struct:_scr t_rows ../common/screen.h /^ size_t t_rows; \/* 1-N: cur number of text rows. *\/$/;" m struct:_scr t_smap ../vi/vi.h /^ SMAP *t_smap; \/* Last slot of the line map. *\/$/;" m struct:_vi_private tabWidthPercentage ../motif_l/xtabbed.c /^int tabWidthPercentage;$/;" m struct: file: tab_data ../motif_l/xtabbed.c /^typedef struct tab_data {$/;" s file: tabcolor ../motif_l/xtabbed.c /^Pixel tabcolor;$/;" m struct: file: table ../gtk/gtkviwindow.h /^ GtkWidget *table;$/;" m struct:_GtkViWindow tabwidths ../motif_l/xtabbed.c /^int * tabwidths;$/;" m struct: file: tag ../ex/tag.h /^ char *tag; \/* Tag string. *\/$/;" m struct:_tagq tag_copy ../ex/ex_tag.c /^tag_copy(SCR *sp, TAG *otp, TAG **tpp)$/;" f file: tag_last ../ex/ex.h /^ CHAR_T *tag_last; \/* Saved last tag string. *\/$/;" m struct:_ex_private tag_menu ../motif_l/m_menu.c /^static pull_down tag_menu[] = {$/;" v file: tag_msg ../ex/ex_tag.c /^tag_msg(SCR *sp, tagmsg_t msg, char *tag)$/;" f tag_pop ../ex/ex_tag.c /^tag_pop(SCR *sp, TAGQ *dtqp, int force)$/;" f file: tagf_copy ../ex/ex_tag.c /^tagf_copy(SCR *sp, TAGF *otfp, TAGF **tfpp)$/;" f file: tagf_free ../ex/ex_tag.c /^tagf_free(SCR *sp, TAGF *tfp)$/;" f file: tagmsg_t ../ex/ex.h /^} tagmsg_t;$/;" t tagq_copy ../ex/ex_tag.c /^tagq_copy(SCR *sp, TAGQ *otqp, TAGQ **tqpp)$/;" f file: tagq_free ../ex/ex_tag.c /^tagq_free(SCR *sp, TAGQ *tqp)$/;" f tagq_push ../ex/ex_tag.c /^tagq_push(SCR *sp, TAGQ *tqp, int new_screen, int force)$/;" f tail ../common/util.c /^tail(char *path)$/;" f tbuf ../ipc/ip.h /^ CHAR_T tbuf[256]; \/* Input keys. *\/$/;" m struct:_ip_private tcl_aline ../tcl_api/tcl.c /^tcl_aline(clientData, interp, argc, argv)$/;" f file: tcl_dline ../tcl_api/tcl.c /^tcl_dline(clientData, interp, argc, argv)$/;" f file: tcl_escreen ../tcl_api/tcl.c /^tcl_escreen(clientData, interp, argc, argv)$/;" f file: tcl_fscreen ../tcl_api/tcl.c /^tcl_fscreen(clientData, interp, argc, argv)$/;" f file: tcl_getcursor ../tcl_api/tcl.c /^tcl_getcursor(clientData, interp, argc, argv)$/;" f file: tcl_getmark ../tcl_api/tcl.c /^tcl_getmark(clientData, interp, argc, argv)$/;" f file: tcl_gline ../tcl_api/tcl.c /^tcl_gline(clientData, interp, argc, argv)$/;" f file: tcl_iline ../tcl_api/tcl.c /^tcl_iline(clientData, interp, argc, argv)$/;" f file: tcl_init ../tcl_api/tcl.c /^tcl_init(gp)$/;" f tcl_interp ../common/gs.h /^ void *tcl_interp; \/* Tcl_Interp *: Tcl interpreter. *\/$/;" m struct:_gs tcl_iscreen ../tcl_api/tcl.c /^tcl_iscreen(clientData, interp, argc, argv)$/;" f file: tcl_lline ../tcl_api/tcl.c /^tcl_lline(clientData, interp, argc, argv)$/;" f file: tcl_map ../tcl_api/tcl.c /^tcl_map(clientData, interp, argc, argv)$/;" f file: tcl_msg ../tcl_api/tcl.c /^tcl_msg(clientData, interp, argc, argv)$/;" f file: tcl_opts_get ../tcl_api/tcl.c /^tcl_opts_get(clientData, interp, argc, argv)$/;" f file: tcl_opts_set ../tcl_api/tcl.c /^tcl_opts_set(clientData, interp, argc, argv)$/;" f file: tcl_setcursor ../tcl_api/tcl.c /^tcl_setcursor(clientData, interp, argc, argv)$/;" f file: tcl_setmark ../tcl_api/tcl.c /^tcl_setmark(clientData, interp, argc, argv)$/;" f file: tcl_sline ../tcl_api/tcl.c /^tcl_sline(clientData, interp, argc, argv)$/;" f file: tcl_swscreen ../tcl_api/tcl.c /^tcl_swscreen(clientData, interp, argc, argv)$/;" f file: tcl_unmap ../tcl_api/tcl.c /^tcl_unmap(clientData, interp, argc, argv)$/;" f file: term ../common/cut.h /^ } term;$/;" m struct:_text term ../gtk/gtkviwindow.h /^ GtkWidget *term;$/;" m struct:_GtkViWindow term_init ../cl/cl_main.c /^term_init(char *name, char *ttype)$/;" f file: termcap ../cl/cl_bsd.c /^ char *termcap; \/* Termcap name. *\/$/;" m struct:_tl file: terminate ../ex/ex_cscope.c /^terminate(SCR *sp, CSC *csc, int n)$/;" f file: terminfo ../cl/cl_bsd.c /^ char *terminfo; \/* Terminfo name. *\/$/;" m struct:_tl file: text ../motif_l/m_ruler.c /^static char text[256];$/;" v file: text ../motif_l/xtabbed.c /^ char *text;$/;" m struct:rotated_text_item_template file: text_area ../gtk/gtkviscreen.h /^ GdkWindow *text_area;$/;" m struct:_GtkViScreen text_cr ../motif_l/m_search.c /^static void text_cr( Widget w, void *ptr, void *ptr2 )$/;" f file: text_free ../common/cut.c /^text_free(TEXT *tp)$/;" f text_init ../common/cut.c /^text_init(SCR *sp, const CHAR_T *p, size_t len, size_t total_len)$/;" f text_lfree ../common/cut.c /^text_lfree(TEXTH *headp)$/;" f textgc ../motif_l/xtabbed.c /^GC textgc;$/;" m struct: file: textmargin ../motif_l/xtabbed.c /^int textmargin;$/;" m struct: file: textq ../common/cut.h /^ TEXTH textq; \/* Linked list of TEXT structures. *\/$/;" m struct:_cb tfn ../gtk/gtkviscreen.c /^static GdkFont *tfn;$/;" v file: tfp ../common/trace.c /^static FILE *tfp;$/;" v file: tfw ../gtk/gtkviscreen.c /^static GdkFont *tfw;$/;" v file: tgw ../cl/cl.h /^ TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;$/;" m struct:_cl_private th_private ../common/gs.h /^ void *th_private;$/;" m struct:_gs th_private ../common/screen.h /^ void *th_private; \/* Threading support private area. *\/$/;" m struct:_win thread_init ../common/nothread.c /^thread_init(GS *gp)$/;" f thread_init ../common/pthread.c /^thread_init(GS *gp)$/;" f ti_te ../cl/cl.h /^ TE_SENT=0, TI_SENT } ti_te;$/;" m struct:_cl_private tigetnum ../cl/cl_bsd.c /^tigetnum(name)$/;" f tigetstr ../cl/cl_bsd.c /^tigetstr(name)$/;" f tiq ../common/screen.h /^ TEXTH tiq; \/* Ex\/vi: text input queue. *\/$/;" m struct:_scr title ../motif_l/m_menu.c /^ String title;$/;" m struct: file: tk_private ../common/gs.h /^ void *tk_private; \/* Tk\/Tcl support private area. *\/$/;" m struct:_gs tlen ../ex/tag.h /^ size_t tlen; \/* Tag string length. *\/$/;" m struct:_tagq tmotion ../vi/vi.c /^VIKEYS const tmotion = {$/;" v tmp_blen ../common/screen.h /^ size_t tmp_blen; \/* Temporary buffer size. *\/$/;" m struct:_win tmp_bp ../common/screen.h /^ char *tmp_bp; \/* Temporary buffer. *\/$/;" m struct:_win tname ../common/gs.h /^ char *tname; \/* Backing temporary file name. *\/$/;" m struct:_fref to_fd ../ex/tag.h /^ int to_fd; \/* to cscope: file descriptor. *\/$/;" m struct:_csc to_fp ../ex/tag.h /^ FILE *to_fp; \/* to cscope: FILE. *\/$/;" m struct:_csc toggleColumns ../motif_l/m_options.c 51;" d file: toggles ../motif_l/m_motif.h /^ optData *toggles;$/;" m struct: top_level ../motif/m_main.c /^static Widget top_level;$/;" v file: topgc ../motif_l/xtabbed.c /^GC topgc;$/;" m struct: file: totalcount ../vi/vi.h /^ size_t totalcount; \/* 1-N: Output overwrite count. *\/$/;" m struct:_vi_private tracefp ../common/gs.h /^ FILE *tracefp; \/* Trace file pointer. *\/$/;" m struct:_gs ts ../cl/cl_term.c /^ char *ts; \/* Key's termcap string. *\/$/;" m struct:_tklist file: txnid ../common/vi_auto.h /^ DB_TXN *txnid;$/;" m struct:_vi_change_args txnid ../common/vi_auto.h /^ DB_TXN *txnid;$/;" m struct:_vi_cursor_args txnid ../common/vi_auto.h /^ DB_TXN *txnid;$/;" m struct:_vi_mark_args txnid ../common/vi_auto.h /^ DB_TXN *txnid;$/;" m struct:_vi_marker_args txt_Rresolve ../vi/v_txt.c /^txt_Rresolve(SCR *sp, TEXTH *tiqh, TEXT *tp, const size_t orig_len)$/;" f file: txt_abbrev ../vi/v_txt.c /^txt_abbrev(SCR *sp, TEXT *tp, CHAR_T *pushcp, int isinfoline, int *didsubp, int *turnoffp)$/;" f file: txt_ai_resolve ../vi/v_txt.c /^txt_ai_resolve(SCR *sp, TEXT *tp, int *changedp)$/;" f file: txt_backup ../vi/v_txt.c /^txt_backup(SCR *sp, TEXTH *tiqh, TEXT *tp, u_int32_t *flagsp)$/;" f file: txt_dent ../ex/ex_txt.c /^txt_dent(SCR *sp, TEXT *tp)$/;" f file: txt_dent ../vi/v_txt.c /^txt_dent(SCR *sp, TEXT *tp, int isindent)$/;" f file: txt_emark ../vi/v_txt.c /^txt_emark(SCR *sp, TEXT *tp, size_t cno)$/;" f file: txt_err ../vi/v_txt.c /^txt_err(SCR *sp, TEXTH *tiqh)$/;" f file: txt_fc ../vi/v_txt.c /^txt_fc(SCR *sp, TEXT *tp, int *redrawp)$/;" f file: txt_fc_col ../vi/v_txt.c /^txt_fc_col(SCR *sp, int argc, ARGS **argv)$/;" f file: txt_hex ../vi/v_txt.c /^txt_hex(SCR *sp, TEXT *tp)$/;" f file: txt_insch ../vi/v_txt.c /^txt_insch(SCR *sp, TEXT *tp, CHAR_T *chp, u_int flags)$/;" f file: txt_isrch ../vi/v_txt.c /^txt_isrch(SCR *sp, VICMD *vp, TEXT *tp, u_int8_t *is_flagsp)$/;" f file: txt_map_end ../vi/v_txt.c /^txt_map_end(SCR *sp)$/;" f file: txt_map_init ../vi/v_txt.c /^txt_map_init(SCR *sp)$/;" f file: txt_margin ../vi/v_txt.c /^txt_margin(SCR *sp, TEXT *tp, TEXT *wmtp, int *didbreak, u_int32_t flags)$/;" f file: txt_nomorech ../vi/v_txt.c /^txt_nomorech(SCR *sp)$/;" f file: txt_prompt ../ex/ex_txt.c /^txt_prompt(SCR *sp, TEXT *tp, ARG_CHAR_T prompt, u_int32_t flags)$/;" f file: txt_resolve ../vi/v_txt.c /^txt_resolve(SCR *sp, TEXTH *tiqh, u_int32_t flags)$/;" f file: txt_showmatch ../vi/v_txt.c /^txt_showmatch(SCR *sp, TEXT *tp)$/;" f file: txt_unmap ../vi/v_txt.c /^txt_unmap(SCR *sp, TEXT *tp, u_int32_t *ec_flagsp)$/;" f file: type ../common/options.h /^ enum { OPT_0BOOL, OPT_1BOOL, OPT_NUM, OPT_STR } type;$/;" m struct:_optlist type ../common/vi_auto.h /^ u_int32_t type;$/;" m struct:_vi_change_args type ../common/vi_auto.h /^ u_int32_t type;$/;" m struct:_vi_cursor_args type ../common/vi_auto.h /^ u_int32_t type;$/;" m struct:_vi_mark_args type ../common/vi_auto.h /^ u_int32_t type;$/;" m struct:_vi_marker_args u_ccnt ../vi/vi.h /^ u_long u_ccnt; \/* Undo command count. *\/$/;" m struct:_vi_private ucs2utf8 ../common/util2.c /^ucs2utf8(const CHAR_T *src, size_t len, char *dst)$/;" f ulcase ../vi/v_ulcase.c /^ulcase(SCR *sp, db_recno_t lno, CHAR_T *lp, size_t len, size_t scno, size_t ecno)$/;" f file: undo ../common/log.h /^ undo_t undo;$/;" m struct:_log_state undo_t ../common/log.h /^typedef enum { UNDO_FORWARD, UNDO_BACKWARD, UNDO_SETLINE } undo_t;$/;" t unmarshall ../ipc/ip.h /^ IPUnmarshall unmarshall;$/;" m struct:_ipfunlist update_cache ../common/db.c /^update_cache(SCR *sp, lnop_t op, db_recno_t lno)$/;" f usage ../ex/ex.h /^ char *usage; \/* Usage line. *\/$/;" m struct:_excmdlist usage ../vi/vi.h /^ char *usage; \/* Usage line. *\/$/;" m struct:_vikeys usage_msg ../ex/ex_cscope.c /^ char *usage_msg;$/;" m struct:_cc file: use_colormap ../motif/m_main.c /^static Boolean use_colormap = False;$/;" v file: v_Put ../vi/v_put.c /^v_Put(SCR *sp, VICMD *vp)$/;" f v_Replace ../vi/v_itxt.c /^v_Replace(SCR *sp, VICMD *vp)$/;" f v_Undo ../vi/v_undo.c /^v_Undo(SCR *sp, VICMD *vp)$/;" f v_Xchar ../vi/v_xchar.c /^v_Xchar(SCR *sp, VICMD *vp)$/;" f v_again ../vi/v_ex.c /^v_again(SCR *sp, VICMD *vp)$/;" f v_alias ../vi/vi.c /^v_alias(SCR *sp, VICMD *vp, const VIKEYS *kp)$/;" f file: v_at ../vi/v_at.c /^v_at(SCR *sp, VICMD *vp)$/;" f v_bmark ../vi/v_mark.c /^v_bmark(SCR *sp, VICMD *vp)$/;" f v_bottom ../vi/v_scroll.c /^v_bottom(SCR *sp, VICMD *vp)$/;" f v_buildps ../vi/v_paragraph.c /^v_buildps(SCR *sp, char *p_p, char *s_p)$/;" f v_c_settop ../vi/v_event.c /^v_c_settop(SCR *sp, VICMD *vp)$/;" f file: v_cfirst ../vi/v_left.c /^v_cfirst(SCR *sp, VICMD *vp)$/;" f v_chF ../vi/v_ch.c /^v_chF(SCR *sp, VICMD *vp)$/;" f v_chT ../vi/v_ch.c /^v_chT(SCR *sp, VICMD *vp)$/;" f v_change ../vi/v_itxt.c /^v_change(SCR *sp, VICMD *vp)$/;" f v_chf ../vi/v_ch.c /^v_chf(SCR *sp, VICMD *vp)$/;" f v_chrepeat ../vi/v_ch.c /^v_chrepeat(SCR *sp, VICMD *vp)$/;" f v_chrrepeat ../vi/v_ch.c /^v_chrrepeat(SCR *sp, VICMD *vp)$/;" f v_cht ../vi/v_ch.c /^v_cht(SCR *sp, VICMD *vp)$/;" f v_cmd ../vi/vi.c /^v_cmd(SCR *sp, VICMD *dp, VICMD *vp, VICMD *ismotion, int *comcountp, int *mappedp)$/;" f file: v_comlog ../vi/vi.c /^v_comlog(sp, vp)$/;" f file: v_correct ../vi/v_search.c /^v_correct(SCR *sp, VICMD *vp, int isdelta)$/;" f v_count ../vi/vi.c /^v_count(SCR *sp, VICMD *vp, ARG_CHAR_T fkey, u_long *countp)$/;" f file: v_cr ../vi/v_scroll.c /^v_cr(SCR *sp, VICMD *vp)$/;" f v_curword ../vi/vi.c /^v_curword(SCR *sp)$/;" f v_delete ../vi/v_delete.c /^v_delete(SCR *sp, VICMD *vp)$/;" f v_dollar ../vi/v_right.c /^v_dollar(SCR *sp, VICMD *vp)$/;" f v_down ../vi/v_scroll.c /^v_down(SCR *sp, VICMD *vp)$/;" f v_dtoh ../vi/vi.c /^v_dtoh(SCR *sp)$/;" f file: v_ecl ../vi/v_ex.c /^v_ecl(SCR *sp)$/;" f file: v_ecl_exec ../vi/v_ex.c /^v_ecl_exec(SCR *sp)$/;" f v_ecl_init ../vi/v_ex.c /^v_ecl_init(SCR *sp)$/;" f file: v_ecl_log ../vi/v_ex.c /^v_ecl_log(SCR *sp, TEXT *tp)$/;" f file: v_edit ../vi/v_event.c /^v_edit(SCR *sp, VICMD *vp)$/;" f file: v_editopt ../vi/v_event.c /^v_editopt(SCR *sp, VICMD *vp)$/;" f file: v_editsplit ../vi/v_event.c /^v_editsplit(SCR *sp, VICMD *vp)$/;" f file: v_emark ../vi/v_mark.c /^v_emark(SCR *sp, VICMD *vp)$/;" f v_emsg ../vi/v_util.c /^v_emsg(SCR *sp, char *p, vim_t which)$/;" f v_eof ../vi/v_util.c /^v_eof(SCR *sp, MARK *mp)$/;" f v_eol ../vi/v_util.c /^v_eol(SCR *sp, MARK *mp)$/;" f v_erepaint ../vi/v_event.c /^v_erepaint(SCR *sp, EVENT *evp)$/;" f v_esearch ../vi/v_search.c /^v_esearch(SCR *sp, VICMD *vp)$/;" f v_estr ../common/main.c /^v_estr(char *name, int eno, char *msg)$/;" f file: v_event ../vi/v_event.c /^v_event(SCR *sp, VICMD *vp)$/;" f v_event_append ../common/key.c /^v_event_append(SCR *sp, EVENT *argp)$/;" f file: v_event_err ../common/key.c /^v_event_err(SCR *sp, EVENT *evp)$/;" f v_event_flush ../common/key.c /^v_event_flush(SCR *sp, u_int flags)$/;" f v_event_get ../common/key.c /^v_event_get(SCR *sp, EVENT *argp, int timeout, u_int32_t flags)$/;" f v_event_grow ../common/key.c /^v_event_grow(SCR *sp, int add)$/;" f file: v_event_push ../common/key.c /^v_event_push(SCR *sp, EVENT *p_evp, CHAR_T *p_s, size_t nitems, u_int flags)$/;" f v_ex ../vi/v_ex.c /^v_ex(SCR *sp, VICMD *vp)$/;" f v_ex_done ../vi/v_ex.c /^v_ex_done(SCR *sp, VICMD *vp)$/;" f file: v_exaddr ../vi/v_search.c /^v_exaddr(SCR *sp, VICMD *vp, dir_t dir)$/;" f file: v_exec_ex ../vi/v_ex.c /^v_exec_ex(SCR *sp, VICMD *vp, EXCMD *exp)$/;" f v_exmode ../vi/v_ex.c /^v_exmode(SCR *sp, VICMD *vp)$/;" f v_filter ../vi/v_ex.c /^v_filter(SCR *sp, VICMD *vp)$/;" f v_first ../vi/v_left.c /^v_first(SCR *sp, VICMD *vp)$/;" f v_fmark ../vi/v_mark.c /^v_fmark(SCR *sp, VICMD *vp)$/;" f v_home ../vi/v_scroll.c /^v_home(SCR *sp, VICMD *vp)$/;" f v_hpagedown ../vi/v_scroll.c /^v_hpagedown(SCR *sp, VICMD *vp)$/;" f v_hpageup ../vi/v_scroll.c /^v_hpageup(SCR *sp, VICMD *vp)$/;" f v_iA ../vi/v_itxt.c /^v_iA(SCR *sp, VICMD *vp)$/;" f v_iI ../vi/v_itxt.c /^v_iI(SCR *sp, VICMD *vp)$/;" f v_iO ../vi/v_itxt.c /^v_iO(SCR *sp, VICMD *vp)$/;" f v_ia ../vi/v_itxt.c /^v_ia(SCR *sp, VICMD *vp)$/;" f v_ii ../vi/v_itxt.c /^v_ii(SCR *sp, VICMD *vp)$/;" f v_increment ../vi/v_increment.c /^v_increment(SCR *sp, VICMD *vp)$/;" f v_init ../vi/vi.c /^v_init(SCR *sp)$/;" f file: v_io ../vi/v_itxt.c /^v_io(SCR *sp, VICMD *vp)$/;" f v_isempty ../vi/v_util.c /^v_isempty(CHAR_T *p, size_t len)$/;" f v_join ../vi/v_ex.c /^v_join(SCR *sp, VICMD *vp)$/;" f v_key ../vi/vi.c /^v_key(SCR *sp, VICMD *vp, int events_ok, u_int32_t ec_flags)$/;" f file: v_key_cmp ../common/key.c /^v_key_cmp(const void *ap, const void *bp)$/;" f file: v_key_ilookup ../common/key.c /^v_key_ilookup(SCR *sp)$/;" f v_key_init ../common/key.c /^v_key_init(SCR *sp)$/;" f v_key_len ../common/key.c /^v_key_len(SCR *sp, ARG_CHAR_T ch)$/;" f v_key_name ../common/key.c /^v_key_name(SCR *sp, ARG_CHAR_T ach)$/;" f v_key_val ../common/key.c /^v_key_val(SCR *sp, ARG_CHAR_T ch)$/;" f v_keyval ../common/key.c /^v_keyval(SCR *sp, int val, scr_keyval_t name)$/;" f file: v_left ../vi/v_left.c /^v_left(SCR *sp, VICMD *vp)$/;" f v_lgoto ../vi/v_scroll.c /^v_lgoto(SCR *sp, VICMD *vp)$/;" f v_linedown ../vi/v_scroll.c /^v_linedown(SCR *sp, VICMD *vp)$/;" f v_lineup ../vi/v_scroll.c /^v_lineup(SCR *sp, VICMD *vp)$/;" f v_mark ../vi/v_mark.c /^v_mark(SCR *sp, VICMD *vp)$/;" f v_match ../vi/v_match.c /^v_match(SCR *sp, VICMD *vp)$/;" f v_middle ../vi/v_scroll.c /^v_middle(SCR *sp, VICMD *vp)$/;" f v_motion ../vi/vi.c /^v_motion(SCR *sp, VICMD *dm, VICMD *vp, int *mappedp)$/;" f file: v_mulcase ../vi/v_ulcase.c /^v_mulcase(SCR *sp, VICMD *vp)$/;" f v_ncol ../vi/v_left.c /^v_ncol(SCR *sp, VICMD *vp)$/;" f v_nomove ../vi/v_util.c /^v_nomove(SCR *sp)$/;" f v_obsolete ../common/main.c /^v_obsolete(char *name, char **argv)$/;" f file: v_optchange ../vi/v_init.c /^v_optchange(SCR *sp, int offset, char *str, u_long *valp)$/;" f v_pagedown ../vi/v_scroll.c /^v_pagedown(SCR *sp, VICMD *vp)$/;" f v_pageup ../vi/v_scroll.c /^v_pageup(SCR *sp, VICMD *vp)$/;" f v_paragraphb ../vi/v_paragraph.c /^v_paragraphb(SCR *sp, VICMD *vp)$/;" f v_paragraphf ../vi/v_paragraph.c /^v_paragraphf(SCR *sp, VICMD *vp)$/;" f v_put ../vi/v_put.c /^v_put(SCR *sp, VICMD *vp)$/;" f v_quit ../vi/v_event.c /^v_quit(SCR *sp, VICMD *vp)$/;" f file: v_redraw ../vi/v_redraw.c /^v_redraw(SCR *sp, VICMD *vp)$/;" f v_replace ../vi/v_replace.c /^v_replace(SCR *sp, VICMD *vp)$/;" f v_right ../vi/v_right.c /^v_right(SCR *sp, VICMD *vp)$/;" f v_screen ../vi/v_screen.c /^v_screen(SCR *sp, VICMD *vp)$/;" f v_screen_copy ../vi/v_init.c /^v_screen_copy(SCR *orig, SCR *sp)$/;" f v_screen_end ../vi/v_init.c /^v_screen_end(SCR *sp)$/;" f v_search ../vi/v_search.c /^v_search(SCR *sp, VICMD *vp, CHAR_T *ptrn, size_t plen, u_int flags, dir_t dir)$/;" f file: v_searchN ../vi/v_search.c /^v_searchN(SCR *sp, VICMD *vp)$/;" f v_searchb ../vi/v_search.c /^v_searchb(SCR *sp, VICMD *vp)$/;" f v_searchf ../vi/v_search.c /^v_searchf(SCR *sp, VICMD *vp)$/;" f v_searchn ../vi/v_search.c /^v_searchn(SCR *sp, VICMD *vp)$/;" f v_searchw ../vi/v_search.c /^v_searchw(SCR *sp, VICMD *vp)$/;" f v_sectionb ../vi/v_section.c /^v_sectionb(SCR *sp, VICMD *vp)$/;" f v_sectionf ../vi/v_section.c /^v_sectionf(SCR *sp, VICMD *vp)$/;" f v_sel_end ../vi/v_event.c /^v_sel_end(SCR *sp, EVENT *evp)$/;" f v_sel_start ../vi/v_event.c /^v_sel_start(SCR *sp, EVENT *evp)$/;" f v_sentenceb ../vi/v_sentence.c /^v_sentenceb(SCR *sp, VICMD *vp)$/;" f v_sentencef ../vi/v_sentence.c /^v_sentencef(SCR *sp, VICMD *vp)$/;" f v_shiftl ../vi/v_ex.c /^v_shiftl(SCR *sp, VICMD *vp)$/;" f v_shiftr ../vi/v_ex.c /^v_shiftr(SCR *sp, VICMD *vp)$/;" f v_sof ../vi/v_util.c /^v_sof(SCR *sp, MARK *mp)$/;" f v_sol ../vi/v_util.c /^v_sol(SCR *sp)$/;" f v_status ../vi/v_status.c /^v_status(SCR *sp, VICMD *vp)$/;" f v_strdup ../common/util.c /^v_strdup(SCR *sp, const char *str, size_t len)$/;" f v_subst ../vi/v_itxt.c /^v_subst(SCR *sp, VICMD *vp)$/;" f v_suspend ../vi/v_ex.c /^v_suspend(SCR *sp, VICMD *vp)$/;" f v_switch ../vi/v_ex.c /^v_switch(SCR *sp, VICMD *vp)$/;" f v_sync ../common/key.c /^v_sync(SCR *sp, int flags)$/;" f file: v_tag ../vi/v_event.c /^v_tag(SCR *sp, VICMD *vp)$/;" f file: v_tagas ../vi/v_event.c /^v_tagas(SCR *sp, VICMD *vp)$/;" f file: v_tagpop ../vi/v_ex.c /^v_tagpop(SCR *sp, VICMD *vp)$/;" f v_tagpush ../vi/v_ex.c /^v_tagpush(SCR *sp, VICMD *vp)$/;" f v_tagsplit ../vi/v_event.c /^v_tagsplit(SCR *sp, VICMD *vp)$/;" f file: v_tcmd ../vi/v_txt.c /^v_tcmd(SCR *sp, VICMD *vp, ARG_CHAR_T prompt, u_int flags)$/;" f v_txt ../vi/v_txt.c /^v_txt(SCR *sp, VICMD *vp, MARK *tm, const CHAR_T *lp, size_t len, ARG_CHAR_T prompt, db_recno_t ai_line, u_long rcount, u_int32_t flags)$/;" f v_txt_auto ../vi/v_txt.c /^v_txt_auto(SCR *sp, db_recno_t lno, TEXT *aitp, size_t len, TEXT *tp)$/;" f v_ulcase ../vi/v_ulcase.c /^v_ulcase(SCR *sp, VICMD *vp)$/;" f v_undo ../vi/v_undo.c /^v_undo(SCR *sp, VICMD *vp)$/;" f v_up ../vi/v_scroll.c /^v_up(SCR *sp, VICMD *vp)$/;" f v_wordB ../vi/v_word.c /^v_wordB(SCR *sp, VICMD *vp)$/;" f v_wordE ../vi/v_word.c /^v_wordE(SCR *sp, VICMD *vp)$/;" f v_wordW ../vi/v_word.c /^v_wordW(SCR *sp, VICMD *vp)$/;" f v_wordb ../vi/v_word.c /^v_wordb(SCR *sp, VICMD *vp)$/;" f v_worde ../vi/v_word.c /^v_worde(SCR *sp, VICMD *vp)$/;" f v_wordw ../vi/v_word.c /^v_wordw(SCR *sp, VICMD *vp)$/;" f v_wq ../vi/v_event.c /^v_wq(SCR *sp, VICMD *vp)$/;" f file: v_write ../vi/v_event.c /^v_write(SCR *sp, VICMD *vp)$/;" f file: v_writeas ../vi/v_event.c /^v_writeas(SCR *sp, VICMD *vp)$/;" f file: v_wstrdup ../common/util.c /^v_wstrdup(SCR *sp, const CHAR_T *str, size_t len)$/;" f v_xchar ../vi/v_xchar.c /^v_xchar(SCR *sp, VICMD *vp)$/;" f v_yank ../vi/v_yank.c /^v_yank(SCR *sp, VICMD *vp)$/;" f v_z ../vi/v_z.c /^v_z(SCR *sp, VICMD *vp)$/;" f v_zero ../vi/v_left.c /^v_zero(SCR *sp, VICMD *vp)$/;" f v_zexit ../vi/v_zexit.c /^v_zexit(SCR *sp, VICMD *vp)$/;" f vadj ../gtk/gtkviscreen.h /^ GtkAdjustment *vadj;$/;" m struct:_GtkViScreen val ../common/options.h /^ u_long val; \/* Value or boolean. *\/$/;" m union:_option:: val1 ../ipc/ip.h /^ u_int32_t val1; \/* Value #1. *\/$/;" m struct:_ip_buf val2 ../ipc/ip.h /^ u_int32_t val2; \/* Value #2. *\/$/;" m struct:_ip_buf val3 ../ipc/ip.h /^ u_int32_t val3; \/* Value #3. *\/$/;" m struct:_ip_buf value ../cl/cl_term.c /^ u_char value; \/* Special value (for lookup). *\/$/;" m struct:_tklist file: value ../common/key.h /^ e_key_t value; \/* Special value. *\/$/;" m struct:_keylist value ../motif/m_cde.c /^ int value;$/;" m struct: file: value ../motif_l/m_motif.h /^ void *value; \/* Current option value. *\/$/;" m struct: value ../motif_l/m_motif.h /^ void *value;$/;" m struct: value_changed ../gtk/gtk.h /^ gint value_changed;$/;" m struct: value_changed ../gtk/gtkviwindow.h /^ gint value_changed;$/;" m struct:_GtkViWindow value_changed ../motif_l/m_search.c /^static void value_changed( Widget w, void *ptr, void *ptr2 )$/;" f file: vb ../cl/cl_bsd.c /^static char *vb; \/* Visible bell string. *\/$/;" v file: vi ../gtk/gtk.h /^ GtkViScreen *vi;$/;" m struct: vi ../gtk/gtkviwindow.h /^ GtkVi *vi;$/;" m struct:_GtkViWindow vi ../vi/vi.c /^vi(SCR **spp)$/;" f vi_AUTO_H ../common/vi_auto.h 4;" d vi_addstr ../gtk/gtkviwindow.c /^vi_addstr(ipviwin, str, len)$/;" f file: vi_addstr ../motif_l/m_func.c /^vi_addstr(int ipvi, char *str1, u_int32_t len1)$/;" f file: vi_adjustment_value_changed ../gtk/gtkviwindow.c /^vi_adjustment_value_changed (adjustment, ipviwin)$/;" f file: vi_attribute ../gtk/gtkviwindow.c /^vi_attribute(ipviwin,attribute,on)$/;" f file: vi_attribute ../motif_l/m_func.c /^vi_attribute(int ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_bell ../gtk/gtkviwindow.c /^vi_bell(ipbp)$/;" f file: vi_bell ../motif_l/m_func.c /^vi_bell(int ipvi)$/;" f file: vi_busyoff ../gtk/gtkviwindow.c /^vi_busyoff(ipbp)$/;" f file: vi_busyoff ../motif_l/m_func.c /^vi_busyoff(int ipvi)$/;" f file: vi_busyon ../gtk/gtkviwindow.c /^vi_busyon (IPVIWIN* ipviwin, const char *a, u_int32_t s)$/;" f file: vi_busyon ../motif_l/m_func.c /^vi_busyon(int ipvi, char *str1, u_int32_t len1)$/;" f file: vi_c_bol ../ipc/ipc_gen.c /^vi_c_bol(IPVIWIN *ipvi)$/;" f file: vi_c_bottom ../ipc/ipc_gen.c /^vi_c_bottom(IPVIWIN *ipvi)$/;" f file: vi_c_del ../ipc/ipc_gen.c /^vi_c_del(IPVIWIN *ipvi)$/;" f file: vi_c_down ../ipc/ipc_gen.c /^vi_c_down(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_c_eol ../ipc/ipc_gen.c /^vi_c_eol(IPVIWIN *ipvi)$/;" f file: vi_c_insert ../ipc/ipc_gen.c /^vi_c_insert(IPVIWIN *ipvi)$/;" f file: vi_c_left ../ipc/ipc_gen.c /^vi_c_left(IPVIWIN *ipvi)$/;" f file: vi_c_pgdown ../ipc/ipc_gen.c /^vi_c_pgdown(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_c_pgup ../ipc/ipc_gen.c /^vi_c_pgup(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_c_right ../ipc/ipc_gen.c /^vi_c_right(IPVIWIN *ipvi)$/;" f file: vi_c_search ../ipc/ipc_gen.c /^vi_c_search(IPVIWIN *ipvi, const char *stra, u_int32_t lena, u_int32_t val1)$/;" f file: vi_c_settop ../ipc/ipc_gen.c /^vi_c_settop(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_c_top ../ipc/ipc_gen.c /^vi_c_top(IPVIWIN *ipvi)$/;" f file: vi_c_up ../ipc/ipc_gen.c /^vi_c_up(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_close ../ipc/ipc_method.c /^static int vi_close(IPVI *ipvi)$/;" f file: vi_clrtoeol ../gtk/gtkviwindow.c /^vi_clrtoeol(ipviwin)$/;" f file: vi_clrtoeol ../motif_l/m_func.c /^vi_clrtoeol(int ipvi)$/;" f file: vi_create ../ipc/ipc_method.c /^vi_create(IPVI **ipvip, u_int32_t flags)$/;" f vi_create_editor ../motif_l/m_vi.c /^vi_create_editor(String name, Widget parent, void (*exitp) (void))$/;" f vi_create_menubar ../motif_l/m_menu.c /^vi_create_menubar(Widget parent)$/;" f vi_db_init_recover ../common/vi_rec.c /^vi_db_init_recover(DB_ENV *dbenv)$/;" f vi_deleteln ../gtk/gtkviwindow.c /^vi_deleteln(ipviwin)$/;" f file: vi_deleteln ../motif_l/m_func.c /^vi_deleteln(int ipvi)$/;" f file: vi_destroyed ../gtk/gtk_main.c /^vi_destroyed(GtkWidget *vi, GtkWidget *window)$/;" f file: vi_discard ../gtk/gtkviwindow.c /^vi_discard(ipbp)$/;" f file: vi_discard ../motif_l/m_func.c /^vi_discard(int ipvi)$/;" f file: vi_edit ../ipc/ipc_gen.c /^vi_edit(IPVIWIN *ipvi, const char *stra, u_int32_t lena)$/;" f file: vi_editopt ../gtk/gtkviwindow.c /^vi_editopt (IPVIWIN* a, const char *b, u_int32_t c,$/;" f file: vi_editopt ../ipc/ipc_gen.c /^vi_editopt(IPVIWIN *ipvi, const char *stra, u_int32_t lena, const char *strb, u_int32_t lenb, u_int32_t val1)$/;" f file: vi_editsplit ../ipc/ipc_gen.c /^vi_editsplit(IPVIWIN *ipvi, const char *stra, u_int32_t lena)$/;" f file: vi_enter ../cl/cl.h /^ struct termios vi_enter;\/* Terminal values to enter vi. *\/$/;" m struct:_cl_private vi_eof ../ipc/ipc_gen.c /^vi_eof(IPVIWIN *ipvi)$/;" f file: vi_err ../ipc/ipc_gen.c /^vi_err(IPVIWIN *ipvi)$/;" f file: vi_ex_init ../gtk/gtkviwindow.c /^vi_ex_init(ipviwin)$/;" f file: vi_fatal_message ../motif_l/m_prompt.c /^void vi_fatal_message(Widget parent, String str)$/;" f vi_flags ../ipc/ipc_gen.c /^vi_flags(IPVIWIN *ipvi, u_int32_t val1)$/;" f file: vi_ifd ../motif/m_main.c /^int vi_ifd = -1;$/;" v vi_info_message ../motif_l/m_prompt.c /^void vi_info_message(Widget parent, String str)$/;" f vi_init_window ../gtk/gtkviwindow.c /^vi_init_window (GtkViWindow *window, int fd)$/;" f file: vi_input ../ipc/ip_trans.c /^vi_input(IPVIWIN *ipviwin, int fd)$/;" f vi_input_func ../gtk/gtkviwindow.c /^vi_input_func (gpointer data, gint source, GdkInputCondition condition)$/;" f file: vi_input_func ../motif_l/m_vi.c /^vi_input_func(XtPointer client_data, int *source, XtInputId *id)$/;" f vi_insertln ../gtk/gtkviwindow.c /^vi_insertln(ipviwin)$/;" f file: vi_insertln ../motif_l/m_func.c /^vi_insertln(int ipvi)$/;" f file: vi_interrupt ../ipc/ipc_gen.c /^vi_interrupt(IPVIWIN *ipvi)$/;" f file: vi_key_press_event ../gtk/gtkviwindow.c /^vi_key_press_event(vi_screen, event, vi)$/;" f file: vi_log_get ../common/log.c /^vi_log_get(SCR *sp, db_recno_t *lnop, size_t *size)$/;" f file: vi_log_get ../common/vi_rec.c /^vi_log_get(SCR *sp, DB_LOGC *logc, DBT *data, u_int32_t which)$/;" f file: vi_map ../gtk/gtkviwindow.c /^vi_map(table, vi_screen)$/;" f file: vi_mouse_move ../ipc/ipc_gen.c /^vi_mouse_move(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_move ../gtk/gtkviwindow.c /^vi_move(ipviwin, row, col)$/;" f file: vi_move ../motif_l/m_func.c /^vi_move(int ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_new_window ../ipc/ipc_method.c /^vi_new_window (IPVI *ipvi, IPVIWIN **ipviwinp, int fd)$/;" f file: vi_nothread_lock ../common/nothread.c /^vi_nothread_lock (WIN * wp, void **lp)$/;" f file: vi_nothread_run ../common/nothread.c /^vi_nothread_run(WIN *wp, void *(*fun)(void*), void *data)$/;" f file: vi_ofd ../motif/m_main.c /^int vi_ofd = -1;$/;" v vi_private ../common/screen.h /^ void *vi_private; \/* Vi private area. *\/$/;" m struct:_scr vi_progname ../ipc/ip_run.c /^char *vi_progname = "vi"; \/* Global: program name. *\/$/;" v vi_pthread_lock_end ../common/pthread.c /^vi_pthread_lock_end (WIN * wp, void **p)$/;" f file: vi_pthread_lock_init ../common/pthread.c /^vi_pthread_lock_init (WIN * wp, void **p)$/;" f file: vi_pthread_lock_try ../common/pthread.c /^vi_pthread_lock_try (WIN * wp, void **p)$/;" f file: vi_pthread_lock_unlock ../common/pthread.c /^vi_pthread_lock_unlock (WIN * wp, void **p)$/;" f file: vi_pthread_run ../common/pthread.c /^vi_pthread_run(WIN *wp, void *(*fun)(void*), void *data)$/;" f file: vi_quit ../gtk/gtk_main.c /^vi_quit(GtkViWindow *vi, gint write)$/;" f file: vi_quit ../gtk/gtkviwindow.c /^vi_quit(ipviwin)$/;" f file: vi_quit ../ipc/ipc_gen.c /^vi_quit(IPVIWIN *ipvi)$/;" f file: vi_quit ../motif_l/m_func.c /^vi_quit(int ipvi)$/;" f file: vi_redraw ../gtk/gtkviwindow.c /^vi_redraw(ipviwin)$/;" f file: vi_redraw ../motif_l/m_func.c /^vi_redraw(int ipvi)$/;" f file: vi_refresh ../gtk/gtkviwindow.c /^vi_refresh(ipviwin)$/;" f file: vi_refresh ../motif_l/m_func.c /^vi_refresh(int ipvi)$/;" f file: vi_rename ../gtk/gtk_main.c /^vi_rename(GtkWidget *vi, gchar *name, GtkWidget *window)$/;" f file: vi_rename ../gtk/gtkviwindow.c /^vi_rename(ipviwin, str, len)$/;" f file: vi_rename ../motif_l/m_func.c /^vi_rename(int ipvi, char *str1, u_int32_t len1)$/;" f file: vi_resize ../ipc/ipc_gen.c /^vi_resize(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_resized ../gtk/gtkviwindow.c /^vi_resized(vi_screen, rows, cols, ipviwin)$/;" f file: vi_rewrite ../gtk/gtkviwindow.c /^vi_rewrite(ipviwin, row)$/;" f file: vi_rewrite ../motif_l/m_func.c /^vi_rewrite(int ipvi, u_int32_t val1)$/;" f file: vi_run ../ipc/ip_run.c /^vi_run(ipvi, argc, argv)$/;" f vi_screen ../gtk/gtkviwindow.h /^ GtkWidget *vi_screen;$/;" m struct:_GtkViWindow vi_screen_signals ../gtk/gtkviscreen.c /^static guint vi_screen_signals[LAST_SIGNAL] = { 0 };$/;" v file: vi_scrollbar ../gtk/gtkviwindow.c /^vi_scrollbar(ipviwin, top, size, max)$/;" f file: vi_scrollbar ../motif_l/m_func.c /^vi_scrollbar(int ipvi, u_int32_t val1, u_int32_t val2, u_int32_t val3)$/;" f file: vi_sel_end ../ipc/ipc_gen.c /^vi_sel_end(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_sel_start ../ipc/ipc_gen.c /^vi_sel_start(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2)$/;" f file: vi_select ../gtk/gtkviwindow.c /^static int vi_select (IPVIWIN* a, const char * b, u_int32_t c)$/;" f file: vi_select ../motif_l/m_func.c /^vi_select(int ipvi, char *str1, u_int32_t len1)$/;" f file: vi_send ../ipc/ip_send.c /^vi_send(int ofd, char *fmt, IP_BUF *ipbp)$/;" f vi_send_ ../ipc/ipc_method.c /^vi_send_(IPVIWIN *ipvi, int code)$/;" f file: vi_send_1 ../ipc/ipc_method.c /^vi_send_1(IPVIWIN *ipvi, int code, u_int32_t val)$/;" f file: vi_send_12 ../ipc/ipc_method.c /^vi_send_12(IPVIWIN *ipvi, int code, u_int32_t val1, u_int32_t val2)$/;" f file: vi_send_a ../ipc/ipc_method.c /^vi_send_a(IPVIWIN *ipvi, int code, const char *str, u_int32_t len)$/;" f file: vi_send_a1 ../ipc/ipc_method.c /^vi_send_a1(IPVIWIN *ipvi, int code, const char *str, u_int32_t len, $/;" f file: vi_send_ab1 ../ipc/ipc_method.c /^vi_send_ab1(IPVIWIN *ipvi, int code, const char *str1, u_int32_t len1, $/;" f file: vi_set_ops ../ipc/ipc_method.c /^vi_set_ops(IPVIWIN *ipvi, IPSIOPS *ops)$/;" f file: vi_sighup ../ipc/ipc_gen.c /^vi_sighup(IPVIWIN *ipvi)$/;" f file: vi_sigterm ../ipc/ipc_gen.c /^vi_sigterm(IPVIWIN *ipvi)$/;" f file: vi_split ../gtk/gtkviwindow.c /^vi_split(ipbp)$/;" f file: vi_split ../motif_l/m_func.c /^vi_split(int ipvi)$/;" f file: vi_string ../ipc/ipc_gen.c /^vi_string(IPVIWIN *ipvi, const char *stra, u_int32_t lena)$/;" f file: vi_tag ../ipc/ipc_gen.c /^vi_tag(IPVIWIN *ipvi)$/;" f file: vi_tagas ../ipc/ipc_gen.c /^vi_tagas(IPVIWIN *ipvi, const char *stra, u_int32_t lena)$/;" f file: vi_tagsplit ../ipc/ipc_gen.c /^vi_tagsplit(IPVIWIN *ipvi)$/;" f file: vi_translate ../ipc/ip_trans.c /^vi_translate(IPVIWIN *ipviwin, char *bp, size_t *lenp, IP_BUF *ipbp)$/;" f vi_undo ../ipc/ipc_gen.c /^vi_undo(IPVIWIN *ipvi)$/;" f file: vi_vi_init ../gtk/gtkviwindow.c /^vi_vi_init(ipviwin)$/;" f file: vi_waddstr ../gtk/gtkviwindow.c /^vi_waddstr(ipviwin, str, len)$/;" f file: vi_win_close ../ipc/ipc_method.c /^static int vi_win_close(IPVIWIN *ipviwin)$/;" f file: vi_window_signals ../gtk/gtkviwindow.c /^static guint vi_window_signals[LAST_SIGNAL] = { 0 };$/;" v file: vi_wq ../ipc/ipc_gen.c /^vi_wq(IPVIWIN *ipvi)$/;" f file: vi_write ../ipc/ipc_gen.c /^vi_write(IPVIWIN *ipvi)$/;" f file: vi_writeas ../ipc/ipc_gen.c /^vi_writeas(IPVIWIN *ipvi, const char *stra, u_int32_t lena)$/;" f file: vi_wsend ../ipc/ip_trans.c /^vi_wsend(IPVIWIN *ipviwin, char *fmt, IP_BUF *ipbp)$/;" f vikeys ../vi/v_cmd.c /^VIKEYS const vikeys [MAXVIKEY + 1] = {$/;" v vim_t ../vi/vi.h /^} vim_t;$/;" t vipfuns ../ip/ip_read.c /^VIPFUNLIST const vipfuns[] = {$/;" v vs_bg ../vi/vs_split.c /^vs_bg(SCR *sp)$/;" f vs_busy ../vi/vs_msg.c /^vs_busy(SCR *sp, const char *msg, busy_t btype)$/;" f vs_change ../vi/vs_smap.c /^vs_change(SCR *sp, db_recno_t lno, lnop_t op)$/;" f vs_colpos ../vi/vs_relative.c /^vs_colpos(SCR *sp, db_recno_t lno, size_t cno)$/;" f vs_column ../vi/vs_relative.c /^vs_column(SCR *sp, size_t *colp)$/;" f vs_columns ../vi/vs_relative.c /^vs_columns(SCR *sp, CHAR_T *lp, db_recno_t lno, size_t *cnop, size_t *diffp)$/;" f vs_crel ../vi/v_z.c /^vs_crel(SCR *sp, long int count)$/;" f vs_deleteln ../vi/vs_smap.c /^vs_deleteln(SCR *sp, int cnt)$/;" f file: vs_discard ../vi/vs_split.c /^vs_discard(SCR *sp, SCR **spp)$/;" f vs_divider ../vi/vs_msg.c /^vs_divider(SCR *sp)$/;" f file: vs_ex_resolve ../vi/vs_msg.c /^vs_ex_resolve(SCR *sp, int *continuep)$/;" f vs_fg ../vi/vs_split.c /^vs_fg(SCR *sp, SCR **nspp, CHAR_T *name, int newscreen)$/;" f vs_getbg ../vi/vs_split.c /^vs_getbg(SCR *sp, char *name)$/;" f file: vs_home ../vi/vs_msg.c /^vs_home(SCR *sp)$/;" f vs_insert ../vi/vs_split.c /^vs_insert(SCR *sp, WIN *wp)$/;" f file: vs_insertln ../vi/vs_smap.c /^vs_insertln(SCR *sp, int cnt)$/;" f file: vs_join ../vi/vs_split.c /^vs_join(SCR *sp, SCR **listp, jdir_t *jdirp)$/;" f file: vs_line ../vi/vs_line.c /^vs_line(SCR *sp, SMAP *smp, size_t *yp, size_t *xp)$/;" f vs_modeline ../vi/vs_refresh.c /^vs_modeline(SCR *sp)$/;" f file: vs_msg ../vi/vs_msg.c /^vs_msg(SCR *sp, mtype_t mtype, char *line, size_t len)$/;" f vs_msgsave ../vi/vs_msg.c /^vs_msgsave(SCR *sp, mtype_t mt, char *p, size_t len)$/;" f file: vs_number ../vi/vs_line.c /^vs_number(SCR *sp)$/;" f vs_output ../vi/vs_msg.c /^vs_output(SCR *sp, mtype_t mtype, const char *line, int llen)$/;" f file: vs_paint ../vi/vs_refresh.c /^vs_paint(SCR *sp, u_int flags)$/;" f file: vs_rcm ../vi/vs_relative.c /^vs_rcm(SCR *sp, db_recno_t lno, int islast)$/;" f vs_refresh ../vi/vs_refresh.c /^vs_refresh(SCR *sp, int forcepaint)$/;" f vs_resize ../vi/vs_split.c /^vs_resize(SCR *sp, long int count, adj_t adj)$/;" f vs_resolve ../vi/vs_msg.c /^vs_resolve(SCR *sp, SCR *csp, int forcewait)$/;" f vs_screens ../vi/vs_relative.c /^vs_screens(SCR *sp, db_recno_t lno, size_t *cnop)$/;" f vs_scroll ../vi/vs_msg.c /^vs_scroll(SCR *sp, int *continuep, sw_t wtype)$/;" f file: vs_sm_1down ../vi/vs_smap.c /^vs_sm_1down(SCR *sp)$/;" f vs_sm_1up ../vi/vs_smap.c /^vs_sm_1up(SCR *sp)$/;" f vs_sm_cursor ../vi/vs_smap.c /^vs_sm_cursor(SCR *sp, SMAP **smpp)$/;" f vs_sm_delete ../vi/vs_smap.c /^vs_sm_delete(SCR *sp, db_recno_t lno)$/;" f file: vs_sm_down ../vi/vs_smap.c /^vs_sm_down(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd, SMAP *smp)$/;" f file: vs_sm_erase ../vi/vs_smap.c /^vs_sm_erase(SCR *sp)$/;" f file: vs_sm_fill ../vi/vs_smap.c /^vs_sm_fill(SCR *sp, db_recno_t lno, pos_t pos)$/;" f vs_sm_insert ../vi/vs_smap.c /^vs_sm_insert(SCR *sp, db_recno_t lno)$/;" f file: vs_sm_next ../vi/vs_smap.c /^vs_sm_next(SCR *sp, SMAP *p, SMAP *t)$/;" f vs_sm_nlines ../vi/vs_smap.c /^vs_sm_nlines(SCR *sp, SMAP *from_sp, db_recno_t to_lno, size_t max)$/;" f vs_sm_position ../vi/vs_smap.c /^vs_sm_position(SCR *sp, MARK *rp, u_long cnt, pos_t pos)$/;" f vs_sm_prev ../vi/vs_smap.c /^vs_sm_prev(SCR *sp, SMAP *p, SMAP *t)$/;" f vs_sm_reset ../vi/vs_smap.c /^vs_sm_reset(SCR *sp, db_recno_t lno)$/;" f file: vs_sm_scroll ../vi/vs_smap.c /^vs_sm_scroll(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd)$/;" f vs_sm_up ../vi/vs_smap.c /^vs_sm_up(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd, SMAP *smp)$/;" f file: vs_split ../vi/vs_split.c /^vs_split(SCR *sp, SCR *new, int ccl)$/;" f vs_swap ../vi/vs_split.c /^vs_swap(SCR *sp, SCR **nspp, char *name)$/;" f vs_update ../vi/vs_msg.c /^vs_update(SCR *sp, const char *m1, const CHAR_T *m2)$/;" f vs_vsplit ../vi/vs_split.c /^vs_vsplit(SCR *sp, SCR *new)$/;" f vs_wait ../vi/vs_msg.c /^vs_wait(SCR *sp, int *continuep, sw_t wtype)$/;" f file: vtrace ../common/trace.c /^vtrace(const char *fmt, ...)$/;" f vtrace_end ../common/trace.c /^vtrace_end()$/;" f vtrace_init ../common/trace.c /^vtrace_init(name)$/;" f waddnstr ../cl/cl_bsd.c /^waddnstr(w, s, n)$/;" f waddstr ../ipc/ip.h /^ IPFunc_a waddstr;$/;" m struct:ip_si_operations wchar2char_t ../common/conv.h /^typedef int (*wchar2char_t) $/;" t which ../ex/ex_append.c /^enum which {APPEND, CHANGE, INSERT};$/;" g file: which ../ex/ex_global.c /^enum which {GLOBAL, V};$/;" g file: which ../ex/ex_shift.c /^enum which {LEFT, RIGHT};$/;" g file: which ../ex/ex_write.c /^enum which {WN, WQ, WRITE, XIT};$/;" g file: which ../vi/v_itxt.c /^enum which { o_cmd, O_cmd };$/;" g file: which ../vi/v_mark.c /^enum which {BQMARK, FQMARK};$/;" g file: which ../vi/v_word.c /^enum which {BIGWORD, LITTLEWORD};$/;" g file: widget ../gtk/gtkviscreen.h /^ GtkWidget widget;$/;" m struct:_GtkViScreen win_end ../common/gs.c /^win_end(WIN *wp)$/;" f win_toplevel ../gtk/gtk_main.c /^void win_toplevel(GtkViWindow *win)$/;" f file: window_unmapped ../motif_l/m_options.c /^static void window_unmapped(Widget w, XtPointer ptr, XEvent *ev, Boolean *cont)$/;" f file: wp ../common/screen.h /^ WIN *wp; \/* Pointer to window. *\/$/;" m struct:_scr wq ../ipc/ip.h /^ int (*wq) __P((IPVIWIN*));$/;" m struct:_ip_vi_win xexpose ../motif_l/m_vi.c /^static void xexpose ( Widget w,$/;" f file: ximage ../motif_l/xtabbed.c /^ XImage *ximage;$/;" m struct:rotated_text_item_template file: xmManager ../motif_l/xtabbed.c /^XmManagerConstraintPart xmManager;$/;" m struct:_XmTabsConstraintRec file: xmManager ../motif_l/xtabbed.c /^XmManagerPart xmManager;$/;" m struct:_XmTabsRec file: xmManager_class ../motif_l/xtabbed.c /^XmManagerClassPart xmManager_class;$/;" m struct:_XmTabsClassRec file: xmTabs ../motif_l/xtabbed.c /^XmTabsConstraintPart xmTabs;$/;" m struct:_XmTabsConstraintRec file: xmTabs ../motif_l/xtabbed.c /^XmTabsPart xmTabs;$/;" m struct:_XmTabsRec file: xmTabsClassRec ../motif_l/xtabbed.c /^XmTabsClassRec xmTabsClassRec = {$/;" v xmTabsWidgetClass ../motif_l/xtabbed.c /^WidgetClass xmTabsWidgetClass = (WidgetClass) &xmTabsClassRec;$/;" v xmTabs_class ../motif_l/xtabbed.c /^XmTabsClassPart xmTabs_class;$/;" m struct:_XmTabsClassRec file: xthickness ../gtk/gtkviscreen.h 13;" d xvi_screen ../motif_l/m_motif.h /^} xvi_screen;$/;" t ythickness ../gtk/gtkviscreen.h 14;" d nvi-1.81.6/dist/stamp-h.in0100644000076400001440000000000010720065713014304 0ustar skimousersnvi-1.81.6/docs/0040755000076400001440000000000010720065713012405 5ustar skimousersnvi-1.81.6/docs/README0100644000076400001440000000225610720065506013267 0ustar skimousers# $Id: README,v 8.1 1997/04/13 10:38:45 bostic Exp $ (Berkeley) $Date: 1997/04/13 10:38:45 $ [USD stands for "User's Supplementary Documents".] edit/ Roff source for "Edit: A tutorial". This document was USD:14 in the 4.3BSD manuals, but was not distributed with 4.4BSD. exref/ Roff source for "Ex Reference Manual -- Version 3.7". This document was USD:16 in the 4.3BSD manuals, and USD tabbed 12 in the 4.4BSD manuals. vi.man/ Roff source for a UNIX manual page for nex/nvi. An updated version of the 4.4BSD manual page. vi.ref/ Roff source for the nex/nvi reference document. An updated version of the 4.4BSD document, USD tabbed 13. vitut/ Roff source for "An Introduction to Display Editing with Vi". This document was USD:15 in the 4.3BSD manuals, but was not distributed with 4.4BSD. It includes the historic "Vi Quick Reference" card. PostScript preformatted versions of the nex/nvi reference manual and manual page are in the files named with a ".ps" suffix, in their respective source directories. Flat text preformatted versions of the nex/nvi reference manual and manual page are in the files named with a ".txt" suffix, in their respective source directories. nvi-1.81.6/docs/edit/0040755000076400001440000000000010720065714013333 5ustar skimousersnvi-1.81.6/docs/edit/Makefile0100644000076400001440000000064310720065506014772 0ustar skimousers# $Id: Makefile,v 8.6 2001/01/28 15:50:07 skimo Exp $ (Berkeley) $Date: 2001/01/28 15:50:07 $ ROFF= groff TBL= tbl all: edittut.ps ../html/edittut.html ../html/%.html: %.ms test -d ../html || mkdir ../html ${TBL} $< | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ %.ps: %.ms ${TBL} $< | ${ROFF} -ms > $@ chmod 444 $@ clean: rm -f edittut.ps ../html/edittut.html nvi-1.81.6/docs/edit/edittut.ms0100644000076400001440000017316210720065506015364 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: edittut.ms,v 8.3 1996/08/18 11:36:05 bostic Exp $ (Berkeley) $Date: 1996/08/18 11:36:05 $ .\" .ll 6.5i .nr LL 6.5i .EH 'USD:11-%''Edit: A Tutorial' .OH 'Edit: A Tutorial''USD:11-%' .LP .ds u \s-2UNIX\s0 .ND .sp 4 .ce \f3\s+2Edit: A Tutorial\s0\f1 .sp .ce 3 .I Ricki Blau .sp James Joyce .R .sp .ce 3 Computing Services University of California Berkeley, California 94720 .sp 3 .ce .I ABSTRACT .R .sp .LP This narrative introduction to the use of the text editor .I edit assumes no prior familiarity with computers or with text editing. Its aim is to lead the beginning \s-2UNIX\(dg\s+2 user through the .FS \(dgUNIX is a trademark of Bell Laboratories. .FE fundamental steps of writing and revising a file of text. Edit, a version of the text editor .I ex, was designed to provide an informative environment for new and casual users. .PP We welcome comments and suggestions about this tutorial and the \s-2UNIX\s+2 documentation in general. .sp .5v September 1981 .bp .ll 6.5i .nr LL 6.5i .nr LT 6.5i .ds u \s-2UNIX\s0 .ce \s+2\f3Contents\f1\s0 .LP .nf Introduction\ \ \ 3 .sp Session 1\ \ 4 .in +.5i Making contact with \s-2UNIX\s+2\ \ \ 4 Logging in\ \ 4 Asking for \fIedit\fR\ \ \ 4 The ``Command not found'' message\ \ \ 5 A summary\ \ 5 Entering text\ \ \ 5 Messages from \fIedit\fR\ \ \ 5 Text input mode\ \ \ 6 Making corrections\ \ \ 6 Writing text to disk\ \ \ 7 Signing off\ \ 7 .in -.5i .sp Session 2\ \ \ 8 .in +.5i Adding more text to the file\ \ \ 8 Interrupt\ \ \ 8 Making corrections\ \ \ 8 Listing what's in the buffer (p)\ \ \ 9 Finding things in the buffer\ \ \ 9 The current line\ \ \ 10 Numbering lines (nu)\ \ \ 10 Substitute command (s)\ \ \ 10 Another way to list what's in the buffer (z)\ \ \ 11 Saving the modified text\ \ \ 12 .in -.5i .sp Session 3\ \ \ 13 .in +.5i Bringing text into the buffer (e)\ \ \ 13 Moving text in the buffer (m)\ \ \ 13 Copying lines (copy)\ \ \ 14 Deleting lines (d)\ \ \ 14 A word or two of caution\ \ \ 15 Undo (u) to the rescue\ \ \ 15 More about the dot (.) and buffer end ($)\ \ \ 16 Moving around in the buffer (+ and \-)\ \ \ 16 Changing lines (c)\ \ \ 17 .in -.5i .sp Session 4\ \ \ 18 .in +.5i Making commands global (g)\ \ \ 18 More about searching and substituting\ \ \ 19 Special characters\ \ \ 19 Issuing \s-2UNIX\s+2 commands from the editor\ \ \ 20 Filenames and file manipulation\ \ \ 20 The file (f) command\ \ \ 20 Reading additional files (r)\ \ \ 21 Writing parts of the buffer\ \ \ 21 Recovering files\ \ \ 21 Other recovery techniques\ \ \ 21 Further reading and other information\ \ \ 22 Using \fIex\fR\ \ \ 22 .in -.5i .sp Index\ \ \ 23 .bp .SH .ce \s+2Introduction\s0 .PP Text editing using a terminal connected to a computer allows you to create, modify, and print text easily. A .I text editor .R is a program that assists you as you create and modify text. The text editor you will learn here is named .I edit. Creating text using edit is as easy as typing it on an electric typewriter. Modifying text involves telling the text editor what you want to add, change, or delete. You can review your text by typing a command to print the file contents as they are currently. Another program (which we do not discuss in this document), a text formatter, rearranges your text for you into ``finished form.'' .PP These lessons assume no prior familiarity with computers or with text editing. They consist of a series of text editing sessions which lead you through the fundamental steps of creating and revising text. After scanning each lesson and before beginning the next, you should try the examples at a terminal to get a feeling for the actual process of text editing. If you set aside some time for experimentation, you will soon become familiar with using the computer to write and modify text. In addition to the actual use of the text editor, other features of \s-2UNIX\s0 will be very important to your work. You can begin to learn about these other features by reading one of the other tutorials that provide a general introduction to the system. You will be ready to proceed with this lesson as soon as you are familiar with (1) your terminal and its special keys, (2) how to login, (3) and the ways of correcting typing errors. Let's first define some terms: .sp .5 .IP program 12 A set of instructions, given to the computer, describing the sequence of steps the computer performs in order to accomplish a specific task. The task must be specific, such as balancing your checkbook or editing your text. A general task, such as working for world peace, is something we can all do, but not something we can currently write programs to do. .IP UNIX \s-2UNIX\s0 is a special type of program, called an operating system, that supervises the machinery and all other programs comprising the total computer system. .IP edit .I edit is the name of the \s-2UNIX\s0 text editor you will be learning to use, and is a program that aids you in writing or revising text. Edit was designed for beginning users, and is a simplified version of an editor named .I ex. .IP file Each \s-2UNIX\s0 account is allotted space for the permanent storage of information, such as programs, data or text. A file is a logical unit of data, for example, an essay, a program, or a chapter from a book, which is stored on a computer system. Once you create a file, it is kept until you instruct the system to remove it. You may create a file during one \s-2UNIX\s0 session, end the session, and return to use it at a later time. Files contain anything you choose to write and store in them. The sizes of files vary to suit your needs; one file might hold only a single number, yet another might contain a very long document or program. The only way to save information from one session to the next is to store it in a file, which you will learn in Session 1. .IP filename Filenames are used to distinguish one file from another, serving the same purpose as the labels of manila folders in a file cabinet. In order to write or access information in a file, you use the name of that file in a \s-2UNIX\s0 command, and the system will automatically locate the file. .IP disk Files are stored on an input/output device called a disk, which looks something like a stack of phonograph records. Each surface is coated with a material similar to that on magnetic recording tape, and information is recorded on it. .IP buffer A temporary work space, made available to the user for the duration of a session of text editing and used for creating and modifying the text file. We can think of the buffer as a blackboard that is erased after each class, where each session with the editor is a class. .bp .SH .ce 1 \s+2Session 1\s0 .sp 1 .SH Making contact with \s-1UNIX\s0 .PP To use the editor you must first make contact with the computer by logging in to \s-2UNIX\s0. We'll quickly review the standard \s-2UNIX\s0 login procedure for the two ways you can make contact: on a terminal that is directly linked to the computer, or over a telephone line where the computer answers your call. .SH Directly-linked terminals .PP Turn on your terminal and press the \s-1RETURN\s0 key. You are now ready to login. .SH Dial-up terminals .PP If your terminal connects with the computer over a telephone line, turn on the terminal, dial the system access number, and, when you hear a high-pitched tone, place the telephone handset in the acoustic coupler, if you are using one. You are now ready to login. .SH Logging in .PP The message inviting you to login is: .DS I 1i login: .DE .LP Type your login name, which identifies you to \s-2UNIX\s0, on the same line as the login message, and press \s-2RETURN\s+2. If the terminal you are using has both upper and lower case, .B be sure you enter your login name in lower case; .R otherwise \s-2UNIX\s0 assumes your terminal has only upper case and will not recognize lower case letters you may type. \s-2UNIX\s0 types ``login:'' and you reply with your login name, for example ``susan'': .DS I 1i login: \fBsusan\fR \fI(and press the \s-2RETURN\s0 key)\fR .DE (In the examples, input you would type appears in .B "bold face" to distinguish it from the responses from \s-2UNIX\s0.) .PP \s-2UNIX\s0 will next respond with a request for a password as an additional precaution to prevent unauthorized people from using your account. The password will not appear when you type it, to prevent others from seeing it. The message is: .DS I 1i Password: \fI(type your password and press \s-2RETURN\s+2)\fR .DE If any of the information you gave during the login sequence was mistyped or incorrect, \s-2UNIX\s0 will respond with .DS I 1i Login incorrect. .if t .sp .2v .if n .sp 1 login: .DE in which case you should start the login process anew. Assuming that you have successfully logged in, \s-2UNIX\s0 will print the message of the day and eventually will present you with a % at the beginning of a fresh line. The % is the \s-2UNIX\s0 prompt symbol which tells you that \s-2UNIX\s0 is ready to accept a command. .bd I 3 .SH Asking for \fIedit\fP .fl .bd I .PP You are ready to tell \s-2UNIX\s0 that you want to work with edit, the text editor. Now is a convenient time to choose a name for the file of text you are about to create. To begin your editing session, type .B edit followed by a space and then the filename you have selected; for example, ``text''. After that, press the \s-2RETURN\s0 key and wait for edit's response: .DS I 1i % \fBedit text\fP \fI(followed by a \s-2RETURN\s+2)\fR "text" No such file or directory : .DE If you typed the command correctly, you will now be in communication with edit. Edit has set aside a buffer for use as a temporary working space during your current editing session. Since ``text'' is a new file we are about to create the editor was unable to find that file, which it confirms by saying: .DS I 1i "text" No such file or directory .DE On the next line appears edit's prompt ``:'', announcing that you are in \f2command mode\f1 and edit expects a command from you. You may now begin to create the new file. .SH The ``Command not found'' message .PP If you misspelled edit by typing, say, ``editor'', this might appear: .DS I 1i % \fBeditor\fP editor: Command not found % .DE Your mistake in calling edit ``editor'' was treated by \s-2UNIX\s0 as a request for a program named ``editor''. Since there is no program named ``editor'', \s-2UNIX\s0 reported that the program was ``not found''. A new % indicates that \s-2UNIX\s0 is ready for another command, and you may then enter the correct command. .SH A summary .PP Your exchange with \s-2UNIX\s0 as you logged in and made contact with edit should look something like this: .DS I 1i login: \fBsusan\fP Password: \&... A Message of General Interest ... % \fBedit text\fP "text" No such file or directory : .DE .SH Entering text .PP You may now begin entering text into the buffer. This is done by \fIappending\fP (or adding) text to whatever is currently in the buffer. Since there is nothing in the buffer at the moment, you are appending text to nothing; in effect, since you are adding text to nothing you are creating text. Most edit commands have two equivalent forms: a word that suggests what the command does, and a shorter abbreviation of that word. Many beginners find the full command names easier to remember at first, but once you are familiar with editing you may prefer to type the shorter abbreviations. The command to input text is ``append''. (It may be abbreviated ``a''.) Type .B append and press the \s-2RETURN\s0 key. .DS I 1i % \fBedit text \fR:\|\fBappend .R .DE .SH .bd I 3 Messages from .I edit .fl .bd I .PP If you make a mistake in entering a command and type something that edit does not recognize, edit will respond with a message intended to help you diagnose your error. For example, if you misspell the command to input text by typing, perhaps, ``add'' instead of ``append'' or ``a'', you will receive this message: .DS I 1i :\|\fBadd\fR add: Not an editor command : .DE When you receive a diagnostic message, check what you typed in order to determine what part of your command confused edit. The message above means that edit was unable to recognize your mistyped command and, therefore, did not execute it. Instead, a new ``:'' appeared to let you know that edit is again ready to execute a command. .SH Text input mode .PP By giving the command ``append'' (or using the abbreviation ``a''), you entered .I text input mode, .R also known as .I append mode. .R When you enter text input mode, edit stops sending you a prompt. You will not receive any prompts or error messages while in text input mode. You can enter pretty much anything you want on the lines. The lines are transmitted one by one to the buffer and held there during the editing session. You may append as much text as you want, and .I when you wish to stop entering text lines you should type a period as the only character on the line and press the \s-2RETURN\s0 key. .R When you type the period and press \s-2RETURN\s0, you signal that you want to stop appending text, and edit responds by allowing you to exit text input mode and reenter command mode. Edit will again prompt you for a command by printing ``:''. .PP Leaving append mode does not destroy the text in the buffer. You have to leave append mode to do any of the other kinds of editing, such as changing, adding, or printing text. If you type a period as the first character and type any other character on the same line, edit will believe you want to remain in append mode and will not let you out. As this can be very frustrating, be sure to type .B only the period and the \s-2RETURN\s0 key. .PP This is a good place to learn an important lesson about computers and text: a blank space is a character as far as a computer is concerned. If you so much as type a period followed by a blank (that is, type a period and then the space bar on the keyboard), you will remain in append mode with the last line of text being: .DS I 1i .B .ps +2 \&. .ps -2 .R .DE Let's say that you enter the lines (try to type .B exactly what you see, including ``thiss''): .DS I 1i .B This is some sample text. And thiss is some more text. Text editing is strange, but nice. \&. .R .DE The last line is the period followed by a \s-2RETURN\s0 that gets you out of append mode. .SH Making corrections .PP If you have read a general introduction to \s-2UNIX\s0, you will recall that it is possible to erase individual letters that you have typed. This is done by typing the designated erase character as many times as there are characters you want to erase. .PP The usual erase character varies from place to place and user to user. Often it is the backspace (control-H), so you can correct typing errors in the line you are typing by holding down the \s-1CTRL\s+1 key and typing the ``H'' key. (Sometimes it is the DEL key.) If you type the erase character you will notice that the terminal backspaces in the line you are on. You can backspace over your error, and then type what you want to be the rest of the line. .PP If you make a bad start in a line and would like to begin again, you can either backspace to the beginning of the line or you can use the at-sign ``@'' to erase everything on the line: .DS I 1i .B Text edtiing is strange, but@ Text editing is strange, but nice. .R .fl .bd S .DE When you type the at-sign (@), you erase the entire line typed so far and are given a fresh line to type on. You may immediately begin to retype the line. This, unfortunately, does not work after you type the line and press \s-2RETURN\s+2. To make corrections in lines that have been completed, it is necessary to use the editing commands covered in the next sessions. .SH Writing text to disk .PP You are now ready to edit the text. One common operation is to write the text to disk as a file for safekeeping after the session is over. This is the only way to save information from one session to the next, since the editor's buffer is temporary and will last only until the end of the editing session. Learning how to write a file to disk is second in importance only to entering the text. To write the contents of the buffer to a disk file, use the command ``write'' (or its abbreviation ``w''): .DS I 1i :\|\fBwrite .R .DE Edit will copy the contents of the buffer to a disk file. If the file does not yet exist, a new file will be created automatically and the presence of a ``[New file]'' will be noted. The newly-created file will be given the name specified when you entered the editor, in this case ``text''. To confirm that the disk file has been successfully written, edit will repeat the filename and give the number of lines and the total number of characters in the file. The buffer remains unchanged by the ``write'' command. All of the lines that were written to disk will still be in the buffer, should you want to modify or add to them. .PP Edit must have a name for the file to be written. If you forgot to indicate the name of the file when you began to edit, edit will print in response to your write command: .DS I 1i No current filename .DE If this happens, you can specify the filename in a new write command: .DS I 1i :\|\fBwrite text .R .DE After the ``write'' (or ``w''), type a space and then the name of the file. .SH Signing off .PP We have done enough for this first lesson on using the \s-2UNIX\s0 text editor, and are ready to quit the session with edit. To do this we type ``quit'' (or ``q'') and press \s-2RETURN\s+2: .DS I 1i :\|\fBwrite .R "text" [New file] 3 lines, 90 characters :\|\fBquit\fR % .DE The % is from \s-2UNIX\s0 to tell you that your session with edit is over and you may command \s-2UNIX\s0 further. Since we want to end the entire session at the terminal, we also need to exit from \s-2UNIX\s0. In response to the \s-2UNIX\s0 prompt of ``\|%\|'' type the command .DS I 1i %\|\fBlogout\fR .DE This will end your session with \s-2UNIX\s0, and will ready the terminal for the next user. It is always important to type \fBlogout\fR at the end of a session to make absolutely sure no one could accidentally stumble into your abandoned session and thus gain access to your files, tempting even the most honest of souls. .sp 1 .PP This is the end of the first session on \s-2UNIX\s0 text editing. .bp .TL Session 2 .sp .PP Login with \s-2UNIX\s0 as in the first session: .DS I 1i login: \fBsusan\fP \fI(carriage return)\fR Password: \fI(give password and carriage return)\fR .if t .sp .2v .if n .sp 1 \&... A Message of General Interest ... % .DE When you indicate you want to edit, you can specify the name of the file you worked on last time. This will start edit working, and it will fetch the contents of the file into the buffer, so that you can resume editing the same file. When edit has copied the file into the buffer, it will repeat its name and tell you the number of lines and characters it contains. Thus, .DS I 1i .B % edit text .R "text" 3 lines, 90 characters : .DE means you asked edit to fetch the file named ``text'' for editing, causing it to copy the 90 characters of text into the buffer. Edit awaits your further instructions, and indicates this by its prompt character, the colon (:). In this session, we will append more text to our file, print the contents of the buffer, and learn to change the text of a line. .SH Adding more text to the file .PP If you want to add more to the end of your text you may do so by using the append command to enter text input mode. When ``append'' is the first command of your editing session, the lines you enter are placed at the end of the buffer. Here we'll use the abbreviation for the append command, ``a'': .DS I 1i :\|\fBa This is text added in Session 2. It doesn't mean much here, but it does illustrate the editor. \|\fB\s+2\&.\s-2 .R .DE You may recall that once you enter append mode using the ``a'' (or ``append'') command, you need to type a line containing only a period (.) to exit append mode. .SH Interrupt .PP Should you press the \s-2RUB\s+2 key (sometimes labelled \s-2DELETE\s+2) while working with edit, it will send this message to you: .DS I 1i Interrupt : .DE Any command that edit might be executing is terminated by rub or delete, causing edit to prompt you for a new command. If you are appending text at the time, you will exit from append mode and be expected to give another command. The line of text you were typing when the append command was interrupted will not be entered into the buffer. .SH Making corrections .PP If while typing the line you hit an incorrect key, recall that you may delete the incorrect character or cancel the entire line of input by erasing in the usual way. Refer either to the last few pages of Session 1 if you need to review the procedures for making a correction. The most important idea to remember is that erasing a character or cancelling a line must be done before you press the \s-2RETURN\s+2 key. .SH Listing what's in the buffer (p) .PP Having appended text to what you wrote in Session 1, you might want to see all the lines in the buffer. To print the contents of the buffer, type the command: .DS I 1i :\|\fB1,$p .R .DE The ``1''\(dg .FS \(dgThe numeral ``one'' is the top left-most key, and should not be confused with the letter ``el''. .FE stands for line 1 of the buffer, the ``$'' is a special symbol designating the last line of the buffer, and ``p'' (or \fBprint\fR) is the command to print from line 1 to the end of the buffer. The command ``1,$p'' gives you: .DS I 1i This is some sample text. And thiss is some more text. Text editing is strange, but nice. This is text added in Session 2. It doesn't mean much here, but it does illustrate the editor. .DE Occasionally, you may accidentally type a character that can't be printed, which can be done by striking a key while the \s-2CTRL\s0 key is pressed. In printing lines, edit uses a special notation to show the existence of non-printing characters. Suppose you had introduced the non-printing character ``control-A'' into the word ``illustrate'' by accidently pressing the \s-2CTRL\s0 key while typing ``a''. This can happen on many terminals because the \s-2CTRL\s+2 key and the ``A'' key are beside each other. If your finger presses between the two keys, control-A results. When asked to print the contents of the buffer, edit would display .DS I 1i it does illustr^Ate the editor. .DE To represent the control-A, edit shows ``^A''. The sequence ``^'' followed by a capital letter stands for the one character entered by holding down the \s-2CTRL\s0 key and typing the letter which appears after the ``^''. We'll soon discuss the commands that can be used to correct this typing error. .PP In looking over the text we see that ``this'' is typed as ``thiss'' in the second line, a deliberate error so we can learn to make corrections. Let's correct the spelling. .SH Finding things in the buffer .PP In order to change something in the buffer we first need to find it. We can find ``thiss'' in the text we have entered by looking at a listing of the lines. Physically speaking, we search the lines of text looking for ``thiss'' and stop searching when we have found it. The way to tell edit to search for something is to type it inside slash marks: .DS I 1i :\|\fB/thiss/ .R .DE By typing .B /thiss/ and pressing \s-1RETURN\s0, you instruct edit to search for ``thiss''. If you ask edit to look for a pattern of characters which it cannot find in the buffer, it will respond ``Pattern not found''. When edit finds the characters ``thiss'', it will print the line of text for your inspection: .DS I 1i And thiss is some more text. .DE Edit is now positioned in the buffer at the line it just printed, ready to make a change in the line. .bp .SH The current line .PP Edit keeps track of the line in the buffer where it is located at all times during an editing session. In general, the line that has been most recently printed, entered, or changed is the current location in the buffer. The editor is prepared to make changes at the current location in the buffer, unless you direct it to another location. .PP In particular, when you bring a file into the buffer, you will be located at the last line in the file, where the editor left off copying the lines from the file to the buffer. If your first editing command is ``append'', the lines you enter are added to the end of the file, after the current line \(em the last line in the file. .PP You can refer to your current location in the buffer by the symbol period (.) usually known by the name ``dot''. If you type ``.'' and carriage return you will be instructing edit to print the current line: .DS I 1i :\|\fB\s+2\&.\s-2 .R And thiss is some more text. .DE .PP If you want to know the number of the current line, you can type .B \&.= and press \s-2RETURN\s+2, and edit will respond with the line number: .DS I 1i :\|\fB\s+2.\s-2= .R 2 .DE If you type the number of any line and press \s-2RETURN\s+2, edit will position you at that line and print its contents: .DS I 1i :\|\fB2 .R And thiss is some more text. .DE You should experiment with these commands to gain experience in using them to make changes. .SH Numbering lines (nu) .PP The .B number (nu) .R command is similar to print, giving both the number and the text of each printed line. To see the number and the text of the current line type .DS I 1i :\|\fBnu .R \0\0\0\0\02\0\0And thiss is some more text. .DE Note that the shortest abbreviation for the number command is ``nu'' (and not ``n'', which is used for a different command). You may specify a range of lines to be listed by the number command in the same way that lines are specified for print. For example, \f31,$nu\f1 lists all lines in the buffer with their corresponding line numbers. .SH Substitute command (s) .PP Now that you have found the misspelled word, you can change it from ``thiss'' to ``this''. As far as edit is concerned, changing things is a matter of substituting one thing for another. As .I a stood for .I append, so .I s stands for .I substitute. We will use the abbreviation ``s'' to reduce the chance of mistyping the substitute command. This command will instruct edit to make the change: .DS I 1i \f32s/thiss/this/\f1 .DE We first indicate the line to be changed, line 2, and then type an ``s'' to indicate we want edit to make a substitution. Inside the first set of slashes are the characters that we want to change, followed by the characters to replace them, and then a closing slash mark. To summarize: .DS I 1i 2s/ \fIwhat is to be changed\fR / \fIwhat to change it to \fR/ .DE If edit finds an exact match of the characters to be changed it will make the change .B only in the first occurrence of the characters. If it does not find the characters to be changed, it will respond: .DS I 1i Substitute pattern match failed .DE indicating that your instructions could not be carried out. When edit does find the characters that you want to change, it will make the substitution and automatically print the changed line, so that you can check that the correct substitution was made. In the example, .DS I 1i :\|\fB2s/thiss/this/ .R And this is some more text. .DE line 2 (and line 2 only) will be searched for the characters ``thiss'', and when the first exact match is found, ``thiss'' will be changed to ``this''. Strictly speaking, it was not necessary above to specify the number of the line to be changed. In .DS I 1i :\|\fBs/thiss/this/ .R .DE edit will assume that we mean to change the line where we are currently located (``.''). In this case, the command without a line number would have produced the same result because we were already located at the line we wished to change. .PP For another illustration of the substitute command, let us choose the line: .DS I 1i Text editing is strange, but nice. .DE You can make this line a bit more positive by taking out the characters ``strange, but\ '' so the line reads: .DS I 1i Text editing is nice. .DE A command that will first position edit at the desired line and then make the substitution is: .DS I 1i :\|\fB/strange/s/strange, but // .R .DE .LP What we have done here is combine our search with our substitution. Such combinations are perfectly legal, and speed up editing quite a bit once you get used to them. That is, you do not necessarily have to use line numbers to identify a line to edit. Instead, you may identify the line you want to change by asking edit to search for a specified pattern of letters that occurs in that line. The parts of the above command are: .in +1i .TS l l. \fB/strange/\fP tells edit to find the characters ``strange'' in the text \fBs\fP tells edit to make a substitution \fB/strange, but //\fP substitutes nothing at all for the characters ``strange, but '' .TE .in -1i .PP You should note the space after ``but'' in ``/strange, but /''. If you do not indicate that the space is to be taken out, your line will read: .DS I 1i .if t Text editing is nice. .if n Text editing is nice. .DE which looks a little funny because of the extra space between ``is'' and ``nice''. Again, we realize from this that a blank space is a real character to a computer, and in editing text we need to be aware of spaces within a line just as we would be aware of an ``a'' or a ``4''. .SH Another way to list what's in the buffer (z) .PP Although the print command is useful for looking at specific lines in the buffer, other commands may be more convenient for viewing large sections of text. You can ask to see a screen full of text at a time by using the command .B z. If you type .DS I 1i :\|\fB1z .R .DE edit will start with line 1 and continue printing lines, stopping either when the screen of your terminal is full or when the last line in the buffer has been printed. If you want to read the next segment of text, type the command .DS I 1i :\|\fBz .DE If no starting line number is given for the z command, printing will start at the ``current'' line, in this case the last line printed. Viewing lines in the buffer one screen full at a time is known as \fIpaging\fR. Paging can also be used to print a section of text on a hard-copy terminal. .SH Saving the modified text .PP This seems to be a good place to pause in our work, and so we should end the second session. If you (in haste) type ``q'' to quit the session your dialogue with edit will be: .DS I 1i :\|\fBq .R No write since last change (:quit! overrides) : .DE This is edit's warning that you have not written the modified contents of the buffer to disk. You run the risk of losing the work you did during the editing session since you typed the latest write command. Because in this lesson we have not written to disk at all, everything we have done would have been lost if edit had obeyed the \fBq\fR command. If you did not want to save the work done during this editing session, you would have to type ``q!'' or (``quit!'') to confirm that you indeed wanted to end the session immediately, leaving the file as it was after the most recent ``write'' command. However, since you want to save what you have edited, you need to type: .DS I 1i :\|\fBw .R "text" 6 lines, 171 characters .DE and then follow with the commands to quit and logout: .DS I 1i :\|\fBq % \fBlogout\fR .DE and hang up the phone or turn off the terminal when \s-2UNIX\s0 asks for a name. Terminals connected to the port selector will stop after the logout command, and pressing keys on the keyboard will do nothing. .sp 1 .PP This is the end of the second session on \s-2UNIX\s0 text editing. .bp .TL Session 3 .SH Bringing text into the buffer (e) .PP Login to \s-2UNIX\s0 and make contact with edit. You should try to login without looking at the notes, but if you must then by all means do. .PP Did you remember to give the name of the file you wanted to edit? That is, did you type .DS I 1i % \fBedit text\fR .DE or simply .DS I 1i % \fBedit\fR .DE Both ways get you in contact with edit, but the first way will bring a copy of the file named ``text'' into the buffer. If you did forget to tell edit the name of your file, you can get it into the buffer by typing: .DS I 1i :\|\fBe text .R "text" 6 lines, 171 characters .DE The command .B edit, which may be abbreviated \fBe\fR, tells edit that you want to erase anything that might already be in the buffer and bring a copy of the file ``text'' into the buffer for editing. You may also use the edit (e) command to change files in the middle of an editing session, or to give edit the name of a new file that you want to create. Because the edit command clears the buffer, you will receive a warning if you try to edit a new file without having saved a copy of the old file. This gives you a chance to write the contents of the buffer to disk before editing the next file. .SH Moving text in the buffer (m) .PP Edit allows you to move lines of text from one location in the buffer to another by means of the .B move (\fBm\fR) command. The first two examples are for illustration only, though after you have read this Session you are welcome to return to them for practice. The command .DS I 1i :\|\fB2,4m$ .R .DE directs edit to move lines 2, 3, and 4 to the end of the buffer ($). The format for the move command is that you specify the first line to be moved, the last line to be moved, the move command ``m'', and the line after which the moved text is to be placed. So, .DS I 1i :\|\fB1,3m6 .R .DE would instruct edit to move lines 1 through 3 (inclusive) to a location after line 6 in the buffer. To move only one line, say, line 4, to a location in the buffer after line 5, the command would be ``4m5''. .PP Let's move some text using the command: .DS I 1i :\|\fB5,$m1 .R 2 lines moved it does illustrate the editor. .DE After executing a command that moves more than one line of the buffer, edit tells how many lines were affected by the move and prints the last moved line for your inspection. If you want to see more than just the last line, you can then use the print (p), z, or number (nu) command to view more text. The buffer should now contain: .DS I 1i This is some sample text. It doesn't mean much here, but it does illustrate the editor. And this is some more text. Text editing is nice. This is text added in Session 2. .DE You can restore the original order by typing: .DS I 1i :\|\fB4,$m1 .R .DE or, combining context searching and the move command: .DS I 1i :\|\fB/And this is some/,/This is text/m/This is some sample/ .R .DE (Do not type both examples here!) The problem with combining context searching with the move command is that your chance of making a typing error in such a long command is greater than if you type line numbers. .SH Copying lines (copy) .PP The .B copy command is used to make a second copy of specified lines, leaving the original lines where they were. Copy has the same format as the move command, for example: .DS I 1i :\|\fB2,5copy $ .R .DE makes a copy of lines 2 through 5, placing the added lines after the buffer's end ($). Experiment with the copy command so that you can become familiar with how it works. Note that the shortest abbreviation for copy is \f3co\f1 (and not the letter ``c'', which has another meaning). .SH Deleting lines (d) .PP Suppose you want to delete the line .DS I 1i This is text added in Session 2. .DE from the buffer. If you know the number of the line to be deleted, you can type that number followed by \fBdelete\fR or \fBd\fR. This example deletes line 4, which is ``This is text added in Session 2.'' if you typed the commands suggested so far. .DS I 1i :\|\fB4d .R It doesn't mean much here, but .DE Here ``4'' is the number of the line to be deleted, and ``delete'' or ``d'' is the command to delete the line. After executing the delete command, edit prints the line that has become the current line (``.''). .PP If you do not happen to know the line number you can search for the line and then delete it using this sequence of commands: .DS I 1i :\|\fB/added in Session 2./ .R This is text added in Session 2. :\|\fBd .R It doesn't mean much here, but .DE The ``/added in Session 2./'' asks edit to locate and print the line containing the indicated text, starting its search at the current line and moving line by line until it finds the text. Once you are sure that you have correctly specified the line you want to delete, you can enter the delete (d) command. In this case it is not necessary to specify a line number before the ``d''. If no line number is given, edit deletes the current line (``.''), that is, the line found by our search. After the deletion, your buffer should contain: .DS I 1i This is some sample text. And this is some more text. Text editing is nice. It doesn't mean much here, but it does illustrate the editor. And this is some more text. Text editing is nice. This is text added in Session 2. It doesn't mean much here, but .DE To delete both lines 2 and 3: .DS I 1i And this is some more text. Text editing is nice. .DE you type .DS I 1i :\|\f32,3d\f1 2 lines deleted .DE which specifies the range of lines from 2 to 3, and the operation on those lines \(em ``d'' for delete. If you delete more than one line you will receive a message telling you the number of lines deleted, as indicated in the example above. .PP The previous example assumes that you know the line numbers for the lines to be deleted. If you do not you might combine the search command with the delete command: .DS I 1i :\|\fB/And this is some/,/Text editing is nice./d .R .DE .SH A word or two of caution .PP In using the search function to locate lines to be deleted you should be .B absolutely sure .R the characters you give as the basis for the search will take edit to the line you want deleted. Edit will search for the first occurrence of the characters starting from where you last edited \- that is, from the line you see printed if you type dot (.). .PP A search based on too few characters may result in the wrong lines being deleted, which edit will do as easily as if you had meant it. For this reason, it is usually safer to specify the search and then delete in two separate steps, at least until you become familiar enough with using the editor that you understand how best to specify searches. For a beginner it is not a bad idea to double-check each command before pressing \s-2RETURN\s+2 to send the command on its way. .SH Undo (u) to the rescue .PP The .B undo (u) .R command has the ability to reverse the effects of the last command that changed the buffer. To undo the previous command, type ``u'' or ``undo''. Undo can rescue the contents of the buffer from many an unfortunate mistake. However, its powers are not unlimited, so it is still wise to be reasonably careful about the commands you give. .PP It is possible to undo only commands which have the power to change the buffer \(em for example, delete, append, move, copy, substitute, and even undo itself. The commands write (w) and edit (e), which interact with disk files, cannot be undone, nor can commands that do not change the buffer, such as print. Most importantly, the .B only command that can be reversed by undo is the last ``undo-able'' command you typed. You can use control-H and @ to change commands while you are typing them, and undo to reverse the effect of the commands after you have typed them and pressed \s-2RETURN\s+2. .PP To illustrate, let's issue an undo command. Recall that the last buffer-changing command we gave deleted the lines formerly numbered 2 and 3. Typing undo at this moment will reverse the effects of the deletion, causing those two lines to be replaced in the buffer. .DS I 1i :\|\fBu .R 2 more lines in file after undo And this is some more text. .DE Here again, edit informs you if the command affects more than one line, and prints the text of the line which is now ``dot'' (the current line). .SH More about the dot (.) and buffer end ($) .PP The function assumed by the symbol dot depends on its context. It can be used: .IP 1. to exit from append mode; we type dot (and only a dot) on a line and press \s-2RETURN\s+2; .IP 2. to refer to the line we are at in the buffer. .LP Dot can also be combined with the equal sign to get the number of the line currently being edited: .DS I 1i :\|\fB\&.= .R .DE If we type ``\fB.\fR='' we are asking for the number of the line, and if we type ``\fB.\fR'' we are asking for the text of the line. .PP In this editing session and the last, we used the dollar sign to indicate the end of the buffer in commands such as print, copy, and move. The dollar sign as a command asks edit to print the last line in the buffer. If the dollar sign is combined with the equal sign (\f3$=\f1) edit will print the line number corresponding to the last line in the buffer. .PP ``\fB.\fR'' and ``$'', then, represent line numbers. Whenever appropriate, these symbols can be used in place of line numbers in commands. For example .DS I 1i :\|\fB\s+2.\s-2,$d .R .DE instructs edit to delete all lines from the current line (\fB.\fR) to the end of the buffer. .SH Moving around in the buffer (+ and \-) .PP When you are editing you often want to go back and re-read a previous line. You could specify a context search for a line you want to read if you remember some of its text, but if you simply want to see what was written a few, say 3, lines ago, you can type .DS I 1i \-3p .DE This tells edit to move back to a position 3 lines before the current line (.) and print that line. You can move forward in the buffer similarly: .DS I 1i +2p .DE instructs edit to print the line that is 2 ahead of your current position. .PP You may use ``+'' and ``\-'' in any command where edit accepts line numbers. Line numbers specified with ``+'' or ``\-'' can be combined to print a range of lines. The command .DS I 1i :\|\fB\-1,+2copy$ .R .DE makes a copy of 4 lines: the current line, the line before it, and the two after it. The copied lines will be placed after the last line in the buffer ($), and the original lines referred to by ``\-1'' and ``+2'' remain where they are. .PP Try typing only ``\-''; you will move back one line just as if you had typed ``\-1p''. Typing the command ``+'' works similarly. You might also try typing a few plus or minus signs in a row (such as ``+++'') to see edit's response. Typing \s-2RETURN\s+2 alone on a line is the equivalent of typing ``+1p''; it will move you one line ahead in the buffer and print that line. .PP If you are at the last line of the buffer and try to move further ahead, perhaps by typing a ``+'' or a carriage return alone on the line, edit will remind you that you are at the end of the buffer: .sp .nf .ti 1i At end-of-file .br or .ti 1i Not that many lines in buffer .fi .LP Similarly, if you try to move to a position before the first line, edit will print one of these messages: .sp .nf .ti 1i Nonzero address required on this command .br or .ti 1i Negative address \- first buffer line is 1 .fi .LP The number associated with a buffer line is the line's ``address'', in that it can be used to locate the line. .SH Changing lines (c) .PP You can also delete certain lines and insert new text in their place. This can be accomplished easily with the .B "change (c)" command. The change command instructs edit to delete specified lines and then switch to text input mode to accept the text that will replace them. Let's say you want to change the first two lines in the buffer: .DS I 1i This is some sample text. And this is some more text. .DE to read .DS I 1i This text was created with the \s-2UNIX\s0 text editor. .DE To do so, you type: .DS I 1i :\|\fB1,2c .R 2 lines changed .B This text was created with the \s-2UNIX\s0 text editor. \s+2\&.\s-2 .R : .DE In the command .B 1,2c we specify that we want to change the range of lines beginning with 1 and ending with 2 by giving line numbers as with the print command. These lines will be deleted. After you type \s-2RETURN\s+2 to end the change command, edit notifies you if more than one line will be changed and places you in text input mode. Any text typed on the following lines will be inserted into the position where lines were deleted by the change command. .B You will remain in text input mode until you exit in the usual way, by typing a period alone on a line. .R Note that the number of lines added to the buffer need not be the same as the number of lines deleted. .sp 1 .PP This is the end of the third session on text editing with \s-2UNIX\s0. .bp .SH .ce 1 \s+2Session 4\s0 .sp .PP This lesson covers several topics, starting with commands that apply throughout the buffer, characters with special meanings, and how to issue \s-2UNIX\s0 commands while in the editor. The next topics deal with files: more on reading and writing, and methods of recovering files lost in a crash. The final section suggests sources of further information. .SH Making commands global (g) .PP One disadvantage to the commands we have used for searching or substituting is that if you have a number of instances of a word to change it appears that you have to type the command repeatedly, once for each time the change needs to be made. Edit, however, provides a way to make commands apply to the entire contents of the buffer \- the .B global (g) .R command. .PP To print all lines containing a certain sequence of characters (say, ``text'') the command is: .DS I 1i :\|\fBg/text/p .R .DE The ``g'' instructs edit to make a global search for all lines in the buffer containing the characters ``text''. The ``p'' prints the lines found. .PP To issue a global command, start by typing a ``g'' and then a search pattern identifying the lines to be affected. Then, on the same line, type the command to be executed for the identified lines. Global substitutions are frequently useful. For example, to change all instances of the word ``text'' to the word ``material'' the command would be a combination of the global search and the substitute command: .DS I 1i :\|\fBg/text/s/text/material/g .R .DE Note the ``g'' at the end of the global command, which instructs edit to change each and every instance of ``text'' to ``material''. If you do not type the ``g'' at the end of the command only the .I first instance of ``text'' \fIin each line\fR will be changed (the normal result of the substitute command). The ``g'' at the end of the command is independent of the ``g'' at the beginning. You may give a command such as: .DS I 1i :\|\fB5s/text/material/g .R .DE to change every instance of ``text'' in line 5 alone. Further, neither command will change ``text'' to ``material'' if ``Text'' begins with a capital rather than a lower-case .I t. .PP Edit does not automatically print the lines modified by a global command. If you want the lines to be printed, type a ``p'' at the end of the global command: .DS I 1i :\|\fBg/text/s/text/material/gp .R .DE You should be careful about using the global command in combination with any other \- in essence, be sure of what you are telling edit to do to the entire buffer. For example, .DS I 1i :\|\fBg/ /d .R 72 less lines in file after global .DE will delete every line containing a blank anywhere in it. This could adversely affect your document, since most lines have spaces between words and thus would be deleted. After executing the global command, edit will print a warning if the command added or deleted more than one line. Fortunately, the undo command can reverse the effects of a global command. You should experiment with the global command on a small file of text to see what it can do for you. .SH More about searching and substituting .PP In using slashes to identify a character string that we want to search for or change, we have always specified the exact characters. There is a less tedious way to repeat the same string of characters. To change ``text'' to ``texts'' we may type either .DS I 1i :\|\fB/text/s/text/texts/ .R .DE as we have done in the past, or a somewhat abbreviated command: .DS I 1i :\|\fB/text/s//texts/ .R .DE In this example, the characters to be changed are not specified \- there are no characters, not even a space, between the two slash marks that indicate what is to be changed. This lack of characters between the slashes is taken by the editor to mean ``use the characters we last searched for as the characters to be changed.'' .PP Similarly, the last context search may be repeated by typing a pair of slashes with nothing between them: .DS I 1i :\|\fB/does/ .R It doesn't mean much here, but :\|\fB// .R it does illustrate the editor. .DE (You should note that the search command found the characters ``does'' in the word ``doesn't'' in the first search request.) Because no characters are specified for the second search, the editor scans the buffer for the next occurrence of the characters ``does''. .PP Edit normally searches forward through the buffer, wrapping around from the end of the buffer to the beginning, until the specified character string is found. If you want to search in the reverse direction, use question marks (?) instead of slashes to surround the characters you are searching for. .PP It is also possible to repeat the last substitution without having to retype the entire command. An ampersand (&) used as a command repeats the most recent substitute command, using the same search and replacement patterns. After altering the current line by typing .DS I 1i :\|\fBs/text/texts/ .R .DE you type .DS I 1i :\|\fB/text/& .R .DE or simply .DS I 1i :\|\fB//& .R .DE to make the same change on the next line in the buffer containing the characters ``text''. .SH Special characters .PP Two characters have special meanings when used in specifying searches: ``$'' and ``^''. ``$'' is taken by the editor to mean ``end of the line'' and is used to identify strings that occur at the end of a line. .DS I 1i :\|\fBg/text.$/s//material./p .R .DE tells the editor to search for all lines ending in ``text.'' (and nothing else, not even a blank space), to change each final ``text.'' to ``material.'', and print the changed lines. .PP The symbol ``^'' indicates the beginning of a line. Thus, .DS I 1i :\|\fBs/^/1. / .R .DE instructs the editor to insert ``1.'' and a space at the beginning of the current line. .PP The characters ``$'' and ``^'' have special meanings only in the context of searching. At other times, they are ordinary characters. If you ever need to search for a character that has a special meaning, you must indicate that the character is to lose temporarily its special significance by typing another special character, the backslash (\\), before it. .DS I 1i :\|\fBs/\\\\\&$/dollar/ .R .DE looks for the character ``$'' in the current line and replaces it by the word ``dollar''. Were it not for the backslash, the ``$'' would have represented ``the end of the line'' in your search rather than the character ``$''. The backslash retains its special significance unless it is preceded by another backslash. .SH Issuing \s-2UNIX\s0 commands from the editor .PP After creating several files with the editor, you may want to delete files no longer useful to you or ask for a list of your files. Removing and listing files are not functions of the editor, and so they require the use of \s-2UNIX\s0 system commands (also referred to as ``shell'' commands, as ``shell'' is the name of the program that processes \s-2UNIX\s0 commands). You do not need to quit the editor to execute a \s-2UNIX\s0 command as long as you indicate that it is to be sent to the shell for execution. To use the \s-2UNIX\s0 command .B rm to remove the file named ``junk'' type: .DS I 1i :\|\fB!rm junk .R ! : .DE The exclamation mark (!) indicates that the rest of the line is to be processed as a shell command. If the buffer contents have not been written since the last change, a warning will be printed before the command is executed: .DS I 1i [No write since last change] .DE The editor prints a ``!'' when the command is completed. Other tutorials describe useful features of the system, of which an editor is only one part. .SH Filenames and file manipulation .PP Throughout each editing session, edit keeps track of the name of the file being edited as the .I "current filename." Edit remembers as the current filename the name given when you entered the editor. The current filename changes whenever the edit (e) command is used to specify a new file. Once edit has recorded a current filename, it inserts that name into any command where a filename has been omitted. If a write command does not specify a file, edit, as we have seen, supplies the current filename. If you are editing a file named ``draft3'' having 283 lines in it, you can have the editor write onto a different file by including its name in the write command: .DS I 1i :\fB\|w chapter3 .R "chapter3" [new file] 283 lines, 8698 characters .DE The current filename remembered by the editor .I will not be changed as a result of the write command. .R Thus, if the next write command does not specify a name, edit will write onto the current file (``draft3'') and not onto the file ``chapter3''. .SH The file (f) command .PP To ask for the current filename, type .B file (or .B f ). In response, the editor provides current information about the buffer, including the filename, your current position, the number of lines in the buffer, and the percent of the distance through the file your current location is. .DS I 1i :\|\fBf .R "text" [Modified] line 3 of 4 --75%-- .DE .\"The expression ``[Edited]'' indicates that the buffer contains .\"either the editor's copy of the existing file ``text'' .\"or a file which you are just now creating. If the contents of the buffer have changed since the last time the file was written, the editor will tell you that the file has been ``[Modified]''. After you save the changes by writing onto a disk file, the buffer will no longer be considered modified: .DS I 1i :\|\fBw .R "text" 4 lines, 88 characters :\|\fBf .R "text" line 3 of 4 --75%-- .DE .SH Reading additional files (r) .PP The \f3read (r)\f1 command allows you to add the contents of a file to the buffer at a specified location, essentially copying new lines between two existing lines. To use it, specify the line after which the new text will be placed, the \f3read (r)\f1 command, and then the name of the file. If you have a file named ``example'', the command .DS I 1i :\|\fB$r example .R "example" 18 lines, 473 characters .DE reads the file ``example'' and adds it to the buffer after the last line. The current filename is not changed by the read command. .SH Writing parts of the buffer .PP The .B write (w) .R command can write all or part of the buffer to a file you specify. We are already familiar with writing the entire contents of the buffer to a disk file. To write only part of the buffer onto a file, indicate the beginning and ending lines before the write command, for example .DS I 1i :\|\fB45,$w ending .R .DE Here all lines from 45 through the end of the buffer are written onto the file named .I ending. The lines remain in the buffer as part of the document you are editing, and you may continue to edit the entire buffer. Your original file is unaffected by your command to write part of the buffer to another file. Edit still remembers whether you have saved changes to the buffer in your original file or not. .SH Recovering files .PP Although it does not happen very often, there are times \s-2UNIX\s+2 stops working because of some malfunction. This situation is known as a \fIcrash\fR. Under most circumstances, edit's crash recovery feature is able to save work to within a few lines of changes before a crash (or an accidental phone hang up). If you lose the contents of an editing buffer in a system crash, you will normally receive mail when you login that gives the name of the recovered file. To recover the file, enter the editor and type the command .B recover (\fBrec\fR), followed by the name of the lost file. For example, to recover the buffer for an edit session involving the file ``chap6'', the command is: .DS I 1i .R :\|\fBrecover chap6 .R .DE Recover is sometimes unable to save the entire buffer successfully, so always check the contents of the saved buffer carefully before writing it back onto the original file. For best results, write the buffer to a new file temporarily so you can examine it without risk to the original file. Unfortunately, you cannot use the recover command to retrieve a file you removed using the shell command \f3rm\f1. .SH Other recovery techniques .PP If something goes wrong when you are using the editor, it may be possible to save your work by using the command .B preserve (\fBpre\fR), which saves the buffer as if the system had crashed. If you are writing a file and you get the message ``Quota exceeded'', you have tried to use more disk storage than is allotted to your account. .I Proceed with caution .R because it is likely that only a part of the editor's buffer is now present in the file you tried to write. In this case you should use the shell escape from the editor (!) to remove some files you don't need and try to write the file again. If this is not possible and you cannot find someone to help you, enter the command .DS I 1i :\|\fBpreserve .R .DE and wait for the reply, .DS I 1i File preserved. .DE If you do not receive this reply, seek help immediately. Do not simply leave the editor. If you do, the buffer will be lost, and you may not be able to save your file. If the reply is ``File preserved.'' you can leave the editor (or logout) to remedy the situation. After a preserve, you can use the recover command once the problem has been corrected, or the \fB\-r\fR option of the edit command if you leave the editor and want to return. .PP If you make an undesirable change to the buffer and type a write command before discovering your mistake, the modified version will replace any previous version of the file. Should you ever lose a good version of a document in this way, do not panic and leave the editor. As long as you stay in the editor, the contents of the buffer remain accessible. Depending on the nature of the problem, it may be possible to restore the buffer to a more complete state with the undo command. After fixing the damaged buffer, you can again write the file to disk. .SH Further reading and other information .PP Edit is an editor designed for beginning and casual users. It is actually a version of a more powerful editor called .I ex. These lessons are intended to introduce you to the editor and its more commonly-used commands. We have not covered all of the editor's commands, but a selection of commands that should be sufficient to accomplish most of your editing tasks. You can find out more about the editor in the .I Ex Reference Manual, .R which is applicable to both .I ex and .I edit. One way to become familiar with the manual is to begin by reading the description of commands that you already know. .bd I 3 .SH Using .I ex .fl .bd I .PP As you become more experienced with using the editor, you may still find that edit continues to meet your needs. However, should you become interested in using .I ex, it is easy to switch. To begin an editing session with .I ex, use the name .B ex in your command instead of .B edit. .PP Edit commands also work in .I ex, but the editing environment is somewhat different. You should be aware of a few differences between .I ex and .I edit. In edit, only the characters ``^'', ``$'', and ``\\'' have special meanings in searching the buffer or indicating characters to be changed by a substitute command. Several additional characters have special meanings in ex, as described in the .I Ex Reference Manual. .R Another feature of the edit environment prevents users from accidently entering two alternative modes of editing, .I open and .I visual, in which the editor behaves quite differently from normal command mode. If you are using ex and you encounter strange behavior, you may have accidently entered open mode by typing ``o''. Type the \s-2ESC\s0 key and then a ``Q'' to get out of open or visual mode and back into the regular editor command mode. The document .I An Introduction to Display Editing with Vi\|\| .R provide full details of visual mode. .bp .SH .ce 1 \s+2Index\s0 .LP .sp 2 .2C .nf addressing, \fIsee\fR line numbers ampersand, 20 append mode, 6-7 append (a) command, 6, 7, 9 ``At end of file'' (message), 18 backslash (\\), 21 buffer, 3 caret (^), 10, 20 change (c) command, 18 command mode, 5-6 ``Command not found'' (message), 6 context search, 10-12, 19-21 control characters (``^'' notation), 10 control-H, 7 copy (co) command, 15 corrections, 7, 16 current filename, 21 current line (\|.\|), 11, 17 delete (d) command, 15-16 dial-up, 5 disk, 3 documentation, 3, 23 dollar ($), 10, 11, 17, 20-21 dot (\f3\|.\|\f1) 11, 17 edit (text editor), 3, 5, 23 edit (e) command, 5, 9, 14 editing commands: .in +.25i append (a), 6, 7, 9 change (c), 18 copy (co), 15 delete (d), 15-16 edit (text editor), 3, 5, 23 edit (e), 5, 9, 14 file (f), 21-22 global (g), 19 move (m), 14-15 number (nu), 11 preserve (pre), 22-23 print (p), 10 quit (q), 8, 13 read (r), 22 recover (rec), 22, 23 substitute (s), 11-12, 19, 20 undo (u), 16-17, 23 write (w), 8, 13, 21, 22 z, 12-13 ! (shell escape), 21 $=, 17 +, 17 \-, 17 //, 12, 20 ??, 20 \&., 11, 17 \&.=, 11, 17 .in -.25i entering text, 3, 6-7 erasing .in +.25i characters (^H), 7 lines (@), 7 .in -.25i error corrections, 7, 16 ex (text editor), 23 \fIEx Reference Manual\fR, 23 exclamation (!), 21 file, 3 file (f) command, 21-22 file recovery, 22-23 filename, 3, 21 global (g) command, 19 input mode, 6-7 Interrupt (message), 9 line numbers, \fIsee also\fR current line .in +.25i dollar sign ($), 10, 11, 17 dot (\|.\|), 11, 17 relative (+ and \-), 17 .in -.25i list, 10 logging in, 4-6 logging out, 8 ``Login incorrect'' (message), 5 minus (\-), 17 move (m) command, 14-15 ``Negative address\(emfirst buffer line is 1'' (message), 18 ``No current filename'' (message), 8 ``No such file or directory'' (message), 5, 6 ``No write since last change'' (message), 21 non-printing characters, 10 ``Nonzero address required'' (message), 18 ``Not an editor command'' (message), 6 ``Not that many lines in buffer'' (message), 18 number (nu) command, 11 password, 5 period (\|.\|), 11, 17 plus (+), 17 preserve (pre) command, 22-23 print (p) command, 10 program, 3 prompts .in .25i % (\s-2UNIX\s0), 5 : (edit), 5, 6, 7 \0 (append), 7 .in -.25i question (?), 20 quit (q) command, 8, 13 read (r) command, 22 recover (rec) command, 22, 23 recovery, \fIsee\fR\| file recovery references, 3, 23 remove (rm) command, 21, 22 reverse command effects (undo), 16-17, 23 searching, 10-12, 19-21 shell, 21 shell escape (!), 21 slash (/), 11-12, 20 special characters (^, $, \\), 10, 11, 17, 20-21 substitute (s) command, 11-12, 19, 20 terminals, 4-5 text input mode, 7 undo (u) command, 16-17, 23 \s-1UNIX\s0, 3 write (w) command, 8, 13, 21, 22 z command, 12-13 nvi-1.81.6/docs/edit/edittut.ps0100444000076400001440000035627510720065713015375 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:43:55 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 24 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF 3(Edit: A)263.382 84 R -1.104(Tu)3 G(torial)1.104 E/F1 10/Times-Italic@0 SF(Ric)285.13 108 Q(ki Blau)-.2 E -.35(Ja)281.175 132 S(mes J).35 E(oyce)-.25 E/F2 10/Times-Roman@0 SF(Computing Services) 265.305 156 Q(Uni)258.15 168 Q -.15(ve)-.25 G(rsity of California).15 E (Berk)251.875 180 Q(ele)-.1 E 1.3 -.65(y, C)-.15 H(alifornia 94720).65 E F1(ABSTRA)282.535 228 Q(CT)-.3 E F2 .334(This narrati)72 255.6 R .634 -.15(ve i)-.25 H .334(ntroduction to the use of the te).15 F .334 (xt editor)-.15 F F1(edit)2.834 E F2 .334(assumes no prior f)2.834 F .333(amiliarity with computers or with te)-.1 F(xt)-.15 E 3.194 (editing. Its)72 267.6 R .694(aim is to lead the be)3.194 F(ginning)-.15 E/F3 8/Times-Roman@0 SF(UNIX\207)3.194 E F2 .695 (user through the fundamental steps of writing and re)3.194 F .695 (vising a \214le of)-.25 F(te)72 279.6 Q 3.306(xt. Edit,)-.15 F 3.306 (av)3.306 G .806(ersion of the te)-3.456 F .806(xt editor)-.15 F F1 -.2 (ex)3.306 G(,).2 E F2 -.1(wa)3.306 G 3.306(sd).1 G .806(esigned to pro) -3.306 F .806(vide an informati)-.15 F 1.106 -.15(ve e)-.25 H -.4(nv).15 G .805(ironment for ne).4 F 3.305(wa)-.25 G .805(nd casual)-3.305 F (users.)72 291.6 Q 1.6 -.8(We w)97 307.2 T (elcome comments and suggestions about this tutorial and the).8 E F3 (UNIX)2.5 E F2(documentation in general.)2.5 E(September 1981)72 325.2 Q .32 LW 144 710 72 710 DL F3 (\207UNIX is a trademark of Bell Laboratories.)72 720 Q EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 360.95(USD:11-2 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 12/Times-Bold@0 SF(Contents)283.002 84 Q F0 5 (Introduction 3)72 99.6 R(Session 1)72 123.6 Q(4)5 E (Making contact with)108 135.6 Q/F2 8/Times-Roman@0 SF(UNIX)2.5 E F0(4) 7.5 E(Logging in)108 147.6 Q(4)5 E(Asking for)108 159.6 Q/F3 10 /Times-Italic@0 SF(edit)2.5 E F0(4)7.5 E(The `)108 171.6 Q (`Command not found')-.74 E 2.5('m)-.74 G 5(essage 5)-2.5 F 2.5(As)108 183.6 S 2.5(ummary 5)-2.5 F(Entering te)108 195.6 Q 5(xt 5)-.15 F (Messages from)108 207.6 Q F3(edit)2.5 E F0(5)7.5 E -1.25 -.7(Te x)108 219.6 T 2.5(ti).7 G(nput mode)-2.5 E(6)7.5 E(Making corrections)108 231.6 Q(6)7.5 E(Writing te)108 243.6 Q(xt to disk)-.15 E(7)7.5 E (Signing of)108 255.6 Q 5(f7)-.25 G(Session 2)72 279.6 Q(8)7.5 E (Adding more te)108 291.6 Q(xt to the \214le)-.15 E(8)7.5 E 5 (Interrupt 8)108 303.6 R(Making corrections)108 315.6 Q(8)7.5 E (Listing what')108 327.6 Q 2.5(si)-.55 G 2.5(nt)-2.5 G(he b)-2.5 E(uf) -.2 E(fer \(p\))-.25 E(9)7.5 E(Finding things in the b)108 339.6 Q(uf) -.2 E 5(fer 9)-.25 F(The current line)108 351.6 Q(10)7.5 E (Numbering lines \(nu\))108 363.6 Q(10)7.5 E(Substitute command \(s\)) 108 375.6 Q(10)7.5 E(Another w)108 387.6 Q(ay to list what')-.1 E 2.5 (si)-.55 G 2.5(nt)-2.5 G(he b)-2.5 E(uf)-.2 E(fer \(z\))-.25 E(11)7.5 E (Sa)108 399.6 Q(ving the modi\214ed te)-.2 E 5(xt 12)-.15 F(Session 3)72 423.6 Q(13)7.5 E(Bringing te)108 435.6 Q(xt into the b)-.15 E(uf)-.2 E (fer \(e\))-.25 E(13)7.5 E(Mo)108 447.6 Q(ving te)-.15 E(xt in the b) -.15 E(uf)-.2 E(fer \(m\))-.25 E(13)7.5 E(Cop)108 459.6 Q (ying lines \(cop)-.1 E 5(y\) 14)-.1 F(Deleting lines \(d\))108 471.6 Q (14)7.5 E 2.5(Aw)108 483.6 S(ord or tw)-2.6 E 2.5(oo)-.1 G 2.5(fc)-2.5 G 5(aution 15)-2.5 F(Undo \(u\) to the rescue)108 495.6 Q(15)7.5 E (More about the dot \(.\) and b)108 507.6 Q(uf)-.2 E(fer end \($\))-.25 E(16)7.5 E(Mo)108 519.6 Q(ving around in the b)-.15 E(uf)-.2 E (fer \(+ and \255\))-.25 E(16)7.5 E(Changing lines \(c\))108 531.6 Q(17) 7.5 E(Session 4)72 555.6 Q(18)7.5 E(Making commands global \(g\))108 567.6 Q(18)7.5 E(More about searching and substituting)108 579.6 Q(19) 7.5 E(Special characters)108 591.6 Q(19)7.5 E(Issuing)108 603.6 Q F2 (UNIX)2.5 E F0(commands from the editor)2.5 E(20)7.5 E (Filenames and \214le manipulation)108 615.6 Q(20)7.5 E (The \214le \(f\) command)108 627.6 Q(20)7.5 E (Reading additional \214les \(r\))108 639.6 Q(21)7.5 E (Writing parts of the b)108 651.6 Q(uf)-.2 E 5(fer 21)-.25 F(Reco)108 663.6 Q -.15(ve)-.15 G(ring \214les).15 E(21)7.5 E(Other reco)108 675.6 Q -.15(ve)-.15 G(ry techniques).15 E(21)7.5 E (Further reading and other information)108 687.6 Q(22)7.5 E(Using)108 699.6 Q F3 -.2(ex)2.5 G F0(22)7.7 E(Inde)72 723.6 Q 7.5(x2)-.15 G(3)-7.5 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 360.95(utorial USD:11-3)-.45 F /F1 12/Times-Bold@0 SF(Intr)273.438 84 Q(oduction)-.216 E F0 -1.25 -.7 (Te x)97 99.6 T 3.274(te).7 G .774 (diting using a terminal connected to a computer allo)-3.274 F .775 (ws you to create, modify)-.25 F 3.275(,a)-.65 G .775(nd print te)-3.275 F .775(xt easily)-.15 F 5.775(.A)-.65 G/F2 10/Times-Italic@0 SF(te)72 111.6 Q .415(xt editor)-.2 F F0 .415 (is a program that assists you as you create and modify te)2.915 F 2.914 (xt. The)-.15 F(te)2.914 E .414(xt editor you will learn here is named) -.15 F F2(edit.)72 123.6 Q F0 .112(Creating te)5.112 F .112 (xt using edit is as easy as typing it on an electric type)-.15 F (writer)-.25 E 5.113(.M)-.55 G .113(odifying te)-5.113 F .113(xt in)-.15 F -.2(vo)-.4 G(lv).2 E .113(es telling the te)-.15 F(xt)-.15 E .199 (editor what you w)72 135.6 R .199(ant to add, change, or delete.)-.1 F -1.1(Yo)5.199 G 2.699(uc)1.1 G .199(an re)-2.699 F(vie)-.25 E 2.699(wy) -.25 G .199(our te)-2.699 F .198 (xt by typing a command to print the \214le con-)-.15 F .031 (tents as the)72 147.6 R 2.531(ya)-.15 G .031(re currently)-2.531 F 5.031(.A)-.65 G .031 (nother program \(which we do not discuss in this document\), a te) -5.031 F .032(xt formatter)-.15 F 2.532(,r)-.4 G(earranges)-2.532 E (your te)72 159.6 Q(xt for you into `)-.15 E(`\214nished form.)-.74 E -.74('')-.7 G .231(These lessons assume no prior f)97 175.2 R .231 (amiliarity with computers or with te)-.1 F .23(xt editing.)-.15 F(The) 5.23 E 2.73(yc)-.15 G .23(onsist of a series of te)-2.73 F(xt)-.15 E 1.015(editing sessions which lead you through the fundamental steps of \ creating and re)72 187.2 R 1.016(vising te)-.25 F 3.516(xt. After)-.15 F 1.016(scanning each)3.516 F .063(lesson and before be)72 199.2 R .063 (ginning the ne)-.15 F .063(xt, you should try the e)-.15 F .062 (xamples at a terminal to get a feeling for the actual process)-.15 F .473(of te)72 211.2 R .473(xt editing.)-.15 F .474 (If you set aside some time for e)5.473 F .474 (xperimentation, you will soon become f)-.15 F .474 (amiliar with using the com-)-.1 F .848(puter to write and modify te)72 223.2 R 3.348(xt. In)-.15 F .848(addition to the actual use of the te) 3.348 F .847(xt editor)-.15 F 3.347(,o)-.4 G .847(ther features of) -3.347 F/F3 8/Times-Roman@0 SF(UNIX)3.347 E F0 .847(will be v)3.347 F (ery)-.15 E .471(important to your w)72 235.2 R 2.971(ork. Y)-.1 F .471 (ou can be)-1.1 F .472(gin to learn about these other features by readi\ ng one of the other tutorials that)-.15 F(pro)72 247.2 Q .118 (vide a general introduction to the system.)-.15 F -1.1(Yo)5.118 G 2.618 (uw)1.1 G .117 (ill be ready to proceed with this lesson as soon as you are f)-2.618 F (amil-)-.1 E .505(iar with \(1\) your terminal and its special k)72 259.2 R -.15(ey)-.1 G .506(s, \(2\) ho).15 F 3.006(wt)-.25 G 3.006(ol) -3.006 G .506(ogin, \(3\) and the w)-3.006 F .506 (ays of correcting typing errors.)-.1 F(Let')5.506 E(s)-.55 E (\214rst de\214ne some terms:)72 271.2 Q 23.62(program A)72 292.8 R .536 (set of instructions, gi)3.036 F -.15(ve)-.25 G 3.036(nt).15 G 3.035(ot) -3.036 G .535(he computer)-3.035 F 3.035(,d)-.4 G .535 (escribing the sequence of steps the computer performs)-3.035 F .556 (in order to accomplish a speci\214c task.)132 304.8 R .556 (The task must be speci\214c, such as balancing your checkbook)5.556 F .103(or editing your te)132 316.8 R 2.603(xt. A)-.15 F .103 (general task, such as w)2.603 F .103(orking for w)-.1 F .102 (orld peace, is something we can all do, b)-.1 F(ut)-.2 E (not something we can currently write programs to do.)132 328.8 Q(UNIX) 72 344.4 Q F3(UNIX)35.01 E F0 .644(is a special type of program, called\ an operating system, that supervises the machinery and all)3.143 F (other programs comprising the total computer system.)132 356.4 Q(edit) 72 372 Q F2(edit)45 E F0 .411(is the name of the)2.911 F F3(UNIX)2.911 E F0(te)2.911 E .41(xt editor you will be learning to use, and is a progr\ am that aids you in)-.15 F .356(writing or re)132 384 R .356(vising te) -.25 F 2.856(xt. Edit)-.15 F -.1(wa)2.856 G 2.856(sd).1 G .356 (esigned for be)-2.856 F .357(ginning users, and is a simpli\214ed v) -.15 F .357(ersion of an edi-)-.15 F(tor named)132 396 Q F2 -.2(ex)2.5 G (.).2 E F0 44.72(\214le Each)72 411.6 R F3(UNIX)2.762 E F0 .262(account\ is allotted space for the permanent storage of information, such as pr\ ograms, data)2.762 F .747(or te)132 423.6 R 3.247(xt. A)-.15 F .747 (\214le is a logical unit of data, for e)3.247 F .748(xample, an essay) -.15 F 3.248(,ap)-.65 G .748(rogram, or a chapter from a book,)-3.248 F .399(which is stored on a computer system.)132 435.6 R .399 (Once you create a \214le, it is k)5.399 F .399 (ept until you instruct the system)-.1 F .305(to remo)132 447.6 R .605 -.15(ve i)-.15 H 2.805(t. Y).15 F .305 (ou may create a \214le during one)-1.1 F F3(UNIX)2.805 E F0 .305 (session, end the session, and return to use it at a)2.805 F .87 (later time.)132 459.6 R .87(Files contain an)5.87 F .87 (ything you choose to write and store in them.)-.15 F .87 (The sizes of \214les v)5.87 F .87(ary to)-.25 F .276 (suit your needs; one \214le might hold only a single number)132 471.6 R 2.776(,y)-.4 G .276(et another might contain a v)-2.776 F .277 (ery long doc-)-.15 F .599(ument or program.)132 483.6 R .599 (The only w)5.599 F .599(ay to sa)-.1 F .899 -.15(ve i)-.2 H .598 (nformation from one session to the ne).15 F .598 (xt is to store it in a)-.15 F (\214le, which you will learn in Session 1.)132 495.6 Q 23.06 (\214lename Filenames)72 511.2 R 1.24 (are used to distinguish one \214le from another)3.74 F 3.74(,s)-.4 G 1.24(erving the same purpose as the labels of)-3.74 F .362 (manila folders in a \214le cabinet.)132 523.2 R .362(In order to write\ or access information in a \214le, you use the name of)5.362 F (that \214le in a)132 535.2 Q F3(UNIX)2.5 E F0 (command, and the system will automatically locate the \214le.)2.5 E 40.83(disk Files)72 550.8 R .199(are stored on an input/output de)2.699 F .199(vice called a disk, which looks something lik)-.25 F 2.7(eas)-.1 G .2(tack of phono-)-2.7 F .322(graph records.)132 562.8 R .322 (Each surf)5.322 F .321(ace is coated with a material similar to that o\ n magnetic recording tape, and)-.1 F(information is recorded on it.)132 574.8 Q -.2(bu)72 590.4 S -.25(ff).2 G 33.52(er A).25 F .626 (temporary w)3.126 F .626(ork space, made a)-.1 F -.25(va)-.2 G .627 (ilable to the user for the duration of a session of te).25 F .627 (xt editing and)-.15 F .047(used for creating and modifying the te)132 602.4 R .046(xt \214le.)-.15 F 1.646 -.8(We c)5.046 H .046 (an think of the b).8 F(uf)-.2 E .046 (fer as a blackboard that is erased)-.25 F (after each class, where each session with the editor is a class.)132 614.4 Q EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 360.95(USD:11-4 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 12/Times-Bold@0 SF(Session 1)282.828 84 Q/F2 10 /Times-Bold@0 SF(Making contact with)72 120 Q/F3 9/Times-Bold@0 SF(UNIX) 2.5 E F0 2.042 -.8(To u)97 135.6 T .442 (se the editor you must \214rst mak).8 F 2.942(ec)-.1 G .442 (ontact with the computer by logging in to)-2.942 F/F4 8/Times-Roman@0 SF(UNIX)2.942 E F0 5.442(.W)C(e')-6.242 E .442(ll quickly re)-.1 F(vie) -.25 E(w)-.25 E .127(the standard)72 147.6 R F4(UNIX)2.627 E F0 .126 (login procedure for the tw)2.626 F 2.626(ow)-.1 G .126(ays you can mak) -2.726 F 2.626(ec)-.1 G .126 (ontact: on a terminal that is directly link)-2.626 F .126(ed to the)-.1 F(computer)72 159.6 Q 2.5(,o)-.4 G 2.5(ro)-2.5 G -.15(ve)-2.65 G 2.5 (rat).15 G(elephone line where the computer answers your call.)-2.5 E F2 (Dir)72 183.6 Q(ectly-link)-.18 E(ed terminals)-.1 E F0 -.45(Tu)97 199.2 S(rn on your terminal and press the).45 E/F5 9/Times-Roman@0 SF(RETURN) 2.5 E F0 -.1(ke)2.5 G 3.8 -.65(y. Y)-.05 H(ou are no)-.45 E 2.5(wr)-.25 G(eady to login.)-2.5 E F2(Dial-up terminals)72 223.2 Q F0 .218 (If your terminal connects with the computer o)97 238.8 R -.15(ve)-.15 G 2.718(rat).15 G .219 (elephone line, turn on the terminal, dial the system access)-2.718 F (number)72 250.8 Q 3.828(,a)-.4 G 1.328(nd, when you hear a high-pitche\ d tone, place the telephone handset in the acoustic coupler)-3.828 F 3.827(,i)-.4 G 3.827(fy)-3.827 G 1.327(ou are)-3.827 F(using one.)72 262.8 Q -1.1(Yo)5 G 2.5(ua)1.1 G(re no)-2.5 E 2.5(wr)-.25 G (eady to login.)-2.5 E F2(Logging in)72 286.8 Q F0(The message in)97 302.4 Q(viting you to login is:)-.4 E(login:)144 320.4 Q -.8(Ty)72 342 S .009(pe your login name, which identi\214es you to).8 F F4(UNIX)2.509 E F0 2.509(,o)C 2.509(nt)-2.509 G .009 (he same line as the login message, and press)-2.509 F F4(RETURN)2.509 E F0 5.009(.I)C 2.509(ft)-5.009 G(he)-2.509 E .164 (terminal you are using has both upper and lo)72 354 R .164(wer case,) -.25 F F2 .163(be sur)2.664 F 2.663(ey)-.18 G .163(ou enter y)-2.913 F .163(our login name in lo)-.25 F .163(wer case;)-.1 F F0(otherwise)2.663 E F4(UNIX)72 366 Q F0 .161 (assumes your terminal has only upper case and will not recognize lo) 2.661 F .162(wer case letters you may type.)-.25 F F4(UNIX)5.162 E F0 (types)2.662 E -.74(``)72 378 S(login:').74 E 2.5('a)-.74 G (nd you reply with your login name, for e)-2.5 E(xample `)-.15 E (`susan')-.74 E(':)-.74 E(login:)144 396 Q F2(susan)2.5 E/F6 10 /Times-Italic@0 SF(\(and pr)2.5 E(ess the)-.37 E/F7 8/Times-Italic@0 SF (RETURN)2.5 E F6 -.1(ke)2.5 G(y\))-.2 E F0(\(In the e)72 414 Q (xamples, input you w)-.15 E(ould type appears in)-.1 E F2(bold face)2.5 E F0(to distinguish it from the responses from)2.5 E F4(UNIX)2.5 E F0 (.\))A F4(UNIX)97 429.6 Q F0 .237(will ne)2.737 F .237 (xt respond with a request for a passw)-.15 F .236 (ord as an additional precaution to pre)-.1 F -.15(ve)-.25 G .236 (nt unauthorized peo-).15 F .359(ple from using your account.)72 441.6 R .359(The passw)5.359 F .359 (ord will not appear when you type it, to pre)-.1 F -.15(ve)-.25 G .359 (nt others from seeing it.).15 F(The)5.359 E(message is:)72 453.6 Q -.15 (Pa)144 471.6 S(ssw).15 E(ord:)-.1 E F6(\(type your passwor)10 E 2.5(da) -.37 G(nd pr)-2.5 E(ess)-.37 E F7(RETURN)2.5 E F6(\))A F0(If an)72 489.6 Q 2.5(yo)-.15 G 2.5(ft)-2.5 G(he information you g)-2.5 E -2.25 -.2 (av e)-.05 H(during the login sequence w)2.7 E (as mistyped or incorrect,)-.1 E F4(UNIX)2.5 E F0(will respond with)2.5 E(Login incorrect.)144 507.6 Q(login:)144 522 Q .872 (in which case you should start the login process ane)72 540 R 4.672 -.65(w. A)-.25 H .871(ssuming that you ha).65 F 1.171 -.15(ve s)-.2 H .871(uccessfully logged in,).15 F F4(UNIX)3.371 E F0(will)3.371 E .313 (print the message of the day and e)72 552 R -.15(ve)-.25 G .313 (ntually will present you with a % at the be).15 F .313 (ginning of a fresh line.)-.15 F .313(The % is the)5.313 F F4(UNIX)72 564 Q F0(prompt symbol which tells you that)2.5 E F4(UNIX)2.5 E F0 (is ready to accept a command.)2.5 E F2(Asking f)72 588 Q(or)-.25 E F6 -4.438(ee)2.5 G -4.998(dd)4.438 G -2.778(ii)4.998 G -2.778(tt)2.778 G F0 -1.1(Yo)97 603.6 S 2.603(ua)1.1 G .103(re ready to tell)-2.603 F F4 (UNIX)2.602 E F0 .102(that you w)2.602 F .102(ant to w)-.1 F .102 (ork with edit, the te)-.1 F .102(xt editor)-.15 F 5.102(.N)-.55 G .602 -.25(ow i)-5.102 H 2.602(sac).25 G(on)-2.602 E -.15(ve)-.4 G .102 (nient time to choose).15 F 2.886(an)72 615.6 S .386 (ame for the \214le of te)-2.886 F .386(xt you are about to create.)-.15 F 1.986 -.8(To b)5.386 H -.15(eg).8 G .386 (in your editing session, type).15 F F2(edit)2.886 E F0(follo)2.886 E .386(wed by a space and)-.25 F 1.588(then the \214lename you ha)72 627.6 R 1.887 -.15(ve s)-.2 H 1.587(elected; for e).15 F 1.587(xample, `)-.15 F(`te)-.74 E(xt')-.15 E 4.087('. After)-.74 F 1.587(that, press the) 4.087 F F4(RETURN)4.087 E F0 -.1(ke)4.087 G 4.087(ya)-.05 G 1.587(nd w) -4.087 F 1.587(ait for edit')-.1 F(s)-.55 E(response:)72 639.6 Q(%)144 657.6 Q F2(edit text)2.5 E F6(\(followed by a)10 E F7(RETURN)2.5 E F6 (\))A F0("te)144 669.6 Q(xt" No such \214le or directory)-.15 E(:)144 681.6 Q .131(If you typed the command correctly)72 699.6 R 2.631(,y)-.65 G .131(ou will no)-2.631 F 2.631(wb)-.25 G 2.631(ei)-2.631 G 2.631(nc) -2.631 G .131(ommunication with edit.)-2.631 F .131 (Edit has set aside a b)5.131 F(uf)-.2 E .131(fer for use)-.25 F .366 (as a temporary w)72 711.6 R .366 (orking space during your current editing session.)-.1 F .365(Since `) 5.366 F(`te)-.74 E(xt')-.15 E 2.865('i)-.74 G 2.865(san)-2.865 G .865 -.25(ew \214)-2.865 H .365(le we are about to create).25 F(the editor w) 72 723.6 Q (as unable to \214nd that \214le, which it con\214rms by saying:)-.1 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 360.95(utorial USD:11-5)-.45 F ("te)144 84 Q(xt" No such \214le or directory)-.15 E .285(On the ne)72 102 R .285(xt line appears edit')-.15 F 2.785(sp)-.55 G .285(rompt `) -2.785 F(`:')-.74 E .285(', announcing that you are in)-.74 F/F1 10 /Times-Italic@0 SF .285(command mode)2.785 F F0 .286(and edit e)2.786 F .286(xpects a command)-.15 F(from you.)72 114 Q -1.1(Yo)5 G 2.5(um)1.1 G (ay no)-2.5 E 2.5(wb)-.25 G -.15(eg)-2.5 G(in to create the ne).15 E 2.5 <778c>-.25 G(le.)-2.5 E/F2 10/Times-Bold@0 SF(The `)72 138 Q (`Command not f)-.63 E(ound')-.25 E 2.5('m)-.63 G(essage)-2.5 E F0 (If you misspelled edit by typing, say)97 153.6 Q 2.5(,`)-.65 G (`editor')-3.24 E(', this might appear:)-.74 E(%)144 171.6 Q F2(editor) 2.5 E F0(editor: Command not found)144 183.6 Q(%)144 195.6 Q -1.1(Yo)72 213.6 S .119(ur mistak)1.1 F 2.619(ei)-.1 G 2.619(nc)-2.619 G .119 (alling edit `)-2.619 F(`editor')-.74 E 2.619('w)-.74 G .119 (as treated by)-2.719 F/F3 8/Times-Roman@0 SF(UNIX)2.619 E F0 .119 (as a request for a program named `)2.619 F(`editor')-.74 E 2.619 ('. Since)-.74 F .118(there is)2.618 F 1.267(no program named `)72 225.6 R(`editor')-.74 E(',)-.74 E F3(UNIX)3.767 E F0 1.267 (reported that the program w)3.767 F 1.267(as `)-.1 F 1.267(`not found') -.74 F 3.767('. A)-.74 F(ne)3.767 E 3.767(w%i)-.25 G 1.267 (ndicates that)-3.767 F F3(UNIX)3.767 E F0(is)3.767 E (ready for another command, and you may then enter the correct command.) 72 237.6 Q F2 2.5(As)72 261.6 S(ummary)-2.5 E F0 -1.1(Yo)97 277.2 S (ur e)1.1 E(xchange with)-.15 E F3(UNIX)2.5 E F0 (as you logged in and made contact with edit should look something lik) 2.5 E 2.5(et)-.1 G(his:)-2.5 E(login:)144 295.2 Q F2(susan)2.5 E F0 -.15 (Pa)144 307.2 S(ssw).15 E(ord:)-.1 E (... A Message of General Interest ...)144 319.2 Q(%)144 331.2 Q F2 (edit text)2.5 E F0("te)144 343.2 Q(xt" No such \214le or directory)-.15 E(:)144 355.2 Q F2(Entering text)72 385.2 Q F0 -1.1(Yo)97 400.8 S 3.312 (um)1.1 G .812(ay no)-3.312 F 3.312(wb)-.25 G -.15(eg)-3.312 G .812 (in entering te).15 F .812(xt into the b)-.15 F(uf)-.2 E(fer)-.25 E 5.812(.T)-.55 G .812(his is done by)-5.812 F F1(appending)3.311 E F0 .811(\(or adding\) te)3.311 F .811(xt to whate)-.15 F -.15(ve)-.25 G 3.311(ri).15 G(s)-3.311 E 1.135(currently in the b)72 412.8 R(uf)-.2 E (fer)-.25 E 6.135(.S)-.55 G 1.135(ince there is nothing in the b)-6.135 F(uf)-.2 E 1.136(fer at the moment, you are appending te)-.25 F 1.136 (xt to nothing; in)-.15 F(ef)72 424.8 Q .212 (fect, since you are adding te)-.25 F .212 (xt to nothing you are creating te)-.15 F 2.711(xt. Most)-.15 F .211 (edit commands ha)2.711 F .511 -.15(ve t)-.2 H .411 -.1(wo e).15 H(qui) .1 E -.25(va)-.25 G .211(lent forms: a).25 F -.1(wo)72 436.8 S .721 (rd that suggests what the command does, and a shorter abbre).1 F .721 (viation of that w)-.25 F 3.221(ord. Man)-.1 F 3.221(yb)-.15 G -.15(eg) -3.221 G .722(inners \214nd the full).15 F 1.552 (command names easier to remember at \214rst, b)72 448.8 R 1.552 (ut once you are f)-.2 F 1.552 (amiliar with editing you may prefer to type the)-.1 F 1.128 (shorter abbre)72 460.8 R 3.628(viations. The)-.25 F 1.128 (command to input te)3.628 F 1.128(xt is `)-.15 F(`append')-.74 E 3.628 ('. \(It)-.74 F 1.128(may be abbre)3.628 F 1.128(viated `)-.25 F(`a') -.74 E 3.628('.\) T)-.74 F(ype)-.8 E F2(append)3.629 E F0(and)3.629 E (press the)72 472.8 Q F3(RETURN)2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G(%) 144 490.8 Q F2(edit text)2.5 E F0(:)144 502.8 Q F2(append)1.666 E (Messages fr)72 532.8 Q(om)-.18 E F1 -4.438(ee)2.5 G -4.998(dd)4.438 G -2.778(ii)4.998 G -2.778(tt)2.778 G F0 1.585(If you mak)97 548.4 R 4.085 (eam)-.1 G(istak)-4.085 E 4.085(ei)-.1 G 4.085(ne)-4.085 G 1.585(nterin\ g a command and type something that edit does not recognize, edit will) -4.085 F 1.065 (respond with a message intended to help you diagnose your error)72 560.4 R 6.066(.F)-.55 G 1.066(or e)-6.216 F 1.066 (xample, if you misspell the command to)-.15 F(input te)72 572.4 Q (xt by typing, perhaps, `)-.15 E(`add')-.74 E 2.5('i)-.74 G(nstead of `) -2.5 E(`append')-.74 E 2.5('o)-.74 G 2.5(r`)-2.5 G(`a')-3.24 E (', you will recei)-.74 E .3 -.15(ve t)-.25 H(his message:).15 E(:)144 590.4 Q F2(add)1.666 E F0(add: Not an editor command)144 602.4 Q(:)144 614.4 Q .889(When you recei)72 632.4 R 1.189 -.15(ve a d)-.25 H .889(ia\ gnostic message, check what you typed in order to determine what part o\ f your command).15 F .288(confused edit.)72 644.4 R .288 (The message abo)5.288 F .588 -.15(ve m)-.15 H .288(eans that edit w).15 F .288(as unable to recognize your mistyped command and, therefore,)-.1 F(did not e)72 656.4 Q -.15(xe)-.15 G(cute it.).15 E(Instead, a ne)5 E 2.5(w`)-.25 G(`:')-3.24 E 2.5('a)-.74 G(ppeared to let you kno)-2.5 E 2.5(wt)-.25 G(hat edit is ag)-2.5 E(ain ready to e)-.05 E -.15(xe)-.15 G (cute a command.).15 E F2 -.92(Te)72 680.4 S(xt input mode).92 E F0 .617 (By gi)97 696 R .617(ving the command `)-.25 F(`append')-.74 E 3.117 ('\()-.74 G .617(or using the abbre)-3.117 F .617(viation `)-.25 F(`a') -.74 E .617('\), you entered)-.74 F F1(te)3.117 E .617(xt input mode)-.2 F(,)-.1 E F0 .616(also kno)3.116 F(wn)-.25 E(as)72 708 Q F1 1.579 (append mode)4.078 F(.)-.15 E F0 1.579(When you enter te)6.579 F 1.579 (xt input mode, edit stops sending you a prompt.)-.15 F -1.1(Yo)6.579 G 4.079(uw)1.1 G 1.579(ill not recei)-4.079 F 1.879 -.15(ve a)-.25 H -.15 (ny).15 G .034(prompts or error messages while in te)72 720 R .034 (xt input mode.)-.15 F -1.1(Yo)5.034 G 2.534(uc)1.1 G .033 (an enter pretty much an)-2.534 F .033(ything you w)-.15 F .033 (ant on the lines.)-.1 F(The)5.033 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 360.95(USD:11-6 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E .731(lines are transmitted one by one to the b)72 84 R (uf)-.2 E .731(fer and held there during the editing session.)-.25 F -1.1(Yo)5.731 G 3.231(um)1.1 G .731(ay append as much)-3.231 F(te)72 96 Q .141(xt as you w)-.15 F .141(ant, and)-.1 F/F1 10/Times-Italic@0 SF .141(when you wish to stop entering te)2.641 F .14 (xt lines you should type a period as the only c)-.2 F(har)-.15 E .14 (acter on the)-.15 F 1.57(line and pr)72 108 R 1.57(ess the)-.37 F/F2 8 /Times-Italic@0 SF(RETURN)4.07 E F1 -.1(ke)4.07 G -.55(y.)-.2 G F0 1.57 (When you type the period and press)7.12 F/F3 8/Times-Roman@0 SF(RETURN) 4.07 E F0 4.07(,y)C 1.571(ou signal that you w)-4.07 F 1.571 (ant to stop)-.1 F .995(appending te)72 120 R .995 (xt, and edit responds by allo)-.15 F .995(wing you to e)-.25 F .994 (xit te)-.15 F .994(xt input mode and reenter command mode.)-.15 F .994 (Edit will)5.994 F(ag)72 132 Q (ain prompt you for a command by printing `)-.05 E(`:')-.74 E('.)-.74 E (Lea)97 147.6 Q .189(ving append mode does not destro)-.2 F 2.689(yt)-.1 G .189(he te)-2.689 F .189(xt in the b)-.15 F(uf)-.2 E(fer)-.25 E 5.19 (.Y)-.55 G .19(ou ha)-6.29 F .49 -.15(ve t)-.2 H 2.69(ol).15 G(ea)-2.69 E .49 -.15(ve a)-.2 H .19(ppend mode to do an).15 F 2.69(yo)-.15 G 2.69 (ft)-2.69 G(he)-2.69 E .286 (other kinds of editing, such as changing, adding, or printing te)72 159.6 R 2.786(xt. If)-.15 F .285 (you type a period as the \214rst character and type)2.786 F(an)72 171.6 Q 2.971(yo)-.15 G .472(ther character on the same line, edit will belie) -2.971 F .772 -.15(ve y)-.25 H .472(ou w).15 F .472 (ant to remain in append mode and will not let you out.)-.1 F (As this can be v)72 183.6 Q(ery frustrating, be sure to type)-.15 E/F4 10/Times-Bold@0 SF(only)2.5 E F0(the period and the)2.5 E F3(RETURN)2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G .239(This is a good place to learn an \ important lesson about computers and te)97 199.2 R 2.738(xt: a)-.15 F .238(blank space is a character as f)2.738 F(ar)-.1 E .243 (as a computer is concerned.)72 211.2 R .243 (If you so much as type a period follo)5.243 F .244 (wed by a blank \(that is, type a period and then the)-.25 F (space bar on the k)72 223.2 Q -.15(ey)-.1 G (board\), you will remain in append mode with the last line of te).15 E (xt being:)-.15 E/F5 12/Times-Bold@0 SF(.)144 241.2 Q F0(Let')72 259.2 Q 2.5(ss)-.55 G(ay that you enter the lines \(try to type)-2.5 E F4 (exactly)2.5 E F0(what you see, including `)2.5 E(`thiss')-.74 E('\):) -.74 E F4(This is some sample text.)144 277.2 Q(And thiss is some mor) 144 289.2 Q 2.5(et)-.18 G(ext.)-2.5 E -.92(Te)144 301.2 S (xt editing is strange, b).92 E(ut nice.)-.2 E(.)144 313.2 Q F0 (The last line is the period follo)72 331.2 Q(wed by a)-.25 E F3(RETURN) 2.5 E F0(that gets you out of append mode.)2.5 E F4(Making corr)72 355.2 Q(ections)-.18 E F0 .086(If you ha)97 370.8 R .386 -.15(ve r)-.2 H .086 (ead a general introduction to).15 F F3(UNIX)2.586 E F0 2.586(,y)C .086 (ou will recall that it is possible to erase indi)-2.586 F .085 (vidual letters that)-.25 F 1.052(you ha)72 382.8 R 1.352 -.15(ve t)-.2 H 3.552(yped. This).15 F 1.053 (is done by typing the designated erase character as man)3.552 F 3.553 (yt)-.15 G 1.053(imes as there are characters you)-3.553 F -.1(wa)72 394.8 S(nt to erase.).1 E .178(The usual erase character v)97 410.4 R .178(aries from place to place and user to user)-.25 F 5.178(.O)-.55 G .178(ften it is the backspace \(control-H\), so)-5.178 F 1.092 (you can correct typing errors in the line you are typing by holding do) 72 422.4 R 1.093(wn the)-.25 F/F6 9/Times-Roman@0 SF(CTRL)3.593 E F0 -.1 (ke)3.593 G 3.593(ya)-.05 G 1.093(nd typing the `)-3.593 F(`H')-.74 E 3.593('k)-.74 G -.15(ey)-3.693 G(.)-.5 E .783 (\(Sometimes it is the DEL k)72 434.4 R -.15(ey)-.1 G 3.283(.\) If)-.5 F .782(you type the erase character you will notice that the terminal bac\ kspaces in the)3.283 F(line you are on.)72 446.4 Q -1.1(Yo)5 G 2.5(uc) 1.1 G(an backspace o)-2.5 E -.15(ve)-.15 G 2.5(ry).15 G(our error)-2.5 E 2.5(,a)-.4 G(nd then type what you w)-2.5 E (ant to be the rest of the line.)-.1 E .56(If you mak)97 462 R 3.061 (eab)-.1 G .561(ad start in a line and w)-3.061 F .561(ould lik)-.1 F 3.061(et)-.1 G 3.061(ob)-3.061 G -.15(eg)-3.061 G .561(in ag).15 F .561 (ain, you can either backspace to the be)-.05 F .561(ginning of)-.15 F (the line or you can use the at-sign `)72 474 Q(`@')-.74 E 2.5('t)-.74 G 2.5(oe)-2.5 G(rase e)-2.5 E -.15(ve)-.25 G(rything on the line:).15 E F4 -.92(Te)144 492 S(xt edtiing is strange, b).92 E(ut@)-.2 E -.92(Te)144 504 S(xt editing is strange, b).92 E(ut nice.)-.2 E F0 .217 (When you type the at-sign \(@\), you erase the entire line typed so f) 72 522 R .217(ar and are gi)-.1 F -.15(ve)-.25 G 2.717(naf).15 G .217 (resh line to type on.)-2.717 F -1.1(Yo)5.217 G 2.717(um)1.1 G(ay)-2.717 E .617(immediately be)72 534 R .617(gin to retype the line.)-.15 F .618 (This, unfortunately)5.618 F 3.118(,d)-.65 G .618(oes not w)-3.118 F .618(ork after you type the line and press)-.1 F F3(RETURN)3.118 E F0(.) A 2.341 -.8(To m)72 546 T(ak).8 E 3.241(ec)-.1 G .741 (orrections in lines that ha)-3.241 F 1.041 -.15(ve b)-.2 H .74 (een completed, it is necessary to use the editing commands co).15 F -.15(ve)-.15 G .74(red in the).15 F(ne)72 558 Q(xt sessions.)-.15 E F4 (Writing text to disk)72 582 Q F0 -1.1(Yo)97 597.6 S 2.719(ua)1.1 G .219 (re no)-2.719 F 2.719(wr)-.25 G .219(eady to edit the te)-2.719 F 2.719 (xt. One)-.15 F .219(common operation is to write the te)2.719 F .219 (xt to disk as a \214le for safek)-.15 F(eeping)-.1 E .902 (after the session is o)72 609.6 R -.15(ve)-.15 G 4.502 -.55(r. T).15 H .902(his is the only w).55 F .902(ay to sa)-.1 F 1.202 -.15(ve i)-.2 H .902(nformation from one session to the ne).15 F .901 (xt, since the editor')-.15 F(s)-.55 E -.2(bu)72 621.6 S -.25(ff).2 G .175(er is temporary and will last only until the end of the editing se\ ssion.).25 F .175(Learning ho)5.175 F 2.675(wt)-.25 G 2.675(ow)-2.675 G .175(rite a \214le to disk is sec-)-2.675 F 1.297 (ond in importance only to entering the te)72 633.6 R 3.797(xt. T)-.15 F 3.797(ow)-.8 G 1.297(rite the contents of the b)-3.797 F(uf)-.2 E 1.296 (fer to a disk \214le, use the command)-.25 F -.74(``)72 645.6 S(write') .74 E 2.5('\()-.74 G(or its abbre)-2.5 E(viation `)-.25 E(`w')-.74 E ('\):)-.74 E(:)144 663.6 Q F4(write)1.666 E F0 .516(Edit will cop)72 681.6 R 3.016(yt)-.1 G .516(he contents of the b)-3.016 F(uf)-.2 E .516 (fer to a disk \214le.)-.25 F .516(If the \214le does not yet e)5.516 F .516(xist, a ne)-.15 F 3.016<778c>-.25 G .516(le will be created auto-) -3.016 F .304(matically and the presence of a `)72 693.6 R(`[Ne)-.74 E 2.804<778c>-.25 G(le]')-2.804 E 2.804('w)-.74 G .304(ill be noted.) -2.804 F .304(The ne)5.304 F .303(wly-created \214le will be gi)-.25 F -.15(ve)-.25 G 2.803(nt).15 G .303(he name speci\214ed)-2.803 F .128 (when you entered the editor)72 705.6 R 2.628(,i)-.4 G 2.628(nt)-2.628 G .128(his case `)-2.628 F(`te)-.74 E(xt')-.15 E 2.628('. T)-.74 F 2.628 (oc)-.8 G .128 (on\214rm that the disk \214le has been successfully written, edit will) -2.628 F .642(repeat the \214lename and gi)72 717.6 R .942 -.15(ve t) -.25 H .642 (he number of lines and the total number of characters in the \214le.) .15 F .642(The b)5.642 F(uf)-.2 E .642(fer remains)-.25 F .282 (unchanged by the `)72 729.6 R(`write')-.74 E 2.783('c)-.74 G 2.783 (ommand. All)-2.783 F .283 (of the lines that were written to disk will still be in the b)2.783 F (uf)-.2 E(fer)-.25 E 2.783(,s)-.4 G .283(hould you)-2.783 F EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 360.95(utorial USD:11-7)-.45 F -.1(wa)72 84 S(nt to modify or add to them.).1 E .202(Edit must ha)97 99.6 R .502 -.15(ve a n)-.2 H .202(ame for the \214le to be written.).15 F .201(If you for)5.201 F .201 (got to indicate the name of the \214le when you be)-.18 F -.05(ga)-.15 G(n).05 E(to edit, edit will print in response to your write command:)72 111.6 Q(No current \214lename)144 129.6 Q (If this happens, you can specify the \214lename in a ne)72 147.6 Q 2.5 (ww)-.25 G(rite command:)-2.5 E(:)144 165.6 Q/F1 10/Times-Bold@0 SF (write text)1.666 E F0(After the `)72 183.6 Q(`write')-.74 E 2.5('\() -.74 G(or `)-2.5 E(`w')-.74 E ('\), type a space and then the name of the \214le.)-.74 E F1 (Signing off)72 207.6 Q F0 1.985 -.8(We h)97 223.2 T -2.25 -.2(av e).8 H .385(done enough for this \214rst lesson on using the)3.085 F/F2 8 /Times-Roman@0 SF(UNIX)2.885 E F0(te)2.885 E .385(xt editor)-.15 F 2.885 (,a)-.4 G .385(nd are ready to quit the session with)-2.885 F 2.5 (edit. T)72 235.2 R 2.5(od)-.8 G 2.5(ot)-2.5 G(his we type `)-2.5 E (`quit')-.74 E 2.5('\()-.74 G(or `)-2.5 E(`q')-.74 E('\) and press)-.74 E F2(RETURN)2.5 E F0(:)A(:)144 253.2 Q F1(write)1.666 E F0("te)144 265.2 Q(xt" [Ne)-.15 E 2.5<778c>-.25 G 2.5(le] 3)-2.5 F(lines, 90 characters) 2.5 E(:)144 277.2 Q F1(quit)1.666 E F0(%)144 289.2 Q .759(The % is from) 72 307.2 R F2(UNIX)3.259 E F0 .759 (to tell you that your session with edit is o)3.259 F -.15(ve)-.15 G 3.258(ra).15 G .758(nd you may command)-3.258 F F2(UNIX)3.258 E F0 (further)3.258 E 5.758(.S)-.55 G .758(ince we)-5.758 F -.1(wa)72 319.2 S .82(nt to end the entire session at the terminal, we also need to e).1 F .82(xit from)-.15 F F2(UNIX)3.32 E F0 5.82(.I)C 3.321(nr)-5.82 G .821 (esponse to the)-3.321 F F2(UNIX)3.321 E F0 .821(prompt of)3.321 F .646 -.74(`` % '')72 331.2 T(type the command)3.24 E(%)144 349.2 Q F1(logout) 1.666 E F0 .77(This will end your session with)72 367.2 R F2(UNIX)3.27 E F0 3.27(,a)C .77(nd will ready the terminal for the ne)-3.27 F .77 (xt user)-.15 F 5.77(.I)-.55 G 3.27(ti)-5.77 G 3.27(sa)-3.27 G -.1(lwa) -3.27 G .769(ys important to type).1 F F1(logout)72 379.2 Q F0 .619 (at the end of a session to mak)3.119 F 3.119(ea)-.1 G .62(bsolutely su\ re no one could accidentally stumble into your abandoned ses-)-3.119 F (sion and thus g)72 391.2 Q(ain access to your \214les, tempting e)-.05 E -.15(ve)-.25 G 2.5(nt).15 G(he most honest of souls.)-2.5 E (This is the end of the \214rst session on)97 418.8 Q F2(UNIX)2.5 E F0 (te)2.5 E(xt editing.)-.15 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 360.95(USD:11-8 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 12/Times-Bold@0 SF(Session 2)282.828 87 Q F0 (Login with)97 117.6 Q/F2 8/Times-Roman@0 SF(UNIX)2.5 E F0 (as in the \214rst session:)2.5 E(login:)144 135.6 Q/F3 10/Times-Bold@0 SF(susan)2.5 E/F4 10/Times-Italic@0 SF(\(carria)5 E .2 -.1(ge r)-.1 H (eturn\))-.27 E F0 -.15(Pa)144 147.6 S(ssw).15 E(ord:)-.1 E F4 (\(give passwor)17.5 E 2.5(da)-.37 G(nd carria)-2.5 E .2 -.1(ge r)-.1 H (eturn\))-.27 E F0(... A Message of General Interest ...)144 162 Q(%)144 174 Q .721(When you indicate you w)72 192 R .721 (ant to edit, you can specify the name of the \214le you w)-.1 F(ork)-.1 E .72(ed on last time.)-.1 F .72(This will start)5.72 F .75(edit w)72 204 R .75 (orking, and it will fetch the contents of the \214le into the b)-.1 F (uf)-.2 E(fer)-.25 E 3.25(,s)-.4 G 3.25(ot)-3.25 G .75 (hat you can resume editing the same \214le.)-3.25 F .147 (When edit has copied the \214le into the b)72 216 R(uf)-.2 E(fer)-.25 E 2.647(,i)-.4 G 2.647(tw)-2.647 G .146 (ill repeat its name and tell you the number of lines and characters it) -2.647 F 2.5(contains. Thus,)72 228 R F3 2.5(%e)144 246 S(dit text)-2.5 E F0("te)144 258 Q(xt" 3 lines, 90 characters)-.15 E(:)144 270 Q .444 (means you ask)72 288 R .444(ed edit to fetch the \214le named `)-.1 F (`te)-.74 E(xt')-.15 E 2.944('f)-.74 G .445 (or editing, causing it to cop)-2.944 F 2.945(yt)-.1 G .445 (he 90 characters of te)-2.945 F .445(xt into the)-.15 F -.2(bu)72 300 S -.25(ff).2 G(er).25 E 5.185(.E)-.55 G .185(dit a)-5.185 F -.1(wa)-.15 G .185(its your further instructions, and indicates this by its prompt ch\ aracter).1 F 2.684(,t)-.4 G .184(he colon \(:\).)-2.684 F .184 (In this session,)5.184 F(we will append more te)72 312 Q (xt to our \214le, print the contents of the b)-.15 E(uf)-.2 E(fer)-.25 E 2.5(,a)-.4 G(nd learn to change the te)-2.5 E(xt of a line.)-.15 E F3 (Adding mor)72 336 Q 2.5(et)-.18 G(ext to the \214le)-2.5 E F0 .862 (If you w)97 351.6 R .862(ant to add more to the end of your te)-.1 F .863(xt you may do so by using the append command to enter te)-.15 F(xt) -.15 E .381(input mode.)72 363.6 R .381(When `)5.381 F(`append')-.74 E 2.881('i)-.74 G 2.881(st)-2.881 G .38(he \214rst command of your editin\ g session, the lines you enter are placed at the end)-2.881 F(of the b) 72 375.6 Q(uf)-.2 E(fer)-.25 E 5(.H)-.55 G(ere we')-5 E (ll use the abbre)-.1 E(viation for the append command, `)-.25 E(`a') -.74 E(':)-.74 E(:)144 393.6 Q F3(a)1.666 E (This is text added in Session 2.)144 405.6 Q(It doesn't mean much her) 144 417.6 Q(e, b)-.18 E(ut)-.2 E(it does illustrate the editor)144 429.6 Q(.)-1 E F1(.)145.666 441.6 Q F0 -1.1(Yo)72 459.6 S 3.317(um)1.1 G .817 (ay recall that once you enter append mode using the `)-3.317 F(`a')-.74 E 3.317('\()-.74 G .817(or `)-3.317 F(`append')-.74 E .817 ('\) command, you need to type a line)-.74 F (containing only a period \(.\))72 471.6 Q(to e)5 E(xit append mode.) -.15 E F3(Interrupt)72 495.6 Q F0 .25(Should you press the)97 511.2 R F2 -.32(RU)2.75 G(B).32 E F0 -.1(ke)2.75 G 2.75(y\()-.05 G .25 (sometimes labelled)-2.75 F F2(DELETE)2.75 E F0 2.75(\)w)C .25(hile w) -2.75 F .249(orking with edit, it will send this message)-.1 F(to you:) 72 523.2 Q(Interrupt)144 541.2 Q(:)144 553.2 Q(An)72 571.2 Q 3.646(yc) -.15 G 1.146(ommand that edit might be e)-3.646 F -.15(xe)-.15 G 1.146(\ cuting is terminated by rub or delete, causing edit to prompt you for a\ ne).15 F(w)-.25 E 3.183(command. If)72 583.2 R .683 (you are appending te)3.183 F .683(xt at the time, you will e)-.15 F .682(xit from append mode and be e)-.15 F .682(xpected to gi)-.15 F .982 -.15(ve a)-.25 H(nother).15 E 2.806(command. The)72 595.2 R .306 (line of te)2.806 F .306(xt you were typing when the append command w) -.15 F .307(as interrupted will not be entered into the)-.1 F -.2(bu)72 607.2 S -.25(ff).2 G(er).25 E(.)-.55 E F3(Making corr)72 631.2 Q (ections)-.18 E F0 .048(If while typing the line you hit an incorrect k) 97 646.8 R -.15(ey)-.1 G 2.548(,r)-.5 G .048 (ecall that you may delete the incorrect character or cancel the)-2.548 F .237(entire line of input by erasing in the usual w)72 658.8 R(ay)-.1 E 5.237(.R)-.65 G .237(efer either to the last fe)-5.237 F 2.737(wp)-.25 G .237(ages of Session 1 if you need to re)-2.737 F(vie)-.25 E(w)-.25 E 1.069(the procedures for making a correction.)72 670.8 R 1.068(The most\ important idea to remember is that erasing a character or can-)6.069 F (celling a line must be done before you press the)72 682.8 Q F2(RETURN) 2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 360.95(utorial USD:11-9)-.45 F /F1 10/Times-Bold@0 SF(Listing what')72 84 Q 2.5(si)-.37 G 2.5(nt)-2.5 G (he b)-2.5 E(uffer \(p\))-.2 E F0(Ha)97 99.6 Q .913(ving appended te)-.2 F .913(xt to what you wrote in Session 1, you might w)-.15 F .914 (ant to see all the lines in the b)-.1 F(uf)-.2 E(fer)-.25 E 5.914(.T) -.55 G(o)-6.714 E(print the contents of the b)72 111.6 Q(uf)-.2 E(fer) -.25 E 2.5(,t)-.4 G(ype the command:)-2.5 E(:)144 129.6 Q F1(1,$p)1.666 E F0 .318(The `)72 147.6 R(`1')-.74 E .318 ('\207 stands for line 1 of the b)-.74 F(uf)-.2 E(fer)-.25 E 2.818(,t) -.4 G .317(he `)-2.818 F(`$')-.74 E 2.817('i)-.74 G 2.817(sas)-2.817 G .317(pecial symbol designating the last line of the b)-2.817 F(uf)-.2 E (fer)-.25 E 2.817(,a)-.4 G .317(nd `)-2.817 F(`p')-.74 E(')-.74 E(\(or) 72 159.6 Q F1(print)2.5 E F0 2.5(\)i)C 2.5(st)-2.5 G (he command to print from line 1 to the end of the b)-2.5 E(uf)-.2 E (fer)-.25 E 5(.T)-.55 G(he command `)-5 E(`1,$p')-.74 E 2.5('g)-.74 G -2.15 -.25(iv e)-2.5 H 2.5(sy).25 G(ou:)-2.5 E(This is some sample te) 144 177.6 Q(xt.)-.15 E(And thiss is some more te)144 189.6 Q(xt.)-.15 E -1.25 -.7(Te x)144 201.6 T 2.5(te).7 G(diting is strange, b)-2.5 E (ut nice.)-.2 E(This is te)144 213.6 Q(xt added in Session 2.)-.15 E (It doesn')144 225.6 Q 2.5(tm)-.18 G(ean much here, b)-2.5 E(ut)-.2 E (it does illustrate the editor)144 237.6 Q(.)-.55 E(Occasionally)72 255.6 Q 2.705(,y)-.65 G .206 (ou may accidentally type a character that can')-2.705 F 2.706(tb)-.18 G 2.706(ep)-2.706 G .206(rinted, which can be done by striking a k)-2.706 F .506 -.15(ey w)-.1 H(hile).15 E(the)72 267.6 Q/F2 8/Times-Roman@0 SF (CTRL)2.906 E F0 -.1(ke)2.906 G 2.906(yi)-.05 G 2.906(sp)-2.906 G 2.906 (ressed. In)-2.906 F .406 (printing lines, edit uses a special notation to sho)2.906 F 2.906(wt) -.25 G .406(he e)-2.906 F .405(xistence of non-printing charac-)-.15 F 3.415(ters. Suppose)72 279.6 R .916 (you had introduced the non-printing character `)3.415 F(`control-A)-.74 E 2.396 -.74('' i)-1.11 H .916(nto the w).74 F .916(ord `)-.1 F (`illustrate')-.74 E 3.416('b)-.74 G 3.416(ya)-3.416 G(ccidently)-3.416 E .121(pressing the)72 291.6 R F2(CTRL)2.621 E F0 -.1(ke)2.621 G 2.621 (yw)-.05 G .121(hile typing `)-2.621 F(`a')-.74 E 2.621('. This)-.74 F .121(can happen on man)2.621 F 2.621(yt)-.15 G .121 (erminals because the)-2.621 F F2(CTRL)2.62 E F0 -.1(ke)2.62 G 2.62(ya) -.05 G .12(nd the `)-2.62 F -.8(`A)-.74 G 1.6 -.74('' k)-.31 H -.15(ey) .64 G .421(are beside each other)72 303.6 R 5.421(.I)-.55 G 2.921(fy) -5.421 G .421(our \214nger presses between the tw)-2.921 F 2.921(ok)-.1 G -.15(ey)-3.021 G .421(s, control-A results.).15 F .421(When ask)5.421 F .421(ed to print the con-)-.1 F(tents of the b)72 315.6 Q(uf)-.2 E (fer)-.25 E 2.5(,e)-.4 G(dit w)-2.5 E(ould display)-.1 E (it does illustr^Ate the editor)144 333.6 Q(.)-.55 E 1.913 -.8(To r)72 351.6 T .312(epresent the control-A, edit sho).8 F .312(ws `)-.25 F(`^A) -.74 E -.74('')-1.11 G 5.312(.T).74 G .312(he sequence `)-5.312 F(`^') -.74 E 2.812('f)-.74 G(ollo)-2.812 E .312 (wed by a capital letter stands for the one char)-.25 F(-)-.2 E .744 (acter entered by holding do)72 363.6 R .744(wn the)-.25 F F2(CTRL)3.244 E F0 -.1(ke)3.244 G 3.244(ya)-.05 G .744 (nd typing the letter which appears after the `)-3.244 F(`^')-.74 E 3.245('. W)-.74 F(e')-.8 E .745(ll soon discuss)-.1 F (the commands that can be used to correct this typing error)72 375.6 Q (.)-.55 E .385(In looking o)97 391.2 R -.15(ve)-.15 G 2.884(rt).15 G .384(he te)-2.884 F .384(xt we see that `)-.15 F(`this')-.74 E 2.884('i) -.74 G 2.884(st)-2.884 G .384(yped as `)-2.884 F(`thiss')-.74 E 2.884 ('i)-.74 G 2.884(nt)-2.884 G .384 (he second line, a deliberate error so we can)-2.884 F(learn to mak)72 403.2 Q 2.5(ec)-.1 G 2.5(orrections. Let')-2.5 F 2.5(sc)-.55 G (orrect the spelling.)-2.5 E F1(Finding things in the b)72 427.2 Q (uffer)-.2 E F0 .867(In order to change something in the b)97 442.8 R (uf)-.2 E .867(fer we \214rst need to \214nd it.)-.25 F 2.467 -.8(We c) 5.867 H .867(an \214nd `).8 F(`thiss')-.74 E 3.368('i)-.74 G 3.368(nt) -3.368 G .868(he te)-3.368 F .868(xt we ha)-.15 F -.15(ve)-.2 G .445 (entered by looking at a listing of the lines.)72 454.8 R(Ph)5.445 E .445(ysically speaking, we search the lines of te)-.05 F .445 (xt looking for `)-.15 F(`thiss')-.74 E 2.945('a)-.74 G(nd)-2.945 E (stop searching when we ha)72 466.8 Q .3 -.15(ve f)-.2 H(ound it.).15 E (The w)5 E(ay to tell edit to search for something is to type it inside\ slash marks:)-.1 E(:)144 484.8 Q F1(/thiss/)1.666 E F0 .352(By typing) 72 502.8 R F1(/thiss/)2.852 E F0 .353(and pressing)2.852 F/F3 9 /Times-Roman@0 SF(RETURN)2.853 E F0 2.853(,y)C .353 (ou instruct edit to search for `)-2.853 F(`thiss')-.74 E 2.853('. If) -.74 F .353(you ask edit to look for a pattern)2.853 F .44 (of characters which it cannot \214nd in the b)72 514.8 R(uf)-.2 E(fer) -.25 E 2.94(,i)-.4 G 2.939(tw)-2.94 G .439(ill respond `)-2.939 F(`P) -.74 E .439(attern not found')-.15 F 2.939('. When)-.74 F .439 (edit \214nds the characters)2.939 F -.74(``)72 526.8 S(thiss').74 E (', it will print the line of te)-.74 E(xt for your inspection:)-.15 E (And thiss is some more te)144 544.8 Q(xt.)-.15 E(Edit is no)72 562.8 Q 2.5(wp)-.25 G(ositioned in the b)-2.5 E(uf)-.2 E (fer at the line it just printed, ready to mak)-.25 E 2.5(eac)-.1 G (hange in the line.)-2.5 E .32 LW 144 710 72 710 DL F2 (\207The numeral `)72 720 Q(`one')-.592 E 2('i)-.592 G 2(st)-2 G (he top left-most k)-2 E -.12(ey)-.08 G 2(,a)-.4 G (nd should not be confused with the letter `)-2 E(`el')-.592 E('.)-.592 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-10 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 10/Times-Bold@0 SF(The curr)72 84 Q(ent line)-.18 E F0 .463(Edit k)97 99.6 R .463(eeps track of the line in the b)-.1 F(uf) -.2 E .463 (fer where it is located at all times during an editing session.)-.25 F .464(In general,)5.464 F .705(the line that has been most recently prin\ ted, entered, or changed is the current location in the b)72 111.6 R(uf) -.2 E(fer)-.25 E 5.704(.T)-.55 G .704(he editor is)-5.704 F (prepared to mak)72 123.6 Q 2.5(ec)-.1 G (hanges at the current location in the b)-2.5 E(uf)-.2 E(fer)-.25 E 2.5 (,u)-.4 G(nless you direct it to another location.)-2.5 E .139 (In particular)97 139.2 R 2.639(,w)-.4 G .139 (hen you bring a \214le into the b)-2.639 F(uf)-.2 E(fer)-.25 E 2.639 (,y)-.4 G .14 (ou will be located at the last line in the \214le, where the edi-) -2.639 F .942(tor left of)72 151.2 R 3.442(fc)-.25 G(op)-3.442 E .942 (ying the lines from the \214le to the b)-.1 F(uf)-.2 E(fer)-.25 E 5.942 (.I)-.55 G 3.442(fy)-5.942 G .942(our \214rst editing command is `) -3.442 F(`append')-.74 E .941(', the lines you)-.74 F(enter are added t\ o the end of the \214le, after the current line \212 the last line in t\ he \214le.)72 163.2 Q -1.1(Yo)97 178.8 S 2.513(uc)1.1 G .013 (an refer to your current location in the b)-2.513 F(uf)-.2 E .013 (fer by the symbol period \(.\) usually kno)-.25 F .013 (wn by the name `)-.25 F(`dot')-.74 E('.)-.74 E(If you type `)72 190.8 Q (`.)-.74 E 1.48 -.74('' a)-.7 H(nd carriage return you will be instruct\ ing edit to print the current line:).74 E(:)144 208.8 Q/F2 12 /Times-Bold@0 SF(.)1.666 E F0(And thiss is some more te)144 220.8 Q(xt.) -.15 E .484(If you w)97 242.4 R .484(ant to kno)-.1 F 2.984(wt)-.25 G .484(he number of the current line, you can type)-2.984 F F1(.=)2.984 E F0 .484(and press)2.984 F/F3 8/Times-Roman@0 SF(RETURN)2.984 E F0 2.983 (,a)C .483(nd edit will respond)-2.983 F(with the line number:)72 254.4 Q(:)144 272.4 Q F2(.)1.666 E F1(=)A F0(2)144 284.4 Q (If you type the number of an)72 302.4 Q 2.5(yl)-.15 G(ine and press) -2.5 E F3(RETURN)2.5 E F0 2.5(,e)C (dit will position you at that line and print its contents:)-2.5 E(:)144 320.4 Q F1(2)1.666 E F0(And thiss is some more te)144 332.4 Q(xt.)-.15 E -1.1(Yo)72 350.4 S 2.5(us)1.1 G(hould e)-2.5 E (xperiment with these commands to g)-.15 E(ain e)-.05 E (xperience in using them to mak)-.15 E 2.5(ec)-.1 G(hanges.)-2.5 E F1 (Numbering lines \(nu\))72 374.4 Q F0(The)97 390 Q F1 .661 (number \(nu\))3.161 F F0 .661(command is similar to print, gi)3.161 F .661(ving both the number and the te)-.25 F .661 (xt of each printed line.)-.15 F -.8(To)5.662 G (see the number and the te)72 402 Q(xt of the current line type)-.15 E (:)144 420 Q F1(nu)1.666 E F0 10(2A)169 432 S(nd thiss is some more te) -10 E(xt.)-.15 E 1.106(Note that the shortest abbre)72 450 R 1.105 (viation for the number command is `)-.25 F(`nu')-.74 E 3.605('\()-.74 G 1.105(and not `)-3.605 F(`n')-.74 E 1.105(', which is used for a dif) -.74 F(ferent)-.25 E 3.325(command\). Y)72 462 R .825(ou may specify a \ range of lines to be listed by the number command in the same w)-1.1 F .826(ay that lines are)-.1 F(speci\214ed for print.)72 474 Q -.15(Fo)5 G 2.5(re).15 G(xample,)-2.65 E F1(1,$nu)2.5 E F0(lists all lines in the b) 2.5 E(uf)-.2 E(fer with their corresponding line numbers.)-.25 E F1 (Substitute command \(s\))72 498 Q F0(No)97 513.6 Q 2.509(wt)-.25 G .009 (hat you ha)-2.509 F .308 -.15(ve f)-.2 H .008(ound the misspelled w).15 F .008(ord, you can change it from `)-.1 F(`thiss')-.74 E 2.508('t)-.74 G 2.508(o`)-2.508 G(`this')-3.248 E 2.508('. As)-.74 F -.1(fa)2.508 G 2.508(ra).1 G 2.508(se)-2.508 G .008(dit is con-)-2.508 F .211(cerned, \ changing things is a matter of substituting one thing for another)72 525.6 R 5.211(.A)-.55 G(s)-5.211 E/F4 10/Times-Italic@0 SF(a)2.711 E F0 .211(stood for)2.711 F F4(append,)2.711 E F0(so)2.711 E F4(s)2.711 E F0 .211(stands for)2.711 F F4(sub-)2.711 E(stitute)72 537.6 Q(.)-.15 E F0 1.693 -.8(We w)5.093 H .093(ill use the abbre).8 F .093(viation `)-.25 F (`s')-.74 E 2.592('t)-.74 G 2.592(or)-2.592 G .092 (educe the chance of mistyping the substitute command.)-2.592 F .092 (This command)5.092 F(will instruct edit to mak)72 549.6 Q 2.5(et)-.1 G (he change:)-2.5 E F1(2s/thiss/this/)144 567.6 Q F0 1.816 -.8(We \214)72 585.6 T .217 (rst indicate the line to be changed, line 2, and then type an `).8 F (`s')-.74 E 2.717('t)-.74 G 2.717(oi)-2.717 G .217(ndicate we w)-2.717 F .217(ant edit to mak)-.1 F 2.717(eas)-.1 G(ubstitution.)-2.717 E .563 (Inside the \214rst set of slashes are the characters that we w)72 597.6 R .562(ant to change, follo)-.1 F .562 (wed by the characters to replace them,)-.25 F (and then a closing slash mark.)72 609.6 Q 1.6 -.8(To s)5 H(ummarize:).8 E(2s/)144 627.6 Q F4(what is to be c)2.5 E(hang)-.15 E(ed)-.1 E F0(/)2.5 E F4(what to c)2.5 E(hang)-.15 E 2.5(ei)-.1 G 2.5(tt)-2.5 G(o)-2.5 E F0 (/)2.5 E .061(If edit \214nds an e)72 645.6 R .061 (xact match of the characters to be changed it will mak)-.15 F 2.561(et) -.1 G .061(he change)-2.561 F F1(only)2.562 E F0 .062 (in the \214rst occurrence of the)2.562 F 2.5(characters. If)72 657.6 R (it does not \214nd the characters to be changed, it will respond:)2.5 E (Substitute pattern match f)144 675.6 Q(ailed)-.1 E 1.688 (indicating that your instructions could not be carried out.)72 693.6 R 1.688(When edit does \214nd the characters that you w)6.688 F 1.687 (ant to)-.1 F .327(change, it will mak)72 705.6 R 2.827(et)-.1 G .327(h\ e substitution and automatically print the changed line, so that you ca\ n check that the correct)-2.827 F(substitution w)72 717.6 Q(as made.)-.1 E(In the e)5 E(xample,)-.15 E EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-11)-.45 F(:)144 84 Q/F1 10/Times-Bold@0 SF(2s/thiss/this/)1.666 E F0 (And this is some more te)144 96 Q(xt.)-.15 E .362 (line 2 \(and line 2 only\) will be searched for the characters `)72 114 R(`thiss')-.74 E .362(', and when the \214rst e)-.74 F .362 (xact match is found, `)-.15 F(`thiss')-.74 E(')-.74 E 1.108 (will be changed to `)72 126 R(`this')-.74 E 3.608('. Strictly)-.74 F 1.108(speaking, it w)3.608 F 1.108(as not necessary abo)-.1 F 1.409 -.15 (ve t)-.15 H 3.609(os).15 G 3.609(pecify the)-3.609 F 1.109 (number of the line to be)3.609 F 2.5(changed. In)72 138 R(:)144 156 Q F1(s/thiss/this/)1.666 E F0 .682(edit will assume that we mean to chang\ e the line where we are currently located \(`)72 174 R(`.)-.74 E -.74 ('')-.7 G 3.181(\). In).74 F .681(this case, the command)3.181 F .465 (without a line number w)72 186 R .465(ould ha)-.1 F .765 -.15(ve p)-.2 H .465(roduced the same result because we were already located at the l\ ine we wished).15 F(to change.)72 198 Q -.15(Fo)97 213.6 S 2.5(ra).15 G (nother illustration of the substitute command, let us choose the line:) -2.5 E -1.25 -.7(Te x)144 231.6 T 2.5(te).7 G(diting is strange, b)-2.5 E(ut nice.)-.2 E -1.1(Yo)72 249.6 S 2.5(uc)1.1 G(an mak)-2.5 E 2.5(et) -.1 G(his line a bit more positi)-2.5 E .3 -.15(ve b)-.25 H 2.5(yt).15 G (aking out the characters `)-2.5 E(`strange, b)-.74 E(ut ')-.2 E 2.5('s) -.74 G 2.5(ot)-2.5 G(he line reads:)-2.5 E -1.25 -.7(Te x)144 267.6 T 2.5(te).7 G(diting is nice.)-2.5 E 2.5(Ac)72 285.6 S(ommand that will \ \214rst position edit at the desired line and then mak)-2.5 E 2.5(et)-.1 G(he substitution is:)-2.5 E(:)144 303.6 Q F1(/strange/s/strange, b) 1.666 E(ut //)-.2 E F0 .966(What we ha)72 325.2 R 1.266 -.15(ve d)-.2 H .965(one here is combine our search with our substitution.).15 F .965 (Such combinations are perfectly le)5.965 F -.05(ga)-.15 G .965(l, and) .05 F .485(speed up editing quite a bit once you get used to them.)72 337.2 R .486(That is, you do not necessarily ha)5.486 F .786 -.15(ve t) -.2 H 2.986(ou).15 G .486(se line numbers to)-2.986 F .283 (identify a line to edit.)72 349.2 R .283 (Instead, you may identify the line you w)5.283 F .282 (ant to change by asking edit to search for a speci\214ed)-.1 F (pattern of letters that occurs in that line.)72 361.2 Q (The parts of the abo)5 E .3 -.15(ve c)-.15 H(ommand are:).15 E F1 (/strange/)144 379.2 Q F0(tells edit to \214nd the characters `)39.53 E (`strange')-.74 E 2.5('i)-.74 G 2.5(nt)-2.5 G(he te)-2.5 E(xt)-.15 E F1 (s)144 391.2 Q F0(tells edit to mak)72.86 E 2.5(eas)-.1 G(ubstitution) -2.5 E F1(/strange, b)144 403.2 Q(ut //)-.2 E F0 (substitutes nothing at all for the characters `)15 E(`strange, b)-.74 E (ut ')-.2 E(')-.74 E -1.1(Yo)97 424.8 S 2.759(us)1.1 G .259 (hould note the space after `)-2.759 F(`b)-.74 E(ut')-.2 E 2.759('i)-.74 G 2.759(n`)-2.759 G .259(`/strange, b)-3.499 F .259(ut /')-.2 F 2.759 ('. If)-.74 F .259(you do not indicate that the space is to be tak)2.759 F(en)-.1 E(out, your line will read:)72 436.8 Q -1.25 -.7(Te x)144 454.8 T 2.5(te).7 G(diting is)-2.5 E(nice.)7.5 E .669 (which looks a little funn)72 472.8 R 3.169(yb)-.15 G .669 (ecause of the e)-3.169 F .669(xtra space between `)-.15 F(`is')-.74 E 3.169('a)-.74 G .669(nd `)-3.169 F(`nice')-.74 E 3.169('. Ag)-.74 F .669 (ain, we realize from this that a)-.05 F .429 (blank space is a real character to a computer)72 484.8 R 2.929(,a)-.4 G .429(nd in editing te)-2.929 F .429(xt we need to be a)-.15 F -.1(wa) -.15 G .43(re of spaces within a line just as).1 F(we w)72 496.8 Q (ould be a)-.1 E -.1(wa)-.15 G(re of an `).1 E(`a')-.74 E 2.5('o)-.74 G 2.5(ra`)-2.5 G(`4')-3.24 E('.)-.74 E F1(Another way to list what')72 520.8 Q 2.5(si)-.37 G 2.5(nt)-2.5 G(he b)-2.5 E(uffer \(z\))-.2 E F0 .14 (Although the print command is useful for looking at speci\214c lines i\ n the b)97 536.4 R(uf)-.2 E(fer)-.25 E 2.639(,o)-.4 G .139 (ther commands may be more)-2.639 F(con)72 548.4 Q -.15(ve)-.4 G .805 (nient for vie).15 F .805(wing lar)-.25 F .805(ge sections of te)-.18 F 3.305(xt. Y)-.15 F .805(ou can ask to see a screen full of te)-1.1 F .806(xt at a time by using the com-)-.15 F(mand)72 560.4 Q F1(z.)2.5 E F0(If you type)5 E(:)144 578.4 Q F1(1z)1.666 E F0 .039(edit will start \ with line 1 and continue printing lines, stopping either when the scree\ n of your terminal is full or when)72 596.4 R(the last line in the b)72 608.4 Q(uf)-.2 E(fer has been printed.)-.25 E(If you w)5 E (ant to read the ne)-.1 E(xt se)-.15 E(gment of te)-.15 E (xt, type the command)-.15 E(:)144 626.4 Q F1(z)1.666 E F0 .679 (If no starting line number is gi)72 644.4 R -.15(ve)-.25 G 3.179(nf).15 G .679(or the z command, printing will start at the `)-3.179 F (`current')-.74 E 3.179('l)-.74 G .679(ine, in this case the last)-3.179 F .777(line printed.)72 656.4 R -.6(Vi)5.777 G -.25(ew).6 G .777 (ing lines in the b).25 F(uf)-.2 E .776 (fer one screen full at a time is kno)-.25 F .776(wn as)-.25 F/F2 10 /Times-Italic@0 SF(pa)3.276 E(ging)-.1 E F0 5.776(.P)C .776 (aging can also be used to)-5.926 F(print a section of te)72 668.4 Q (xt on a hard-cop)-.15 E 2.5(yt)-.1 G(erminal.)-2.5 E F1(Sa)72 692.4 Q (ving the modi\214ed text)-.25 E F0 1.166 (This seems to be a good place to pause in our w)97 708 R 1.167 (ork, and so we should end the second session.)-.1 F 1.167(If you \(in) 6.167 F(haste\) type `)72 720 Q(`q')-.74 E 2.5('t)-.74 G 2.5(oq)-2.5 G (uit the session your dialogue with edit will be:)-2.5 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-12 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E(:)144 84 Q/F1 10/Times-Bold@0 SF(q)1.666 E F0 (No write since last change \(:quit! o)144 96 Q -.15(ve)-.15 G(rrides\)) .15 E(:)144 108 Q .002(This is edit')72 126 R 2.502(sw)-.55 G .002 (arning that you ha)-2.602 F .302 -.15(ve n)-.2 H .001 (ot written the modi\214ed contents of the b).15 F(uf)-.2 E .001 (fer to disk.)-.25 F -1.1(Yo)5.001 G 2.501(ur)1.1 G .001 (un the risk of losing)-2.501 F .881(the w)72 138 R .881(ork you did du\ ring the editing session since you typed the latest write command.)-.1 F .882(Because in this lesson we)5.882 F(ha)72 150 Q .631 -.15(ve n)-.2 H .331(ot written to disk at all, e).15 F -.15(ve)-.25 G .331 (rything we ha).15 F .631 -.15(ve d)-.2 H .33(one w).15 F .33(ould ha) -.1 F .63 -.15(ve b)-.2 H .33(een lost if edit had obe).15 F .33 (yed the)-.15 F F1(q)2.83 E F0 2.83(command. If)2.83 F .783 (you did not w)72 162 R .783(ant to sa)-.1 F 1.084 -.15(ve t)-.2 H .784 (he w).15 F .784(ork done during this editing session, you w)-.1 F .784 (ould ha)-.1 F 1.084 -.15(ve t)-.2 H 3.284(ot).15 G .784(ype `)-3.284 F (`q!')-.74 E 5.784('o)-.74 G 3.284(r\()-5.784 G -.74(``)-3.284 G(quit!') .74 E 3.284('\) to)-.74 F 1.62(con\214rm that you indeed w)72 174 R 1.62 (anted to end the session immediately)-.1 F 4.119(,l)-.65 G(ea)-4.119 E 1.619(ving the \214le as it w)-.2 F 1.619(as after the most recent)-.1 F -.74(``)72 186 S(write').74 E 2.5('c)-.74 G 2.5(ommand. Ho)-2.5 F(we) -.25 E -.15(ve)-.25 G .8 -.4(r, s).15 H(ince you w).4 E(ant to sa)-.1 E .3 -.15(ve w)-.2 H(hat you ha).15 E .3 -.15(ve e)-.2 H (dited, you need to type:).15 E(:)144 204 Q F1(w)1.666 E F0("te)144 216 Q(xt" 6 lines, 171 characters)-.15 E(and then follo)72 234 Q 2.5(ww)-.25 G(ith the commands to quit and logout:)-2.5 E(:)144 252 Q F1(q)1.666 E 2.5(%l)144 264 S(ogout)-2.5 E F0 .206(and hang up the phone or turn of) 72 282 R 2.706(ft)-.25 G .206(he terminal when)-2.706 F/F2 8 /Times-Roman@0 SF(UNIX)2.706 E F0 .206(asks for a name.)2.706 F -.7(Te) 5.206 G .206(rminals connected to the port selector).7 F (will stop after the logout command, and pressing k)72 294 Q -.15(ey)-.1 G 2.5(so).15 G 2.5(nt)-2.5 G(he k)-2.5 E -.15(ey)-.1 G (board will do nothing.).15 E(This is the end of the second session on) 97 321.6 Q F2(UNIX)2.5 E F0(te)2.5 E(xt editing.)-.15 E EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-13)-.45 F/F1 12/Times-Bold@0 SF(Session 3)282.828 87 Q/F2 10/Times-Bold@0 SF (Bringing text into the b)72 111 Q(uffer \(e\))-.2 E F0 .929(Login to)97 126.6 R/F3 8/Times-Roman@0 SF(UNIX)3.429 E F0 .929(and mak)3.429 F 3.429 (ec)-.1 G .929(ontact with edit.)-3.429 F -1.1(Yo)5.929 G 3.429(us)1.1 G .929(hould try to login without looking at the notes, b)-3.429 F .928 (ut if you)-.2 F(must then by all means do.)72 138.6 Q (Did you remember to gi)97 154.2 Q .3 -.15(ve t)-.25 H (he name of the \214le you w).15 E(anted to edit?)-.1 E (That is, did you type)5 E(%)144 172.2 Q F2(edit text)2.5 E F0 (or simply)72 190.2 Q(%)144 208.2 Q F2(edit)2.5 E F0 .084(Both w)72 226.2 R .084(ays get you in contact with edit, b)-.1 F .084 (ut the \214rst w)-.2 F .084(ay will bring a cop)-.1 F 2.584(yo)-.1 G 2.584(ft)-2.584 G .084(he \214le named `)-2.584 F(`te)-.74 E(xt')-.15 E 2.585('i)-.74 G .085(nto the b)-2.585 F(uf)-.2 E(fer)-.25 E 5.085(.I) -.55 G(f)-5.085 E(you did for)72 238.2 Q (get to tell edit the name of your \214le, you can get it into the b) -.18 E(uf)-.2 E(fer by typing:)-.25 E(:)144 256.2 Q F2 2.5(et)1.666 G (ext)-2.5 E F0("te)144 268.2 Q(xt" 6 lines, 171 characters)-.15 E .54 (The command)72 286.2 R F2(edit,)3.04 E F0 .54(which may be abbre)3.04 F (viated)-.25 E F2(e)3.04 E F0 3.04(,t)C .54(ells edit that you w)-3.04 F .539(ant to erase an)-.1 F .539(ything that might already be in)-.15 F .453(the b)72 298.2 R(uf)-.2 E .453(fer and bring a cop)-.25 F 2.953(yo) -.1 G 2.953(ft)-2.953 G .453(he \214le `)-2.953 F(`te)-.74 E(xt')-.15 E 2.953('i)-.74 G .453(nto the b)-2.953 F(uf)-.2 E .454(fer for editing.) -.25 F -1.1(Yo)5.454 G 2.954(um)1.1 G .454 (ay also use the edit \(e\) command to)-2.954 F 1.458 (change \214les in the middle of an editing session, or to gi)72 310.2 R 1.758 -.15(ve e)-.25 H 1.458(dit the name of a ne).15 F 3.958<778c>-.25 G 1.457(le that you w)-3.958 F 1.457(ant to create.)-.1 F .55 (Because the edit command clears the b)72 322.2 R(uf)-.2 E(fer)-.25 E 3.05(,y)-.4 G .55(ou will recei)-3.05 F .85 -.15(ve a w)-.25 H .55 (arning if you try to edit a ne).05 F 3.05<778c>-.25 G .55 (le without ha)-3.05 F(ving)-.2 E(sa)72 334.2 Q -.15(ve)-.2 G 3.331(dac) .15 G(op)-3.331 E 3.331(yo)-.1 G 3.331(ft)-3.331 G .831(he old \214le.) -3.331 F .831(This gi)5.831 F -.15(ve)-.25 G 3.331(sy).15 G .83 (ou a chance to write the contents of the b)-3.331 F(uf)-.2 E .83 (fer to disk before editing the)-.25 F(ne)72 346.2 Q(xt \214le.)-.15 E F2(Mo)72 370.2 Q(ving text in the b)-.1 E(uffer \(m\))-.2 E F0 .937 (Edit allo)97 385.8 R .937(ws you to mo)-.25 F 1.237 -.15(ve l)-.15 H .937(ines of te).15 F .938(xt from one location in the b)-.15 F(uf)-.2 E .938(fer to another by means of the)-.25 F F2(mo)3.438 E -.1(ve)-.1 G F0 (\()3.538 E F2(m)A F0(\))A 2.663(command. The)72 397.8 R .163 (\214rst tw)2.663 F 2.663(oe)-.1 G .163 (xamples are for illustration only)-2.813 F 2.663(,t)-.65 G .163 (hough after you ha)-2.663 F .463 -.15(ve r)-.2 H .162 (ead this Session you are welcome).15 F(to return to them for practice.) 72 409.8 Q(The command)5 E(:)144 427.8 Q F2(2,4m$)1.666 E F0 .981 (directs edit to mo)72 445.8 R 1.281 -.15(ve l)-.15 H .982 (ines 2, 3, and 4 to the end of the b).15 F(uf)-.2 E .982(fer \($\).) -.25 F .982(The format for the mo)5.982 F 1.282 -.15(ve c)-.15 H .982 (ommand is that you).15 F .664(specify the \214rst line to be mo)72 457.8 R -.15(ve)-.15 G .664(d, the last line to be mo).15 F -.15(ve)-.15 G .664(d, the mo).15 F .964 -.15(ve c)-.15 H .664(ommand `).15 F(`m') -.74 E .664(', and the line after which the)-.74 F(mo)72 469.8 Q -.15 (ve)-.15 G 2.5(dt).15 G -.15(ex)-2.5 G 2.5(ti).15 G 2.5(st)-2.5 G 2.5 (ob)-2.5 G 2.5(ep)-2.5 G 2.5(laced. So,)-2.5 F(:)144 487.8 Q F2(1,3m6) 1.666 E F0 -.1(wo)72 505.8 S .699(uld instruct edit to mo).1 F .999 -.15 (ve l)-.15 H .699(ines 1 through 3 \(inclusi).15 F -.15(ve)-.25 G 3.199 (\)t).15 G 3.2(oal)-3.199 G .7(ocation after line 6 in the b)-3.2 F(uf) -.2 E(fer)-.25 E 5.7(.T)-.55 G 3.2(om)-6.5 G 1 -.15(ove o)-3.2 H .7 (nly one).15 F(line, say)72 517.8 Q 2.5(,l)-.65 G (ine 4, to a location in the b)-2.5 E(uf)-.2 E (fer after line 5, the command w)-.25 E(ould be `)-.1 E(`4m5')-.74 E('.) -.74 E(Let')97 533.4 Q 2.5(sm)-.55 G .3 -.15(ove s)-2.5 H(ome te).15 E (xt using the command:)-.15 E(:)144 551.4 Q F2(5,$m1)1.666 E F0 2.5(2l) 144 563.4 S(ines mo)-2.5 E -.15(ve)-.15 G(d).15 E (it does illustrate the editor)144 575.4 Q(.)-.55 E .441(After e)72 593.4 R -.15(xe)-.15 G .441(cuting a command that mo).15 F -.15(ve)-.15 G 2.941(sm).15 G .441(ore than one line of the b)-2.941 F(uf)-.2 E(fer) -.25 E 2.94(,e)-.4 G .44(dit tells ho)-2.94 F 2.94(wm)-.25 G(an)-2.94 E 2.94(yl)-.15 G .44(ines were af)-2.94 F .44(fected by)-.25 F .38(the mo) 72 605.4 R .68 -.15(ve a)-.15 H .38(nd prints the last mo).15 F -.15(ve) -.15 G 2.88(dl).15 G .38(ine for your inspection.)-2.88 F .38(If you w) 5.38 F .381(ant to see more than just the last line, you can)-.1 F (then use the print \(p\), z, or number \(nu\) command to vie)72 617.4 Q 2.5(wm)-.25 G(ore te)-2.5 E 2.5(xt. The)-.15 F -.2(bu)2.5 G -.25(ff).2 G (er should no).25 E 2.5(wc)-.25 G(ontain:)-2.5 E(This is some sample te) 144 635.4 Q(xt.)-.15 E(It doesn')144 647.4 Q 2.5(tm)-.18 G (ean much here, b)-2.5 E(ut)-.2 E(it does illustrate the editor)144 659.4 Q(.)-.55 E(And this is some more te)144 671.4 Q(xt.)-.15 E -1.25 -.7(Te x)144 683.4 T 2.5(te).7 G(diting is nice.)-2.5 E(This is te)144 695.4 Q(xt added in Session 2.)-.15 E -1.1(Yo)72 713.4 S 2.5(uc)1.1 G (an restore the original order by typing:)-2.5 E EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-14 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E(:)144 84 Q/F1 10/Times-Bold@0 SF(4,$m1)1.666 E F0(or)72 102 Q 2.5(,c)-.4 G(ombining conte)-2.5 E(xt searching and the mo)-.15 E .3 -.15(ve c)-.15 H(ommand:).15 E(:)144 120 Q F1 (/And this is some/,/This is text/m/This is some sample/)1.666 E F0 .477 (\(Do not type both e)72 138 R .477(xamples here!\))-.15 F .477 (The problem with combining conte)5.477 F .476(xt searching with the mo) -.15 F .776 -.15(ve c)-.15 H .476(ommand is that).15 F(your chance of m\ aking a typing error in such a long command is greater than if you type\ line numbers.)72 150 Q F1(Copying lines \(copy\))72 174 Q F0(The)97 189.6 Q F1(copy)3.549 E F0 1.049(command is used to mak)3.549 F 3.549 (eas)-.1 G 1.049(econd cop)-3.549 F 3.549(yo)-.1 G 3.55(fs)-3.549 G 1.05 (peci\214ed lines, lea)-3.55 F 1.05(ving the original lines where the) -.2 F(y)-.15 E 2.5(were. Cop)72 201.6 R 2.5(yh)-.1 G (as the same format as the mo)-2.5 E .3 -.15(ve c)-.15 H(ommand, for e) .15 E(xample:)-.15 E(:)144 219.6 Q F1(2,5copy $)1.666 E F0(mak)72 237.6 Q .104(es a cop)-.1 F 2.604(yo)-.1 G 2.604(fl)-2.604 G .103 (ines 2 through 5, placing the added lines after the b)-2.604 F(uf)-.2 E (fer')-.25 E 2.603(se)-.55 G .103(nd \($\).)-2.603 F .103 (Experiment with the cop)5.103 F 2.603(yc)-.1 G(om-)-2.603 E .144 (mand so that you can become f)72 249.6 R .144(amiliar with ho)-.1 F 2.644(wi)-.25 G 2.644(tw)-2.644 G 2.644(orks. Note)-2.744 F .144 (that the shortest abbre)2.644 F .145(viation for cop)-.25 F 2.645(yi) -.1 G(s)-2.645 E F1(co)2.645 E F0 .145(\(and not)2.645 F(the letter `)72 261.6 Q(`c')-.74 E(', which has another meaning\).)-.74 E F1 (Deleting lines \(d\))72 285.6 Q F0(Suppose you w)97 301.2 Q (ant to delete the line)-.1 E(This is te)144 319.2 Q (xt added in Session 2.)-.15 E .067(from the b)72 337.2 R(uf)-.2 E(fer) -.25 E 5.067(.I)-.55 G 2.567(fy)-5.067 G .067(ou kno)-2.567 F 2.567(wt) -.25 G .066 (he number of the line to be deleted, you can type that number follo) -2.567 F .066(wed by)-.25 F F1(delete)2.566 E F0(or)2.566 E F1(d)2.566 E F0(.)A .762(This e)72 349.2 R .762(xample deletes line 4, which is `) -.15 F .762(`This is te)-.74 F .762(xt added in Session 2.)-.15 F 4.742 -.74('' i)-.7 H 3.262(fy).74 G .762(ou typed the commands suggested so) -3.262 F -.1(fa)72 361.2 S -.55(r.).1 G(:)144 379.2 Q F1(4d)1.666 E F0 (It doesn')144 391.2 Q 2.5(tm)-.18 G(ean much here, b)-2.5 E(ut)-.2 E 1.114(Here `)72 409.2 R(`4')-.74 E 3.614('i)-.74 G 3.614(st)-3.614 G 1.114(he number of the line to be deleted, and `)-3.614 F(`delete')-.74 E 3.614('o)-.74 G 3.614(r`)-3.614 G(`d')-4.354 E 3.613('i)-.74 G 3.613 (st)-3.613 G 1.113(he command to delete the line.)-3.613 F(After)6.113 E -.15(exe)72 421.2 S(cuting the delete command, edit prints the line tha\ t has become the current line \(`).15 E(`.)-.74 E -.74('')-.7 G(\).).74 E 1.863(If you do not happen to kno)97 436.8 R 4.364(wt)-.25 G 1.864(he\ line number you can search for the line and then delete it using this) -4.364 F(sequence of commands:)72 448.8 Q(:)144 466.8 Q F1 (/added in Session 2./)1.666 E F0(This is te)144 478.8 Q (xt added in Session 2.)-.15 E(:)144 490.8 Q F1(d)1.666 E F0(It doesn') 144 502.8 Q 2.5(tm)-.18 G(ean much here, b)-2.5 E(ut)-.2 E .512(The `)72 520.8 R .512(`/added in Session 2./')-.74 F 3.012('a)-.74 G .512 (sks edit to locate and print the line containing the indicated te) -3.012 F .512(xt, starting its search at)-.15 F .017 (the current line and mo)72 532.8 R .017 (ving line by line until it \214nds the te)-.15 F 2.517(xt. Once)-.15 F .018(you are sure that you ha)2.517 F .318 -.15(ve c)-.2 H .018 (orrectly speci\214ed the).15 F .211(line you w)72 544.8 R .211 (ant to delete, you can enter the delete \(d\) command.)-.1 F .211 (In this case it is not necessary to specify a line num-)5.211 F 1.285 (ber before the `)72 556.8 R(`d')-.74 E 3.785('. If)-.74 F 1.285 (no line number is gi)3.785 F -.15(ve)-.25 G 1.285 (n, edit deletes the current line \(`).15 F(`.)-.74 E -.74('')-.7 G 1.285(\), that is, the line found by our).74 F 2.5(search. After)72 568.8 R(the deletion, your b)2.5 E(uf)-.2 E(fer should contain:)-.25 E (This is some sample te)144 586.8 Q(xt.)-.15 E(And this is some more te) 144 598.8 Q(xt.)-.15 E -1.25 -.7(Te x)144 610.8 T 2.5(te).7 G (diting is nice.)-2.5 E(It doesn')144 622.8 Q 2.5(tm)-.18 G (ean much here, b)-2.5 E(ut)-.2 E(it does illustrate the editor)144 634.8 Q(.)-.55 E(And this is some more te)144 646.8 Q(xt.)-.15 E -1.25 -.7(Te x)144 658.8 T 2.5(te).7 G(diting is nice.)-2.5 E(This is te)144 670.8 Q(xt added in Session 2.)-.15 E(It doesn')144 682.8 Q 2.5(tm)-.18 G(ean much here, b)-2.5 E(ut)-.2 E 1.6 -.8(To d)72 700.8 T (elete both lines 2 and 3:).8 E EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-15)-.45 F(And this is some more te)144 84 Q(xt.)-.15 E -1.25 -.7(Te x)144 96 T 2.5(te).7 G(diting is nice.)-2.5 E(you type)72 114 Q(:)144 132 Q/F1 10 /Times-Bold@0 SF(2,3d)1.666 E F0 2.5(2l)144 144 S(ines deleted)-2.5 E .102(which speci\214es the range of lines from 2 to 3, and the operatio\ n on those lines \212 `)72 162 R(`d')-.74 E 2.602('f)-.74 G .102 (or delete.)-2.602 F .102(If you delete more)5.102 F (than one line you will recei)72 174 Q .3 -.15(ve a m)-.25 H (essage telling you the number of lines deleted, as indicated in the e) .15 E(xample abo)-.15 E -.15(ve)-.15 G(.).15 E .463(The pre)97 189.6 R .463(vious e)-.25 F .463(xample assumes that you kno)-.15 F 2.963(wt) -.25 G .463(he line numbers for the lines to be deleted.)-2.963 F .463 (If you do not you)5.463 F (might combine the search command with the delete command:)72 201.6 Q(:) 144 219.6 Q F1(/And this is some/,/T)1.666 E(ext editing is nice./d)-.92 E 2.5(Aw)72 249.6 S(ord or tw)-2.6 E 2.5(oo)-.1 G 2.5(fc)-2.5 G(aution) -2.5 E F0 .031(In using the search function to locate lines to be delet\ ed you should be)97 265.2 R F1 .031(absolutely sur)2.531 F(e)-.18 E F0 .031(the characters you gi)2.531 F -.15(ve)-.25 G .372 (as the basis for the search will tak)72 277.2 R 2.872(ee)-.1 G .373 (dit to the line you w)-2.872 F .373(ant deleted.)-.1 F .373 (Edit will search for the \214rst occurrence of the)5.373 F(characters \ starting from where you last edited \255 that is, from the line you see\ printed if you type dot \(.\).)72 289.2 Q 2.764(As)97 304.8 S .264 (earch based on too fe)-2.764 F 2.764(wc)-.25 G .264(haracters may resu\ lt in the wrong lines being deleted, which edit will do as easily)-2.764 F .277(as if you had meant it.)72 316.8 R -.15(Fo)5.277 G 2.777(rt).15 G .277(his reason, it is usually safer to specify the search and then del\ ete in tw)-2.777 F 2.778(os)-.1 G .278(eparate steps,)-2.778 F .946 (at least until you become f)72 328.8 R .946 (amiliar enough with using the editor that you understand ho)-.1 F 3.445 (wb)-.25 G .945(est to specify searches.)-3.445 F -.15(Fo)72 340.8 S 2.819(rab).15 G -.15(eg)-2.819 G .319(inner it is not a bad idea to dou\ ble-check each command before pressing).15 F/F2 8/Times-Roman@0 SF (RETURN)2.819 E F0 .319(to send the command on)2.819 F(its w)72 352.8 Q (ay)-.1 E(.)-.65 E F1(Undo \(u\) to the r)72 376.8 Q(escue)-.18 E F0 (The)97 392.4 Q F1 .394(undo \(u\))2.894 F F0 .393 (command has the ability to re)2.894 F -.15(ve)-.25 G .393(rse the ef) .15 F .393(fects of the last command that changed the b)-.25 F(uf)-.2 E (fer)-.25 E 5.393(.T)-.55 G(o)-6.193 E .287(undo the pre)72 404.4 R .287 (vious command, type `)-.25 F(`u')-.74 E 2.787('o)-.74 G 2.787(r`)-2.787 G(`undo')-3.527 E 2.787('. Undo)-.74 F .287 (can rescue the contents of the b)2.787 F(uf)-.2 E .288(fer from man) -.25 F 2.788(ya)-.15 G 2.788(nu)-2.788 G(nfor)-2.788 E(-)-.2 E 1.068 (tunate mistak)72 416.4 R 3.568(e. Ho)-.1 F(we)-.25 E -.15(ve)-.25 G 1.868 -.4(r, i).15 H 1.068(ts po).4 F 1.068(wers are not unlimited, so \ it is still wise to be reasonably careful about the com-)-.25 F (mands you gi)72 428.4 Q -.15(ve)-.25 G(.).15 E 1.502 (It is possible to undo only commands which ha)97 444 R 1.803 -.15(ve t) -.2 H 1.503(he po).15 F 1.503(wer to change the b)-.25 F(uf)-.2 E 1.503 (fer \212 for e)-.25 F 1.503(xample, delete,)-.15 F .113(append, mo)72 456 R -.15(ve)-.15 G 2.613(,c).15 G(op)-2.613 E 1.413 -.65(y, s)-.1 H .113(ubstitute, and e).65 F -.15(ve)-.25 G 2.612(nu).15 G .112 (ndo itself.)-2.612 F .112 (The commands write \(w\) and edit \(e\), which interact with disk)5.112 F .429 (\214les, cannot be undone, nor can commands that do not change the b)72 468 R(uf)-.2 E(fer)-.25 E 2.93(,s)-.4 G .43(uch as print.)-2.93 F .43 (Most importantly)5.43 F 2.93(,t)-.65 G(he)-2.93 E F1(only)2.93 E F0 .376(command that can be re)72 480 R -.15(ve)-.25 G .376 (rsed by undo is the last `).15 F(`undo-able')-.74 E 2.876('c)-.74 G .376(ommand you typed.)-2.876 F -1.1(Yo)5.376 G 2.876(uc)1.1 G .375 (an use control-H and @)-2.876 F 1.18 (to change commands while you are typing them, and undo to re)72 492 R -.15(ve)-.25 G 1.181(rse the ef).15 F 1.181 (fect of the commands after you ha)-.25 F -.15(ve)-.2 G (typed them and pressed)72 504 Q F2(RETURN)2.5 E F0(.)A 1.821 -.8(To i) 97 519.6 T .221(llustrate, let').8 F 2.721(si)-.55 G .221 (ssue an undo command.)-2.721 F .221(Recall that the last b)5.221 F(uf) -.2 E(fer)-.25 E .22(-changing command we g)-.2 F -2.25 -.2(av e)-.05 H .22(deleted the)2.92 F .266(lines formerly numbered 2 and 3.)72 531.6 R -.8(Ty)5.267 G .267(ping undo at this moment will re).8 F -.15(ve)-.25 G .267(rse the ef).15 F .267(fects of the deletion, causing those)-.25 F (tw)72 543.6 Q 2.5(ol)-.1 G(ines to be replaced in the b)-2.5 E(uf)-.2 E (fer)-.25 E(.)-.55 E(:)144 561.6 Q F1(u)1.666 E F0 2.5(2m)144 573.6 S (ore lines in \214le after undo)-2.5 E(And this is some more te)144 585.6 Q(xt.)-.15 E .298(Here ag)72 603.6 R .298 (ain, edit informs you if the command af)-.05 F .298 (fects more than one line, and prints the te)-.25 F .297 (xt of the line which is no)-.15 F(w)-.25 E -.74(``)72 615.6 S(dot').74 E 2.5('\()-.74 G(the current line\).)-2.5 E F1(Mor)72 639.6 Q 2.5(ea) -.18 G(bout the dot \(.\) and b)-2.5 E(uffer end \($\))-.2 E F0 (The function assumed by the symbol dot depends on its conte)97 655.2 Q 2.5(xt. It)-.15 F(can be used:)2.5 E 2.5(1. to)97 670.8 R -.15(ex)2.5 G (it from append mode; we type dot \(and only a dot\) on a line and pres\ s).15 E F2(RETURN)2.5 E F0(;)A 2.5(2. to)97 686.4 R (refer to the line we are at in the b)2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E (Dot can also be combined with the equal sign to get the number of the \ line currently being edited:)72 702 Q EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-16 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E(:)144 84 Q/F1 10/Times-Bold@0 SF(.=)1.666 E F0 (If we type `)72 102 Q(`)-.74 E F1(.)A F0(=')A 2.5('w)-.74 G 2.5(ea)-2.5 G(re asking for the number of the line, and if we type `)-2.5 E(`)-.74 E F1(.)A F0 1.48 -.74('' w)D 2.5(ea).74 G(re asking for the te)-2.5 E (xt of the line.)-.15 E .272(In this editing session and the last, we u\ sed the dollar sign to indicate the end of the b)97 117.6 R(uf)-.2 E .273(fer in commands such)-.25 F .028(as print, cop)72 129.6 R 1.328 -.65(y, a)-.1 H .028(nd mo).65 F -.15(ve)-.15 G 5.028(.T).15 G .027 (he dollar sign as a command asks edit to print the last line in the b) -5.028 F(uf)-.2 E(fer)-.25 E 5.027(.I)-.55 G 2.527(ft)-5.027 G .027 (he dollar sign)-2.527 F(is combined with the equal sign \()72 141.6 Q F1($=)A F0 2.5(\)e)C (dit will print the line number corresponding to the last line in the b) -2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E -.74(``)97 157.2 S F1(.).74 E F0 1.779 -.74('' a)D .299(nd `).74 F(`$')-.74 E .299 (', then, represent line numbers.)-.74 F(Whene)5.299 E -.15(ve)-.25 G 2.799(ra).15 G .3 (ppropriate, these symbols can be used in place of line)-2.799 F (numbers in commands.)72 169.2 Q -.15(Fo)5 G 2.5(re).15 G(xample)-2.65 E (:)144 187.2 Q/F2 12/Times-Bold@0 SF(.)1.666 E F1(,$d)A F0 (instructs edit to delete all lines from the current line \()72 205.2 Q F1(.)A F0 5(\)t)C 2.5(ot)-5 G(he end of the b)-2.5 E(uf)-.2 E(fer)-.25 E (.)-.55 E F1(Mo)72 229.2 Q(ving ar)-.1 E(ound in the b)-.18 E 2.5 (uffer \(+)-.2 F(and \255\))2.5 E F0 1.198 (When you are editing you often w)97 244.8 R 1.197 (ant to go back and re-read a pre)-.1 F 1.197(vious line.)-.25 F -1.1 (Yo)6.197 G 3.697(uc)1.1 G 1.197(ould specify a conte)-3.697 F(xt)-.15 E .126(search for a line you w)72 256.8 R .127 (ant to read if you remember some of its te)-.1 F .127(xt, b)-.15 F .127 (ut if you simply w)-.2 F .127(ant to see what w)-.1 F .127 (as written a)-.1 F(fe)72 268.8 Q 1.3 -.65(w, s)-.25 H (ay 3, lines ago, you can type).65 E(\2553p)144 286.8 Q .711 (This tells edit to mo)72 304.8 R 1.011 -.15(ve b)-.15 H .711 (ack to a position 3 lines before the current line \(.\)).15 F .711 (and print that line.)5.711 F -1.1(Yo)5.711 G 3.21(uc)1.1 G .71(an mo) -3.21 F 1.01 -.15(ve f)-.15 H(or).15 E(-)-.2 E -.1(wa)72 316.8 S (rd in the b).1 E(uf)-.2 E(fer similarly:)-.25 E(+2p)144 334.8 Q(instru\ cts edit to print the line that is 2 ahead of your current position.)72 352.8 Q -1.1(Yo)97 368.4 S 3.295(um)1.1 G .795(ay use `)-3.295 F(`+') -.74 E 3.295('a)-.74 G .795(nd `)-3.295 F(`\255')-.74 E 3.295('i)-.74 G 3.295(na)-3.295 G 1.095 -.15(ny c)-3.295 H .795 (ommand where edit accepts line numbers.).15 F .796 (Line numbers speci\214ed with)5.796 F -.74(``)72 380.4 S(+').74 E 2.5 ('o)-.74 G 2.5(r`)-2.5 G(`\255')-3.24 E 2.5('c)-.74 G (an be combined to print a range of lines.)-2.5 E(The command)5 E(:)144 398.4 Q F1(\2551,+2copy$)1.666 E F0(mak)72 416.4 Q .061(es a cop)-.1 F 2.561(yo)-.1 G 2.561(f4l)-2.561 G 2.561(ines: the)-2.561 F .06 (current line, the line before it, and the tw)2.561 F 2.56(oa)-.1 G .06 (fter it.)-2.56 F .06(The copied lines will be placed after)5.06 F (the last line in the b)72 428.4 Q(uf)-.2 E (fer \($\), and the original lines referred to by `)-.25 E(`\2551')-.74 E 2.5('a)-.74 G(nd `)-2.5 E(`+2')-.74 E 2.5('r)-.74 G(emain where the) -2.5 E 2.5(ya)-.15 G(re.)-2.5 E -.35(Tr)97 444 S 2.712(yt).35 G .212 (yping only `)-2.712 F(`\255')-.74 E .212('; you will mo)-.74 F .512 -.15(ve b)-.15 H .213(ack one line just as if you had typed `).15 F (`\2551p')-.74 E 2.713('. T)-.74 F .213(yping the command `)-.8 F(`+') -.74 E(')-.74 E -.1(wo)72 456 S 1.81(rks similarly).1 F 6.81(.Y)-.65 G 1.81(ou might also try typing a fe)-7.91 F 4.31(wp)-.25 G 1.809 (lus or minus signs in a ro)-4.31 F 4.309(w\()-.25 G 1.809(such as `) -4.309 F(`+++')-.74 E 1.809('\) to see edit')-.74 F(s)-.55 E 2.943 (response. T)72 468 R(yping)-.8 E/F3 8/Times-Roman@0 SF(RETURN)2.943 E F0 .444(alone on a line is the equi)2.943 F -.25(va)-.25 G .444 (lent of typing `).25 F(`+1p')-.74 E .444('; it will mo)-.74 F .744 -.15 (ve y)-.15 H .444(ou one line ahead in the).15 F -.2(bu)72 480 S -.25 (ff).2 G(er and print that line.).25 E .737 (If you are at the last line of the b)97 495.6 R(uf)-.2 E .737 (fer and try to mo)-.25 F 1.036 -.15(ve f)-.15 H .736 (urther ahead, perhaps by typing a `).15 F(`+')-.74 E 3.236('o)-.74 G 3.236(rac)-3.236 G(arriage)-3.236 E(return alone on the line, edit will\ remind you that you are at the end of the b)72 507.6 Q(uf)-.2 E(fer:) -.25 E(At end-of-\214le)144 531.6 Q(or)72 543.6 Q(Not that man)144 555.6 Q 2.5(yl)-.15 G(ines in b)-2.5 E(uf)-.2 E(fer)-.25 E(Similarly)72 571.2 Q 2.5(,i)-.65 G 2.5(fy)-2.5 G(ou try to mo)-2.5 E .3 -.15(ve t)-.15 H 2.5(oap).15 G(osition before the \214rst line, edit will print one of t\ hese messages:)-2.5 E(Nonzero address required on this command)144 595.2 Q(or)72 607.2 Q(Ne)144 619.2 Q -.05(ga)-.15 G(ti).05 E .3 -.15(ve a)-.25 H(ddress \255 \214rst b).15 E(uf)-.2 E(fer line is 1)-.25 E (The number associated with a b)72 634.8 Q(uf)-.2 E (fer line is the line')-.25 E 2.5(s`)-.55 G(`address')-3.24 E (', in that it can be used to locate the line.)-.74 E F1 (Changing lines \(c\))72 658.8 Q F0 -1.1(Yo)97 674.4 S 3.018(uc)1.1 G .519(an also delete certain lines and insert ne)-3.018 F 3.019(wt)-.25 G -.15(ex)-3.019 G 3.019(ti).15 G 3.019(nt)-3.019 G .519(heir place.) -3.019 F .519(This can be accomplished easily with the)5.519 F F1 1.218 (change \(c\))72 686.4 R F0 3.718(command. The)3.718 F 1.218(change com\ mand instructs edit to delete speci\214ed lines and then switch to te) 3.718 F 1.217(xt input)-.15 F(mode to accept the te)72 698.4 Q (xt that will replace them.)-.15 E(Let')5 E 2.5(ss)-.55 G(ay you w)-2.5 E(ant to change the \214rst tw)-.1 E 2.5(ol)-.1 G(ines in the b)-2.5 E (uf)-.2 E(fer:)-.25 E EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-17)-.45 F(This is some sample te)144 84 Q(xt.)-.15 E(And this is some more te) 144 96 Q(xt.)-.15 E(to read)72 114 Q(This te)144 132 Q(xt w)-.15 E (as created with the)-.1 E/F1 8/Times-Roman@0 SF(UNIX)2.5 E F0(te)2.5 E (xt editor)-.15 E(.)-.55 E 1.6 -.8(To d)72 150 T 2.5(os).8 G (o, you type:)-2.5 E(:)144 168 Q/F2 10/Times-Bold@0 SF(1,2c)1.666 E F0 2.5(2l)144 180 S(ines changed)-2.5 E F2(This text was cr)144 192 Q (eated with the)-.18 E/F3 8/Times-Bold@0 SF(UNIX)2.5 E F2(text editor) 2.5 E(.)-1 E/F4 12/Times-Bold@0 SF(.)144 204 Q F0(:)144 216 Q .668 (In the command)72 234 R F2(1,2c)3.168 E F0 .668(we specify that we w) 3.168 F .669(ant to change the range of lines be)-.1 F .669 (ginning with 1 and ending with 2 by)-.15 F(gi)72 246 Q 1.194 (ving line numbers as with the print command.)-.25 F 1.194 (These lines will be deleted.)6.194 F 1.193(After you type)6.194 F F1 (RETURN)3.693 E F0 1.193(to end the)3.693 F .737(change command, edit n\ oti\214es you if more than one line will be changed and places you in t\ e)72 258 R .737(xt input mode.)-.15 F(An)5.737 E(y)-.15 E(te)72 270 Q .153(xt typed on the follo)-.15 F .153(wing lines will be inserted into\ the position where lines were deleted by the change command.)-.25 F F2 -1.11(Yo)72 282 S 3.246(uw)1.11 G .746(ill r)-3.246 F .747 (emain in text input mode until y)-.18 F .747(ou exit in the usual way) -.25 F 3.247(,b)-.55 G 3.247(yt)-3.247 G .747 (yping a period alone on a line.)-3.247 F F0(Note)5.747 E (that the number of lines added to the b)72 294 Q(uf)-.2 E (fer need not be the same as the number of lines deleted.)-.25 E (This is the end of the third session on te)97 321.6 Q(xt editing with) -.15 E F1(UNIX)2.5 E F0(.)A EP %%Page: 18 18 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-18 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 12/Times-Bold@0 SF(Session 4)282.828 84 Q F0 1.163 (This lesson co)97 111.6 R -.15(ve)-.15 G 1.163(rs se).15 F -.15(ve)-.25 G 1.163(ral topics, starting with commands that apply throughout the b) .15 F(uf)-.2 E(fer)-.25 E 3.662(,c)-.4 G 1.162(haracters with)-3.662 F .97(special meanings, and ho)72 123.6 R 3.47(wt)-.25 G 3.47(oi)-3.47 G (ssue)-3.47 E/F2 8/Times-Roman@0 SF(UNIX)3.47 E F0 .97 (commands while in the editor)3.47 F 5.971(.T)-.55 G .971(he ne)-5.971 F .971(xt topics deal with \214les: more on)-.15 F .975 (reading and writing, and methods of reco)72 135.6 R -.15(ve)-.15 G .974 (ring \214les lost in a crash.).15 F .974 (The \214nal section suggests sources of further)5.974 F(information.)72 147.6 Q/F3 10/Times-Bold@0 SF(Making commands global \(g\))72 171.6 Q F0 .284(One disadv)97 187.2 R .284(antage to the commands we ha)-.25 F .585 -.15(ve u)-.2 H .285 (sed for searching or substituting is that if you ha).15 F .585 -.15 (ve a n)-.2 H .285(umber of).15 F 1.419(instances of a w)72 199.2 R 1.419(ord to change it appears that you ha)-.1 F 1.718 -.15(ve t)-.2 H 3.918(ot).15 G 1.418(ype the command repeatedly)-3.918 F 3.918(,o)-.65 G 1.418(nce for each time the)-3.918 F 1.244(change needs to be made.)72 211.2 R 1.245(Edit, ho)6.244 F(we)-.25 E -.15(ve)-.25 G 2.045 -.4(r, p) .15 H(ro).4 E 1.245(vides a w)-.15 F 1.245(ay to mak)-.1 F 3.745(ec)-.1 G 1.245(ommands apply to the entire contents of the)-3.745 F -.2(bu)72 223.2 S -.25(ff).2 G(er \255 the).25 E F3(global \(g\))2.5 E F0 (command.)2.5 E 1.6 -.8(To p)97 238.8 T (rint all lines containing a certain sequence of characters \(say).8 E 2.5(,`)-.65 G(`te)-3.24 E(xt')-.15 E('\) the command is:)-.74 E(:)144 256.8 Q F3(g/text/p)1.666 E F0 .316(The `)72 274.8 R(`g')-.74 E 2.816 ('i)-.74 G .316(nstructs edit to mak)-2.816 F 2.816(eag)-.1 G .316 (lobal search for all lines in the b)-2.816 F(uf)-.2 E .316 (fer containing the characters)-.25 F -.74(``)5.316 G(te).74 E(xt')-.15 E 2.816('. The)-.74 F -.74(``)2.816 G(p').74 E(')-.74 E (prints the lines found.)72 286.8 Q 1.658 -.8(To i)97 302.4 T .058 (ssue a global command, start by typing a `).8 F(`g')-.74 E 2.558('a) -.74 G .059(nd then a search pattern identifying the lines to be af) -2.558 F(fected.)-.25 E .094 (Then, on the same line, type the command to be e)72 314.4 R -.15(xe) -.15 G .094(cuted for the identi\214ed lines.).15 F .093 (Global substitutions are frequently)5.094 F 3.296(useful. F)72 326.4 R .796(or e)-.15 F .797(xample, to change all instances of the w)-.15 F .797(ord `)-.1 F(`te)-.74 E(xt')-.15 E 3.297('t)-.74 G 3.297(ot)-3.297 G .797(he w)-3.297 F .797(ord `)-.1 F(`material')-.74 E 3.297('t)-.74 G .797(he command w)-3.297 F .797(ould be a)-.1 F (combination of the global search and the substitute command:)72 338.4 Q (:)144 356.4 Q F3(g/text/s/text/material/g)1.666 E F0 .289(Note the `)72 374.4 R(`g')-.74 E 2.789('a)-.74 G 2.789(tt)-2.789 G .289(he end of the\ global command, which instructs edit to change each and e)-2.789 F -.15 (ve)-.25 G .288(ry instance of `).15 F(`te)-.74 E(xt')-.15 E 2.788('t) -.74 G(o)-2.788 E -.74(``)72 386.4 S(material').74 E 2.76('. If)-.74 F .26(you do not type the `)2.76 F(`g')-.74 E 2.76('a)-.74 G 2.76(tt)-2.76 G .26(he end of the command only the)-2.76 F/F4 10/Times-Italic@0 SF <8c72>2.76 E(st)-.1 E F0 .26(instance of `)2.76 F(`te)-.74 E(xt')-.15 E (')-.74 E F4 .26(in eac)2.76 F 2.76(hl)-.15 G(ine)-2.76 E F0(will)2.76 E .006(be changed \(the normal result of the substitute command\).)72 398.4 R .006(The `)5.006 F(`g')-.74 E 2.506('a)-.74 G 2.506(tt)-2.506 G .006(he end of the command is independent of the)-2.506 F -.74(``)72 410.4 S(g').74 E 2.5('a)-.74 G 2.5(tt)-2.5 G(he be)-2.5 E 2.5 (ginning. Y)-.15 F(ou may gi)-1.1 E .3 -.15(ve a c)-.25 H (ommand such as:).15 E(:)144 428.4 Q F3(5s/text/material/g)1.666 E F0 .835(to change e)72 446.4 R -.15(ve)-.25 G .835(ry instance of `).15 F (`te)-.74 E(xt')-.15 E 3.335('i)-.74 G 3.335(nl)-3.335 G .835 (ine 5 alone.)-3.335 F(Further)5.836 E 3.336(,n)-.4 G .836 (either command will change `)-3.336 F(`te)-.74 E(xt')-.15 E 3.336('t) -.74 G 3.336(o`)-3.336 G(`material')-4.076 E 3.336('i)-.74 G(f)-3.336 E -.74(``)72 458.4 S -1.25 -.7(Te x).74 H(t').7 E 2.5('b)-.74 G -.15(eg) -2.5 G(ins with a capital rather than a lo).15 E(wer)-.25 E(-case)-.2 E F4(t.)2.5 E F0 .194(Edit does not automatically print the lines modi\ \214ed by a global command.)97 474 R .194(If you w)5.194 F .193 (ant the lines to be printed,)-.1 F(type a `)72 486 Q(`p')-.74 E 2.5('a) -.74 G 2.5(tt)-2.5 G(he end of the global command:)-2.5 E(:)144 504 Q F3 (g/text/s/text/material/gp)1.666 E F0 -1.1(Yo)72 522 S 2.836(us)1.1 G .336 (hould be careful about using the global command in combination with an) -2.836 F 2.837(yo)-.15 G .337(ther \255 in essence, be sure of what) -2.837 F(you are telling edit to do to the entire b)72 534 Q(uf)-.2 E (fer)-.25 E 5(.F)-.55 G(or e)-5.15 E(xample,)-.15 E(:)144 552 Q F3 (g/ /d)1.666 E F0(72 less lines in \214le after global)144 564 Q .054 (will delete e)72 582 R -.15(ve)-.25 G .054 (ry line containing a blank an).15 F .054(ywhere in it.)-.15 F .054 (This could adv)5.054 F .054(ersely af)-.15 F .054 (fect your document, since most lines)-.25 F(ha)72 594 Q .601 -.15(ve s) -.2 H .301(paces between w).15 F .301(ords and thus w)-.1 F .302 (ould be deleted.)-.1 F .302(After e)5.302 F -.15(xe)-.15 G .302 (cuting the global command, edit will print a w).15 F(arn-)-.1 E .047 (ing if the command added or deleted more than one line.)72 606 R -.15 (Fo)5.047 G(rtunately).15 E 2.547(,t)-.65 G .047(he undo command can re) -2.547 F -.15(ve)-.25 G .047(rse the ef).15 F .047(fects of a)-.25 F .515(global command.)72 618 R -1.1(Yo)5.515 G 3.015(us)1.1 G .515 (hould e)-3.015 F .516 (xperiment with the global command on a small \214le of te)-.15 F .516 (xt to see what it can do for)-.15 F(you.)72 630 Q F3(Mor)72 654 Q 2.5 (ea)-.18 G(bout sear)-2.5 E(ching and substituting)-.18 E F0 .578 (In using slashes to identify a character string that we w)97 669.6 R .578(ant to search for or change, we ha)-.1 F .877 -.15(ve a)-.2 H -.1 (lwa).15 G .577(ys speci\214ed).1 F 1.694(the e)72 681.6 R 1.694 (xact characters.)-.15 F 1.695(There is a less tedious w)6.694 F 1.695 (ay to repeat the same string of characters.)-.1 F 3.295 -.8(To c)6.695 H 1.695(hange `).8 F(`te)-.74 E(xt')-.15 E 4.195('t)-.74 G(o)-4.195 E -.74(``)72 693.6 S(te).74 E(xts')-.15 E 2.5('w)-.74 G 2.5(em)-2.5 G (ay type either)-2.5 E(:)144 711.6 Q F3(/text/s/text/texts/)1.666 E F0 (as we ha)72 729.6 Q .3 -.15(ve d)-.2 H(one in the past, or a some).15 E (what abbre)-.25 E(viated command:)-.25 E EP %%Page: 19 19 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-19)-.45 F(:)144 84 Q/F1 10/Times-Bold@0 SF(/text/s//texts/)1.666 E F0 .528 (In this e)72 102 R .528(xample, the characters to be changed are not s\ peci\214ed \255 there are no characters, not e)-.15 F -.15(ve)-.25 G 3.028(nas).15 G .528(pace, between)-3.028 F .381(the tw)72 114 R 2.881 (os)-.1 G .381(lash marks that indicate what is to be changed.)-2.881 F .382(This lack of characters between the slashes is tak)5.381 F .382 (en by the)-.1 F(editor to mean `)72 126 Q(`use the characters we last \ searched for as the characters to be changed.)-.74 E -.74('')-.7 G (Similarly)97 141.6 Q 2.5(,t)-.65 G(he last conte)-2.5 E(xt search may \ be repeated by typing a pair of slashes with nothing between them:)-.15 E(:)144 159.6 Q F1(/does/)1.666 E F0(It doesn')144 171.6 Q 2.5(tm)-.18 G (ean much here, b)-2.5 E(ut)-.2 E(:)144 183.6 Q F1(//)1.666 E F0 (it does illustrate the editor)144 195.6 Q(.)-.55 E(\(Y)72 213.6 Q 1.031 (ou should note that the search command found the characters `)-1.1 F (`does')-.74 E 3.531('i)-.74 G 3.531(nt)-3.531 G 1.031(he w)-3.531 F 1.031(ord `)-.1 F(`doesn')-.74 E(t')-.18 E 3.531('i)-.74 G 3.531(nt) -3.531 G 1.031(he \214rst search)-3.531 F 3.321(request.\) Because)72 225.6 R .822(no characters are speci\214ed for the second search, the e\ ditor scans the b)3.321 F(uf)-.2 E .822(fer for the ne)-.25 F .822 (xt occur)-.15 F(-)-.2 E(rence of the characters `)72 237.6 Q(`does') -.74 E('.)-.74 E .666(Edit normally searches forw)97 253.2 R .666 (ard through the b)-.1 F(uf)-.2 E(fer)-.25 E 3.166(,w)-.4 G .666 (rapping around from the end of the b)-3.166 F(uf)-.2 E .665 (fer to the be)-.25 F(gin-)-.15 E .378 (ning, until the speci\214ed character string is found.)72 265.2 R .378 (If you w)5.378 F .379(ant to search in the re)-.1 F -.15(ve)-.25 G .379 (rse direction, use question marks).15 F(\(?\) instead of slashes to su\ rround the characters you are searching for)72 277.2 Q(.)-.55 E .501 (It is also possible to repeat the last substitution without ha)97 292.8 R .5(ving to retype the entire command.)-.2 F .5(An ampersand)5.5 F .999 (\(&\) used as a command repeats the most recent substitute command, us\ ing the same search and replacement pat-)72 304.8 R 2.5(terns. After)72 316.8 R(altering the current line by typing)2.5 E(:)144 334.8 Q F1 (s/text/texts/)1.666 E F0(you type)72 352.8 Q(:)144 370.8 Q F1(/text/&) 1.666 E F0(or simply)72 388.8 Q(:)144 406.8 Q F1(//&)1.666 E F0(to mak) 72 424.8 Q 2.5(et)-.1 G(he same change on the ne)-2.5 E (xt line in the b)-.15 E(uf)-.2 E(fer containing the characters `)-.25 E (`te)-.74 E(xt')-.15 E('.)-.74 E F1(Special characters)72 448.8 Q F0 -1 -.8(Tw o)97 464.4 T .623(characters ha)3.923 F .923 -.15(ve s)-.2 H .623 (pecial meanings when used in specifying searches:).15 F -.74(``)5.623 G ($').74 E 3.123('a)-.74 G .623(nd `)-3.123 F(`^')-.74 E 3.123('. `)-.74 F(`$')-.74 E 3.123('i)-.74 G 3.123(st)-3.123 G(ak)-3.123 E .623 (en by the)-.1 F(editor to mean `)72 476.4 Q(`end of the line')-.74 E 2.5('a)-.74 G (nd is used to identify strings that occur at the end of a line.)-2.5 E (:)144 494.4 Q F1(g/text.$/s//material./p)1.666 E F0 .793 (tells the editor to search for all lines ending in `)72 512.4 R(`te) -.74 E(xt.)-.15 E 4.773 -.74('' \()-.7 H .793(and nothing else, not e) .74 F -.15(ve)-.25 G 3.294(nab).15 G .794(lank space\), to change each) -3.294 F(\214nal `)72 524.4 Q(`te)-.74 E(xt.)-.15 E 1.48 -.74('' t)-.7 H 2.5(o`).74 G(`material.)-3.24 E -.74('')-.7 G 2.5(,a).74 G (nd print the changed lines.)-2.5 E(The symbol `)97 540 Q(`^')-.74 E 2.5 ('i)-.74 G(ndicates the be)-2.5 E(ginning of a line.)-.15 E(Thus,)5 E(:) 144 558 Q F1(s/^/1. /)1.666 E F0(instructs the editor to insert `)72 576 Q(`1.)-.74 E 1.48 -.74('' a)-.7 H(nd a space at the be).74 E (ginning of the current line.)-.15 E .452(The characters `)97 591.6 R (`$')-.74 E 2.951('a)-.74 G .451(nd `)-2.951 F(`^')-.74 E 2.951('h)-.74 G -2.25 -.2(av e)-2.951 H .451(special meanings only in the conte)3.151 F .451(xt of searching.)-.15 F .451(At other times, the)5.451 F 2.951 (ya)-.15 G(re)-2.951 E .218(ordinary characters.)72 603.6 R .218 (If you e)5.218 F -.15(ve)-.25 G 2.718(rn).15 G .219(eed to search for \ a character that has a special meaning, you must indicate that the) -2.718 F .532(character is to lose temporarily its special signi\214can\ ce by typing another special character)72 615.6 R 3.032(,t)-.4 G .531 (he backslash \(\\\), before)-3.032 F(it.)72 627.6 Q(:)144 645.6 Q F1 (s/\\\\$/dollar/)1.666 E F0 .623(looks for the character `)72 663.6 R (`$')-.74 E 3.124('i)-.74 G 3.124(nt)-3.124 G .624 (he current line and replaces it by the w)-3.124 F .624(ord `)-.1 F (`dollar')-.74 E 3.124('. W)-.74 F .624(ere it not for the backslash,) -.8 F .556(the `)72 675.6 R(`$')-.74 E 3.056('w)-.74 G .556(ould ha) -3.156 F .856 -.15(ve r)-.2 H .556(epresented `).15 F .555 (`the end of the line')-.74 F 3.055('i)-.74 G 3.055(ny)-3.055 G .555 (our search rather than the character `)-3.055 F(`$')-.74 E 3.055 ('. The)-.74 F(backslash)3.055 E(retains its special signi\214cance unl\ ess it is preceded by another backslash.)72 687.6 Q EP %%Page: 20 20 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-20 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 10/Times-Bold@0 SF(Issuing)72 84 Q/F2 8/Times-Bold@0 SF(UNIX)2.5 E F1(commands fr)2.5 E(om the editor)-.18 E F0 .091 (After creating se)97 99.6 R -.15(ve)-.25 G .091 (ral \214les with the editor).15 F 2.592(,y)-.4 G .092(ou may w)-2.592 F .092(ant to delete \214les no longer useful to you or ask for a list)-.1 F .523(of your \214les.)72 111.6 R(Remo)5.523 E .522 (ving and listing \214les are not functions of the editor)-.15 F 3.022 (,a)-.4 G .522(nd so the)-3.022 F 3.022(yr)-.15 G .522 (equire the use of)-3.022 F/F3 8/Times-Roman@0 SF(UNIX)3.022 E F0 (system)3.022 E .445(commands \(also referred to as `)72 123.6 R (`shell')-.74 E 2.945('c)-.74 G .445(ommands, as `)-2.945 F(`shell')-.74 E 2.945('i)-.74 G 2.945(st)-2.945 G .446 (he name of the program that processes)-2.945 F F3(UNIX)2.946 E F0(com-) 2.946 E 2.623(mands\). Y)72 135.6 R .123 (ou do not need to quit the editor to e)-1.1 F -.15(xe)-.15 G .122 (cute a).15 F F3(UNIX)2.622 E F0 .122 (command as long as you indicate that it is to be sent to)2.622 F (the shell for e)72 147.6 Q -.15(xe)-.15 G 2.5(cution. T).15 F 2.5(ou) -.8 G(se the)-2.5 E F3(UNIX)2.5 E F0(command)2.5 E F1(rm)2.5 E F0 (to remo)2.5 E .3 -.15(ve t)-.15 H(he \214le named `).15 E(`junk')-.74 E 2.5('t)-.74 G(ype:)-2.5 E(:)144 165.6 Q F1(!rm junk)1.666 E F0(!)144 177.6 Q(:)144 189.6 Q .13(The e)72 207.6 R .13(xclamation mark \(!\)) -.15 F .13(indicates that the rest of the line is to be processed as a \ shell command.)5.13 F .131(If the b)5.131 F(uf)-.2 E .131(fer con-)-.25 F(tents ha)72 219.6 Q .3 -.15(ve n)-.2 H (ot been written since the last change, a w).15 E (arning will be printed before the command is e)-.1 E -.15(xe)-.15 G (cuted:).15 E([No write since last change])144 237.6 Q .609 (The editor prints a `)72 255.6 R(`!')-.74 E 3.109('w)-.74 G .609 (hen the command is completed.)-3.109 F .609 (Other tutorials describe useful features of the system, of)5.609 F (which an editor is only one part.)72 267.6 Q F1 (Filenames and \214le manipulation)72 291.6 Q F0 .421 (Throughout each editing session, edit k)97 307.2 R .421 (eeps track of the name of the \214le being edited as the)-.1 F/F4 10 /Times-Italic@0 SF(curr)2.922 E .422(ent \214lename)-.37 F(.)-.15 E F0 .517(Edit remembers as the current \214lename the name gi)72 319.2 R -.15(ve)-.25 G 3.016(nw).15 G .516(hen you entered the editor)-3.016 F 5.516(.T)-.55 G .516(he current \214lename changes)-5.516 F(whene)72 331.2 Q -.15(ve)-.25 G 3.285(rt).15 G .785 (he edit \(e\) command is used to specify a ne)-3.285 F 3.285<778c>-.25 G 3.285(le. Once)-3.285 F .785 (edit has recorded a current \214lename, it inserts)3.285 F .088 (that name into an)72 343.2 R 2.588(yc)-.15 G .088 (ommand where a \214lename has been omitted.)-2.588 F .087 (If a write command does not specify a \214le, edit, as)5.088 F .257 (we ha)72 355.2 R .557 -.15(ve s)-.2 H .257 (een, supplies the current \214lename.).15 F .257 (If you are editing a \214le named `)5.257 F(`draft3')-.74 E 2.757('h) -.74 G -.2(av)-2.757 G .257(ing 283 lines in it, you can).2 F(ha)72 367.2 Q .3 -.15(ve t)-.2 H(he editor write onto a dif).15 E (ferent \214le by including its name in the write command:)-.25 E(:)144 385.2 Q F1 2.5(wc)1.666 G(hapter3)-2.5 E F0("chapter3" [ne)144 397.2 Q 2.5<778c>-.25 G(le] 283 lines, 8698 characters)-2.5 E .587 (The current \214lename remembered by the editor)72 415.2 R F4 .587 (will not be c)3.087 F(hang)-.15 E .586(ed as a r)-.1 F .586 (esult of the write command.)-.37 F F0 .586(Thus, if the)5.586 F(ne)72 427.2 Q .888(xt write command does not specify a name, edit will write \ onto the current \214le \(`)-.15 F(`draft3')-.74 E .888 ('\) and not onto the \214le)-.74 F -.74(``)72 439.2 S(chapter3').74 E ('.)-.74 E F1(The \214le \(f\) command)72 463.2 Q F0 1.948 -.8(To a)97 478.8 T .348(sk for the current \214lename, type).8 F F1(\214le)2.848 E F0(\(or)2.848 E F1(f)2.848 E F0 2.848(\). In)B .348 (response, the editor pro)2.848 F .347 (vides current information about the)-.15 F -.2(bu)72 490.8 S -.25(ff).2 G(er).25 E 2.532(,i)-.4 G .032(ncluding the \214lename, your current po\ sition, the number of lines in the b)-2.532 F(uf)-.2 E(fer)-.25 E 2.533 (,a)-.4 G .033(nd the percent of the distance)-2.533 F (through the \214le your current location is.)72 502.8 Q(:)144 520.8 Q F1(f)1.666 E F0("te)144 532.8 Q(xt" [Modi\214ed] line 3 of 4 --75%--) -.15 E .318(If the contents of the b)72 550.8 R(uf)-.2 E .318(fer ha) -.25 F .618 -.15(ve c)-.2 H .317 (hanged since the last time the \214le w).15 F .317 (as written, the editor will tell you that the \214le)-.1 F .421 (has been `)72 562.8 R(`[Modi\214ed]')-.74 E 2.921('. After)-.74 F .421 (you sa)2.921 F .721 -.15(ve t)-.2 H .421 (he changes by writing onto a disk \214le, the b).15 F(uf)-.2 E .421 (fer will no longer be consid-)-.25 F(ered modi\214ed:)72 574.8 Q(:)144 592.8 Q F1(w)1.666 E F0("te)144 604.8 Q(xt" 4 lines, 88 characters)-.15 E(:)144 616.8 Q F1(f)1.666 E F0("te)144 628.8 Q(xt" line 3 of 4 --75%--) -.15 E F1(Reading additional \214les \(r\))72 658.8 Q F0(The)97 674.4 Q F1 -.18(re)2.767 G .267(ad \(r\)).18 F F0 .267(command allo)2.767 F .267 (ws you to add the contents of a \214le to the b)-.25 F(uf)-.2 E .267 (fer at a speci\214ed location, essentially)-.25 F(cop)72 686.4 Q .218 (ying ne)-.1 F 2.718(wl)-.25 G .218(ines between tw)-2.718 F 2.718(oe) -.1 G .218(xisting lines.)-2.868 F 1.818 -.8(To u)5.218 H .219 (se it, specify the line after which the ne).8 F 2.719(wt)-.25 G -.15 (ex)-2.719 G 2.719(tw).15 G .219(ill be placed, the)-2.719 F F1 -.18(re) 72 698.4 S(ad \(r\)).18 E F0(command, and then the name of the \214le.) 2.5 E(If you ha)5 E .3 -.15(ve a \214)-.2 H(le named `).15 E(`e)-.74 E (xample')-.15 E(', the command)-.74 E EP %%Page: 21 21 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-21)-.45 F(:)144 84 Q/F1 10/Times-Bold@0 SF($r example)1.666 E F0("e)144 96 Q (xample" 18 lines, 473 characters)-.15 E .186(reads the \214le `)72 114 R(`e)-.74 E(xample')-.15 E 2.686('a)-.74 G .186(nd adds it to the b) -2.686 F(uf)-.2 E .185(fer after the last line.)-.25 F .185 (The current \214lename is not changed by the read)5.185 F(command.)72 126 Q F1(Writing parts of the b)72 150 Q(uffer)-.2 E F0(The)97 165.6 Q F1 .442(write \(w\))2.942 F F0 .442 (command can write all or part of the b)2.942 F(uf)-.2 E .443 (fer to a \214le you specify)-.25 F 5.443(.W)-.65 G 2.943(ea)-6.243 G .443(re already f)-2.943 F .443(amiliar with)-.1 F .287 (writing the entire contents of the b)72 177.6 R(uf)-.2 E .287 (fer to a disk \214le.)-.25 F 1.887 -.8(To w)5.287 H .286 (rite only part of the b).8 F(uf)-.2 E .286 (fer onto a \214le, indicate the be)-.25 F(gin-)-.15 E (ning and ending lines before the write command, for e)72 189.6 Q (xample)-.15 E(:)144 207.6 Q F1(45,$w ending)1.666 E F0 .394 (Here all lines from 45 through the end of the b)72 225.6 R(uf)-.2 E .395(fer are written onto the \214le named)-.25 F/F2 10/Times-Italic@0 SF(ending)2.895 E(.)-.15 E F0 .395(The lines remain in the)5.395 F -.2 (bu)72 237.6 S -.25(ff).2 G .612(er as part of the document you are edi\ ting, and you may continue to edit the entire b).25 F(uf)-.2 E(fer)-.25 E 5.612(.Y)-.55 G .611(our original \214le is)-6.712 F(unaf)72 249.6 Q .134(fected by your command to write part of the b)-.25 F(uf)-.2 E .134 (fer to another \214le.)-.25 F .135(Edit still remembers whether you ha) 5.134 F .435 -.15(ve s)-.2 H -2.25 -.2(av e).15 H(d).2 E (changes to the b)72 261.6 Q(uf)-.2 E (fer in your original \214le or not.)-.25 E F1(Reco)72 285.6 Q -.1(ve) -.1 G(ring \214les).1 E F0 1.215(Although it does not happen v)97 301.2 R 1.214(ery often, there are times)-.15 F/F3 8/Times-Roman@0 SF(UNIX) 3.714 E F0 1.214(stops w)3.714 F 1.214 (orking because of some malfunction.)-.1 F .485(This situation is kno)72 313.2 R .485(wn as a)-.25 F F2(cr)2.986 E(ash)-.15 E F0 5.486(.U)C .486 (nder most circumstances, edit')-5.486 F 2.986(sc)-.55 G .486(rash reco) -2.986 F -.15(ve)-.15 G .486(ry feature is able to sa).15 F .786 -.15 (ve w)-.2 H .486(ork to).05 F .229(within a fe)72 325.2 R 2.729(wl)-.25 G .229 (ines of changes before a crash \(or an accidental phone hang up\).) -2.729 F .228(If you lose the contents of an editing)5.228 F -.2(bu)72 337.2 S -.25(ff).2 G .02(er in a system crash, you will normally recei) .25 F .32 -.15(ve m)-.25 H .021(ail when you login that gi).15 F -.15 (ve)-.25 G 2.521(st).15 G .021(he name of the reco)-2.521 F -.15(ve)-.15 G .021(red \214le.).15 F -.8(To)5.021 G(reco)72 349.2 Q -.15(ve)-.15 G 3.607(rt).15 G 1.107(he \214le, enter the editor and type the command) -3.607 F F1 -.18(re)3.607 G(co).18 E -.1(ve)-.1 G(r).1 E F0(\()3.607 E F1 -.18(re)C(c).18 E F0 1.107(\), follo)B 1.107 (wed by the name of the lost \214le.)-.25 F -.15(Fo)6.107 G(r).15 E -.15 (ex)72 361.2 S(ample, to reco).15 E -.15(ve)-.15 G 2.5(rt).15 G(he b) -2.5 E(uf)-.2 E(fer for an edit session in)-.25 E -.2(vo)-.4 G (lving the \214le `).2 E(`chap6')-.74 E(', the command is:)-.74 E(:)144 379.2 Q F1 -.18(re)1.666 G(co).18 E -.1(ve)-.1 G 2.5(rc).1 G(hap6)-2.5 E F0(Reco)72 397.2 Q -.15(ve)-.15 G 2.871(ri).15 G 2.871(ss)-2.871 G .371 (ometimes unable to sa)-2.871 F .671 -.15(ve t)-.2 H .372(he entire b) .15 F(uf)-.2 E .372(fer successfully)-.25 F 2.872(,s)-.65 G 2.872(oa) -2.872 G -.1(lwa)-2.872 G .372(ys check the contents of the sa).1 F -.15 (ve)-.2 G 2.872(db).15 G(uf)-3.072 E(fer)-.25 E .627 (carefully before writing it back onto the original \214le.)72 409.2 R -.15(Fo)5.627 G 3.127(rb).15 G .626(est results, write the b)-3.127 F (uf)-.2 E .626(fer to a ne)-.25 F 3.126<778c>-.25 G .626 (le temporarily so)-3.126 F .065(you can e)72 421.2 R .065 (xamine it without risk to the original \214le.)-.15 F(Unfortunately) 5.065 E 2.565(,y)-.65 G .065(ou cannot use the reco)-2.565 F -.15(ve) -.15 G 2.566(rc).15 G .066(ommand to retrie)-2.566 F .366 -.15(ve a)-.25 H(\214le you remo)72 433.2 Q -.15(ve)-.15 G 2.5(du).15 G (sing the shell command)-2.5 E F1(rm)2.5 E F0(.)A F1(Other r)72 457.2 Q (eco)-.18 E -.1(ve)-.1 G(ry techniques).1 E F0 .987 (If something goes wrong when you are using the editor)97 472.8 R 3.487 (,i)-.4 G 3.486(tm)-3.487 G .986(ay be possible to sa)-3.486 F 1.286 -.15(ve y)-.2 H .986(our w).15 F .986(ork by using the)-.1 F(command)72 484.8 Q F1(pr)2.898 E(eser)-.18 E -.1(ve)-.1 G F0(\()2.998 E F1(pr)A(e) -.18 E F0 .398(\), which sa)B -.15(ve)-.2 G 2.898(st).15 G .398(he b) -2.898 F(uf)-.2 E .398(fer as if the system had crashed.)-.25 F .398 (If you are writing a \214le and you get)5.398 F .724(the message `)72 496.8 R .724(`Quota e)-.74 F(xceeded')-.15 E .724(', you ha)-.74 F 1.024 -.15(ve t)-.2 H .724 (ried to use more disk storage than is allotted to your account.).15 F F2(Pr)5.723 E(oceed)-.45 E .275(with caution)72 508.8 R F0 .275 (because it is lik)2.775 F .276(ely that only a part of the editor')-.1 F 2.776(sb)-.55 G(uf)-2.976 E .276(fer is no)-.25 F 2.776(wp)-.25 G .276 (resent in the \214le you tried to write.)-2.776 F(In)5.276 E .106 (this case you should use the shell escape from the editor \(!\))72 520.8 R .106(to remo)5.106 F .406 -.15(ve s)-.15 H .106 (ome \214les you don').15 F 2.606(tn)-.18 G .106 (eed and try to write the)-2.606 F(\214le ag)72 532.8 Q 2.5(ain. If)-.05 F(this is not possible and you cannot \214nd someone to help you, enter\ the command)2.5 E(:)144 550.8 Q F1(pr)1.666 E(eser)-.18 E -.1(ve)-.1 G F0(and w)72 568.8 Q(ait for the reply)-.1 E(,)-.65 E(File preserv)144 586.8 Q(ed.)-.15 E .252(If you do not recei)72 604.8 R .552 -.15(ve t) -.25 H .252(his reply).15 F 2.753(,s)-.65 G .253(eek help immediately) -2.753 F 5.253(.D)-.65 G 2.753(on)-5.253 G .253(ot simply lea)-2.753 F .553 -.15(ve t)-.2 H .253(he editor).15 F 5.253(.I)-.55 G 2.753(fy) -5.253 G .253(ou do, the b)-2.753 F(uf)-.2 E .253(fer will be)-.25 F .194(lost, and you may not be able to sa)72 616.8 R .494 -.15(ve y)-.2 H .194(our \214le.).15 F .193(If the reply is `)5.194 F .193 (`File preserv)-.74 F(ed.)-.15 E 4.173 -.74('' y)-.7 H .193(ou can lea) .74 F .493 -.15(ve t)-.2 H .193(he editor \(or logout\)).15 F .056 (to remedy the situation.)72 628.8 R .057(After a preserv)5.057 F .057 (e, you can use the reco)-.15 F -.15(ve)-.15 G 2.557(rc).15 G .057 (ommand once the problem has been corrected, or)-2.557 F(the)72 640.8 Q F12.5 E F0(option of the edit command if you lea)2.5 E .3 -.15 (ve t)-.2 H(he editor and w).15 E(ant to return.)-.1 E .566(If you mak) 97 656.4 R 3.066(ea)-.1 G 3.066(nu)-3.066 G .565 (ndesirable change to the b)-3.066 F(uf)-.2 E .565 (fer and type a write command before disco)-.25 F -.15(ve)-.15 G .565 (ring your mistak).15 F(e,)-.1 E .743(the modi\214ed v)72 668.4 R .743 (ersion will replace an)-.15 F 3.243(yp)-.15 G(re)-3.243 E .743(vious v) -.25 F .743(ersion of the \214le.)-.15 F .744(Should you e)5.744 F -.15 (ve)-.25 G 3.244(rl).15 G .744(ose a good v)-3.244 F .744 (ersion of a docu-)-.15 F 1.148(ment in this w)72 680.4 R(ay)-.1 E 3.648 (,d)-.65 G 3.648(on)-3.648 G 1.148(ot panic and lea)-3.648 F 1.448 -.15 (ve t)-.2 H 1.147(he editor).15 F 6.147(.A)-.55 G 3.647(sl)-6.147 G 1.147(ong as you stay in the editor)-3.647 F 3.647(,t)-.4 G 1.147 (he contents of the b)-3.647 F(uf)-.2 E(fer)-.25 E .385 (remain accessible.)72 692.4 R .385(Depending on the nature of the prob\ lem, it may be possible to restore the b)5.385 F(uf)-.2 E .386 (fer to a more com-)-.25 F(plete state with the undo command.)72 704.4 Q (After \214xing the damaged b)5 E(uf)-.2 E(fer)-.25 E 2.5(,y)-.4 G (ou can ag)-2.5 E(ain write the \214le to disk.)-.05 E EP %%Page: 22 22 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-22 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E/F1 10/Times-Bold@0 SF(Further r)72 84 Q (eading and other inf)-.18 E(ormation)-.25 E F0 .878 (Edit is an editor designed for be)97 99.6 R .878 (ginning and casual users.)-.15 F .878(It is actually a v)5.878 F .878 (ersion of a more po)-.15 F .877(werful editor)-.25 F(called)72 111.6 Q /F2 10/Times-Italic@0 SF -.2(ex)3.344 G(.).2 E F0 .844(These lessons ar\ e intended to introduce you to the editor and its more commonly-used co\ mmands.)5.844 F -.8(We)5.845 G(ha)72 123.6 Q .763 -.15(ve n)-.2 H .463 (ot co).15 F -.15(ve)-.15 G .463(red all of the editor').15 F 2.962(sc) -.55 G .462(ommands, b)-2.962 F .462 (ut a selection of commands that should be suf)-.2 F .462 (\214cient to accomplish)-.25 F .323(most of your editing tasks.)72 135.6 R -1.1(Yo)5.323 G 2.823(uc)1.1 G .323 (an \214nd out more about the editor in the)-2.823 F F2 .324(Ex Refer) 2.824 F .324(ence Manual,)-.37 F F0 .324(which is applicable)2.824 F 1.032(to both)72 147.6 R F2 -.2(ex)3.532 G F0(and)3.732 E F2(edit.)3.532 E F0 1.032(One w)6.032 F 1.032(ay to become f)-.1 F 1.032 (amiliar with the manual is to be)-.1 F 1.032 (gin by reading the description of com-)-.15 F (mands that you already kno)72 159.6 Q -.65(w.)-.25 G F1(Using)72 183.6 Q F2 6.176 -4.438(ee xx)2.5 H F0 1.017(As you become more e)97 199.2 R 1.017(xperienced with using the editor)-.15 F 3.517(,y)-.4 G 1.017 (ou may still \214nd that edit continues to meet your)-3.517 F 2.676 (needs. Ho)72 211.2 R(we)-.25 E -.15(ve)-.25 G .976 -.4(r, s).15 H .176 (hould you become interested in using).4 F F2 -.2(ex)2.676 G(,).2 E F0 .175(it is easy to switch.)2.676 F 1.775 -.8(To b)5.175 H -.15(eg).8 G .175(in an editing session with).15 F F2 -.2(ex)2.675 G(,).2 E F0 (use the name)72 223.2 Q F1(ex)2.5 E F0(in your command instead of)2.5 E F1(edit.)2.5 E F0 .276(Edit commands also w)97 238.8 R .276(ork in)-.1 F F2 -.2(ex)2.776 G(,).2 E F0 -.2(bu)2.776 G 2.777(tt).2 G .277 (he editing en)-2.777 F .277(vironment is some)-.4 F .277(what dif)-.25 F 2.777(ferent. Y)-.25 F .277(ou should be a)-1.1 F -.1(wa)-.15 G .277 (re of a).1 F(fe)72 250.8 Q 2.576(wd)-.25 G(if)-2.576 E .076 (ferences between)-.25 F F2 -.2(ex)2.576 G F0(and)2.776 E F2(edit.)2.576 E F0 .076(In edit, only the characters `)5.076 F(`^')-.74 E .076(', `) -.74 F(`$')-.74 E .076(', and `)-.74 F(`\\')-.74 E 2.576('h)-.74 G -2.25 -.2(av e)-2.576 H .075(special meanings in search-)2.775 F .859 (ing the b)72 262.8 R(uf)-.2 E .859 (fer or indicating characters to be changed by a substitute command.) -.25 F(Se)5.86 E -.15(ve)-.25 G .86(ral additional characters ha).15 F -.15(ve)-.2 G .424(special meanings in e)72 274.8 R .424 (x, as described in the)-.15 F F2 .424(Ex Refer)2.924 F .423 (ence Manual.)-.37 F F0 .423(Another feature of the edit en)5.423 F .423 (vironment pre)-.4 F -.15(ve)-.25 G(nts).15 E .606 (users from accidently entering tw)72 286.8 R 3.106(oa)-.1 G(lternati) -3.106 E .906 -.15(ve m)-.25 H .606(odes of editing,).15 F F2(open)3.106 E F0(and)3.107 E F2(visual,)3.107 E F0 .607(in which the editor beha) 3.107 F -.15(ve)-.2 G 3.107(sq).15 G(uite)-3.107 E(dif)72 298.8 Q 1.112 (ferently from normal command mode.)-.25 F 1.111(If you are using e) 6.111 F 3.611(xa)-.15 G 1.111(nd you encounter strange beha)-3.611 F (vior)-.2 E 3.611(,y)-.4 G 1.111(ou may ha)-3.611 F -.15(ve)-.2 G .565 (accidently entered open mode by typing `)72 310.8 R(`o')-.74 E 3.065 ('. T)-.74 F .565(ype the)-.8 F/F3 8/Times-Roman@0 SF(ESC)3.065 E F0 -.1 (ke)3.065 G 3.065(ya)-.05 G .565(nd then a `)-3.065 F(`Q')-.74 E 3.065 ('t)-.74 G 3.065(og)-3.065 G .565(et out of open or visual mode)-3.065 F .185(and back into the re)72 322.8 R .185(gular editor command mode.) -.15 F .185(The document)5.185 F F2 .184(An Intr)2.685 F .184 (oduction to Display Editing with V)-.45 F(i)-.74 E F0(pro)6.016 E(vide) -.15 E(full details of visual mode.)72 334.8 Q EP %%Page: 23 23 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Edit: A T)72 48 Q 355.95(utorial USD:11-23)-.45 F/F1 12/Times-Bold@0 SF(Index)291.33 84 Q F0(addressing,)72 123.6 Q/F2 10/Times-Italic@0 SF(see)2.5 E F0(line numbers)2.5 E(ampersand, 20)72 135.6 Q(append mode, 6-7)72 147.6 Q(append \(a\) command, 6, 7, 9)72 159.6 Q -.74(``)72 171.6 S(At end of \214le')-.06 E 2.5('\()-.74 G (message\), 18)-2.5 E(backslash \(\\\), 21)72 183.6 Q -.2(bu)72 195.6 S -.25(ff).2 G(er).25 E 2.5(,3)-.4 G(caret \(^\), 10, 20)72 207.6 Q (change \(c\) command, 18)72 219.6 Q(command mode, 5-6)72 231.6 Q -.74 (``)72 243.6 S(Command not found').74 E 2.5('\()-.74 G(message\), 6)-2.5 E(conte)72 255.6 Q(xt search, 10-12, 19-21)-.15 E (control characters \(`)72 267.6 Q(`^')-.74 E 2.5('n)-.74 G (otation\), 10)-2.5 E(control-H, 7)72 279.6 Q(cop)72 291.6 Q 2.5(y\()-.1 G(co\) command, 15)-2.5 E(corrections, 7, 16)72 303.6 Q (current \214lename, 21)72 315.6 Q(current line \()72 327.6 Q 1.666(.\)) 1.666 G 2.5(,1)-1.666 G(1, 17)-2.5 E(delete \(d\) command, 15-16)72 339.6 Q(dial-up, 5)72 351.6 Q(disk, 3)72 363.6 Q(documentation, 3, 23)72 375.6 Q(dollar \($\), 10, 11, 17, 20-21)72 387.6 Q(dot \()72 399.6 Q/F3 10/Times-Bold@0 SF(.)1.666 E F0 2.5(\)1)1.666 G(1, 17)-2.5 E(edit \(te) 72 411.6 Q(xt editor\), 3, 5, 23)-.15 E(edit \(e\) command, 5, 9, 14)72 423.6 Q(editing commands:)72 435.6 Q(append \(a\), 6, 7, 9)90 447.6 Q (change \(c\), 18)90 459.6 Q(cop)90 471.6 Q 2.5(y\()-.1 G(co\), 15)-2.5 E(delete \(d\), 15-16)90 483.6 Q(edit \(te)90 495.6 Q (xt editor\), 3, 5, 23)-.15 E(edit \(e\), 5, 9, 14)90 507.6 Q (\214le \(f\), 21-22)90 519.6 Q(global \(g\), 19)90 531.6 Q(mo)90 543.6 Q .3 -.15(ve \()-.15 H(m\), 14-15).15 E(number \(nu\), 11)90 555.6 Q (preserv)90 567.6 Q 2.5(e\()-.15 G(pre\), 22-23)-2.5 E(print \(p\), 10) 90 579.6 Q(quit \(q\), 8, 13)90 591.6 Q(read \(r\), 22)90 603.6 Q(reco) 90 615.6 Q -.15(ve)-.15 G 2.5(r\().15 G(rec\), 22, 23)-2.5 E (substitute \(s\), 11-12, 19, 20)90 627.6 Q(undo \(u\), 16-17, 23)90 639.6 Q(write \(w\), 8, 13, 21, 22)90 651.6 Q(z, 12-13)90 663.6 Q 2.5 (!\()90 675.6 S(shell escape\), 21)-2.5 E($=, 17)90 687.6 Q(+, 17)90 699.6 Q(\255, 17)90 711.6 Q(//, 12, 20)90 723.6 Q(??, 20)339.6 123.6 Q (., 11, 17)339.6 135.6 Q(.=, 11, 17)339.6 147.6 Q(entering te)321.6 159.6 Q(xt, 3, 6-7)-.15 E(erasing)321.6 171.6 Q(characters \(^H\), 7) 339.6 183.6 Q(lines \(@\), 7)339.6 195.6 Q(error corrections, 7, 16) 321.6 207.6 Q .3 -.15(ex \()321.6 219.6 T(te).15 E(xt editor\), 23)-.15 E F2(Ex Refer)321.6 231.6 Q(ence Manual)-.37 E F0 2.5(,2)C(3)-2.5 E -.15 (ex)321.6 243.6 S(clamation \(!\), 21).15 E(\214le, 3)321.6 255.6 Q (\214le \(f\) command, 21-22)321.6 267.6 Q(\214le reco)321.6 279.6 Q -.15(ve)-.15 G(ry).15 E 2.5(,2)-.65 G(2-23)-2.5 E(\214lename, 3, 21) 321.6 291.6 Q(global \(g\) command, 19)321.6 303.6 Q(input mode, 6-7) 321.6 315.6 Q(Interrupt \(message\), 9)321.6 327.6 Q(line numbers,)321.6 339.6 Q F2(see also)2.5 E F0(current line)2.5 E (dollar sign \($\), 10, 11, 17)339.6 351.6 Q(dot \()339.6 363.6 Q 1.666 (.\))1.666 G 2.5(,1)-1.666 G(1, 17)-2.5 E(relati)339.6 375.6 Q .3 -.15 (ve \()-.25 H 2.5(+a).15 G(nd \255\), 17)-2.5 E(list, 10)321.6 387.6 Q (logging in, 4-6)321.6 399.6 Q(logging out, 8)321.6 411.6 Q -.74(``) 321.6 423.6 S(Login incorrect').74 E 2.5('\()-.74 G(message\), 5)-2.5 E (minus \(\255\), 17)321.6 435.6 Q(mo)321.6 447.6 Q .3 -.15(ve \()-.15 H (m\) command, 14-15).15 E -.74(``)321.6 459.6 S(Ne).74 E -.05(ga)-.15 G (ti).05 E .3 -.15(ve a)-.25 H(ddress\212\214rst b).15 E(uf)-.2 E (fer line is 1')-.25 E 2.5('\()-.74 G(message\), 18)-2.5 E -.74(``)321.6 471.6 S(No current \214lename').74 E 2.5('\()-.74 G(message\), 8)-2.5 E -.74(``)321.6 483.6 S(No such \214le or directory').74 E 2.5('\()-.74 G (message\), 5, 6)-2.5 E -.74(``)321.6 495.6 S (No write since last change').74 E 2.5('\()-.74 G(message\), 21)-2.5 E (non-printing characters, 10)321.6 507.6 Q -.74(``)321.6 519.6 S (Nonzero address required').74 E 2.5('\()-.74 G(message\), 18)-2.5 E -.74(``)321.6 531.6 S(Not an editor command').74 E 2.5('\()-.74 G (message\), 6)-2.5 E -.74(``)321.6 543.6 S(Not that man).74 E 2.5(yl) -.15 G(ines in b)-2.5 E(uf)-.2 E(fer')-.25 E 2.5('\()-.74 G (message\), 18)-2.5 E(number \(nu\) command, 11)321.6 555.6 Q(passw) 321.6 567.6 Q(ord, 5)-.1 E(period \()321.6 579.6 Q 1.666(.\))1.666 G 2.5 (,1)-1.666 G(1, 17)-2.5 E(plus \(+\), 17)321.6 591.6 Q(preserv)321.6 603.6 Q 2.5(e\()-.15 G(pre\) command, 22-23)-2.5 E (print \(p\) command, 10)321.6 615.6 Q(program, 3)321.6 627.6 Q(prompts) 321.6 639.6 Q 2.5(%\()339.6 651.6 S/F4 8/Times-Roman@0 SF(UNIX)-2.5 E F0 (\), 5)A 2.5(:\()339.6 663.6 S(edit\), 5, 6, 7)-2.5 E(\(append\), 7) 347.1 675.6 Q(question \(?\), 20)321.6 687.6 Q (quit \(q\) command, 8, 13)321.6 699.6 Q(read \(r\) command, 22)321.6 711.6 Q(reco)321.6 723.6 Q -.15(ve)-.15 G 2.5(r\().15 G (rec\) command, 22, 23)-2.5 E EP %%Page: 24 24 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 355.95(USD:11-24 Edit:)72 48 R 2.5(AT)2.5 G (utorial)-2.95 E(reco)72 84 Q -.15(ve)-.15 G(ry).15 E(,)-.65 E/F1 10 /Times-Italic@0 SF(see)2.5 E F0(\214le reco)4.166 E -.15(ve)-.15 G(ry) .15 E(references, 3, 23)72 96 Q(remo)72 108 Q .3 -.15(ve \()-.15 H (rm\) command, 21, 22).15 E(re)72 120 Q -.15(ve)-.25 G(rse command ef) .15 E(fects \(undo\), 16-17, 23)-.25 E(searching, 10-12, 19-21)72 132 Q (shell, 21)72 144 Q(shell escape \(!\), 21)72 156 Q (slash \(/\), 11-12, 20)72 168 Q (special characters \(^, $, \\\), 10, 11, 17, 20-21)72 180 Q (substitute \(s\) command, 11-12, 19, 20)72 192 Q(terminals, 4-5)72 204 Q(te)72 216 Q(xt input mode, 7)-.15 E(undo \(u\) command, 16-17, 23)72 228 Q/F2 9/Times-Roman@0 SF(UNIX)72 240 Q F0 2.5(,3)C (write \(w\) command, 8, 13, 21, 22)72 252 Q 2.5(zc)72 264 S (ommand, 12-13)-2.5 E EP %%Trailer end %%EOF nvi-1.81.6/docs/edit/grohtml-7775-3.png0100644000076400001440000000070510720065714016263 0ustar skimousers‰PNG  IHDRX1·›ŒËtRNS”ý®bKGDÝŠ¤pIDATxœíÒ¿KQð£ùB¥å‘È¡µstL¡þ‡ÄÕí ’ipCtCkWÐ(8´œƒè…C4‘’r9éa6ܽî<¿>¯_½Å–ü_¾¼÷áñåû} Ð3³3ûGÖ×VÊIƒæ°´Ýû¦›Ÿö ô.œtíÒØÆÀOØ®µ¡0²*¼¦ìô%cdŠÄ*NjZ¨[`2œè¹‡=Fá&b..±Á~,p©q8è?Xà„»îeêšGöð¹SM1«m>cçËE}[­¥¥òCݼµø”ìX$#éÂÀjšXk­ÅŸûæZ\³’#–Ã|®µ«†ˆÕ«íä¦/}µÏw{Ãw3~1+²q³´X¸ŠèÞ-6±—@ñYǧßÓ9ÅËY²‹q’°D>io?¬¥Àxä,þ~ˆLŠ)þãw5e[Y=¤¶ÐµÕzô¶sOo¯Wèû¥…3ûoì€Ò¾ÿÑ*…½µhIEND®B`‚nvi-1.81.6/docs/exref/0040755000076400001440000000000010720065720013514 5ustar skimousersnvi-1.81.6/docs/exref/Makefile0100644000076400001440000000126610720065506015160 0ustar skimousers# $Id: Makefile,v 8.10 2001/01/28 15:50:07 skimo Exp $ (Berkeley) $Date: 2001/01/28 15:50:07 $ ROFF= groff TBL= tbl ALL= exref.ps summary.ps ../html/exref.html ../html/ex-summary.html all: $(ALL) ../html/exref.html: ex.rm test -d ../html || mkdir ../html ${TBL} $< | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ ../html/ex-summary.html: ex.summary test -d ../html || mkdir ../html ${TBL} $< | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ exref.ps: ex.rm ${TBL} $< | ${ROFF} -ms > $@ chmod 444 $@ summary.ps: ex.summary ${TBL} $< | ${ROFF} -ms > $@ chmod 444 $@ clean: rm -f $(ALL) nvi-1.81.6/docs/exref/ex.rm0100644000076400001440000016043610720065506014501 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: ex.rm,v 8.5 1996/08/18 11:36:16 bostic Exp $ (Berkeley) $Date: 1996/08/18 11:36:16 $ .\" .nr LL 6.5i .nr FL 6.5i .EH 'USD:12-%''Ex Reference Manual' .OH 'Ex Reference Manual''USD:12-%' .nr )P 0 .de ZP .nr pd \\n()P .nr )P 0 .if \\n(.$=0 .IP .if \\n(.$=1 .IP "\\$1" .if \\n(.$>=2 .IP "\\$1" "\\$2" .nr )P \\n(pd .rm pd .. .de LC .br .sp .1i .ne 4 .LP .ta 4.0i .. .bd S B 3 .\".RP .TL Ex Reference Manual .br Version 3.7 .AU William Joy .AU Mark Horton .AI Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley Berkeley, Ca. 94720 .AB .I Ex a line oriented text editor, which supports both command and display oriented editing. This reference manual describes the command oriented part of .I ex; the display editing features of .I ex are described in .I "An Introduction to Display Editing with Vi." Other documents about the editor include the introduction .I "Edit: A tutorial", the .I "Ex/edit Command Summary", and a .I "Vi Quick Reference" card. .AE .NH 1 Starting ex .PP .FS The financial support of an \s-2IBM\s0 Graduate Fellowship and the National Science Foundation under grants MCS74-07644-A03 and MCS78-07291 is gratefully acknowledged. .FE Each instance of the editor has a set of options, which can be set to tailor it to your liking. The command .I edit invokes a version of .I ex designed for more casual or beginning users by changing the default settings of some of these options. To simplify the description which follows we assume the default settings of the options. .PP When invoked, .I ex determines the terminal type from the \s-2TERM\s0 variable in the environment. It there is a \s-2TERMCAP\s0 variable in the environment, and the type of the terminal described there matches the \s-2TERM\s0 variable, then that description is used. Also if the \s-2TERMCAP\s0 variable contains a pathname (beginning with a \fB/\fR) then the editor will seek the description of the terminal in that file (rather than the default /etc/termcap). If there is a variable \s-2EXINIT\s0 in the environment, then the editor will execute the commands in that variable, otherwise if there is a file .I \&.exrc in your \s-2HOME\s0 directory .I ex reads commands from that file, simulating a .I source command. Option setting commands placed in \s-2EXINIT\s0 or .I \&.exrc will be executed before each editor session. .PP A command to enter .I ex has the following prototype:\(dg .FS \(dg Brackets `[' `]' surround optional parameters here. .FE .DS \fBex\fP [ \fB\-\fP ] [ \fB\-v\fP ] [ \fB\-t\fP \fItag\fP ] [ \fB\-r\fP ] [ \fB\-l\fP ] [ \fB\-w\fP\fIn\fP ] [ \fB\-x\fP ] [ \fB\-R\fP ] [ \fB+\fP\fIcommand\fP ] name ... .DE The most common case edits a single file with no options, i.e.: .DS \fBex\fR name .DE The .B \- command line option option suppresses all interactive-user feedback and is useful in processing editor scripts in command files. The .B \-v option is equivalent to using .I vi rather than .I ex. The .B \-t option is equivalent to an initial .I tag command, editing the file containing the .I tag and positioning the editor at its definition. The .B \-r option is used in recovering after an editor or system crash, retrieving the last saved version of the named file or, if no file is specified, typing a list of saved files. The .B \-l option sets up for editing \s-2LISP\s0, setting the .I showmatch and .I lisp options. The .B \-w option sets the default window size to .I n, and is useful on dialups to start in small windows. The .B \-x option causes .I ex to prompt for a .I key , which is used to encrypt and decrypt the contents of the file, which should already be encrypted using the same key, see .I crypt (1). The .B \-R option sets the .I readonly option at the start. .I Name arguments indicate files to be edited. An argument of the form \fB+\fIcommand\fR indicates that the editor should begin by executing the specified command. If .I command is omitted, then it defaults to ``$'', positioning the editor at the last line of the first file initially. Other useful commands here are scanning patterns of the form ``/pat'' or line numbers, e.g. ``+100'' starting at line 100. .NH 1 File manipulation .NH 2 Current file .PP .I Ex is normally editing the contents of a single file, whose name is recorded in the .I current file name. .I Ex performs all editing actions in a buffer (actually a temporary file) into which the text of the file is initially read. Changes made to the buffer have no effect on the file being edited unless and until the buffer contents are written out to the file with a .I write command. After the buffer contents are written, the previous contents of the written file are no longer accessible. When a file is edited, its name becomes the current file name, and its contents are read into the buffer. .PP The current file is almost always considered to be .I edited. This means that the contents of the buffer are logically connected with the current file name, so that writing the current buffer contents onto that file, even if it exists, is a reasonable action. If the current file is not .I edited then .I ex will not normally write on it if it already exists.* .FS * The .I file command will say ``[Not edited]'' if the current file is not considered edited. .FE .NH 2 Alternate file .PP Each time a new value is given to the current file name, the previous current file name is saved as the .I alternate file name. Similarly if a file is mentioned but does not become the current file, it is saved as the alternate file name. .NH 2 Filename expansion .PP Filenames within the editor may be specified using the normal shell expansion conventions. In addition, the character `%' in filenames is replaced by the .I current file name and the character `#' by the .I alternate file name.\(dg .FS \(dg This makes it easy to deal alternately with two files and eliminates the need for retyping the name supplied on an .I edit command after a .I "No write since last change" diagnostic is received. .FE .NH 2 Multiple files and named buffers .PP If more than one file is given on the command line, then the first file is edited as described above. The remaining arguments are placed with the first file in the .I "argument list." The current argument list may be displayed with the .I args command. The next file in the argument list may be edited with the .I next command. The argument list may also be respecified by specifying a list of names to the .I next command. These names are expanded, the resulting list of names becomes the new argument list, and .I ex edits the first file on the list. .PP For saving blocks of text while editing, and especially when editing more than one file, .I ex has a group of named buffers. These are similar to the normal buffer, except that only a limited number of operations are available on them. The buffers have names .I a through .I z.\(dd .FS \(dd It is also possible to refer to .I A through .I Z; the upper case buffers are the same as the lower but commands append to named buffers rather than replacing if upper case names are used. .FE .NH 2 Read only .PP It is possible to use .I ex in .I "read only" mode to look at files that you have no intention of modifying. This mode protects you from accidently overwriting the file. Read only mode is on when the .I readonly option is set. It can be turned on with the .B \-R command line option, by the .I view command line invocation, or by setting the .I readonly option. It can be cleared by setting .I noreadonly . It is possible to write, even while in read only mode, by indicating that you really know what you are doing. You can write to a different file, or can use the ! form of write, even while in read only mode. .NH 1 Exceptional Conditions .NH 2 Errors and interrupts .PP When errors occur .I ex (optionally) rings the terminal bell and, in any case, prints an error diagnostic. If the primary input is from a file, editor processing will terminate. If an interrupt signal is received, .I ex prints ``Interrupt'' and returns to its command level. If the primary input is a file, then .I ex will exit when this occurs. .NH 2 Recovering from hangups and crashes .PP If a hangup signal is received and the buffer has been modified since it was last written out, or if the system crashes, either the editor (in the first case) or the system (after it reboots in the second) will attempt to preserve the buffer. The next time you log in you should be able to recover the work you were doing, losing at most a few lines of changes from the last point before the hangup or editor crash. To recover a file you can use the .B \-r option. If you were editing the file .I resume, then you should change to the directory where you were when the crash occurred, giving the command .DS \fBex \-r\fP\fI resume\fP .DE After checking that the retrieved file is indeed ok, you can .I write it over the previous contents of that file. .PP You will normally get mail from the system telling you when a file has been saved after a crash. The command .DS \fBex\fP \-\fBr\fP .DE will print a list of the files which have been saved for you. (In the case of a hangup, the file will not appear in the list, although it can be recovered.) .NH 1 Editing modes .PP .I Ex has five distinct modes. The primary mode is .I command mode. Commands are entered in command mode when a `:' prompt is present, and are executed each time a complete line is sent. In .I "text input" mode .I ex gathers input lines and places them in the file. The .I append, .I insert, and .I change commands use text input mode. No prompt is printed when you are in text input mode. This mode is left by typing a `.' alone at the beginning of a line, and .I command mode resumes. .PP The last three modes are .I open and .I visual modes, entered by the commands of the same name, and, within open and visual modes .I "text insertion" mode. .I Open and .I visual modes allow local editing operations to be performed on the text in the file. The .I open command displays one line at a time on any terminal while .I visual works on \s-2CRT\s0 terminals with random positioning cursors, using the screen as a (single) window for file editing changes. These modes are described (only) in .I "An Introduction to Display Editing with Vi." .NH Command structure .PP Most command names are English words, and initial prefixes of the words are acceptable abbreviations. The ambiguity of abbreviations is resolved in favor of the more commonly used commands.* .FS * As an example, the command .I substitute can be abbreviated `s' while the shortest available abbreviation for the .I set command is `se'. .FE .NH 2 Command parameters .PP Most commands accept prefix addresses specifying the lines in the file upon which they are to have effect. The forms of these addresses will be discussed below. A number of commands also may take a trailing .I count specifying the number of lines to be involved in the command.\(dg .FS \(dg Counts are rounded down if necessary. .FE Thus the command ``10p'' will print the tenth line in the buffer while ``delete 5'' will delete five lines from the buffer, starting with the current line. .PP Some commands take other information or parameters, this information always being given after the command name.\(dd .FS \(dd Examples would be option names in a .I set command i.e. ``set number'', a file name in an .I edit command, a regular expression in a .I substitute command, or a target address for a .I copy command, i.e. ``1,5 copy 25''. .FE .NH 2 Command variants .PP A number of commands have two distinct variants. The variant form of the command is invoked by placing an `!' immediately after the command name. Some of the default variants may be controlled by options; in this case, the `!' serves to toggle the default. .NH 2 Flags after commands .PP The characters `#', `p' and `l' may be placed after many commands.** .FS ** A `p' or `l' must be preceded by a blank or tab except in the single special case `dp'. .FE In this case, the command abbreviated by these characters is executed after the command completes. Since .I ex normally prints the new current line after each change, `p' is rarely necessary. Any number of `+' or `\-' characters may also be given with these flags. If they appear, the specified offset is applied to the current line value before the printing command is executed. .NH 2 Comments .PP It is possible to give editor commands which are ignored. This is useful when making complex editor scripts for which comments are desired. The comment character is the double quote: ". Any command line beginning with " is ignored. Comments beginning with " may also be placed at the ends of commands, except in cases where they could be confused as part of text (shell escapes and the substitute and map commands). .NH 2 Multiple commands per line .PP More than one command may be placed on a line by separating each pair of commands by a `|' character. However the .I global commands, comments, and the shell escape `!' must be the last command on a line, as they are not terminated by a `|'. .NH 2 Reporting large changes .PP Most commands which change the contents of the editor buffer give feedback if the scope of the change exceeds a threshold given by the .I report option. This feedback helps to detect undesirably large changes so that they may be quickly and easily reversed with an .I undo. After commands with more global effect such as .I global or .I visual, you will be informed if the net change in the number of lines in the buffer during this command exceeds this threshold. .NH 1 Command addressing .NH 2 Addressing primitives .IP \fB.\fR 20 The current line. Most commands leave the current line as the last line which they affect. The default address for most commands is the current line, thus `\fB.\fR' is rarely used alone as an address. .IP \fIn\fR 20 The \fIn\fRth line in the editor's buffer, lines being numbered sequentially from 1. .IP \fB$\fR 20 The last line in the buffer. .IP \fB%\fR 20 An abbreviation for ``1,$'', the entire buffer. .IP \fI+n\fR\ \fI\-n\fR 20 An offset relative to the current buffer line.\(dg .FS \(dg The forms `.+3' `+3' and `+++' are all equivalent; if the current line is line 100 they all address line 103. .FE .IP \fB/\fIpat\fR\fB/\fR\ \fB?\fIpat\fR\fB?\fR 20 Scan forward and backward respectively for a line containing \fIpat\fR, a regular expression (as defined below). The scans normally wrap around the end of the buffer. If all that is desired is to print the next line containing \fIpat\fR, then the trailing \fB/\fR or \fB?\fR may be omitted. If \fIpat\fP is omitted or explicitly empty, then the last regular expression specified is located.\(dd .FS \(dd The forms \fB\e/\fP and \fB\e?\fP scan using the last regular expression used in a scan; after a substitute \fB//\fP and \fB??\fP would scan using the substitute's regular expression. .FE .IP \fB\(aa\(aa\fP\ \fB\(aa\fP\fIx\fP 20 Before each non-relative motion of the current line `\fB.\fP', the previous current line is marked with a tag, subsequently referred to as `\(aa\(aa'. This makes it easy to refer or return to this previous context. Marks may also be established by the .I mark command, using single lower case letters .I x and the marked lines referred to as `\(aa\fIx\fR'. .NH 2 Combining addressing primitives .PP Addresses to commands consist of a series of addressing primitives, separated by `,' or `;'. Such address lists are evaluated left-to-right. When addresses are separated by `;' the current line `\fB.\fR' is set to the value of the previous addressing expression before the next address is interpreted. If more addresses are given than the command requires, then all but the last one or two are ignored. If the command takes two addresses, the first addressed line must precede the second in the buffer.\(dg .FS \(dg Null address specifications are permitted in a list of addresses, the default in this case is the current line `.'; thus `,100' is equivalent to `\fB.\fR,100'. It is an error to give a prefix address to a command which expects none. .FE .NH 1 Command descriptions .PP The following form is a prototype for all .I ex commands: .DS \fIaddress\fR \fBcommand\fR \fI! parameters count flags\fR .DE All parts are optional; the degenerate case is the empty command which prints the next line in the file. For sanity with use from within .I visual mode, .I ex ignores a ``:'' preceding any command. .PP In the following command descriptions, the default addresses are shown in parentheses, which are .I not, however, part of the command. .LC \fBabbreviate\fR \fIword rhs\fP abbr: \fBab\fP .ZP Add the named abbreviation to the current list. When in input mode in visual, if .I word is typed as a complete word, it will be changed to .I rhs . .LC ( \fB.\fR ) \fBappend\fR abbr: \fBa\fR .br \fItext\fR .br \&\fB.\fR .ZP Reads the input text and places it after the specified line. After the command, `\fB.\fR' addresses the last line input or the specified line if no lines were input. If address `0' is given, text is placed at the beginning of the buffer. .LC \fBa!\fR .br \fItext\fR .br \&\fB.\fR .ZP The variant flag to .I append toggles the setting for the .I autoindent option during the input of .I text. .LC \fBargs\fR .ZP The members of the argument list are printed, with the current argument delimited by `[' and `]'. .ig .PP \fBcd\fR \fIdirectory\fR .ZP The .I cd command is a synonym for .I chdir. .. .LC ( \fB.\fP , \fB.\fP ) \fBchange\fP \fIcount\fP abbr: \fBc\fP .br \fItext\fP .br \&\fB.\fP .ZP Replaces the specified lines with the input \fItext\fP. The current line becomes the last line input; if no lines were input it is left as for a \fIdelete\fP. .LC \fBc!\fP .br \fItext\fP .br \&\fB.\fP .ZP The variant toggles .I autoindent during the .I change. .ig .LC \fBchdir\fR \fIdirectory\fR .ZP The specified \fIdirectory\fR becomes the current directory. If no directory is specified, the current value of the .I home option is used as the target directory. After a .I chdir the current file is not considered to have been edited so that write restrictions on pre-existing files apply. .. .LC ( \fB.\fP , \fB.\fP )\|\fBcopy\fP \fIaddr\fP \fIflags\fP abbr: \fBco\fP .ZP A .I copy of the specified lines is placed after .I addr, which may be `0'. The current line `\fB.\fR' addresses the last line of the copy. The command .I t is a synonym for .I copy. .LC ( \fB.\fR , \fB.\fR )\|\fBdelete\fR \fIbuffer\fR \fIcount\fR \fIflags\fR abbr: \fBd\fR .ZP Removes the specified lines from the buffer. The line after the last line deleted becomes the current line; if the lines deleted were originally at the end, the new last line becomes the current line. If a named .I buffer is specified by giving a letter, then the specified lines are saved in that buffer, or appended to it if an upper case letter is used. .LC \fBedit\fR \fIfile\fR abbr: \fBe\fR .br \fBex\fR \fIfile\fR .ZP Used to begin an editing session on a new file. The editor first checks to see if the buffer has been modified since the last .I write command was issued. If it has been, a warning is issued and the command is aborted. The command otherwise deletes the entire contents of the editor buffer, makes the named file the current file and prints the new filename. After insuring that this file is sensible\(dg .FS \(dg I.e., that it is not a binary file such as a directory, a block or character special file other than .I /dev/tty, a terminal, or a binary or executable file (as indicated by the first word). .FE the editor reads the file into its buffer. .IP If the read of the file completes without error, the number of lines and characters read is typed. If there were any non-\s-2ASCII\s0 characters in the file they are stripped of their non-\s-2ASCII\s0 high bits, and any null characters in the file are discarded. If none of these errors occurred, the file is considered .I edited. If the last line of the input file is missing the trailing newline character, it will be supplied and a complaint will be issued. This command leaves the current line `\fB.\fR' at the last line read.\(dd .FS \(dd If executed from within .I open or .I visual, the current line is initially the first line of the file. .FE .LC \fBe!\fR \fIfile\fR .ZP The variant form suppresses the complaint about modifications having been made and not written from the editor buffer, thus discarding all changes which have been made before editing the new file. .LC \fBe\fR \fB+\fIn\fR \fIfile\fR .ZP Causes the editor to begin at line .I n rather than at the last line; \fIn\fR may also be an editor command containing no spaces, e.g.: ``+/pat''. .LC \fBfile\fR abbr: \fBf\fR .ZP Prints the current file name, whether it has been `[Modified]' since the last .I write command, whether it is .I "read only" , the current line, the number of lines in the buffer, and the percentage of the way through the buffer of the current line.* .FS * In the rare case that the current file is `[Not edited]' this is noted also; in this case you have to use the form \fBw!\fR to write to the file, since the editor is not sure that a \fBwrite\fR will not destroy a file unrelated to the current contents of the buffer. .FE .LC \fBfile\fR \fIfile\fR .ZP The current file name is changed to .I file which is considered `[Not edited]'. .LC ( 1 , $ ) \fBglobal\fR /\fIpat\|\fR/ \fIcmds\fR abbr: \fBg\fR .ZP First marks each line among those specified which matches the given regular expression. Then the given command list is executed with `\fB.\fR' initially set to each marked line. .IP The command list consists of the remaining commands on the current input line and may continue to multiple lines by ending all but the last such line with a `\e'. If .I cmds (and possibly the trailing \fB/\fR delimiter) is omitted, each line matching .I pat is printed. .I Append, .I insert, and .I change commands and associated input are permitted; the `\fB.\fR' terminating input may be omitted if it would be on the last line of the command list. .I Open and .I visual commands are permitted in the command list and take input from the terminal. .IP The .I global command itself may not appear in .I cmds. The .I undo command is also not permitted there, as .I undo instead can be used to reverse the entire .I global command. The options .I autoprint and .I autoindent are inhibited during a .I global, (and possibly the trailing \fB/\fR delimiter) and the value of the .I report option is temporarily infinite, in deference to a \fIreport\fR for the entire global. Finally, the context mark `\'\'' is set to the value of `.' before the global command begins and is not changed during a global command, except perhaps by an .I open or .I visual within the .I global. .LC \fBg!\fR \fB/\fIpat\fB/\fR \fIcmds\fR abbr: \fBv\fR .IP The variant form of \fIglobal\fR runs \fIcmds\fR at each line not matching \fIpat\fR. .LC ( \fB.\fR )\|\fBinsert\fR abbr: \fBi\fR .br \fItext\fR .br \&\fB.\fR .ZP Places the given text before the specified line. The current line is left at the last line input; if there were none input it is left at the line before the addressed line. This command differs from .I append only in the placement of text. .KS .LC \fBi!\fR .br \fItext\fR .br \&\fB.\fR .ZP The variant toggles .I autoindent during the .I insert. .KE .LC ( \fB.\fR , \fB.\fR+1 ) \fBjoin\fR \fIcount\fR \fIflags\fR abbr: \fBj\fR .ZP Places the text from a specified range of lines together on one line. White space is adjusted at each junction to provide at least one blank character, two if there was a `\fB.\fR' at the end of the line, or none if the first following character is a `)'. If there is already white space at the end of the line, then the white space at the start of the next line will be discarded. .LC \fBj!\fR .ZP The variant causes a simpler .I join with no white space processing; the characters in the lines are simply concatenated. .LC ( \fB.\fR ) \fBk\fR \fIx\fR .ZP The .I k command is a synonym for .I mark. It does not require a blank or tab before the following letter. .LC ( \fB.\fR , \fB.\fR ) \fBlist\fR \fIcount\fR \fIflags\fR .ZP Prints the specified lines in a more unambiguous way: tabs are printed as `^I' and the end of each line is marked with a trailing `$'. The current line is left at the last line printed. .LC \fBmap\fR \fIlhs\fR \fIrhs\fR .ZP The .I map command is used to define macros for use in .I visual mode. .I Lhs should be a single character, or the sequence ``#n'', for n a digit, referring to function key \fIn\fR. When this character or function key is typed in .I visual mode, it will be as though the corresponding \fIrhs\fR had been typed. On terminals without function keys, you can type ``#n''. See section 6.9 of the ``Introduction to Display Editing with Vi'' for more details. .LC ( \fB.\fR ) \fBmark\fR \fIx\fR .ZP Gives the specified line mark .I x, a single lower case letter. The .I x must be preceded by a blank or a tab. The addressing form `\'x' then addresses this line. The current line is not affected by this command. .LC ( \fB.\fR , \fB.\fR ) \fBmove\fR \fIaddr\fR abbr: \fBm\fR .ZP The .I move command repositions the specified lines to be after .I addr . The first of the moved lines becomes the current line. .LC \fBnext\fR abbr: \fBn\fR .ZP The next file from the command line argument list is edited. .LC \fBn!\fR .ZP The variant suppresses warnings about the modifications to the buffer not having been written out, discarding (irretrievably) any changes which may have been made. .LC \fBn\fR \fIfilelist\fR .br \fBn\fR \fB+\fIcommand\fR \fIfilelist\fR .ZP The specified .I filelist is expanded and the resulting list replaces the current argument list; the first file in the new list is then edited. If .I command is given (it must contain no spaces), then it is executed after editing the first such file. .LC ( \fB.\fR , \fB.\fR ) \fBnumber\fR \fIcount\fR \fIflags\fR abbr: \fB#\fR or \fBnu\fR .ZP Prints each specified line preceded by its buffer line number. The current line is left at the last line printed. .KS .LC ( \fB.\fR ) \fBopen\fR \fIflags\fR abbr: \fBo\fR .br ( \fB.\fR ) \fBopen\fR /\fIpat\|\fR/ \fIflags\fR .ZP Enters intraline editing \fIopen\fR mode at each addressed line. If .I pat is given, then the cursor will be placed initially at the beginning of the string matched by the pattern. To exit this mode use Q. See .I "An Introduction to Display Editing with Vi" for more details. .KE .LC \fBpreserve\fR .ZP The current editor buffer is saved as though the system had just crashed. This command is for use only in emergencies when a .I write command has resulted in an error and you don't know how to save your work. After a .I preserve you should seek help. .LC ( \fB.\fR , \fB.\fR )\|\fBprint\fR \fIcount\fR abbr: \fBp\fR or \fBP\fR .ZP Prints the specified lines with non-printing characters printed as control characters `^\fIx\fR\|'; delete (octal 177) is represented as `^?'. The current line is left at the last line printed. .LC ( \fB.\fR )\|\fBput\fR \fIbuffer\fR abbr: \fBpu\fR .ZP Puts back previously .I deleted or .I yanked lines. Normally used with .I delete to effect movement of lines, or with .I yank to effect duplication of lines. If no .I buffer is specified, then the last .I deleted or .I yanked text is restored.* .FS * But no modifying commands may intervene between the .I delete or .I yank and the .I put, nor may lines be moved between files without using a named buffer. .FE By using a named buffer, text may be restored that was saved there at any previous time. .LC \fBquit\fR abbr: \fBq\fR .ZP Causes .I ex to terminate. No automatic write of the editor buffer to a file is performed. However, .I ex issues a warning message if the file has changed since the last .I write command was issued, and does not .I quit.\(dg .FS \(dg \fIEx\fR will also issue a diagnostic if there are more files in the argument list. .FE Normally, you will wish to save your changes, and you should give a \fIwrite\fR command; if you wish to discard them, use the \fBq!\fR command variant. .LC \fBq!\fR .ZP Quits from the editor, discarding changes to the buffer without complaint. .LC ( \fB.\fR ) \fBread\fR \fIfile\fR abbr: \fBr\fR .ZP Places a copy of the text of the given file in the editing buffer after the specified line. If no .I file is given the current file name is used. The current file name is not changed unless there is none in which case .I file becomes the current name. The sensibility restrictions for the .I edit command apply here also. If the file buffer is empty and there is no current name then .I ex treats this as an .I edit command. .IP Address `0' is legal for this command and causes the file to be read at the beginning of the buffer. Statistics are given as for the .I edit command when the .I read successfully terminates. After a .I read the current line is the last line read.\(dd .FS \(dd Within .I open and .I visual the current line is set to the first line read rather than the last. .FE .LC ( \fB.\fR ) \fBread\fR \fB!\fR\fIcommand\fR .ZP Reads the output of the command .I command into the buffer after the specified line. This is not a variant form of the command, rather a read specifying a .I command rather than a .I filename; a blank or tab before the \fB!\fR is mandatory. .LC \fBrecover \fIfile\fR .ZP Recovers .I file from the system save area. Used after a accidental hangup of the phone** .FS ** The system saves a copy of the file you were editing only if you have made changes to the file. .FE or a system crash** or .I preserve command. Except when you use .I preserve you will be notified by mail when a file is saved. .LC \fBrewind\fR abbr: \fBrew\fR .ZP The argument list is rewound, and the first file in the list is edited. .LC \fBrew!\fR .ZP Rewinds the argument list discarding any changes made to the current buffer. .LC \fBset\fR \fIparameter\fR .ZP With no arguments, prints those options whose values have been changed from their defaults; with parameter .I all it prints all of the option values. .IP Giving an option name followed by a `?' causes the current value of that option to be printed. The `?' is unnecessary unless the option is Boolean valued. Boolean options are given values either by the form `set \fIoption\fR' to turn them on or `set no\fIoption\fR' to turn them off; string and numeric options are assigned via the form `set \fIoption\fR=value'. .IP More than one parameter may be given to .I set \|; they are interpreted left-to-right. .LC \fBshell\fR abbr: \fBsh\fR .IP A new shell is created. When it terminates, editing resumes. .LC \fBsource\fR \fIfile\fR abbr: \fBso\fR .IP Reads and executes commands from the specified file. .I Source commands may be nested. .LC ( \fB.\fR , \fB.\fR ) \fBsubstitute\fR /\fIpat\fR\|/\fIrepl\fR\|/ \fIoptions\fR \fIcount\fR \fIflags\fR abbr: \fBs\fR .IP On each specified line, the first instance of pattern .I pat is replaced by replacement pattern .I repl. If the .I global indicator option character `g' appears, then all instances are substituted; if the .I confirm indication character `c' appears, then before each substitution the line to be substituted is typed with the string to be substituted marked with `\(ua' characters. By typing an `y' one can cause the substitution to be performed, any other input causes no change to take place. After a .I substitute the current line is the last line substituted. .IP Lines may be split by substituting new-line characters into them. The newline in .I repl must be escaped by preceding it with a `\e'. Other metacharacters available in .I pat and .I repl are described below. .LC .B stop .ZP Suspends the editor, returning control to the top level shell. If .I autowrite is set and there are unsaved changes, a write is done first unless the form .B stop ! is used. This commands is only available where supported by the teletype driver and operating system. .LC ( \fB.\fR , \fB.\fR ) \fBsubstitute\fR \fIoptions\fR \fIcount\fR \fIflags\fR abbr: \fBs\fR .ZP If .I pat and .I repl are omitted, then the last substitution is repeated. This is a synonym for the .B & command. .LC ( \fB.\fR , \fB.\fR ) \fBt\fR \fIaddr\fR \fIflags\fR .ZP The .I t command is a synonym for .I copy . .LC \fBta\fR \fItag\fR .ZP The focus of editing switches to the location of .I tag, switching to a different line in the current file where it is defined, or if necessary to another file.\(dd .FS \(dd If you have modified the current file before giving a .I tag command, you must write it out; giving another .I tag command, specifying no .I tag will reuse the previous tag. .FE .IP The tags file is normally created by a program such as .I ctags, and consists of a number of lines with three fields separated by blanks or tabs. The first field gives the name of the tag, the second the name of the file where the tag resides, and the third gives an addressing form which can be used by the editor to find the tag; this field is usually a contextual scan using `/\fIpat\fR/' to be immune to minor changes in the file. Such scans are always performed as if .I nomagic was set. .PP The tag names in the tags file must be sorted alphabetically. .LC \fBunabbreviate\fR \fIword\fP abbr: \fBuna\fP .ZP Delete .I word from the list of abbreviations. .LC \fBundo\fR abbr: \fBu\fR .ZP Reverses the changes made in the buffer by the last buffer editing command. Note that .I global commands are considered a single command for the purpose of .I undo (as are .I open and .I visual.) Also, the commands .I write and .I edit which interact with the file system cannot be undone. .I Undo is its own inverse. .IP .I Undo always marks the previous value of the current line `\fB.\fR' as `\'\''. After an .I undo the current line is the first line restored or the line before the first line deleted if no lines were restored. For commands with more global effect such as .I global and .I visual the current line regains it's pre-command value after an .I undo. .LC \fBunmap\fR \fIlhs\fR .ZP The macro expansion associated by .I map for .I lhs is removed. .LC ( 1 , $ ) \fBv\fR /\fIpat\fR\|/ \fIcmds\fR .ZP A synonym for the .I global command variant \fBg!\fR, running the specified \fIcmds\fR on each line which does not match \fIpat\fR. .LC \fBversion\fR abbr: \fBve\fR .ZP Prints the current version number of the editor as well as the date the editor was last changed. .LC ( \fB.\fR ) \fBvisual\fR \fItype\fR \fIcount\fR \fIflags\fR abbr: \fBvi\fR .ZP Enters visual mode at the specified line. .I Type is optional and may be `\-' , `\(ua' or `\fB.\fR' as in the .I z command to specify the placement of the specified line on the screen. By default, if .I type is omitted, the specified line is placed as the first on the screen. A .I count specifies an initial window size; the default is the value of the option .I window. See the document .I "An Introduction to Display Editing with Vi" for more details. To exit this mode, type Q. .LC \fBvisual\fP file .br \fBvisual\fP +\fIn\fP file .ZP From visual mode, this command is the same as edit. .LC ( 1 , $ ) \fBwrite\fR \fIfile\fR abbr: \fBw\fR .ZP Writes changes made back to \fIfile\fR, printing the number of lines and characters written. Normally \fIfile\fR is omitted and the text goes back where it came from. If a \fIfile\fR is specified, then text will be written to that file.* .FS * The editor writes to a file only if it is the current file and is .I edited , if the file does not exist, or if the file is actually a teletype, .I /dev/tty, .I /dev/null. Otherwise, you must give the variant form \fBw!\fR to force the write. .FE If the file does not exist it is created. The current file name is changed only if there is no current file name; the current line is never changed. .IP If an error occurs while writing the current and .I edited file, the editor considers that there has been ``No write since last change'' even if the buffer had not previously been modified. .LC ( 1 , $ ) \fBwrite>>\fR \fIfile\fR abbr: \fBw>>\fR .ZP Writes the buffer contents at the end of an existing file. .IP .LC \fBw!\fR \fIname\fR .ZP Overrides the checking of the normal \fIwrite\fR command, and will write to any file which the system permits. .LC ( 1 , $ ) \fBw\fR \fB!\fR\fIcommand\fR .ZP Writes the specified lines into .I command. Note the difference between \fBw!\fR which overrides checks and \fBw\ \ !\fR which writes to a command. .LC \fBwq\fR \fIname\fR .ZP Like a \fIwrite\fR and then a \fIquit\fR command. .LC \fBwq!\fR \fIname\fR .ZP The variant overrides checking on the sensibility of the .I write command, as \fBw!\fR does. .LC \fBxit\fP \fIname\fR .ZP If any changes have been made and not written, writes the buffer out. Then, in any case, quits. .LC ( \fB.\fR , \fB.\fR )\|\fByank\fR \fIbuffer\fR \fIcount\fR abbr: \fBya\fR .ZP Places the specified lines in the named .I buffer, for later retrieval via .I put. If no buffer name is specified, the lines go to a more volatile place; see the \fIput\fR command description. .LC ( \fB.+1\fR ) \fBz\fR \fIcount\fR .ZP Print the next \fIcount\fR lines, default \fIwindow\fR. .LC ( \fB.\fR ) \fBz\fR \fItype\fR \fIcount\fR .ZP Prints a window of text with the specified line at the top. If \fItype\fR is `\-' the line is placed at the bottom; a `\fB.\fR' causes the line to be placed in the center.* A count gives the number of lines to be displayed rather than double the number specified by the \fIscroll\fR option. On a \s-2CRT\s0 the screen is cleared before display begins unless a count which is less than the screen size is given. The current line is left at the last line printed. .FS * Forms `z=' and `z\(ua' also exist; `z=' places the current line in the center, surrounds it with lines of `\-' characters and leaves the current line at this line. The form `z\(ua' prints the window before `z\-' would. The characters `+', `\(ua' and `\-' may be repeated for cumulative effect. On some v2 editors, no .I type may be given. .FE .LC \fB!\fR \fIcommand\fR\fR .ZP The remainder of the line after the `!' character is sent to a shell to be executed. Within the text of .I command the characters `%' and `#' are expanded as in filenames and the character `!' is replaced with the text of the previous command. Thus, in particular, `!!' repeats the last such shell escape. If any such expansion is performed, the expanded line will be echoed. The current line is unchanged by this command. .IP If there has been ``[No\ write]'' of the buffer contents since the last change to the editing buffer, then a diagnostic will be printed before the command is executed as a warning. A single `!' is printed when the command completes. .LC ( \fIaddr\fR , \fIaddr\fR ) \fB!\fR \fIcommand\fR\fR .ZP Takes the specified address range and supplies it as standard input to .I command; the resulting output then replaces the input lines. .LC ( $ ) \fB=\fR .ZP Prints the line number of the addressed line. The current line is unchanged. .KS .LC ( \fB.\fR , \fB.\fR ) \fB>\fR \fIcount\fR \fIflags\fR .br ( \fB.\fR , \fB.\fR ) \fB<\fR \fIcount\fR \fIflags\fR .IP Perform intelligent shifting on the specified lines; \fB<\fR shifts left and \fB>\fR shift right. The quantity of shift is determined by the .I shiftwidth option and the repetition of the specification character. Only white space (blanks and tabs) is shifted; no non-white characters are discarded in a left-shift. The current line becomes the last line which changed due to the shifting. .KE .LC \fB^D\fR .ZP An end-of-file from a terminal input scrolls through the file. The .I scroll option specifies the size of the scroll, normally a half screen of text. .LC ( \fB.\fR+1 , \fB.\fR+1 ) .br ( \fB.\fR+1 , \fB.\fR+1 ) | .ZP An address alone causes the addressed lines to be printed. A blank line prints the next line in the file. .LC ( \fB.\fR , \fB.\fR ) \fB&\fR \fIoptions\fR \fIcount\fR \fIflags\fR .ZP Repeats the previous .I substitute command. .LC ( \fB.\fR , \fB.\fR ) \fB\s+2~\s0\fR \fIoptions\fR \fIcount\fR \fIflags\fR .ZP Replaces the previous regular expression with the previous replacement pattern from a substitution. .NH 1 Regular expressions and substitute replacement patterns .NH 2 Regular expressions .PP A regular expression specifies a set of strings of characters. A member of this set of strings is said to be .I matched by the regular expression. .I Ex remembers two previous regular expressions: the previous regular expression used in a .I substitute command and the previous regular expression used elsewhere (referred to as the previous \fIscanning\fR regular expression.) The previous regular expression can always be referred to by a null \fIre\fR, e.g. `//' or `??'. .NH 2 Magic and nomagic .PP The regular expressions allowed by .I ex are constructed in one of two ways depending on the setting of the .I magic option. The .I ex and .I vi default setting of .I magic gives quick access to a powerful set of regular expression metacharacters. The disadvantage of .I magic is that the user must remember that these metacharacters are .I magic and precede them with the character `\e' to use them as ``ordinary'' characters. With .I nomagic, the default for .I edit, regular expressions are much simpler, there being only two metacharacters. The power of the other metacharacters is still available by preceding the (now) ordinary character with a `\e'. Note that `\e' is thus always a metacharacter. .PP The remainder of the discussion of regular expressions assumes that that the setting of this option is .I magic.\(dg .FS \(dg To discern what is true with .I nomagic it suffices to remember that the only special characters in this case will be `\(ua' at the beginning of a regular expression, `$' at the end of a regular expression, and `\e'. With .I nomagic the characters `\s+2~\s0' and `&' also lose their special meanings related to the replacement pattern of a substitute. .FE .NH 2 Basic regular expression summary .PP The following basic constructs are used to construct .I magic mode regular expressions. .IP \fIchar\fR 15 An ordinary character matches itself. The characters `\(ua' at the beginning of a line, `$' at the end of line, `*' as any character other than the first, `.', `\e', `[', and `\s+2~\s0' are not ordinary characters and must be escaped (preceded) by `\e' to be treated as such. .IP \fB\(ua\fR At the beginning of a pattern forces the match to succeed only at the beginning of a line. .IP \fB$\fR At the end of a regular expression forces the match to succeed only at the end of the line. .IP \&\fB.\fR Matches any single character except the new-line character. .IP \fB\e<\fR Forces the match to occur only at the beginning of a ``variable'' or ``word''; that is, either at the beginning of a line, or just before a letter, digit, or underline and after a character not one of these. .IP \fB\e>\fR Similar to `\e<', but matching the end of a ``variable'' or ``word'', i.e. either the end of the line or before character which is neither a letter, nor a digit, nor the underline character. .IP \fB[\fIstring\fR]\fR Matches any (single) character in the class defined by .I string. Most characters in .I string define themselves. A pair of characters separated by `\-' in .I string defines the set of characters collating between the specified lower and upper bounds, thus `[a\-z]' as a regular expression matches any (single) lower-case letter. If the first character of .I string is an `\(ua' then the construct matches those characters which it otherwise would not; thus `[\(uaa\-z]' matches anything but a lower-case letter (and of course a newline). To place any of the characters `\(ua', `[', or `\-' in .I string you must escape them with a preceding `\e'. .NH 2 Combining regular expression primitives .PP The concatenation of two regular expressions matches the leftmost and then longest string which can be divided with the first piece matching the first regular expression and the second piece matching the second. Any of the (single character matching) regular expressions mentioned above may be followed by the character `*' to form a regular expression which matches any number of adjacent occurrences (including 0) of characters matched by the regular expression it follows. .PP The character `\s+2~\s0' may be used in a regular expression, and matches the text which defined the replacement part of the last .I substitute command. A regular expression may be enclosed between the sequences `\e(' and `\e)' with side effects in the .I substitute replacement patterns. .NH 2 Substitute replacement patterns .PP The basic metacharacters for the replacement pattern are `&' and `~'; these are given as `\e&' and `\e~' when .I nomagic is set. Each instance of `&' is replaced by the characters which the regular expression matched. The metacharacter `~' stands, in the replacement pattern, for the defining text of the previous replacement pattern. .PP Other metasequences possible in the replacement pattern are always introduced by the escaping character `\e'. The sequence `\e\fIn\fR' is replaced by the text matched by the \fIn\fR-th regular subexpression enclosed between `\e(' and `\e)'.\(dg .FS \(dg When nested, parenthesized subexpressions are present, \fIn\fR is determined by counting occurrences of `\e(' starting from the left. .FE The sequences `\eu' and `\el' cause the immediately following character in the replacement to be converted to upper- or lower-case respectively if this character is a letter. The sequences `\eU' and `\eL' turn such conversion on, either until `\eE' or `\ee' is encountered, or until the end of the replacement pattern. .de LC .br .sp .1i .ne 4 .LP .ta 3i .. .NH 1 Option descriptions .PP .LC \fBautoindent\fR, \fBai\fR default: noai .ZP Can be used to ease the preparation of structured program text. At the beginning of each .I append , .I change or .I insert command or when a new line is .I opened or created by an .I append , .I change , .I insert , or .I substitute operation within .I open or .I visual mode, .I ex looks at the line being appended after, the first line changed or the line inserted before and calculates the amount of white space at the start of the line. It then aligns the cursor at the level of indentation so determined. .IP If the user then types lines of text in, they will continue to be justified at the displayed indenting level. If more white space is typed at the beginning of a line, the following line will start aligned with the first non-white character of the previous line. To back the cursor up to the preceding tab stop one can hit \fB^D\fR. The tab stops going backwards are defined at multiples of the .I shiftwidth option. You .I cannot backspace over the indent, except by sending an end-of-file with a \fB^D\fR. .IP Specially processed in this mode is a line with no characters added to it, which turns into a completely blank line (the white space provided for the .I autoindent is discarded.) Also specially processed in this mode are lines beginning with an `\(ua' and immediately followed by a \fB^D\fR. This causes the input to be repositioned at the beginning of the line, but retaining the previous indent for the next line. Similarly, a `0' followed by a \fB^D\fR repositions at the beginning but without retaining the previous indent. .IP .I Autoindent doesn't happen in .I global commands or when the input is not a terminal. .LC \fBautoprint\fR, \fBap\fR default: ap .ZP Causes the current line to be printed after each .I delete , .I copy , .I join , .I move , .I substitute , .I t , .I undo or shift command. This has the same effect as supplying a trailing `p' to each such command. .I Autoprint is suppressed in globals, and only applies to the last of many commands on a line. .LC \fBautowrite\fR, \fBaw\fR default: noaw .ZP Causes the contents of the buffer to be written to the current file if you have modified it and give a .I next, .I rewind, .I stop, .I tag, or .I ! command, or a \fB^\(ua\fR (switch files) or \fB^]\fR (tag goto) command in .I visual. Note, that the .I edit and .I ex commands do .B not autowrite. In each case, there is an equivalent way of switching when autowrite is set to avoid the .I autowrite (\fIedit\fR for .I next , .I rewind! for .I rewind , .I stop! for .I stop , .I tag! for .I tag , .I shell for .I ! , and \fB:e\ #\fR and a \fB:ta!\fR command from within .I visual). .LC \fBbeautify\fR, \fBbf\fR default: nobeautify .ZP Causes all control characters except tab, newline and form-feed to be discarded from the input. A complaint is registered the first time a backspace character is discarded. .I Beautify does not apply to command input. .LC \fBdirectory\fR, \fBdir\fR default: dir=/tmp .ZP Specifies the directory in which .I ex places its buffer file. If this directory in not writable, then the editor will exit abruptly when it fails to be able to create its buffer there. .LC \fBedcompatible\fR default: noedcompatible .ZP Causes the presence of absence of .B g and .B c suffixes on substitute commands to be remembered, and to be toggled by repeating the suffices. The suffix .B r makes the substitution be as in the .I ~ command, instead of like .I &. .LC \fBerrorbells\fR, \fBeb\fR default: noeb .ZP Error messages are preceded by a bell.* .FS * Bell ringing in .I open and .I visual on errors is not suppressed by setting .I noeb. .FE If possible the editor always places the error message in a standout mode of the terminal (such as inverse video) instead of ringing the bell. .LC \fBhardtabs\fR, \fBht\fR default: ht=8 .ZP Gives the boundaries on which terminal hardware tabs are set (or on which the system expands tabs). .LC \fBignorecase\fR, \fBic\fR default: noic .ZP All upper case characters in the text are mapped to lower case in regular expression matching. In addition, all upper case characters in regular expressions are mapped to lower case except in character class specifications. .LC \fBlisp\fR default: nolisp .ZP \fIAutoindent\fR indents appropriately for .I lisp code, and the \fB( ) { } [[\fR and \fB]]\fR commands in .I open and .I visual are modified to have meaning for \fIlisp\fR. .LC \fBlist\fR default: nolist .ZP All printed lines will be displayed (more) unambiguously, showing tabs and end-of-lines as in the .I list command. .LC \fBmagic\fR default: magic for \fIex\fR and \fIvi\fR\(dg .FS \(dg \fINomagic\fR for \fIedit\fR. .FE .ZP If .I nomagic is set, the number of regular expression metacharacters is greatly reduced, with only `\(ua' and `$' having special effects. In addition the metacharacters `~' and `&' of the replacement pattern are treated as normal characters. All the normal metacharacters may be made .I magic when .I nomagic is set by preceding them with a `\e'. .LC \fBmesg\fR default: mesg .ZP Causes write permission to be turned off to the terminal while you are in visual mode, if .I nomesg is set. .LC \fBmodeline\fR default: nomodeline .ZP If .I modeline is set, then the first 5 lines and the last five lines of the file will be checked for ex command lines and the comands issued. To be recognized as a command line, the line must have the string .B ex: or .B vi: preceeded by a tab or a space. This string may be anywhere in the line and anything after the .I : is interpeted as editor commands. This option defaults to off because of unexpected behavior when editting files such as .I /etc/passwd. .LC \fBnumber, nu\fR default: nonumber .ZP Causes all output lines to be printed with their line numbers. In addition each input line will be prompted for by supplying the line number it will have. .LC \fBopen\fR default: open .ZP If \fInoopen\fR, the commands .I open and .I visual are not permitted. This is set for .I edit to prevent confusion resulting from accidental entry to open or visual mode. .LC \fBoptimize, opt\fR default: optimize .ZP Throughput of text is expedited by setting the terminal to not do automatic carriage returns when printing more than one (logical) line of output, greatly speeding output on terminals without addressable cursors when text with leading white space is printed. .LC \fBparagraphs,\ para\fR default: para=IPLPPPQPP\0LIbp .ZP Specifies the paragraphs for the \fB{\fR and \fB}\fR operations in .I open and .I visual. The pairs of characters in the option's value are the names of the macros which start paragraphs. .LC \fBprompt\fR default: prompt .ZP Command mode input is prompted for with a `:'. .LC \fBredraw\fR default: noredraw .ZP The editor simulates (using great amounts of output), an intelligent terminal on a dumb terminal (e.g. during insertions in .I visual the characters to the right of the cursor position are refreshed as each input character is typed.) Useful only at very high speed. .LC \fBremap\fP default: remap .ZP If on, macros are repeatedly tried until they are unchanged. For example, if .B o is mapped to .B O , and .B O is mapped to .B I , then if .I remap is set, .B o will map to .B I , but if .I noremap is set, it will map to .B O . .LC \fBreport\fR default: report=5\(dg .FS \(dg 2 for \fIedit\fR. .FE .ZP Specifies a threshold for feedback from commands. Any command which modifies more than the specified number of lines will provide feedback as to the scope of its changes. For commands such as .I global , .I open , .I undo , and .I visual which have potentially more far reaching scope, the net change in the number of lines in the buffer is presented at the end of the command, subject to this same threshold. Thus notification is suppressed during a .I global command on the individual commands performed. .LC \fBscroll\fR default: scroll=\(12 window .ZP Determines the number of logical lines scrolled when an end-of-file is received from a terminal input in command mode, and the number of lines printed by a command mode .I z command (double the value of .I scroll ). .LC \fBsections\fR default: sections=SHNHH\0HU .ZP Specifies the section macros for the \fB[[\fR and \fB]]\fR operations in .I open and .I visual. The pairs of characters in the options's value are the names of the macros which start paragraphs. .LC \fBshell\fR, \fBsh\fR default: sh=/bin/sh .ZP Gives the path name of the shell forked for the shell escape command `!', and by the .I shell command. The default is taken from SHELL in the environment, if present. .LC \fBshiftwidth\fR, \fBsw\fR default: sw=8 .ZP Gives the width a software tab stop, used in reverse tabbing with \fB^D\fR when using .I autoindent to append text, and by the shift commands. .LC \fBshowmatch, sm\fR default: nosm .ZP In .I open and .I visual mode, when a \fB)\fR or \fB}\fR is typed, move the cursor to the matching \fB(\fR or \fB{\fR for one second if this matching character is on the screen. Extremely useful with .I lisp. .LC \fBslowopen, slow\fR terminal dependent .ZP Affects the display algorithm used in .I visual mode, holding off display updating during input of new text to improve throughput when the terminal in use is both slow and unintelligent. See .I "An Introduction to Display Editing with Vi" for more details. .LC \fBtabstop,\ ts\fR default: ts=8 .ZP The editor expands tabs in the input file to be on .I tabstop boundaries for the purposes of display. .LC \fBtaglength,\ tl\fR default: tl=0 .ZP Tags are not significant beyond this many characters. A value of zero (the default) means that all characters are significant. .LC \fBtags\fR default: tags=tags /usr/lib/tags .ZP A path of files to be used as tag files for the .I tag command. A requested tag is searched for in the specified files, sequentially. By default, files called .B tags are searched for in the current directory and in /usr/lib (a master file for the entire system). .LC \fBterm\fR from environment TERM .ZP The terminal type of the output device. .LC \fBterse\fR default: noterse .ZP Shorter error diagnostics are produced for the experienced user. .LC \fBwarn\fR default: warn .ZP Warn if there has been `[No write since last change]' before a `!' command escape. .LC \fBwindow\fR default: window=speed dependent .ZP The number of lines in a text window in the .I visual command. The default is 8 at slow speeds (600 baud or less), 16 at medium speed (1200 baud), and the full screen (minus one line) at higher speeds. .LC \fBw300,\ w1200\, w9600\fR .ZP These are not true options but set .B window only if the speed is slow (300), medium (1200), or high (9600), respectively. They are suitable for an EXINIT and make it easy to change the 8/16/full screen rule. .LC \fBwrapscan\fR, \fBws\fR default: ws .ZP Searches using the regular expressions in addressing will wrap around past the end of the file. .LC \fBwrapmargin\fR, \fBwm\fR default: wm=0 .ZP Defines a margin for automatic wrapover of text during input in .I open and .I visual modes. See .I "An Introduction to Text Editing with Vi" for details. .LC \fBwriteany\fR, \fBwa\fR default: nowa .IP Inhibit the checks normally made before .I write commands, allowing a write to any file which the system protection mechanism will allow. .NH 1 Acknowledgements .PP Chuck Haley contributed greatly to the early development of .I ex. Bruce Englar encouraged the redesign which led to .I ex version 1. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made the editor work on a large number of terminals and Unix systems. nvi-1.81.6/docs/exref/ex.summary0100644000076400001440000003371010720065506015552 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: ex.summary,v 8.3 1996/08/18 11:36:16 bostic Exp $ (Berkeley) $Date: 1996/08/18 11:36:16 $ .\" .ds p \v'-0.2'.\v'+0.2' .ds U \s-2UNIX\s+2 .ds c \v'-0.2':\v'+0.2' .nr LL 6.5i .lt 6.5i .ll 6.5i .ds CH .ds LF Computing Services, U.C. Berkeley .ds RF April 3, 1979 .de SP .sp 1v .. .nr PI 3n .nr PD 0 .ND .ps 12 .ft B .ce 1 Ex/Edit Command Summary (Version 2.0) .sp 1 .ft R .nr VS 11 .nr PS 9 .2C .PP .I Ex and .I edit are text editors, used for creating and modifying files of text on the \*U computer system. .I Edit is a variant of .I ex with features designed to make it less complicated to learn and use. In terms of command syntax and effect the editors are essentially identical, and this command summary applies to both. .PP The summary is meant as a quick reference for users already acquainted with .I edit or \fIex\fP. Fuller explanations of the editors are available in the documents .I Edit: A Tutorial .R (a self-teaching introduction) and the .I Ex Reference Manual .R (the comprehensive reference source for both \fIedit\fP and \fIex\fP). Both of these writeups are available in the Computing Services Library. .PP In the examples included with the summary, commands and text entered by the user are printed in \fBboldface\fR to distinguish them from responses printed by the computer. .sp 0.45v .LP .B The Editor Buffer .PP In order to perform its tasks the editor sets aside a temporary work space, called a \fIbuffer\fR, separate from the user's permanent file. Before starting to work on an existing file the editor makes a copy of it in the buffer, leaving the original untouched. All editing changes are made to the buffer copy, which must then be written back to the permanent file in order to update the old version. The buffer disappears at the end of the editing session. .sp 0.45v .LP .B Editing: Command and Text Input Modes .PP .R During an editing session there are two usual modes of operation: \fIcommand\fP mode and \fItext input\fP mode. (This disregards, for the moment, .I open and .I visual modes, discussed below.) In command mode, the editor issues a colon prompt (:) to show that it is ready to accept and execute a command. In text input mode, on the other hand, there is no prompt and the editor merely accepts text to be added to the buffer. Text input mode is initiated by the commands \fIappend\fP, \fIinsert\fP, and \fIchange\fP, and is terminated by typing a period as the first and only character on a line. .sp 0.45v .LP .B Line Numbers and Command Syntax .PP .R The editor keeps track of lines of text in the buffer by numbering them consecutively starting with 1 and renumbering as lines are added or deleted. At any given time the editor is positioned at one of these lines; this position is called the \fIcurrent line\fP. Generally, commands that change the contents of the buffer print the new current line at the end of their execution. .PP Most commands can be preceded by one or two line-number addresses which indicate the lines to be affected. If one number is given the command operates on that line only; if two, on an inclusive range of lines. Commands that can take line-number prefixes also assume default prefixes if none are given. The default assumed by each command is designed to make it convenient to use in many instances without any line-number prefix. For the most part, a command used without a prefix operates on the current line, though exceptions to this rule should be noted. The \fIprint\fP command by itself, for instance, causes one line, the current line, to be printed at the terminal. .PP The summary shows the number of line addresses that can be prefixed to each command as well as the defaults assumed if they are omitted. For example, .I (.,.) means that up to 2 line-numbers may be given, and that if none is given the command operates on the current line. (In the address prefix notation, ``.'' stands for the current line and ``$'' stands for the last line of the buffer.) If no such notation appears, no line-number prefix may be used. .PP Some commands take trailing information; only the more important instances of this are mentioned in the summary. .sp 0.25v .LP .B Open and Visual Modes .PP .R Besides command and text input modes, .I ex and .I edit provide on some CRT terminals other modes of editing, .I open and .I visual . In these modes the cursor can be moved to individual words or characters in a line. The commands then given are very different from the standard editor commands; most do not appear on the screen when typed. .I An Introduction to Display Editing with Vi .R provides a full discussion. .sp 0.25v .LP .B Special Characters .PP .R .fi Some characters take on special meanings when used in context searches and in patterns given to the \fIsubstitute\fP command. For \fIedit\fR, these are ``^'' and ``$'', meaning the beginning and end of a line, respectively. .I Ex has the following additional special characters: .B .ce 1 \&. & * [ ] ~ .R To use one of the special characters as its simple graphic representation rather than with its special meaning, precede it by a backslash (\\). The backslash always has a special meaning. .1C .TS cp10 cp10 cp10 cp10 ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). Name Abbr Description Examples .sp 1.75 (.)\fBappend a T{ Begins text input mode, adding lines to the buffer after the line specified. Appending continues until ``.'' is typed alone at the beginning of a new line, followed by a carriage return. \fI0a\fR places lines at the beginning of the buffer. T} T{ .nf \fR:\fBa Three lines of text are added to the buffer after the current line. \*p .R \*c .fi T} .SP \fR(.,.)\fBchange c T{ Deletes indicated line(s) and initiates text input mode to replace them with new text which follows. New text is terminated the same way as with \fIappend\fR. T} T{ .nf :\fB5,6c Lines 5 and 6 are deleted and replaced by these three lines. \*p .R \*c .fi T} .SP \fR(.,.)\fBcopy \fIaddr co T{ Places a copy of the specified lines after the line indicated by \fIaddr\fR. The example places a copy of lines 8 through 12, inclusive, after line 25. T} T{ .nf \fR:\fB8,12co 25 \fRLast line copied is printed \fR\*c .fi T} .SP \fR(.,.)\fBdelete d T{ Removes lines from the buffer and prints the current line after the deletion. T} T{ .nf \fR:\fB13,15d \fRNew current line is printed \*c .fi T} .TE .sp 0.5v .TS ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). T{ \fBedit \fIfile\fP .br \fBedit! \fIfile\fP T} T{ e .br e! T} T{ .fi \fRClears the editor buffer and then copies into it the named \fIfile\fR, which becomes the current file. This is a way of shifting to a different file without leaving the editor. The editor issues a warning message if this command is used before saving changes made to the file already in the buffer; using the form \fBe!\fR overrides this protective mechanism. T} T{ .nf \fR:\fBe ch10\fR No write since last change :\fBe! ch10\fR "ch10" 3 lines, 62 characters \*c .fi T} .SP \fBfile \fIname\fR f T{ \fRIf followed by a \fIname\fR, renames the current file to \fIname\fR. If used without \fIname\fR, prints the name of the current file. T} T{ .nf \fR:\fBf ch9 \fR"ch9" [Modified] 3 lines ... :\fBf \fR"ch9" [Modified] 3 lines ... \*c .fi T} .SP (1,$)\fBglobal g \fBglobal/\fIpattern\fB/\fIcommands T{ .nf :\fBg/nonsense/d \fR\*c .fi T} \fR(1,$)\fBglobal! g!\fR or \fBv T{ Searches the entire buffer (unless a smaller range is specified by line-number prefixes) and executes \fIcommands\fR on every line with an expression matching \fIpattern\fR. The second form, abbreviated either \fBg!\fR or \fBv\fR, executes \fIcommands\fR on lines that \fIdo not\fR contain the expression \fIpattern\fR. T} \^ .SP \fR(.)\fBinsert i T{ Inserts new lines of text immediately before the specified line. Differs from .I append only in that text is placed before, rather than after, the indicated line. In other words, \fB1i\fR has the same effect as \fB0a\fR. T} T{ .nf :\fB1i These lines of text will be added prior to line 1. \&. \fR: .fi T} .SP \fR(.,.+1)\fBjoin j T{ Join lines together, adjusting white space (spaces and tabs) as necessary. T} T{ .nf :\fB2,5j\fR Resulting line is printed : .fi T} .TE .bp .TS cp10 cp10 cp10 cp10 ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). Name Abbr Description Examples .sp 1.75 \fR(.,.)\fBlist l T{ \fRPrints lines in a more unambiguous way than the \fIprint\fR command does. The end of a line, for example, is marked with a ``$'', and tabs printed as ``^I''. T} T{ .nf :\fB9l \fRThis is line 9$ \*c .fi T} .TE .sp 0.5v .TS ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). \fR(.,.)\fBmove \fIaddr\fB m T{ \fRMoves the specified lines to a position after the line indicated by \fIaddr\fR. T} T{ .nf \fR:\fB12,15m 25\fR New current line is printed \*c .fi T} .SP \fR(.,.)\fBnumber nu T{ Prints each line preceded by its buffer line number. T} T{ .nf \fR:\fBnu \0\0\fR10\0 This is line 10 \*c .fi T} .SP \fR(.)\fBopen o T{ Too involved to discuss here, but if you enter open mode accidentally, press the \s-2ESC\s0 key followed by \fBq\fR to get back into normal editor command mode. \fIEdit\fP is designed to prevent accidental use of the open command. T} .SP \fBpreserve pre T{ Saves a copy of the current buffer contents as though the system had just crashed. This is for use in an emergency when a .I write command has failed and you don't know how else to save your work.\(dg T} T{ .nf :\fBpreserve\fR File preserved. : .fi T} .SP \fR(.,.)\fBprint p Prints the text of line(s). T{ .nf :\fB+2,+3p\fR The second and third lines after the current line : .fi T} .TE .FS .ll 6.5i \(dg You should seek assistance from a system administrator as soon as possible after saving a file with the .I preserve command, because the preserved copy of the file is saved in a directory used to store temporary files, and thus, the preserved copy may only be available for a short period of time. .FE .SP .nf .TS ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). T{ .nf \fBquit quit! .fi T} T{ .nf q q! T} T{ .fi \fREnds the editing session. You will receive a warning if you have changed the buffer since last writing its contents to the file. In this event you must either type \fBw\fR to write, or type \fBq!\fR to exit from the editor without saving your changes. T} T{ .nf \fR:\fBq \fRNo write since last change :\fBq! \fR% .fi T} .SP \fR(.)\fBread \fIfile\fP r T{ .fi \fRPlaces a copy of \fIfile\fR in the buffer after the specified line. Address 0 is permissible and causes the copy of \fIfile\fR to be placed at the beginning of the buffer. The \fIread\fP command does not erase any text already in the buffer. If no line number is specified, \fIfile\fR is placed after the current line. T} T{ .nf \fR:\fB0r newfile \fR"newfile" 5 lines, 86 characters \*c .fi T} .SP \fBrecover \fIfile\fP rec T{ .fi Retrieves a copy of the editor buffer after a system crash, editor crash, phone line disconnection, or \fIpreserve\fR command. T} .SP \fR(.,.)\fBsubstitute s T{ .nf \fBsubstitute/\fIpattern\fB/\fIreplacement\fB/ substitute/\fIpattern\fB/\fIreplacement\fB/gc .fi \fRReplaces the first occurrence of \fIpattern\fR on a line with \fIreplacement\fP. Including a \fBg\fR after the command changes all occurrences of \fIpattern\fP on the line. The \fBc\fR option allows the user to confirm each substitution before it is made; see the manual for details. T} T{ .nf :\fB3p \fRLine 3 contains a misstake :\fBs/misstake/mistake/ \fRLine 3 contains a mistake \*c .fi T} .TE .bp .TS cp10 cp10 cp10 cp10 ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). Name Abbr Description Examples .sp 1.75 \fBundo u T{ .fi \fRReverses the changes made in the buffer by the last buffer-editing command. Note that this example contains a notification about the number of lines affected. T} T{ .nf \fR:\fB1,15d \fR15 lines deleted new line number 1 is printed :\fBu \fR15 more lines in file ... old line number 1 is printed \*c .fi T} .SP \fR(1,$)\fBwrite \fIfile\fR w T{ .fi \fRCopies data from the buffer onto a permanent file. If no \fIfile\fR is named, the current filename is used. The file is automatically created if it does not yet exist. A response containing the number of lines and characters in the file indicates that the write has been completed successfully. The editor's built-in protections against overwriting existing files will in some circumstances inhibit a write. The form \fBw!\fR forces the write, confirming that an existing file is to be overwritten. T} T{ .nf \fR:\fBw \fR"file7" 64 lines, 1122 characters :\fBw file8 \fR"file8" File exists ... :\fBw! file8 \fR"file8" 64 lines, 1122 characters \*c .fi T} \fR(1,$)\fBwrite! \fIfile\fP w! \^ \^ .TE .sp 0.5v .TS ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). \fR(.)\fBz \fIcount\fP z T{ .fi \fRPrints a screen full of text starting with the line indicated; or, if \fIcount\fR is specified, prints that number of lines. Variants of the \fIz\fR command are described in the manual. T} .SP \fB!\fIcommand T{ .fi Executes the remainder of the line after \fB!\fR as a \*U command. The buffer is unchanged by this, and control is returned to the editor when the execution of \fIcommand\fR is complete. T} T{ .nf \fR:\fB!date \fRFri Jun 9 12:15:11 PDT 1978 ! \*c .fi T} .SP \fRcontrol-d T{ .fi Prints the next \fIscroll\fR of text, normally half of a screen. See the manual for details of the \fIscroll\fR option. T} .SP \fR(.+1) T{ .fi An address alone followed by a carriage return causes the line to be printed. A carriage return by itself prints the line following the current line. T} T{ .nf :\fR the line after the current line \*c .fi T} .TE .sp 0.5v .TS ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i). \fB/\fIpattern\fB/ T{ .fi \fRSearches for the next line in which \fIpattern\fR occurs and prints it. T} T{ .nf \fR:\fB/This pattern/ \fRThis pattern next occurs here. \*c .fi T} .SP \fB// T{ Repeats the most recent search. T} T{ .nf \fR:\fB// \fRThis pattern also occurs here. \*c .fi T} .SP \fB?\fIpattern\fB? T{ Searches in the reverse direction for \fIpattern\fP. T} .SP \fB?? T{ Repeats the most recent search, moving in the reverse direction through the buffer. T} .TE nvi-1.81.6/docs/exref/exref.ps0100444000076400001440000032551110720065715015177 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:43:57 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 17 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(Ex Refer)250.452 123 Q(ence Manual)-.216 E -1.2 (Ve)277.602 138 S(rsion 3.7)1.2 E/F1 10/Times-Italic@0 SF -.55(Wi) 282.375 162 S(lliam J).55 E(oy)-.25 E(Mark Horton)279.475 180 Q/F2 10 /Times-Roman@0 SF(Computer Science Di)250.85 198 Q(vision)-.25 E (Department of Electrical Engineering and Computer Science)184.36 210 Q (Uni)237.725 222 Q -.15(ve)-.25 G(rsity of California, Berk).15 E(ele) -.1 E(y)-.15 E(Berk)264.095 234 Q(ele)-.1 E 1.3 -.65(y, C)-.15 H 2.5 (a. 94720).65 F F1(ABSTRA)282.535 270 Q(CT)-.3 E(Ex)136 294 Q F2 3.08 (al)3.08 G .58(ine oriented te)-3.08 F .579(xt editor)-.15 F 3.079(,w) -.4 G .579(hich supports both command and display oriented editing.) -3.079 F .299 (This reference manual describes the command oriented part of)111 306 R F1 -.2(ex)2.799 G(;).2 E F2 .3(the display editing features of)2.799 F F1 -.2(ex)111 318 S F2 .151(are described in)2.851 F F1 .151(An Intr) 2.651 F .151(oduction to Display Editing with V)-.45 F(i.)-.74 E F2 .15 (Other documents about the editor)5.15 F .6(include the introduction)111 330 R F1 .6(Edit: A tutorial)3.1 F F2 3.1(,t)C(he)-3.1 E F1 .6 (Ex/edit Command Summary)3.1 F F2 3.1(,a)C .6(nd a)-3.1 F F1 2.08 -.74 (Vi Q)3.1 H(uic).74 E 3.1(kR)-.2 G(efer)-3.1 E(-)-.2 E(ence)111 342 Q F2 (card.)2.5 E/F3 10/Times-Bold@0 SF 2.5(1. Starting)72 378 R(ex)2.5 E F2 .202(Each instance of the editor has a set of options, which can be set\ to tailor it to your liking.)97 393.6 R .202(The command)5.202 F F1 (edit)2.702 E F2(in)72 405.6 Q -.2(vo)-.4 G -.1(ke).2 G 3.71(sav).1 G 1.21(ersion of)-3.86 F F1 -.2(ex)3.71 G F2 1.21 (designed for more casual or be)3.91 F 1.21 (ginning users by changing the def)-.15 F 1.21(ault settings of some of) -.1 F(these options.)72 417.6 Q 1.6 -.8(To s)5 H (implify the description which follo).8 E(ws we assume the def)-.25 E (ault settings of the options.)-.1 E .093(When in)97 433.2 R -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F1 -.2(ex)2.593 G F2 .093 (determines the terminal type from the)2.793 F/F4 8/Times-Roman@0 SF (TERM)2.593 E F2 -.25(va)2.593 G .093(riable in the en).25 F 2.593 (vironment. It)-.4 F .094(there is a)2.594 F F4(TERM-)2.594 E(CAP)72 445.2 Q F2 -.25(va)3.215 G .715(riable in the en).25 F .715 (vironment, and the type of the terminal described there matches the)-.4 F F4(TERM)3.214 E F2 -.25(va)3.214 G .714(riable, then that).25 F .254 (description is used.)72 457.2 R .254(Also if the)5.254 F F4(TERMCAP) 2.754 E F2 -.25(va)2.754 G .254(riable contains a pathname \(be).25 F .255(ginning with a)-.15 F F3(/)2.755 E F2 2.755(\)t)C .255 (hen the editor will seek)-2.755 F .7 (the description of the terminal in that \214le \(rather than the def)72 469.2 R .7(ault /etc/termcap\).)-.1 F .7(If there is a v)5.7 F(ariable) -.25 E F4(EXINIT)3.2 E F2 .7(in the)3.2 F(en)72 481.2 Q 1.177 (vironment, then the editor will e)-.4 F -.15(xe)-.15 G 1.177 (cute the commands in that v).15 F 1.178 (ariable, otherwise if there is a \214le)-.25 F F1(.e)3.678 E(xr)-.2 E (c)-.37 E F2 1.178(in your)3.678 F F4(HOME)72 493.2 Q F2(directory)2.95 E F1 -.2(ex)2.95 G F2 .449 (reads commands from that \214le, simulating a)3.15 F F1(sour)2.949 E (ce)-.37 E F2 2.949(command. Option)2.949 F .449 (setting commands placed)2.949 F(in)72 505.2 Q F4(EXINIT)2.5 E F2(or)2.5 E F1(.e)2.5 E(xr)-.2 E(c)-.37 E F2(will be e)2.5 E -.15(xe)-.15 G (cuted before each editor session.).15 E 2.5(Ac)97 520.8 S (ommand to enter)-2.5 E F1 -.2(ex)2.5 G F2(has the follo)2.7 E (wing prototype:\207)-.25 E F3(ex)108 538.8 Q F2([)2.5 E F32.5 E F2 2.5(][)2.5 G F3A F2 2.5(][)2.5 G F3A F1(ta)2.5 E(g)-.1 E F2 2.5(][)2.5 G F3A F2 2.5(][)2.5 G F3A F2 2.5(][)2.5 G F3 A F1(n)A F2 2.5(][)2.5 G F3A F2 2.5(][)2.5 G F3A F2 2.5(][)2.5 G F3(+)A F1(command)A F2 2.5(]n)2.5 G(ame ...)-2.5 E (The most common case edits a single \214le with no options, i.e.:)72 556.8 Q F3(ex)108 574.8 Q F2(name)2.5 E(The)72 592.8 Q F32.811 E F2 .312(command line option option suppresses all interacti)2.811 F -.15 (ve)-.25 G .312 (-user feedback and is useful in processing editor scripts).15 F .108 (in command \214les.)72 604.8 R(The)5.108 E F32.608 E F2 .108 (option is equi)2.608 F -.25(va)-.25 G .108(lent to using).25 F F1(vi) 2.608 E F2 .108(rather than)2.608 F F1 -.2(ex)2.608 G(.).2 E F2(The) 5.108 E F32.608 E F2 .107(option is equi)2.608 F -.25(va)-.25 G .107(lent to an initial).25 F F1(ta)2.607 E(g)-.1 E F2 1.032 (command, editing the \214le containing the)72 616.8 R F1(ta)3.532 E(g) -.1 E F2 1.033(and positioning the editor at its de\214nition.)3.532 F (The)6.033 E F33.533 E F2 1.033(option is used in)3.533 F(reco)72 628.8 Q -.15(ve)-.15 G .084 (ring after an editor or system crash, retrie).15 F .084 (ving the last sa)-.25 F -.15(ve)-.2 G 2.584(dv).15 G .084 (ersion of the named \214le or)-2.734 F 2.584(,i)-.4 G 2.583(fn)-2.584 G 2.583<6f8c>-2.583 G .083(le is speci\214ed,)-2.583 F .586 (typing a list of sa)72 640.8 R -.15(ve)-.2 G 3.086<648c>.15 G 3.087 (les. The)-3.086 F F33.087 E F2 .587(option sets up for editing) 3.087 F F4(LISP)3.087 E F2 3.087(,s)C .587(etting the)-3.087 F F1 (showmatc)3.087 E(h)-.15 E F2(and)3.087 E F1(lisp)3.087 E F2 3.087 (options. The)3.087 F F33.087 E F2 .155(option sets the def)72 652.8 R .155(ault windo)-.1 F 2.655(ws)-.25 G .155(ize to)-2.655 F F1 (n,)2.655 E F2 .155(and is useful on dialups to start in small windo) 2.655 F 2.655(ws. The)-.25 F F32.655 E F2 .155(option causes)2.655 F F1 -.2(ex)2.655 G F2 .232(to prompt for a)72 664.8 R F1 -.1(ke)2.732 G (y)-.2 E F2 2.732(,w)C .232(hich is used to encrypt and decrypt the con\ tents of the \214le, which should already be encrypted)-2.732 F .171 (using the same k)72 676.8 R -.15(ey)-.1 G 2.671(,s)-.5 G(ee)-2.671 E F1 (crypt)2.671 E F2 2.671(\(1\). The)B F32.671 E F2 .171 (option sets the)2.671 F F1 -.37(re)2.671 G(adonly).37 E F2 .171 (option at the start.)2.671 F F1(Name)5.171 E F2(ar)2.671 E .171 (guments indicate \214les)-.18 F .598(to be edited.)72 688.8 R .598 (An ar)5.598 F .598(gument of the form)-.18 F F3(+)3.098 E F1(command)A F2 .598(indicates that the editor should be)3.098 F .599(gin by e)-.15 F -.15(xe)-.15 G .599(cuting the speci\214ed).15 F .32 LW 144 696.8 72 696.8 DL F4 .082(The \214nancial support of an)72 706.8 R/F5 6 /Times-Roman@0 SF(IBM)2.082 E F4 .082(Graduate Fello)2.082 F .082 (wship and the National Science F)-.2 F .082 (oundation under grants MCS74-07644-A03 and MCS78-07291 is)-.12 F (gratefully ackno)72 716.8 Q(wledged.)-.2 E 2<8742>72 728.6 S(rack)-2 E (ets `[' `]' surround optional parameters here.)-.08 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 337.2(USD:12-2 Ex)72 48 R(Reference Manual)2.5 E 3.103(command. If)72 84 R/F1 10/Times-Italic@0 SF(command)3.103 E F0 .603(is omitted, then it def)3.103 F .603(aults to `)-.1 F(`$')-.74 E .603 (', positioning the editor at the last line of the \214rst \214le ini-) -.74 F(tially)72 96 Q 5.552(.O)-.65 G .553 (ther useful commands here are scanning patterns of the form `)-5.552 F (`/pat')-.74 E 3.053('o)-.74 G 3.053(rl)-3.053 G .553 (ine numbers, e.g. `)-3.053 F(`+100')-.74 E 3.053('s)-.74 G(tarting) -3.053 E(at line 100.)72 108 Q/F2 10/Times-Bold@0 SF 2.5(2. File)72 132 R(manipulation)2.5 E 2.5(2.1. Curr)72 156 R(ent \214le)-.18 E F1(Ex)97 171.6 Q F0 .529(is normally editing the contents of a single \214le, wh\ ose name is recorded in the)3.029 F F1(curr)3.029 E(ent)-.37 E F0 .529 (\214le name.)3.029 F F1(Ex)5.529 E F0(per)3.029 E(-)-.2 E 1.891 (forms all editing actions in a b)72 183.6 R(uf)-.2 E 1.891 (fer \(actually a temporary \214le\) into which the te)-.25 F 1.891 (xt of the \214le is initially read.)-.15 F .1(Changes made to the b)72 195.6 R(uf)-.2 E .1(fer ha)-.25 F .4 -.15(ve n)-.2 H 2.6(oe).15 G -.25 (ff)-2.6 G .099(ect on the \214le being edited unless and until the b) .25 F(uf)-.2 E .099(fer contents are written out)-.25 F .536 (to the \214le with a)72 207.6 R F1(write)3.036 E F0 3.036 (command. After)3.036 F .536(the b)3.036 F(uf)-.2 E .536 (fer contents are written, the pre)-.25 F .536 (vious contents of the written \214le are)-.25 F .081 (no longer accessible.)72 219.6 R .081(When a \214le is edited, its nam\ e becomes the current \214le name, and its contents are read into the) 5.081 F -.2(bu)72 231.6 S -.25(ff).2 G(er).25 E(.)-.55 E .444 (The current \214le is almost al)97 247.2 R -.1(wa)-.1 G .445 (ys considered to be).1 F F1(edited.)2.945 E F0 .445 (This means that the contents of the b)5.445 F(uf)-.2 E .445 (fer are logi-)-.25 F .44(cally connected with the current \214le name,\ so that writing the current b)72 259.2 R(uf)-.2 E .439 (fer contents onto that \214le, e)-.25 F -.15(ve)-.25 G 2.939(ni).15 G 2.939(fi)-2.939 G 2.939(te)-2.939 G(xists,)-3.089 E (is a reasonable action.)72 271.2 Q(If the current \214le is not)5 E F1 (edited)2.5 E F0(then)2.5 E F1 -.2(ex)2.5 G F0 (will not normally write on it if it already e)2.7 E(xists.*)-.15 E F2 2.5(2.2. Alter)72 295.2 R(nate \214le)-.15 E F0 .085(Each time a ne)97 310.8 R 2.585(wv)-.25 G .085(alue is gi)-2.835 F -.15(ve)-.25 G 2.586 (nt).15 G 2.586(ot)-2.586 G .086(he current \214le name, the pre)-2.586 F .086(vious current \214le name is sa)-.25 F -.15(ve)-.2 G 2.586(da).15 G 2.586(st)-2.586 G(he)-2.586 E F1(alternate)2.586 E F0(\214le name.)72 322.8 Q(Similarly if a \214le is mentioned b)5 E (ut does not become the current \214le, it is sa)-.2 E -.15(ve)-.2 G 2.5 (da).15 G 2.5(st)-2.5 G(he alternate \214le name.)-2.5 E F2 2.5 (2.3. Filename)72 346.8 R(expansion)2.5 E F0 .73(Filenames within the e\ ditor may be speci\214ed using the normal shell e)97 362.4 R .73 (xpansion con)-.15 F -.15(ve)-.4 G 3.23(ntions. In).15 F .73 (addition, the)3.23 F(character `%' in \214lenames is replaced by the)72 374.4 Q F1(curr)2.5 E(ent)-.37 E F0 (\214le name and the character `#' by the)2.5 E F1(alternate)2.5 E F0 (\214le name.\207)2.5 E F2 2.5(2.4. Multiple)72 398.4 R (\214les and named b)2.5 E(uffers)-.2 E F0 .021 (If more than one \214le is gi)97 414 R -.15(ve)-.25 G 2.521(no).15 G 2.521(nt)-2.521 G .02 (he command line, then the \214rst \214le is edited as described abo) -2.521 F -.15(ve)-.15 G 5.02(.T).15 G .02(he remain-)-5.02 F .161 (ing ar)72 426 R .161(guments are placed with the \214rst \214le in the) -.18 F F1(ar)2.661 E .161(gument list.)-.37 F F0 .161(The current ar) 5.161 F .161(gument list may be displayed with the)-.18 F F1(ar)72 438 Q (gs)-.37 E F0 2.512(command. The)2.512 F(ne)2.512 E .012 (xt \214le in the ar)-.15 F .012(gument list may be edited with the)-.18 F F1(ne)2.511 E(xt)-.2 E F0 2.511(command. The)2.511 F(ar)2.511 E .011 (gument list may also)-.18 F .765 (be respeci\214ed by specifying a list of names to the)72 450 R F1(ne) 3.265 E(xt)-.2 E F0 3.265(command. These)3.265 F .765(names are e)3.265 F .766(xpanded, the resulting list of)-.15 F(names becomes the ne)72 462 Q 2.5(wa)-.25 G -.18(rg)-2.5 G(ument list, and).18 E F1 -.2(ex)2.5 G F0 (edits the \214rst \214le on the list.)2.7 E -.15(Fo)97 477.6 S 3.795 (rs).15 G -.2(av)-3.795 G 1.295(ing blocks of te).2 F 1.294 (xt while editing, and especially when editing more than one \214le,) -.15 F F1 -.2(ex)3.794 G F0 1.294(has a group of)3.994 F .293(named b)72 489.6 R(uf)-.2 E 2.793(fers. These)-.25 F .293 (are similar to the normal b)2.793 F(uf)-.2 E(fer)-.25 E 2.793(,e)-.4 G .294(xcept that only a limited number of operations are a)-2.943 F -.25 (va)-.2 G(ilable).25 E(on them.)72 501.6 Q(The b)5 E(uf)-.2 E(fers ha) -.25 E .3 -.15(ve n)-.2 H(ames).15 E F1(a)2.5 E F0(through)2.5 E F1 (z.\210)2.5 E F2 2.5(2.5. Read)72 525.6 R(only)2.5 E F0 .405 (It is possible to use)97 541.2 R F1 -.2(ex)2.906 G F0(in)3.106 E F1 -.37(re)2.906 G .406(ad only).37 F F0 .406 (mode to look at \214les that you ha)2.906 F .706 -.15(ve n)-.2 H 2.906 (oi).15 G .406(ntention of modifying.)-2.906 F .406(This mode)5.406 F .52(protects you from accidently o)72 553.2 R -.15(ve)-.15 G .52 (rwriting the \214le.).15 F .52(Read only mode is on when the)5.52 F F1 -.37(re)3.019 G(adonly).37 E F0 .519(option is set.)3.019 F .519 (It can be)5.519 F .005(turned on with the)72 565.2 R F22.505 E F0 .006(command line option, by the)2.506 F F1(vie)2.506 E(w)-.15 E F0 .006 (command line in)2.506 F -.2(vo)-.4 G .006(cation, or by setting the).2 F F1 -.37(re)2.506 G(adonly).37 E F0(option.)2.506 E .275 (It can be cleared by setting)72 577.2 R F1(nor)2.775 E(eadonly)-.37 E F0 5.275(.I)C 2.775(ti)-5.275 G 2.775(sp)-2.775 G .275 (ossible to write, e)-2.775 F -.15(ve)-.25 G 2.775(nw).15 G .274 (hile in read only mode, by indicating that you)-2.775 F .375 (really kno)72 589.2 R 2.875(ww)-.25 G .375(hat you are doing.)-2.875 F -1.1(Yo)5.375 G 2.875(uc)1.1 G .375(an write to a dif)-2.875 F .375 (ferent \214le, or can use the ! form of write, e)-.25 F -.15(ve)-.25 G 2.875(nw).15 G .375(hile in read)-2.875 F(only mode.)72 601.2 Q F2 2.5 (3. Exceptional)72 625.2 R(Conditions)2.5 E .32 LW 144 666.4 72 666.4 DL /F3 8/Times-Roman@0 SF 2(*T)72 676.4 S(he)-2 E/F4 8/Times-Italic@0 SF (\214le)2 E F3(command will say `)2 E(`[Not edited]')-.592 E 2('i)-.592 G 2(ft)-2 G(he current \214le is not considered edited.)-2 E 2.049<8754> 72 688.2 S .049(his mak)-2.049 F .049 (es it easy to deal alternately with tw)-.08 F 2.049<6f8c>-.08 G .049 (les and eliminates the need for retyping the name supplied on an)-2.049 F F4(edit)2.049 E F3 .05(command after a)2.05 F F4 .05(No write)2.05 F (since last c)72 698.2 Q(hang)-.12 E(e)-.08 E F3(diagnostic is recei)2 E -.12(ve)-.2 G(d.).12 E 2.344<8849>72 710 S 2.344(ti)-2.344 G 2.344(sa) -2.344 G .344(lso possible to refer to)-2.344 F F4(A)2.344 E F3(through) 2.344 E F4(Z;)2.344 E F3 .344(the upper case b)2.344 F(uf)-.16 E .344 (fers are the same as the lo)-.2 F .343(wer b)-.2 F .343 (ut commands append to named b)-.16 F(uf)-.16 E .343(fers rather than) -.2 F(replacing if upper case names are used.)72 720 Q EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-3)339.7 E/F1 10/Times-Bold@0 SF 2.5(3.1. Err)72 84 R(ors and interrupts)-.18 E F0 .933(When errors occur)97 99.6 R/F2 10/Times-Italic@0 SF -.2(ex)3.433 G F0 .932(\(optionally\) rings the terminal bell and, in an)3.633 F 3.432 (yc)-.15 G .932(ase, prints an error diagnostic.)-3.432 F .932(If the) 5.932 F .286 (primary input is from a \214le, editor processing will terminate.)72 111.6 R .287(If an interrupt signal is recei)5.287 F -.15(ve)-.25 G(d,) .15 E F2 -.2(ex)2.787 G F0 .287(prints `)2.987 F(`Interrupt')-.74 E(') -.74 E(and returns to its command le)72 123.6 Q -.15(ve)-.25 G 2.5 (l. If).15 F(the primary input is a \214le, then)2.5 E F2 -.2(ex)2.5 G F0(will e)2.7 E(xit when this occurs.)-.15 E F1 2.5(3.2. Reco)72 147.6 R -.1(ve)-.1 G(ring fr).1 E(om hangups and crashes)-.18 E F0 .668 (If a hangup signal is recei)97 163.2 R -.15(ve)-.25 G 3.168(da).15 G .668(nd the b)-3.168 F(uf)-.2 E .668(fer has been modi\214ed since it w) -.25 F .667(as last written out, or if the system)-.1 F .498(crashes, e\ ither the editor \(in the \214rst case\) or the system \(after it reboo\ ts in the second\) will attempt to preserv)72 175.2 R 2.999(et)-.15 G (he)-2.999 E -.2(bu)72 187.2 S -.25(ff).2 G(er).25 E 5.405(.T)-.55 G .405(he ne)-5.405 F .405(xt time you log in you should be able to reco) -.15 F -.15(ve)-.15 G 2.905(rt).15 G .405(he w)-2.905 F .405 (ork you were doing, losing at most a fe)-.1 F 2.904(wl)-.25 G(ines) -2.904 E .212 (of changes from the last point before the hangup or editor crash.)72 199.2 R 1.813 -.8(To r)5.213 H(eco).8 E -.15(ve)-.15 G 2.713(ra\214).15 G .213(le you can use the)-2.713 F F12.713 E F0 2.713(option. If) 2.713 F(you)2.713 E .363(were editing the \214le)72 211.2 R F2 -.37(re) 2.863 G(sume).37 E(,)-.1 E F0 .363(then you should change to the direct\ ory where you were when the crash occurred, gi)2.863 F(v-)-.25 E (ing the command)72 223.2 Q F1(ex \255r)108 241.2 Q F2 -.37(re)2.5 G (sume).37 E F0(After checking that the retrie)72 259.2 Q -.15(ve)-.25 G 2.5<648c>.15 G(le is indeed ok, you can)-2.5 E F2(write)2.5 E F0(it o) 2.5 E -.15(ve)-.15 G 2.5(rt).15 G(he pre)-2.5 E (vious contents of that \214le.)-.25 E -1.1(Yo)97 274.8 S 3.337(uw)1.1 G .837(ill normally get mail from the system telling you when a \214le ha\ s been sa)-3.337 F -.15(ve)-.2 G 3.337(da).15 G .837(fter a crash.) -3.337 F .837(The com-)5.837 F(mand)72 286.8 Q F1(ex)108 304.8 Q F0 2.5 E F1(r)A F0 .618(will print a list of the \214les which ha)72 322.8 R .918 -.15(ve b)-.2 H .618(een sa).15 F -.15(ve)-.2 G 3.118(df).15 G .618(or you.)-3.118 F .617 (\(In the case of a hangup, the \214le will not appear in the)5.618 F (list, although it can be reco)72 334.8 Q -.15(ve)-.15 G(red.\)).15 E F1 2.5(4. Editing)72 358.8 R(modes)2.5 E F2(Ex)97 374.4 Q F0 .304 (has \214v)2.804 F 2.804(ed)-.15 G .304(istinct modes.)-2.804 F .304 (The primary mode is)5.304 F F2(command)2.804 E F0 2.805(mode. Commands) 2.804 F .305(are entered in command mode)2.805 F .238 (when a `:' prompt is present, and are e)72 386.4 R -.15(xe)-.15 G .238 (cuted each time a complete line is sent.).15 F(In)5.238 E F2(te)2.737 E .237(xt input)-.2 F F0(mode)2.737 E F2 -.2(ex)2.737 G F0 -.05(ga)2.937 G .237(thers input).05 F 1.131(lines and places them in the \214le.)72 398.4 R(The)6.131 E F2 1.131(append, insert,)3.631 F F0(and)3.631 E F2 -.15(ch)3.631 G(ang).15 E(e)-.1 E F0 1.131(commands use te)3.631 F 1.131 (xt input mode.)-.15 F 1.131(No prompt is)6.131 F .262 (printed when you are in te)72 410.4 R .262(xt input mode.)-.15 F .262 (This mode is left by typing a `.)5.262 F 2.762('a)-.7 G .261 (lone at the be)-2.762 F .261(ginning of a line, and)-.15 F F2(com-) 2.761 E(mand)72 422.4 Q F0(mode resumes.)2.5 E 1.173 (The last three modes are)97 438 R F2(open)3.674 E F0(and)3.674 E F2 (visual)3.674 E F0 1.174 (modes, entered by the commands of the same name, and, within)3.674 F .517(open and visual modes)72 450 R F2(te)3.017 E .517(xt insertion)-.2 F F0(mode.)3.017 E F2(Open)5.517 E F0(and)3.017 E F2(visual)3.016 E F0 .516(modes allo)3.016 F 3.016(wl)-.25 G .516 (ocal editing operations to be performed)-3.016 F .118(on the te)72 462 R .118(xt in the \214le.)-.15 F(The)5.118 E F2(open)2.618 E F0 .119 (command displays one line at a time on an)2.619 F 2.619(yt)-.15 G .119 (erminal while)-2.619 F F2(visual)2.619 E F0 -.1(wo)2.619 G .119(rks on) .1 F/F3 8/Times-Roman@0 SF(CR)2.619 E(T)-.48 E F0(ter)2.619 E(-)-.2 E 1.786(minals with random positioning cursors, using the screen as a \(s\ ingle\) windo)72 474 R 4.286(wf)-.25 G 1.786(or \214le editing changes.) -4.286 F(These)6.786 E(modes are described \(only\) in)72 486 Q F2 (An Intr)2.5 E(oduction to Display Editing with V)-.45 E(i.)-.74 E F1 2.5(5. Command)72 510 R(structur)2.5 E(e)-.18 E F0 .504 (Most command names are English w)97 525.6 R .505 (ords, and initial pre\214x)-.1 F .505(es of the w)-.15 F .505 (ords are acceptable abbre)-.1 F 3.005(viations. The)-.25 F (ambiguity of abbre)72 537.6 Q(viations is resolv)-.25 E(ed in f)-.15 E -.2(avo)-.1 G 2.5(ro).2 G 2.5(ft)-2.5 G (he more commonly used commands.*)-2.5 E F1 2.5(5.1. Command)72 561.6 R (parameters)2.5 E F0 1.108(Most commands accept pre\214x addresses spec\ ifying the lines in the \214le upon which the)97 577.2 R 3.607(ya)-.15 G 1.107(re to ha)-3.607 F 1.407 -.15(ve e)-.2 H -.25(ff).15 G(ect.).25 E .2(The forms of these addresses will be discussed belo)72 589.2 R 4 -.65 (w. A)-.25 H .2(number of commands also may tak)3.35 F 2.7(eat)-.1 G (railing)-2.7 E F2(count)2.7 E F0(speci-)2.7 E .158 (fying the number of lines to be in)72 601.2 R -.2(vo)-.4 G(lv).2 E .158 (ed in the command.\207)-.15 F .158(Thus the command `)5.158 F(`10p') -.74 E 2.658('w)-.74 G .158(ill print the tenth line in the)-2.658 F -.2 (bu)72 613.2 S -.25(ff).2 G(er while `).25 E(`delete 5')-.74 E 2.5('w) -.74 G(ill delete \214v)-2.5 E 2.5(el)-.15 G(ines from the b)-2.5 E(uf) -.2 E(fer)-.25 E 2.5(,s)-.4 G(tarting with the current line.)-2.5 E 1.32 (Some commands tak)97 628.8 R 3.82(eo)-.1 G 1.321 (ther information or parameters, this information al)-3.82 F -.1(wa)-.1 G 1.321(ys being gi).1 F -.15(ve)-.25 G 3.821(na).15 G 1.321 (fter the com-)-3.821 F(mand name.\210)72 640.8 Q .32 LW 144 676.4 72 676.4 DL F3 2(*A)72 686.4 S 2(sa)-2 G 2(ne)-2 G(xample, the command) -2.12 E/F4 8/Times-Italic@0 SF(substitute)2 E F3(can be abbre)2 E (viated `s' while the shortest a)-.2 E -.2(va)-.16 G(ilable abbre).2 E (viation for the)-.2 E F4(set)2 E F3(command is `se'.)2 E 2<8743>72 698.2 S(ounts are rounded do)-2 E(wn if necessary)-.2 E(.)-.52 E 2.73 <8845>72 710 S .73(xamples w)-2.73 F .73(ould be option names in a)-.08 F F4(set)2.729 E F3 .729(command i.e. `)2.729 F .729(`set number')-.592 F .729(', a \214le name in an)-.592 F F4(edit)2.729 E F3 .729 (command, a re)2.729 F .729(gular e)-.12 F .729(xpression in a)-.12 F F4 (substitute)2.729 E F3(command, or a tar)72 720 Q(get address for a) -.144 E F4(copy)2 E F3(command, i.e. `)2 E(`1,5 cop)-.592 E 2(y2)-.08 G (5')-2 E('.)-.592 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 337.2(USD:12-4 Ex)72 48 R(Reference Manual)2.5 E /F1 10/Times-Bold@0 SF 2.5(5.2. Command)72 84 R -.1(va)2.5 G(riants).1 E F0 3.185(An)97 99.6 S .685(umber of commands ha)-3.185 F .985 -.15(ve t) -.2 H .885 -.1(wo d).15 H .685(istinct v).1 F 3.185(ariants. The)-.25 F -.25(va)3.185 G .685(riant form of the command is in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.186(db).1 G 3.186(yp)-3.186 G(lacing)-3.186 E .034 (an `!' immediately after the command name.)72 111.6 R .034 (Some of the def)5.034 F .034(ault v)-.1 F .033 (ariants may be controlled by options; in this case,)-.25 F (the `!' serv)72 123.6 Q(es to toggle the def)-.15 E(ault.)-.1 E F1 2.5 (5.3. Flags)72 147.6 R(after commands)2.5 E F0 .158 (The characters `#', `p' and `l' may be placed after man)97 163.2 R 2.658(yc)-.15 G 2.658(ommands.** In)-2.658 F .159 (this case, the command abbre)2.658 F(viated)-.25 E .996 (by these characters is e)72 175.2 R -.15(xe)-.15 G .995 (cuted after the command completes.).15 F(Since)5.995 E/F2 10 /Times-Italic@0 SF -.2(ex)3.495 G F0 .995(normally prints the ne)3.695 F 3.495(wc)-.25 G .995(urrent line after)-3.495 F .073 (each change, `p' is rarely necessary)72 187.2 R 5.073(.A)-.65 G .373 -.15(ny n)-5.073 H .073 (umber of `+' or `\255' characters may also be gi).15 F -.15(ve)-.25 G 2.574(nw).15 G .074(ith these \215ags.)-2.574 F .074(If the)5.074 F(y) -.15 E(appear)72 199.2 Q 2.5(,t)-.4 G(he speci\214ed of)-2.5 E (fset is applied to the current line v)-.25 E (alue before the printing command is e)-.25 E -.15(xe)-.15 G(cuted.).15 E F1 2.5(5.4. Comments)72 223.2 R F0 .424(It is possible to gi)97 238.8 R .724 -.15(ve e)-.25 H .424(ditor commands which are ignored.).15 F .423(This is useful when making comple)5.423 F 2.923(xe)-.15 G .423 (ditor scripts)-2.923 F .203(for which comments are desired.)72 250.8 R .204(The comment character is the double quote: ".)5.203 F(An)5.204 E 2.704(yc)-.15 G .204(ommand line be)-2.704 F .204(ginning with)-.15 F 2.976("i)72 262.8 S 2.976(si)-2.976 G 2.976(gnored. Comments)-2.976 F (be)2.976 E .476 (ginning with " may also be placed at the ends of commands, e)-.15 F .476(xcept in cases where the)-.15 F(y)-.15 E (could be confused as part of te)72 274.8 Q (xt \(shell escapes and the substitute and map commands\).)-.15 E F1 2.5 (5.5. Multiple)72 298.8 R(commands per line)2.5 E F0 1.169(More than on\ e command may be placed on a line by separating each pair of commands b\ y a `|' character)97 314.4 R(.)-.55 E(Ho)72 326.4 Q(we)-.25 E -.15(ve) -.25 G 2.805(rt).15 G(he)-2.805 E F2(global)2.805 E F0 .305 (commands, comments, and the shell escape `!')2.805 F .305 (must be the last command on a line, as the)5.305 F 2.805(ya)-.15 G(re) -2.805 E(not terminated by a `|'.)72 338.4 Q F1 2.5(5.6. Reporting)72 362.4 R(lar)2.5 E(ge changes)-.1 E F0 1.621 (Most commands which change the contents of the editor b)97 378 R(uf)-.2 E 1.621(fer gi)-.25 F 1.921 -.15(ve f)-.25 H 1.621 (eedback if the scope of the change).15 F -.15(ex)72 390 S .241 (ceeds a threshold gi).15 F -.15(ve)-.25 G 2.741(nb).15 G 2.741(yt) -2.741 G(he)-2.741 E F2 -.37(re)2.741 G(port).37 E F0 2.741 (option. This)2.741 F .24(feedback helps to detect undesirably lar)2.741 F .24(ge changes so that the)-.18 F(y)-.15 E .166 (may be quickly and easily re)72 402 R -.15(ve)-.25 G .167(rsed with an) .15 F F2(undo.)2.667 E F0 .167(After commands with more global ef)5.167 F .167(fect such as)-.25 F F2(global)2.667 E F0(or)2.667 E F2(visual,) 2.667 E F0 .214 (you will be informed if the net change in the number of lines in the b) 72 414 R(uf)-.2 E .214(fer during this command e)-.25 F .214 (xceeds this thresh-)-.15 F(old.)72 426 Q F1 2.5(6. Command)72 450 R (addr)2.5 E(essing)-.18 E 2.5(6.1. Addr)72 474 R(essing primiti)-.18 E -.1(ve)-.1 G(s).1 E(.)72 489.6 Q F0 .699(The current line.)97.5 F .699 (Most commands lea)5.699 F .999 -.15(ve t)-.2 H .699 (he current line as the last line which the).15 F 3.2(ya)-.15 G -.25(ff) -3.2 G(ect.).25 E .719(The def)172 501.6 R .719 (ault address for most commands is the current line, thus `)-.1 F F1(.)A F0 3.219('i)C 3.218(sr)-3.219 G .718(arely used alone as)-3.218 F (an address.)172 513.6 Q F2(n)72 529.2 Q F0(The)95 E F2(n)2.5 E F0 (th line in the editor')A 2.5(sb)-.55 G(uf)-2.7 E(fer)-.25 E 2.5(,l)-.4 G(ines being numbered sequentially from 1.)-2.5 E F1($)72 544.8 Q F0 (The last line in the b)95 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1(%)72 560.4 Q F0(An abbre)90 E(viation for `)-.25 E(`1,$')-.74 E(', the entire b) -.74 E(uf)-.2 E(fer)-.25 E(.)-.55 E F2(+n \255n)72 576 Q F0(An of)74 E (fset relati)-.25 E .3 -.15(ve t)-.25 H 2.5(ot).15 G(he current b)-2.5 E (uf)-.2 E(fer line.\207)-.25 E F1(/)72 591.6 Q F2(pat)A F1 2.5(/?)C F2 (pat)-2.5 E F1(?)A F0 .606(Scan forw)56.38 F .607(ard and backw)-.1 F .607(ard respecti)-.1 F -.15(ve)-.25 G .607(ly for a line containing).15 F F2(pat)3.107 E F0 3.107(,ar)C -.15(eg)-3.107 G .607(ular e).15 F .607 (xpression \(as)-.15 F .132(de\214ned belo)172 603.6 R 2.632(w\). The) -.25 F .132(scans normally wrap around the end of the b)2.632 F(uf)-.2 E (fer)-.25 E 5.132(.I)-.55 G 2.632(fa)-5.132 G .131(ll that is desired) -2.632 F 1.189(is to print the ne)172 615.6 R 1.189(xt line containing) -.15 F F2(pat)3.689 E F0 3.689(,t)C 1.189(hen the trailing)-3.689 F F1 (/)3.69 E F0(or)3.69 E F1(?)3.69 E F0 1.19(may be omitted.)3.69 F(If) 6.19 E F2(pat)3.69 E F0(is)3.69 E(omitted or e)172 627.6 Q (xplicitly empty)-.15 E 2.5(,t)-.65 G(hen the last re)-2.5 E(gular e) -.15 E(xpression speci\214ed is located.\210)-.15 E F172 643.2 Q F2(x)A F0 .67(Before each non-relati)83.07 F .97 -.15(ve m)-.25 H .671 (otion of the current line `).15 F F1(.)A F0 .671(', the pre)B .671 (vious current line is mark)-.25 F(ed)-.1 E .224 (with a tag, subsequently referred to as `\264\264'.)172 655.2 R .223 (This mak)5.223 F .223(es it easy to refer or return to this pre-)-.1 F 1.076(vious conte)172 667.2 R 3.576(xt. Marks)-.15 F 1.076 (may also be established by the)3.576 F F2(mark)3.576 E F0 1.077 (command, using single lo)3.576 F(wer)-.25 E(case letters)172 679.2 Q F2 (x)2.5 E F0(and the mark)2.5 E(ed lines referred to as `\264)-.1 E F2(x) A F0('.)A .32 LW 144 687.2 72 687.2 DL/F3 8/Times-Roman@0 SF (** A `p' or `l' must be preceded by a blank or tab e)72 697.2 Q (xcept in the single special case `dp'.)-.12 E 2<8754>72 709 S (he forms `.+3' `+3' and `+++' are all equi)-2 E -.2(va)-.2 G (lent; if the current line is line 100 the).2 E 2(ya)-.12 G (ll address line 103.)-2 E 2.521<8854>72 720.8 S .521(he forms)-2.521 F /F4 8/Times-Bold@0 SF(\\/)2.521 E F3(and)2.521 E F4(\\?)2.521 E F3 .521 (scan using the last re)2.521 F .52(gular e)-.12 F .52 (xpression used in a scan; after a substitute)-.12 F F4(//)2.52 E F3 (and)2.52 E F4(??)2.52 E F3 -.08(wo)2.52 G .52 (uld scan using the substitute').08 F 2.52(sr)-.44 G -.12(eg)-2.52 G (ular).12 E -.12(ex)72 730.8 S(pression.).12 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-5)339.7 E/F1 10/Times-Bold@0 SF 2.5(6.2. Combining)72 84 R(addr)2.5 E(essing primiti) -.18 E -.1(ve)-.1 G(s).1 E F0 .36 (Addresses to commands consist of a series of addressing primiti)97 99.6 R -.15(ve)-.25 G .359(s, separated by `,).15 F 2.859('o)-.7 G 2.859(r`) -2.859 G 2.859(;'. Such)-2.859 F .359(address lists)2.859 F .178(are e) 72 111.6 R -.25(va)-.25 G .178(luated left-to-right.).25 F .178 (When addresses are separated by `;' the current line `)5.178 F F1(.)A F0 5.179('i)C 2.679(ss)-5.179 G .179(et to the v)-2.679 F .179 (alue of the pre)-.25 F(vious)-.25 E 2.458(addressing e)72 123.6 R 2.458 (xpression before the ne)-.15 F 2.457(xt address is interpreted.)-.15 F 2.457(If more addresses are gi)7.457 F -.15(ve)-.25 G 4.957(nt).15 G 2.457(han the command)-4.957 F .762(requires, then all b)72 135.6 R .762 (ut the last one or tw)-.2 F 3.262(oa)-.1 G .762(re ignored.)-3.262 F .763(If the command tak)5.763 F .763(es tw)-.1 F 3.263(oa)-.1 G .763 (ddresses, the \214rst addressed line)-3.263 F (must precede the second in the b)72 147.6 Q(uf)-.2 E(fer)-.25 E<2e87> -.55 E F1 2.5(7. Command)72 171.6 R(descriptions)2.5 E F0(The follo)97 187.2 Q(wing form is a prototype for all)-.25 E/F2 10/Times-Italic@0 SF -.2(ex)2.5 G F0(commands:)2.7 E F2(addr)108 205.2 Q(ess)-.37 E F1 (command)2.5 E F2 2.5(!p)2.5 G(ar)-2.5 E(ameter)-.15 E 2.5(sc)-.1 G (ount \215a)-2.5 E(gs)-.1 E F0 .758(All parts are optional; the de)72 223.2 R .758(generate case is the empty command which prints the ne)-.15 F .759(xt line in the \214le.)-.15 F -.15(Fo)5.759 G 3.259(rs).15 G (anity)-3.259 E(with use from within)72 235.2 Q F2(visual)2.5 E F0 (mode,)2.5 E F2 -.2(ex)2.5 G F0(ignores a `)2.7 E(`:')-.74 E 2.5('p)-.74 G(receding an)-2.5 E 2.5(yc)-.15 G(ommand.)-2.5 E .707(In the follo)97 250.8 R .707(wing command descriptions, the def)-.25 F .707 (ault addresses are sho)-.1 F .706(wn in parentheses, which are)-.25 F F2(not,)3.206 E F0(ho)3.206 E(w-)-.25 E -2.15 -.25(ev e)72 262.8 T .8 -.4(r, p).25 H(art of the command.).4 E F1(ab)72 285.6 Q(br)-.1 E -.15 (ev)-.18 G(iate).15 E F2(wor)2.5 E 2.5(dr)-.37 G(hs)-2.5 E F0(abbr:) 204.91 E F1(ab)2.5 E F0 .419(Add the named abbre)97 301.2 R .419 (viation to the current list.)-.25 F .419 (When in input mode in visual, if)5.419 F F2(wor)2.919 E(d)-.37 E F0 .419(is typed as a complete)2.919 F -.1(wo)97 313.2 S (rd, it will be changed to).1 E F2(rhs)2.5 E F0(.)A(\()72 336 Q F1(.)2.5 E F0(\))2.5 E F1(append)2.5 E F0(abbr:)239.66 E F1(a)2.5 E F2(te)72 348 Q(xt)-.2 E F1(.)72 360 Q F0 .287(Reads the input te)97 375.6 R .286 (xt and places it after the speci\214ed line.)-.15 F .286 (After the command, `)5.286 F F1(.)A F0 5.286('a)C .286 (ddresses the last line input)-5.286 F .191 (or the speci\214ed line if no lines were input.)97 387.6 R .192 (If address `0' is gi)5.192 F -.15(ve)-.25 G .192(n, te).15 F .192 (xt is placed at the be)-.15 F .192(ginning of the b)-.15 F(uf)-.2 E (fer)-.25 E(.)-.55 E F1(a!)72 410.4 Q F2(te)72 422.4 Q(xt)-.2 E F1(.)72 434.4 Q F0(The v)97 450 Q(ariant \215ag to)-.25 E F2(append)2.5 E F0 (toggles the setting for the)2.5 E F2(autoindent)2.5 E F0 (option during the input of)2.5 E F2(te)2.5 E(xt.)-.2 E F1(ar)72 472.8 Q (gs)-.1 E F0(The members of the ar)97 488.4 Q (gument list are printed, with the current ar)-.18 E (gument delimited by `[' and `]'.)-.18 E(\()72 511.2 Q F1(.)2.5 E F0(,) 2.5 E F1(.)2.5 E F0(\))2.5 E F1(change)2.5 E F2(count)2.5 E F0(abbr:) 206.62 E F1(c)2.5 E F2(te)72 523.2 Q(xt)-.2 E F1(.)72 535.2 Q F0 .537 (Replaces the speci\214ed lines with the input)97 550.8 R F2(te)3.037 E (xt)-.2 E F0 5.537(.T)C .537 (he current line becomes the last line input; if no lines were)-5.537 F (input it is left as for a)97 562.8 Q F2(delete)2.5 E F0(.)A F1(c!)72 585.6 Q F2(te)72 597.6 Q(xt)-.2 E F1(.)72 609.6 Q F0(The v)97 625.2 Q (ariant toggles)-.25 E F2(autoindent)2.5 E F0(during the)2.5 E F2 -.15 (ch)2.5 G(ang).15 E -.15(e.)-.1 G F0(\()72 648 Q F1(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(copy)1.666 E F2(addr \215a)2.5 E(gs)-.1 E F0 (abbr:)199.494 E F1(co)2.5 E F0(A)97 663.6 Q F2(copy)2.515 E F0 .015 (of the speci\214ed lines is placed after)2.515 F F2(addr)2.515 E(,) -1.11 E F0 .015(which may be `0'.)2.515 F .015(The current line `)5.015 F F1(.)A F0 5.016('a)C .016(ddresses the last line)-5.016 F(of the cop) 97 675.6 Q 3.8 -.65(y. T)-.1 H(he command).65 E F2(t)2.5 E F0 (is a synon)2.5 E(ym for)-.15 E F2(copy)2.5 E(.)-.55 E .32 LW 144 700 72 700 DL/F3 8/Times-Roman@0 SF 2.316<874e>72 710 S .316(ull address speci\ \214cations are permitted in a list of addresses, the def)-2.316 F .316 (ault in this case is the current line `.)-.08 F .316 ('; thus `,100' is equi)-.56 F -.2(va)-.2 G .316(lent to `).2 F/F4 8 /Times-Bold@0 SF(.)A F3(,100'.)A(It is an error to gi)72 720 Q .24 -.12 (ve a p)-.2 H(re\214x address to a command which e).12 E(xpects none.) -.12 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 337.2(USD:12-6 Ex)72 48 R(Reference Manual)2.5 E (\()72 84 Q/F1 10/Times-Bold@0 SF(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\)) 2.5 E F1(delete)1.666 E/F2 10/Times-Italic@0 SF -.2(bu)2.5 G -.18(ff).2 G(er count \215a).18 E(gs)-.1 E F0(abbr:)165.164 E F1(d)2.5 E F0(Remo)97 99.6 Q -.15(ve)-.15 G 2.57(st).15 G .07(he speci\214ed lines from the b) -2.57 F(uf)-.2 E(fer)-.25 E 5.07(.T)-.55 G .07 (he line after the last line deleted becomes the current line; if the) -5.07 F .283(lines deleted were originally at the end, the ne)97 111.6 R 2.783(wl)-.25 G .283(ast line becomes the current line.)-2.783 F .283 (If a named)5.283 F F2 -.2(bu)2.783 G -.18(ff).2 G(er).18 E F0 .283 (is speci-)2.783 F .326(\214ed by gi)97 123.6 R .326(ving a letter)-.25 F 2.826(,t)-.4 G .326(hen the speci\214ed lines are sa)-2.826 F -.15(ve) -.2 G 2.825(di).15 G 2.825(nt)-2.825 G .325(hat b)-2.825 F(uf)-.2 E(fer) -.25 E 2.825(,o)-.4 G 2.825(ra)-2.825 G .325 (ppended to it if an upper case letter)-2.825 F(is used.)97 135.6 Q F1 (edit)72 158.4 Q F2(\214le)2.5 E F0(abbr:)257.17 E F1(e)2.5 E(ex)72 170.4 Q F2(\214le)2.5 E F0 .622(Used to be)97 186 R .623 (gin an editing session on a ne)-.15 F 3.123<778c>-.25 G 3.123(le. The) -3.123 F .623(editor \214rst checks to see if the b)3.123 F(uf)-.2 E .623(fer has been modi\214ed)-.25 F .094(since the last)97 198 R F2 (write)2.594 E F0 .094(command w)2.594 F .094(as issued.)-.1 F .094 (If it has been, a w)5.094 F .093 (arning is issued and the command is aborted.)-.1 F(The)5.093 E .662 (command otherwise deletes the entire contents of the editor b)97 210 R (uf)-.2 E(fer)-.25 E 3.162(,m)-.4 G(ak)-3.162 E .663 (es the named \214le the current \214le and)-.1 F(prints the ne)97 222 Q 2.5<778c>-.25 G 2.5(lename. After)-2.5 F(insuring that this \214le is s\ ensible\207 the editor reads the \214le into its b)2.5 E(uf)-.2 E(fer) -.25 E(.)-.55 E .44(If the read of the \214le completes without error)97 237.6 R 2.94(,t)-.4 G .44 (he number of lines and characters read is typed.)-2.94 F .44 (If there were)5.44 F(an)97 249.6 Q 2.593(yn)-.15 G(on-)-2.593 E/F3 8 /Times-Roman@0 SF(ASCII)A F0 .093(characters in the \214le the)2.593 F 2.592(ya)-.15 G .092(re stripped of their non-)-2.592 F F3(ASCII)A F0 .092(high bits, and an)2.592 F 2.592(yn)-.15 G .092 (ull characters in the)-2.592 F .015(\214le are discarded.)97 261.6 R .015(If none of these errors occurred, the \214le is considered)5.015 F F2(edited.)2.515 E F0 .016(If the last line of the input \214le)5.015 F .936(is missing the trailing ne)97 273.6 R .936(wline character)-.25 F 3.435(,i)-.4 G 3.435(tw)-3.435 G .935 (ill be supplied and a complaint will be issued.)-3.435 F .935 (This command)5.935 F(lea)97 285.6 Q -.15(ve)-.2 G 2.5(st).15 G (he current line `)-2.5 E F1(.)A F0 2.5('a)C 2.5(tt)-2.5 G (he last line read.\210)-2.5 E F1(e!)72 308.4 Q F2(\214le)2.5 E F0 1.104 (The v)97 324 R 1.104 (ariant form suppresses the complaint about modi\214cations ha)-.25 F 1.104(ving been made and not written from the)-.2 F(editor b)97 336 Q (uf)-.2 E(fer)-.25 E 2.5(,t)-.4 G(hus discarding all changes which ha) -2.5 E .3 -.15(ve b)-.2 H(een made before editing the ne).15 E 2.5<778c> -.25 G(le.)-2.5 E F1 2.5(e+)72 358.8 S F2 2.5<6e8c>-2.5 G(le)-2.5 E F0 .146(Causes the editor to be)97 374.4 R .146(gin at line)-.15 F F2(n) 2.646 E F0 .145(rather than at the last line;)2.646 F F2(n)2.645 E F0 .145(may also be an editor command containing no)2.645 F (spaces, e.g.: `)97 386.4 Q(`+/pat')-.74 E('.)-.74 E F1(\214le)72 409.2 Q F0(abbr:)275.22 E F1(f)2.5 E F0 .314(Prints the current \214le name, \ whether it has been `[Modi\214ed]' since the last)97 424.8 R F2(write) 2.814 E F0 .314(command, whether it is)2.814 F F2 -.37(re)2.814 G(ad).37 E(only)97 436.8 Q F0 2.583(,t)C .083 (he current line, the number of lines in the b)-2.583 F(uf)-.2 E(fer) -.25 E 2.582(,a)-.4 G .082(nd the percentage of the w)-2.582 F .082 (ay through the b)-.1 F(uf)-.2 E .082(fer of the)-.25 F(current line.*) 97 448.8 Q F1(\214le)72 471.6 Q F2(\214le)2.5 E F0 (The current \214le name is changed to)97 487.2 Q F2(\214le)2.5 E F0 (which is considered `[Not edited]'.)2.5 E 2.5(\(1,$\))72 510 S F1 (global)A F0(/)2.5 E F2(pat)A F0(/)1.666 E F2(cmds)2.5 E F0(abbr:) 184.664 E F1(g)2.5 E F0 .053 (First marks each line among those speci\214ed which matches the gi)97 525.6 R -.15(ve)-.25 G 2.552(nr).15 G -.15(eg)-2.552 G .052(ular e).15 F 2.552(xpression. Then)-.15 F .052(the gi)2.552 F -.15(ve)-.25 G 2.552 (nc).15 G(om-)-2.552 E(mand list is e)97 537.6 Q -.15(xe)-.15 G (cuted with `).15 E F1(.)A F0 2.5('i)C(nitially set to each mark)-2.5 E (ed line.)-.1 E .227(The command list consists of the remaining command\ s on the current input line and may continue to multiple)97 553.2 R .683 (lines by ending all b)97 565.2 R .683 (ut the last such line with a `\\'.)-.2 F(If)5.682 E F2(cmds)3.182 E F0 .682(\(and possibly the trailing)3.182 F F1(/)3.182 E F0 .682 (delimiter\) is omitted,)3.182 F .535(each line matching)97 577.2 R F2 (pat)3.035 E F0 .535(is printed.)3.035 F F2 .535(Append, insert,)5.535 F F0(and)3.035 E F2 -.15(ch)3.035 G(ang).15 E(e)-.1 E F0 .536 (commands and associated input are permitted;)3.035 F .52(the `)97 589.2 R F1(.)A F0 3.019('t)C .519(erminating input may be omitted if it w) -3.019 F .519(ould be on the last line of the command list.)-.1 F F2 (Open)5.519 E F0(and)3.019 E F2(visual)3.019 E F0 (commands are permitted in the command list and tak)97 601.2 Q 2.5(ei) -.1 G(nput from the terminal.)-2.5 E(The)97 616.8 Q F2(global)2.931 E F0 .431(command itself may not appear in)2.931 F F2(cmds.)2.932 E F0(The) 5.432 E F2(undo)2.932 E F0 .432(command is also not permitted there, as) 2.932 F F2(undo)2.932 E F0 .285(instead can be used to re)97 628.8 R -.15(ve)-.25 G .285(rse the entire).15 F F2(global)2.785 E F0 2.785 (command. The)2.785 F(options)2.785 E F2(autoprint)2.785 E F0(and)2.785 E F2(autoindent)2.785 E F0 .285(are inhibited)2.785 F .109(during a)97 640.8 R F2(global,)2.609 E F0 .109(\(and possibly the trailing)2.609 F F1(/)2.609 E F0 .109(delimiter\) and the v)2.609 F .11(alue of the)-.25 F F2 -.37(re)2.61 G(port).37 E F0 .11(option is temporarily in\214nite,) 2.61 F .389(in deference to a)97 652.8 R F2 -.37(re)2.889 G(port).37 E F0 .389(for the entire global.)2.889 F(Finally)5.389 E 2.889(,t)-.65 G .389(he conte)-2.889 F .388(xt mark `\264\264' is set to the v)-.15 F .388(alue of `.)-.25 F 2.888('b)-.7 G .388(efore the)-2.888 F 1.014 (global command be)97 664.8 R 1.015 (gins and is not changed during a global command, e)-.15 F 1.015 (xcept perhaps by an)-.15 F F2(open)3.515 E F0(or)3.515 E F2(visual) 3.515 E .32 LW 144 672.8 72 672.8 DL F3 2.078<8749>72 682.8 S .077 (.e., that it is not a binary \214le such as a directory)-2.078 F 2.077 (,ab)-.52 G .077(lock or character special \214le other than)-2.077 F/F4 8/Times-Italic@0 SF(/de)2.077 E(v/tty)-.12 E(,)-.44 E F3 2.077(at)2.077 G .077(erminal, or a binary or e)-2.077 F -.12(xe)-.12 G .077 (cutable \214le \(as).12 F(indicated by the \214rst w)72 692.8 Q(ord\).) -.08 E 2<8849>72 704.6 S 2(fe)-2 G -.12(xe)-2.12 G(cuted from within).12 E F4(open)2 E F3(or)2 E F4(visual,)2 E F3 (the current line is initially the \214rst line of the \214le.)2 E 2.145 (*I)72 716.4 S 2.145(nt)-2.145 G .145(he rare case that the current \ \214le is `[Not edited]' this is noted also; in this case you ha)-2.145 F .386 -.12(ve t)-.16 H 2.146(ou).12 G .146(se the form)-2.146 F/F5 8 /Times-Bold@0 SF(w!)2.146 E F3 .146 (to write to the \214le, since the edi-)2.146 F(tor is not sure that a) 72 726.4 Q F5(write)2 E F3(will not destro)2 E 2(ya\214)-.08 G (le unrelated to the current contents of the b)-2 E(uf)-.16 E(fer)-.2 E (.)-.44 E EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-7)339.7 E (within the)97 84 Q/F1 10/Times-Italic@0 SF(global.)2.5 E/F2 10 /Times-Bold@0 SF(g! /)72 106.8 Q F1(pat)A F2(/)A F1(cmds)2.5 E F0(abbr:) 235.78 E F2(v)2.5 E F0(The v)97 122.4 Q(ariant form of)-.25 E F1(global) 2.5 E F0(runs)2.5 E F1(cmds)2.5 E F0(at each line not matching)2.5 E F1 (pat)2.5 E F0(.)A(\()72 145.2 Q F2(.)2.5 E F0(\))2.5 E F2(insert)1.666 E F0(abbr:)247.734 E F2(i)2.5 E F1(te)72 157.2 Q(xt)-.2 E F2(.)72 169.2 Q F0 .345(Places the gi)97 184.8 R -.15(ve)-.25 G 2.845(nt).15 G -.15(ex) -2.845 G 2.845(tb).15 G .345(efore the speci\214ed line.)-2.845 F .345 (The current line is left at the last line input; if there were none) 5.345 F .364(input it is left at the line before the addressed line.)97 196.8 R .364(This command dif)5.364 F .364(fers from)-.25 F F1(append) 2.864 E F0 .365(only in the placement)2.865 F(of te)97 208.8 Q(xt.)-.15 E F2(i!)72 231.6 Q F1(te)72 243.6 Q(xt)-.2 E F2(.)72 255.6 Q F0(The v)97 271.2 Q(ariant toggles)-.25 E F1(autoindent)2.5 E F0(during the)2.5 E F1 (insert.)2.5 E F0(\()72 294 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(+1 \)) A F2(join)2.5 E F1(count \215a)2.5 E(gs)-.1 E F0(abbr:)188.02 E F2(j)2.5 E F0 .078(Places the te)97 309.6 R .078 (xt from a speci\214ed range of lines together on one line.)-.15 F .078 (White space is adjusted at each junction to)5.078 F(pro)97 321.6 Q .516 (vide at least one blank character)-.15 F 3.016(,t)-.4 G .716 -.1(wo i) -3.016 H 3.016(ft).1 G .516(here w)-3.016 F .516(as a `)-.1 F F2(.)A F0 3.016('a)C 3.016(tt)-3.016 G .516 (he end of the line, or none if the \214rst follo)-3.016 F(wing)-.25 E .42(character is a `\)'.)97 333.6 R .42(If there is already white space\ at the end of the line, then the white space at the start of the)5.42 F (ne)97 345.6 Q(xt line will be discarded.)-.15 E F2(j!)72 368.4 Q F0 .678(The v)97 384 R .679(ariant causes a simpler)-.25 F F1(join)3.179 E F0 .679(with no white space processing; the characters in the lines are\ simply con-)3.179 F(catenated.)97 396 Q(\()72 418.8 Q F2(.)2.5 E F0(\)) 2.5 E F2(k)2.5 E F1(x)2.5 E F0(The)97 434.4 Q F1(k)2.5 E F0 (command is a synon)2.5 E(ym for)-.15 E F1(mark.)2.5 E F0 (It does not require a blank or tab before the follo)5 E(wing letter) -.25 E(.)-.55 E(\()72 457.2 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(\))2.5 E F2(list)2.5 E F1(count \215a)2.5 E(gs)-.1 E F0 1.464 (Prints the speci\214ed lines in a more unambiguous w)97 472.8 R 1.464 (ay: tabs are printed as `^I' and the end of each line is)-.1 F(mark)97 484.8 Q(ed with a trailing `$'.)-.1 E (The current line is left at the last line printed.)5 E F2(map)72 507.6 Q F1(lhs rhs)2.5 E F0(The)97 523.2 Q F1(map)3.131 E F0 .631 (command is used to de\214ne macros for use in)3.131 F F1(visual)3.132 E F0(mode.)3.132 E F1(Lhs)5.632 E F0 .632(should be a single character) 3.132 F 3.132(,o)-.4 G 3.132(rt)-3.132 G(he)-3.132 E 1.306(sequence `)97 535.2 R(`#n')-.74 E 1.306(', for n a digit, referring to function k)-.74 F -.15(ey)-.1 G F1(n)3.955 E F0 6.305(.W)C 1.305 (hen this character or function k)-6.305 F 1.605 -.15(ey i)-.1 H 3.805 (st).15 G 1.305(yped in)-3.805 F F1(visual)97 547.2 Q F0 .503 (mode, it will be as though the corresponding)3.003 F F1(rhs)3.004 E F0 .504(had been typed.)3.004 F .504(On terminals without function k)5.504 F -.15(ey)-.1 G(s,).15 E(you can type `)97 559.2 Q(`#n')-.74 E 2.5 ('. See)-.74 F(section 6.9 of the `)2.5 E (`Introduction to Display Editing with V)-.74 E(i')-.6 E 2.5('f)-.74 G (or more details.)-2.5 E(\()72 582 Q F2(.)2.5 E F0(\))2.5 E F2(mark)2.5 E F1(x)2.5 E F0(Gi)97 597.6 Q -.15(ve)-.25 G 3.181(st).15 G .681 (he speci\214ed line mark)-3.181 F F1(x,)3.181 E F0 3.181(as)3.181 G .681(ingle lo)-3.181 F .681(wer case letter)-.25 F 5.681(.T)-.55 G(he) -5.681 E F1(x)3.181 E F0 .681(must be preceded by a blank or a tab)3.181 F 5.68(.T)-.4 G(he)-5.68 E (addressing form `\264x' then addresses this line.)97 609.6 Q (The current line is not af)5 E(fected by this command.)-.25 E(\()72 632.4 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(\))2.5 E F2(mo)2.5 E -.1(ve) -.1 G F1(addr)2.6 E F0(abbr:)217.38 E F2(m)2.5 E F0(The)97 648 Q F1(mo) 2.908 E(ve)-.1 E F0 .408 (command repositions the speci\214ed lines to be after)2.908 F F1(addr) 2.908 E F0 5.408(.T)C .409(he \214rst of the mo)-5.408 F -.15(ve)-.15 G 2.909(dl).15 G .409(ines becomes the)-2.909 F(current line.)97 660 Q F2 (next)72 682.8 Q F0(abbr:)269.67 E F2(n)2.5 E F0(The ne)97 698.4 Q (xt \214le from the command line ar)-.15 E(gument list is edited.)-.18 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 337.2(USD:12-8 Ex)72 48 R(Reference Manual)2.5 E /F1 10/Times-Bold@0 SF(n!)72 84 Q F0 .419(The v)97 99.6 R .419 (ariant suppresses w)-.25 F .419 (arnings about the modi\214cations to the b)-.1 F(uf)-.2 E .419 (fer not ha)-.25 F .418(ving been written out, discarding)-.2 F (\(irretrie)97 111.6 Q -.25(va)-.25 G(bly\) an).25 E 2.5(yc)-.15 G (hanges which may ha)-2.5 E .3 -.15(ve b)-.2 H(een made.).15 E F1(n)72 134.4 Q/F2 10/Times-Italic@0 SF(\214lelist)2.5 E F1 2.5(n+)72 146.4 S F2 (command \214lelist)-2.5 E F0 .958(The speci\214ed)97 162 R F2 (\214lelist)3.458 E F0 .959(is e)3.459 F .959 (xpanded and the resulting list replaces the current ar)-.15 F .959 (gument list; the \214rst \214le in the)-.18 F(ne)97 174 Q 3.214(wl)-.25 G .714(ist is then edited.)-3.214 F(If)5.714 E F2(command)3.214 E F0 .714(is gi)3.214 F -.15(ve)-.25 G 3.214(n\().15 G .714 (it must contain no spaces\), then it is e)-3.214 F -.15(xe)-.15 G .714 (cuted after editing the).15 F(\214rst such \214le.)97 186 Q(\()72 208.8 Q F1(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(number)2.5 E F2 (count \215a)2.5 E(gs)-.1 E F0(abbr:)181.44 E F1(#)2.5 E F0(or)2.5 E F1 (nu)2.5 E F0(Prints each speci\214ed line preceded by its b)97 224.4 Q (uf)-.2 E(fer line number)-.25 E 5(.T)-.55 G (he current line is left at the last line printed.)-5 E(\()72 247.2 Q F1 (.)2.5 E F0(\))2.5 E F1(open)2.5 E F2<8d61>2.5 E(gs)-.1 E F0(abbr:) 229.49 E F1(o)2.5 E F0(\()72 259.2 Q F1(.)2.5 E F0(\))2.5 E F1(open)2.5 E F0(/)2.5 E F2(pat)A F0(/)1.666 E F2<8d61>2.5 E(gs)-.1 E F0 .65 (Enters intraline editing)97 274.8 R F2(open)3.15 E F0 .65 (mode at each addressed line.)3.15 F(If)5.65 E F2(pat)3.151 E F0 .651 (is gi)3.151 F -.15(ve)-.25 G .651 (n, then the cursor will be placed ini-).15 F .535(tially at the be)97 286.8 R .535(ginning of the string matched by the pattern.)-.15 F 2.134 -.8(To e)5.534 H .534(xit this mode use Q.).65 F(See)5.534 E F2 .534 (An Intr)3.034 F .534(oduction to)-.45 F(Display Editing with V)97 298.8 Q(i)-.74 E F0(for more details.)2.5 E F1(pr)72 321.6 Q(eser)-.18 E -.1 (ve)-.1 G F0 1.065(The current editor b)97 337.2 R(uf)-.2 E 1.065 (fer is sa)-.25 F -.15(ve)-.2 G 3.566(da).15 G 3.566(st)-3.566 G 1.066 (hough the system had just crashed.)-3.566 F 1.066 (This command is for use only in)6.066 F(emer)97 349.2 Q 1.371 (gencies when a)-.18 F F2(write)3.871 E F0 1.371 (command has resulted in an error and you don')3.871 F 3.87(tk)-.18 G (no)-3.87 E 3.87(wh)-.25 G 1.87 -.25(ow t)-3.87 H 3.87(os).25 G -2.25 -.2(av e)-3.87 H 1.37(your w)4.07 F(ork.)-.1 E(After a)97 361.2 Q F2(pr) 2.5 E(eserve)-.37 E F0(you should seek help.)2.5 E(\()72 384 Q F1(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(print)1.666 E F2(count)2.5 E F0 (abbr:)215.784 E F1(p)2.5 E F0(or)2.5 E F1(P)2.5 E F0 .743(Prints the s\ peci\214ed lines with non-printing characters printed as control charac\ ters `^)97 399.6 R F2(x)A F0 .743('; delete \(octal 177\) is)1.666 F (represented as `^?'.)97 411.6 Q (The current line is left at the last line printed.)5 E(\()72 434.4 Q F1 (.)2.5 E F0(\))2.5 E F1(put)1.666 E F2 -.2(bu)2.5 G -.18(ff).2 G(er).18 E F0(abbr:)231.714 E F1(pu)2.5 E F0 .397(Puts back pre)97 450 R(viously) -.25 E F2(deleted)2.897 E F0(or)2.897 E F2(yank)2.897 E(ed)-.1 E F0 2.897(lines. Normally)2.897 F .396(used with)2.897 F F2(delete)2.896 E F0 .396(to ef)2.896 F .396(fect mo)-.25 F -.15(ve)-.15 G .396 (ment of lines, or with).15 F F2(yank)97 462 Q F0 .749(to ef)3.249 F .749(fect duplication of lines.)-.25 F .749(If no)5.749 F F2 -.2(bu) 3.249 G -.18(ff).2 G(er).18 E F0 .749(is speci\214ed, then the last) 3.249 F F2(deleted)3.249 E F0(or)3.249 E F2(yank)3.249 E(ed)-.1 E F0(te) 3.249 E .749(xt is restored.*)-.15 F(By using a named b)97 474 Q(uf)-.2 E(fer)-.25 E 2.5(,t)-.4 G -.15(ex)-2.5 G 2.5(tm).15 G (ay be restored that w)-2.5 E(as sa)-.1 E -.15(ve)-.2 G 2.5(dt).15 G (here at an)-2.5 E 2.5(yp)-.15 G(re)-2.5 E(vious time.)-.25 E F1(quit)72 496.8 Q F0(abbr:)270.77 E F1(q)2.5 E F0(Causes)97 512.4 Q F2 -.2(ex)3.26 G F0 .76(to terminate.)3.46 F .76(No automatic write of the editor b) 5.76 F(uf)-.2 E .76(fer to a \214le is performed.)-.25 F(Ho)5.76 E(we) -.25 E -.15(ve)-.25 G -.4(r,).15 G F2 -.2(ex)3.66 G F0 .76(issues a)3.46 F -.1(wa)97 524.4 S .794 (rning message if the \214le has changed since the last).1 F F2(write) 3.294 E F0 .794(command w)3.294 F .794(as issued, and does not)-.1 F F2 (quit.\207)3.293 E F0(Nor)5.793 E(-)-.2 E(mally)97 536.4 Q 2.568(,y)-.65 G .068(ou will wish to sa)-2.568 F .368 -.15(ve y)-.2 H .068 (our changes, and you should gi).15 F .369 -.15(ve a)-.25 H F2(write) 2.719 E F0 .069(command; if you wish to discard them,)2.569 F(use the)97 548.4 Q F1(q!)2.5 E F0(command v)2.5 E(ariant.)-.25 E F1(q!)72 571.2 Q F0(Quits from the editor)97 586.8 Q 2.5(,d)-.4 G (iscarding changes to the b)-2.5 E(uf)-.2 E(fer without complaint.)-.25 E(\()72 609.6 Q F1(.)2.5 E F0(\))2.5 E F1 -.18(re)2.5 G(ad).18 E F2 (\214le)2.5 E F0(abbr:)237.36 E F1(r)2.5 E F0 .791(Places a cop)97 625.2 R 3.291(yo)-.1 G 3.291(ft)-3.291 G .791(he te)-3.291 F .791 (xt of the gi)-.15 F -.15(ve)-.25 G 3.291<6e8c>.15 G .79 (le in the editing b)-3.291 F(uf)-.2 E .79 (fer after the speci\214ed line.)-.25 F .79(If no)5.79 F F2(\214le)3.29 E F0 .79(is gi)3.29 F -.15(ve)-.25 G 3.29(nt).15 G(he)-3.29 E .071 (current \214le name is used.)97 637.2 R .071(The current \214le name i\ s not changed unless there is none in which case)5.071 F F2(\214le)2.571 E F0(becomes)2.571 E .196(the current name.)97 649.2 R .196 (The sensibility restrictions for the)5.196 F F2(edit)2.696 E F0 .195 (command apply here also.)2.696 F .195(If the \214le b)5.195 F(uf)-.2 E .195(fer is empty)-.25 F(and there is no current name then)97 661.2 Q F2 -.2(ex)2.5 G F0(treats this as an)2.7 E F2(edit)2.5 E F0(command.)2.5 E .637(Address `0' is le)97 676.8 R -.05(ga)-.15 G 3.137(lf).05 G .637 (or this command and causes the \214le to be read at the be)-3.137 F .638(ginning of the b)-.15 F(uf)-.2 E(fer)-.25 E 5.638(.S)-.55 G (tatistics)-5.638 E .501(are gi)97 688.8 R -.15(ve)-.25 G 3.001(na).15 G 3.001(sf)-3.001 G .501(or the)-3.001 F F2(edit)3.001 E F0 .501 (command when the)3.001 F F2 -.37(re)3.001 G(ad).37 E F0 .5 (successfully terminates.)3.001 F .5(After a)5.5 F F2 -.37(re)3 G(ad).37 E F0 .5(the current line is the)3 F .32 LW 144 696.8 72 696.8 DL/F3 8 /Times-Roman@0 SF 2.841(*B)72 706.8 S .841 (ut no modifying commands may interv)-2.841 F .841(ene between the)-.12 F/F4 8/Times-Italic@0 SF(delete)2.841 E F3(or)2.841 E F4(yank)2.841 E F3 .841(and the)2.841 F F4(put,)2.841 E F3 .842(nor may lines be mo)2.841 F -.12(ve)-.12 G 2.842(db).12 G .842(etween \214les without using a)-2.842 F(named b)72 716.8 Q(uf)-.16 E(fer)-.2 E(.)-.44 E<87>72 728.6 Q F4(Ex)2 E F3(will also issue a diagnostic if there are more \214les in the ar)2 E(gument list.)-.144 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-9)339.7 E (last line read.\210)97 84 Q(\()72 106.8 Q/F1 10/Times-Bold@0 SF(.)2.5 E F0(\))2.5 E F1 -.18(re)2.5 G 2.5(ad !).18 F/F2 10/Times-Italic@0 SF (command)A F0 .417(Reads the output of the command)97 122.4 R F2 (command)2.917 E F0 .417(into the b)2.917 F(uf)-.2 E .417 (fer after the speci\214ed line.)-.25 F .418(This is not a v)5.418 F .418(ariant form)-.25 F 1.17(of the command, rather a read specifying a) 97 134.4 R F2(command)3.67 E F0 1.17(rather than a)3.67 F F2 (\214lename;)3.67 E F0 3.67(ab)3.67 G 1.17(lank or tab before the)-3.67 F F1(!)3.67 E F0(is)3.67 E(mandatory)97 146.4 Q(.)-.65 E F1 -.18(re)72 169.2 S(co).18 E -.1(ve)-.1 G(r).1 E F2(\214le)2.5 E F0(Reco)97 184.8 Q -.15(ve)-.15 G(rs).15 E F2(\214le)3.079 E F0 .579(from the system sa) 3.079 F .879 -.15(ve a)-.2 H 3.079(rea. Used).15 F .58 (after a accidental hangup of the phone** or a system crash**)3.079 F (or)97 196.8 Q F2(pr)2.5 E(eserve)-.37 E F0 2.5(command. Except)2.5 F (when you use)2.5 E F2(pr)2.5 E(eserve)-.37 E F0 (you will be noti\214ed by mail when a \214le is sa)2.5 E -.15(ve)-.2 G (d.).15 E F1 -.18(re)72 219.6 S(wind).18 E F0(abbr:)258.18 E F1 -.18(re) 2.5 G(w).18 E F0(The ar)97 235.2 Q(gument list is re)-.18 E -.1(wo)-.25 G(und, and the \214rst \214le in the list is edited.).1 E F1 -.18(re)72 258 S(w!).18 E F0(Re)97 273.6 Q(winds the ar)-.25 E (gument list discarding an)-.18 E 2.5(yc)-.15 G (hanges made to the current b)-2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1 (set)72 296.4 Q F2(par)2.5 E(ameter)-.15 E F0 -.4(Wi)97 312 S .476 (th no ar).4 F .476(guments, prints those options whose v)-.18 F .475 (alues ha)-.25 F .775 -.15(ve b)-.2 H .475(een changed from their def) .15 F .475(aults; with parameter)-.1 F F2(all)97 324 Q F0 (it prints all of the option v)2.5 E(alues.)-.25 E(Gi)97 339.6 Q 1.233 (ving an option name follo)-.25 F 1.233(wed by a `?')-.25 F 1.233 (causes the current v)6.233 F 1.233(alue of that option to be printed.) -.25 F 1.233(The `?' is)6.233 F 1.185 (unnecessary unless the option is Boolean v)97 351.6 R 3.685 (alued. Boolean)-.25 F 1.185(options are gi)3.685 F -.15(ve)-.25 G 3.685 (nv).15 G 1.185(alues either by the form `set)-3.935 F F2(option)97 363.6 Q F0 2.525('t)C 2.525(ot)-2.525 G .025(urn them on or `set no) -2.525 F F2(option)A F0 2.525('t)C 2.525(ot)-2.525 G .025(urn them of) -2.525 F .026(f; string and numeric options are assigned via the form) -.25 F(`set)97 375.6 Q F2(option)2.5 E F0(=v)A(alue'.)-.25 E (More than one parameter may be gi)97 391.2 Q -.15(ve)-.25 G 2.5(nt).15 G(o)-2.5 E F2(set)2.5 E F0 2.5(;t)1.666 G(he)-2.5 E 2.5(ya)-.15 G (re interpreted left-to-right.)-2.5 E F1(shell)72 414 Q F0(abbr:)268.55 E F1(sh)2.5 E F0 2.5(An)97 429.6 S .5 -.25(ew s)-2.5 H(hell is created.) .25 E(When it terminates, editing resumes.)5 E F1(sour)72 452.4 Q(ce) -.18 E F2(\214le)2.5 E F0(abbr:)245.69 E F1(so)2.5 E F0(Reads and e)97 468 Q -.15(xe)-.15 G(cutes commands from the speci\214ed \214le.).15 E F2(Sour)5 E(ce)-.37 E F0(commands may be nested.)2.5 E(\()72 490.8 Q F1 (.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(substitute)2.5 E F0(/)2.5 E F2(pat)A F0(/)1.666 E F2 -.37(re)C(pl).37 E F0(/)1.666 E F2 (options count \215a)2.5 E(gs)-.1 E F0(abbr:)99.018 E F1(s)2.5 E F0 .701 (On each speci\214ed line, the \214rst instance of pattern)97 506.4 R F2 (pat)3.201 E F0 .701(is replaced by replacement pattern)3.201 F F2 -.37 (re)3.201 G(pl.).37 E F0 .701(If the)5.701 F F2(global)3.201 E F0 .281(\ indicator option character `g' appears, then all instances are substitu\ ted; if the)97 518.4 R F2(con\214rm)2.782 E F0 .282 (indication character `c')2.782 F 1.746(appears, then before each subst\ itution the line to be substituted is typed with the string to be subst\ ituted)97 530.4 R(mark)97 542.4 Q .421(ed with `)-.1 F/F3 10/Symbol SF A F0 2.921('c)C 2.921(haracters. By)-2.921 F .421 (typing an `y' one can cause the substitution to be performed, an)2.921 F 2.922(yo)-.15 G .422(ther input)-2.922 F(causes no change to tak)97 554.4 Q 2.5(ep)-.1 G 2.5(lace. After)-2.5 F(a)2.5 E F2(substitute)2.5 E F0(the current line is the last line substituted.)2.5 E .126 (Lines may be split by substituting ne)97 570 R .126 (w-line characters into them.)-.25 F .125(The ne)5.126 F .125(wline in) -.25 F F2 -.37(re)2.625 G(pl).37 E F0 .125(must be escaped by pre-)2.625 F(ceding it with a `\\'.)97 582 Q(Other metacharacters a)5 E -.25(va)-.2 G(ilable in).25 E F2(pat)2.5 E F0(and)2.5 E F2 -.37(re)2.5 G(pl).37 E F0 (are described belo)2.5 E -.65(w.)-.25 G F1(stop)72 604.8 Q F0 .295 (Suspends the editor)97 620.4 R 2.795(,r)-.4 G .295 (eturning control to the top le)-2.795 F -.15(ve)-.25 G 2.796(ls).15 G 2.796(hell. If)-2.796 F F2(autowrite)2.796 E F0 .296 (is set and there are unsa)2.796 F -.15(ve)-.2 G 2.796(dc).15 G(hanges,) -2.796 E 3.094(aw)97 632.4 S .593(rite is done \214rst unless the form) -3.094 F F1(stop)3.093 E F0 5.593(!i)C 3.093(su)-5.593 G 3.093 (sed. This)-3.093 F .593(commands is only a)3.093 F -.25(va)-.2 G .593 (ilable where supported by the).25 F(teletype dri)97 644.4 Q -.15(ve) -.25 G 2.5(ra).15 G(nd operating system.)-2.5 E .32 LW 144 698.2 72 698.2 DL/F4 8/Times-Roman@0 SF 2<8857>72 708.2 S(ithin)-2.32 E/F5 8 /Times-Italic@0 SF(open)2 E F4(and)2 E F5(visual)2 E F4 (the current line is set to the \214rst line read rather than the last.) 2 E(** The system sa)72 720 Q -.12(ve)-.16 G 2(sac).12 G(op)-2 E 2(yo) -.08 G 2(ft)-2 G(he \214le you were editing only if you ha)-2 E .24 -.12 (ve m)-.16 H(ade changes to the \214le.).12 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 332.2(USD:12-10 Ex)72 48 R(Reference Manual)2.5 E(\()72 84 Q/F1 10/Times-Bold@0 SF(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\)) 2.5 E F1(substitute)2.5 E/F2 10/Times-Italic@0 SF(options count \215a) 2.5 E(gs)-.1 E F0(abbr:)141.71 E F1(s)2.5 E F0(If)97 99.6 Q F2(pat)2.5 E F0(and)2.5 E F2 -.37(re)2.5 G(pl).37 E F0 (are omitted, then the last substitution is repeated.)2.5 E (This is a synon)5 E(ym for the)-.15 E F1(&)2.5 E F0(command.)2.5 E(\() 72 122.4 Q F1(.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(t)2.5 E F2 (addr \215a)2.5 E(gs)-.1 E F0(The)97 138 Q F2(t)2.5 E F0 (command is a synon)2.5 E(ym for)-.15 E F2(copy)2.5 E F0(.)A F1(ta)72 160.8 Q F2(ta)2.5 E(g)-.1 E F0 .431 (The focus of editing switches to the location of)97 176.4 R F2(ta)2.931 E -.1(g,)-.1 G F0 .431(switching to a dif)3.031 F .432 (ferent line in the current \214le where it is)-.25 F (de\214ned, or if necessary to another \214le.\210)97 188.4 Q 1.2 (The tags \214le is normally created by a program such as)97 204 R F2 (cta)3.7 E(gs,)-.1 E F0 1.2 (and consists of a number of lines with three)3.7 F .932 (\214elds separated by blanks or tabs.)97 216 R .932 (The \214rst \214eld gi)5.932 F -.15(ve)-.25 G 3.432(st).15 G .932 (he name of the tag, the second the name of the \214le)-3.432 F .535 (where the tag resides, and the third gi)97 228 R -.15(ve)-.25 G 3.036 (sa).15 G 3.036(na)-3.036 G .536 (ddressing form which can be used by the editor to \214nd the tag;) -3.036 F .465(this \214eld is usually a conte)97 240 R .465 (xtual scan using `/)-.15 F F2(pat)A F0 .464 (/' to be immune to minor changes in the \214le.)B .464(Such scans are) 5.464 F(al)97 252 Q -.1(wa)-.1 G(ys performed as if).1 E F2(noma)2.5 E (gic)-.1 E F0 -.1(wa)2.5 G 2.5(ss).1 G(et.)-2.5 E (The tag names in the tags \214le must be sorted alphabetically)97 267.6 Q(.)-.65 E F1(unab)72 290.4 Q(br)-.1 E -.15(ev)-.18 G(iate).15 E F2(wor) 2.5 E(d)-.37 E F0(abbr:)209.07 E F1(una)2.5 E F0(Delete)97 306 Q F2(wor) 2.5 E(d)-.37 E F0(from the list of abbre)2.5 E(viations.)-.25 E F1(undo) 72 328.8 Q F0(abbr:)266.32 E F1(u)2.5 E F0(Re)97 344.4 Q -.15(ve)-.25 G .404(rses the changes made in the b).15 F(uf)-.2 E .405 (fer by the last b)-.25 F(uf)-.2 E .405(fer editing command.)-.25 F .405 (Note that)5.405 F F2(global)2.905 E F0 .405(commands are)2.905 F .063 (considered a single command for the purpose of)97 356.4 R F2(undo)2.563 E F0 .063(\(as are)2.563 F F2(open)2.563 E F0(and)2.563 E F2(visual.\)) 2.563 E F0 .062(Also, the commands)5.063 F F2(write)2.562 E F0(and)2.562 E F2(edit)97 368.4 Q F0 (which interact with the \214le system cannot be undone.)2.5 E F2(Undo)5 E F0(is its o)2.5 E(wn in)-.25 E -.15(ve)-.4 G(rse.).15 E F2(Undo)97 384 Q F0(al)2.773 E -.1(wa)-.1 G .273(ys marks the pre).1 F .273(vious v) -.25 F .273(alue of the current line `)-.25 F F1(.)A F0 5.273('a)C 2.773 (s`)-5.273 G 2.773(\264\264'. After)-2.773 F(an)2.773 E F2(undo)2.774 E F0 .274(the current line is the \214rst)2.774 F .184(line restored or t\ he line before the \214rst line deleted if no lines were restored.)97 396 R -.15(Fo)5.184 G 2.684(rc).15 G .184(ommands with more global) -2.684 F(ef)97 408 Q(fect such as)-.25 E F2(global)2.5 E F0(and)2.5 E F2 (visual)2.5 E F0(the current line re)2.5 E -.05(ga)-.15 G(ins it').05 E 2.5(sp)-.55 G(re-command v)-2.5 E(alue after an)-.25 E F2(undo.)2.5 E F1 (unmap)72 430.8 Q F2(lhs)2.5 E F0(The macro e)97 446.4 Q (xpansion associated by)-.15 E F2(map)2.5 E F0(for)2.5 E F2(lhs)2.5 E F0 (is remo)2.5 E -.15(ve)-.15 G(d.).15 E 2.5(\(1,$\))72 469.2 S F1(v)A F0 (/)2.5 E F2(pat)A F0(/)1.666 E F2(cmds)2.5 E F0 2.738(As)97 484.8 S (ynon)-2.738 E .238(ym for the)-.15 F F2(global)2.738 E F0 .238 (command v)2.738 F(ariant)-.25 E F1(g!)2.738 E F0 2.738(,r)C .238 (unning the speci\214ed)-2.738 F F2(cmds)2.738 E F0 .239 (on each line which does not match)2.738 F F2(pat)97 496.8 Q F0(.)A F1 -.1(ve)72 519.6 S(rsion).1 E F0(abbr:)256.99 E F1 -.1(ve)2.5 G F0 (Prints the current v)97 535.2 Q (ersion number of the editor as well as the date the editor w)-.15 E (as last changed.)-.1 E(\()72 558 Q F1(.)2.5 E F0(\))2.5 E F1(visual)2.5 E F2(type count \215a)2.5 E(gs)-.1 E F0(abbr:)181.16 E F1(vi)2.5 E F0 .552(Enters visual mode at the speci\214ed line.)97 573.6 R F2 -.74(Ty) 5.552 G(pe).74 E F0 .551(is optional and may be `\255' , `)3.051 F/F3 10 /Symbol SFA F0 3.051('o)C 3.051(r`)-3.051 G F1(.)-3.051 E F0 5.551 ('a)C 3.051(si)-5.551 G 3.051(nt)-3.051 G(he)-3.051 E F2(z)3.051 E F0 .551(command to)3.051 F .824 (specify the placement of the speci\214ed line on the screen.)97 585.6 R .824(By def)5.824 F .824(ault, if)-.1 F F2(type)3.324 E F0 .825 (is omitted, the speci\214ed line is)3.324 F .108 (placed as the \214rst on the screen.)97 597.6 R(A)5.108 E F2(count) 2.608 E F0 .108(speci\214es an initial windo)2.608 F 2.608(ws)-.25 G .108(ize; the def)-2.608 F .108(ault is the v)-.1 F .108 (alue of the option)-.25 F F2(window)97 609.6 Q(.)-.74 E F0 .999 (See the document)5.999 F F2 .999(An Intr)3.499 F .999 (oduction to Display Editing with V)-.45 F(i)-.74 E F0 1 (for more details.)3.5 F 2.6 -.8(To e)6 H 1(xit this mode,).65 F (type Q.)97 621.6 Q F1(visual)72 644.4 Q F0(\214le)2.5 E F1(visual)72 656.4 Q F0(+)2.5 E F2(n)A F0(\214le)2.5 E (From visual mode, this command is the same as edit.)97 672 Q .32 LW 144 700 72 700 DL/F4 8/Times-Roman@0 SF 2.403<8849>72 710 S 2.403(fy)-2.403 G .403(ou ha)-2.403 F .643 -.12(ve m)-.16 H .403 (odi\214ed the current \214le before gi).12 F .403(ving a)-.2 F/F5 8 /Times-Italic@0 SF(ta)2.403 E(g)-.08 E F4 .402 (command, you must write it out; gi)2.403 F .402(ving another)-.2 F F5 (ta)2.402 E(g)-.08 E F4 .402(command, specifying no)2.402 F F5(ta)2.402 E(g)-.08 E F4(will)2.402 E(reuse the pre)72 720 Q(vious tag.)-.2 E EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-11)334.7 E 2.5(\(1,$\))72 84 S/F1 10/Times-Bold@0 SF(write)A/F2 10/Times-Italic@0 SF(\214le)2.5 E F0(abbr:)219.41 E F1(w)2.5 E F0 .05 (Writes changes made back to)97 99.6 R F2(\214le)2.55 E F0 2.55(,p)C .05 (rinting the number of lines and characters written.)-2.55 F(Normally) 5.05 E F2(\214le)2.55 E F0 .05(is omitted)2.55 F .582(and the te)97 111.6 R .582(xt goes back where it came from.)-.15 F .581(If a)5.581 F F2(\214le)3.081 E F0 .581(is speci\214ed, then te)3.081 F .581 (xt will be written to that \214le.*)-.15 F .581(If the)5.581 F .307 (\214le does not e)97 123.6 R .307(xist it is created.)-.15 F .307(The \ current \214le name is changed only if there is no current \214le name;\ the cur)5.307 F(-)-.2 E(rent line is ne)97 135.6 Q -.15(ve)-.25 G 2.5 (rc).15 G(hanged.)-2.5 E .466 (If an error occurs while writing the current and)97 151.2 R F2(edited) 2.966 E F0 .466(\214le, the editor considers that there has been `)2.966 F .465(`No write)-.74 F(since last change')97 163.2 Q 2.5('e)-.74 G -.15 (ve)-2.75 G 2.5(ni).15 G 2.5(ft)-2.5 G(he b)-2.5 E(uf)-.2 E (fer had not pre)-.25 E(viously been modi\214ed.)-.25 E 2.5(\(1,$\))72 186 S F1(write>>)A F2(\214le)2.5 E F0(abbr:)208.01 E F1(w>>)2.5 E F0 (Writes the b)97 201.6 Q(uf)-.2 E(fer contents at the end of an e)-.25 E (xisting \214le.)-.15 E F1(w!)72 228 Q F2(name)2.5 E F0(Ov)97 243.6 Q (errides the checking of the normal)-.15 E F2(write)2.5 E F0 (command, and will write to an)2.5 E 2.5<798c>-.15 G (le which the system permits.)-2.5 E 2.5(\(1,$\))72 266.4 S F1 5(w!)C F2 (command)-5 E F0 1.225(Writes the speci\214ed lines into)97 282 R F2 (command.)3.725 E F0 1.225(Note the dif)6.225 F 1.225(ference between) -.25 F F1(w!)3.725 E F0 1.226(which o)3.726 F -.15(ve)-.15 G 1.226 (rrides checks and).15 F F1 5(w!)3.726 G F0(which writes to a command.) 97 294 Q F1(wq)72 316.8 Q F2(name)2.5 E F0(Lik)97 332.4 Q 2.5(ea)-.1 G F2(write)A F0(and then a)2.5 E F2(quit)2.5 E F0(command.)2.5 E F1(wq!)72 355.2 Q F2(name)2.5 E F0(The v)97 370.8 Q(ariant o)-.25 E -.15(ve)-.15 G (rrides checking on the sensibility of the).15 E F2(write)2.5 E F0 (command, as)2.5 E F1(w!)2.5 E F0(does.)2.5 E F1(xit)72 393.6 Q F2(name) 2.5 E F0(If an)97 409.2 Q 2.5(yc)-.15 G(hanges ha)-2.5 E .3 -.15(ve b) -.2 H(een made and not written, writes the b).15 E(uf)-.2 E(fer out.) -.25 E(Then, in an)5 E 2.5(yc)-.15 G(ase, quits.)-2.5 E(\()72 432 Q F1 (.)2.5 E F0(,)2.5 E F1(.)2.5 E F0(\))2.5 E F1(yank)1.666 E F2 -.2(bu)2.5 G -.18(ff).2 G(er count).18 E F0(abbr:)190.324 E F1(ya)2.5 E F0 1.066 (Places the speci\214ed lines in the named)97 447.6 R F2 -.2(bu)3.565 G -.18(ff).2 G(er).18 E(,)-1.11 E F0 1.065(for later retrie)3.565 F -.25 (va)-.25 G 3.565(lv).25 G(ia)-3.565 E F2(put.)3.565 E F0 1.065(If no b) 6.065 F(uf)-.2 E 1.065(fer name is speci\214ed, the)-.25 F (lines go to a more v)97 459.6 Q(olatile place; see the)-.2 E F2(put)2.5 E F0(command description.)2.5 E(\()72 482.4 Q F1(.+1)2.5 E F0(\))2.5 E F1(z)2.5 E F2(count)2.5 E F0(Print the ne)97 498 Q(xt)-.15 E F2(count) 2.5 E F0(lines, def)2.5 E(ault)-.1 E F2(window)2.5 E F0(.)A(\()72 520.8 Q F1(.)2.5 E F0(\))2.5 E F1(z)2.5 E F2(type count)2.5 E F0 .66 (Prints a windo)97 536.4 R 3.16(wo)-.25 G 3.16(ft)-3.16 G -.15(ex)-3.16 G 3.161(tw).15 G .661(ith the speci\214ed line at the top.)-3.161 F(If) 5.661 E F2(type)3.161 E F0 .661 (is `\255' the line is placed at the bottom; a `)3.161 F F1(.)A F0(')A .258(causes the line to be placed in the center)97 548.4 R 2.758(.* A) -.55 F .258(count gi)2.758 F -.15(ve)-.25 G 2.758(st).15 G .258 (he number of lines to be displayed rather than dou-)-2.758 F .788 (ble the number speci\214ed by the)97 560.4 R F2(scr)3.288 E(oll)-.45 E F0 3.288(option. On)3.288 F(a)3.288 E/F3 8/Times-Roman@0 SF(CR)3.288 E (T)-.48 E F0 .789(the screen is cleared before display be)3.288 F .789 (gins unless a)-.15 F(count which is less than the screen size is gi)97 572.4 Q -.15(ve)-.25 G 2.5(n. The).15 F (current line is left at the last line printed.)2.5 E F1(!)72 595.2 Q F2 (command)2.5 E F0 .413(The remainder of the line after the `!' characte\ r is sent to a shell to be e)97 610.8 R -.15(xe)-.15 G 2.913(cuted. W) .15 F .413(ithin the te)-.4 F .413(xt of)-.15 F F2(command)2.913 E F0 .755(the characters `%' and `#' are e)97 622.8 R .756(xpanded as in \ \214lenames and the character `!' is replaced with the te)-.15 F .756 (xt of the)-.15 F(pre)97 634.8 Q .724(vious command.)-.25 F .724 (Thus, in particular)5.724 F 3.224(,`)-.4 G .724 (!!' repeats the last such shell escape.)-3.224 F .723(If an)5.723 F 3.223(ys)-.15 G .723(uch e)-3.223 F .723(xpansion is per)-.15 F(-)-.2 E (formed, the e)97 646.8 Q(xpanded line will be echoed.)-.15 E (The current line is unchanged by this command.)5 E .32 LW 144 668.2 72 668.2 DL F3 2.144(*T)72 678.2 S .144 (he editor writes to a \214le only if it is the current \214le and is) -2.144 F/F4 8/Times-Italic@0 SF(edited)2.144 E F3 2.144(,i)C 2.144(ft) -2.144 G .144(he \214le does not e)-2.144 F .145 (xist, or if the \214le is actually a teletype,)-.12 F F4(/de)2.145 E (v/tty)-.12 E 2.145(,/)-.44 G(de)-2.145 E(v/null.)-.12 E F3 (Otherwise, you must gi)72 688.2 Q .24 -.12(ve t)-.2 H(he v).12 E (ariant form)-.2 E/F5 8/Times-Bold@0 SF(w!)2 E F3(to force the write.)2 E 2.376(*F)72 700 S .376(orms `z=' and `z)-2.496 F/F6 8/Symbol SFA F3 2.376('a)C .376(lso e)-2.376 F .376 (xist; `z=' places the current line in the center)-.12 F 2.376(,s)-.32 G .376(urrounds it with lines of `\255' characters and lea)-2.376 F -.12 (ve)-.16 G 2.375(st).12 G .375(he current line at)-2.375 F .396 (this line.)72 710 R .396(The form `z)4.396 F F6A F3 2.396('p)C .396 (rints the windo)-2.396 F 2.396(wb)-.2 G .397(efore `z\255' w)-2.396 F 2.397(ould. The)-.08 F .397(characters `+', `)2.397 F F6A F3 2.397 ('a)C .397(nd `\255' may be repeated for cumulati)-2.397 F .637 -.12 (ve e)-.2 H -.2(ff).12 G 2.397(ect. On).2 F(some)2.397 E(v2 editors, no) 72 720 Q F4(type)2 E F3(may be gi)2 E -.12(ve)-.2 G(n.).12 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 332.2(USD:12-12 Ex)72 48 R(Reference Manual)2.5 E .003(If there has been `)97 84 R(`[No write]')-.74 E 2.503('o)-.74 G 2.503(ft)-2.503 G .004(he b)-2.503 F(uf)-.2 E .004 (fer contents since the last change to the editing b)-.25 F(uf)-.2 E (fer)-.25 E 2.504(,t)-.4 G .004(hen a diagnos-)-2.504 F .695 (tic will be printed before the command is e)97 96 R -.15(xe)-.15 G .695 (cuted as a w).15 F 3.195(arning. A)-.1 F .694 (single `!' is printed when the command)3.195 F(completes.)97 108 Q(\() 72 130.8 Q/F1 10/Times-Italic@0 SF(addr)2.5 E F0(,)2.5 E F1(addr)2.5 E F0(\))2.5 E/F2 10/Times-Bold@0 SF(!)2.5 E F1(command)2.5 E F0 -.8(Ta)97 146.4 S -.1(ke).8 G 4.031(st).1 G 1.532 (he speci\214ed address range and supplies it as standard input to) -4.031 F F1(command;)4.032 E F0 1.532(the resulting output then)4.032 F (replaces the input lines.)97 158.4 Q 2.5(\($\))72 181.2 S F2(=)A F0 (Prints the line number of the addressed line.)97 196.8 Q (The current line is unchanged.)5 E(\()72 219.6 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(\))2.5 E F2(>)2.5 E F1(count \215a)2.5 E(gs)-.1 E F0(\()72 231.6 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(\))2.5 E F2(<)2.5 E F1 (count \215a)2.5 E(gs)-.1 E F0 .286 (Perform intelligent shifting on the speci\214ed lines;)97 247.2 R F2(<) 2.786 E F0 .286(shifts left and)2.786 F F2(>)2.786 E F0 .286 (shift right.)2.786 F .285(The quantity of shift is deter)5.286 F(-)-.2 E .329(mined by the)97 259.2 R F1(shiftwidth)2.829 E F0 .329 (option and the repetition of the speci\214cation character)2.829 F 5.33 (.O)-.55 G .33(nly white space \(blanks and)-5.33 F .95(tabs\) is shift\ ed; no non-white characters are discarded in a left-shift.)97 271.2 R .95(The current line becomes the last line)5.95 F (which changed due to the shifting.)97 283.2 Q F2(^D)72 306 Q F0 .425 (An end-of-\214le from a terminal input scrolls through the \214le.)97 321.6 R(The)5.426 E F1(scr)2.926 E(oll)-.45 E F0 .426 (option speci\214es the size of the scroll,)2.926 F (normally a half screen of te)97 333.6 Q(xt.)-.15 E(\()72 356.4 Q F2(.) 2.5 E F0(+1 ,)A F2(.)2.5 E F0(+1 \))A(\()72 368.4 Q F2(.)2.5 E F0(+1 ,)A F2(.)2.5 E F0(+1 \) |)A (An address alone causes the addressed lines to be printed.)97 384 Q 2.5 (Ab)5 G(lank line prints the ne)-2.5 E(xt line in the \214le.)-.15 E(\() 72 406.8 Q F2(.)2.5 E F0(,)2.5 E F2(.)2.5 E F0(\))2.5 E F2(&)2.5 E F1 (options count \215a)2.5 E(gs)-.1 E F0(Repeats the pre)97 422.4 Q(vious) -.25 E F1(substitute)2.5 E F0(command.)2.5 E(\()72 445.2 Q F2(.)2.5 E F0 (,)2.5 E F2(.)2.5 E F0(\))2.5 E/F3 12/Times-Bold@0 SF(~)2.5 E F1 (options count \215a)2.5 E(gs)-.1 E F0(Replaces the pre)97 460.8 Q (vious re)-.25 E(gular e)-.15 E(xpression with the pre)-.15 E (vious replacement pattern from a substitution.)-.25 E F2 2.5 (8. Regular)72 484.8 R(expr)2.5 E(essions and substitute r)-.18 E (eplacement patter)-.18 E(ns)-.15 E 2.5(8.1. Regular)72 508.8 R(expr)2.5 E(essions)-.18 E F0 3.863(Ar)97 524.4 S -.15(eg)-3.863 G 1.363(ular e) .15 F 1.363(xpression speci\214es a set of strings of characters.)-.15 F 3.863(Am)6.363 G 1.363(ember of this set of strings is said to be)-3.863 F F1(matc)72 536.4 Q(hed)-.15 E F0 .18(by the re)2.68 F .18(gular e)-.15 F(xpression.)-.15 E F1(Ex)5.181 E F0 .181(remembers tw)2.681 F 2.681(op) -.1 G(re)-2.681 E .181(vious re)-.25 F .181(gular e)-.15 F .181 (xpressions: the pre)-.15 F .181(vious re)-.25 F .181(gular e)-.15 F (xpression)-.15 E .49(used in a)72 548.4 R F1(substitute)2.99 E F0 .49 (command and the pre)2.99 F .489(vious re)-.25 F .489(gular e)-.15 F .489(xpression used else)-.15 F .489(where \(referred to as the pre)-.25 F(vious)-.25 E F1(scan-)2.989 E(ning)72 560.4 Q F0(re)2.5 E(gular e)-.15 E 2.5(xpression.\) The)-.15 F(pre)2.5 E(vious re)-.25 E(gular e)-.15 E (xpression can al)-.15 E -.1(wa)-.1 G(ys be referred to by a null).1 E F1 -.37(re)2.5 G F0 2.5(,e).37 G(.g. `//' or `??'.)-2.5 E F2 2.5 (8.2. Magic)72 584.4 R(and nomagic)2.5 E F0 1.242(The re)97 600 R 1.242 (gular e)-.15 F 1.242(xpressions allo)-.15 F 1.242(wed by)-.25 F F1 -.2 (ex)3.743 G F0 1.243(are constructed in one of tw)3.943 F 3.743(ow)-.1 G 1.243(ays depending on the setting of the)-3.843 F F1(ma)72 612 Q(gic) -.1 E F0 3.865(option. The)3.865 F F1 -.2(ex)3.865 G F0(and)4.065 E F1 (vi)3.865 E F0(def)3.865 E 1.365(ault setting of)-.1 F F1(ma)3.865 E (gic)-.1 E F0(gi)3.865 E -.15(ve)-.25 G 3.865(sq).15 G 1.365 (uick access to a po)-3.865 F 1.364(werful set of re)-.25 F 1.364 (gular e)-.15 F(xpression)-.15 E 2.862(metacharacters. The)72 624 R (disadv)2.862 E .362(antage of)-.25 F F1(ma)2.862 E(gic)-.1 E F0 .363 (is that the user must remember that these metacharacters are)2.862 F F1 (ma)2.863 E(gic)-.1 E F0(and)2.863 E .082 (precede them with the character `\\' to use them as `)72 636 R (`ordinary')-.74 E 2.582('c)-.74 G 2.582(haracters. W)-2.582 F(ith)-.4 E F1(noma)2.582 E(gic,)-.1 E F0 .082(the def)2.582 F .082(ault for)-.1 F F1(edit,)2.582 E F0(re)2.582 E(gular)-.15 E -.15(ex)72 648 S .753 (pressions are much simpler).15 F 3.253(,t)-.4 G .754 (here being only tw)-3.253 F 3.254(om)-.1 G 3.254(etacharacters. The) -3.254 F(po)3.254 E .754(wer of the other metacharacters is still)-.25 F -.2(av)72 660 S(ailable by preceding the \(no)-.05 E (w\) ordinary character with a `\\'.)-.25 E(Note that `\\' is thus al)5 E -.1(wa)-.1 G(ys a metacharacter).1 E(.)-.55 E (The remainder of the discussion of re)97 675.6 Q(gular e)-.15 E (xpressions assumes that that the setting of this option is)-.15 E F1 (ma)2.5 E(gic.\207)-.1 E .32 LW 144 690 72 690 DL/F4 8/Times-Roman@0 SF 2.063<8754>72 700 S 2.063(od)-2.703 G .063(iscern what is true with) -2.063 F/F5 8/Times-Italic@0 SF(noma)2.063 E(gic)-.08 E F4 .063(it suf) 2.063 F .063(\214ces to remember that the only special characters in th\ is case will be `)-.2 F/F6 8/Symbol SFA F4 2.062('a)C 2.062(tt) -2.062 G .062(he be)-2.062 F .062(ginning of a re)-.12 F(gular)-.12 E -.12(ex)72 710 S .212(pression, `$' at the end of a re).12 F .213 (gular e)-.12 F .213(xpression, and `\\'.)-.12 F -.32(Wi)4.213 G(th).32 E F5(noma)2.213 E(gic)-.08 E F4 .213(the characters `)2.213 F F0(~)A F4 2.213('a)C .213(nd `&' also lose their special meanings related to the) -2.213 F(replacement pattern of a substitute.)72 720 Q EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-13)334.7 E/F1 10/Times-Bold@0 SF 2.5(8.3. Basic)72 84 R -.18(re)2.5 G(gular expr).18 E (ession summary)-.18 E F0(The follo)97 99.6 Q (wing basic constructs are used to construct)-.25 E/F2 10/Times-Italic@0 SF(ma)2.5 E(gic)-.1 E F0(mode re)2.5 E(gular e)-.15 E(xpressions.)-.15 E F2 -.15(ch)72 115.2 S(ar).15 E F0 .36 (An ordinary character matches itself.)56.82 F .36(The characters `)5.36 F/F3 10/Symbol SFA F0 2.86('a)C 2.86(tt)-2.86 G .36(he be)-2.86 F .36(ginning of a line, `$' at the end)-.15 F .335(of line, `*' as an)147 127.2 R 2.835(yc)-.15 G .335(haracter other than the \214rst, `.)-2.835 F .336(', `\\', `[', and `)-.7 F/F4 12/Times-Roman@0 SF(~)A F0 2.836('a) C .336(re not ordinary characters and)-2.836 F (must be escaped \(preceded\) by `\\' to be treated as such.)147 139.2 Q F3 -6.02872 154.8 S F0(At the be)74.996 E (ginning of a pattern forces the match to succeed only at the be)-.15 E (ginning of a line.)-.15 E F1($)72 170.4 Q F0(At the end of a re)70 E (gular e)-.15 E (xpression forces the match to succeed only at the end of the line.)-.15 E F1(.)72 186 Q F0(Matches an)72.5 E 2.5(ys)-.15 G(ingle character e) -2.5 E(xcept the ne)-.15 E(w-line character)-.25 E(.)-.55 E F1(\\<)72 201.6 Q F0 -.15(Fo)66.52 G .635(rces the match to occur only at the be) .15 F .634(ginning of a `)-.15 F(`v)-.74 E(ariable')-.25 E 3.134('o)-.74 G 3.134(r`)-3.134 G(`w)-3.874 E(ord')-.1 E .634 ('; that is, either at the)-.74 F(be)147 213.6 Q .031 (ginning of a line, or just before a letter)-.15 F 2.531(,d)-.4 G .031 (igit, or underline and after a character not one of these.)-2.531 F F1 (\\>)72 229.2 Q F0 .475(Similar to `\\<', b)66.52 F .474 (ut matching the end of a `)-.2 F(`v)-.74 E(ariable')-.25 E 2.974('o) -.74 G 2.974(r`)-2.974 G(`w)-3.714 E(ord')-.1 E .474 (', i.e. either the end of the line or)-.74 F (before character which is neither a letter)147 241.2 Q 2.5(,n)-.4 G (or a digit, nor the underline character)-2.5 E(.)-.55 E F1([)72 256.8 Q F2(string)A F0 45(]M)C 1.351(atches an)-45 F 3.851(y\()-.15 G 1.351 (single\) character in the class de\214ned by)-3.851 F F2(string)3.852 E (.)-.15 E F0 1.352(Most characters in)6.352 F F2(string)3.852 E F0 (de\214ne)3.852 E(themselv)147 268.8 Q 3.026(es. A)-.15 F .526 (pair of characters separated by `\255' in)3.026 F F2(string)3.025 E F0 .525(de\214nes the set of characters collating)3.025 F .761 (between the speci\214ed lo)147 280.8 R .761 (wer and upper bounds, thus `[a\255z]' as a re)-.25 F .762(gular e)-.15 F .762(xpression matches an)-.15 F(y)-.15 E .192(\(single\) lo)147 292.8 R(wer)-.25 E .192(-case letter)-.2 F 5.192(.I)-.55 G 2.692(ft)-5.192 G .191(he \214rst character of)-2.692 F F2(string)2.691 E F0 .191(is an `) 2.691 F F3A F0 2.691('t)C .191(hen the construct matches those) -2.691 F .926(characters which it otherwise w)147 304.8 R .926 (ould not; thus `[)-.1 F F3A F0 .926(a\255z]' matches an)B .926 (ything b)-.15 F .926(ut a lo)-.2 F(wer)-.25 E .927(-case letter)-.2 F .096(\(and of course a ne)147 316.8 R 2.596(wline\). T)-.25 F 2.595(op) -.8 G .095(lace an)-2.595 F 2.595(yo)-.15 G 2.595(ft)-2.595 G .095 (he characters `)-2.595 F F3A F0 .095(', `[', or `\255' in)B F2 (string)2.595 E F0 .095(you must escape)2.595 F (them with a preceding `\\'.)147 328.8 Q F1 2.5(8.4. Combining)72 352.8 R -.18(re)2.5 G(gular expr).18 E(ession primiti)-.18 E -.1(ve)-.1 G(s).1 E F0 1.842(The concatenation of tw)97 368.4 R 4.342(or)-.1 G -.15(eg) -4.342 G 1.842(ular e).15 F 1.843 (xpressions matches the leftmost and then longest string which can be) -.15 F(di)72 380.4 Q .426 (vided with the \214rst piece matching the \214rst re)-.25 F .426 (gular e)-.15 F .425 (xpression and the second piece matching the second.)-.15 F(An)5.425 E 2.925(yo)-.15 G(f)-2.925 E .25(the \(single character matching\) re)72 392.4 R .25(gular e)-.15 F .25(xpressions mentioned abo)-.15 F .55 -.15 (ve m)-.15 H .25(ay be follo).15 F .25 (wed by the character `*' to form a)-.25 F(re)72 404.4 Q .924(gular e) -.15 F .924(xpression which matches an)-.15 F 3.424(yn)-.15 G .924(umbe\ r of adjacent occurrences \(including 0\) of characters matched by the) -3.424 F(re)72 416.4 Q(gular e)-.15 E(xpression it follo)-.15 E(ws.)-.25 E 1.053(The character `)97 432 R F4(~)A F0 3.553('m)C 1.053 (ay be used in a re)-3.553 F 1.053(gular e)-.15 F 1.053 (xpression, and matches the te)-.15 F 1.054 (xt which de\214ned the replacement)-.15 F .374(part of the last)72 444 R F2(substitute)2.874 E F0 2.874(command. A)2.874 F(re)2.874 E .374 (gular e)-.15 F .374 (xpression may be enclosed between the sequences `\\\(' and `\\\)' with) -.15 F(side ef)72 456 Q(fects in the)-.25 E F2(substitute)2.5 E F0 (replacement patterns.)2.5 E F1 2.5(8.5. Substitute)72 480 R -.18(re)2.5 G(placement patter).18 E(ns)-.15 E F0 1.03(The basic metacharacters for\ the replacement pattern are `&' and `~'; these are gi)97 495.6 R -.15 (ve)-.25 G 3.531(na).15 G 3.531(s`)-3.531 G 1.031(\\&' and `\\~' when) -3.531 F F2(noma)72 507.6 Q(gic)-.1 E F0 1.629(is set.)4.129 F 1.628 (Each instance of `&' is replaced by the characters which the re)6.629 F 1.628(gular e)-.15 F 1.628(xpression matched.)-.15 F(The)6.628 E(metach\ aracter `~' stands, in the replacement pattern, for the de\214ning te)72 519.6 Q(xt of the pre)-.15 E(vious replacement pattern.)-.25 E .535 (Other metasequences possible in the replacement pattern are al)97 535.2 R -.1(wa)-.1 G .535(ys introduced by the escaping character `\\'.).1 F .338(The sequence `\\)72 547.2 R F2(n)A F0 2.838('i)C 2.838(sr)-2.838 G .337(eplaced by the te)-2.838 F .337(xt matched by the)-.15 F F2(n)2.837 E F0 .337(-th re)B .337(gular sube)-.15 F .337 (xpression enclosed between `\\\(' and `\\\)'.\207)-.15 F .585 (The sequences `\\u' and `\\l' cause the immediately follo)72 559.2 R .585(wing character in the replacement to be con)-.25 F -.15(ve)-.4 G .586(rted to upper).15 F(-)-.2 E .874(or lo)72 571.2 R(wer)-.25 E .874 (-case respecti)-.2 F -.15(ve)-.25 G .874 (ly if this character is a letter).15 F 5.873(.T)-.55 G .873 (he sequences `\\U' and `\\L)-5.873 F 3.373('t)-.92 G .873(urn such con) -3.373 F -.15(ve)-.4 G .873(rsion on, either).15 F(until `\\E' or `\\e'\ is encountered, or until the end of the replacement pattern.)72 583.2 Q F1 2.5(9. Option)72 607.2 R(descriptions)2.5 E(autoindent)72 633.6 Q F0 (,)A F1(ai)2.5 E F0(def)157.1 E(ault: noai)-.1 E .65 (Can be used to ease the preparation of structured program te)97 649.2 R 3.15(xt. At)-.15 F .65(the be)3.15 F .65(ginning of each)-.15 F F2 (append)3.15 E F0(,)A F2 -.15(ch)3.15 G(ang).15 E(e)-.1 E F0(or)3.15 E F2(insert)97 661.2 Q F0 .276(command or when a ne)2.776 F 2.776(wl)-.25 G .276(ine is)-2.776 F F2(opened)2.776 E F0 .275(or created by an)2.776 F F2(append)2.775 E F0(,)A F2 -.15(ch)2.775 G(ang).15 E(e)-.1 E F0(,)A F2(insert)2.775 E F0 2.775(,o)C(r)-2.775 E F2(substitute)2.775 E F0 (operation)2.775 E(within)97 673.2 Q F2(open)2.6 E F0(or)2.6 E F2 (visual)2.6 E F0(mode,)2.6 E F2 -.2(ex)2.6 G F0 .1 (looks at the line being appended after)2.8 F 2.6(,t)-.4 G .1 (he \214rst line changed or the line inserted)-2.6 F .235(before and ca\ lculates the amount of white space at the start of the line.)97 685.2 R .234(It then aligns the cursor at the le)5.234 F -.15(ve)-.25 G 2.734 (lo).15 G(f)-2.734 E(indentation so determined.)97 697.2 Q .32 LW 144 710 72 710 DL/F5 8/Times-Roman@0 SF 2<8757>72 720 S (hen nested, parenthesized sube)-2 E(xpressions are present,)-.12 E/F6 8 /Times-Italic@0 SF(n)2 E F5(is determined by counting occurrences of `\ \\\(' starting from the left.)2 E EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 332.2(USD:12-14 Ex)72 48 R(Reference Manual)2.5 E .045(If the user then types lines of te)97 84 R .046(xt in, the)-.15 F 2.546(yw)-.15 G .046 (ill continue to be justi\214ed at the displayed indenting le)-2.546 F -.15(ve)-.25 G 2.546(l. If).15 F(more)2.546 E .97 (white space is typed at the be)97 96 R .97 (ginning of a line, the follo)-.15 F .97 (wing line will start aligned with the \214rst non-white)-.25 F .554 (character of the pre)97 108 R .554(vious line.)-.25 F 2.154 -.8(To b) 5.554 H .554(ack the cursor up to the preceding tab stop one can hit).8 F/F1 10/Times-Bold@0 SF(^D)3.055 E F0 5.555(.T)C .555(he tab stops) -5.555 F 1.452(going backw)97 120 R 1.452 (ards are de\214ned at multiples of the)-.1 F/F2 10/Times-Italic@0 SF (shiftwidth)3.951 E F0 3.951(option. Y)3.951 F(ou)-1.1 E F2(cannot)3.951 E F0 1.451(backspace o)3.951 F -.15(ve)-.15 G 3.951(rt).15 G 1.451 (he indent,)-3.951 F -.15(ex)97 132 S (cept by sending an end-of-\214le with a).15 E F1(^D)2.5 E F0(.)A .482(\ Specially processed in this mode is a line with no characters added to \ it, which turns into a completely blank)97 147.6 R .043 (line \(the white space pro)97 159.6 R .043(vided for the)-.15 F F2 (autoindent)2.542 E F0 .042(is discarded.\))2.542 F .042 (Also specially processed in this mode are lines)5.042 F(be)97 171.6 Q 1.43(ginning with an `)-.15 F/F3 10/Symbol SFA F0 3.93('a)C 1.43 (nd immediately follo)-3.93 F 1.43(wed by a)-.25 F F1(^D)3.931 E F0 6.431(.T)C 1.431(his causes the input to be repositioned at the)-6.431 F (be)97 183.6 Q 1.139(ginning of the line, b)-.15 F 1.139 (ut retaining the pre)-.2 F 1.139(vious indent for the ne)-.25 F 1.139 (xt line.)-.15 F(Similarly)6.139 E 3.639(,a`)-.65 G 1.139(0' follo) -3.639 F 1.139(wed by a)-.25 F F1(^D)3.638 E F0(repositions at the be)97 195.6 Q(ginning b)-.15 E(ut without retaining the pre)-.2 E (vious indent.)-.25 E F2 -.2(Au)97 211.2 S(toindent).2 E F0(doesn')2.5 E 2.5(th)-.18 G(appen in)-2.5 E F2(global)2.5 E F0 (commands or when the input is not a terminal.)2.5 E F1(autoprint)72 234 Q F0(,)A F1(ap)2.5 E F0(def)159.88 E(ault: ap)-.1 E .469 (Causes the current line to be printed after each)97 249.6 R F2(delete) 2.969 E F0(,)A F2(copy)2.969 E F0(,)A F2(join)2.97 E F0(,)A F2(mo)2.97 E (ve)-.1 E F0(,)A F2(substitute)2.97 E F0(,)A F2(t)2.97 E F0(,)A F2(undo) 2.97 E F0 .47(or shift command.)2.97 F .118(This has the same ef)97 261.6 R .117(fect as supplying a trailing `p' to each such command.)-.25 F F2 -.2(Au)5.117 G(toprint).2 E F0 .117(is suppressed in globals,)2.617 F(and only applies to the last of man)97 273.6 Q 2.5(yc)-.15 G (ommands on a line.)-2.5 E F1(auto)72 296.4 Q(write)-.1 E F0(,)A F1(aw) 2.5 E F0(def)157.78 E(ault: noa)-.1 E(w)-.15 E 1.429 (Causes the contents of the b)97 312 R(uf)-.2 E 1.429 (fer to be written to the current \214le if you ha)-.25 F 1.73 -.15 (ve m)-.2 H 1.43(odi\214ed it and gi).15 F 1.73 -.15(ve a)-.25 H F2(ne) 4.08 E(xt,)-.2 E -1.91 -.37(re w)97 324 T .329(ind, stop, ta).37 F -.1 (g,)-.1 G F0(or)2.929 E F2(!)2.829 E F0 .329(command, or a)5.329 F F1(^) 2.829 E F3 -6.028C F0 .329(\(switch \214les\) or)8.857 F F1(^]) 2.828 E F0 .328(\(tag goto\) command in)2.828 F F2(visual.)2.828 E F0 .328(Note, that the)5.328 F F2(edit)2.828 E F0(and)97 336 Q F2 -.2(ex) 3.16 G F0 .66(commands do)3.36 F F1(not)3.16 E F0(auto)3.16 E 3.16 (write. In)-.25 F .661(each case, there is an equi)3.16 F -.25(va)-.25 G .661(lent w).25 F .661(ay of switching when auto)-.1 F .661(write is) -.25 F .804(set to a)97 348 R -.2(vo)-.2 G .804(id the).2 F F2 (autowrite)3.304 E F0(\()3.304 E F2(edit)A F0(for)3.304 E F2(ne)3.304 E (xt)-.2 E F0(,)A F2 -1.91 -.37(re w)3.304 H(ind!).37 E F0 .804 (for .I re)5.804 F .804(wind ,)-.25 F F2(stop!)3.304 E F0(for)5.804 E F2 (stop)3.303 E F0(,)A F2(ta)3.303 E(g!)-.1 E F0(for)5.803 E F2(ta)3.303 E (g)-.1 E F0(,)A F2(shell)3.303 E F0(for)3.303 E F2(!)3.303 E F0 3.303 (,a)C(nd)-3.303 E F1(:e #)97 360 Q F0(and a)2.5 E F1(:ta!)2.5 E F0 (command from within)2.5 E F2(visual\).)2.5 E F1(beautify)72 382.8 Q F0 (,)A F1(bf)2.5 E F0(def)167.11 E(ault: nobeautify)-.1 E .009 (Causes all control characters e)97 398.4 R .009(xcept tab, ne)-.15 F .009(wline and form-feed to be discarded from the input.)-.25 F 2.51(Ac) 5.01 G .01(omplaint is)-2.51 F(re)97 410.4 Q (gistered the \214rst time a backspace character is discarded.)-.15 E F2 (Beautify)5 E F0(does not apply to command input.)2.5 E F1(dir)72 433.2 Q(ectory)-.18 E F0(,)A F1(dir)2.5 E F0(def)158.97 E(ault: dir=/tmp)-.1 E .664(Speci\214es the directory in which)97 448.8 R F2 -.2(ex)3.163 G F0 .663(places its b)3.363 F(uf)-.2 E .663(fer \214le.)-.25 F .663 (If this directory in not writable, then the editor will)5.663 F -.15 (ex)97 460.8 S(it abruptly when it f).15 E (ails to be able to create its b)-.1 E(uf)-.2 E(fer there.)-.25 E F1 (edcompatible)72 483.6 Q F0(def)158.78 E(ault: noedcompatible)-.1 E .417 (Causes the presence of absence of)97 499.2 R F1(g)2.917 E F0(and)2.917 E F1(c)2.917 E F0(suf)2.917 E<8c78>-.25 E .418 (es on substitute commands to be remembered, and to be tog-)-.15 F (gled by repeating the suf)97 511.2 Q 2.5(\214ces. The)-.25 F(suf)2.5 E <8c78>-.25 E F1(r)2.5 E F0(mak)2.5 E(es the substitution be as in the) -.1 E F2(~)2.5 E F0(command, instead of lik)2.5 E(e)-.1 E F2(&.)2.5 E F1 (err)72 534 Q(orbells)-.18 E F0(,)A F1(eb)2.5 E F0(def)158.97 E (ault: noeb)-.1 E .678(Error messages are preceded by a bell.*)97 549.6 R .678(If possible the editor al)5.678 F -.1(wa)-.1 G .677 (ys places the error message in a standout).1 F (mode of the terminal \(such as in)97 561.6 Q -.15(ve)-.4 G (rse video\) instead of ringing the bell.).15 E F1(hardtabs)72 584.4 Q F0(,)A F1(ht)2.5 E F0(def)163.77 E(ault: ht=8)-.1 E(Gi)97 600 Q -.15(ve) -.25 G 2.5(st).15 G(he boundaries on which terminal hardw)-2.5 E (are tabs are set \(or on which the system e)-.1 E(xpands tabs\).)-.15 E F1(ignor)72 622.8 Q(ecase)-.18 E F0(,)A F1(ic)2.5 E F0(def)158.97 E (ault: noic)-.1 E .226(All upper case characters in the te)97 638.4 R .227(xt are mapped to lo)-.15 F .227(wer case in re)-.25 F .227(gular e) -.15 F .227(xpression matching.)-.15 F .227(In addition, all)5.227 F .294(upper case characters in re)97 650.4 R .294(gular e)-.15 F .293 (xpressions are mapped to lo)-.15 F .293(wer case e)-.25 F .293 (xcept in character class speci\214cations.)-.15 F .32 LW 144 710 72 710 DL/F4 8/Times-Roman@0 SF 2(*B)72 720 S(ell ringing in)-2 E/F5 8 /Times-Italic@0 SF(open)2 E F4(and)2 E F5(visual)2 E F4 (on errors is not suppressed by setting)2 E F5(noeb)2 E(.)-.32 E EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-15)334.7 E/F1 10/Times-Bold@0 SF(lisp)72 84 Q F0(def)200.99 E(ault: nolisp)-.1 E/F2 10 /Times-Italic@0 SF -.2(Au)97 99.6 S(toindent).2 E F0 .151 (indents appropriately for)2.65 F F2(lisp)2.651 E F0 .151(code, and the) 2.651 F F1 2.651(\(\){}[)2.651 G([)-2.651 E F0(and)2.651 E F1(]])2.651 E F0 .151(commands in)2.651 F F2(open)2.651 E F0(and)2.651 E F2(visual) 2.651 E F0 .151(are modi-)2.651 F(\214ed to ha)97 111.6 Q .3 -.15(ve m) -.2 H(eaning for).15 E F2(lisp)2.5 E F0(.)A F1(list)72 134.4 Q F0(def) 203.22 E(ault: nolist)-.1 E .958 (All printed lines will be displayed \(more\) unambiguously)97 150 R 3.458(,s)-.65 G(ho)-3.458 E .957(wing tabs and end-of-lines as in the) -.25 F F2(list)3.457 E F0(com-)3.457 E(mand.)97 162 Q F1(magic)72 184.8 Q F0(def)190.45 E(ault: magic for)-.1 E F2 -.2(ex)2.5 G F0(and)2.7 E F2 (vi)2.5 E F0<87>A(If)97 200.4 Q F2(noma)3.348 E(gic)-.1 E F0 .848 (is set, the number of re)3.348 F .848(gular e)-.15 F .848 (xpression metacharacters is greatly reduced, with only `)-.15 F/F3 10 /Symbol SFA F0 3.349('a)C .849(nd `$')-3.349 F(ha)97 212.4 Q .044 (ving special ef)-.2 F 2.544(fects. In)-.25 F .043(addition the metacha\ racters `~' and `&' of the replacement pattern are treated as nor)2.544 F(-)-.2 E .831(mal characters.)97 224.4 R .831 (All the normal metacharacters may be made)5.831 F F2(ma)3.331 E(gic)-.1 E F0(when)3.331 E F2(noma)3.331 E(gic)-.1 E F0 .832 (is set by preceding them)3.331 F(with a `\\'.)97 236.4 Q F1(mesg)72 259.2 Q F0(def)194.34 E(ault: mesg)-.1 E (Causes write permission to be turned of)97 274.8 Q 2.5(ft)-.25 G 2.5 (ot)-2.5 G(he terminal while you are in visual mode, if)-2.5 E F2 (nomesg)2.5 E F0(is set.)2.5 E F1(modeline)72 297.6 Q F0(def)177.11 E (ault: nomodeline)-.1 E(If)97 313.2 Q F2(modeline)2.868 E F0 .368 (is set, then the \214rst 5 lines and the last \214v)2.868 F 2.867(el) -.15 G .367(ines of the \214le will be check)-2.867 F .367(ed for e)-.1 F 2.867(xc)-.15 G .367(ommand lines)-2.867 F .947 (and the comands issued.)97 325.2 R 2.547 -.8(To b)5.947 H 3.447(er).8 G .947(ecognized as a command line, the line must ha)-3.447 F 1.248 -.15 (ve t)-.2 H .948(he string).15 F F1(ex:)3.448 E F0(or)3.448 E F1(vi:) 3.448 E F0(pre-)3.448 E .66(ceeded by a tab or a space.)97 337.2 R .66 (This string may be an)5.66 F .659(ywhere in the line and an)-.15 F .659 (ything after the)-.15 F F2(:)3.159 E F0 .659(is interpeted as)3.159 F 1.602(editor commands.)97 349.2 R 1.602(This option def)6.602 F 1.602 (aults to of)-.1 F 4.103(fb)-.25 G 1.603(ecause of une)-4.103 F 1.603 (xpected beha)-.15 F 1.603(vior when editting \214les such as)-.2 F F2 (/etc/passwd.)97 361.2 Q F1(number)72 384 Q 2.5(,n)-.92 G(u)-2.5 E F0 (def)166.91 E(ault: nonumber)-.1 E .35 (Causes all output lines to be printed with their line numbers.)97 399.6 R .349(In addition each input line will be prompted for)5.349 F (by supplying the line number it will ha)97 411.6 Q -.15(ve)-.2 G(.).15 E F1(open)72 434.4 Q F0(def)195.44 E(ault: open)-.1 E(If)97 450 Q F2 (noopen)2.707 E F0 2.707(,t)C .207(he commands)-2.707 F F2(open)2.707 E F0(and)2.707 E F2(visual)2.707 E F0 .207(are not permitted.)2.707 F .207 (This is set for)5.207 F F2(edit)2.707 E F0 .208(to pre)2.708 F -.15(ve) -.25 G .208(nt confusion resulting).15 F (from accidental entry to open or visual mode.)97 462 Q F1 (optimize, opt)72 484.8 Q F0(def)160.45 E(ault: optimize)-.1 E 1.355 (Throughput of te)97 500.4 R 1.355(xt is e)-.15 F 1.355(xpedited by set\ ting the terminal to not do automatic carriage returns when printing) -.15 F .278(more than one \(logical\) line of output, greatly speeding \ output on terminals without addressable cursors when)97 512.4 R(te)97 524.4 Q(xt with leading white space is printed.)-.15 E F1 (paragraphs, para)72 547.2 Q F0(def)141.55 E(ault: para=IPLPPPQPP)-.1 E (LIbp)5 E .464(Speci\214es the paragraphs for the)97 562.8 R F1({)2.964 E F0(and)2.964 E F1(})2.964 E F0 .464(operations in)2.964 F F2(open) 2.964 E F0(and)2.964 E F2(visual.)2.964 E F0 .463 (The pairs of characters in the option')5.464 F(s)-.55 E -.25(va)97 574.8 S(lue are the names of the macros which start paragraphs.).25 E F1 (pr)72 597.6 Q(ompt)-.18 E F0(def)183.96 E(ault: prompt)-.1 E (Command mode input is prompted for with a `:'.)97 613.2 Q F1 -.18(re)72 636 S(draw).18 E F0(def)185.08 E(ault: noredra)-.1 E(w)-.15 E .624(The \ editor simulates \(using great amounts of output\), an intelligent term\ inal on a dumb terminal \(e.g. during)97 651.6 R 1.006(insertions in)97 663.6 R F2(visual)3.506 E F0 1.005(the characters to the right of the c\ ursor position are refreshed as each input character is)3.506 F 2.5 (typed.\) Useful)97 675.6 R(only at v)2.5 E(ery high speed.)-.15 E .32 LW 144 710 72 710 DL/F4 8/Times-Roman@0 SF<87>72 720 Q/F5 8 /Times-Italic@0 SF(Noma)2 E(gic)-.08 E F4(for)2 E F5(edit)2 E F4(.)A EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 332.2(USD:12-16 Ex)72 48 R(Reference Manual)2.5 E/F1 10/Times-Bold@0 SF -.18(re)72 84 S(map).18 E F0(def)188.41 E (ault: remap)-.1 E 1.523(If on, macros are repeatedly tried until the)97 99.6 R 4.023(ya)-.15 G 1.523(re unchanged.)-4.023 F -.15(Fo)6.523 G 4.024(re).15 G 1.524(xample, if)-4.174 F F1(o)4.024 E F0 1.524 (is mapped to)4.024 F F1(O)4.024 E F0 4.024(,a)C(nd)-4.024 E F1(O)4.024 E F0(is)4.024 E(mapped to)97 111.6 Q F1(I)2.5 E F0 2.5(,t)C(hen if)-2.5 E/F2 10/Times-Italic@0 SF -.37(re)2.5 G(map).37 E F0(is set,)2.5 E F1(o) 2.5 E F0(will map to)2.5 E F1(I)2.5 E F0 2.5(,b)C(ut if)-2.7 E F2(nor) 2.5 E(emap)-.37 E F0(is set, it will map to)2.5 E F1(O)2.5 E F0(.)A F1 -.18(re)72 134.4 S(port).18 E F0(def)188.97 E(ault: report=5\207)-.1 E .984(Speci\214es a threshold for feedback from commands.)97 150 R(An) 5.984 E 3.484(yc)-.15 G .983 (ommand which modi\214es more than the speci\214ed)-3.484 F 1.02 (number of lines will pro)97 162 R 1.02 (vide feedback as to the scope of its changes.)-.15 F -.15(Fo)6.02 G 3.52(rc).15 G 1.02(ommands such as)-3.52 F F2(global)3.52 E F0(,)A F2 (open)3.52 E F0(,)A F2(undo)97 174 Q F0 2.876(,a)C(nd)-2.876 E F2 (visual)2.876 E F0 .376(which ha)2.876 F .676 -.15(ve p)-.2 H .376 (otentially more f).15 F .376 (ar reaching scope, the net change in the number of lines in the)-.1 F -.2(bu)97 186 S -.25(ff).2 G .336(er is presented at the end of the com\ mand, subject to this same threshold.).25 F .337 (Thus noti\214cation is suppressed)5.337 F(during a)97 198 Q F2(global) 2.5 E F0(command on the indi)2.5 E(vidual commands performed.)-.25 E F1 (scr)72 220.8 Q(oll)-.18 E F0(def)192.85 E(ault: scroll=\275 windo)-.1 E (w)-.25 E .352(Determines the number of logical lines scrolled when an \ end-of-\214le is recei)97 236.4 R -.15(ve)-.25 G 2.852(df).15 G .351 (rom a terminal input in com-)-2.852 F (mand mode, and the number of lines printed by a command mode)97 248.4 Q F2(z)2.5 E F0(command \(double the v)2.5 E(alue of)-.25 E F2(scr)2.5 E (oll)-.45 E F0(\).)A F1(sections)72 271.2 Q F0(def)182.67 E (ault: sections=SHNHH)-.1 E(HU)5 E 1.171 (Speci\214es the section macros for the)97 286.8 R F1([[)3.671 E F0(and) 3.671 E F1(]])3.671 E F0 1.172(operations in)3.672 F F2(open)3.672 E F0 (and)3.672 E F2(visual.)3.672 E F0 1.172(The pairs of characters in the) 6.172 F(options')97 298.8 Q 2.5(sv)-.55 G (alue are the names of the macros which start paragraphs.)-2.75 E F1 (shell)72 321.6 Q F0(,)A F1(sh)2.5 E F0(def)182.1 E(ault: sh=/bin/sh)-.1 E(Gi)97 337.2 Q -.15(ve)-.25 G 3.508(st).15 G 1.008 (he path name of the shell fork)-3.508 F 1.007 (ed for the shell escape command `!', and by the)-.1 F F2(shell)3.507 E F0 3.507(command. The)3.507 F(def)97 349.2 Q(ault is tak)-.1 E (en from SHELL in the en)-.1 E(vironment, if present.)-.4 E F1 (shiftwidth)72 372 Q F0(,)A F1(sw)2.5 E F0(def)156.55 E(ault: sw=8)-.1 E (Gi)97 387.6 Q -.15(ve)-.25 G 3.437(st).15 G .937(he width a softw) -3.437 F .938(are tab stop, used in re)-.1 F -.15(ve)-.25 G .938 (rse tabbing with).15 F F1(^D)3.438 E F0 .938(when using)3.438 F F2 (autoindent)3.438 E F0 .938(to append te)3.438 F(xt,)-.15 E (and by the shift commands.)97 399.6 Q F1(sho)72 422.4 Q(wmatch, sm)-.1 E F0(def)150.55 E(ault: nosm)-.1 E(In)97 438 Q F2(open)2.909 E F0(and) 2.909 E F2(visual)2.909 E F0 .409(mode, when a)2.909 F F1(\))2.909 E F0 (or)2.909 E F1(})2.909 E F0 .408(is typed, mo)2.909 F .708 -.15(ve t) -.15 H .408(he cursor to the matching).15 F F1(\()2.908 E F0(or)2.908 E F1({)2.908 E F0 .408(for one second if this)2.908 F (matching character is on the screen.)97 450 Q(Extremely useful with)5 E F2(lisp.)2.5 E F1(slo)72 472.8 Q -.1(wo)-.1 G(pen, slo).1 E(w)-.1 E F0 (terminal dependent)152.96 E(Af)97 488.4 Q .982 (fects the display algorithm used in)-.25 F F2(visual)3.482 E F0 .982 (mode, holding of)3.482 F 3.482(fd)-.25 G .983 (isplay updating during input of ne)-3.482 F 3.483(wt)-.25 G -.15(ex) -3.483 G 3.483(tt).15 G(o)-3.483 E(impro)97 500.4 Q .968 -.15(ve t)-.15 H .668(hroughput when the terminal in use is both slo).15 F 3.167(wa) -.25 G .667(nd unintelligent.)-3.167 F(See)5.667 E F2 .667(An Intr)3.167 F .667(oduction to Display)-.45 F(Editing with V)97 512.4 Q(i)-.74 E F0 (for more details.)2.5 E F1(tabstop, ts)72 535.2 Q F0(def)172.11 E (ault: ts=8)-.1 E(The editor e)97 550.8 Q (xpands tabs in the input \214le to be on)-.15 E F2(tabstop)2.5 E F0 (boundaries for the purposes of display)2.5 E(.)-.65 E F1(taglength, tl) 72 573.6 Q F0(def)164.89 E(ault: tl=0)-.1 E -.8(Ta)97 589.2 S .709 (gs are not signi\214cant be).8 F .709(yond this man)-.15 F 3.209(yc) -.15 G 3.209(haracters. A)-3.209 F -.25(va)3.209 G .71 (lue of zero \(the def).25 F .71(ault\) means that all characters)-.1 F (are signi\214cant.)97 601.2 Q F1(tags)72 624 Q F0(def)198.78 E (ault: tags=tags /usr/lib/tags)-.1 E 3.326(Ap)97 639.6 S .826 (ath of \214les to be used as tag \214les for the)-3.326 F F2(ta)3.326 E (g)-.1 E F0 3.326(command. A)3.326 F .826 (requested tag is searched for in the speci\214ed)3.326 F .305 (\214les, sequentially)97 651.6 R 5.305(.B)-.65 G 2.805(yd)-5.305 G(ef) -2.805 E .305(ault, \214les called)-.1 F F1(tags)2.805 E F0 .306 (are searched for in the current directory and in /usr/lib \(a mas-) 2.805 F(ter \214le for the entire system\).)97 663.6 Q .32 LW 144 710 72 710 DL/F3 8/Times-Roman@0 SF 2(\2072f)72 720 S(or)-2 E/F4 8 /Times-Italic@0 SF(edit)2 E F3(.)A EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(Ex Reference Manual)72 48 Q(USD:12-17)334.7 E/F1 10/Times-Bold@0 SF(term)72 84 Q F0(from en)195.46 E(vironment TERM)-.4 E (The terminal type of the output de)97 99.6 Q(vice.)-.25 E F1(terse)72 122.4 Q F0(def)195.46 E(ault: noterse)-.1 E (Shorter error diagnostics are produced for the e)97 138 Q (xperienced user)-.15 E(.)-.55 E F1(war)72 160.8 Q(n)-.15 E F0(def) 193.93 E(ault: w)-.1 E(arn)-.1 E -.8(Wa)97 176.4 S (rn if there has been `[No write since last change]' before a `!').8 E (command escape.)5 E F1(windo)72 199.2 Q(w)-.1 E F0(def)182.76 E (ault: windo)-.1 E(w=speed dependent)-.25 E .777 (The number of lines in a te)97 214.8 R .776(xt windo)-.15 F 3.276(wi) -.25 G 3.276(nt)-3.276 G(he)-3.276 E/F2 10/Times-Italic@0 SF(visual) 3.276 E F0 3.276(command. The)3.276 F(def)3.276 E .776(ault is 8 at slo) -.1 F 3.276(ws)-.25 G .776(peeds \(600 baud or)-3.276 F(less\), 16 at m\ edium speed \(1200 baud\), and the full screen \(minus one line\) at hi\ gher speeds.)97 226.8 Q F1(w300, w1200 w9600)72 249.6 Q F0 1.007 (These are not true options b)97 265.2 R 1.007(ut set)-.2 F F1(windo) 3.507 E(w)-.1 E F0 1.007(only if the speed is slo)3.507 F 3.508(w\()-.25 G 1.008(300\), medium \(1200\), or high \(9600\),)-3.508 F(respecti)97 277.2 Q -.15(ve)-.25 G(ly).15 E 5(.T)-.65 G(he)-5 E 2.5(ya)-.15 G (re suitable for an EXINIT and mak)-2.5 E 2.5(ei)-.1 G 2.5(te)-2.5 G (asy to change the 8/16/full screen rule.)-2.5 E F1(wrapscan)72 300 Q F0 (,)A F1(ws)2.5 E F0(def)158.78 E(ault: ws)-.1 E(Searches using the re)97 315.6 Q(gular e)-.15 E (xpressions in addressing will wrap around past the end of the \214le.) -.15 E F1(wrapmar)72 338.4 Q(gin)-.1 E F0(,)A F1(wm)2.5 E F0(def)142.22 E(ault: wm=0)-.1 E .423(De\214nes a mar)97 354 R .423 (gin for automatic wrapo)-.18 F -.15(ve)-.15 G 2.923(ro).15 G 2.923(ft) -2.923 G -.15(ex)-2.923 G 2.923(td).15 G .423(uring input in)-2.923 F F2 (open)2.923 E F0(and)2.923 E F2(visual)2.923 E F0 2.923(modes. See)2.923 F F2 .422(An Intr)2.923 F(oduction)-.45 E(to T)97 366 Q -.2(ex)-.92 G 2.5(tE).2 G(diting with V)-2.5 E(i)-.74 E F0(for details.)2.5 E F1 (writeany)72 388.8 Q F0(,)A F1(wa)2.5 E F0(def)161.01 E(ault: no)-.1 E -.1(wa)-.25 G .53(Inhibit the checks normally made before)97 404.4 R F2 (write)3.03 E F0 .53(commands, allo)3.03 F .53(wing a write to an)-.25 F 3.03<798c>-.15 G .53(le which the system pro-)-3.03 F (tection mechanism will allo)97 416.4 Q -.65(w.)-.25 G F1 2.5(10. Ackno) 72 440.4 R(wledgements)-.1 E F0 .141(Chuck Hale)97 456 R 2.641(yc)-.15 G (ontrib)-2.641 E .141(uted greatly to the early de)-.2 F -.15(ve)-.25 G .141(lopment of).15 F F2 -.2(ex)2.641 G(.).2 E F0 .14 (Bruce Englar encouraged the redesign which)5.141 F .675(led to)72 468 R F2 -.2(ex)3.175 G F0 -.15(ve)3.375 G .675(rsion 1.).15 F .675(Bill Jo) 5.675 F 3.175(yw)-.1 G .675(rote v)-3.175 F .676 (ersions 1 and 2.0 through 2.7, and created the frame)-.15 F -.1(wo)-.25 G .676(rk that users see in the).1 F .252(present editor)72 480 R 5.252 (.M)-.55 G .252 (ark Horton added macros and other features and made the editor w)-5.252 F .251(ork on a lar)-.1 F .251(ge number of termi-)-.18 F (nals and Unix systems.)72 492 Q EP %%Trailer end %%EOF nvi-1.81.6/docs/exref/summary.ps0100444000076400001440000007671010720065715015567 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:43:57 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 4 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(Ex/Edit Command Summary \(V)197.1 84 Q (ersion 2.0\))-1.2 E/F1 9/Times-Italic@0 SF(Ex)87 107 Q/F2 9 /Times-Roman@0 SF(and)2.583 E F1(edit)2.583 E F2 .333(are te)2.583 F .333(xt editors, used for creating and modi-)-.135 F 1.163 (fying \214les of te)72 118 R 1.163(xt on the)-.135 F/F3 7/Times-Roman@0 SF(UNIX)3.413 E F2 1.164(computer system.)3.414 F F1(Edit)5.664 E F2 1.164(is a)3.414 F -.225(va)72 129 S .644(riant of).225 F F1 -.18(ex) 2.894 G F2 .643(with features designed to mak)3.073 F 2.893(ei)-.09 G 2.893(tl)-2.893 G .643(ess compli-)-2.893 F 1.544 (cated to learn and use.)72 140 R 1.544(In terms of command syntax and) 6.044 F(ef)72 151 Q .114 (fect the editors are essentially identical, and this command)-.225 F (summary applies to both.)72 162 Q 1.523 (The summary is meant as a quick reference for users)87 173 R 1.407 (already acquainted with)72 184 R F1(edit)3.657 E F2(or)3.657 E F1 -.18 (ex)3.657 G F2 5.907(.F).18 G 1.407(uller e)-5.907 F 1.407 (xplanations of)-.135 F .082(the editors are a)72 195 R -.225(va)-.18 G .082(ilable in the documents).225 F F1 .083(Edit: A T)2.333 F(utorial) -.495 E F2(\(a)2.333 E 2.38(self-teaching introduction\) and the)72 206 R F1 2.38(Ex Refer)4.63 F 2.38(ence Manual)-.333 F F2 1.158 (\(the comprehensi)72 217 R 1.428 -.135(ve r)-.225 H 1.158 (eference source for both).135 F F1(edit)3.409 E F2(and)3.409 E F1 -.18 (ex)3.409 G F2(\).).18 E .807(Both of these writeups are a)72 228 R -.225(va)-.18 G .806(ilable in the Computing Ser).225 F(-)-.18 E (vices Library)72 239 Q(.)-.585 E .448(In the e)87 250 R .449 (xamples included with the summary)-.135 F 2.699(,c)-.585 G(ommands) -2.699 E .848(and te)72 261 R .847 (xt entered by the user are printed in)-.135 F/F4 9/Times-Bold@0 SF (boldface)3.097 E F2 .847(to dis-)3.097 F (tinguish them from responses printed by the computer)72 272 Q(.)-.495 E F4(The Editor Buffer)72 287.95 Q F2 .471 (In order to perform its tasks the editor sets aside a tem-)87 298.95 R .683(porary w)72 309.95 R .683(ork space, called a)-.09 F F1 -.18(bu) 2.933 G -.162(ff).18 G(er).162 E F2 2.933(,s)C .682 (eparate from the user')-2.933 F(s)-.495 E 1.099(permanent \214le.)72 320.95 R 1.1(Before starting to w)5.599 F 1.1(ork on an e)-.09 F 1.1 (xisting \214le)-.135 F .318(the editor mak)72 331.95 R .318(es a cop) -.09 F 2.568(yo)-.09 G 2.568(fi)-2.568 G 2.568(ti)-2.568 G 2.568(nt) -2.568 G .318(he b)-2.568 F(uf)-.18 E(fer)-.225 E 2.567(,l)-.36 G(ea) -2.567 E .317(ving the origi-)-.18 F 1.066(nal untouched.)72 342.95 R 1.067(All editing changes are made to the b)5.566 F(uf)-.18 E(fer)-.225 E(cop)72 353.95 Q 1.506 -.585(y, w)-.09 H .335 (hich must then be written back to the permanent \214le).585 F .548 (in order to update the old v)72 364.95 R 2.799(ersion. The)-.135 F -.18 (bu)2.799 G -.225(ff).18 G .549(er disappears at).225 F (the end of the editing session.)72 375.95 Q F4(Editing: Command and T) 72 391.9 Q(ext Input Modes)-.828 E F2 .641 (During an editing session there are tw)87 402.9 R 2.891(ou)-.09 G .641 (sual modes of)-2.891 F(operation:)72 413.9 Q F1(command)2.326 E F2 .076 (mode and)2.326 F F1(te)2.326 E .076(xt input)-.18 F F2 2.326 (mode. \(This)2.326 F(disre-)2.327 E -.045(ga)72 424.9 S 1.653 (rds, for the moment,).045 F F1(open)3.902 E F2(and)3.902 E F1(visual) 3.902 E F2 1.652(modes, discussed)3.902 F(belo)72 435.9 Q -.585(w.)-.225 G 4.581(\)I).585 G 2.331(nc)-4.581 G .082 (ommand mode, the editor issues a colon prompt)-2.331 F .058 (\(:\) to sho)72 446.9 R 2.308(wt)-.225 G .057 (hat it is ready to accept and e)-2.308 F -.135(xe)-.135 G .057 (cute a command.).135 F 1.345(In te)72 457.9 R 1.346 (xt input mode, on the other hand, there is no prompt)-.135 F .499 (and the editor merely accepts te)72 468.9 R .499 (xt to be added to the b)-.135 F(uf)-.18 E(fer)-.225 E(.)-.495 E -1.125 -.63(Te x)72 479.9 T 5.115(ti).63 G 2.865 (nput mode is initiated by the commands)-5.115 F F1(append)5.115 E F2(,) A F1(insert)72 490.9 Q F2 3.066(,a)C(nd)-3.066 E F1 -.135(ch)3.065 G (ang).135 E(e)-.09 E F2 3.065(,a)C .815 (nd is terminated by typing a period as)-3.065 F (the \214rst and only character on a line.)72 501.9 Q F4 (Line Numbers and Command Syntax)72 517.85 Q F2 1.029(The editor k)87 528.85 R 1.029(eeps track of lines of te)-.09 F 1.03(xt in the b)-.135 F (uf)-.18 E 1.03(fer by)-.225 F 1.434(numbering them consecuti)72 539.85 R -.135(ve)-.225 G 1.433(ly starting with 1 and renum-).135 F .653 (bering as lines are added or deleted.)72 550.85 R .654(At an)5.154 F 2.904(yg)-.135 G -1.935 -.225(iv e)-2.904 H 2.904(nt).225 G .654 (ime the)-2.904 F 1.839 (editor is positioned at one of these lines; this position is)72 561.85 R 1.551(called the)72 572.85 R F1(curr)3.801 E 1.551(ent line)-.333 F F2 6.051(.G)C(enerally)-6.051 E 3.802(,c)-.585 G 1.552(ommands that change) -3.802 F 1.212(the contents of the b)72 583.85 R(uf)-.18 E 1.211 (fer print the ne)-.225 F 3.461(wc)-.225 G 1.211(urrent line at the) -3.461 F(end of their e)72 594.85 Q -.135(xe)-.135 G(cution.).135 E 1.42 (Most commands can be preceded by one or tw)87 605.85 R 3.67(ol)-.09 G (ine-)-3.67 E .326(number addresses which indicate the lines to be af)72 616.85 R 2.575(fected. If)-.225 F 2.17(one number is gi)72 627.85 R -.135(ve)-.225 G 4.421(nt).135 G 2.171(he command operates on that line) -4.421 F .312(only; if tw)72 638.85 R .311(o, on an inclusi)-.09 F .581 -.135(ve r)-.225 H .311(ange of lines.).135 F .311(Commands that)4.811 F .112(can tak)72 649.85 R 2.362(el)-.09 G .112(ine-number pre\214x)-2.362 F .112(es also assume def)-.135 F .112(ault pre\214x)-.09 F .113(es if) -.135 F .961(none are gi)72 660.85 R -.135(ve)-.225 G 3.211(n. The).135 F(def)3.211 E .96(ault assumed by each command is)-.09 F 1.876 (designed to mak)72 671.85 R 4.126(ei)-.09 G 4.127(tc)-4.126 G(on)-4.127 E -.135(ve)-.36 G 1.877(nient to use in man).135 F 4.127(yi)-.135 G (nstances)-4.127 E .966(without an)72 682.85 R 3.216(yl)-.135 G .966 (ine-number pre\214x.)-3.216 F -.135(Fo)5.466 G 3.216(rt).135 G .965 (he most part, a com-)-3.216 F 1.993 (mand used without a pre\214x operates on the current line,)72 693.85 R 1.366(though e)72 704.85 R 1.366 (xceptions to this rule should be noted.)-.135 F(The)5.865 E F1(print) 3.615 E F2 .272 (command by itself, for instance, causes one line, the current)72 715.85 R(line, to be printed at the terminal.)72 726.85 Q 1.02(The summary sho) 336.6 107 R 1.019(ws the number of line addresses that)-.225 F 1.667 (can be pre\214x)321.6 118 R 1.667 (ed to each command as well as the def)-.135 F(aults)-.09 E .76 (assumed if the)321.6 129 R 3.01(ya)-.135 G .76(re omitted.)-3.01 F -.135(Fo)5.26 G 3.01(re).135 G(xample,)-3.145 E F1(\(.,.\))3.009 E F2 .759(means that)5.259 F .199(up to 2 line-numbers may be gi)321.6 140 R -.135(ve)-.225 G .199(n, and that if none is gi).135 F -.135(ve)-.225 G (n).135 E 1.078(the command operates on the current line.)321.6 151 R 1.077(\(In the address)5.577 F 2.443(pre\214x notation, `)321.6 162 R (`.)-.666 E 3.775 -.666('' s)-.63 H 2.444 (tands for the current line and `).666 F(`$')-.666 E(')-.666 E 1.417 (stands for the last line of the b)321.6 173 R(uf)-.18 E(fer)-.225 E 3.667(.\) If)-.495 F 1.416(no such notation)3.667 F (appears, no line-number pre\214x may be used.)321.6 184 Q 2.916 (Some commands tak)336.6 195 R 5.166(et)-.09 G 2.916 (railing information; only the)-5.166 F .686 (more important instances of this are mentioned in the sum-)321.6 206 R (mary)321.6 217 Q(.)-.585 E F4(Open and V)321.6 230.75 Q(isual Modes) -.333 E F2 2.123(Besides command and te)336.6 241.75 R 2.123 (xt input modes,)-.135 F F1 -.18(ex)4.373 G F2(and)4.553 E F1(edit)4.373 E F2(pro)321.6 252.75 Q 2.23(vide on some CR)-.135 F 4.479(Tt)-.54 G 2.229(erminals other modes of editing,)-4.479 F F1(open)321.6 263.75 Q F2(and)2.428 E F1(visual)2.428 E F2 4.678(.I)C 2.428(nt)-4.678 G .178 (hese modes the cursor can be mo)-2.428 F -.135(ve)-.135 G 2.429(dt).135 G(o)-2.429 E(indi)321.6 274.75 Q 2.032(vidual w)-.225 F 2.031 (ords or characters in a line.)-.09 F 2.031(The commands)6.531 F .769 (then gi)321.6 285.75 R -.135(ve)-.225 G 3.019(na).135 G .769(re v) -3.019 F .77(ery dif)-.135 F .77(ferent from the standard editor com-) -.225 F 1.093(mands; most do not appear on the screen when typed.)321.6 296.75 R F1(An)5.593 E(Intr)321.6 307.75 Q .927 (oduction to Display Editing with V)-.405 F(i)-.666 E F2(pro)3.178 E .928(vides a full dis-)-.135 F(cussion.)321.6 318.75 Q F4 (Special Characters)321.6 332.5 Q F2 .255(Some characters tak)336.6 343.5 R 2.504(eo)-.09 G 2.504(ns)-2.504 G .254 (pecial meanings when used in)-2.504 F(conte)321.6 354.5 Q .241 (xt searches and in patterns gi)-.135 F -.135(ve)-.225 G 2.492(nt).135 G 2.492(ot)-2.492 G(he)-2.492 E F1(substitute)2.492 E F2(com-)2.492 E 2.74 (mand. F)321.6 365.5 R(or)-.135 E F1(edit)2.74 E F2 2.74(,t)C .489 (hese are `)-2.74 F(`^')-.666 E 2.739('a)-.666 G .489(nd `)-2.739 F(`$') -.666 E .489(', meaning the be)-.666 F(gin-)-.135 E 1.235 (ning and end of a line, respecti)321.6 376.5 R -.135(ve)-.225 G(ly).135 E(.)-.585 E F1(Ex)5.736 E F2 1.236(has the follo)3.486 F(wing)-.225 E (additional special characters:)321.6 387.5 Q F4 11.25(.&*[]~)391.056 398.5 S F2 2.907 -.72(To u)321.6 409.5 T 1.467 (se one of the special characters as its simple graphic).72 F .636 (representation rather than with its special meaning, precede)321.6 420.5 R 1.513(it by a backslash \(\\\).)321.6 431.5 R 1.513 (The backslash al)6.013 F -.09(wa)-.09 G 1.512(ys has a special).09 F (meaning.)321.6 442.5 Q(Computing Services, U.C. Berk)72 767 Q(ele)-.09 E 290.484(yA)-.135 G(pril 3, 1979)-290.484 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 39.185(Name Abbr)96.06 83 R 140.75 (Description Examples)97.795 F/F1 9/Times-Roman@0 SF(\(.\))72 113.25 Q /F2 9/Times-Bold@0 SF 46.494(append a)B F1(Be)195.3 113.25 Q .594 (gins te)-.135 F .595(xt input mode, adding lines to the b)-.135 F(uf) -.18 E .595(fer after the)-.225 F .186 (line speci\214ed. Appending continues until `)195.3 124.25 R(`.)-.666 E 1.517 -.666('' i)-.63 H 2.435(st).666 G .185(yped alone)-2.435 F 2.438 (at the be)195.3 135.25 R 2.438(ginning of a ne)-.135 F 4.688(wl)-.225 G 2.438(ine, follo)-4.688 F 2.438(wed by a carriage)-.225 F(return.)195.3 146.25 Q/F3 9/Times-Italic@0 SF(0a)2.25 E F1(places lines at the be)2.25 E(ginning of the b)-.135 E(uf)-.18 E(fer)-.225 E(.)-.495 E(:)424.8 113.25 Q F2(a)A(Thr)424.8 124.25 Q(ee lines of text)-.162 E(ar)424.8 135.25 Q 2.25(ea)-.162 G(dded to the b)-2.25 E(uffer)-.18 E (after the curr)424.8 146.25 Q(ent line.)-.162 E(.)424.8 155.05 Q F1(:) 424.8 166.05 Q(\(.,.\))72 190.25 Q F2 43.506(change c)B F1 1.832 (Deletes indicated line\(s\) and initiates te)195.3 190.25 R 1.831 (xt input mode to)-.135 F .366(replace them with ne)195.3 201.25 R 2.616 (wt)-.225 G -.135(ex)-2.616 G 2.616(tw).135 G .366(hich follo)-2.616 F 2.616(ws. Ne)-.225 F 2.617(wt)-.225 G -.135(ex)-2.617 G 2.617(ti).135 G 2.617(st)-2.617 G(er)-2.617 E(-)-.18 E(minated the same w)195.3 212.25 Q (ay as with)-.09 E F3(append)2.25 E F1(.)A(:)424.8 190.25 Q F2(5,6c)A (Lines 5 and 6 ar)424.8 201.25 Q(e)-.162 E(deleted and r)424.8 212.25 Q (eplaced by)-.162 E(these thr)424.8 223.25 Q(ee lines.)-.162 E(.)424.8 232.05 Q F1(:)424.8 243.05 Q(\(.,.\))72 267.25 Q F2(copy)A F3(addr)2.25 E F2(co)35.505 E F1 .764(Places a cop)195.3 267.25 R 3.013(yo)-.09 G 3.013(ft)-3.013 G .763(he speci\214ed lines after the line indicated) -3.013 F(by)195.3 278.25 Q F3(addr)2.637 E F1 4.887(.T)C .387(he e) -4.887 F .387(xample places a cop)-.135 F 2.637(yo)-.09 G 2.637(fl) -2.637 G .387(ines 8 through 12,)-2.637 F(inclusi)195.3 289.25 Q -.135 (ve)-.225 G 2.25(,a).135 G(fter line 25.)-2.25 E(:)424.8 267.25 Q F2 (8,12co 25)A F1(Last line copied is printed)424.8 278.25 Q(:)424.8 287.05 Q(\(.,.\))72 311.25 Q F2 48.015(delete d)B F1(Remo)195.3 311.25 Q -.135(ve)-.135 G 3.579(sl).135 G 1.329(ines from the b)-3.579 F(uf)-.18 E 1.329(fer and prints the current line)-.225 F(after the deletion.) 195.3 322.25 Q(:)424.8 311.25 Q F2(13,15d)A F1(Ne)424.8 322.25 Q 2.25 (wc)-.225 G(urrent line is printed)-2.25 E(:)424.8 331.05 Q F2(edit)72 361.75 Q F3(\214le)2.25 E F2(edit!)72 372.75 Q F3(\214le)2.25 E F2(e) 157.5 361.75 Q(e!)157.5 372.75 Q F1 1.144(Clears the editor b)195.3 361.75 R(uf)-.18 E 1.144(fer and then copies into it the named)-.225 F F3(\214le)195.3 372.75 Q F1 2.671(,w)C .421 (hich becomes the current \214le.)-2.671 F .42(This is a w)4.921 F .42 (ay of shift-)-.09 F .392(ing to a dif)195.3 383.75 R .392 (ferent \214le without lea)-.225 F .393(ving the editor)-.18 F 4.893(.T) -.495 G .393(he editor)-4.893 F 1.208(issues a w)195.3 394.75 R 1.208 (arning message if this command is used before)-.09 F(sa)195.3 405.75 Q .412(ving changes made to the \214le already in the b)-.18 F(uf)-.18 E .413(fer; using)-.225 F(the form)195.3 416.75 Q F2(e!)2.25 E F1 -.135 (ove)2.25 G(rrides this protecti).135 E .27 -.135(ve m)-.225 H (echanism.).135 E(:)424.8 361.75 Q F2 2.25(ec)C(h10)-2.25 E F1 (No write since last change)424.8 372.75 Q(:)424.8 383.75 Q F2(e! ch10)A F1("ch10" 3 lines, 62 characters)424.8 394.75 Q(:)424.8 403.55 Q F2 (\214le)72 438.75 Q F3(name)2.25 E F2(f)52.254 E F1 .344(If follo)195.3 438.75 R .344(wed by a)-.225 F F3(name)2.594 E F1 2.594(,r)C .344 (enames the current \214le to)-2.594 F F3(name)2.593 E F1 4.843(.I)C(f) -4.843 E(used without)195.3 449.75 Q F3(name)2.25 E F1 2.25(,p)C (rints the name of the current \214le.)-2.25 E(:)424.8 438.75 Q F2 2.25 (fc)C(h9)-2.25 E F1("ch9" [Modi\214ed] 3 lines ...)424.8 449.75 Q(:) 424.8 460.75 Q F2(f)A F1("ch9" [Modi\214ed] 3 lines ...)424.8 471.75 Q (:)424.8 480.55 Q(\(1,$\))72 504.75 Q F2 42.498(global g)B(global/)33.3 E F3(pattern)A F2(/)A F3(commands)A F1(\(1,$\))72 515.75 Q F2 39.501 (global! g!)B F1(or)2.25 E F2(v)2.25 E F1 .802(Searches the entire b) 195.3 515.75 R(uf)-.18 E .802(fer \(unless a smaller range is speci-) -.225 F 1.6(\214ed by line-number pre\214x)195.3 526.75 R 1.599 (es\) and e)-.135 F -.135(xe)-.135 G(cutes).135 E F3(commands)3.849 E F1 (on)3.849 E -1.935 -.225(ev e)195.3 537.75 T 1.191(ry line with an e) .225 F 1.191(xpression matching)-.135 F F3(pattern)3.442 E F1 5.692(.T)C 1.192(he sec-)-5.692 F .033(ond form, abbre)195.3 548.75 R .033 (viated either)-.225 F F2(g!)2.283 E F1(or)2.283 E F2(v)2.283 E F1 2.283 (,e)C -.135(xe)-2.418 G(cutes).135 E F3(commands)2.283 E F1(on)2.283 E (lines that)195.3 559.75 Q F3(do not)2.25 E F1(contain the e)2.25 E (xpression)-.135 E F3(pattern)2.25 E F1(.)A(:)424.8 504.75 Q F2 (g/nonsense/d)A F1(:)424.8 513.55 Q(\(.\))72 581.75 Q F2 53.01(insert i) B F1 1.299(Inserts ne)195.3 581.75 R 3.549(wl)-.225 G 1.299(ines of te) -3.549 F 1.3(xt immediately before the speci\214ed)-.135 F 2.415 (line. Dif)195.3 592.75 R .165(fers from)-.225 F F3(append)2.415 E F1 .165(only in that te)2.415 F .164(xt is placed before,)-.135 F .749 (rather than after)195.3 603.75 R 2.999(,t)-.36 G .75 (he indicated line.)-2.999 F .75(In other w)5.25 F(ords,)-.09 E F2(1i)3 E F1(has)3 E(the same ef)195.3 614.75 Q(fect as)-.225 E F2(0a)2.25 E F1 (.)A(:)424.8 581.75 Q F2(1i)A(These lines of text will)424.8 592.75 Q (be added prior to line 1.)424.8 603.75 Q(.)424.8 614.75 Q F1(:)424.8 625.75 Q(\(.,.+1\))72 647.75 Q F2 45.927(join j)B F1 .581 (Join lines together)195.3 647.75 R 2.831(,a)-.36 G .58 (djusting white space \(spaces and tabs\))-2.831 F(as necessary)195.3 658.75 Q(.)-.585 E(:)424.8 647.75 Q F2(2,5j)A F1 (Resulting line is printed)424.8 658.75 Q(:)424.8 669.75 Q (Computing Services, U.C. Berk)72 767 Q(ele)-.09 E 290.484(yA)-.135 G (pril 3, 1979)-290.484 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 39.185(Name Abbr)96.06 83 R 140.75 (Description Examples)97.795 F/F1 9/Times-Roman@0 SF(\(.,.\))72 113.25 Q /F2 9/Times-Bold@0 SF 59.004(list l)B F1 .01 (Prints lines in a more unambiguous w)195.3 113.25 R .01(ay than the) -.09 F/F3 9/Times-Italic@0 SF(print)2.26 E F1(com-)2.26 E .002 (mand does. The end of a line, for e)195.3 124.25 R .001 (xample, is mark)-.135 F .001(ed with a)-.09 F -.666(``)195.3 135.25 S ($').666 E(', and tabs printed as `)-.666 E(`^I')-.666 E('.)-.666 E(:) 424.8 113.25 Q F2(9l)A F1(This is line 9$)424.8 124.25 Q(:)424.8 133.05 Q(\(.,.\))72 163.75 Q F2(mo)A -.09(ve)-.09 G F3(addr)2.34 E F2(m)33.192 E F1(Mo)195.3 163.75 Q -.135(ve)-.135 G 3.378(st).135 G 1.129 (he speci\214ed lines to a position after the line indi-)-3.378 F (cated by)195.3 174.75 Q F3(addr)2.25 E F1(.)A(:)424.8 163.75 Q F2 (12,15m 25)A F1(Ne)424.8 174.75 Q 2.25(wc)-.225 G (urrent line is printed)-2.25 E(:)424.8 183.55 Q(\(.,.\))72 207.75 Q F2 40.005(number nu)B F1(Prints each line preceded by its b)195.3 207.75 Q (uf)-.18 E(fer line number)-.225 E(.)-.495 E(:)424.8 207.75 Q F2(nu)A F1 4.5(10 This)433.8 218.75 R(is line 10)2.25 E(:)424.8 227.55 Q(\(.\))72 251.75 Q F2 56.502(open o)B F1 -.72(To)195.3 251.75 S 3.485(oi).72 G -1.71 -.36(nv o)-3.485 H(lv).36 E 1.235(ed to discuss here, b)-.135 F 1.235(ut if you enter open mode)-.18 F(accidentally)195.3 262.75 Q 3.497 (,p)-.585 G 1.248(ress the)-3.497 F/F4 7/Times-Roman@0 SF(ESC)3.498 E F1 -.09(ke)3.498 G 3.498(yf)-.045 G(ollo)-3.498 E 1.248(wed by)-.225 F F2 (q)3.498 E F1 1.248(to get back)3.498 F .085 (into normal editor command mode.)195.3 273.75 R F3(Edit)4.585 E F1 .085 (is designed to pre-)2.335 F -.135(ve)195.3 284.75 S (nt accidental use of the open command.).135 E F2(pr)72 306.75 Q(eser) -.162 E 50.787 -.09(ve p)-.09 H -.162(re).09 G F1(Sa)195.3 306.75 Q -.135(ve)-.18 G 3.485(sac).135 G(op)-3.485 E 3.485(yo)-.09 G 3.486(ft) -3.485 G 1.236(he current b)-3.486 F(uf)-.18 E 1.236 (fer contents as though the)-.225 F 1.133(system had just crashed.)195.3 317.75 R 1.133(This is for use in an emer)5.633 F(genc)-.162 E(y)-.135 E .323(when a)195.3 328.75 R F3(write)2.573 E F1 .323(command has f)2.573 F .323(ailed and you don')-.09 F 2.573(tk)-.162 G(no)-2.573 E 2.574(wh) -.225 G -.225(ow)-2.574 G(else to sa)195.3 339.75 Q .27 -.135(ve y)-.18 H(our w).135 E(ork.\207)-.09 E(:)424.8 306.75 Q F2(pr)A(eser)-.162 E -.09(ve)-.09 G F1(File preserv)424.8 317.75 Q(ed.)-.135 E(:)424.8 328.75 Q(\(.,.\))72 361.75 Q F2 51.003(print p)B F1(Prints the te)32.796 E (xt of line\(s\).)-.135 E(:)424.8 361.75 Q F2(+2,+3p)A F1 (The second and third lines)424.8 372.75 Q(after the current line)424.8 383.75 Q(:)424.8 394.75 Q F2(quit)72 428.75 Q(quit!)72 439.75 Q(q)157.5 428.75 Q(q!)157.5 439.75 Q F1 .247(Ends the editing session.)195.3 428.75 R -.99(Yo)4.747 G 2.497(uw).99 G .247(ill recei)-2.497 F .516 -.135(ve a w)-.225 H .246(arning if you).045 F(ha)195.3 439.75 Q .345 -.135(ve c)-.18 H .075(hanged the b).135 F(uf)-.18 E .076 (fer since last writing its contents to the)-.225 F .087 (\214le. In this e)195.3 450.75 R -.135(ve)-.225 G .087 (nt you must either type).135 F F2(w)2.336 E F1 .086(to write, or type) 2.336 F F2(q!)2.336 E F1(to e)195.3 461.75 Q (xit from the editor without sa)-.135 E(ving your changes.)-.18 E(:) 424.8 428.75 Q F2(q)A F1(No write since last change)424.8 439.75 Q(:) 424.8 450.75 Q F2(q!)A F1(%)424.8 461.75 Q(\(.\))72 483.75 Q F2 -.162 (re)C(ad).162 E F3(\214le)2.25 E F2(r)46.674 E F1 1.231(Places a cop) 195.3 483.75 R 3.481(yo)-.09 G(f)-3.481 E F3(\214le)3.481 E F1 1.231 (in the b)3.481 F(uf)-.18 E 1.232(fer after the speci\214ed line.)-.225 F .989(Address 0 is permissible and causes the cop)195.3 494.75 R 3.238 (yo)-.09 G(f)-3.238 E F3(\214le)3.238 E F1 .988(to be)3.238 F 1.018 (placed at the be)195.3 505.75 R 1.018(ginning of the b)-.135 F(uf)-.18 E(fer)-.225 E 5.518(.T)-.495 G(he)-5.518 E F3 -.333(re)3.268 G(ad).333 E F1(command)3.268 E 1.816(does not erase an)195.3 516.75 R 4.066(yt)-.135 G -.135(ex)-4.066 G 4.066(ta).135 G 1.815(lready in the b)-4.066 F(uf) -.18 E(fer)-.225 E 6.315(.I)-.495 G 4.065(fn)-6.315 G 4.065(ol)-4.065 G (ine)-4.065 E(number is speci\214ed,)195.3 527.75 Q F3(\214le)2.25 E F1 (is placed after the current line.)2.25 E(:)424.8 483.75 Q F2 (0r new\214le)A F1("ne)424.8 494.75 Q(w\214le" 5 lines, 86 characters) -.225 E(:)424.8 503.55 Q F2 -.162(re)72 549.75 S(co).162 E -.09(ve)-.09 G(r).09 E F3(\214le)2.25 E F2 -.162(re)43.614 G(c).162 E F1(Retrie)195.3 549.75 Q -.135(ve)-.225 G 3.316(sac).135 G(op)-3.316 E 3.316(yo)-.09 G 3.316(ft)-3.316 G 1.066(he editor b)-3.316 F(uf)-.18 E 1.067 (fer after a system crash,)-.225 F 1.947 (editor crash, phone line disconnection, or)195.3 560.75 R F3(pr)4.196 E (eserve)-.333 E F1(com-)4.196 E(mand.)195.3 571.75 Q(\(.,.\))72 593.75 Q F2 33.003(substitute s)B(substitute/)195.3 593.75 Q F3(pattern)A F2(/)A F3 -.333(re)C(placement).333 E F2(/)A(substitute/)195.3 604.75 Q F3 (pattern)A F2(/)A F3 -.333(re)C(placement).333 E F2(/gc)A F1 2.532 (Replaces the \214rst occurrence of)195.3 615.75 R F3(pattern)4.782 E F1 2.532(on a line with)4.782 F F3 -.333(re)195.3 626.75 S(placement).333 E F1 5.173(.I)C .673(ncluding a)-5.173 F F2(g)2.923 E F1 .673 (after the command changes all)2.923 F .376(occurrences of)195.3 637.75 R F3(pattern)2.626 E F1 .376(on the line.)2.626 F(The)4.876 E F2(c)2.626 E F1 .377(option allo)2.626 F .377(ws the)-.225 F .653 (user to con\214rm each substitution before it is made; see the)195.3 648.75 R(manual for details.)195.3 659.75 Q(:)424.8 593.75 Q F2(3p)A F1 (Line 3 contains a misstak)424.8 604.75 Q(e)-.09 E(:)424.8 615.75 Q F2 (s/misstak)A(e/mistak)-.09 E(e/)-.09 E F1(Line 3 contains a mistak)424.8 626.75 Q(e)-.09 E(:)424.8 635.55 Q .32 LW 144 690 72 690 DL/F5 8 /Times-Roman@0 SF 2.738<8759>72 700 S .738(ou should seek assistance fr\ om a system administrator as soon as possible after sa)-3.618 F .738 (ving a \214le with the)-.16 F/F6 8/Times-Italic@0 SF(pr)2.737 E(eserve) -.296 E F5 .737(command, because the pre-)2.737 F(serv)72 710 Q .296 (ed cop)-.12 F 2.296(yo)-.08 G 2.296(ft)-2.296 G .297(he \214le is sa) -2.296 F -.12(ve)-.16 G 2.297(di).12 G 2.297(nad)-2.297 G .297 (irectory used to store temporary \214les, and thus, the preserv)-2.297 F .297(ed cop)-.12 F 2.297(ym)-.08 G .297(ay only be a)-2.297 F -.2(va) -.16 G .297(ilable for a short period).2 F(of time.)72 720 Q F1 (Computing Services, U.C. Berk)72 767 Q(ele)-.09 E 290.484(yA)-.135 G (pril 3, 1979)-290.484 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 39.185(Name Abbr)96.06 83 R 140.75 (Description Examples)97.795 F/F1 9/Times-Bold@0 SF 63.738(undo u)72 113.25 R/F2 9/Times-Roman@0 SF(Re)195.3 113.25 Q -.135(ve)-.225 G .541 (rses the changes made in the b).135 F(uf)-.18 E .541(fer by the last b) -.225 F(uf)-.18 E(fer)-.225 E(-)-.18 E .331(editing command.)195.3 124.25 R .331(Note that this e)4.831 F .33(xample contains a noti\214-) -.135 F(cation about the number of lines af)195.3 135.25 Q(fected.)-.225 E(:)424.8 113.25 Q F1(1,15d)A F2(15 lines deleted)424.8 124.25 Q(ne) 424.8 135.25 Q 2.25(wl)-.225 G(ine number 1 is printed)-2.25 E(:)424.8 146.25 Q F1(u)A F2(15 more lines in \214le ...)424.8 157.25 Q (old line number 1 is printed)424.8 168.25 Q(:)424.8 177.05 Q(\(1,$\))72 201.25 Q F1(write)A/F3 9/Times-Italic@0 SF(\214le)2.25 E F1(w)35.019 E F2(\(1,$\))72 212.25 Q F1(write!)A F3(\214le)2.25 E F1(w!)32.022 E F2 .313(Copies data from the b)195.3 201.25 R(uf)-.18 E .313 (fer onto a permanent \214le. If no)-.225 F F3(\214le)2.564 E F2 .078 (is named, the current \214lename is used.)195.3 212.25 R .077 (The \214le is automati-)4.577 F .317 (cally created if it does not yet e)195.3 223.25 R 2.567(xist. A)-.135 F .317(response containing)2.567 F .604 (the number of lines and characters in the \214le indicates that)195.3 234.25 R 2.196(the write has been completed successfully)195.3 245.25 R 6.696(.T)-.585 G 2.196(he editor')-6.696 F(s)-.495 E -.18(bu)195.3 256.25 S .34(ilt-in protections ag).18 F .34(ainst o)-.045 F -.135(ve) -.135 G .339(rwriting e).135 F .339(xisting \214les will in)-.135 F .144 (some circumstances inhibit a write.)195.3 267.25 R .144(The form)4.644 F F1(w!)2.394 E F2 .144(forces the)2.394 F (write, con\214rming that an e)195.3 278.25 Q(xisting \214le is to be o) -.135 E -.135(ve)-.135 G(rwritten.).135 E(:)424.8 201.25 Q F1(w)A F2 ("\214le7" 64 lines, 1122 characters)424.8 212.25 Q(:)424.8 223.25 Q F1 2.25<778c>C(le8)-2.25 E F2("\214le8" File e)424.8 234.25 Q(xists ...) -.135 E(:)424.8 245.25 Q F1(w! \214le8)A F2 ("\214le8" 64 lines, 1122 characters)424.8 256.25 Q(:)424.8 265.05 Q (\(.\))72 306.75 Q F1(z)A F3(count)2.25 E F1(z)51.012 E F2 .916 (Prints a screen full of te)195.3 306.75 R .915 (xt starting with the line indicated;)-.135 F(or)195.3 317.75 Q 3.238 (,i)-.36 G(f)-3.238 E F3(count)3.238 E F2 .988 (is speci\214ed, prints that number of lines.)3.238 F -.999(Va)5.489 G (ri-).999 E(ants of the)195.3 328.75 Q F3(z)2.25 E F2 (command are described in the manual.)2.25 E F1(!)72 350.75 Q F3 (command)A F2(Ex)195.3 350.75 Q 1.132 (ecutes the remainder of the line after)-.135 F F1(!)3.382 E F2 1.132 (as a)3.382 F/F4 7/Times-Roman@0 SF(UNIX)3.381 E F2(com-)3.381 E 4.687 (mand. The)195.3 361.75 R -.18(bu)4.687 G -.225(ff).18 G 2.437 (er is unchanged by this, and control is).225 F 1.451 (returned to the editor when the e)195.3 372.75 R -.135(xe)-.135 G 1.451 (cution of).135 F F3(command)3.701 E F2(is)3.701 E(complete.)195.3 383.75 Q(:)424.8 350.75 Q F1(!date)A F2(Fri Jun 9 12:15:11 PDT 1978) 424.8 361.75 Q(!)424.8 372.75 Q(:)424.8 381.55 Q(control-d)72 405.75 Q .405(Prints the ne)195.3 405.75 R(xt)-.135 E F3(scr)2.655 E(oll)-.405 E F2 .405(of te)2.655 F .405(xt, normally half of a screen. See)-.135 F (the manual for details of the)195.3 416.75 Q F3(scr)2.25 E(oll)-.405 E F2(option.)2.25 E(\(.+1\))72 438.75 Q .949(An address alone follo) 195.3 438.75 R .949(wed by a carriage return causes the)-.225 F .298 (line to be printed.)195.3 449.75 R 2.549(Ac)4.798 G .299 (arriage return by itself prints the line)-2.549 F(follo)195.3 460.75 Q (wing the current line.)-.225 E(:)424.8 438.75 Q (the line after the current line)424.8 449.75 Q(:)424.8 458.55 Q F1(/)72 489.25 Q F3(pattern)A F1(/)A F2 2.436(Searches for the ne)195.3 489.25 R 2.436(xt line in which)-.135 F F3(pattern)4.686 E F2 2.436(occurs and) 4.686 F(prints it.)195.3 500.25 Q(:)424.8 489.25 Q F1(/This patter)A(n/) -.135 E F2(This pattern ne)424.8 500.25 Q(xt occurs here.)-.135 E(:) 424.8 509.05 Q F1(//)72 533.25 Q F2(Repeats the most recent search.) 195.3 533.25 Q(:)424.8 533.25 Q F1(//)A F2 (This pattern also occurs here.)424.8 544.25 Q(:)424.8 553.05 Q F1(?)72 577.25 Q F3(pattern)A F1(?)A F2(Searches in the re)195.3 577.25 Q -.135 (ve)-.225 G(rse direction).135 E(for)195.3 588.25 Q F3(pattern)2.25 E F2 (.)A F1(??)72 610.25 Q F2(Repeats the most recent search,)195.3 610.25 Q (mo)195.3 621.25 Q(ving in the re)-.135 E -.135(ve)-.225 G (rse direction).135 E(through the b)195.3 632.25 Q(uf)-.18 E(fer)-.225 E (.)-.495 E(Computing Services, U.C. Berk)72 767 Q(ele)-.09 E 290.484(yA) -.135 G(pril 3, 1979)-290.484 E EP %%Trailer end %%EOF nvi-1.81.6/docs/exref/grohtml-7914-1.png0100644000076400001440000000603310720065717016443 0ustar skimousers‰PNG  IHDR)ó tRNS”ý®bKGDÝŠ¤ ÆIDATxœíÛ PWp¾j‰Ò&âMZ[P¨Ús¨äœVœXBk§Ð©-ε•ë¡ÐjKLýhÚ€§Áhmkz3N¯×J¬ö„M‘öP¨–¤$Åå£À †(„$lÞínäkc8´Ç]÷?°Ù}oóãŸÍ¾Ý}o—àWYí´Ü°ZKkHÍB¶‘y4¼n z9G.Ƶ}ÂÀÀHÈ{¶%g12öQ€¢[Ó½QøÚòþÝ_¿¨ü´¯GÇÛkQ—b¶~ë\sÑ òæ´äÜåIáoáóKM»¿ù@yú†”HSßÖ®¡¢CVXy‚–œ8_ˆ(©) êf‹GŒá I YáÁuu06%P(Þؾ27Ù‚„OL0}N…6ƒ·Uý@Úœ Í“ClÒÍu+n˜\&“ŒÛ‡p„l tã ÇÑ€a|¶¯°[¥ÛµsI…í[ Ž tj qD%¨¥ê}#À`¶#gÆ6nA²8öxœ„ÑÀ I‚Ƚf1`¯N‘äÿŠÔ,³±¿â?Ç-ŒP½2k;1Ç–È—Td* äfÒ‰~mŒ)@(a´²D¡ù†Åc¢¡Ya§-‘ˆ¤ÙÝ!=QM™TPÈ-Aài“ …Pˆ?O›Ln O›L(„B(„B~bèv-Ú‡õ;­( P3„€Íf3á¥èøÄhõD`“ɵ¨µâ«[Qìׄw`0à=(+E°”É,±±2ûR>¹†!X&™¬x&¥8‚Ž#FC„'bVÆ(– 6„@Š–E °ÙÁìÑôG9mÌÑêè0Iýûæ‚™{f°eRζ#^áBÝŽÓka÷Þi)9õý]hÆ\¡y­M]º8â_Ï¡%Å{—謻Ðãå㘇§¹NHË[=½–’’/õhFWù†(‹Oõ²#™8òGOdwYd@¤Äi›ì+`ö‹fÓFhsïkMÈfDßùËܬèM+ß‹”Ôpr¹ç6©4¹ì9‡Õé‹@Çç`ÏLƒëÀžs N]® òDHÞïfòªéÔv<ËFÄ^ÝàfÛÛ\.CÀѽ¤C ØöÜÁv|\ û…­AñÑ;ÐE,àß áXŽߎ\sB 8RÕQÍÃ|!só’¥õô¯’F.—.|^]-Î*<Íãöt•þéùo»¶`ïY㇚¬Îs¤QÛ‘¯Ý¿í“ ËÉ>Îꜜ]ò§ U’“œŽ_†0dZ£yÇxÖ¢á]åhÏm;ša)K.â\T 0d!Ü÷s²œÓ9„uºËyT©yGÎ×Ç‘V‡$V=¾H½`gbjîºÞô¸‚ÙrúåŽÔÃëTXs ¼ bæ´Îó•‰}u2qÛÙ­@&· A€mt|hAsuwÖ´løˆÝh·LP›e|^ç˜ ˆ/ÂNl&™8#ë=[Ū™ÛßHÛn\D†¨¤{¥˪c—©÷ÇÑyÌ‘'XI.È[_¬ã|¨.yý%ùð)2D­íœa9ÙðÈÉ:÷D$ò†µß-t©kñKœpÖÖ—–#M»-rµB~Q³tïWÅ©\‘ëÍåJùo!CÞ eQEé=0r§dž™2±MÍX0/>êþIž$P°q^PBmN[”*©?!4ŒÓ ˜µ¡nÛ¤ÒD|îA •zÜp v/ ö–—5ß$G ÷²=Öñt«÷J‘IÅíB|üL|Ä{l°~:°y3ڀ߫øm$Ö&PŸˆGlc· ð»;:=ÖÄÌXS€mÄHJH>“êñgMM8bË„©9ÁȃL¬ÁÅ ¹ w„Öõ æTg§³;ê7?(ÎÁó‘#5ÙiA;êúW…ï C´%[iMÛ‰µÚ|EíÞQîcehÆœf½ )&kíðBËœ–×b®[׿C†è{èY`Jy£h­¶\ñ÷2‹~×gÒÙ‚!…9e_Zšt^¿Ôc]¿îR›½ Òžd\þdbA¨j»Q¼­:‹Æèh»;ö`\ ‘ÛÃW¦3"UY‡“"ɉݱ7“‰Ã^¦cüÎ¾Òøý@/ÈÄ€î"+ »ü%_ÈDÈì#zÞnámkÐ/ÄߘÖB<Ê͵¥º¢Æö+¼AØðçRžu~g‚ÚŸM%½Çè"ýnñû2«Ù`€¼½öÑV|ÑDhDxùˆWįL´Š/›3{4©¼rø?GrD³ UI'‚ nò4ªÔké$‘É…P…P°_ ˸cKijíùøä’ãŽ<á‡fÈqâůG%qƒîlBÆ¥ÄáPç˜Cð;J0v¥†ß!¢Ô„¯ÐûF¹Õ,¬3ËKôqDïŠ@_²Î^ð@ÌW>}Õ¾`ÿ7Z)óJâu–ä 3‚-;˜Pß_š–(mh=³yÑu¬P^{žã‰4žÜäŒ\©y®_#Óö ºB°´ æó“µù×”U¥ú5ø36°äêg[œ‘æšW5ú”¥8’©œ³àHж\«ü¹TŸ«ÑÙ]ÆœÍvÞ&âܤ¾`URþ¾ðä<‰8àÛþÃá´àªÄöÖ£ª$¬Hcxl“Jï—€\–ÿ²Lš4ñMº—Ï‘"eíB>¿XøbK*Ÿ¿‚ôãÔŇÇE>9ûA„sïèÆÕOdžÇÑÃi!$ˆÿýÙÿ62Þ¤¦uÛùMxÚdrKxÚdB!B!B!B!B!B!B!B!ò[ ÿb }5\ÂIEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-2.png0100644000076400001440000000743410720065717016452 0ustar skimousers‰PNG  IHDRûhxo’tRNS”ý®bKGDÝŠ¤ÇIDATxœíÜ TW¾ð Êòá9]i»%÷Ó]ÙV»"ñHlíʶU,È‚«+SuAq@è çD£eweW%e÷=Û-&>¤6•‚ÝJñ °‰qøPÙ6…€ldHîÎI àõA÷äŽCîLæÇ?“{çÞ;3Èt¡#—ˆGp  fÌ „Ô6Ôîí¬‰{›D¬@"p €›‘qo¦ c"–-mˆ®+Øu}À¿ïíŽóQÏì o8ò–,ÿn tëÝí_þàÝÚÕƒÇ _X¡2ÖÞø"=T¿ú Aº³uMyÜgm­wº³c³c3¤ÿ¸o¬myð… Y¿A¹é~l¿ óßcµñûØ‹ç-ê+õ‹àx,îcñ˜0”v+¨f `„À1Û£¯úe0•˜“Àh&ë2q(›¢Œÿº‰ÚÌPê+¯™ÜÕ0• `’P“À2(iö=~ñxÈFÿÉÑîõg—DµïòeŸÊc ¨ŽÉä—C3ÖÝ¿)IÛ,W,TGj×éÿqGÊP€.sûý¶Ð´X¹bü íö–Z˜W£}ƒKCO´—°±ç5xEV|ä>Œ2ì‚~¯ÿO€7SÀi¸àæPoS € ÑðCâ<Ž®¤F5<²ÐÈýøPeSJ„ µaÐÀ!`Ò¡äÀ«½IoxHÆ~Ï1Ð3 tÕ¿dŸA(}³¥D&{«óåã»ή \Â+.\K ´ú_(.ºRy#‡Xñ-ªår{À;äv¨- Ö·føT«Ðð3|´L¶5ÑIˤ=eÚËÄ "CM…=À{KŽŒ~wz¥:¢æ “nU౩LÚ#ÓÂ$ ´ÜßþY€í1Èëä,þ$¿ñðjþÍ\ŽßÚ,~7øŠïÃlþMa=þV·Òfã¸WwŒ8ß×Ißo5uS/t–CQŠÀ¥¥9HJî5âûÍâç0‡¨¶L9tƒälÍ4•_5ã:sïƒI2°:; ‡€#Y÷ÀAØQÁ-ÚL´+^‘Ã:}Â:èæð¹}è3Lu!9²DWZr¸{¥ö¸cÈØg,»¶:&Lvq§êÍPš½±¿j­~íç—3qF™fuì™ì®ÊÈÈå/ö ûñ h¨ˆ3/ëTç¶–oÈ ¿ŸÒ]  Æ<•L2ÎaLòHˆs``òÍs²-¸à¦h°±ÔÌXž_$N h75ÚOœ›P{ ;c‘FN‘á‰E`ÿb æÒ(±î§#Þª >^uU0Û À là¼q@Ärí5#ÔH !f!9äÊyxL}cæbƒ, ì±¶”¨FPCÕïr¥ó³`fµƒA¨Ø £€ÎSô¯ü ú½ñæÓwüÁåµgŸÛ‘t8Ðë¿ÃSÞ,yøÊ{¥ÑO±oÞ‘²œ’+2U¯+ðc©2ˆ!2X¡-Ï$g—ǪŒŸÖxb›åù9G5Qt=SµD/Â<±ˆRñ+mù¡¸¶²Ëw©Œòš½X¬ü¼2ç¬&R*U¾ ;OäòQV‘צ¯xpwæ‡ÍÊ;{ôËù…ìºð¤ädbNÅ.HšïVðèæ nNêù°íE)šáÖ¤ÀY¸Ø‚yMäÍpß 0–ä]„øža½‡Wppy` yÎH†aƒ¡ÔpžaB©»(†Às¥ÈÞà:xÙVgB̨€ÈÅ„cÀW8‘uÍëÚï=ëGJhº’OÅì0·4e‰[XÀ¦] ¥3åí†džf(€/)¾^­ÎhÓÖBiûªwŸ^l*CäÞ©ªá÷1AHÓ¤>ûO… Ñ;`•âŸÀ›P©>5Ê/Jeˆü@ªªE†   }¨P¡ãmT|­¤-pòjäPÞröIaÁ ¶›ÛÉÅnËÌž]žKôõu?,|ÂBÀ‰£¼¢–=Ìr?;Y=˜x»Ãæf}1ÝŠ$ž)0s 'IüÑK?SÈ â ñ%è'lš* ž°PÒì“'áìôvÓ;˜.;TÇÂ¥‹Ÿ¾¢»6Ý TÊ8iæcÍÅÿÑ iv`\f‹YÉËYøS´» Î€©… pÓÐYÏ`Æ:ë¸àþc ¨1ÌRBà¢Q7ŒꪃŽH×À•Ô€ 1à.Ä@Á9{@çÙ€ÎòPÈQ£Ü±¢Gg øƒ{'[@gBaB3Ö jP`8瘈·˜º&mñ¶À·›r‚¸¹Åþ’‚ÝëO‰[‹–×»ù÷rØ%}¢ƒ^Ѩ鴴Ҝ–è?[ƒv ~ÑzKšÿå½¾ÞÌFÏ‘òœ&1pÓ8`|x¤¿µ?–wG°µEü¹ô\ëݶ=Uç÷Ës¤§0¸ÆÈTž¸—k ˆ"Wyú<áòWæ¾0Ï]¬åä_ \ÚëË.|‡î…€²ùö@-0I,ÛÿnþI-á5@ ¯±À$a‘áeœno™ maÊ»xƒ8C`‘iÕG¨i>m@8 †8r‡nìX"qˆ—Åño‡]o/öÛK tó뚊:Î/ˆO=­*ûzP¹í'´Àm£2aëEžCà’6>µQ%ûfPùvýGØ·>‰åíx¶âïæ6/:÷TÝÞùœI"‟ˆ¦*·#ÀÉŸ|s 0ˆî™ÀÌ"€Îz3ÐYÏÀ¸à\€ p.À¸à\€ ø^ÿ—ÝÜèlüœÎIEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-3.png0100644000076400001440000000073110720065717016444 0ustar skimousers‰PNG  IHDROn)êåtRNS”ý®bKGDÝŠ¤„IDATxœcø´$?–”ÿ.ù¹§¢Onâü#é“Útþñ7rz_ãSðÿÿ;•"[Ãy/t40`ríiô­öß®.Ÿw•ÿõzÎg[WÔ˯=m°}qn Ð-¿j·òËÖã7äjô­çñßÃó€†Ä]-½¾ðÚÖÕûõ×®7Ÿœ[4dkÕÞ­åWñ2‰‘ñ ÷# }2,½Gü›Z&¸ä±«0y4_S4øÿÿHƒKŸ~ï ‚¿â=Vqb ÁÐgÈOjBÐÊÛÒõÀp¬ÿÿýÿïÿ¿3®“gÈ­Õ@Cö×ÿÿÿhH(¦!û‰2¨ dÈw!µD8k˜ÈÿìW<¨â󸥞@äâ6dýÿ©ù;“ß–fD?Á–BöcÈ¿õÿC󷦾-Íž}•l—ü“ÇÂÞ(ð(QűÅþ0šÈ1äÿ~pFÁÈ-¤T1ä<5 !Œ2jȨ!£†Œ2jȨ!£†Œ2jȨ!£†Œ2jȨ!ÃÇôVa°+YIEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-4.png0100644000076400001440000000466510720065717016457 0ustar skimousers‰PNG  IHDRó 0ÒdtRNS”ý®bKGDÝŠ¤ `IDATxœíÚPÙðð£å‡W‹â”XÛi=ÉÑëqwÕ 2‚=îŸÂ”ã‡Êœ:pHщ:‚,rþ8J<üqõÇx5¥sW©™„s”p@Í*r¡VÀ+^°M< ÂhŽ,‘æ$›×ÝlBBظ©ƒÎíwd7÷>¾Íîãå}w À%TD†‰— x`TÑÏ‚LÑÁê[ÁÆ#‡ïéùAÔÐ@œÞA”ž7 V‚Uøž¶ß“è‡×°/(ëüñ+EJ ]¯f[ÒB*«Ù/æøùž{x†û÷×Ã3Ü?ãÏxÆ?'þ[÷_f|Ùˆ¯Jñu®"V »œ•î‹M|ýêîñ QÛDKxµýƃ‡RÞq”ØÄƈ÷oóM_2­³Ç± ·Új ÜÑ…s>ëè¬àlú oÁIë²Õ©=ËÆªÏê‚Õ#\…ÿz²×w›³ùõ¯k®^éû+ônU—(#âÙÚ/Šô’íÐTgŠÏáßjÒ\m̾g½Bø‡ ãŠ]ÚË"½¤v÷{Ö'M~ÿ¸#ï|t/h œµ”µ8+K8¢M0q>Ô 6 žÒ¿ÌKŠOœ5˜¢¿þˆâ÷“C8÷Š'‚ç§§Šgá­F`Í ^ܶýXž@ÀL&iV0êKÿFrÈbƒ³™ôøE¨À‡¶Oý;<ëÆ„W£@è“?¸I^TXÆ]\À»?ú¥.v‹´@wAÕYñjÅ’…W¯î»òÚåBP8WÈ®4®ÉÄTš¿×UüÛ=Ÿ¤ðw²¢@áÃüBT ?~„ûwT†Û*않o”¾ §êȼȈ06«ãf¬.2>/@‡¨*¸«—D{?~[`ˆ£¡ýŒ!ø¤‚Lmçɇ"w¼Q`áùӗxÇ¿Ÿ!6c@E–`|æ6­‚!Ôj¯ñÞ?Ñ }N}KNa}¾õOz¥‹ß?„÷?ä£?sF'80g(R¾Wº~õ,®p|óŽTA»`Û¢Žª ï^y—Ïwµ)[Œüâ¿•5vE˜U%ÛÓW¬íkU†|óâ{Ê¿¸˜ð{Ì'Ь¢SGspßê½ÿª´jNèVŠ©zI\ä¢q5#¿I N[:7µ½Ã»÷{Å| á§'Bè§ŸÏÈ£ñáa™˜-=Ýã£öþ_ÿó0]úá{¶ìMÙ¸•³ò§Â¨ÎmíóØQ„º›éü7?¯xK³¶iåßæj†×µ\ÏÓŠÅÿl¢ žüÃ[û‹r¤ wk†s[ºóºÅâ‹OãµaI)ÉqÇB*#¢îÇË2¢8œÀÀ§ð“Âûý×gë-~zoÁxÆ3þÿêoØ÷·oÛv0ž>Á£SV…Þ¾pr&º˜½‹çç_¦å-qñ]µe<‡'ÞHëïøã†–;¸G U;q¿ËÀ/:ÕЃ‰D ±,š/!Ûœ^°ié[µöR ñ9%­1É_×±«Ùͫʰ>4Us¢C*Ë9›£ËÓ¸´(8¢Ôéa—³é<»VªOL2¿ŸTÓÏb»Ôóœ/oSy[[õdOÑxŸ÷½y_ãy¡-aðH„ïsÖÍâ[«goµekĈ0ñ¤Í-çm…}ñFÒ[Q5OôoËÞ¥^üÑàΈöx]Š%-|+Ïú õºOªÇØáåý[×—þ/_ÿIâÏ’<ú?¥*¹«O7÷½¼¶j2ðxü–ßµ·hí'¯íÃû¯^»¹p¾G/Él.é=§Ï4ç®ÈÅ}ÖcÜ_ØŸ/.å|¥ø™d8G²sУ?ܶfù±€ÿ–ÇÄýØ’t­tž‰eÊûõ†89ç(‹¢l‰Ü™ïÉ“g†rÅØJžG—›pž\ôÞ¥òGÈ+0½'ƒêî9ÿ~ypŒylŒ=²Úî¼!Vⳃ狇'^aF`Äž¸#»·õäÉ*ÂÛ=ðÕ÷ Ô7zç 6%æêú眑¯ZšÓ!L“7 Š ¯ÏßþU_4*ÿÕé2Qæ Xøb–Eq57ïnòfK­¨Þ{ÿ7E"ÍW;à"Qf¯Xÿ¹A¼{\!³ùì– ÑgÞ½†³á†r V°!:¸r€ÕϪüý±Å깡'»×¦æsø´žzÎ|óž¿Åñ<Ž_?½óÍZ¼eO”›˜»¬þzï·Æ)|ׂÁ¤CË{–¿²õ<þ%èÿópB!«‘TÐñÍY|eoîC…ìmÉ”g3¾øk¡O’f©µ ¼œ§èx2ls<­óO†Ð+ÞûŒg<ãgÒ#¨ÛªâJf?0e†O .yž¿í_Vu„  "á•Ìýi%˜³=ñýÕ„86Y ó3j÷°›bñ0£H«WIÿŸí©]GøšÁÄ›ŸèsϽLå[Qdþt).0Ôõwke³WQù~$¤wzÿ¾A2”Žû]¹”Ç qõ»[¸,¡½Ä&6Ä÷W÷Ÿ*]\3¢:þ°{\/38«Üš{8ÿ˜Kr_ÿï&”Ëu%ËÔ×ßì’BÏüø}á¼Myé˧ã í^Ed4¼Öá„VÿÚDyALGxÁ™³ì˜ÎM4|]çâÇM]ï)•HöA:ýKÊÇMb›o¦Ñûñ¶øè °€¶À¹)q/ÞøyѽŞFwÑôfƒñ†úé‡iú€Ä7¦_œ­~$ çoÕí¯ß#þB<\Ñò"É~‘TÜ´bXÓ;þc圽’8×8ôúŸŒÿÞyx†û÷×Ã3Ü?ãÏxÆ3žñŒg<ãÏxÆ3žñ/žÿø6œ3¥ÏÇIEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-6.png0100644000076400001440000000627310720065720016450 0ustar skimousers‰PNG  IHDRŽ€H»tRNS”ý®bKGDÝŠ¤ fIDATxœíÚ Pgððh…Ñ¢àÝ5N{‚@ËÝÔÑiíµŽ‹J«-N[@Aµ•–4ЖÑЫð)b‰79ãã®G¯9ïÆÑ;±Å€ÊòÈ¡NÑxhHIWAe$ )$d“|·»‰Ç.lä¸qnòŸÉnöÛÝ_¾ì~¯}pà4ÃÄñ >á¿/(i×±º àïÎIŸ0‚ Ä/AˆÀ>"aÜ( f8ñiv!4|æ,h‚Ñ  ³Á:h3­#W™³{Cž²/ØÂ]„V`pô(Fæa$$¸ã1‰³°éuÏ‘@í{áñgW ¡­ŒÒ¶ïn+yÆ¿°i­2N2o}rLøú\â÷ÑmY¬³°q›!#ÛIÀÞk+dÅjÝ:}Éõ•ª³ËïßÄds_ Зbü5DМfÙ\—^×x[M#ÔÈkGærI¡«wB­ÓèR¬UòJRØi®WëÔϽRW«J§¸ A€Æž9[yD„ü€Ö^.¦Ø½;>H"â䯴¶n <ª( £ íñäYp @ýƒ€Ð n‰šm&º˜º¯™J`3#ÅjŒüß âBû%o„bj'uà©:2鸘Nà Ž<Ð\—L*´¯Y’ç€Ò8‘­BÙ“Ž,m%¡q‡×šÚf±öñwâ7~ 4§O•hʵotgì×ï ¶«µo¿gl¨,9!d=OU¹6õÏõRB°ÊÌÆ”ц:6yh <`áúÅ*GïöOjò\q Vaùp[ìßLŠ£l{0—%æ3Ê\¢0×EÆÆ˜Y0­`-°¦†>úBSÙöi w2§+¨¦+ñóÓ¼ Ÿà|‚O˜I3@ĵyWÃW2Åh¿;ÜvrP#DµuJ3àF»` ÜFU&0­–Ï'ìO«DÍ[)€1Äþ¤pß=Ûֹ&“‚0r*“òøgÏ.Êmñ»‹£â–~á.œ«sÌü³Zþqj‰ÊÃei%ÿì‹•¬ÿúU›ÏþÎ㙇ÍC òpÒ-º·yÝYòŒ,ýٔ®s‹„«¦Ö…“Ó²¨ è¥¿º˜,Ï^ ä?vÂ]8.vio;âãÏ@ÝŒvÔ<<>ñŒp7~+öñ¨ SÔ‹…Ðì×€tÒ SÔ âb8n'c­à^/Z×õ$j¤òÀ ¸× êºþ»¶’¢¶è9Isýæu:Á½^¨ÜÖ7^G uϧ(3×ÿ»ãS½ø§Ûú¶«¡Vš^™š¡Âè÷zQêv8a/›‡üB’9œ#´y Â©^Èé·xL‚S½(8}<¢B9YÚÇœîXHó»D+FÔ@¬&&œAÐ’—yzâD`Žà˜©•¤€[‰ ŠM%€ á5…ä,°7ðbèïc›¹á¡ "q{î`²¤-rS WÒƒ”=W‘Ò^þ“n¬€Pš¡ã-þ>ãî·íu µٛ‹ÂõkðMX=–¹&}n7¨ÉÛÛÝ7z $jˆR’ñc¥hMƽsŠå BWa¯ZŸ…g`õ•™Yi‚n—‡gwg«G«Ðg áGŽÇÑÜ­½j`DÂ=¢Y·¢¹)mQþÛ’Å=Èÿ—°ž”ò›ÑàëÕþ¥4>˜YÈ?–Aðì&€ç6ÁF˜üáÀö^³à]ÌŒ`ÿßlä3n²÷°ÿ++5º¸íÒ_Œ1 ÔÔíÅZNÕR@!U²'ú ›u2!­ ˜€³ !…‰þ¢„Ah[ݲlþ¯Á@ܺùÜAó`Xa…R‘“³:nH˜¸lá/\ú‹'bh…K²ï“O€ê<í[³åÜrM¹¼Š÷‰ÔpúãÈÎýÅ›í­ôµ[vâ†J¤yÚf“¹^­‘×Tñò¤ziÚ ÙiÎýEš4‹V8':”x5£@q(‚“<8ø7¦%I±6˜³g(",.„œú ÿà(ú#‰Ž3—·Q¬˜çÆ´2þmÐõm =ãQ-ÕŽ`wÁBö3M$ÏÐ}@U:”­€QS3Y‡4(uÇÐ ¼ÈF¾ÔLD]ÂQ´¢ì¢ŸYÆ­0‰ƒ2ãR¸÷—ý .ò‹ÏÞ¾ñÓlþÑÏlM6fïø¡æ…~óq¢ŸÁO d§«¿ÏJ°²z›…ègòÓ>1n¹ÞeÜÒo>Mô3xU)Te=SÌêm¢Ÿù(YXtpé¼|,¬èðÍè‚¡è¢!Qh 'êëÞ¼Íâö´eÚŽYp{fò‚[ Óc„úC%â|Õ P]8M'L+Xg…˜h0Úk ±7Ûzau\þ‚‚ ^Øñ©X¨Xp7T¦Xýzò…ÞÈe+¾Jj*Ë-jcõ–×õ«@¦ÍlW¿òƒŽ—›þãÏ;b)½kÆö³ªªÍVA.!t¿QÑÅ#…;Xzçµ,³ü<«zÑa …­í JX´ˆs´×?æé7Žp¢Šv{÷–—Gxü¾×mü? Ã}D1>9Lj‹rú—º¼<À±šÊ^J¨\°wÉC wx•ê-W»¾yxAÅËToQ§~ûпˆPáWA͜쇼 Ÿà|‚Oð >Á'øŸà|‚Oð >Á'Ì ðyt€ExÖ™IEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-7.png0100644000076400001440000000550610720065720016447 0ustar skimousers‰PNG  IHDRî¼i(®tRNS”ý®bKGDÝŠ¤ ñIDATxœíÚTS×ðPd2EèÙ u%ê?îÆÙÆ*•X8:Wºn“–Ha`Kc˜–! Ø`—6B{j:EêñL»¦7—8aâ8RO9`E’ÓññÃ[hx`4Éݽ/„_yù!Ò•žåžó¼ä¾÷¾ÜïûÞûÌ-íIQ’Ê––Š,°cÃþÊ5™œž÷ûÁÁm,G$Nò?˜1ð³]Ógb8 å<Å3E;4w¸àõÏÕ¥ç%ÞWÞØÜpñ§É÷dr¥à%¹þØ‘\—H#O!ÉÞ¡éæ‚‚îyz^Ê[ze·îY¥"E+“_Äîtp‰´øùI*«ƒ™ÌÒŸĆ'/ó=Ê®^›pl­¯ˆ•»S9ÀTûDnu‰ÀR4çØJWɲr!¹eb!7åC,¨€UHýr—ÀmˆYît™¬t­„N!%6‡?t@51Sȵw†f"|Ä4Õ§HKRè°ø…ýa#›³c$Ûw3c¢%3ÞkˆG?\}jluPk»¤y·~€䥇r^yQ:mMýáiþŒ÷?ùµé“¥ºÙ²E£)w‚(vëÇ!’R çÕ@$­$õnÝLDvÔ$kÐ(;š-¯i4κ“œ/þ}lâíìÌâ÷˜á1ÌЪ%3Þgåõ²ö²«£b‹W°‚ÙqôˆçÅ ß>b©Å;ÿ_Èí…@” ˜ r~!ÇâE¹)à>L&cµÔÀ„› äÜÆaKLƒà—µ^É’ö~õ8HIö+nlÄL×á6t™´Âù#•cá'óƒ×–eT„óF‹YdlÍVÌhØ›©ñ?ÄB)äÚÏ™nɼ‘w%Û³[ÏG}d®Ro` Ì)àóâ5 års—¡ðýRÜÜL=¤3POì¨" ¬œ¯Ñ#‚Áe Ã6ä—h§B-¡Aø…s¾*dDSŸ#ØIåQHe€¤2¨?ËWÚy”Ý>rT²"àó qþnk›¸ä3”tÈø5þ›®SGþRðq힦.&RðŽ É‹:3°›Ÿä Þ,%dM™ i=ÆÏ1]¤Ž¨Ë†œ{†—ŠFïDê³S1™L×LÈSàúùÃiì «°Š:ªG»>1[Ä`÷ö']æˆê–deh5›•™°“ÃÀ‰^Í…U5ªlOX§Šen¥é?M:6Gu:g¾æ¹çq|mlαÛá¼ Øéºš;„Šü/ÔõX‡aëÒU@]! `cz}';¯4Ã9=±¯ÖhG¨ØÁÓ*„Ú7ÙŽ, *ê³û„RpŠ<>iû““±së)ªö S-±! {K†€A…#J’oÖêà»%Ä4‚b'=¯•‹vUý¡!’ölõÛ“—Hß^Z{& E«ÏUõþ&4h#ö9fsÊõè§!ZQ¦žŠôÔttþR´ëü“šoˆoÚs„¯øÞݿǖžý>:m(ïKÕßT ™A˜ŽŽ#·Æï \뚊[ª;gÑ®{0µƒoHSì¹ÄWìÕ(n6jCu†šî‡©z u'›oöÅêÒ‰¢f¬»+åwS±óÚõ8t~u­?Þº¤/¢5P½‘QæW³†ÉPµV©}õ³ËawØÄ¨ùPÕò+Q’`fEⱩؙû-ÃÈw,3Âh2væŽôG+‹.ï,<‚"àûì_êXmÃ’ºšÉmî4äU8aFˆ ^vÒŽL~f$_ë)¿8‰XIÛ½"$ oPÎïv´ð’ÃÖF¯ál¿±%ê¹ û?õW+#VÅ­:ê óNcÇ-ÒÌ{m<ìcØ’¼²Òº¦øüŽÍÀÿZMÍËk†ä_p_†#Vðf´[DÁ;…Ý©CÈÉæºæ´¢¹ HûãšßuÈeÜW`Þä4ºï[Â<¶Â?Ä/suÕ©˜J÷I+2ÙO¯b1؉0ï '¸ïάUž=¨ìÁdÒÔ§Cf¦{PÙ‘aÃãë2Buì dëIü)¤’nŽÕš-*[¯`ÞÉÏ™uõi )E¿ *“B3¯- V[Þišu3t¨¦œšpØBò“<8°]"pª–‘õ‹þ-QÒañÁÌ Èl©1¬÷«»Q‘ÁYíl”wÚFuêõp‰+Éóv?ÕSª˜ ?ŸŒ‘/™®™äõÒ†½°%H^`ôÙZ—H#D!²wNÔvÈÓR02¥P[(—¿ú…!åͤ¡ ëÓzWÈe+ "¤?Ö¯2?<6Ñ/j]|Yqboeе}>B˜wÚFZÞ[Ïð—»@½x‘ÿbD· ãdlmÙߨ&PD 4B¨'„î;Br!m²‰‡À"Gÿ4A! ‹'ˆ…0ruèäõKjÜ"ÒÎÁÄìÑCÖèk„Ïò Y#›2çÀ?³ÁY10yÕ+6¹E0Ñ¿{âÇû¬-OZz¸¹O¯ÈªêÉ+HZI ]hФˆ–¨ÃáL;ÿùeå"MÂ'’Vg&='hÝž›èaw½xÏt»¹C†Ê**´Ã¡A=&5;ÖuŠ @ÁᦛÌ_0ƒàÔùVÜsdPóD#…4ãF%l…Lÿ?[Ds¬s$´<<±Mzø_k^÷“¶-íô—ŽÔ>¹]^ñ¾„† E¾l éuy¹Ç±;ÆÑïaÇ•"‰¶p…þÈ¥ºž† E®64~6¬{0­ëC¬MÙx\[Xøõ¥÷•#ƒ‘ÛF‚}’|8—ý.¿¸ÞLJãÇñý|Dò#µvÝÖõž"ö…ýùF#M [Íù9/ÄóâE¼ˆñ"^Ä‹x/âE¼ˆñ"^Ä‹x/2 ù/Ç10ê;%IEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-8.png0100644000076400001440000000377210720065720016453 0ustar skimousers‰PNG  IHDRþ¿7gƒõtRNS”ý®bKGDÝŠ¤¥IDATxœíÙL×pC*A;&&µfIëÜ2Um’¥,m„aDØYÓú¤¤ÈYœÕœ4‹Ü›3-) ¹¡IKú#V”nKj/-Æ7¾À<~H$΂ZßÌ…x2!ØÛ÷öîL˜‡ý@Ú}ÿ8ÎïÝ}üü~ܽ÷à }X¤ÎHx†LY Ž]íã„ØÀ°`þit¾›Û\¶ˆ>ú\”ÔõFÃÞÆ&M_Í£Üë áë@êTÊ1B5§üÒ0×€áæÍ@¿ã¹×N#Á%ت<̳%ßÐ]+úÀ«·×a…¾?gä²ÕäéhCÀì77BIÑ¥/‚GVE¹Þ&|AWÔV|¢}¸éW¶ÜFfo „6æ×þ*PíSó,gø‰9»}Â.¡J4ÅÍ Tï*žåÏYNж^€Õ ,xA€}ÀóáGVP]XaLÞ1oãÐTgÍd¦š0 $0R§d@¨!a9T1ƒ~ê­4\Ó½Í xhÀC$BÈ#Ž„Ò‹yer—ãùpàj­xÔä3ñÇþQ½¯{3÷ºàÃìƒÂ9 Ïrð¬€x¯>E(M®¡9 ?áÖwûçbµ­5ë(1·¿~5 ådnÒ–ëÇ`OÄËż*/1ä%䓯blКm†ÁY¤¤Í°¯mCÊ‹ýeøWÀ \N“Âôëp 9.qò«·ÆgÜÄïV‰,¼S 1nN”lÙ“$¼Š€Mê?Ïμü¤úh§ÓRÅØ !áA¨¦ð/—½#MÁgQ„ì5Ú•×€P‡ÑÕ7J}†=ØJýõ¡¯f ¸à_„j=c Üç±Ø¿Ù`%%èkîíWôôKgR$Ù­R^¦¦ùúc{%Ó¼M»Ëë]pÃn¿ÚäÊ»•V˜'6$?zr¢\;ižyýóo³Æ–ˆÀ`‰ÝÒI¼V*6ȶk)À½£ìã?Ž/½š8Ó›’“-NŸŠKCÞH+¨m|¯{ó#{¦ŸÊl=œÿ;8˜¢þ„Ø‚–H$Ò-è JP½Ê¬°È=dp  0i+~Z·š|¥­xÓ´À²'--5ž×þ€Hm°" –``'` yÔô2FÆÂ â´ìêl˜ `€pz!ó{¨ÙÀàâ¤ó\+ˆåðg•Soé—5'õ$åŽlwn;—¾AV?ò3„ÛϱŸÛ|ÁrÄ™º³qæl8 /Â.É‚“ð ‰ûüxêþ}Ùñ{HqéÛvs»±Ã7r½ÞVç>Ž´Ó/~énÃÅûðã³=(ò ÆŽûãöÑ-9þš7 ‚“Nå>=ÕÔ—ÒŸß]P÷{/ŠÎ>]£¨Yg92üî3Îz†JŒtµ-ýÚXú¢Hyk£+¯5`†:X­%5@#€—"½mŒ:(@(Q¸dDblÆE z…] 8cUq»eùm9»³S=WÿWEލ'À^§ûxpKË•óï 8”«~³£J'-Ž 0éJné[®´”ÙJ핪ƒÞ.!?%'aî Î]ü£OpNs,@xDš3ýw€H“®59X€þOÜ‹„&y¨¢ྻ½ïôv_–û8è ÊÀ›¼Þ@ Ðø0©ÂMpÒD8€Xƒ20㠾閆µ’m鑤NoÌou: ’U½y©óü/q?êOà²Ú(6˜½Á@§Þ¹ÿ€t¦´ðþÄËõû]b«{§ðþãmæùK5þBF•ž%%ø{Ûh0àÐì¯ÔN”Ÿ˜xùÕO\}Vþĉ‘6³í‹1æ+BK ?Šï©ƒO3Tœ#q]i¢éõ oæ:ÑdUó:îLÊ#š8UŽB€¹!´Ð%; KƒÊ%—°Ã~éå½Ðò$/ñë£Çš>¡7 Ø÷Ð…QpÅA­C®ÁO£¤˜ª•󀵓NxšÇ?µµŠ»é׬ª~ÔOeÂõ㉈F W*F@@ÀEâE`– HÙ%íLÚÛÄÔ(¸û‹·²Ü—zá=QÓÈö1825\kâv8{zþlôš©…³Ž÷]‡³ÈdjÜÛQi¶¹¶íãîó.8 É%u×Î+/ÊuÒÍ^T0ÅÇŸ¹*Ê$A‚ã¶Jó·®â,û¸ÍÝâ‚cÁ /1éZ”Ú6ñ…Yí×á€Jtw—äN.?Þ7J‚‘­Iç^±$®³tåL5]…c¡öT¼0ñ#ÿÝšŸðoóJ@ǃÎ^°t;y1–ëH‹:ŽÆ„O‹4±+Žÿ0zv¾À?v¶<€Só}z• çü šÈ x|@ÿP%¨Ç~ØÙ/í|koZÊpKT`°dü¥ß»ò®Tž”éònA£c/]v•*ÛeºÒ‡)A}Í“š†Ó-IqéÈCTLFýæ(@øfKŒÀʃX€X€X€X€X€X€X€¢ÿ„ÑJqÕ°IEND®B`‚nvi-1.81.6/docs/exref/grohtml-7914-9.png0100644000076400001440000000162610720065720016450 0ustar skimousers‰PNG  IHDRÿ³¯g(°tRNS”ý®bKGDÝŠ¤AIDATxœíØ]HSQð[XEøÑC륖ƒQP2‡)! }¨ ‘`êC–ÙB³a¤|tƒB'ˆº„’uOAá|iôa:ÇTˆ„,µ{Õi¦ÂÄFÛeÍv»:îîæN÷œB“ó¸ãþÏ=?ãœ{Ïù4+.áòp¿ Ëþâ~Ha»/(ã'ºÅž »0À`snô‚r憼¥¾~Nª8"l7ƒ€Ñ}{Ž{ KÅ5M炤ª4‚*á«Ï¼ô—Š»å'ó•!À2hÐÙŽjôÃÇâ:Ù,¡É¶w a;÷7‡¦6Ž|GDÅf³Ö‘\½ŽÀ·¹Þ–õ)0¨€L¥ÔÏf¦©v=œKº¼ö•LÞ‹t›û…ó`:`ÒMîúÙ‡WÎùiñ€íAjm¬lfgš*F:¼û4Ì<àÏu¨‰„ ð˹˦°lú0€ ``ëMÜuŽŸXÝ@‘ïÍú@w]â§èµýOàâ` àbåÁ›[Ç*@Òë˜'\¯ `RzçB ?µ(UHU­#-†þöxy”=L=¯È :tü”T嵫©:CÇèú¬§Çè|õT ?Õ3_Y”¨¦zƒ÷èâ1 01”Ý šìÚ½Ö,ÅDs#¡Š9ßD¢Ná´þ[XDFt#ÑWô—€ñ’2*?¸öžbJ][RÜ©º†ø+¨€¨À0°€Rªcùï¿°9è>*Ê *0-Lªº@TÕ ª.Uu…@hÎáÄv­ê2¬+°|$pÇ´Ñ|ü©?¯k ý#è³?R½©–|«HU~ºiÓ7‰ÆzL9ËÚ¼'—Ò·Òßv‰z“UËÚ¢»ïœFZm†g•&ô§f/¤ÄÅöíÏÜ! p1¹@DÄ–¸Õ¼èeÞ X€{­3nÖ:4Gž"­COŸËme$$@_6¹ÏQf+ì¨ñÂd÷UÊ< XYe_ìÄu$À}Sÿ¨k`%À0€ `À0€ `üüѸ¹Óh¾IEND®B`‚nvi-1.81.6/docs/vi.man/0040755000076400001440000000000010720065720013573 5ustar skimousersnvi-1.81.6/docs/vi.man/Makefile0100644000076400001440000000072210720065506015233 0ustar skimousers# $Id: Makefile,v 8.9 2001/01/28 15:50:07 skimo Exp $ (Berkeley) $Date: 2001/01/28 15:50:07 $ ROFF= groff all: vi.0 vi.0.ps ../html/vi.0.html vi.0: vi.1 ${ROFF} -man -Tascii < vi.1 > $@ chmod 444 $@ vi.0.ps: vi.1 ${ROFF} -man < vi.1 > $@ chmod 444 $@ ../html/vi.0.html: vi.1 test -d ../html || mkdir ../html ${ROFF} -man -Thtml < vi.1 | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ clean: rm -f vi.0 vi.0.ps ../html/vi.0.html nvi-1.81.6/docs/vi.man/spell.ok0100644000076400001440000000176710720065506015257 0ustar skimousersAr Bostic CDPATH COLUMNSXX Cscope Ds EXINIT Ee Ev Fa Ff Fl HUnhsh IPLPPPQPP LIpplpipbp Li Lite NEXINIT NHSHH Nex Nn POSIX Pp QQ SIGWINCHXX Std Sy TMPDIR Tt USD Unmap VI Vi XXXX ZZ ags ai altwerase ap autoindent autoprint autowrite aw bf bigwords cd cdpath cedit cmd co creens cs ctags db dbopen dd di dir dit doc docs eFRrsv eFRrv eFlRrv ead eb edcompatible egrep elete errorbells esc exrc exu fg filec hange hardtabs ht ic iclower ignorecase ile ind ious ist ize keytime leftright lhs li libc lobal lp matchtime mber mesg mk modeful modeline modelines nex nexrc nk nonblank nooption noprint nsert nul nvi oin onnections ove ppend prev pu readonly rec recdir redist rhs rint rk ro rsion sccs scr se searchincr sh shareware shellmeta shiftwidth showmatch showmode sidescroll slowopen sm smd sourceany su sual sw ta tabstop taglength tagn tagp tagstring th's tildeop tl tmp tr ts ttytype ttywerase ubstitute uffers uit unm urce var ve vi viu wa wi windowname wl wm wn wq wraplen wrapmargin wrapscan writeany ws ya yy nvi-1.81.6/docs/vi.man/vi.10100644000076400001440000010203110720065506014267 0ustar skimousers.\" Copyright (c) 1994 .\" The Regents of the University of California. All rights reserved. .\" Copyright (c) 1994, 1995, 1996 .\" Keith Bostic. All rights reserved. .\" .\" This document may not be republished without written permission from .\" Keith Bostic. .\" .\" See the LICENSE file for redistribution information. .\" .\" $Id: vi.1,v 8.53 2001/01/28 13:20:06 skimo Exp $ (Berkeley) $Date: 2001/01/28 13:20:06 $ .\" .TH VI 1 "%Q%" .UC .SH NAME ex, vi, view \- text editors .SH SYNOPSIS .B ex [\c .B -eFRrSsv\c ] [\c .BI -c " cmd"\c ] [\c .BI -t " tag"\c ] [\c .BI -w " size"\c ] [file ...] .br .B vi [\c .B -eFlRrSv\c ] [\c .BI -c " cmd"\c ] [\c .BI -t " tag"\c ] [\c .BI -w " size"\c ] [file ...] .br .B view [\c .B -eFRrSv\c ] [\c .BI -c " cmd"\c ] [\c .BI -t " tag"\c ] [\c .BI -w " size"\c ] [file ...] .SH LICENSE The vi program is freely redistributable. You are welcome to copy, modify and share it with others under the conditions listed in the LICENSE file. If any company (not individual!) finds vi sufficiently useful that you would have purchased it, or if any company wishes to redistribute it, contributions to the authors would be appreciated. .SH DESCRIPTION .I \&Vi is a screen oriented text editor. .I \&Ex is a line-oriented text editor. .I \&Ex and .I \&vi are different interfaces to the same program, and it is possible to switch back and forth during an edit session. .I View is the equivalent of using the .B \-R (read-only) option of .IR \&vi . .PP This manual page is the one provided with the .I nex/nvi versions of the .I ex/vi text editors. .I Nex/nvi are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) .I \&ex and .I \&vi programs. For the rest of this manual page, .I nex/nvi is used only when it's necessary to distinguish it from the historic implementations of .IR ex/vi . .PP This manual page is intended for users already familiar with .IR ex/vi . Anyone else should almost certainly read a good tutorial on the editor before this manual page. If you're in an unfamiliar environment, and you absolutely have to get work done immediately, read the section after the options description, entitled ``Fast Startup''. It's probably enough to get you going. .PP The following options are available: .TP .B \-c Execute .B cmd immediately after starting the edit session. Particularly useful for initial positioning in the file, however .B cmd is not limited to positioning commands. This is the POSIX 1003.2 interface for the historic ``+cmd'' syntax. .I Nex/nvi supports both the old and new syntax. .TP .B \-e Start editing in ex mode, as if the command name were .IR \&ex . .TP .B \-F Don't copy the entire file when first starting to edit. (The default is to make a copy in case someone else modifies the file during your edit session.) .TP .B \-l Start editing with the lisp and showmatch options set. .TP .B \-R Start editing in read-only mode, as if the command name was .IR view , or the .B readonly option was set. .TP .B \-r Recover the specified files, or, if no files are specified, list the files that could be recovered. If no recoverable files by the specified name exist, the file is edited as if the .B \-r option had not been specified. .TP .B \-S Run with the .B secure edit option set, disallowing all access to external programs. .TP .B \-s Enter batch mode; applicable only to .I \&ex edit sessions. Batch mode is useful when running .I \&ex scripts. Prompts, informative messages and other user oriented message are turned off, and no startup files or environmental variables are read. This is the POSIX 1003.2 interface for the historic ``\-'' argument. .I \&Nex/nvi supports both the old and new syntax. .TP .B \-t Start editing at the specified tag. (See .IR ctags (1)). .TP .B \-w Set the initial window size to the specified number of lines. .TP .B \-v Start editing in vi mode, as if the command name was .I \&vi or .IR view . .PP Command input for .I ex/vi is read from the standard input. In the .I \&vi interface, it is an error if standard input is not a terminal. In the .I \&ex interface, if standard input is not a terminal, .I \&ex will read commands from it regardless, however, the session will be a batch mode session, exactly as if the .B \-s option had been specified. .PP .I Ex/vi exits 0 on success, and greater than 0 if an error occurs. .SH FAST STARTUP This section will tell you the minimum amount that you need to do simple editing tasks using .IR \&vi . If you've never used any screen editor before, you're likely to have problems even with this simple introduction. In that case you should find someone that already knows .I \&vi and have them walk you through this section. .PP .I \&Vi is a screen editor. This means that it takes up almost the entire screen, displaying part of the file on each screen line, except for the last line of the screen. The last line of the screen is used for you to give commands to .IR \&vi , and for .I \&vi to give information to you. .PP The other fact that you need to understand is that .I \&vi is a modeful editor, i.e. you are either entering text or you are executing commands, and you have to be in the right mode to do one or the other. You will be in command mode when you first start editing a file. There are commands that switch you into input mode. There is only one key that takes you out of input mode, and that is the key. (Key names are written using less-than and greater-than signs, e.g. means the ``escape'' key, usually labeled ``esc'' on your terminal's keyboard.) If you're ever confused as to which mode you're in, keep entering the key until .I \&vi beeps at you. (Generally, .I \&vi will beep at you if you try and do something that's not allowed. It will also display error messages.) .PP To start editing a file, enter the command ``vi file_name''. The command you should enter as soon as you start editing is ``:set verbose showmode''. This will make the editor give you verbose error messages and display the current mode at the bottom of the screen. .PP The commands to move around the file are: .TP .B h Move the cursor left one character. .TP .B j Move the cursor down one line. .TP .B k Move the cursor up one line. .TP .B l Move the cursor right one character. .TP .B The cursor arrow keys should work, too. .TP .B /text Search for the string ``text'' in the file, and move the cursor to its first character. .PP The commands to enter new text are: .TP .B a Append new text, .I after the cursor. .TP .B i Insert new text, .I before the cursor. .TP .B o Open a new line below the line the cursor is on, and start entering text. .TP .B O Open a new line above the line the cursor is on, and start entering text. .TP .B Once you've entered input mode using the one of the .BR \&a , .BR \&i , .BR \&O or .B \&o commands, use .B to quit entering text and return to command mode. .PP The commands to copy text are: .TP .B yy Copy the line the cursor is on. .TP .B p Append the copied line after the line the cursor is on. .PP The commands to delete text are: .TP .B dd Delete the line the cursor is on. .TP .B x Delete the character the cursor is on. .PP The commands to write the file are: .TP .B :w Write the file back to the file with the name that you originally used as an argument on the .I \&vi command line. .TP .B ":w file_name" Write the file back to the file with the name ``file_name''. .PP The commands to quit editing and exit the editor are: .TP .B :q Quit editing and leave vi (if you've modified the file, but not saved your changes, .I \&vi will refuse to quit). .TP .B :q! Quit, discarding any modifications that you may have made. .PP One final caution. Unusual characters can take up more than one column on the screen, and long lines can take up more than a single screen line. The above commands work on ``physical'' characters and lines, i.e. they affect the entire line no matter how many screen lines it takes up and the entire character no matter how many screen columns it takes up. .SH VI COMMANDS The following section describes the commands available in the command mode of the .I \&vi editor. In each entry below, the tag line is a usage synopsis for the command character. .PP .TP .B "[count] " Search forward .I count times for the current word. .TP .B "[count] " Page backwards .I count screens. .TP .B "[count] " Scroll forward .I count lines. .TP .B "[count] " Scroll forward .I count lines, leaving the current line and column as is, if possible. .TP .B "[count] " Page forward .I count screens. .TP .B "" Display the file information. .TP .B "" .TP .B "[count] h" Move the cursor back .I count characters in the current line. .TP .B "[count] " .TP .B "[count] " .TP .B "[count] j" Move the cursor down .I count lines without changing the current column. .TP .B "" .TP .B "" Repaint the screen. .TP .B "[count] " .TP .B "[count] +" Move the cursor down .I count lines to the first nonblank character of that line. .TP .B "[count] " .TP .B "[count] k" Move the cursor up .I count lines, without changing the current column. .TP .B "" Return to the most recent tag context. .TP .B "" Scroll backwards .I count lines. .TP .B "" Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window. .TP .B "" Scroll backwards .I count lines, leaving the current line and column as is, if possible. .TP .B "" Suspend the current editor session. .TP .B "" Execute .I \&ex commands or cancel partial commands. .TP .B "" Push a tag reference onto the tag stack. .TP .B "" Switch to the most recently edited file. .TP .B "[count] " .TP .B "[count] l" Move the cursor forward .I count characters without changing the current line. .TP .B "[count] ! motion shell-argument(s)" Replace text with results from a shell command. .TP .B "[count] # #|+|-" Increment or decrement the cursor number. .TP .B "[count] $" Move the cursor to the end of a line. .TP .B "%" Move to the matching character. .TP .B "&" Repeat the previous substitution command on the current line. .TP .B "'" .TP .B "`" Return to a context marked by the character .IR . .TP .B "[count] (" Back up .I count sentences. .TP .B "[count] )" Move forward .I count sentences. .TP .B "[count] ," Reverse find character .I count times. .TP .B "[count] -" Move to first nonblank of the previous line, .I count times. .TP .B "[count] ." Repeat the last .I \&vi command that modified text. .TP .B "/RE" .TP .B "/RE/ [offset]" .TP .B "?RE" .TP .B "?RE? [offset]" .TP .B "N" .TP .B "n" Search forward or backward for a regular expression. .TP .B "0" Move to the first character in the current line. .TP .B ":" Execute an ex command. .TP .B "[count] ;" Repeat the last character find .I count times. .TP .B "[count] < motion" .TP .B "[count] > motion" Shift lines left or right. .TP .B "@ buffer" Execute a named buffer. .TP .B "[count] A" Enter input mode, appending the text after the end of the line. .TP .B "[count] B" Move backwards .I count bigwords. .TP .B "[buffer] [count] C" Change text from the current position to the end-of-line. .TP .B "[buffer] D" Delete text from the current position to the end-of-line. .TP .B "[count] E" Move forward .I count end-of-bigwords. .TP .B "[count] F " Search .I count times backward through the current line for .IR . .TP .B "[count] G" Move to line .IR count , or the last line of the file if .I count not specified. .TP .B "[count] H" Move to the screen line .I "count - 1" lines below the top of the screen. .TP .B "[count] I" Enter input mode, inserting the text at the beginning of the line. .TP .B "[count] J" Join lines. .TP .B "[count] L" Move to the screen line .I "count - 1" lines above the bottom of the screen. .TP .B " M" Move to the screen line in the middle of the screen. .TP .B "[count] O" Enter input mode, appending text in a new line above the current line. .TP .B "[buffer] P" Insert text from a buffer. .TP .B "Q" Exit .I \&vi (or visual) mode and switch to .I \&ex mode. .TP .B "[count] R" Enter input mode, replacing the characters in the current line. .TP .B "[buffer] [count] S" Substitute .I count lines. .TP .B "[count] T " Search backwards, .I count times, through the current line for the character .I after the specified .IR . .TP .B "U" Restore the current line to its state before the cursor last moved to it. .TP .B "[count] W" Move forward .I count bigwords. .TP .B "[buffer] [count] X" Delete .I count characters before the cursor. .TP .B "[buffer] [count] Y" Copy (or ``yank'') .I count lines into the specified buffer. .TP .B "ZZ" Write the file and exit .IR \&vi . .TP .B "[count] [[" Back up .I count section boundaries. .TP .B "[count] ]]" Move forward .I count section boundaries. .TP .B "\&^" Move to first nonblank character on the current line. .TP .B "[count] _" Move down .I "count - 1" lines, to the first nonblank character. .TP .B "[count] a" Enter input mode, appending the text after the cursor. .TP .B "[count] b" Move backwards .I count words. .TP .B "[buffer] [count] c motion" Change a region of text. .TP .B "[buffer] [count] d motion" Delete a region of text. .TP .B "[count] e" Move forward .I count end-of-words. .TP .B "[count] f" Search forward, .I count times, through the rest of the current line for .IR . .TP .B "[count] i" Enter input mode, inserting the text before the cursor. .TP .B "m " Save the current context (line and column) as .IR . .TP .B "[count] o" Enter input mode, appending text in a new line under the current line. .TP .B "[buffer] p" Append text from a buffer. .TP .B "[count] r " Replace .I count characters. .TP .B "[buffer] [count] s" Substitute .I count characters in the current line starting with the current character. .TP .B "[count] t " Search forward, .I count times, through the current line for the character immediately .I before .IR . .TP .B "u" Undo the last change made to the file. .TP .B "[count] w" Move forward .I count words. .TP .B "[buffer] [count] x" Delete .I count characters. .TP .B "[buffer] [count] y motion" Copy (or ``yank'') a text region specified by the .I count and motion into a buffer. .TP .B "[count1] z [count2] -|.|+|^|" Redraw, optionally repositioning and resizing the screen. .TP .B "[count] {" Move backward .I count paragraphs. .TP .B "[count] |" Move to a specific .I column position on the current line. .TP .B "[count] }" Move forward .I count paragraphs. .TP .B "[count] ~" Reverse the case of the next .I count character(s). .TP .B "[count] ~ motion" Reverse the case of the characters in a text region specified by the .I count and .IR motion . .TP .B "" Interrupt the current operation. .SH VI TEXT INPUT COMMANDS The following section describes the commands available in the text input mode of the .I \&vi editor. .PP .TP .B "" Replay the previous input. .TP .B "" Erase to the previous .B shiftwidth column boundary. .TP .B "^" Erase all of the autoindent characters, and reset the autoindent level. .TP .B "0" Erase all of the autoindent characters. .TP .B "" Insert sufficient .I and .I characters to move forward to the next .B shiftwidth column boundary. .TP .B " .TP .B "" Erase the last character. .TP .B "" Quote the next character. .TP .B " Resolve all text input into the file, and return to command mode. .TP .B "" Erase the current line. .TP .B "" .TP .B "" Erase the last word. The definition of word is dependent on the .B altwerase and .B ttywerase options. .TP .B "[0-9A-Fa-f]+" Insert a character with the specified hexadecimal value into the text. .TP .B "" Interrupt text input mode, returning to command mode. .SH EX COMMANDS The following section describes the commands available in the .I \&ex editor. In each entry below, the tag line is a usage synopsis for the command. .PP .TP .B "" Scroll the screen. .TP .B "! argument(s)" .TP .B "[range]! argument(s)" Execute a shell command, or filter lines through a shell command. .TP .B \&" A comment. .TP .B "[range] nu[mber] [count] [flags]" .TP .B "[range] # [count] [flags]" Display the selected lines, each preceded with its line number. .TP .B "@ buffer" .TP .B "* buffer" Execute a buffer. .TP .B "[line] a[ppend][!]" The input text is appended after the specified line. .TP .B "[range] c[hange][!] [count]" The input text replaces the specified range. .TP .B "cs[cope] add | find | help | kill | reset" Execute a Cscope command. .TP .B "[range] d[elete] [buffer] [count] [flags]" Delete the lines from the file. .TP .B "di[splay] b[uffers] | c[onnections] | s[creens] | t[ags]" Display buffers, Cscope connections, screens or tags. .TP .B "[Ee][dit][!] [+cmd] [file]" .TP .B "[Ee]x[!] [+cmd] [file]" Edit a different file. .TP .B "exu[sage] [command]" Display usage for an .I \&ex command. .TP .B "f[ile] [file]" Display and optionally change the file name. .TP .B "[Ff]g [name]" .I \&Vi mode only. Foreground the specified screen. .TP .B "[range] g[lobal] /pattern/ [commands]" .TP .B "[range] v /pattern/ [commands]" Apply commands to lines matching (or not matching) a pattern. .TP .B "he[lp]" Display a help message. .TP .B "[line] i[nsert][!]" The input text is inserted before the specified line. .TP .B "[range] j[oin][!] [count] [flags]" Join lines of text together. .TP .B "[range] l[ist] [count] [flags]" Display the lines unambiguously. .TP .B "map[!] [lhs rhs]" Define or display maps (for .I \&vi only). .TP .B "[line] ma[rk] " .TP .B "[line] k " Mark the line with the mark .IR . .TP .B "[range] m[ove] line" Move the specified lines after the target line. .TP .B "mk[exrc][!] file" Write the abbreviations, editor options and maps to the specified file. .TP .B "[Nn][ext][!] [file ...]" Edit the next file from the argument list. .TP .B "[line] o[pen] /pattern/ [flags]" Enter open mode. .TP .B "pre[serve]" Save the file in a form that can later be recovered using the .I \&ex .B \-r option. .TP .B "[Pp]rev[ious][!]" Edit the previous file from the argument list. .TP .B "[range] p[rint] [count] [flags]" Display the specified lines. .TP .B "[line] pu[t] [buffer]" Append buffer contents to the current line. .TP .B "q[uit][!]" End the editing session. .TP .B "[line] r[ead][!] [file]" Read a file. .TP .B "rec[over] file" Recover .I file if it was previously saved. .TP .B "res[ize] [+|-]size" .I \&Vi mode only. Grow or shrink the current screen. .TP .B "rew[ind][!]" Rewind the argument list. .TP .B "se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]" Display or set editor options. .TP .B "sh[ell]" Run a shell program. .TP .B "so[urce] file" Read and execute .I \&ex commands from a file. .TP .B "[range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]" .TP .B "[range] & [options] [count] [flags]" .TP .B "[range] ~ [options] [count] [flags]" Make substitutions. .TP .B "su[spend][!]" .TP .B "st[op][!]" .TP .B Suspend the edit session. .TP .B "[Tt]a[g][!] tagstring" Edit the file containing the specified tag. .TP .B "tagn[ext][!]" Edit the file containing the next context for the current tag. .TP .B "tagp[op][!] [file | number]" Pop to the specified tag in the tags stack. .TP .B "tagp[rev][!]" Edit the file containing the previous context for the current tag. .TP .B "unm[ap][!] lhs" Unmap a mapped string. .TP .B "ve[rsion]" Display the version of the .I \&ex/vi editor. .TP .B "[line] vi[sual] [type] [count] [flags]" .I \&Ex mode only. Enter .IR \&vi . .TP .B "[Vi]i[sual][!] [+cmd] [file]" .I \&Vi mode only. Edit a new file. .TP .B "viu[sage] [command]" Display usage for a .I \&vi command. .TP .B "[range] w[rite][!] [>>] [file]" .TP .B "[range] w[rite] [!] [file]" .TP .B "[range] wn[!] [>>] [file]" .TP .B "[range] wq[!] [>>] [file]" Write the file. .TP .B "[range] x[it][!] [file]" Write the file if it has been modified. .TP .B "[range] ya[nk] [buffer] [count]" Copy the specified lines to a buffer. .TP .B "[line] z [type] [count] [flags]" Adjust the window. .SH SET OPTIONS There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values. .PP In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbreviations. The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associated value. .PP Options apply to both .I \&ex and .I \&vi modes, unless otherwise specified. .PP .TP .B "altwerase [off]" .I \&Vi only. Select an alternate word erase algorithm. .TP .B "autoindent, ai [off]" Automatically indent new lines. .TP .B "autoprint, ap [off]" .I \&Ex only. Display the current line automatically. .TP .B "autowrite, aw [off]" Write modified files automatically when changing files. .\" I cannot get a double quote to print between the square brackets .\" to save my life. The ONLY way I've been able to get this to work .\" is with the .tr command. .tr Q" .ds ms backup [QQ] .TP .B "\*(ms" .tr QQ Backup files before they are overwritten. .TP .B "beautify, bf [off]" Discard control characters. .TP .B "cdpath [environment variable CDPATH, or current directory]" The directory paths used as path prefixes for the .B cd command. .TP .B "cedit [no default]" Set the character to edit the colon command-line history. .TP .B "columns, co [80]" Set the number of columns in the screen. .TP .B "comment [off]" .I \&Vi only. Skip leading comments in shell, C and C++ language files. .TP .B "directory, dir [environment variable TMPDIR, or /tmp]" The directory where temporary files are created. .TP .B "edcompatible, ed [off]" Remember the values of the ``c'' and ``g'' suffices to the .B substitute commands, instead of initializing them as unset for each new command. .TP .B "errorbells, eb [off]" .I \&Ex only. Announce error messages with a bell. .TP .B "exrc, ex [off]" Read the startup files in the local directory. .TP .B "extended [off]" Regular expressions are extended (i.e. .IR egrep (1)\-\c style) expressions. .TP .B "filec [no default]" Set the character to perform file path completion on the colon command line. .TP .B "flash [on]" Flash the screen instead of beeping the keyboard on error. .TP .B "hardtabs, ht [8]" Set the spacing between hardware tab settings. .TP .B "iclower [off]" Makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string. .TP .B "ignorecase, ic [off]" Ignore case differences in regular expressions. .TP .B "keytime [6]" The 10th's of a second .I ex/vi waits for a subsequent key to complete a key mapping. .TP .B "leftright [off]" .I \&Vi only. Do left-right scrolling. .TP .B "lines, li [24]" .I \&Vi only. Set the number of lines in the screen. .TP .B "lisp [off]" .I \&Vi only. Modify various search commands and options to work with Lisp. .I "This option is not yet implemented." .TP .B "list [off]" Display lines in an unambiguous fashion. .TP .B "lock [on]" Attempt to get an exclusive lock on any file being edited, read or written. .TP .B "magic [on]" Treat certain characters specially in regular expressions. .TP .B "matchtime [7]" .I \&Vi only. The 10th's of a second .I ex/vi pauses on the matching character when the .B showmatch option is set. .TP .B "mesg [on]" Permit messages from other users. .TP .B "modelines, modeline [off]" Read the first and last few lines of each file for .I ex commands. .I "This option will never be implemented." .\" I cannot get a double quote to print between the square brackets .\" to save my life. The ONLY way I've been able to get this to work .\" is with the .tr command. .tr Q" .ds ms noprint [QQ] .TP .B "\*(ms" .tr QQ Characters that are never handled as printable characters. .TP .B "number, nu [off]" Precede each line displayed with its current line number. .TP .B "octal [off]" Display unknown characters as octal numbers, instead of the default hexadecimal. .TP .B "open [on]" .I \&Ex only. If this option is not set, the .B open and .B visual commands are disallowed. .TP .B "optimize, opt [on]" .I \&Vi only. Optimize text throughput to dumb terminals. .I "This option is not yet implemented." .TP .B "paragraphs, para [IPLPPPQPP LIpplpipbp]" .I \&Vi only. Define additional paragraph boundaries for the .B \&{ and .B \&} commands. .TP .B "path []" Define additional directories to search for files being edited. .\" I cannot get a double quote to print between the square brackets .\" to save my life. The ONLY way I've been able to get this to work .\" is with the .tr command. .tr Q" .ds ms print [QQ] .TP .B "\*(ms" .tr QQ Characters that are always handled as printable characters. .TP .B "prompt [on]" .I \&Ex only. Display a command prompt. .TP .B "readonly, ro [off]" Mark the file and session as read-only. .TP .B "recdir [/var/tmp/vi.recover]" The directory where recovery files are stored. .TP .B "redraw, re [off]" .I \&Vi only. Simulate an intelligent terminal on a dumb one. .I "This option is not yet implemented." .TP .B "remap [on]" Remap keys until resolved. .TP .B "report [5]" Set the number of lines about which the editor reports changes or yanks. .TP .B "ruler [off]" .I \&Vi only. Display a row/column ruler on the colon command line. .TP .B "scroll, scr [window / 2]" Set the number of lines scrolled. .TP .B "searchincr [off]" Makes the .B \&/ and .B \&? commands incremental. .TP .B "sections, sect [NHSHH HUnhsh]" .I \&Vi only. Define additional section boundaries for the .B \&[[ and .B \&]] commands. .TP .B "secure [off]" Turns off all access to external programs. .TP .B "shell, sh [environment variable SHELL, or /bin/sh]" Select the shell used by the editor. .\" I cannot get a double quote to print between the square brackets .\" to save my life. The ONLY way I've been able to get this to work .\" is with the .tr command. .tr Q" .ds ms shellmeta [~{[*?$`'Q\e] .TP .B "\*(ms" .tr QQ Set the meta characters checked to determine if file name expansion is necessary. .TP .B "shiftwidth, sw [8]" Set the autoindent and shift command indentation width. .TP .B "showmatch, sm [off]" .I \&Vi only. Note matching ``{'' and ``('' for ``}'' and ``)'' characters. .TP .B "showmode, smd [off]" .I \&Vi only. Display the current editor mode and a ``modified'' flag. .TP .B "sidescroll [16]" .I \&Vi only. Set the amount a left-right scroll will shift. .TP .B "slowopen, slow [off]" Delay display updating during text input. .I "This option is not yet implemented." .TP .B "sourceany [off]" Read startup files not owned by the current user. .I "This option will never be implemented." .TP .B "tabstop, ts [8]" This option sets tab widths for the editor display. .TP .B "taglength, tl [0]" Set the number of significant characters in tag names. .TP .B "tags, tag [tags /var/db/libc.tags /sys/kern/tags]" Set the list of tags files. .TP .B "term, ttytype, tty [environment variable TERM]" Set the terminal type. .TP .B "terse [off]" This option has historically made editor messages less verbose. It has no effect in this implementation. .TP .B "tildeop [off]" Modify the .B \&~ command to take an associated motion. .TP .B "timeout, to [on]" Time out on keys which may be mapped. .TP .B "ttywerase [off]" .I \&Vi only. Select an alternate erase algorithm. .TP .B "verbose [off]" .I \&Vi only. Display an error message for every error. .TP .B "w300 [no default]" .I \&Vi only. Set the window size if the baud rate is less than 1200 baud. .TP .B "w1200 [no default]" .I \&Vi only. Set the window size if the baud rate is equal to 1200 baud. .TP .B "w9600 [no default]" .I \&Vi only. Set the window size if the baud rate is greater than 1200 baud. .TP .B "warn [on]" .I \&Ex only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a .B \&! command. .TP .B "window, w, wi [environment variable LINES]" Set the window size for the screen. .TP .B "windowname [off]" Change the icon/window name to the current file name even if it can't be restored on editor exit. .TP .B "wraplen, wl [0]" .I \&Vi only. Break lines automatically, the specified number of columns from the left-hand margin. If both the .B wraplen and .B wrapmargin edit options are set, the .B wrapmargin value is used. .TP .B "wrapmargin, wm [0]" .I \&Vi only. Break lines automatically, the specified number of columns from the right-hand margin. If both the .B wraplen and .B wrapmargin edit options are set, the .B wrapmargin value is used. .TP .B "wrapscan, ws [on]" Set searches to wrap around the end or beginning of the file. .TP .B "writeany, wa [off]" Turn off file-overwriting checks. .SH "ENVIRONMENT VARIABLES .TP .I COLUMNS The number of columns on the screen. This value overrides any system or terminal specific values. If the .I COLUMNS environmental variable is not set when .I ex/vi runs, or the .B columns option is explicitly reset by the user, .I ex/vi enters the value into the environment. .TP .I EXINIT A list of .I \&ex startup commands, read if the variable .I NEXINIT is not set. .TP .I HOME The user's home directory, used as the initial directory path for the startup ``$\fIHOME\fP/.nexrc'' and ``$\fIHOME\fP/.exrc'' files. This value is also used as the default directory for the .I \&vi .B \&cd command. .TP .I LINES The number of rows on the screen. This value overrides any system or terminal specific values. If the .I LINES environmental variable is not set when .I ex/vi runs, or the .B lines option is explicitly reset by the user, .I ex/vi enters the value into the environment. .TP .I NEXINIT A list of .I \&ex startup commands. .TP .I SHELL The user's shell of choice (see also the .B shell option). .TP .I TERM The user's terminal type. The default is the type ``unknown''. If the .I TERM environmental variable is not set when .I ex/vi runs, or the .B term option is explicitly reset by the user, .I ex/vi enters the value into the environment. .TP .I TMPDIR The location used to stored temporary files (see also the .B directory edit option). .SH ASYNCHRONOUS EVENTS .TP SIGALRM .I \&Vi/ex uses this signal for periodic backups of file modifications and to display ``busy'' messages when operations are likely to take a long time. .TP SIGHUP .TP SIGTERM If the current buffer has changed since it was last written in its entirety, the editor attempts to save the modified file so it can be later recovered. See the .I \&vi/ex Reference manual section entitled ``Recovery'' for more information. .TP SIGINT When an interrupt occurs, the current operation is halted, and the editor returns to the command level. If interrupted during text input, the text already input is resolved into the file as if the text input had been normally terminated. .TP SIGWINCH The screen is resized. See the .I \&vi/ex Reference manual section entitled ``Sizing the Screen'' for more information. .TP SIGCONT .TP SIGQUIT .TP SIGTSTP .I \&Vi/ex ignores these signals. .SH FILES .TP /bin/sh The default user shell. .TP /etc/vi.exrc System-wide vi startup file. .TP /tmp Temporary file directory. .TP /var/tmp/vi.recover The default recovery file directory. .TP $HOME/.nexrc 1st choice for user's home directory startup file. .TP $HOME/.exrc 2nd choice for user's home directory startup file. .TP \&.nexrc 1st choice for local directory startup file. .TP \&.exrc 2nd choice for local directory startup file. .SH SEE ALSO .IR ctags (1), .IR more (1), .IR curses (3), .IR dbopen (3) .sp The ``Vi Quick Reference'' card. .sp ``An Introduction to Display Editing with Vi'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the closest thing available to an introduction to the .I \&vi screen editor. .sp ``Ex Reference Manual (Version 3.7)'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the final reference for the .I \&ex editor, as distributed in most historic 4BSD and System V systems. .sp ``Edit: A tutorial'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.3BSD manual set. This document is an introduction to a simple version of the .I \&ex screen editor. .sp ``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.4BSD manual set. This document is the final reference for the .I \&nex/nvi text editors, as distributed in 4.4BSD and 4.4BSD-Lite. .PP .I Roff source for all of these documents is distributed with .I nex/nvi in the .I nvi/USD.doc directory of the .I nex/nvi source code. .sp The files ``autowrite'', ``input'', ``quoting'' and ``structures'' found in the .I nvi/docs/internals directory of the .I nex/nvi source code. .SH HISTORY The .I nex/nvi replacements for the .I ex/vi editor first appeared in 4.4BSD. .SH STANDARDS .I \&Nex/nvi is close to IEEE Std1003.2 (``POSIX''). That document differs from historical .I ex/vi practice in several places; there are changes to be made on both sides. nvi-1.81.6/docs/vi.man/vi.00100444000076400001440000014202010720065720014264 0ustar skimousersVI(1) VI(1) NNAAMMEE ex, vi, view - text editors SSYYNNOOPPSSIISS eexx [--eeFFRRrrSSssvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...] vvii [--eeFFllRRrrSSvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...] vviieeww [--eeFFRRrrSSvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [file ...] LLIICCEENNSSEE The vi program is freely redistributable. You are welcome to copy, modify and share it with others under the condi- tions listed in the LICENSE file. If any company (not individual!) finds vi sufficiently useful that you would have purchased it, or if any company wishes to redis- tribute it, contributions to the authors would be appreci- ated. DDEESSCCRRIIPPTTIIOONN _V_i is a screen oriented text editor. _E_x is a line-ori- ented text editor. _E_x and _v_i are different interfaces to the same program, and it is possible to switch back and forth during an edit session. _V_i_e_w is the equivalent of using the --RR (read-only) option of _v_i. This manual page is the one provided with the _n_e_x_/_n_v_i ver- sions of the _e_x_/_v_i text editors. _N_e_x_/_n_v_i are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) _e_x and _v_i programs. For the rest of this manual page, _n_e_x_/_n_v_i is used only when it's necessary to distinguish it from the historic implementations of _e_x_/_v_i. This manual page is intended for users already familiar with _e_x_/_v_i. Anyone else should almost certainly read a good tutorial on the editor before this manual page. If you're in an unfamiliar environment, and you absolutely have to get work done immediately, read the section after the options description, entitled ``Fast Startup''. It's probably enough to get you going. The following options are available: --cc Execute ccmmdd immediately after starting the edit session. Particularly useful for initial position- ing in the file, however ccmmdd is not limited to positioning commands. This is the POSIX 1003.2 interface for the historic ``+cmd'' syntax. _N_e_x_/_n_v_i supports both the old and new syntax. --ee Start editing in ex mode, as if the command name were _e_x. --FF Don't copy the entire file when first starting to edit. (The default is to make a copy in case some- one else modifies the file during your edit ses- sion.) --ll Start editing with the lisp and showmatch options set. --RR Start editing in read-only mode, as if the command name was _v_i_e_w, or the rreeaaddoonnllyy option was set. --rr Recover the specified files, or, if no files are specified, list the files that could be recovered. If no recoverable files by the specified name exist, the file is edited as if the --rr option had not been specified. --SS Run with the sseeccuurree edit option set, disallowing all access to external programs. --ss Enter batch mode; applicable only to _e_x edit ses- sions. Batch mode is useful when running _e_x scripts. Prompts, informative messages and other user oriented message are turned off, and no startup files or environmental variables are read. This is the POSIX 1003.2 interface for the historic ``-'' argument. _N_e_x_/_n_v_i supports both the old and new syntax. --tt Start editing at the specified tag. (See _c_t_a_g_s(1)). --ww Set the initial window size to the specified number of lines. --vv Start editing in vi mode, as if the command name was _v_i or _v_i_e_w. Command input for _e_x_/_v_i is read from the standard input. In the _v_i interface, it is an error if standard input is not a terminal. In the _e_x interface, if standard input is not a terminal, _e_x will read commands from it regardless, however, the session will be a batch mode session, exactly as if the --ss option had been specified. _E_x_/_v_i exits 0 on success, and greater than 0 if an error occurs. FFAASSTT SSTTAARRTTUUPP This section will tell you the minimum amount that you need to do simple editing tasks using _v_i. If you've never used any screen editor before, you're likely to have prob- lems even with this simple introduction. In that case you should find someone that already knows _v_i and have them walk you through this section. _V_i is a screen editor. This means that it takes up almost the entire screen, displaying part of the file on each screen line, except for the last line of the screen. The last line of the screen is used for you to give commands to _v_i, and for _v_i to give information to you. The other fact that you need to understand is that _v_i is a modeful editor, i.e. you are either entering text or you are executing commands, and you have to be in the right mode to do one or the other. You will be in command mode when you first start editing a file. There are commands that switch you into input mode. There is only one key that takes you out of input mode, and that is the key. (Key names are written using less-than and greater- than signs, e.g. means the ``escape'' key, usu- ally labeled ``esc'' on your terminal's keyboard.) If you're ever confused as to which mode you're in, keep entering the key until _v_i beeps at you. (Gener- ally, _v_i will beep at you if you try and do something that's not allowed. It will also display error messages.) To start editing a file, enter the command ``vi file_name''. The command you should enter as soon as you start editing is ``:set verbose show- mode''. This will make the editor give you verbose error messages and display the current mode at the bottom of the screen. The commands to move around the file are: hh Move the cursor left one character. jj Move the cursor down one line. kk Move the cursor up one line. ll Move the cursor right one character. <> The cursor arrow keys should work, too. //tteexxtt<> Search for the string ``text'' in the file, and move the cursor to its first character. The commands to enter new text are: aa Append new text, _a_f_t_e_r the cursor. ii Insert new text, _b_e_f_o_r_e the cursor. oo Open a new line below the line the cursor is on, and start entering text. OO Open a new line above the line the cursor is on, and start entering text. <> Once you've entered input mode using the one of the aa, ii, OO or oo commands, use <> to quit enter- ing text and return to command mode. The commands to copy text are: yyyy Copy the line the cursor is on. pp Append the copied line after the line the cursor is on. The commands to delete text are: dddd Delete the line the cursor is on. xx Delete the character the cursor is on. The commands to write the file are: ::ww<> Write the file back to the file with the name that you originally used as an argument on the _v_i com- mand line. ::ww ffiillee__nnaammee<> Write the file back to the file with the name ``file_name''. The commands to quit editing and exit the editor are: ::qq<> Quit editing and leave vi (if you've modified the file, but not saved your changes, _v_i will refuse to quit). ::qq!!<> Quit, discarding any modifications that you may have made. One final caution. Unusual characters can take up more than one column on the screen, and long lines can take up more than a single screen line. The above commands work on ``physical'' characters and lines, i.e. they affect the entire line no matter how many screen lines it takes up and the entire character no matter how many screen columns it takes up. VVII CCOOMMMMAANNDDSS The following section describes the commands available in the command mode of the _v_i editor. In each entry below, the tag line is a usage synopsis for the command charac- ter. [[ccoouunntt]] <> Search forward _c_o_u_n_t times for the current word. [[ccoouunntt]] <> Page backwards _c_o_u_n_t screens. [[ccoouunntt]] <> Scroll forward _c_o_u_n_t lines. [[ccoouunntt]] <> Scroll forward _c_o_u_n_t lines, leaving the current line and column as is, if possible. [[ccoouunntt]] <> Page forward _c_o_u_n_t screens. <> Display the file information. <> [[ccoouunntt]] hh Move the cursor back _c_o_u_n_t characters in the cur- rent line. [[ccoouunntt]] <> [[ccoouunntt]] <> [[ccoouunntt]] jj Move the cursor down _c_o_u_n_t lines without changing the current column. <> <> Repaint the screen. [[ccoouunntt]] <> [[ccoouunntt]] ++ Move the cursor down _c_o_u_n_t lines to the first non- blank character of that line. [[ccoouunntt]] <> [[ccoouunntt]] kk Move the cursor up _c_o_u_n_t lines, without changing the current column. <> Return to the most recent tag context. <> Scroll backwards _c_o_u_n_t lines. <> Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window. <> Scroll backwards _c_o_u_n_t lines, leaving the current line and column as is, if possible. <> Suspend the current editor session. <> Execute _e_x commands or cancel partial commands. <> Push a tag reference onto the tag stack. <> Switch to the most recently edited file. [[ccoouunntt]] <> [[ccoouunntt]] ll Move the cursor forward _c_o_u_n_t characters without changing the current line. [[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss)) Replace text with results from a shell command. [[ccoouunntt]] ## ##||++||-- Increment or decrement the cursor number. [[ccoouunntt]] $$ Move the cursor to the end of a line. %% Move to the matching character. && Repeat the previous substitution command on the current line. ''<> ``<> Return to a context marked by the character _<_c_h_a_r_- _a_c_t_e_r_>. [[ccoouunntt]] (( Back up _c_o_u_n_t sentences. [[ccoouunntt]] )) Move forward _c_o_u_n_t sentences. [[ccoouunntt]] ,, Reverse find character _c_o_u_n_t times. [[ccoouunntt]] -- Move to first nonblank of the previous line, _c_o_u_n_t times. [[ccoouunntt]] .. Repeat the last _v_i command that modified text. //RREE<> //RREE// [[ooffffsseett]]<> ??RREE<> ??RREE?? [[ooffffsseett]]<> NN nn Search forward or backward for a regular expres- sion. 00 Move to the first character in the current line. :: Execute an ex command. [[ccoouunntt]] ;; Repeat the last character find _c_o_u_n_t times. [[ccoouunntt]] << mmoottiioonn [[ccoouunntt]] >> mmoottiioonn Shift lines left or right. @@ bbuuffffeerr Execute a named buffer. [[ccoouunntt]] AA Enter input mode, appending the text after the end of the line. [[ccoouunntt]] BB Move backwards _c_o_u_n_t bigwords. [[bbuuffffeerr]] [[ccoouunntt]] CC Change text from the current position to the end- of-line. [[bbuuffffeerr]] DD Delete text from the current position to the end- of-line. [[ccoouunntt]] EE Move forward _c_o_u_n_t end-of-bigwords. [[ccoouunntt]] FF <> Search _c_o_u_n_t times backward through the current line for _<_c_h_a_r_a_c_t_e_r_>. [[ccoouunntt]] GG Move to line _c_o_u_n_t, or the last line of the file if _c_o_u_n_t not specified. [[ccoouunntt]] HH Move to the screen line _c_o_u_n_t _- _1 lines below the top of the screen. [[ccoouunntt]] II Enter input mode, inserting the text at the begin- ning of the line. [[ccoouunntt]] JJ Join lines. [[ccoouunntt]] LL Move to the screen line _c_o_u_n_t _- _1 lines above the bottom of the screen. MM Move to the screen line in the middle of the screen. [[ccoouunntt]] OO Enter input mode, appending text in a new line above the current line. [[bbuuffffeerr]] PP Insert text from a buffer. QQ Exit _v_i (or visual) mode and switch to _e_x mode. [[ccoouunntt]] RR Enter input mode, replacing the characters in the current line. [[bbuuffffeerr]] [[ccoouunntt]] SS Substitute _c_o_u_n_t lines. [[ccoouunntt]] TT <> Search backwards, _c_o_u_n_t times, through the current line for the character _a_f_t_e_r the specified _<_c_h_a_r_a_c_- _t_e_r_>. UU Restore the current line to its state before the cursor last moved to it. [[ccoouunntt]] WW Move forward _c_o_u_n_t bigwords. [[bbuuffffeerr]] [[ccoouunntt]] XX Delete _c_o_u_n_t characters before the cursor. [[bbuuffffeerr]] [[ccoouunntt]] YY Copy (or ``yank'') _c_o_u_n_t lines into the specified buffer. ZZZZ Write the file and exit _v_i. [[ccoouunntt]] [[[[ Back up _c_o_u_n_t section boundaries. [[ccoouunntt]] ]]]] Move forward _c_o_u_n_t section boundaries. ^^ Move to first nonblank character on the current line. [[ccoouunntt]] __ Move down _c_o_u_n_t _- _1 lines, to the first nonblank character. [[ccoouunntt]] aa Enter input mode, appending the text after the cur- sor. [[ccoouunntt]] bb Move backwards _c_o_u_n_t words. [[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn Change a region of text. [[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn Delete a region of text. [[ccoouunntt]] ee Move forward _c_o_u_n_t end-of-words. [[ccoouunntt]] ff<> Search forward, _c_o_u_n_t times, through the rest of the current line for _<_c_h_a_r_a_c_t_e_r_>. [[ccoouunntt]] ii Enter input mode, inserting the text before the cursor. mm <> Save the current context (line and column) as _<_c_h_a_r_a_c_t_e_r_>. [[ccoouunntt]] oo Enter input mode, appending text in a new line under the current line. [[bbuuffffeerr]] pp Append text from a buffer. [[ccoouunntt]] rr <> Replace _c_o_u_n_t characters. [[bbuuffffeerr]] [[ccoouunntt]] ss Substitute _c_o_u_n_t characters in the current line starting with the current character. [[ccoouunntt]] tt <> Search forward, _c_o_u_n_t times, through the current line for the character immediately _b_e_f_o_r_e _<_c_h_a_r_a_c_- _t_e_r_>. uu Undo the last change made to the file. [[ccoouunntt]] ww Move forward _c_o_u_n_t words. [[bbuuffffeerr]] [[ccoouunntt]] xx Delete _c_o_u_n_t characters. [[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn Copy (or ``yank'') a text region specified by the _c_o_u_n_t and motion into a buffer. [[ccoouunntt11]] zz [[ccoouunntt22]] --||..||++||^^||<> Redraw, optionally repositioning and resizing the screen. [[ccoouunntt]] {{ Move backward _c_o_u_n_t paragraphs. [[ccoouunntt]] || Move to a specific _c_o_l_u_m_n position on the current line. [[ccoouunntt]] }} Move forward _c_o_u_n_t paragraphs. [[ccoouunntt]] ~~ Reverse the case of the next _c_o_u_n_t character(s). [[ccoouunntt]] ~~ mmoottiioonn Reverse the case of the characters in a text region specified by the _c_o_u_n_t and _m_o_t_i_o_n. <> Interrupt the current operation. VVII TTEEXXTT IINNPPUUTT CCOOMMMMAANNDDSS The following section describes the commands available in the text input mode of the _v_i editor. <> Replay the previous input. <> Erase to the previous sshhiiffttwwiiddtthh column boundary. ^^<> Erase all of the autoindent characters, and reset the autoindent level. 00<> Erase all of the autoindent characters. <> Insert sufficient _<_t_a_b_> and _<_s_p_a_c_e_> characters to move forward to the next sshhiiffttwwiiddtthh column bound- ary. <> <> Erase the last character. <> Quote the next character. <> Resolve all text input into the file, and return to command mode. <> Erase the current line. <> <> Erase the last word. The definition of word is dependent on the aallttwweerraassee and ttttyywweerraassee options. <>[[00--99AA--FFaa--ff]]++ Insert a character with the specified hexadecimal value into the text. <> Interrupt text input mode, returning to command mode. EEXX CCOOMMMMAANNDDSS The following section describes the commands available in the _e_x editor. In each entry below, the tag line is a usage synopsis for the command. <> Scroll the screen. !! aarrgguummeenntt((ss)) [[rraannggee]]!! aarrgguummeenntt((ss)) Execute a shell command, or filter lines through a shell command. "" A comment. [[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]] [[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]] Display the selected lines, each preceded with its line number. @@ bbuuffffeerr ** bbuuffffeerr Execute a buffer. [[lliinnee]] aa[[ppppeenndd]][[!!]] The input text is appended after the specified line. [[rraannggee]] cc[[hhaannggee]][[!!]] [[ccoouunntt]] The input text replaces the specified range. ccss[[ccooppee]] aadddd || ffiinndd || hheellpp || kkiillll || rreesseett Execute a Cscope command. [[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]] Delete the lines from the file. ddii[[ssppllaayy]] bb[[uuffffeerrss]] || cc[[oonnnneeccttiioonnss]] || ss[[ccrreeeennss]] || tt[[aaggss]] Display buffers, Cscope connections, screens or tags. [[EEee]][[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]] [[EEee]]xx[[!!]] [[++ccmmdd]] [[ffiillee]] Edit a different file. eexxuu[[ssaaggee]] [[ccoommmmaanndd]] Display usage for an _e_x command. ff[[iillee]] [[ffiillee]] Display and optionally change the file name. [[FFff]]gg [[nnaammee]] _V_i mode only. Foreground the specified screen. [[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]] [[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]] Apply commands to lines matching (or not matching) a pattern. hhee[[llpp]] Display a help message. [[lliinnee]] ii[[nnsseerrtt]][[!!]] The input text is inserted before the specified line. [[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]] Join lines of text together. [[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]] Display the lines unambiguously. mmaapp[[!!]] [[llhhss rrhhss]] Define or display maps (for _v_i only). [[lliinnee]] mmaa[[rrkk]] <> [[lliinnee]] kk <> Mark the line with the mark _<_c_h_a_r_a_c_t_e_r_>. [[rraannggee]] mm[[oovvee]] lliinnee Move the specified lines after the target line. mmkk[[eexxrrcc]][[!!]] ffiillee Write the abbreviations, editor options and maps to the specified file. [[NNnn]][[eexxtt]][[!!]] [[ffiillee ......]] Edit the next file from the argument list. [[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]] Enter open mode. pprree[[sseerrvvee]] Save the file in a form that can later be recovered using the _e_x --rr option. [[PPpp]]rreevv[[iioouuss]][[!!]] Edit the previous file from the argument list. [[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]] Display the specified lines. [[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]] Append buffer contents to the current line. qq[[uuiitt]][[!!]] End the editing session. [[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]] Read a file. rreecc[[oovveerr]] ffiillee Recover _f_i_l_e if it was previously saved. rreess[[iizzee]] [[++||--]]ssiizzee _V_i mode only. Grow or shrink the current screen. rreeww[[iinndd]][[!!]] Rewind the argument list. ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]] [[nnooooppttiioonn ......]] [[ooppttiioonn?? ......]] [[aallll]] Display or set editor options. sshh[[eellll]] Run a shell program. ssoo[[uurrccee]] ffiillee Read and execute _e_x commands from a file. [[rraannggee]] ss[[uubbssttiittuuttee]] [[//ppaatttteerrnn//rreeppllaaccee//]] [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]] [[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]] [[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]] Make substitutions. ssuu[[ssppeenndd]][[!!]] sstt[[oopp]][[!!]] <> Suspend the edit session. [[TTtt]]aa[[gg]][[!!]] ttaaggssttrriinngg Edit the file containing the specified tag. ttaaggnn[[eexxtt]][[!!]] Edit the file containing the next context for the current tag. ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]] Pop to the specified tag in the tags stack. ttaaggpp[[rreevv]][[!!]] Edit the file containing the previous context for the current tag. uunnmm[[aapp]][[!!]] llhhss Unmap a mapped string. vvee[[rrssiioonn]] Display the version of the _e_x_/_v_i editor. [[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]] _E_x mode only. Enter _v_i. [[VVii]]ii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]] _V_i mode only. Edit a new file. vviiuu[[ssaaggee]] [[ccoommmmaanndd]] Display usage for a _v_i command. [[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]] [[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]] [[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]] [[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]] Write the file. [[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]] Write the file if it has been modified. [[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]] Copy the specified lines to a buffer. [[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]] Adjust the window. SSEETT OOPPTTIIOONNSS There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values. In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbre- viations. The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associ- ated value. Options apply to both _e_x and _v_i modes, unless otherwise specified. aallttwweerraassee [[ooffff]] _V_i only. Select an alternate word erase algorithm. aauuttooiinnddeenntt,, aaii [[ooffff]] Automatically indent new lines. aauuttoopprriinntt,, aapp [[ooffff]] _E_x only. Display the current line automatically. aauuttoowwrriittee,, aaww [[ooffff]] Write modified files automatically when changing files. bbaacckkuupp [[""""]] Backup files before they are overwritten. bbeeaauuttiiffyy,, bbff [[ooffff]] Discard control characters. ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreeccttoorryy]] The directory paths used as path prefixes for the ccdd command. cceeddiitt [[nnoo ddeeffaauulltt]] Set the character to edit the colon command-line history. ccoolluummnnss,, ccoo [[8800]] Set the number of columns in the screen. ccoommmmeenntt [[ooffff]] _V_i only. Skip leading comments in shell, C and C++ language files. ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]] The directory where temporary files are created. eeddccoommppaattiibbllee,, eedd [[ooffff]] Remember the values of the ``c'' and ``g'' suffices to the ssuubbssttiittuuttee commands, instead of initializing them as unset for each new command. eerrrroorrbbeellllss,, eebb [[ooffff]] _E_x only. Announce error messages with a bell. eexxrrcc,, eexx [[ooffff]] Read the startup files in the local directory. eexxtteennddeedd [[ooffff]] Regular expressions are extended (i.e. _e_g_r_e_p(1)-style) expressions. ffiilleecc [[nnoo ddeeffaauulltt]] Set the character to perform file path completion on the colon command line. ffllaasshh [[oonn]] Flash the screen instead of beeping the keyboard on error. hhaarrddttaabbss,, hhtt [[88]] Set the spacing between hardware tab settings. iicclloowweerr [[ooffff]] Makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string. iiggnnoorreeccaassee,, iicc [[ooffff]] Ignore case differences in regular expressions. kkeeyyttiimmee [[66]] The 10th's of a second _e_x_/_v_i waits for a subsequent key to complete a key mapping. lleeffttrriigghhtt [[ooffff]] _V_i only. Do left-right scrolling. lliinneess,, llii [[2244]] _V_i only. Set the number of lines in the screen. lliisspp [[ooffff]] _V_i only. Modify various search commands and options to work with Lisp. _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_. lliisstt [[ooffff]] Display lines in an unambiguous fashion. lloocckk [[oonn]] Attempt to get an exclusive lock on any file being edited, read or written. mmaaggiicc [[oonn]] Treat certain characters specially in regular expressions. mmaattcchhttiimmee [[77]] _V_i only. The 10th's of a second _e_x_/_v_i pauses on the matching character when the sshhoowwmmaattcchh option is set. mmeessgg [[oonn]] Permit messages from other users. mmooddeelliinneess,, mmooddeelliinnee [[ooffff]] Read the first and last few lines of each file for _e_x commands. _T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_- _m_e_n_t_e_d_. nnoopprriinntt [[""""]] Characters that are never handled as printable characters. nnuummbbeerr,, nnuu [[ooffff]] Precede each line displayed with its current line number. ooccttaall [[ooffff]] Display unknown characters as octal numbers, instead of the default hexadecimal. ooppeenn [[oonn]] _E_x only. If this option is not set, the ooppeenn and vviissuuaall commands are disallowed. ooppttiimmiizzee,, oopptt [[oonn]] _V_i only. Optimize text throughput to dumb termi- nals. _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_. ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]] _V_i only. Define additional paragraph boundaries for the {{ and }} commands. ppaatthh [[]] Define additional directories to search for files being edited. pprriinntt [[""""]] Characters that are always handled as printable characters. pprroommpptt [[oonn]] _E_x only. Display a command prompt. rreeaaddoonnllyy,, rroo [[ooffff]] Mark the file and session as read-only. rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]] The directory where recovery files are stored. rreeddrraaww,, rree [[ooffff]] _V_i only. Simulate an intelligent terminal on a dumb one. _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_. rreemmaapp [[oonn]] Remap keys until resolved. rreeppoorrtt [[55]] Set the number of lines about which the editor reports changes or yanks. rruulleerr [[ooffff]] _V_i only. Display a row/column ruler on the colon command line. ssccrroollll,, ssccrr [[wwiinnddooww // 22]] Set the number of lines scrolled. sseeaarrcchhiinnccrr [[ooffff]] Makes the // and ?? commands incremental. sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]] _V_i only. Define additional section boundaries for the [[[[ and ]]]] commands. sseeccuurree [[ooffff]] Turns off all access to external programs. sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]] Select the shell used by the editor. sshheellllmmeettaa [[~~{{[[**??$$``''""\\]] Set the meta characters checked to determine if file name expansion is necessary. sshhiiffttwwiiddtthh,, ssww [[88]] Set the autoindent and shift command indentation width. sshhoowwmmaattcchh,, ssmm [[ooffff]] _V_i only. Note matching ``{'' and ``('' for ``}'' and ``)'' characters. sshhoowwmmooddee,, ssmmdd [[ooffff]] _V_i only. Display the current editor mode and a ``modified'' flag. ssiiddeessccrroollll [[1166]] _V_i only. Set the amount a left-right scroll will shift. sslloowwooppeenn,, ssllooww [[ooffff]] Delay display updating during text input. _T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_. ssoouurrcceeaannyy [[ooffff]] Read startup files not owned by the current user. _T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_. ttaabbssttoopp,, ttss [[88]] This option sets tab widths for the editor display. ttaagglleennggtthh,, ttll [[00]] Set the number of significant characters in tag names. ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]] Set the list of tags files. tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]] Set the terminal type. tteerrssee [[ooffff]] This option has historically made editor messages less verbose. It has no effect in this implementa- tion. ttiillddeeoopp [[ooffff]] Modify the ~~ command to take an associated motion. ttiimmeeoouutt,, ttoo [[oonn]] Time out on keys which may be mapped. ttttyywweerraassee [[ooffff]] _V_i only. Select an alternate erase algorithm. vveerrbboossee [[ooffff]] _V_i only. Display an error message for every error. ww330000 [[nnoo ddeeffaauulltt]] _V_i only. Set the window size if the baud rate is less than 1200 baud. ww11220000 [[nnoo ddeeffaauulltt]] _V_i only. Set the window size if the baud rate is equal to 1200 baud. ww99660000 [[nnoo ddeeffaauulltt]] _V_i only. Set the window size if the baud rate is greater than 1200 baud. wwaarrnn [[oonn]] _E_x only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a !! command. wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS]] Set the window size for the screen. wwiinnddoowwnnaammee [[ooffff]] Change the icon/window name to the current file name even if it can't be restored on editor exit. wwrraapplleenn,, wwll [[00]] _V_i only. Break lines automatically, the specified number of columns from the left-hand margin. If both the wwrraapplleenn and wwrraappmmaarrggiinn edit options are set, the wwrraappmmaarrggiinn value is used. wwrraappmmaarrggiinn,, wwmm [[00]] _V_i only. Break lines automatically, the specified number of columns from the right-hand margin. If both the wwrraapplleenn and wwrraappmmaarrggiinn edit options are set, the wwrraappmmaarrggiinn value is used. wwrraappssccaann,, wwss [[oonn]] Set searches to wrap around the end or beginning of the file. wwrriitteeaannyy,, wwaa [[ooffff]] Turn off file-overwriting checks. EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS _C_O_L_U_M_N_S The number of columns on the screen. This value overrides any system or terminal specific values. If the _C_O_L_U_M_N_S environmental variable is not set when _e_x_/_v_i runs, or the ccoolluummnnss option is explic- itly reset by the user, _e_x_/_v_i enters the value into the environment. _E_X_I_N_I_T A list of _e_x startup commands, read if the variable _N_E_X_I_N_I_T is not set. _H_O_M_E The user's home directory, used as the initial directory path for the startup ``$_H_O_M_E/.nexrc'' and ``$_H_O_M_E/.exrc'' files. This value is also used as the default directory for the _v_i ccdd command. _L_I_N_E_S The number of rows on the screen. This value over- rides any system or terminal specific values. If the _L_I_N_E_S environmental variable is not set when _e_x_/_v_i runs, or the lliinneess option is explicitly reset by the user, _e_x_/_v_i enters the value into the envi- ronment. _N_E_X_I_N_I_T A list of _e_x startup commands. _S_H_E_L_L The user's shell of choice (see also the sshheellll option). _T_E_R_M The user's terminal type. The default is the type ``unknown''. If the _T_E_R_M environmental variable is not set when _e_x_/_v_i runs, or the tteerrmm option is explicitly reset by the user, _e_x_/_v_i enters the value into the environment. _T_M_P_D_I_R The location used to stored temporary files (see also the ddiirreeccttoorryy edit option). AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS SIGALRM _V_i_/_e_x uses this signal for periodic backups of file modifications and to display ``busy'' messages when operations are likely to take a long time. SIGHUP SIGTERM If the current buffer has changed since it was last written in its entirety, the editor attempts to save the modified file so it can be later recov- ered. See the _v_i_/_e_x Reference manual section enti- tled ``Recovery'' for more information. SIGINT When an interrupt occurs, the current operation is halted, and the editor returns to the command level. If interrupted during text input, the text already input is resolved into the file as if the text input had been normally terminated. SIGWINCH The screen is resized. See the _v_i_/_e_x Reference manual section entitled ``Sizing the Screen'' for more information. SIGCONT SIGQUIT SIGTSTP _V_i_/_e_x ignores these signals. FFIILLEESS /bin/sh The default user shell. /etc/vi.exrc System-wide vi startup file. /tmp Temporary file directory. /var/tmp/vi.recover The default recovery file directory. $HOME/.nexrc 1st choice for user's home directory startup file. $HOME/.exrc 2nd choice for user's home directory startup file. .nexrc 1st choice for local directory startup file. .exrc 2nd choice for local directory startup file. SSEEEE AALLSSOO _c_t_a_g_s(1), _m_o_r_e(1), _c_u_r_s_e_s(3), _d_b_o_p_e_n(3) The ``Vi Quick Reference'' card. ``An Introduction to Display Editing with Vi'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the closest thing available to an introduction to the _v_i screen editor. ``Ex Reference Manual (Version 3.7)'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the final reference for the _e_x editor, as distributed in most historic 4BSD and System V systems. ``Edit: A tutorial'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.3BSD manual set. This document is an introduction to a simple version of the _e_x screen editor. ``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.4BSD manual set. This document is the final reference for the _n_e_x_/_n_v_i text editors, as distributed in 4.4BSD and 4.4BSD- Lite. _R_o_f_f source for all of these documents is distributed with _n_e_x_/_n_v_i in the _n_v_i_/_U_S_D_._d_o_c directory of the _n_e_x_/_n_v_i source code. The files ``autowrite'', ``input'', ``quoting'' and ``structures'' found in the _n_v_i_/_d_o_c_s_/_i_n_t_e_r_n_a_l_s directory of the _n_e_x_/_n_v_i source code. HHIISSTTOORRYY The _n_e_x_/_n_v_i replacements for the _e_x_/_v_i editor first appeared in 4.4BSD. SSTTAANNDDAARRDDSS _N_e_x_/_n_v_i is close to IEEE Std1003.2 (``POSIX''). That doc- ument differs from historical _e_x_/_v_i practice in several places; there are changes to be made on both sides. 1Q1 VI(1) nvi-1.81.6/docs/vi.man/vi.0.ps0100444000076400001440000020217410720065720014714 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:44:00 2007 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 16 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Roman %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE /Times-Roman@0 ENC0/Times-Roman RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10.95 /Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 -.15(ex)108 96 S 2.5(,v) .15 G(i, vie)-2.5 E 2.5(w\255t)-.25 G -.15(ex)-2.5 G 2.5(te).15 G (ditors)-2.5 E F1(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(ex)108 124.8 Q F0([)2.5 E F2(-eFRrSsv)A F0 2.5(][)C F2(-c)-2.5 E/F3 10/Times-Italic@0 SF(cmd)2.5 E F0 2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][) .22 G F2(-w)-2.5 E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F2 (vi)108 136.8 Q F0([)2.5 E F2(-eFlRrSv)A F0 2.5(][)C F2(-c)-2.5 E F3 (cmd)2.5 E F0 2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][) .22 G F2(-w)-2.5 E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F2 (view)108 148.8 Q F0([)2.5 E F2(-eFRrSv)A F0 2.5(][)C F2(-c)-2.5 E F3 (cmd)2.5 E F0 2.5(][).77 G F2(-t)-2.5 E F3(ta)2.5 E(g)-.1 E F0 2.5(][) .22 G F2(-w)-2.5 E F3(size)2.5 E F0 2.5(][).18 G(\214le ...])-2.5 E F1 (LICENSE)72 165.6 Q F0 .668(The vi program is freely redistrib)108 177.6 R 3.168(utable. Y)-.2 F .668(ou are welcome to cop)-1.1 F 1.968 -.65 (y, m)-.1 H .667(odify and share it with others under).65 F .349 (the conditions listed in the LICENSE \214le.)108 189.6 R .349(If an) 5.349 F 2.849(yc)-.15 G(ompan)-2.849 E 2.849(y\()-.15 G .35(not indi) -2.849 F .35(vidual!\) \214nds vi suf)-.25 F .35 (\214ciently useful that)-.25 F .112(you w)108 201.6 R .112(ould ha)-.1 F .412 -.15(ve p)-.2 H .112(urchased it, or if an).15 F 2.612(yc)-.15 G (ompan)-2.612 E 2.612(yw)-.15 G .112(ishes to redistrib)-2.612 F .112 (ute it, contrib)-.2 F .111(utions to the authors w)-.2 F(ould)-.1 E (be appreciated.)108 213.6 Q F1(DESCRIPTION)72 230.4 Q F3 -.74(Vi)108 242.4 S F0 .452(is a screen oriented te)3.692 F .452(xt editor)-.15 F(.) -.55 E F3(Ex)5.452 E F0 .452(is a line-oriented te)2.952 F .452 (xt editor)-.15 F(.)-.55 E F3(Ex)5.452 E F0(and)2.952 E F3(vi)2.952 E F0 .452(are dif)2.952 F .452(ferent interf)-.25 F .452(aces to the)-.1 F .502(same program, and it is possible to switch back and forth during a\ n edit session.)108 254.4 R F3 -.74(Vi)5.502 G -.15(ew).74 G F0 .502 (is the equi)3.152 F -.25(va)-.25 G .502(lent of).25 F(using the)108 266.4 Q F22.5 E F0(\(read-only\) option of)2.5 E F3(vi)2.5 E F0(.) .36 E 2.044(This manual page is the one pro)108 283.2 R 2.044 (vided with the)-.15 F F3(ne)4.544 E(x/n)-.2 E(vi)-.4 E F0 -.15(ve)4.544 G 2.044(rsions of the).15 F F3 -.2(ex)4.544 G(/vi).2 E F0(te)4.544 E 2.044(xt editors.)-.15 F F3(Ne)7.045 E(x/n)-.2 E(vi)-.4 E F0(are)4.545 E 1.392(intended as b)108 295.2 R(ug-for)-.2 E(-b)-.2 E 1.392 (ug compatible replacements for the original F)-.2 F 1.392(ourth Berk) -.15 F(ele)-.1 E 3.891(yS)-.15 G(oftw)-3.891 E 1.391(are Distrib)-.1 F (ution)-.2 E(\(4BSD\))108 307.2 Q F3 -.2(ex)3.272 G F0(and)3.472 E F3 (vi)3.272 E F0 3.272(programs. F)3.272 F .773 (or the rest of this manual page,)-.15 F F3(ne)3.273 E(x/n)-.2 E(vi)-.4 E F0 .773(is used only when it')3.273 F 3.273(sn)-.55 G .773 (ecessary to)-3.273 F (distinguish it from the historic implementations of)108 319.2 Q F3 -.2 (ex)2.5 G(/vi).2 E F0(.).36 E 1.126 (This manual page is intended for users already f)108 336 R 1.125 (amiliar with)-.1 F F3 -.2(ex)3.625 G(/vi).2 E F0 6.125(.A).36 G -.15 (ny)-6.125 G 1.125(one else should almost certainly).15 F .248 (read a good tutorial on the editor before this manual page.)108 348 R .248(If you')5.248 F .249(re in an unf)-.5 F .249(amiliar en)-.1 F .249 (vironment, and you)-.4 F .4(absolutely ha)108 360 R .7 -.15(ve t)-.2 H 2.9(og).15 G .4(et w)-2.9 F .4(ork done immediately)-.1 F 2.899(,r)-.65 G .399(ead the section after the options description, entitled `)-2.899 F(`F)-.74 E(ast)-.15 E(Startup')108 372 Q 2.5('. It')-.74 F 2.5(sp)-.55 G(robably enough to get you going.)-2.5 E(The follo)108 388.8 Q (wing options are a)-.25 E -.25(va)-.2 G(ilable:).25 E F2108 405.6 Q F0(Ex)25.86 E(ecute)-.15 E F2(cmd)2.935 E F0 .435 (immediately after starting the edit session.)2.935 F -.15(Pa)5.435 G .435(rticularly useful for initial positioning).15 F .324 (in the \214le, ho)144 417.6 R(we)-.25 E -.15(ve)-.25 G(r).15 E F2(cmd) 2.824 E F0 .324(is not limited to positioning commands.)2.824 F .323 (This is the POSIX 1003.2 inter)5.324 F(-)-.2 E -.1(fa)144 429.6 S (ce for the historic `).1 E(`+cmd')-.74 E 2.5('s)-.74 G(yntax.)-2.5 E F3 (Ne)5 E(x/n)-.2 E(vi)-.4 E F0(supports both the old and ne)2.5 E 2.5(ws) -.25 G(yntax.)-2.5 E F2108 446.4 Q F0(Start editing in e)25.86 E 2.5(xm)-.15 G(ode, as if the command name were)-2.5 E F3 -.2(ex)2.5 G F0 (.).73 E F2108 463.2 Q F0(Don')24.19 E 2.893(tc)-.18 G(op)-2.893 E 2.893(yt)-.1 G .393(he entire \214le when \214rst starting to edit.) -2.893 F .393(\(The def)5.393 F .393(ault is to mak)-.1 F 2.893(eac)-.1 G(op)-2.893 E 2.894(yi)-.1 G 2.894(nc)-2.894 G .394(ase some-)-2.894 F (one else modi\214es the \214le during your edit session.\))144 475.2 Q F2108 492 Q F0(Start editing with the lisp and sho)27.52 E (wmatch options set.)-.25 E F2108 508.8 Q F0 .947 (Start editing in read-only mode, as if the command name w)23.08 F(as) -.1 E F3(vie)3.447 E(w)-.15 E F0 3.447(,o).31 G 3.447(rt)-3.447 G(he) -3.447 E F2 -.18(re)3.447 G(adonly).18 E F0 .946(option w)3.446 F(as)-.1 E(set.)144 520.8 Q F2108 537.6 Q F0(Reco)25.86 E -.15(ve)-.15 G 3 (rt).15 G .5(he speci\214ed \214les, or)-3 F 3(,i)-.4 G 3(fn)-3 G 3 <6f8c>-3 G .501 (les are speci\214ed, list the \214les that could be reco)-3 F -.15(ve) -.15 G 3.001(red. If).15 F(no)3.001 E(reco)144 549.6 Q -.15(ve)-.15 G 1.264(rable \214les by the speci\214ed name e).15 F 1.264 (xist, the \214le is edited as if the)-.15 F F23.764 E F0 1.263 (option had not been)3.764 F(speci\214ed.)144 561.6 Q F2108 578.4 Q F0(Run with the)24.74 E F2(secur)2.5 E(e)-.18 E F0 (edit option set, disallo)2.5 E(wing all access to e)-.25 E (xternal programs.)-.15 E F2108 595.2 Q F0 1.596 (Enter batch mode; applicable only to)26.41 F F3 -.2(ex)4.097 G F0 1.597 (edit sessions.)4.297 F 1.597(Batch mode is useful when running)6.597 F F3 -.2(ex)4.097 G F0 3.894(scripts. Prompts,)144 607.2 R(informati)3.893 E 1.693 -.15(ve m)-.25 H 1.393 (essages and other user oriented message are turned of).15 F 1.393 (f, and no)-.25 F .788(startup \214les or en)144 619.2 R .788 (vironmental v)-.4 F .788(ariables are read.)-.25 F .788 (This is the POSIX 1003.2 interf)5.788 F .788(ace for the his-)-.1 F (toric `)144 631.2 Q(`\255')-.74 E 2.5('a)-.74 G -.18(rg)-2.5 G(ument.) .18 E F3(Ne)5 E(x/n)-.2 E(vi)-.4 E F0(supports both the old and ne)2.5 E 2.5(ws)-.25 G(yntax.)-2.5 E F2108 648 Q F0 (Start editing at the speci\214ed tag.)26.97 E(\(See)5 E F3(cta)2.5 E (gs)-.1 E F0(\(1\)\).).27 E F2108 664.8 Q F0 (Set the initial windo)23.08 E 2.5(ws)-.25 G (ize to the speci\214ed number of lines.)-2.5 E F2108 681.6 Q F0 (Start editing in vi mode, as if the command name w)25.3 E(as)-.1 E F3 (vi)2.5 E F0(or)2.5 E F3(vie)2.5 E(w)-.15 E F0(.).31 E .383 (Command input for)108 698.4 R F3 -.2(ex)2.883 G(/vi).2 E F0 .383 (is read from the standard input.)2.883 F .382(In the)5.383 F F3(vi) 2.882 E F0(interf)2.882 E .382(ace, it is an error if standard input)-.1 F 1.156(is not a terminal.)108 710.4 R 1.156(In the)6.156 F F3 -.2(ex) 3.656 G F0(interf)3.856 E 1.156 (ace, if standard input is not a terminal,)-.1 F F3 -.2(ex)3.656 G F0 1.156(will read commands from it)3.856 F(re)108 722.4 Q -.05(ga)-.15 G .031(rdless, ho).05 F(we)-.25 E -.15(ve)-.25 G .831 -.4(r, t).15 H .031 (he session will be a batch mode session, e).4 F .03(xactly as if the) -.15 F F22.53 E F0 .03(option had been speci\214ed.)2.53 F 217.89 (1Q1 1)297.39 768 R EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Italic@0 SF(Ex/vi)108 84 Q F0 -.15(ex)2.5 G (its 0 on success, and greater than 0 if an error occurs.).15 E/F2 10.95 /Times-Bold@0 SF -.986(FA)72 100.8 S(ST ST).986 E(AR)-.986 E(TUP)-.438 E F0 .252(This section will tell you the minimum amount that you need to \ do simple editing tasks using)108 112.8 R F1(vi)2.752 E F0 5.253(.I).36 G 2.753(fy)-5.253 G(ou')-2.753 E -.15(ve)-.5 G(ne)108 124.8 Q -.15(ve) -.25 G 3.079(ru).15 G .579(sed an)-3.079 F 3.078(ys)-.15 G .578 (creen editor before, you')-3.078 F .578(re lik)-.5 F .578(ely to ha)-.1 F .878 -.15(ve p)-.2 H .578(roblems e).15 F -.15(ve)-.25 G 3.078(nw).15 G .578(ith this simple introduction.)-3.078 F(In)5.578 E (that case you should \214nd someone that already kno)108 136.8 Q(ws) -.25 E F1(vi)2.5 E F0(and ha)2.5 E .3 -.15(ve t)-.2 H(hem w).15 E (alk you through this section.)-.1 E F1 -.74(Vi)108 153.6 S F0 .191 (is a screen editor)3.43 F 5.191(.T)-.55 G .191(his means that it tak) -5.191 F .191 (es up almost the entire screen, displaying part of the \214le on each) -.1 F .765(screen line, e)108 165.6 R .764 (xcept for the last line of the screen.)-.15 F .764 (The last line of the screen is used for you to gi)5.764 F 1.064 -.15 (ve c)-.25 H(om-).15 E(mands to)108 177.6 Q F1(vi)2.5 E F0 2.5(,a).36 G (nd for)-2.5 E F1(vi)2.5 E F0(to gi)2.5 E .3 -.15(ve i)-.25 H (nformation to you.).15 E .526(The other f)108 194.4 R .526 (act that you need to understand is that)-.1 F F1(vi)3.027 E F0 .527 (is a modeful editor)3.027 F 3.027(,i)-.4 G .527 (.e. you are either entering te)-3.027 F .527(xt or)-.15 F .565 (you are e)108 206.4 R -.15(xe)-.15 G .564(cuting commands, and you ha) .15 F .864 -.15(ve t)-.2 H 3.064(ob).15 G 3.064(ei)-3.064 G 3.064(nt) -3.064 G .564(he right mode to do one or the other)-3.064 F 5.564(.Y) -.55 G .564(ou will be in)-6.664 F .74 (command mode when you \214rst start editing a \214le.)108 218.4 R .741 (There are commands that switch you into input mode.)5.741 F .223 (There is only one k)108 230.4 R .523 -.15(ey t)-.1 H .223(hat tak).15 F .222(es you out of input mode, and that is the k)-.1 F -.15(ey) -.1 G 5.222(.\()-.5 G -2.15 -.25(Ke y)-5.222 H .222(names are writ-) 2.972 F .885(ten using less-than and greater)108 242.4 R .886 (-than signs, e.g.)-.2 F .886( means the `)5.886 F(`escape')-.74 E 3.386('k)-.74 G -.15(ey)-3.486 G 3.386(,u)-.5 G .886(sually labeled `) -3.386 F(`esc')-.74 E(')-.74 E 1.925(on your terminal')108 254.4 R 4.425 (sk)-.55 G -.15(ey)-4.525 G 4.425(board.\) If).15 F(you')4.425 E 1.925 (re e)-.5 F -.15(ve)-.25 G 4.424(rc).15 G 1.924 (onfused as to which mode you')-4.424 F 1.924(re in, k)-.5 F 1.924 (eep entering the)-.1 F .653( k)108 266.4 R .953 -.15(ey u)-.1 H (ntil).15 E F1(vi)3.153 E F0 .653(beeps at you.)3.153 F(\(Generally) 5.653 E(,)-.65 E F1(vi)3.153 E F0 .653 (will beep at you if you try and do something that')3.153 F 3.153(sn) -.55 G(ot)-3.153 E(allo)108 278.4 Q 2.5(wed. It)-.25 F (will also display error messages.\))2.5 E 3.247 -.8(To s)108 295.2 T 1.647(tart editing a \214le, enter the command `).8 F 1.647 (`vi \214le_name')-.74 F 4.147('. The)-.74 F 1.647 (command you should)4.147 F .426 (enter as soon as you start editing is `)108 307.2 R .426(`:set v)-.74 F .426(erbose sho)-.15 F(wmode')-.25 E 2.926('. This)-.74 F .426(will mak)2.926 F 2.926(et)-.1 G .426(he editor)-2.926 F(gi)108 319.2 Q .3 -.15(ve y)-.25 H(ou v).15 E(erbose error messages and displa\ y the current mode at the bottom of the screen.)-.15 E (The commands to mo)108 336 Q .3 -.15(ve a)-.15 H(round the \214le are:) .15 E/F3 10/Times-Bold@0 SF(h)108 352.8 Q F0(Mo)30.44 E .3 -.15(ve t) -.15 H(he cursor left one character).15 E(.)-.55 E F3(j)108 369.6 Q F0 (Mo)32.67 E .3 -.15(ve t)-.15 H(he cursor do).15 E(wn one line.)-.25 E F3(k)108 386.4 Q F0(Mo)30.44 E .3 -.15(ve t)-.15 H (he cursor up one line.).15 E F3(l)108 403.2 Q F0(Mo)33.22 E .3 -.15 (ve t)-.15 H(he cursor right one character).15 E(.)-.55 E F3().1 E F0(The cursor arro)144 432 Q 2.5 (wk)-.25 G -.15(ey)-2.6 G 2.5(ss).15 G(hould w)-2.5 E(ork, too.)-.1 E F3 (/text)-.15 E F0 (Search for the string `)144 460.8 Q(`te)-.74 E(xt')-.15 E 2.5('i)-.74 G 2.5(nt)-2.5 G(he \214le, and mo)-2.5 E .3 -.15(ve t)-.15 H (he cursor to its \214rst character).15 E(.)-.55 E (The commands to enter ne)108 477.6 Q 2.5(wt)-.25 G -.15(ex)-2.5 G 2.5 (ta).15 G(re:)-2.5 E F3(a)108 494.4 Q F0(Append ne)31 E 2.5(wt)-.25 G -.15(ex)-2.5 G(t,).15 E F1(after)2.5 E F0(the cursor)2.5 E(.)-.55 E F3 (i)108 511.2 Q F0(Insert ne)33.22 E 2.5(wt)-.25 G -.15(ex)-2.5 G(t,).15 E F1(befor)2.5 E(e)-.37 E F0(the cursor)2.5 E(.)-.55 E F3(o)108 528 Q F0 (Open a ne)31 E 2.5(wl)-.25 G(ine belo)-2.5 E 2.5(wt)-.25 G (he line the cursor is on, and start entering te)-2.5 E(xt.)-.15 E F3(O) 108 544.8 Q F0(Open a ne)28.22 E 2.5(wl)-.25 G(ine abo)-2.5 E .3 -.15 (ve t)-.15 H(he line the cursor is on, and start entering te).15 E(xt.) -.15 E F3()108 561.6 Q F0 .192(Once you')144 573.6 R .491 -.15 (ve e)-.5 H .191(ntered input mode using the one of the).15 F F3(a)2.691 E F0(,)A F3(i)2.691 E F0(,)A F3(O)2.691 E F0(or)2.691 E F3(o)2.691 E F0 .191(commands, use)2.691 F F3()2.691 E F0 .191(to quit)2.691 F (entering te)144 585.6 Q(xt and return to command mode.)-.15 E (The commands to cop)108 602.4 Q 2.5(yt)-.1 G -.15(ex)-2.5 G 2.5(ta).15 G(re:)-2.5 E F3(yy)108 619.2 Q F0(Cop)26 E 2.5(yt)-.1 G (he line the cursor is on.)-2.5 E F3(p)108 636 Q F0 (Append the copied line after the line the cursor is on.)30.44 E (The commands to delete te)108 652.8 Q(xt are:)-.15 E F3(dd)108 669.6 Q F0(Delete the line the cursor is on.)24.88 E F3(x)108 686.4 Q F0 (Delete the character the cursor is on.)31 E (The commands to write the \214le are:)108 703.2 Q 217.89(2Q2 2)297.39 768 R EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF(:w)-.15 E F0 .117(W\ rite the \214le back to the \214le with the name that you originally us\ ed as an ar)144 96 R .117(gument on the)-.18 F/F2 10/Times-Italic@0 SF (vi)2.617 E F0(com-)2.617 E(mand line.)144 108 Q F1 (:w \214le_name)-.15 E F0 (Write the \214le back to the \214le with the name `)144 136.8 Q (`\214le_name')-.74 E('.)-.74 E(The commands to quit editing and e)108 153.6 Q(xit the editor are:)-.15 E F1(:q)-.15 E F0 .392(Quit editing and lea)144 182.4 R .691 -.15 (ve v)-.2 H 2.891(i\().15 G .391(if you')-2.891 F .691 -.15(ve m)-.5 H .391(odi\214ed the \214le, b).15 F .391(ut not sa)-.2 F -.15(ve)-.2 G 2.891(dy).15 G .391(our changes,)-2.891 F F2(vi)2.891 E F0 .391 (will refuse to)2.891 F(quit\).)144 194.4 Q F1(:q!)-.15 E F0(Quit, discarding an)144 223.2 Q 2.5(ym)-.15 G (odi\214cations that you may ha)-2.5 E .3 -.15(ve m)-.2 H(ade.).15 E .353(One \214nal caution.)108 240 R .353(Unusual characters can tak) 5.353 F 2.853(eu)-.1 G 2.853(pm)-2.853 G .354 (ore than one column on the screen, and long lines can)-2.853 F(tak)108 252 Q 2.776(eu)-.1 G 2.776(pm)-2.776 G .276 (ore than a single screen line.)-2.776 F .276(The abo)5.276 F .576 -.15 (ve c)-.15 H .276(ommands w).15 F .276(ork on `)-.1 F(`ph)-.74 E (ysical')-.05 E 2.776('c)-.74 G .275(haracters and lines, i.e.)-2.776 F (the)108 264 Q 3.462(ya)-.15 G -.25(ff)-3.462 G .962 (ect the entire line no matter ho).25 F 3.462(wm)-.25 G(an)-3.462 E 3.462(ys)-.15 G .962(creen lines it tak)-3.462 F .962 (es up and the entire character no matter)-.1 F(ho)108 276 Q 2.5(wm)-.25 G(an)-2.5 E 2.5(ys)-.15 G(creen columns it tak)-2.5 E(es up.)-.1 E/F3 10.95/Times-Bold@0 SF(VI COMMANDS)72 292.8 Q F0 1.076(The follo)108 304.8 R 1.076(wing section describes the commands a)-.25 F -.25(va)-.2 G 1.076(ilable in the command mode of the).25 F F2(vi)3.575 E F0(editor) 3.575 E 6.075(.I)-.55 G 3.575(ne)-6.075 G(ach)-3.575 E(entry belo)108 316.8 Q 1.3 -.65(w, t)-.25 H (he tag line is a usage synopsis for the command character).65 E(.)-.55 E F1([count] )-.18 E F0(Search forw)144 350.4 Q (ard)-.1 E F2(count)2.5 E F0(times for the current w)2.5 E(ord.)-.1 E F1 ([count] )-.18 E F0 -.15(Pa)144 379.2 S (ge backw).15 E(ards)-.1 E F2(count)2.5 E F0(screens.)2.5 E F1 ([count] )-.18 E F0(Scroll forw)144 408 Q(ard)-.1 E F2(count)2.5 E F0(lines.)2.5 E F1([count] ) -.18 E F0(Scroll forw)144 436.8 Q(ard)-.1 E F2(count)2.5 E F0 (lines, lea)2.5 E(ving the current line and column as is, if possible.) -.2 E F1([count] )-.18 E F0 -.15(Pa)144 465.6 S (ge forw).15 E(ard)-.1 E F2(count)2.5 E F0(screens.)2.5 E F1()-.18 E F0(Display the \214le information.)144 494.4 Q F1 ()-.18 E([count] h)108 528 Q F0(Mo)144 540 Q .3 -.15(ve t)-.15 H(he cursor back).15 E F2(count)2.5 E F0 (characters in the current line.)2.5 E F1([count] )-.18 E([count] )-.18 E([count] j)108 590.4 Q F0(Mo)144 602.4 Q .3 -.15(ve t)-.15 H(he cursor do).15 E(wn)-.25 E F2(count)2.5 E F0(lines without changing the current column.)2.5 E F1 ()-.18 E()-.18 E F0 (Repaint the screen.)144 648 Q F1([count] )-.18 E([count] +)108 681.6 Q F0(Mo)144 693.6 Q .3 -.15(ve t)-.15 H (he cursor do).15 E(wn)-.25 E F2(count)2.5 E F0 (lines to the \214rst nonblank character of that line.)2.5 E 217.89 (3Q3 3)297.39 768 R EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF([count] )-.18 E([count] k)108 100.8 Q F0(Mo)144 112.8 Q .3 -.15(ve t)-.15 H(he cursor up).15 E/F2 10 /Times-Italic@0 SF(count)2.5 E F0 (lines, without changing the current column.)2.5 E F1()-.18 E F0(Return to the most recent tag conte)144 141.6 Q(xt.) -.15 E F1()-.18 E F0(Scroll backw)144 170.4 Q (ards)-.1 E F2(count)2.5 E F0(lines.)2.5 E F1() -.18 E F0 .525(Switch to the ne)144 199.2 R .525(xt lo)-.15 F .525 (wer screen in the windo)-.25 F 1.825 -.65(w, o)-.25 H 1.325 -.4(r, t) .65 H 3.025(ot).4 G .526(he \214rst screen if there are no lo)-3.025 F .526(wer screens)-.25 F(in the windo)144 211.2 Q -.65(w.)-.25 G F1 ()-.18 E F0(Scroll backw)144 240 Q(ards)-.1 E F2 (count)2.5 E F0(lines, lea)2.5 E (ving the current line and column as is, if possible.)-.2 E F1()-.18 E F0(Suspend the current editor session.)144 268.8 Q F1()108 285.6 Q F0(Ex)144 297.6 Q(ecute)-.15 E F2 -.2 (ex)2.5 G F0(commands or cancel partial commands.)2.7 E F1()-.18 E F0(Push a tag reference onto the tag stack.)144 326.4 Q F1()-.18 E F0 (Switch to the most recently edited \214le.)144 355.2 Q F1 ([count] )108 372 Q([count] l)108 388.8 Q F0(Mo)144 400.8 Q .3 -.15(ve t)-.15 H(he cursor forw).15 E(ard)-.1 E F2(count)2.5 E F0 (characters without changing the current line.)2.5 E F1 ([count] ! motion shell-ar)108 417.6 Q(gument\(s\))-.1 E F0(Replace te) 144 429.6 Q(xt with results from a shell command.)-.15 E F1 ([count] # #|+|-)108 446.4 Q F0 (Increment or decrement the cursor number)144 458.4 Q(.)-.55 E F1 ([count] $)108 475.2 Q F0(Mo)144 487.2 Q .3 -.15(ve t)-.15 H (he cursor to the end of a line.).15 E F1(%)108 504 Q F0(Mo)26 E .3 -.15 (ve t)-.15 H 2.5(ot).15 G(he matching character)-2.5 E(.)-.55 E F1(&)108 520.8 Q F0(Repeat the pre)27.67 E (vious substitution command on the current line.)-.25 E F1(') 108 537.6 Q(`)108 554.4 Q F0(Return to a conte)144 566.4 Q (xt mark)-.15 E(ed by the character)-.1 E F2() -.15 E F0(.)A F1([count] \()108 583.2 Q F0(Back up)144 595.2 Q F2(count) 2.5 E F0(sentences.)2.5 E F1([count] \))108 612 Q F0(Mo)144 624 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0(sentences.)2.5 E F1([count] ,)108 640.8 Q F0(Re)144 652.8 Q -.15(ve)-.25 G (rse \214nd character).15 E F2(count)2.5 E F0(times.)2.5 E F1([count] -) 108 669.6 Q F0(Mo)144 681.6 Q .3 -.15(ve t)-.15 H 2.5<6f8c>.15 G (rst nonblank of the pre)-2.5 E(vious line,)-.25 E F2(count)2.5 E F0 (times.)2.5 E F1([count] .)108 698.4 Q F0(Repeat the last)144 710.4 Q F2 (vi)2.5 E F0(command that modi\214ed te)2.5 E(xt.)-.15 E 217.89(4Q4 4) 297.39 768 R EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF(/RE)-.15 E (/RE/ [offset])-.15 E (?RE)-.15 E (?RE? [offset])-.15 E(N)108 151.2 Q(n)108 168 Q F0(Search forw)30.44 E(ard or backw)-.1 E(ard for a re)-.1 E(gular e)-.15 E(xpression.)-.15 E F1(0)108 184.8 Q F0(Mo)31 E .3 -.15 (ve t)-.15 H 2.5(ot).15 G(he \214rst character in the current line.)-2.5 E F1(:)108 201.6 Q F0(Ex)32.67 E(ecute an e)-.15 E 2.5(xc)-.15 G (ommand.)-2.5 E F1([count] ;)108 218.4 Q F0 (Repeat the last character \214nd)144 230.4 Q/F2 10/Times-Italic@0 SF (count)2.5 E F0(times.)2.5 E F1([count] < motion)108 247.2 Q ([count] > motion)108 264 Q F0(Shift lines left or right.)144 276 Q F1 2.5(@b)108 292.8 S(uffer)-2.7 E F0(Ex)144 304.8 Q(ecute a named b)-.15 E (uf)-.2 E(fer)-.25 E(.)-.55 E F1([count] A)108 321.6 Q F0 (Enter input mode, appending the te)144 333.6 Q (xt after the end of the line.)-.15 E F1([count] B)108 350.4 Q F0(Mo)144 362.4 Q .3 -.15(ve b)-.15 H(ackw).15 E(ards)-.1 E F2(count)2.5 E F0 (bigw)2.5 E(ords.)-.1 E F1([b)108 379.2 Q(uffer] [count] C)-.2 E F0 (Change te)144 391.2 Q(xt from the current position to the end-of-line.) -.15 E F1([b)108 408 Q(uffer] D)-.2 E F0(Delete te)144 420 Q (xt from the current position to the end-of-line.)-.15 E F1([count] E) 108 436.8 Q F0(Mo)144 448.8 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2 (count)2.5 E F0(end-of-bigw)2.5 E(ords.)-.1 E F1([count] F ) 108 465.6 Q F0(Search)144 477.6 Q F2(count)2.5 E F0(times backw)2.5 E (ard through the current line for)-.1 E F2() -.15 E F0(.)A F1([count] G)108 494.4 Q F0(Mo)144 506.4 Q .3 -.15(ve t) -.15 H 2.5(ol).15 G(ine)-2.5 E F2(count)2.5 E F0 2.5(,o).68 G 2.5(rt) -2.5 G(he last line of the \214le if)-2.5 E F2(count)2.5 E F0 (not speci\214ed.)2.5 E F1([count] H)108 523.2 Q F0(Mo)144 535.2 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he screen line)-2.5 E F2(count - 1)2.5 E F0(lines belo)2.5 E 2.5(wt)-.25 G(he top of the screen.)-2.5 E F1 ([count] I)108 552 Q F0(Enter input mode, inserting the te)144 564 Q (xt at the be)-.15 E(ginning of the line.)-.15 E F1([count] J)108 580.8 Q F0(Join lines.)144 592.8 Q F1([count] L)108 609.6 Q F0(Mo)144 621.6 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he screen line)-2.5 E F2(count - 1)2.5 E F0(lines abo)2.5 E .3 -.15(ve t)-.15 H(he bottom of the screen.).15 E F1(M)110.5 638.4 Q F0(Mo)24.06 E .3 -.15(ve t)-.15 H 2.5(ot).15 G (he screen line in the middle of the screen.)-2.5 E F1([count] O)108 655.2 Q F0(Enter input mode, appending te)144 667.2 Q(xt in a ne)-.15 E 2.5(wl)-.25 G(ine abo)-2.5 E .3 -.15(ve t)-.15 H(he current line.).15 E F1([b)108 684 Q(uffer] P)-.2 E F0(Insert te)144 696 Q(xt from a b)-.15 E (uf)-.2 E(fer)-.25 E(.)-.55 E F1(Q)108 712.8 Q F0(Exit)28.22 E F2(vi)2.5 E F0(\(or visual\) mode and switch to)2.5 E F2 -.2(ex)2.5 G F0(mode.)2.7 E 217.89(5Q5 5)297.39 768 R EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF([count] R)108 84 Q F0 (Enter input mode, replacing the characters in the current line.)144 96 Q F1([b)108 112.8 Q(uffer] [count] S)-.2 E F0(Substitute)144 124.8 Q/F2 10/Times-Italic@0 SF(count)2.5 E F0(lines.)2.5 E F1 ([count] T )108 141.6 Q F0 .025(Search backw)144 153.6 R (ards,)-.1 E F2(count)2.525 E F0 .025 (times, through the current line for the character)2.525 F F2(after) 2.525 E F0 .025(the speci\214ed)2.525 F F2()144 165.6 Q F0(.)A F1(U)108 182.4 Q F0 (Restore the current line to its state before the cursor last mo)28.78 E -.15(ve)-.15 G 2.5(dt).15 G 2.5(oi)-2.5 G(t.)-2.5 E F1([count] W)108 199.2 Q F0(Mo)144 211.2 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2 (count)2.5 E F0(bigw)2.5 E(ords.)-.1 E F1([b)108 228 Q(uffer] [count] X) -.2 E F0(Delete)144 240 Q F2(count)2.5 E F0 (characters before the cursor)2.5 E(.)-.55 E F1([b)108 256.8 Q (uffer] [count] Y)-.2 E F0(Cop)144 268.8 Q 2.5(y\()-.1 G(or `)-2.5 E (`yank')-.74 E('\))-.74 E F2(count)2.5 E F0 (lines into the speci\214ed b)2.5 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1(ZZ) 108 285.6 Q F0(Write the \214le and e)22.66 E(xit)-.15 E F2(vi)2.5 E F0 (.).36 E F1([count] [[)108 302.4 Q F0(Back up)144 314.4 Q F2(count)2.5 E F0(section boundaries.)2.5 E F1([count] ]])108 331.2 Q F0(Mo)144 343.2 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0 (section boundaries.)2.5 E F1(^)108 360 Q F0(Mo)32.67 E .3 -.15(ve t) -.15 H 2.5<6f8c>.15 G(rst nonblank character on the current line.)-2.5 E F1([count] _)108 376.8 Q F0(Mo)144 388.8 Q .3 -.15(ve d)-.15 H -.25(ow) .15 G(n).25 E F2(count - 1)2.5 E F0 (lines, to the \214rst nonblank character)2.5 E(.)-.55 E F1([count] a) 108 405.6 Q F0(Enter input mode, appending the te)144 417.6 Q (xt after the cursor)-.15 E(.)-.55 E F1([count] b)108 434.4 Q F0(Mo)144 446.4 Q .3 -.15(ve b)-.15 H(ackw).15 E(ards)-.1 E F2(count)2.5 E F0 -.1 (wo)2.5 G(rds.).1 E F1([b)108 463.2 Q(uffer] [count] c motion)-.2 E F0 (Change a re)144 475.2 Q(gion of te)-.15 E(xt.)-.15 E F1([b)108 492 Q (uffer] [count] d motion)-.2 E F0(Delete a re)144 504 Q(gion of te)-.15 E(xt.)-.15 E F1([count] e)108 520.8 Q F0(Mo)144 532.8 Q .3 -.15(ve f) -.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0(end-of-w)2.5 E(ords.)-.1 E F1([count] f)108 549.6 Q F0(Search forw)144 561.6 Q(ard,)-.1 E F2(count)2.5 E F0(times, through the rest of the current line for)2.5 E F2()-.15 E F0(.)A F1([count] i)108 578.4 Q F0(Enter input mode, inserting the te)144 590.4 Q(xt before the cursor) -.15 E(.)-.55 E F1 2.5(m<)108 607.2 S(character>)-2.5 E F0(Sa)144 619.2 Q .3 -.15(ve t)-.2 H(he current conte).15 E(xt \(line and column\) as) -.15 E F2()-.15 E F0(.)A F1([count] o)108 636 Q F0(Enter input mode, appending te)144 648 Q(xt in a ne)-.15 E 2.5(wl) -.25 G(ine under the current line.)-2.5 E F1([b)108 664.8 Q(uffer] p)-.2 E F0(Append te)144 676.8 Q(xt from a b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1([count] r )108 693.6 Q F0(Replace)144 705.6 Q F2(count) 2.5 E F0(characters.)2.5 E 217.89(6Q6 6)297.39 768 R EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF([b)108 84 Q(uffer] [count] s)-.2 E F0(Substitute)144 96 Q/F2 10/Times-Italic@0 SF(count)2.5 E F0 (characters in the current line starting with the current character)2.5 E(.)-.55 E F1([count] t )108 112.8 Q F0 .418(Search forw)144 124.8 R(ard,)-.1 E F2(count)2.918 E F0 .418 (times, through the current line for the character immediately)2.918 F F2(befor)2.919 E 2.919(e<)-.37 G -.15(ch)-2.919 G(ar).15 E(-)-.2 E (acter>)144 136.8 Q F0(.)A F1(u)108 153.6 Q F0 (Undo the last change made to the \214le.)30.44 E F1([count] w)108 170.4 Q F0(Mo)144 182.4 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0 -.1(wo)2.5 G(rds.).1 E F1([b)108 199.2 Q(uffer] [count] x)-.2 E F0 (Delete)144 211.2 Q F2(count)2.5 E F0(characters.)2.5 E F1([b)108 228 Q (uffer] [count] y motion)-.2 E F0(Cop)144 240 Q 2.5(y\()-.1 G(or `)-2.5 E(`yank')-.74 E('\) a te)-.74 E(xt re)-.15 E(gion speci\214ed by the) -.15 E F2(count)2.5 E F0(and motion into a b)2.5 E(uf)-.2 E(fer)-.25 E (.)-.55 E F1([count1] z [count2] -|.|+|^|)-.15 E F0(Redra)144 268.8 Q 1.3 -.65(w, o)-.15 H (ptionally repositioning and resizing the screen.).65 E F1([count] {)108 285.6 Q F0(Mo)144 297.6 Q .3 -.15(ve b)-.15 H(ackw).15 E(ard)-.1 E F2 (count)2.5 E F0(paragraphs.)2.5 E F1([count] |)108 314.4 Q F0(Mo)144 326.4 Q .3 -.15(ve t)-.15 H 2.5(oas).15 G(peci\214c)-2.5 E F2(column)2.5 E F0(position on the current line.)2.5 E F1([count] })108 343.2 Q F0(Mo) 144 355.2 Q .3 -.15(ve f)-.15 H(orw).15 E(ard)-.1 E F2(count)2.5 E F0 (paragraphs.)2.5 E F1([count] ~)108 372 Q F0(Re)144 384 Q -.15(ve)-.25 G (rse the case of the ne).15 E(xt)-.15 E F2(count)2.5 E F0 (character\(s\).)2.5 E F1([count] ~ motion)108 400.8 Q F0(Re)144 412.8 Q -.15(ve)-.25 G(rse the case of the characters in a te).15 E(xt re)-.15 E (gion speci\214ed by the)-.15 E F2(count)2.5 E F0(and)2.5 E F2(motion) 2.5 E F0(.).24 E F1()108 429.6 Q F0 (Interrupt the current operation.)144 441.6 Q/F3 10.95/Times-Bold@0 SF (VI TEXT INPUT COMMANDS)72 458.4 Q F0(The follo)108 470.4 Q (wing section describes the commands a)-.25 E -.25(va)-.2 G (ilable in the te).25 E(xt input mode of the)-.15 E F2(vi)2.5 E F0 (editor)2.5 E(.)-.55 E F1()108 492 Q F0(Replay the pre)10.7 E (vious input.)-.25 E F1()-.18 E F0 (Erase to the pre)144 520.8 Q(vious)-.25 E F1(shiftwidth)2.5 E F0 (column boundary)2.5 E(.)-.65 E F1(^)-.18 E F0 (Erase all of the autoindent characters, and reset the autoindent le)144 549.6 Q -.15(ve)-.25 G(l.).15 E F1(0)-.18 E F0 (Erase all of the autoindent characters.)144 578.4 Q F1()-.18 E F0 1.122(Insert suf)144 607.2 R(\214cient)-.25 E F2 ()3.622 E F0(and)3.622 E F2()3.622 E F0 1.122 (characters to mo)3.622 F 1.421 -.15(ve f)-.15 H(orw).15 E 1.121 (ard to the ne)-.1 F(xt)-.15 E F1(shiftwidth)3.621 E F0(column)3.621 E (boundary)144 619.2 Q(.)-.65 E F1()108 636 Q()-.18 E F0(Erase the last character)144 664.8 Q(.)-.55 E F1 ()108 681.6 Q F0(Quote the ne)144 693.6 Q(xt character) -.15 E(.)-.55 E 217.89(7Q7 7)297.39 768 R EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF()108 84 Q F0(Resolv)144 96 Q 2.5(ea)-.15 G (ll te)-2.5 E(xt input into the \214le, and return to command mode.)-.15 E F1()108 112.8 Q F0(Erase the current line.)144 124.8 Q F1 ()-.18 E()-.1 E F0 .27 (Erase the last w)144 170.4 R 2.77(ord. The)-.1 F .27(de\214nition of w) 2.77 F .27(ord is dependent on the)-.1 F F1(altwerase)2.77 E F0(and)2.77 E F1(ttywerase)2.77 E F0(options.)2.77 E F1([0-9A-F)-.18 E(a-f]+)-.25 E F0 (Insert a character with the speci\214ed he)144 199.2 Q(xadecimal v)-.15 E(alue into the te)-.25 E(xt.)-.15 E F1()108 216 Q F0 (Interrupt te)144 228 Q(xt input mode, returning to command mode.)-.15 E /F2 10.95/Times-Bold@0 SF(EX COMMANDS)72 244.8 Q F0 .015(The follo)108 256.8 R .015(wing section describes the commands a)-.25 F -.25(va)-.2 G .015(ilable in the).25 F/F3 10/Times-Italic@0 SF -.2(ex)2.514 G F0 (editor)2.714 E 5.014(.I)-.55 G 2.514(ne)-5.014 G .014(ach entry belo) -2.514 F 1.314 -.65(w, t)-.25 H .014(he tag line is).65 F 2.5(au)108 268.8 S(sage synopsis for the command.)-2.5 E F1()108 290.4 Q F0(Scroll the screen.)144 302.4 Q F1 2.5(!a)108 319.2 S -.1(rg) -2.5 G(ument\(s\)).1 E([range]! ar)108 336 Q(gument\(s\))-.1 E F0(Ex)144 348 Q(ecute a shell command, or \214lter lines through a shell command.) -.15 E F1(")108 364.8 Q F0 2.5(Ac)30.45 G(omment.)-2.5 E F1 ([range] nu[mber] [count] [\215ags])108 381.6 Q ([range] # [count] [\215ags])108 398.4 Q F0 (Display the selected lines, each preceded with its line number)144 410.4 Q(.)-.55 E F1 2.5(@b)108 427.2 S(uffer)-2.7 E 2.5(*b)108 444 S (uffer)-2.7 E F0(Ex)144 456 Q(ecute a b)-.15 E(uf)-.2 E(fer)-.25 E(.) -.55 E F1([line] a[ppend][!])108 472.8 Q F0(The input te)144 484.8 Q (xt is appended after the speci\214ed line.)-.15 E F1 ([range] c[hange][!] [count])108 501.6 Q F0(The input te)144 513.6 Q (xt replaces the speci\214ed range.)-.15 E F1 (cs[cope] add | \214nd | help | kill | r)108 530.4 Q(eset)-.18 E F0(Ex) 144 542.4 Q(ecute a Cscope command.)-.15 E F1([range] d[elete] [b)108 559.2 Q(uffer] [count] [\215ags])-.2 E F0 (Delete the lines from the \214le.)144 571.2 Q F1 (di[splay] b[uffers] | c[onnections] | s[cr)108 588 Q(eens] | t[ags]) -.18 E F0(Display b)144 600 Q(uf)-.2 E (fers, Cscope connections, screens or tags.)-.25 E F1 ([Ee][dit][!] [+cmd] [\214le])108 616.8 Q([Ee]x[!] [+cmd] [\214le])108 633.6 Q F0(Edit a dif)144 645.6 Q(ferent \214le.)-.25 E F1 (exu[sage] [command])108 662.4 Q F0(Display usage for an)144 674.4 Q F3 -.2(ex)2.5 G F0(command.)2.7 E F1(f[ile] [\214le])108 691.2 Q F0 (Display and optionally change the \214le name.)144 703.2 Q 217.89 (8Q8 8)297.39 768 R EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF([Ff]g [name])108 84 Q/F2 10/Times-Italic@0 SF -.74(Vi) 144 96 S F0(mode only)3.24 E 5(.F)-.65 G(ore)-5.15 E (ground the speci\214ed screen.)-.15 E F1([range] g[lobal] /patter)108 112.8 Q(n/ [commands])-.15 E([range] v /patter)108 129.6 Q (n/ [commands])-.15 E F0 (Apply commands to lines matching \(or not matching\) a pattern.)144 141.6 Q F1(he[lp])108 158.4 Q F0(Display a help message.)11 E F1 ([line] i[nsert][!])108 175.2 Q F0(The input te)144 187.2 Q (xt is inserted before the speci\214ed line.)-.15 E F1 ([range] j[oin][!] [count] [\215ags])108 204 Q F0(Join lines of te)144 216 Q(xt together)-.15 E(.)-.55 E F1([range] l[ist] [count] [\215ags]) 108 232.8 Q F0(Display the lines unambiguously)144 244.8 Q(.)-.65 E F1 (map[!] [lhs rhs])108 261.6 Q F0(De\214ne or display maps \(for)144 273.6 Q F2(vi)2.5 E F0(only\).)2.5 E F1([line] ma[rk] )108 290.4 Q([line] k )108 307.2 Q F0(Mark the line with the mark) 144 319.2 Q F2()-.15 E F0(.)A F1([range] m[o) 108 336 Q -.1(ve)-.1 G 2.5(]l).1 G(ine)-2.5 E F0(Mo)144 348 Q .3 -.15 (ve t)-.15 H(he speci\214ed lines after the tar).15 E(get line.)-.18 E F1(mk[exr)108 364.8 Q(c][!] \214le)-.18 E F0(Write the abbre)144 376.8 Q (viations, editor options and maps to the speci\214ed \214le.)-.25 E F1 ([Nn][ext][!] [\214le ...])108 393.6 Q F0(Edit the ne)144 405.6 Q (xt \214le from the ar)-.15 E(gument list.)-.18 E F1 ([line] o[pen] /patter)108 422.4 Q(n/ [\215ags])-.15 E F0 (Enter open mode.)144 434.4 Q F1(pr)108 451.2 Q(e[ser)-.18 E -.1(ve)-.1 G(]).1 E F0(Sa)144 463.2 Q .3 -.15(ve t)-.2 H (he \214le in a form that can later be reco).15 E -.15(ve)-.15 G (red using the).15 E F2 -.2(ex)2.5 G F12.7 E F0(option.)2.5 E F1 ([Pp]r)108 480 Q -.15(ev)-.18 G([ious][!]).15 E F0(Edit the pre)144 492 Q(vious \214le from the ar)-.25 E(gument list.)-.18 E F1 ([range] p[rint] [count] [\215ags])108 508.8 Q F0 (Display the speci\214ed lines.)144 520.8 Q F1([line] pu[t] [b)108 537.6 Q(uffer])-.2 E F0(Append b)144 549.6 Q(uf)-.2 E (fer contents to the current line.)-.25 E F1(q[uit][!])108 566.4 Q F0 (End the editing session.)144 578.4 Q F1([line] r[ead][!] [\214le])108 595.2 Q F0(Read a \214le.)144 607.2 Q F1 -.18(re)108 624 S(c[o).18 E -.1 (ve)-.1 G(r] \214le).1 E F0(Reco)144 636 Q -.15(ve)-.15 G(r).15 E F2 (\214le)2.5 E F0(if it w)2.5 E(as pre)-.1 E(viously sa)-.25 E -.15(ve) -.2 G(d.).15 E F1 -.18(re)108 652.8 S(s[ize] [+|-]size).18 E F2 -.74(Vi) 144 664.8 S F0(mode only)3.24 E 5(.G)-.65 G(ro)-5 E 2.5(wo)-.25 G 2.5 (rs)-2.5 G(hrink the current screen.)-2.5 E F1 -.18(re)108 681.6 S (w[ind][!]).18 E F0(Re)144 693.6 Q(wind the ar)-.25 E(gument list.)-.18 E 217.89(9Q9 9)297.39 768 R EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF(se[t] [option[=[v)108 84 Q (alue]] ...] [nooption ...] [option? ...] [all])-.1 E F0 (Display or set editor options.)144 96 Q F1(sh[ell])108 112.8 Q F0 (Run a shell program.)9.89 E F1(so[ur)108 129.6 Q(ce] \214le)-.18 E F0 (Read and e)144 141.6 Q -.15(xe)-.15 G(cute).15 E/F2 10/Times-Italic@0 SF -.2(ex)2.5 G F0(commands from a \214le.)2.7 E F1 ([range] s[ubstitute] [/patter)108 158.4 Q(n/r)-.15 E (eplace/] [options] [count] [\215ags])-.18 E ([range] & [options] [count] [\215ags])108 175.2 Q ([range] ~ [options] [count] [\215ags])108 192 Q F0(Mak)144 204 Q 2.5 (es)-.1 G(ubstitutions.)-2.5 E F1(su[spend][!])108 220.8 Q(st[op][!])108 237.6 Q()108 254.4 Q F0(Suspend the edit session.)144 266.4 Q F1([Tt]a[g][!] tagstring)108 283.2 Q F0 (Edit the \214le containing the speci\214ed tag.)144 295.2 Q F1 (tagn[ext][!])108 312 Q F0(Edit the \214le containing the ne)144 324 Q (xt conte)-.15 E(xt for the current tag.)-.15 E F1 (tagp[op][!] [\214le | number])108 340.8 Q F0 (Pop to the speci\214ed tag in the tags stack.)144 352.8 Q F1(tagp[r)108 369.6 Q -.15(ev)-.18 G(][!]).15 E F0(Edit the \214le containing the pre) 144 381.6 Q(vious conte)-.25 E(xt for the current tag.)-.15 E F1 (unm[ap][!] lhs)108 398.4 Q F0(Unmap a mapped string.)144 410.4 Q F1 -.1 (ve)108 427.2 S([rsion]).1 E F0(Display the v)144 439.2 Q(ersion of the) -.15 E F2 -.2(ex)2.5 G(/vi).2 E F0(editor)2.5 E(.)-.55 E F1 ([line] vi[sual] [type] [count] [\215ags])108 456 Q F2(Ex)144 468 Q F0 (mode only)2.5 E 5(.E)-.65 G(nter)-5 E F2(vi)2.5 E F0(.).36 E F1([V)108 484.8 Q(i]i[sual][!] [+cmd] [\214le])-.37 E F2 -.74(Vi)144 496.8 S F0 (mode only)3.24 E 5(.E)-.65 G(dit a ne)-5 E 2.5<778c>-.25 G(le.)-2.5 E F1(viu[sage] [command])108 513.6 Q F0(Display usage for a)144 525.6 Q F2 (vi)2.5 E F0(command.)2.5 E F1([range] w[rite][!] [>>] [\214le])108 542.4 Q([range] w[rite] [!] [\214le])108 559.2 Q ([range] wn[!] [>>] [\214le])108 576 Q([range] wq[!] [>>] [\214le])108 592.8 Q F0(Write the \214le.)144 604.8 Q F1([range] x[it][!] [\214le]) 108 621.6 Q F0(Write the \214le if it has been modi\214ed.)144 633.6 Q F1([range] ya[nk] [b)108 650.4 Q(uffer] [count])-.2 E F0(Cop)144 662.4 Q 2.5(yt)-.1 G(he speci\214ed lines to a b)-2.5 E(uf)-.2 E(fer)-.25 E(.) -.55 E F1([line] z [type] [count] [\215ags])108 679.2 Q F0 (Adjust the windo)144 691.2 Q -.65(w.)-.25 G 207.89(10Q10 10)292.39 768 R EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10.95 /Times-Bold@0 SF(SET OPTIONS)72 84 Q F0 .202(There are a lar)108 96 R .203(ge number of options that may be set \(or unset\) to change the ed\ itor')-.18 F 2.703(sb)-.55 G(eha)-2.703 E(vior)-.2 E 5.203(.T)-.55 G .203(his section)-5.203 F(describes the options, their abbre)108 108 Q (viations and their def)-.25 E(ault v)-.1 E(alues.)-.25 E .541 (In each entry belo)108 124.8 R 1.841 -.65(w, t)-.25 H .541 (he \214rst part of the tag line is the full name of the option, follo) .65 F .541(wed by an)-.25 F 3.04(ye)-.15 G(qui)-3.04 E -.25(va)-.25 G (lent).25 E(abbre)108 136.8 Q 4.312(viations. The)-.25 F 1.813 (part in square brack)4.313 F 1.813(ets is the def)-.1 F 1.813(ault v) -.1 F 1.813(alue of the option.)-.25 F 1.813(Most of the options are) 6.813 F(boolean, i.e. the)108 148.8 Q 2.5(ya)-.15 G(re either on or of) -2.5 E(f, and do not ha)-.25 E .3 -.15(ve a)-.2 H 2.5(na).15 G (ssociated v)-2.5 E(alue.)-.25 E(Options apply to both)108 165.6 Q/F2 10 /Times-Italic@0 SF -.2(ex)2.5 G F0(and)2.7 E F2(vi)2.5 E F0 (modes, unless otherwise speci\214ed.)2.5 E/F3 10/Times-Bold@0 SF (altwerase [off])108 187.2 Q F2 -.74(Vi)144 199.2 S F0(only)3.24 E 5(.S) -.65 G(elect an alternate w)-5 E(ord erase algorithm.)-.1 E F3 (autoindent, ai [off])108 216 Q F0(Automatically indent ne)144 228 Q 2.5 (wl)-.25 G(ines.)-2.5 E F3(autoprint, ap [off])108 244.8 Q F2(Ex)144 256.8 Q F0(only)2.5 E 5(.D)-.65 G(isplay the current line automatically) -5 E(.)-.65 E F3(auto)108 273.6 Q(write, aw [off])-.1 E F0 (Write modi\214ed \214les automatically when changing \214les.)144 285.6 Q F3(backup [""])108 302.4 Q F0(Backup \214les before the)144 314.4 Q 2.5(ya)-.15 G(re o)-2.5 E -.15(ve)-.15 G(rwritten.).15 E F3(beautify)108 331.2 Q 2.5(,b)-.55 G 2.5(f[)-2.5 G(off])-2.5 E F0 (Discard control characters.)144 343.2 Q F3(cdpath [en)108 360 Q(vir)-.4 E(onment v)-.18 E(ariable CDP)-.1 E -.95(AT)-.74 G(H, or curr).95 E (ent dir)-.18 E(ectory])-.18 E F0 (The directory paths used as path pre\214x)144 372 Q(es for the)-.15 E F3(cd)2.5 E F0(command.)2.5 E F3(cedit [no default])108 388.8 Q F0 (Set the character to edit the colon command-line history)144 400.8 Q(.) -.65 E F3(columns, co [80])108 417.6 Q F0 (Set the number of columns in the screen.)144 429.6 Q F3(comment [off]) 108 446.4 Q F2 -.74(Vi)144 458.4 S F0(only)3.24 E 5(.S)-.65 G (kip leading comments in shell, C and C++ language \214les.)-5 E F3(dir) 108 475.2 Q(ectory)-.18 E 2.5(,d)-.55 G(ir [en)-2.5 E(vir)-.4 E (onment v)-.18 E(ariable TMPDIR, or /tmp])-.1 E F0 (The directory where temporary \214les are created.)144 487.2 Q F3 (edcompatible, ed [off])108 504 Q F0 .043(Remember the v)144 516 R .043 (alues of the `)-.25 F(`c')-.74 E 2.543('a)-.74 G .043(nd `)-2.543 F (`g')-.74 E 2.543('s)-.74 G(uf)-2.543 E .043(\214ces to the)-.25 F F3 (substitute)2.542 E F0 .042(commands, instead of initializ-)2.542 F (ing them as unset for each ne)144 528 Q 2.5(wc)-.25 G(ommand.)-2.5 E F3 (err)108 544.8 Q(orbells, eb [off])-.18 E F2(Ex)144 556.8 Q F0(only)2.5 E 5(.A)-.65 G(nnounce error messages with a bell.)-5 E F3(exr)108 573.6 Q(c, ex [off])-.18 E F0(Read the startup \214les in the local directory) 144 585.6 Q(.)-.65 E F3(extended [off])108 602.4 Q F0(Re)144 614.4 Q (gular e)-.15 E(xpressions are e)-.15 E(xtended \(i.e.)-.15 E F2 -.4(eg) 5 G -.37(re).4 G(p).37 E F0(\(1\)\255style\) e).19 E(xpressions.)-.15 E F3(\214lec [no default])108 631.2 Q F0(Set the character to perform \ \214le path completion on the colon command line.)144 643.2 Q F3 (\215ash [on])108 660 Q F0(Flash the screen instead of beeping the k)144 672 Q -.15(ey)-.1 G(board on error).15 E(.)-.55 E F3(hardtabs, ht [8]) 108 688.8 Q F0(Set the spacing between hardw)144 700.8 Q (are tab settings.)-.1 E 207.89(11Q11 11)292.39 768 R EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF(iclo)108 84 Q(wer [off])-.1 E F0(Mak)144 96 Q .435 (es all Re)-.1 F .435(gular Expressions case-insensiti)-.15 F -.15(ve) -.25 G 2.936(,a).15 G 2.936(sl)-2.936 G .436(ong as an upper)-2.936 F .436(-case letter does not appear in)-.2 F(the search string.)144 108 Q F1(ignor)108 124.8 Q(ecase, ic [off])-.18 E F0(Ignore case dif)144 136.8 Q(ferences in re)-.25 E(gular e)-.15 E(xpressions.)-.15 E F1 -.1(ke)108 153.6 S(ytime [6]).1 E F0(The 10th')144 165.6 Q 2.5(so)-.55 G 2.5(fas) -2.5 G(econd)-2.5 E/F2 10/Times-Italic@0 SF -.2(ex)2.5 G(/vi).2 E F0 -.1 (wa)2.5 G(its for a subsequent k).1 E .3 -.15(ey t)-.1 H 2.5(oc).15 G (omplete a k)-2.5 E .3 -.15(ey m)-.1 H(apping.).15 E F1(leftright [off]) 108 182.4 Q F2 -.74(Vi)144 194.4 S F0(only)3.24 E 5(.D)-.65 G 2.5(ol)-5 G(eft-right scrolling.)-2.5 E F1(lines, li [24])108 211.2 Q F2 -.74(Vi) 144 223.2 S F0(only)3.24 E 5(.S)-.65 G (et the number of lines in the screen.)-5 E F1(lisp [off])108 240 Q F2 -.74(Vi)144 252 S F0(only)3.933 E 5.693(.M)-.65 G .693(odify v)-5.693 F .693(arious search commands and options to w)-.25 F .692(ork with Lisp.) -.1 F F2 .692(This option is not yet)5.692 F(implemented.)144 264 Q F1 (list [off])108 280.8 Q F0(Display lines in an unambiguous f)144 292.8 Q (ashion.)-.1 E F1(lock [on])108 309.6 Q F0(Attempt to get an e)144 321.6 Q(xclusi)-.15 E .3 -.15(ve l)-.25 H(ock on an).15 E 2.5<798c>-.15 G (le being edited, read or written.)-2.5 E F1(magic [on])108 338.4 Q F0 -.35(Tr)144 350.4 S(eat certain characters specially in re).35 E (gular e)-.15 E(xpressions.)-.15 E F1(matchtime [7])108 367.2 Q F2 -.74 (Vi)144 379.2 S F0(only)4.85 E 6.61(.T)-.65 G 1.61(he 10th')-6.61 F 4.11 (so)-.55 G 4.11(fas)-4.11 G(econd)-4.11 E F2 -.2(ex)4.11 G(/vi).2 E F0 1.61(pauses on the matching character when the)4.11 F F1(sho)4.11 E (wmatch)-.1 E F0(option is set.)144 391.2 Q F1(mesg [on])108 408 Q F0 (Permit messages from other users.)144 420 Q F1 (modelines, modeline [off])108 436.8 Q F0 .987 (Read the \214rst and last fe)144 448.8 R 3.487(wl)-.25 G .987 (ines of each \214le for)-3.487 F F2 -.2(ex)3.487 G F0(commands.)3.687 E F2 .986(This option will ne)5.986 F .986(ver be imple-)-.15 F(mented.) 144 460.8 Q F1(noprint [""])108 477.6 Q F0(Characters that are ne)144 489.6 Q -.15(ve)-.25 G 2.5(rh).15 G(andled as printable characters.)-2.5 E F1(number)108 506.4 Q 2.5(,n)-.92 G 2.5(u[)-2.5 G(off])-2.5 E F0 (Precede each line displayed with its current line number)144 518.4 Q(.) -.55 E F1(octal [off])108 535.2 Q F0(Display unkno)144 547.2 Q (wn characters as octal numbers, instead of the def)-.25 E(ault he)-.1 E (xadecimal.)-.15 E F1(open [on])108 564 Q F2(Ex)144 576 Q F0(only)2.5 E 5(.I)-.65 G 2.5(ft)-5 G(his option is not set, the)-2.5 E F1(open)2.5 E F0(and)2.5 E F1(visual)2.5 E F0(commands are disallo)2.5 E(wed.)-.25 E F1(optimize, opt [on])108 592.8 Q F2 -.74(Vi)144 604.8 S F0(only)3.24 E 5(.O)-.65 G(ptimize te)-5 E(xt throughput to dumb terminals.)-.15 E F2 (This option is not yet implemented.)5 E F1 (paragraphs, para [IPLPPPQPP LIpplpipbp])108 621.6 Q F2 -.74(Vi)144 633.6 S F0(only)3.24 E 5(.D)-.65 G (e\214ne additional paragraph boundaries for the)-5 E F1({)2.5 E F0(and) 2.5 E F1(})2.5 E F0(commands.)2.5 E F1(path [])108 650.4 Q F0 (De\214ne additional directories to search for \214les being edited.) 7.39 E F1(print [""])108 667.2 Q F0(Characters that are al)144 679.2 Q -.1(wa)-.1 G(ys handled as printable characters.).1 E F1(pr)108 696 Q (ompt [on])-.18 E F2(Ex)144 708 Q F0(only)2.5 E 5(.D)-.65 G (isplay a command prompt.)-5 E 207.89(12Q12 12)292.39 768 R EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF -.18(re)108 84 S(adonly).18 E 2.5(,r)-.55 G 2.5(o[) -2.68 G(off])-2.5 E F0(Mark the \214le and session as read-only)144 96 Q (.)-.65 E F1 -.18(re)108 112.8 S(cdir [/v).18 E(ar/tmp/vi.r)-.1 E(eco) -.18 E -.1(ve)-.1 G(r]).1 E F0(The directory where reco)144 124.8 Q -.15 (ve)-.15 G(ry \214les are stored.).15 E F1 -.18(re)108 141.6 S(draw).18 E 2.5(,r)-.55 G 2.5(e[)-2.68 G(off])-2.5 E/F2 10/Times-Italic@0 SF -.74 (Vi)144 153.6 S F0(only)3.24 E 5(.S)-.65 G (imulate an intelligent terminal on a dumb one.)-5 E F2 (This option is not yet implemented.)5 E F1 -.18(re)108 170.4 S (map [on]).18 E F0(Remap k)144 182.4 Q -.15(ey)-.1 G 2.5(su).15 G (ntil resolv)-2.5 E(ed.)-.15 E F1 -.18(re)108 199.2 S(port [5]).18 E F0 (Set the number of lines about which the editor reports changes or yank\ s.)144 211.2 Q F1(ruler [off])108 228 Q F2 -.74(Vi)144 240 S F0(only) 3.24 E 5(.D)-.65 G(isplay a ro)-5 E (w/column ruler on the colon command line.)-.25 E F1(scr)108 256.8 Q (oll, scr [windo)-.18 E 2.5(w/2)-.1 G(])-2.5 E F0 (Set the number of lines scrolled.)144 268.8 Q F1(sear)108 285.6 Q (chincr [off])-.18 E F0(Mak)144 297.6 Q(es the)-.1 E F1(/)2.5 E F0(and) 2.5 E F1(?)2.5 E F0(commands incremental.)5 E F1 (sections, sect [NHSHH HUnhsh])108 314.4 Q F2 -.74(Vi)144 326.4 S F0 (only)3.24 E 5(.D)-.65 G(e\214ne additional section boundaries for the) -5 E F1([[)2.5 E F0(and)2.5 E F1(]])2.5 E F0(commands.)2.5 E F1(secur) 108 343.2 Q 2.5(e[)-.18 G(off])-2.5 E F0 -.45(Tu)144 355.2 S(rns of).45 E 2.5(fa)-.25 G(ll access to e)-2.5 E(xternal programs.)-.15 E F1 (shell, sh [en)108 372 Q(vir)-.4 E(onment v)-.18 E (ariable SHELL, or /bin/sh])-.1 E F0 (Select the shell used by the editor)144 384 Q(.)-.55 E F1 (shellmeta [~{[*?$`'"\\])108 400.8 Q F0(Set the meta characters check) 144 412.8 Q(ed to determine if \214le name e)-.1 E (xpansion is necessary)-.15 E(.)-.65 E F1(shiftwidth, sw [8])108 429.6 Q F0(Set the autoindent and shift command indentation width.)144 441.6 Q F1(sho)108 458.4 Q(wmatch, sm [off])-.1 E F2 -.74(Vi)144 470.4 S F0 (only)3.24 E 5(.N)-.65 G(ote matching `)-5 E(`{')-.74 E 2.5('a)-.74 G (nd `)-2.5 E(`\(')-.74 E 2.5('f)-.74 G(or `)-2.5 E(`}')-.74 E 2.5('a) -.74 G(nd `)-2.5 E(`\)')-.74 E 2.5('c)-.74 G(haracters.)-2.5 E F1(sho) 108 487.2 Q(wmode, smd [off])-.1 E F2 -.74(Vi)144 499.2 S F0(only)3.24 E 5(.D)-.65 G(isplay the current editor mode and a `)-5 E(`modi\214ed') -.74 E 2.5<278d>-.74 G(ag.)-2.5 E F1(sidescr)108 516 Q(oll [16])-.18 E F2 -.74(Vi)144 528 S F0(only)3.24 E 5(.S)-.65 G (et the amount a left-right scroll will shift.)-5 E F1(slo)108 544.8 Q -.1(wo)-.1 G(pen, slo).1 E 2.5(w[)-.1 G(off])-2.5 E F0 (Delay display updating during te)144 556.8 Q(xt input.)-.15 E F2 (This option is not yet implemented.)5 E F1(sour)108 573.6 Q (ceany [off])-.18 E F0(Read startup \214les not o)144 585.6 Q (wned by the current user)-.25 E(.)-.55 E F2(This option will ne)5 E (ver be implemented.)-.15 E F1(tabstop, ts [8])108 602.4 Q F0 (This option sets tab widths for the editor display)144 614.4 Q(.)-.65 E F1(taglength, tl [0])108 631.2 Q F0 (Set the number of signi\214cant characters in tag names.)144 643.2 Q F1 (tags, tag [tags /v)108 660 Q(ar/db/libc.tags /sys/k)-.1 E(er)-.1 E (n/tags])-.15 E F0(Set the list of tags \214les.)144 672 Q F1 (term, ttytype, tty [en)108 688.8 Q(vir)-.4 E(onment v)-.18 E (ariable TERM])-.1 E F0(Set the terminal type.)144 700.8 Q 207.89 (13Q13 13)292.39 768 R EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Bold@0 SF(terse [off])108 84 Q F0 .374 (This option has historically made editor messages less v)144 96 R 2.874 (erbose. It)-.15 F .374(has no ef)2.874 F .374(fect in this implemen-) -.25 F(tation.)144 108 Q F1(tildeop [off])108 124.8 Q F0(Modify the)144 136.8 Q F1(~)2.5 E F0(command to tak)2.5 E 2.5(ea)-.1 G 2.5(na)-2.5 G (ssociated motion.)-2.5 E F1(timeout, to [on])108 153.6 Q F0 -.35(Ti)144 165.6 S(me out on k).35 E -.15(ey)-.1 G 2.5(sw).15 G (hich may be mapped.)-2.5 E F1(ttywerase [off])108 182.4 Q/F2 10 /Times-Italic@0 SF -.74(Vi)144 194.4 S F0(only)3.24 E 5(.S)-.65 G (elect an alternate erase algorithm.)-5 E F1 -.1(ve)108 211.2 S (rbose [off]).1 E F2 -.74(Vi)144 223.2 S F0(only)3.24 E 5(.D)-.65 G (isplay an error message for e)-5 E -.15(ve)-.25 G(ry error).15 E(.)-.55 E F1(w300 [no default])108 240 Q F2 -.74(Vi)144 252 S F0(only)3.24 E 5 (.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G (ize if the baud rate is less than 1200 baud.)-2.5 E F1 (w1200 [no default])108 268.8 Q F2 -.74(Vi)144 280.8 S F0(only)3.24 E 5 (.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G (ize if the baud rate is equal to 1200 baud.)-2.5 E F1 (w9600 [no default])108 297.6 Q F2 -.74(Vi)144 309.6 S F0(only)3.24 E 5 (.S)-.65 G(et the windo)-5 E 2.5(ws)-.25 G (ize if the baud rate is greater than 1200 baud.)-2.5 E F1(war)108 326.4 Q 2.5(n[)-.15 G(on])-2.5 E F2(Ex)144 338.4 Q F0(only)2.802 E 5.302(.T) -.65 G .302(his option causes a w)-5.302 F .302(arning message to the t\ erminal if the \214le has been modi\214ed, since)-.1 F(it w)144 350.4 Q (as last written, before a)-.1 E F1(!)2.5 E F0(command.)5 E F1(windo)108 367.2 Q 1.1 -.55(w, w, w)-.1 H 2.5(i[).55 G(en)-2.5 E(vir)-.4 E (onment v)-.18 E(ariable LINES])-.1 E F0(Set the windo)144 379.2 Q 2.5 (ws)-.25 G(ize for the screen.)-2.5 E F1(windo)108 396 Q(wname [off])-.1 E F0(Change the icon/windo)144 408 Q 2.5(wn)-.25 G (ame to the current \214le name e)-2.5 E -.15(ve)-.25 G 2.5(ni).15 G 2.5 (fi)-2.5 G 2.5(tc)-2.5 G(an')-2.5 E 2.5(tb)-.18 G 2.5(er)-2.5 G (estored on editor e)-2.5 E(xit.)-.15 E F1(wraplen, wl [0])108 424.8 Q F2 -.74(Vi)144 436.8 S F0(only)3.493 E 5.253(.B)-.65 G .253 (reak lines automatically)-5.253 F 2.753(,t)-.65 G .254 (he speci\214ed number of columns from the left-hand mar)-2.753 F 2.754 (gin. If)-.18 F(both the)144 448.8 Q F1(wraplen)2.5 E F0(and)2.5 E F1 (wrapmar)2.5 E(gin)-.1 E F0(edit options are set, the)2.5 E F1(wrapmar) 2.5 E(gin)-.1 E F0 -.25(va)2.5 G(lue is used.).25 E F1(wrapmar)108 465.6 Q(gin, wm [0])-.1 E F2 -.74(Vi)144 477.6 S F0(only)3.983 E 5.743(.B)-.65 G .743(reak lines automatically)-5.743 F 3.242(,t)-.65 G .742 (he speci\214ed number of columns from the right-hand mar)-3.242 F(gin.) -.18 E(If both the)144 489.6 Q F1(wraplen)2.5 E F0(and)2.5 E F1(wrapmar) 2.5 E(gin)-.1 E F0(edit options are set, the)2.5 E F1(wrapmar)2.5 E(gin) -.1 E F0 -.25(va)2.5 G(lue is used.).25 E F1(wrapscan, ws [on])108 506.4 Q F0(Set searches to wrap around the end or be)144 518.4 Q (ginning of the \214le.)-.15 E F1(writeany)108 535.2 Q 2.5(,w)-.55 G 2.5 (a[)-2.5 G(off])-2.5 E F0 -.45(Tu)144 547.2 S(rn of).45 E 2.5<668c>-.25 G(le-o)-2.5 E -.15(ve)-.15 G(rwriting checks.).15 E/F3 10.95 /Times-Bold@0 SF(ENVIR)72 564 Q(ONMENT V)-.329 E(ARIABLES)-1.478 E F2 (COLUMNS)108 576 Q F0 .782(The number of columns on the screen.)144 588 R .783(This v)5.783 F .783(alue o)-.25 F -.15(ve)-.15 G .783(rrides an) .15 F 3.283(ys)-.15 G .783(ystem or terminal speci\214c v)-3.283 F(al-) -.25 E 2.74(ues. If)144 600 R(the)2.74 E F2(COLUMNS)2.74 E F0(en)2.74 E .24(vironmental v)-.4 F .239(ariable is not set when)-.25 F F2 -.2(ex) 2.739 G(/vi).2 E F0 .239(runs, or the)2.739 F F1(columns)2.739 E F0 .239 (option is)2.739 F -.15(ex)144 612 S(plicitly reset by the user).15 E(,) -.4 E F2 -.2(ex)2.5 G(/vi).2 E F0(enters the v)2.5 E(alue into the en) -.25 E(vironment.)-.4 E F2(EXINIT)108 628.8 Q F0 2.5(Al)144 640.8 S (ist of)-2.5 E F2 -.2(ex)2.5 G F0(startup commands, read if the v)2.7 E (ariable)-.25 E F2(NEXINIT)2.5 E F0(is not set.)2.5 E F2(HOME)108 657.6 Q F0 .557(The user')7.12 F 3.057(sh)-.55 G .558(ome directory)-3.057 F 3.058(,u)-.65 G .558 (sed as the initial directory path for the startup `)-3.058 F(`$)-.74 E F2(HOME)A F0(/.ne)A(xrc')-.15 E 3.058('a)-.74 G(nd)-3.058 E -.74(``)144 669.6 S($).74 E F2(HOME)A F0(/.e)A(xrc')-.15 E 2.5<278c>-.74 G 2.5 (les. This)-2.5 F -.25(va)2.5 G(lue is also used as the def).25 E (ault directory for the)-.1 E F2(vi)2.5 E F1(cd)2.5 E F0(command.)2.5 E F2(LINES)108 686.4 Q F0 .143(The number of ro)9.33 F .143 (ws on the screen.)-.25 F .143(This v)5.143 F .142(alue o)-.25 F -.15 (ve)-.15 G .142(rrides an).15 F 2.642(ys)-.15 G .142 (ystem or terminal speci\214c v)-2.642 F 2.642(alues. If)-.25 F(the)144 698.4 Q F2(LINES)3.026 E F0(en)3.026 E .526(vironmental v)-.4 F .526 (ariable is not set when)-.25 F F2 -.2(ex)3.026 G(/vi).2 E F0 .526 (runs, or the)3.026 F F1(lines)3.026 E F0 .527(option is e)3.027 F .527 (xplicitly reset)-.15 F(by the user)144 710.4 Q(,)-.4 E F2 -.2(ex)2.5 G (/vi).2 E F0(enters the v)2.5 E(alue into the en)-.25 E(vironment.)-.4 E 207.89(14Q14 14)292.39 768 R EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R/F1 10 /Times-Italic@0 SF(NEXINIT)108 84 Q F0 2.5(Al)144 96 S(ist of)-2.5 E F1 -.2(ex)2.5 G F0(startup commands.)2.7 E F1(SHELL)108 112.8 Q F0 (The user')6.55 E 2.5(ss)-.55 G(hell of choice \(see also the)-2.5 E/F2 10/Times-Bold@0 SF(shell)2.5 E F0(option\).)2.5 E F1(TERM)108 129.6 Q F0 .889(The user')9.89 F 3.389(st)-.55 G .889(erminal type.)-3.389 F .889 (The def)5.889 F .889(ault is the type `)-.1 F(`unkno)-.74 E(wn')-.25 E 3.388('. If)-.74 F(the)3.388 E F1(TERM)3.388 E F0(en)3.388 E .888 (vironmental v)-.4 F(ari-)-.25 E .822(able is not set when)144 141.6 R F1 -.2(ex)3.322 G(/vi).2 E F0 .822(runs, or the)3.322 F F2(term)3.323 E F0 .823(option is e)3.323 F .823(xplicitly reset by the user)-.15 F(,) -.4 E F1 -.2(ex)3.323 G(/vi).2 E F0 .823(enters the)3.323 F -.25(va)144 153.6 S(lue into the en).25 E(vironment.)-.4 E F1(TMPDIR)108 170.4 Q F0 (The location used to stored temporary \214les \(see also the)144 182.4 Q F2(dir)2.5 E(ectory)-.18 E F0(edit option\).)2.5 E/F3 10.95 /Times-Bold@0 SF(ASYNCHR)72 199.2 Q(ONOUS EVENTS)-.329 E F0(SIGALRM)108 211.2 Q F1 -.74(Vi)144 223.2 S(/e).74 E(x)-.2 E F0 .976(uses this signa\ l for periodic backups of \214le modi\214cations and to display `)3.476 F(`b)-.74 E(usy')-.2 E 3.475('m)-.74 G(essages)-3.475 E (when operations are lik)144 235.2 Q(ely to tak)-.1 E 2.5(eal)-.1 G (ong time.)-2.5 E(SIGHUP)108 252 Q(SIGTERM)108 268.8 Q .284 (If the current b)144 280.8 R(uf)-.2 E .284(fer has changed since it w) -.25 F .285(as last written in its entirety)-.1 F 2.785(,t)-.65 G .285 (he editor attempts to sa)-2.785 F -.15(ve)-.2 G 1.643 (the modi\214ed \214le so it can be later reco)144 292.8 R -.15(ve)-.15 G 4.143(red. See).15 F(the)4.143 E F1(vi/e)4.142 E(x)-.2 E F0 1.642 (Reference manual section entitled)4.142 F -.74(``)144 304.8 S(Reco).74 E -.15(ve)-.15 G(ry').15 E 2.5('f)-.74 G(or more information.)-2.5 E (SIGINT)108 321.6 Q .868(When an interrupt occurs, the current operatio\ n is halted, and the editor returns to the command)144 333.6 R(le)144 345.6 Q -.15(ve)-.25 G 3.215(l. If).15 F .715(interrupted during te) 3.215 F .715(xt input, the te)-.15 F .715(xt already input is resolv) -.15 F .715(ed into the \214le as if the te)-.15 F(xt)-.15 E (input had been normally terminated.)144 357.6 Q(SIGWINCH)108 374.4 Q 1.27(The screen is resized.)144 386.4 R 1.271(See the)6.27 F F1(vi/e) 3.771 E(x)-.2 E F0 1.271(Reference manual section entitled `)3.771 F 1.271(`Sizing the Screen')-.74 F 3.771('f)-.74 G(or)-3.771 E (more information.)144 398.4 Q(SIGCONT)108 415.2 Q(SIGQ)108 432 Q(UIT) -.1 E(SIGTSTP)108 448.8 Q F1 -.74(Vi)144 460.8 S(/e).74 E(x)-.2 E F0 (ignores these signals.)2.5 E F3(FILES)72 477.6 Q F0 6.27(/bin/sh The) 108 489.6 R(def)2.5 E(ault user shell.)-.1 E(/etc/vi.e)108 506.4 Q(xrc) -.15 E(System-wide vi startup \214le.)144 518.4 Q 15.16(/tmp T)108 535.2 R(emporary \214le directory)-.7 E(.)-.65 E(/v)108 552 Q(ar/tmp/vi.reco) -.25 E -.15(ve)-.15 G(r).15 E(The def)144 564 Q(ault reco)-.1 E -.15(ve) -.15 G(ry \214le directory).15 E(.)-.65 E($HOME/.ne)108 580.8 Q(xrc)-.15 E(1st choice for user')144 592.8 Q 2.5(sh)-.55 G (ome directory startup \214le.)-2.5 E($HOME/.e)108 609.6 Q(xrc)-.15 E (2nd choice for user')144 621.6 Q 2.5(sh)-.55 G (ome directory startup \214le.)-2.5 E(.ne)108 638.4 Q 8.94(xrc 1st)-.15 F(choice for local directory startup \214le.)2.5 E(.e)108 655.2 Q 13.94 (xrc 2nd)-.15 F(choice for local directory startup \214le.)2.5 E F3 (SEE ALSO)72 672 Q F1(cta)108 684 Q(gs)-.1 E F0(\(1\),).27 E F1(mor)2.5 E(e)-.37 E F0(\(1\),).18 E F1(cur)2.5 E(ses)-.1 E F0(\(3\),).27 E F1 (dbopen)2.5 E F0(\(3\)).24 E(The `)108 708 Q(`V)-.74 E 2.5(iQ)-.6 G (uick Reference')-2.5 E 2.5('c)-.74 G(ard.)-2.5 E 207.89(15Q15 15)292.39 768 R EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 421.08(VI\(1\) VI\(1\))72 48 R -.74(``)108 84 S .743(An Introduction to Display Editing with V)-.06 F(i')-.6 E .743 (', found in the `)-.74 F .743(`UNIX User')-.74 F 3.243(sM)-.55 G .742 (anual Supplementary Docu-)-3.243 F(ments')108 96 Q 3.013('s)-.74 G .513 (ection of both the 4.3BSD and 4.4BSD manual sets.)-3.013 F .513 (This document is the closest thing a)5.513 F -.25(va)-.2 G(ilable).25 E (to an introduction to the)108 108 Q/F1 10/Times-Italic@0 SF(vi)2.5 E F0 (screen editor)2.5 E(.)-.55 E -.74(``)108 132 S 1.117 (Ex Reference Manual \(V).74 F 1.117(ersion 3.7\)')-1.11 F 1.117 (', found in the `)-.74 F 1.116(`UNIX User')-.74 F 3.616(sM)-.55 G 1.116 (anual Supplementary Documents')-3.616 F(')-.74 E .194 (section of both the 4.3BSD and 4.4BSD manual sets.)108 144 R .194 (This document is the \214nal reference for the)5.194 F F1 -.2(ex)2.694 G F0(editor)2.894 E(,)-.4 E(as distrib)108 156 Q (uted in most historic 4BSD and System V systems.)-.2 E -.74(``)108 180 S .28(Edit: A tutorial').74 F .28(', found in the `)-.74 F .279 (`UNIX User')-.74 F 2.779(sM)-.55 G .279(anual Supplementary Documents') -2.779 F 2.779('s)-.74 G .279(ection of the 4.3BSD)-2.779 F(manual set.) 108 192 Q(This document is an introduction to a simple v)5 E (ersion of the)-.15 E F1 -.2(ex)2.5 G F0(screen editor)2.7 E(.)-.55 E -.74(``)108 216 S(Ex/V).74 E 3.689(iR)-.6 G 1.189(eference Manual') -3.689 F 1.189(', found in the `)-.74 F 1.189(`UNIX User')-.74 F 3.689 (sM)-.55 G 1.189(anual Supplementary Documents')-3.689 F 3.69('s)-.74 G 1.19(ection of)-3.69 F .782(the 4.4BSD manual set.)108 228 R .781 (This document is the \214nal reference for the)5.781 F F1(ne)3.281 E (x/n)-.2 E(vi)-.4 E F0(te)3.281 E .781(xt editors, as distrib)-.15 F .781(uted in)-.2 F(4.4BSD and 4.4BSD-Lite.)108 240 Q F1(Rof)108 256.8 Q (f)-.18 E F0 .107(source for all of these documents is distrib)2.607 F .107(uted with)-.2 F F1(ne)2.607 E(x/n)-.2 E(vi)-.4 E F0 .107(in the) 2.607 F F1 -.4(nv)2.607 G(i/USD.doc).4 E F0 .107(directory of the)2.607 F F1(ne)2.608 E(x/n)-.2 E(vi)-.4 E F0(source code.)108 268.8 Q .132 (The \214les `)108 292.8 R(`auto)-.74 E(write')-.25 E .132(', `)-.74 F (`input')-.74 E .132(', `)-.74 F(`quoting')-.74 E 2.632('a)-.74 G .132 (nd `)-2.632 F(`structures')-.74 E 2.632('f)-.74 G .131(ound in the) -2.632 F F1 -.4(nv)2.631 G(i/docs/internals).4 E F0 .131 (directory of the)2.631 F F1(ne)108 304.8 Q(x/n)-.2 E(vi)-.4 E F0 (source code.)2.5 E/F2 10.95/Times-Bold@0 SF(HIST)72 321.6 Q(OR)-.197 E (Y)-.383 E F0(The)108 333.6 Q F1(ne)2.5 E(x/n)-.2 E(vi)-.4 E F0 (replacements for the)2.5 E F1 -.2(ex)2.5 G(/vi).2 E F0 (editor \214rst appeared in 4.4BSD.)2.5 E F2(ST)72 350.4 Q(AND)-.986 E (ARDS)-.383 E F1(Ne)108 362.4 Q(x/n)-.2 E(vi)-.4 E F0 1.34 (is close to IEEE Std1003.2 \(`)3.84 F(`POSIX')-.74 E 3.841('\). That) -.74 F 1.341(document dif)3.841 F 1.341(fers from historical)-.25 F F1 -.2(ex)3.841 G(/vi).2 E F0 1.341(practice in)3.841 F(se)108 374.4 Q -.15 (ve)-.25 G(ral places; there are changes to be made on both sides.).15 E 207.89(16Q16 16)292.39 768 R EP %%Trailer end %%EOF nvi-1.81.6/docs/vi.ref/0040755000076400001440000000000010720065723013577 5ustar skimousersnvi-1.81.6/docs/vi.ref/Makefile0100644000076400001440000000105710720065506015236 0ustar skimousers# $Id: Makefile,v 8.25 2001/08/20 09:40:50 skimo Exp $ (Berkeley) $Date: 2001/08/20 09:40:50 $ MACROS= -me ROFF= groff TBL= tbl all: vi.ref.txt vi.ref.ps ../html/vi.ref.html vi.ref.txt: vi.texi -makeinfo --no-headers vi.texi > $@ 2>/dev/null chmod 444 $@ vi.ref.ps: vi.texi texi2dvi -c vi.texi dvips -o $@ vi.dvi rm -f vi.dvi chmod 444 $@ ../html/vi.ref.html: vi.texi test -d ../html || mkdir ../html -makeinfo --html --no-split vi.texi --output=$@ 2>/dev/null chmod 444 $@ clean: rm -f vi.ref.ps vi.ref.txt index index.so ../html/vi.ref.html nvi-1.81.6/docs/vi.ref/ex.cmd.texi0100644000076400001440000013117010720065506015647 0ustar skimousers@comment Copyright (c) 1994 @comment The Regents of the University of California. All rights reserved. @comment Copyright (c) 1994, 1995, 1996 @comment Keith Bostic. All rights reserved. @comment @comment See the LICENSE file for redistribution information. @comment @comment $Id: ex.cmd.texi,v 8.2 2001/08/20 16:05:50 skimo Exp $ (Berkeley) $Date: 2001/08/20 16:05:50 $ @comment @chapter Ex Description The following words have special meanings for @CO{ex} commands. @itemize @bullet @cindex "" @IP{} The end-of-file character is used to scroll the screen in the @CO{ex} editor. This character is normally @LI{}. However, whatever character is set for the current terminal is supported as well as @LI{}. @cindex "line" @IP{line} A single-line address, given in any of the forms described in the section entitled @QB{Ex Addressing} . The default for @LI{line}is the current line. @cindex "range" @IP{range} A line, or a pair of line addresses, separated by a comma or semicolon. (See the section entitled @QB{Ex Addressing} for more information.) The default for range is the current line @emph{only}, i.e. @QT{.,.}. A percent sign @PQ{%} stands for the range @QT{1,$}. The starting address must be less than, or equal to, the ending address. @cindex "count" @IP{count} A positive integer, specifying the number of lines to be affected by the command; the default is 1. Generally, a count past the end-of-file may be specified, e.g. the command @QT{p 3000} in a 10 line file is acceptable, and will print from the current line through the last line in the file. @cindex "flags" @IP{flags} One or more of the characters @QQ{#}, @QQ{p}, and @QQ{l}. When a command that accepts these flags completes, the addressed line(s) are written out as if by the corresponding @CO{#}, @CO{l} or @CO{p} commands. In addition, any number of @QT{+} or @QT{-} characters can be specified before, after, or during the flags, in which case the line written is not necessarily the one affected by the command, but rather the line addressed by the offset address specified. The default for @LI{flags}is none. @cindex "file" @IP{file} A pattern used to derive a pathname; the default is the current file. File names are subjected to normal @XR{sh,1} word expansions. @end itemize Anywhere a file name is specified, it is also possible to use the special string @QT{/tmp}. This will be replaced with a temporary file name which can be used for temporary work, e.g. @QT{:e /tmp} creates and edits a new file. If both a count and a range are specified for commands that use either, the starting line for the command is the @emph{last} line addressed by the range, and @LI{count}- 1 subsequent lines are affected by the command, e.g. the command @QT{2,3p4} prints out lines 3, 4, 5 and 6. When only a line or range is specified, with no command, the implied command is either a @CO{list}, @CO{number} or @CO{print} command. The command used is the most recent of the three commands to have been used (including any use as a flag). If none of these commands have been used before, the @CO{print} command is the implied command. When no range or count is specified and the command line is a blank line, the current line is incremented by 1 and then the current line is displayed. Zero or more whitespace characters may precede or follow the addresses, count, flags, or command name. Any object following a command name (such as buffer, file, etc.), that begins with an alphabetic character, should be separated from the command name by at least one whitespace character. Any character, including @LI{}, @QT{%} and @QT{#} retain their literal value when preceded by a backslash. @chapter Ex Commands The following section describes the commands available in the @CO{ex} editor. In each entry below, the tag line is a usage synopsis for the command. Each command can be entered as the abbreviation (those characters in the synopsis command word preceding the @QQ{[} character), the full command (all characters shown for the command word, omitting the @QQ{[} and @QQ{]} characters), or any leading subset of the full command down to the abbreviation. For example, the args command (shown as @QT{ar[gs]} in the synopsis) can be entered as @QT{ar}, @QT{arg} or @QT{args}. Each @CO{ex} command described below notes the new current line after it is executed, as well as any options that affect the command. @cindex DOUBLEQUOTE @deftypefn Command {} {"} A comment. Command lines beginning with the double-quote character @PQ{"} are ignored. This permits comments in editor scripts and startup files. @end deftypefn @cindex "" @cindex "" @deftypefn Command {} {} @deftypefnx Command {} {} Scroll the screen. Write the next N lines, where N is the value of the @OP{scroll} option. The command is the end-of-file terminal character, which may be different on different terminals. Traditionally, it is the @LI{}key. @sp 1 Historically, the @CO{eof} command ignored any preceding count, and the @LI{}character was ignored unless it was entered as the first character of the command. This implementation treats it as a command @emph{only} if entered as the first character of the command line, and otherwise treats it as any other character. @table @asis @item Line: Set to the last line written. @item Options: Affected by the @OP{scroll} option. @end table @end deftypefn @cindex "!" @deftypefn Command {} {!} {argument(s)} @deftypefnx Command {} {[range]!} {argument(s)} Execute a shell command, or filter lines through a shell command. In the first synopsis, the remainder of the line after the @QT{!} character is passed to the program named by the @OP{shell} option, as a single argument. @sp 1 Within the rest of the line, @QT{%} and @QT{#} are expanded into the current and alternate pathnames, respectively. The character @QT{!} is expanded with the command text of the previous @CO{!} command. (Therefore, the command @CO{!!} repeats the previous @CO{!} command.) The special meanings of @QT{%}, @QT{#}, and @QT{!} can be overridden by escaping them with a backslash. If no @CO{!} or @CO{:!} command has yet been executed, it is an error to use an unescaped @QT{!} character. The @CO{!} command does @emph{not} do shell expansion on the strings provided as arguments. If any of the above expansions change the command the user entered, the command is redisplayed at the bottom of the screen. @sp 1 @CO{Ex} then executes the program named by the @OP{shell} option, with a @strong{-c} flag followed by the arguments (which are bundled into a single argument). @sp 1 The @CO{!} command is permitted in an empty file. @sp 1 If the file has been modified since it was last completely written, the @CO{!} command will warn you. @sp 1 A single @QT{!} character is displayed when the command completes. @sp 1 In the second form of the @CO{!} command, the remainder of the line after the @QT{!} is passed to the program named by the @OP{shell} option, as described above. The specified lines are passed to the program as standard input, and the standard and standard error output of the program replace the original lines. @table @asis @item Line: Unchanged if no range was specified, otherwise set to the first line of the range. @item Options: Affected by the @OP{shell} and @OP{warn} options. @end table @end deftypefn @cindex "#" @deftypefn Command {[range]} {#} {[count] [flags]} @cindex "number" @deftypefnx Command {[range]} {nu[mber]} {[count] [flags]} Display the selected lines, each preceded with its line number. @sp 1 The line number format is @QQ{%6d}, followed by two spaces. @table @asis @item Line: Set to the last line displayed. @item Options: Affected by the @OP{list} option. @end table @end deftypefn @cindex "@@" @deftypefn Command {@@} {buffer} @cindex "*" @deftypefnx Command {} {*} {buffer} Execute a buffer. Each line in the named buffer is executed as an @CO{ex} command. If no buffer is specified, or if the specified buffer is @QT{@@} or @QT{*}, the last buffer executed is used. @end deftypefn @cindex < @deftypefn Command {[range]} {<[< ...]} {[count] [flags]} Shift lines left or right. The specified lines are shifted to the left (for the @CO{<} command) or right (for the @CO{>} command), by the number of columns specified by the @OP{shiftwidth} option. Only leading whitespace characters are deleted when shifting left; once the first column of the line contains a nonblank character, the @CO{shift} command will succeed, but the line will not be modified. @sp 1 If the command character @CO{<} or @CO{>} is repeated more than once, the command is repeated once for each additional command character. @table @asis @item Line: If the current line is set to one of the lines that are affected by the command, it is unchanged. Otherwise, it is set to the first nonblank character of the lowest numbered line shifted. @item Options: Affected by the @OP{shiftwidth} option. @end table @end deftypefn @cindex = @deftypefn Command {[line]} {=} {[flags]} Display the line number of @LI{line}(which defaults to the last line in the file). @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex > @deftypefn Command {[range]} {>[> ...]} {[count] [flags]} Shift right. The specified lines are shifted to the right by the number of columns specified by the @OP{shiftwidth} option, by inserting tab and space characters. Empty lines are not changed. @sp 1 If the command character @QT{>} is repeated more than once, the command is repeated once for each additional command character. @table @asis @item Line: Set to the last line modified by the command. @item Options: Affected by the @OP{shiftwidth} option. @end table @end deftypefn @cindex abbrev @deftypefn Command {} {ab[brev]} {lhs rhs} Add an abbreviation to the current abbreviation list. When inserting text in @CO{vi}, each time a non-word character is entered after a word character, a set of characters ending at the word character are checked for a match with @LI{lhs}. If a match is found, they are replaced with @LI{rhs}. The set of characters that are checked for a match are defined as follows, for inexplicable historical reasons. If only one or two characters were entered before the non-word character that triggered the check, and after the beginning of the insertion, or the beginning of the line or the file, or the last @LI{}character that was entered, then the one or the both characters are checked for a match. Otherwise, the set includes both characters, as well as the characters that precede them that are the same word class (i.e. word or non-word) as the @strong{second} to last character entered before the non-word character that triggered the check, back to the first @LI{}character, the beginning of the insertion, or the beginning of the line or the file. @sp 1 For example, the abbreviations: @sp 1 @multitable {:abbreviate} {/*#i} {/********************} @item :abbreviate @tab abc @tab ABC @item :abbreviate @tab #i @tab #include @item :abbreviate @tab /*#i @tab /*#include @end multitable will all work, while the abbreviations: @sp 1 @multitable {:abbreviate} {/*#i} {/********************} @item :abbreviate @tab a#i @tab A#include @item :abbreviate @tab /* @tab /******************** @end multitable will not work, and are not permitted by @CO{nvi}. @sp 1 To keep the abbreviation expansion from happening, the character immediately following the @LI{lhs}characters should be quoted with a @LI{}character. @sp 1 The replacement @LI{rhs}is itself subject to both further abbreviation expansion and further map expansion. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex append @deftypefn Command {[line]} {a[ppend][!]} The input text is appended to the specified line. If line 0 is specified, the text is inserted at the beginning of the file. Set to the last line input. If no lines are input, then set to @LI{line}, or to the first line of the file if a @LI{line}of 0 was specified. Following the command name with a @QT{!} character causes the @OP{autoindent} option to be toggled for the duration of the command. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{autoindent} and @OP{number} options. @end table @end deftypefn @cindex args @deftypefn Command {} {ar[gs]} Display the argument list. The current argument is displayed inside of @QT{[} and @QT{]} characters. The argument list is the list of operands specified on startup, which can be replaced using the @CO{next} command. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex bg @deftypefn Command {} {bg} @CO{Vi} mode only. Background the current screen. The screen is unchanged, but is no longer accessible and disappears from the display. Use the @CO{fg} command to bring the screen back to the display foreground. @table @asis @item Line: Set to the current line when the screen was last edited. @item Options: None. @end table @end deftypefn @cindex change @deftypefn Command {[range]} {c[hange][!]} {[count]} Replace the lines with input text. Following the command name with a @QT{!} character causes the @OP{autoindent} option to be toggled for the duration of the command. @table @asis @item Line: Set to the last line input, or, if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line. @item Options: Affected by the @OP{autoindent} and @OP{number} options. @end table @cindex cd @end deftypefn @cindex chdir @deftypefn Command {} {chd[ir][!]} {[directory]} @deftypefnx Command {} {cd[!]} {[directory]} Change the current working directory. The @LI{directory}argument is subjected to @XR{sh,1} word expansions. When invoked with no directory argument and the @LI{HOME}environment variable is set, the directory named by the @LI{HOME}environment variable becomes the new current directory. Otherwise, the new current directory becomes the directory returned by the @XR{getpwent,3} routine. @sp 1 The @CO{chdir} command will fail if the file has been modified since the last complete write of the file. You can override this check by appending a @QT{!} character to the command. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{cdpath} option. @end table @cindex copy @end deftypefn @cindex t @deftypefn Command {[range]} {co[py]} {line [flags]} @deftypefnx Command {[range]} {t} {line [flags]} Copy the specified lines (range) after the destination line. Line 0 may be specified to insert the lines at the beginning of the file. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex cscope @deftypefn Command {} {cs[cope]} {command [args]} Execute a @CO{cscope} command. For more information, see the section of the reference manual entitled @QB{Tags, Tag Stacks, and Cscope} . @end deftypefn @cindex delete @deftypefn Command {[range]} {d[elete]} {[buffer] [count] [flags]} Delete the lines from the file. The deleted text is saved in the specified buffer, or, if no buffer is specified, in the unnamed buffer. If the command name is followed by a letter that could be interpreted as either a buffer name or a flag value (because neither a @LI{count}or @LI{flags}values were given), @CO{ex} treats the letter as a @LI{flags}value if the letter immediately follows the command name, without any whitespace separation. If the letter is preceded by whitespace characters, it treats it as a buffer name. @table @asis @item Line: Set to the line following the deleted lines, or to the last line if the deleted lines were at the end. @item Options: None. @end table @end deftypefn @cindex display @deftypefn Command {} {di[splay]} {b[uffers] | c[onnections] | s[creens] | t[ags]} Display buffers, @CO{cscope} connections, screens or tags. The @CO{display} command takes one of three additional arguments, which are as follows: @table @asis @item b[uffers] Display all buffers (including named, unnamed, and numeric) that contain text. @item c[onnections] Display the source directories for all attached @CO{cscope} databases. @item s[creens] Display the file names of all background screens. @item t[ags] Display the tags stack. @end table @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex edit @deftypefn Command {} {e[dit][!]} {[+cmd] [file]} @deftypefnx Command {} {ex[!]} {[+cmd] [file]} @deftypefnx Command {} {vs[plit][!]} {[+cmd] [file]} Edit a different file. If the current buffer has been modified since the last complete write, the command will fail. You can override this by appending a @QT{!} character to the command name. @sp 1 If the @QT{+cmd} option is specified, that @CO{ex} command will be executed in the new file. Any @CO{ex} command may be used, although the most common use of this feature is to specify a line number or search pattern to set the initial location in the new file. @sp 1 Capitalizing the first letter of the command, i.e., @CO{Edit} or @CO{Ex}, while in @CO{vi} mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @cindex vertical split @cindex splitting, vertically @CO{vsplit} is similar, but the screen will be split vertically to produce the new screen, rather than horizontally. @table @asis @item Line: If you have previously edited the file, the current line will be set to your last position in the file. If that position does not exist, or you have not previously edited the file, the current line will be set to the first line of the file if you are in @CO{vi} mode, and the last line of the file if you are in @CO{ex}. @item Options: None. @end table @end deftypefn @cindex exusage @deftypefn Command {} {exu[sage]} {[command]} Display usage for an @CO{ex} command. If @LI{command}is specified, a usage statement for that command is displayed. Otherwise, usage statements for all @CO{ex} commands are displayed. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex file @deftypefn Command {} {f[ile]} {[file]} Display and optionally change the file name. If a file name is specified, the current pathname is changed to the specified name. The current pathname, the number of lines, and the current position in the file are displayed. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex fg @deftypefn Command {} {fg} {[name]} @CO{Vi} mode only. Foreground the specified screen. If the argument name doesn't exactly match the name of a file displayed by a background screen, it is compared against the last component of each of the file names. If no background screen is specified, the first background screen is foregrounded. @sp 1 By default, foregrounding causes the current screen to be swapped with the backgrounded screen. Capitalizing the first letter of the command, i.e. @CO{Fg}, will foreground the backgrounded screen in a new screen instead of swapping it with the current screen. @table @asis @item Line: Set to the current line when the screen was last edited. @item Options: None. @end table @end deftypefn @cindex global @deftypefn Command {[range]} {g[lobal]} {/pattern/ [commands]} @cindex v @deftypefnx Command {[range]} {v} {/pattern/ [commands]} Apply commands to lines matching (or not matching) a pattern. The lines within the given range that match @PQ{g[lobal]}, or do not match @PQ{v} the given pattern are selected. Then, the specified @CO{ex} command(s) are executed with the current line @PQ{.} set to each selected line. If no range is specified, the entire file is searched for matching, or not matching, lines. @sp 1 Multiple commands can be specified, one per line, by escaping each @LI{}character with a backslash, or by separating commands with a @QT{|} character. If no commands are specified, the command defaults to the @CO{print} command. @sp 1 For the @CO{append}, @CO{change} and @CO{insert} commands, the input text must be part of the global command line. In this case, the terminating period can be omitted if it ends the commands. @sp 1 The @CO{visual} command may also be specified as one of the @CO{ex} commands. In this mode, input is taken from the terminal. Entering a @CO{Q} command in @CO{vi} mode causes the next line matching the pattern to be selected and @CO{vi} to be reentered, until the list is exhausted. @sp 1 The @CO{global}, @CO{v} and @CO{undo} commands cannot be used as part of these commands. @sp 1 The editor options @OP{autoindent}, @OP{autoprint} and @OP{report} are turned off for the duration of the @CO{global} and @CO{v} commands. @table @asis @item Line: The last line modified. @item Options: Affected by the @OP{ignorecase} and @OP{magic} options. Turns off the @OP{autoindent}, @OP{autoprint} and @OP{report} options. @end table @end deftypefn @cindex help @deftypefn Command {} {he[lp]} Display a help message. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex insert @deftypefn Command {[line]} {i[nsert][!]} The input text is inserted before the specified line. Following the command name with a @QT{!} character causes the @OP{autoindent} option setting to be toggled for the duration of this command. @table @asis @item Line: Set to the last line input; if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line. Affected by the @OP{autoindent} and @OP{number} options. @end table @end deftypefn @cindex join @deftypefn Command {[range]} {j[oin][!]} {[count] [flags]} Join lines of text together. @sp 1 A @LI{count}specified to the @CO{join} command specifies that the last line of the @LI{range}plus @LI{count}subsequent lines will be joined. (Note, this differs by one from the general rule where only @LI{count}- 1 subsequent lines are affected.) @sp 1 If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis @PQ{(}, do nothing. Otherwise, if the current line ends with a question mark @PQ{?}, period @PQ{.} or exclamation point @PQ{!}, insert two spaces. Otherwise, insert a single space. @sp 1 Appending a @QT{!} character to the command name causes a simpler join with no white-space processing. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex list @deftypefn Command {[range]} {l[ist]} {[count] [flags]} Display the lines unambiguously. Tabs are displayed as @QT{^I}, and the end of the line is marked with a @QT{$} character. @table @asis @item Line: Set to the last line displayed. @item Options: Affected by the @OP{number} option. @end table @end deftypefn @cindex map @deftypefn Command {} {map[!]} {[lhs rhs]} Define or display maps (for @CO{vi} only). @sp 1 If @QT{lhs} and @QT{rhs} are not specified, the current set of command mode maps are displayed. If a @QT{!} character is appended to to the command, the text input mode maps are displayed. @sp 1 Otherwise, when the @QT{lhs} character sequence is entered in @CO{vi}, the action is as if the corresponding @QT{rhs} had been entered. If a @QT{!} character is appended to the command name, the mapping is effective during text input mode, otherwise, it is effective during command mode. This allows @QT{lhs} to have two different macro definitions at the same time: one for command mode and one for input mode. @sp 1 Whitespace characters require escaping with a @LI{}character to be entered in the @LI{lhs}string in visual mode. @sp 1 Normally, keys in the @LI{rhs}string are remapped (see the @OP{remap} option), and it is possible to create infinite loops. However, keys which map to themselves are not further remapped, regardless of the setting of the @OP{remap} option. For example, the command @QT{:map n nz.} maps the @QT{n} key to the @CO{n} and @CO{z} commands. @sp 1 To exit an infinitely looping map, use the terminal @LI{}character. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{remap} option. @end table @cindex mark @end deftypefn @cindex k @deftypefn Command {[line]} {ma[rk]} {} @deftypefnx Command {[line]} {k} {} Mark the line with the mark @LI{}. The expressions @QT{'} and @QT{`} can then be used as an address in any command that uses one. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex move @deftypefn Command {[range]} {m[ove]} {line} Move the specified lines after the target line. A target line of 0 places the lines at the beginning of the file. @table @asis @item Line: Set to the first of the moved lines. @item Options: None. @end table @end deftypefn @cindex mkexrc @deftypefn Command {} {mk[exrc][!]} {file} Write the abbreviations, editor options and maps to the specified file. Information is written in a form which can later be read back in using the @CO{ex} @CO{source} command. If @LI{file}already exists, the @CO{mkexrc} command will fail. This check can be overridden by appending a @QT{!} character to the command. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex next @deftypefn Command {} {n[ext][!]} {[file ...]} Edit the next file from the argument list. The @CO{next} command will fail if the file has been modified since the last complete write. This check can be overridden by appending the @QT{!} character to the command name. The argument list can optionally be replaced by specifying a new one as arguments to this command. In this case, editing starts with the first file on the new list. @sp 1 Capitalizing the first letter of the command, i.e. @CO{Next}, while in @CO{vi} mode, will set the argument list and edit the file in a new screen. In this case, any modifications to the current file are ignored. @table @asis @item Line: Set as described for the @CO{edit} command. @item Options: Affected by the options @OP{autowrite} and @OP{writeany}. @end table @end deftypefn @cindex open @deftypefn Command {[line]} {o[pen]} {/pattern/ [flags]} Enter open mode. Open mode is the same as being in @CO{vi}, but with a one-line window. All the standard @CO{vi} commands are available. If a match is found for the optional RE argument, the cursor is set to the start of the matching pattern. @sp 1 @emph{This command is not yet implemented.} @table @asis @item Line: Unchanged, unless the optional RE is specified, in which case it is set to the line where the matching pattern is found. @item Options: Affected by the @OP{open} option. @end table @end deftypefn @cindex preserve @deftypefn Command {} {pre[serve]} Save the file in a form that can later be recovered using the @CO{ex} @strong{-r} option. When the file is preserved, an email message is sent to the user. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex previous @deftypefn Command {} {prev[ious][!]} Edit the previous file from the argument list. The @CO{previous} command will fail if the file has been modified since the last complete write. This check can be overridden by appending the @QT{!} character to the command name. @sp 1 Capitalizing the first letter of the command, i.e. @CO{Previous}, while in @CO{vi} mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @table @asis @item Line: Set as described for the @CO{edit} command. @item Options: Affected by the options @OP{autowrite} and @OP{writeany}. None. @end table @end deftypefn @cindex print @deftypefn Command {[range]} {p[rint]} {[count] [flags]} Display the specified lines. @table @asis @item Line: Set to the last line displayed. @item Options: Affected by the @OP{list} and @OP{number} option. @end table @end deftypefn @cindex put @deftypefn Command {[line]} {pu[t]} {[buffer]} Append buffer contents to the current line. If a buffer is specified, its contents are appended to the line, otherwise, the contents of the unnamed buffer are used. @table @asis @item Line: Set to the line after the current line. @item Options: None. @end table @end deftypefn @cindex quit @deftypefn Command {} {q[uit][!]} End the editing session. If the file has been modified since the last complete write, the @CO{quit} command will fail. This check may be overridden by appending a @QT{!} character to the command. @sp 1 If there are more files to edit, the @CO{quit} command will fail. Appending a @QT{!} character to the command name or entering two @CO{quit} commands (i.e. @CO{wq}, @CO{quit}, @CO{xit} or @CO{ZZ}) in a row) will override this check and the editor will exit. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex read @deftypefn Command {[line]} {r[ead][!]} {[file]} Read a file. A copy of the specified file is appended to the line. If @LI{line}is 0, the copy is inserted at the beginning of the file. If no file is specified, the current file is read; if there is no current file, then @LI{file}becomes the current file. If there is no current file and no @LI{file}is specified, then the @CO{read} command will fail. @sp 1 If @LI{file}is preceded by a @QT{!} character, @LI{file}is treated as if it were a shell command, and passed to the program named by the @OP{shell} edit option. The standard and standard error outputs of that command are read into the file after the specified line. The special meaning of the @QT{!} character can be overridden by escaping it with a backslash @PQ{\e} character. @table @asis @item Line: When executed from @CO{ex}, the current line is set to the last line read. When executed from @CO{vi}, the current line is set to the first line read. @item Options: None. @end table @end deftypefn @cindex recover @deftypefn Command {} {rec[over]} {file} Recover @LI{file}if it was previously saved. If no saved file by that name exists, the @CO{recover} command behaves equivalently to the @CO{edit} command. @table @asis @item Line: Set as described for the @CO{edit} command. @item Options: None. @end table @end deftypefn @cindex resize @deftypefn Command {} {res[ize]} {[+|-]size} @CO{Vi} mode only. Grow or shrink the current screen. If @LI{size}is a positive, signed number, the current screen is grown by that many lines. If @LI{size}is a negative, signed number, the current screen is shrunk by that many lines. If @LI{size}is not signed, the current screen is set to the specified @LI{size}. Applicable only to split screens. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex rewind @deftypefn Command {} {rew[ind][!]} Rewind the argument list. If the current file has been modified since the last complete write, the @CO{rewind} command will fail. This check may be overridden by appending the @QT{!} character to the command. @sp 1 Otherwise, the current file is set to the first file in the argument list. @table @asis @item Line: Set as described for the @CO{edit} command. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex set @deftypefn Command {} {se[t]} {[option[=[value]] ...] [nooption ...] [option? ...] [all]} Display or set editor options. When no arguments are specified, the editor option @OP{term}, and any editor options whose values have been changed from the default settings are displayed. If the argument @LI{all}is specified, the values of all of editor options are displayed. @sp 1 Specifying an option name followed by the character @QT{?} causes the current value of that option to be displayed. The @QT{?} can be separated from the option name by whitespace characters. The @QT{?} is necessary only for Boolean valued options. Boolean options can be given values by the form @QT{set option} to turn them on, or @QT{set nooption} to turn them off. String and numeric options can be assigned by the form @QT{set option=value}. Any whitespace characters in strings can be included literally by preceding each with a backslash. More than one option can be set or listed by a single set command, by specifying multiple arguments, each separated from the next by whitespace characters. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex shell @deftypefn Command {} {sh[ell]} Run the shell program. The program named by the @OP{shell} option is run with a @strong{-i} (for interactive) flag. Editing is resumed when that program exits. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{shell} option. @end table @end deftypefn @cindex source @deftypefn Command {} {so[urce]} {file} Read and execute @CO{ex} commands from a file. @CO{Source} commands may be nested. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex substitute @deftypefn Command {[range]} {s[ubstitute]} {[/pattern/replace/] [options] [count] [flags]} @cindex & @deftypefnx Command {[range]} {&} {[options] [count] [flags]} @cindex ~ @deftypefnx Command {[range]} {~} {[options] [count] [flags]} Make substitutions. Replace the first instance of @LI{pattern}with the string @LI{replace}on the specified line(s). If the @QT{/pattern/repl/} argument is not specified, the @QT{/pattern/repl/} from the previous @CO{substitute} command is used. Any character other than an alphabetic, numeric, or backslash character may be used as the delimiter. @sp 1 If @LI{options}includes the letter @QT{c} (confirm), you will be prompted for confirmation before each replacement is done. An affirmative response (in English, a @QT{y} character) causes the replacement to be made. A quit response (in English, a @QT{q} character) causes the @CO{substitute} command to be terminated. Any other response causes the replacement not to be made, and the @CO{substitute} command continues. If @LI{options}includes the letter @QT{g} (global), all nonoverlapping instances of @LI{pattern}in the line are replaced. @sp 1 The @CO{&} version of the command is the same as not specifying a pattern or replacement string to the @CO{substitute} command, and the @QT{&} is replaced by the pattern and replacement information from the previous substitute command. @sp 1 The @CO{~} version of the command is the same as @CO{&} and @CO{s}, except that the search pattern used is the last RE used in @emph{any} command, not necessarily the one used in the last @CO{substitute} command. @sp 1 For example, in the sequence @example s/red/blue/ /green ~ @end example the @QT{~} is equivalent to @QT{s/green/blue/}. @sp 1 The @CO{substitute} command may be interrupted, using the terminal interrupt character. All substitutions completed before the interrupt are retained. @table @asis @item Line: Set to the last line upon which a substitution was made. @item Options: Affected by the @OP{ignorecase} and @OP{magic} option. @end table @end deftypefn @cindex suspend @deftypefn Command {} {su[spend][!]} @cindex stop @deftypefnx Command {} {st[op][!]} @deftypefnx Comamnd {} Suspend the edit session. Appending a @QT{!} character to these commands turns off the @OP{autowrite} option for the command. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex tag @deftypefn Command {} {ta[g][!]} {tagstring} Edit the file containing the specified tag. If the tag is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the @CO{tag} command will fail. This check can be overridden by appending the @QT{!} character to the command name. @sp 1 The @CO{tag} command searches for @LI{tagstring}in the tags file(s) specified by the @OP{tags} option. (See @XR{ctags,1} for more information on tags files.) @sp 1 Capitalizing the first letter of the command, i.e. @CO{Tag}, while in @CO{vi} mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @table @asis @item Line: Set to the line indicated by the tag. @item Options: Affected by the @OP{autowrite}, @OP{taglength}, @OP{tags} and @OP{writeany} options. @end table @end deftypefn @cindex tagnext @deftypefn Command {} {tagn[ext][!]} Edit the file containing the next context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the @CO{tagnext} command will fail. This check can be overridden by appending the @QT{!} character to the command name. @sp 1 Capitalizing the first letter of the command, i.e. @CO{Tagnext}, while in @CO{vi} mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @table @asis @item Line: Set to the line indicated by the tag. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex tagpop @deftypefn Command {} {tagp[op][!]} {[file | number]} Pop to the specified tag in the tags stack. If neither @LI{file}or @LI{number}is specified, the @CO{tagpop} command pops to the most recent entry on the tags stack. If @LI{file}or @LI{number}is specified, the @CO{tagpop} command pops to the most recent entry in the tags stack for that file, or numbered entry in the tags stack, respectively. (See the @CO{display} command for information on displaying the tags stack.) @sp 1 If the file has been modified since the last complete write, the @CO{tagpop} command will fail. This check may be overridden by appending a @QT{!} character to the command name. @table @asis @item Line: Set to the line indicated by the tag. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex tagprev @deftypefn Command {} {tagp[rev][!]} Edit the file containing the previous context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the @CO{tagprev} command will fail. This check can be overridden by appending the @QT{!} character to the command name. @sp 1 Capitalizing the first letter of the command, i.e. @CO{Tagprev}, while in @CO{vi} mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @table @asis @item Line: Set to the line indicated by the tag. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex tagtop @deftypefn Command {} {tagt[op][!]} Pop to the least recent tag on the tags stack, clearing the tags stack. @sp 1 If the file has been modified since the last complete write, the @CO{tagtop} command will fail. This check may be overridden by appending a @QT{!} character to the command name. @table @asis @item Line: Set to the line indicated by the tag. @item Options: Affected by the @OP{autowrite} and @OP{writeany} options. @end table @end deftypefn @cindex unabbrev @deftypefn Command {} {una[bbrev]} {lhs} Delete an abbreviation. Delete @LI{lhs}from the current list of abbreviations. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex undo @deftypefn Command {} {u[ndo]} Undo the last change made to the file. Changes made by @CO{global}, @CO{v}, @CO{visual} and map sequences are considered a single command. If repeated, the @CO{u} command alternates between these two states, and is its own inverse. @table @asis @item Line: Set to the last line modified by the command. @item Options: None. @end table @end deftypefn @cindex unmap @deftypefn Command {} {unm[ap][!]} {lhs} Unmap a mapped string. Delete the command mode map definition for @LI{lhs}. If a @QT{!} character is appended to the command name, delete the text input mode map definition instead. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex version @deftypefn Command {} {ve[rsion]} Display the version of the @CO{ex/vi} editor. @end deftypefn @cindex visual @deftypefn Command {[line]} {vi[sual]} {[type] [count] [flags]} @CO{Ex} mode only. Enter @CO{vi}. The @LI{type}is optional, and can be @QT{-}, @QT{+} or @QT{^}, as in the @CO{ex} @CO{z} command, to specify the position of the specified line in the screen window. (The default is to place the line at the top of the screen window.) A @LI{count}specifies the number of lines that will initially be displayed. (The default is the value of the @OP{window} editor option.) @table @asis @item Line: Unchanged unless @LI{line}is specified, in which case it is set to that line. @item Options: None. @end table @end deftypefn @cindex visual @deftypefn Command {} {vi[sual][!]} {[+cmd] [file]} @CO{Vi} mode only. Edit a new file. Identical to the @QT{edit[!] [+cmd] [file]} command. @sp 1 Capitalizing the first letter of the command, i.e. @CO{Visual}, will edit the file in a new screen. In this case, any modifications to the current file are ignored. @end deftypefn @cindex viusage @deftypefn Command {} {viu[sage]} {[command]} Display usage for a @CO{vi} command. If @LI{command}is specified, a usage statement for that command is displayed. Otherwise, usage statements for all @CO{vi} commands are displayed. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex write @deftypefn Command {[range]} {w[rite][!]} {[>>] [file]} @deftypefnx Command {[range]} {w[rite]} {[!] [file]} @cindex wn @deftypefnx Command {[range]} {wn[!]} {[>>] [file]} @cindex wq @deftypefnx Command {[range]} {wq[!]} {[>>] [file]} Write the file. The specified lines (the entire file, if no range is given) is written to @LI{file}. If @LI{file}is not specified, the current pathname is used. If @LI{file}is specified, and it exists, or if the current pathname was set using the @CO{file} command, and the file already exists, these commands will fail. Appending a @QT{!} character to the command name will override this check and the write will be attempted, regardless. @sp 1 Specifying the optional @QT{>>} string will cause the write to be appended to the file, in which case no tests are made for the file already existing. @sp 1 If the file is preceded by a @QT{!} character, the program named by the shell edit option is invoked with file as its second argument, and the specified lines are passed as standard input to that command. The @QT{!} in this usage must be separated from command name by at least one whitespace character. The special meaning of the @QT{!} may be overridden by escaping it with a backslash @PQ{\e} character. @sp 1 The @CO{wq} version of the write command will exit the editor after writing the file, if there are no further files to edit. Appending a @QT{!} character to the command name or entering two @QQ{quit} commands (i.e. @CO{wq}, @CO{quit}, @CO{xit} or @CO{ZZ}) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited. @sp 1 The @CO{wn} version of the write command will move to the next file after writing the file, unless the write fails. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{readonly} and @OP{writeany} options. @end table @end deftypefn @cindex xit @deftypefn Command {[range]} {x[it][!]} {[file]} Write the file if it has been modified. The specified lines are written to @LI{file}, if the file has been modified since the last complete write to any file. If no @LI{range}is specified, the entire file is written. @sp 1 The @CO{xit} command will exit the editor after writing the file, if there are no further files to edit. Appending a @QT{!} character to the command name or entering two @QQ{quit} commands (i.e. @CO{wq}, @CO{quit}, @CO{xit} or @CO{ZZ}) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited. @table @asis @item Line: Unchanged. @item Options: Affected by the @OP{readonly} and @OP{writeany} options. @end table @end deftypefn @cindex yank @deftypefn Command {[range]} {ya[nk]} {[buffer] [count]} Copy the specified lines to a buffer. If no buffer is specified, the unnamed buffer is used. @table @asis @item Line: Unchanged. @item Options: None. @end table @end deftypefn @cindex z @deftypefn Command {[line]} {z} {[type] [count] [flags]} Adjust the window. If no @LI{type}is specified, then @LI{count}lines following the specified line are displayed. The default @LI{count}is the value of the @OP{window} option. The @LI{type}argument changes the position at which @LI{line}is displayed on the screen by changing the number of lines displayed before and after @LI{line}. The following @LI{type}characters may be used: @table @asis @item - Place the line at the bottom of the screen. @item + Place the line at the top of the screen. @item . Place the line in the middle of the screen. @item ^ Write out count lines starting @LI{count * 2}lines before @LI{line}; the net effect of this is that a @QT{z^} command following a @CO{z} command writes the previous page. @item = Center @LI{line}on the screen with a line of hyphens displayed immediately before and after it. The number of preceding and following lines of text displayed are reduced to account for those lines. @end table @table @asis @item Line: Set to the last line displayed, with the exception of the @QT{=} @LI{type}, where the current line is set to the line specified by the command. @item Options: Affected by the @OP{scroll} option. @end table @end deftypefn nvi-1.81.6/docs/vi.ref/ref.texi0100644000076400001440000000314210720065506015242 0ustar skimousers@comment Copyright (c) 1994 @comment The Regents of the University of California. All rights reserved. @comment Copyright (c) 1994, 1995, 1996 @comment Keith Bostic. All rights reserved. @comment @comment See the LICENSE file for redistribution information. @comment @comment $Id: ref.texi,v 8.1 2001/08/18 20:43:48 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:48 $ @comment @comment @comment indented paragraph, with spaces between the items, bold font @macro IP{item} @item @strong{\item\} @comment @deffn {Command} {\item\} @comment @end deffn @end macro @comment indented paragraph, no spaces between the items, bold font @comment .de Ip @comment .tm arg 1 \\$1 arg 2 \\$2 arg 3 \\$3 @macro Ip{item} @itemx @strong{\item\} @end macro @comment typewriter font @macro LI{command} @code{\command\} @end macro @comment ex/vi names in command font @macro EV{ex,vi} @strong{\ex\}/@strong{\vi\} @end macro @comment command names @macro CO{command} @strong{\command\} @end macro @comment option names @macro OP{option} @code{\option\} @end macro @comment paren quoted (typewriter font) @macro PQ{command} ``@code{\command\}'' @end macro @comment quoted bold @macro QB{command} ``@strong{\command\}'' @end macro @comment quoted command @macro QC{command} ``@strong{\command\}'' @end macro @comment quoted option @comment quoted (no font change) @macro QQ{command} ``\command\'' @end macro @comment quoted (typewriter font) @macro QT{command} ``@code{\command\}'' @end macro @comment section macro to build TOC @comment manual section @macro XR{command,section} @command{\command\}(\section\) @end macro nvi-1.81.6/docs/vi.ref/set.opt.texi0100644000076400001440000010231010720065506016057 0ustar skimousers@comment Copyright (c) 1994 @comment The Regents of the University of California. All rights reserved. @comment Copyright (c) 1994, 1995, 1996 @comment Keith Bostic. All rights reserved. @comment @comment See the LICENSE file for redistribution information. @comment @comment $Id: set.opt.texi,v 8.1 2001/08/18 20:43:48 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:48 $ @comment @chapter Set Options There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values. In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbreviations. (Regardless of the abbreviations, it is only necessary to use the minimum number of characters necessary to distinguish an abbreviation from all other commands for it to be accepted, in @EV{nex,nvi}. Historically, only the full name and the official abbreviations were accepted by @EV{ex,vi}. Using full names in your startup files and environmental variables will probably make them more portable.) The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associated value. Options apply to both @CO{ex} and @CO{vi} modes, unless otherwise specified. With a few exceptions, all options are settable per screen, i.e. the @OP{tags} option can be set differently in each screen. The exceptions are the @OP{columns}, @OP{lines}, @OP{secure} and @OP{term} options. Changing these options modifies the respective information for all screens. For information on modifying the options or to display the options and their current values, see the @QQ{set} command in the section entitled @QB{Ex Commands} . @itemize @bullet @cindex altwerase @IP{altwerase [off]} @CO{Vi} only. Change how @CO{vi} does word erase during text input. When this option is set, text is broken up into three classes: alphabetic, numeric and underscore characters, other nonblank characters, and blank characters. Changing from one class to another marks the end of a word. In addition, the class of the first character erased is ignored (which is exactly what you want when erasing pathname components). @cindex autoindent @IP{autoindent, ai [off]} If this option is set, whenever you create a new line (using the @CO{vi} @CO{A}, @CO{a}, @CO{C}, @CO{c}, @CO{I}, @CO{i}, @CO{O}, @CO{o}, @CO{R}, @CO{r}, @CO{S}, and @CO{s} commands, or the @CO{ex} @CO{append}, @CO{change}, and @CO{insert} commands) the new line is automatically indented to align the cursor with the first nonblank character of the line from which you created it. Lines are indented using tab characters to the extent possible (based on the value of the @OP{tabstop} option) and then using space characters as necessary. For commands inserting text into the middle of a line, any blank characters to the right of the cursor are discarded, and the first nonblank character to the right of the cursor is aligned as described above. @sp 1 The indent characters are themselves somewhat special. If you do not enter more characters on the new line before moving to another line, or entering @LI{}, the indent character will be deleted and the line will be empty. For example, if you enter @LI{}twice in succession, the line created by the first @LI{}will not have any characters in it, regardless of the indentation of the previous or subsequent line. @sp 1 Indent characters also require that you enter additional erase characters to delete them. For example, if you have an indented line, containing only blanks, the first @LI{}character you enter will erase up to end of the indent characters, and the second will erase back to the beginning of the line. (Historically, only the @LI{}key would erase the indent characters. Both the @LI{}key and the usual erase keys work in @CO{nvi}.) In addition, if the cursor is positioned at the end of the indent characters, the keys @QT{0} will erase all of the indent characters for the current line, resetting the indentation level to 0. Similarly, the keys @QT{^} will erase all of the indent characters for the current line, leaving the indentation level for future created lines unaffected. @sp 1 Finally, if the @OP{autoindent} option is set, the @CO{S} and @CO{cc} commands change from the first nonblank of the line to the end of the line, instead of from the beginning of the line to the end of the line. @cindex autoprint @IP{autoprint, ap [off]} @CO{Ex} only. Cause the current line to be automatically displayed after the @CO{ex} commands @CO{<}, @CO{>}, @CO{copy}, @CO{delete}, @CO{join}, @CO{move}, @CO{put}, @CO{t}, @CO{Undo}, and @CO{undo}. This automatic display is suppressed during @CO{global} and @CO{v} commands, and for any command where optional flags are used to explicitly display the line. @cindex autowrite @IP{autowrite, aw [off]} If this option is set, the @CO{vi} @CO{!}, @CO{^^}, @CO{^]} and @CO{} commands, and the @CO{ex} @CO{edit}, @CO{next}, @CO{rewind}, @CO{stop}, @CO{suspend}, @CO{tag}, @CO{tagpop}, and @CO{tagtop} commands automatically write the current file back to the current file name if it has been modified since it was last written. If the write fails, the command fails and goes no further. @sp 1 Appending the optional force flag character @QT{!} to the @CO{ex} commands @CO{next}, @CO{rewind}, @CO{stop}, @CO{suspend}, @CO{tag}, @CO{tagpop}, and @CO{tagtop} stops the automatic write from being attempted. @sp 1 (Historically, the @CO{next} command ignored the optional force flag.) Note, the @CO{ex} commands @CO{edit}, @CO{quit}, @CO{shell}, and @CO{xit} are @emph{not} affected by the @OP{autowrite} option. @sp 1 The @OP{autowrite} option is ignored if the file is considered read-only for any reason. @comment I cannot get a double quote to print between the square brackets @comment to save my life. The ONLY way I've been able to get this to work @comment is with the .tr command. @cindex backup @IP{backup [""]} If this option is set, it specifies a pathname used as a backup file, and, whenever a file is written, the file's current contents are copied to it. The pathname is @QT{#}, @QT{%} and @QT{!} expanded. @sp 1 If the first character of the pathname is @QT{N}, a version number is appended to the pathname (and the @QT{N} character is then discarded). Version numbers are always incremented, and each backup file will have a version number one greater than the highest version number currently found in the directory. @sp 1 Backup files must be regular files, owned by the real user ID of the user running the editor, and not accessible by any other user. @cindex beautify @IP{beautify, bf [off]} If this option is set, all control characters that are not currently being specially interpreted, other than @LI{}, @LI{}, and @LI{}, are discarded from commands read in by @CO{ex} from command files, and from input text entered to @CO{vi} (either into the file or to the colon command line). Text files read by @EV{ex,vi} are @emph{not} affected by the @OP{beautify} option. @cindex cdpath @IP{cdpath [environment variable CDPATH, or current directory]} This option is used to specify a colon separated list of directories which are used as path prefixes for any relative path names used as arguments for the @CO{cd} command. The value of this option defaults to the value of the environmental variable @LI{CDPATH}if it is set, otherwise to the current directory. For compatibility with the POSIX 1003.2 shell, the @CO{cd} command does @emph{not} check the current directory as a path prefix for relative path names unless it is explicitly specified. It may be so specified by entering an empty string or a @QT{.} character into the @LI{CDPATH}variable or the option value. @cindex cedit @IP{cedit [no default]} This option adds the ability to edit the colon command-line history. This option is set to a string. Whenever the first character of that string is entered on the colon command line, you will enter a normal editing window on the collected commands that you've entered on the @CO{vi} colon command-line. You may then modify and/or execute the commands. All normal text editing is available, except that you cannot use @CO{} to switch to an alternate screen. Entering a @CO{} will execute the current line of the screen window as an ex command in the context of the screen from which you created the colon command-line screen, and you will then return to that screen. @sp 1 Because of @CO{vi}'s parsing rules, it can be difficult to set the colon command-line edit character to the @LI{}character. To set it to @LI{}, use @QT{set cedit=}. @sp 1 If the @OP{cedit} edit option is set to the same character as the @OP{filec} edit option, @CO{vi} will perform colon command-line editing if the character is entered as the first character of the line, otherwise, @CO{vi} will perform file name expansion. @cindex columns @IP{columns, co [80]} The number of columns in the screen. Setting this option causes @EV{ex,vi} to set (or reset) the environmental variable @LI{COLUMNS}. See the section entitled @QB{Sizing the Screen} more information. @cindex comment @IP{comment [off]} @CO{Vi} only. If the first non-empty line of the file begins with the string @QT{#}, @QT{/*} or @QT{//}, this option causes @CO{vi} to skip to the end of that shell, C or C++ comment (probably a terribly boring legal notice) before displaying the file. @cindex directory @IP{directory, dir [environment variable TMPDIR, or /tmp]} The directory where temporary files are created. The environmental variable @LI{TMPDIR}is used as the default value if it exists, otherwise @LI{/tmp}is used. @cindex edcompatible @IP{edcompatible, ed [off]} Remember the values of the @QQ{c} and @QQ{g} suffixes to the @CO{substitute} commands, instead of initializing them as unset for each new command. Specifying pattern and replacement strings to the @CO{substitute} command unsets the @QQ{c} and @QQ{g} suffixes as well. @cindex escapetime @IP{escapetime [1]} The 10th's of a second @EV{ex,vi} waits for a subsequent key to complete an @LI{}key mapping. @cindex errorbells @IP{errorbells, eb [off]} @CO{Ex} only. @CO{Ex} error messages are normally presented in inverse video. If that is not possible for the terminal, setting this option causes error messages to be announced by ringing the terminal bell. @cindex exrc @IP{exrc, ex [off]} If this option is turned on in the EXINIT environment variables, or the system or $HOME startup files, the local startup files are read, unless they are the same as the system or $HOME startup files or fail to pass the standard permission checks. See the section entitled @QB{Startup Information} for more information. @cindex extended @IP{extended [off]} This option causes all regular expressions to be treated as POSIX 1003.2 Extended Regular Expressions (which are similar to historic @XR{egrep,1} style expressions). @cindex filec @IP{filec [no default]} This option adds the ability to do shell expansion when entering input on the colon command line. This option is set to a string. Whenever the first character of that string is entered on the colon command line, the delimited string immediately before the cursor is expanded as if it were followed by a @LI{*}character, and file name expansion for the @CO{ex} edit command was done. If no match is found, the screen is flashed and text input resumed. If a single match results, that match replaces the expanded text. In addition, if the single match is for a directory, a @LI{/}character is appended and file completion is repeated. If more than a single match results, any unique prefix shared by the matches replaces the expanded text, the matches are displayed, and text input resumed. @sp 1 Because of @CO{vi}'s parsing rules, it can be difficult to set the path completion character to two command values, @LI{}and @LI{}. To set it to @LI{}, use @QT{set filec=}. To set it to @LI{}, use @QT{set filec=\e}. @sp 1 If the @OP{cedit} edit option is set to the same character as the @OP{filec} edit option, @CO{vi} will perform colon command-line editing if the character is entered as the first character of the line, otherwise, @CO{vi} will perform file name expansion. @cindex flash @IP{flash [on]} This option causes the screen to flash instead of beeping the keyboard, on error, if the terminal has the capability. @cindex hardtabs @IP{hardtabs, ht [8]} This option defines the spacing between hardware tab settings, i.e. the tab expansion done by the operating system and/or the terminal itself. As @EV{nex,nvi} never writes @LI{}characters to the terminal, unlike historic versions of @EV{ex,vi}, this option does not currently have any affect. @cindex iclower @IP{iclower [off]} The @OP{iclower} edit option makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string. @cindex ignorecase @IP{ignorecase, ic [off]} This option causes regular expressions, both in @CO{ex} commands and in searches, to be evaluated in a case-insensitive manner. @cindex keytime @IP{keytime [6]} The 10th's of a second @EV{ex,vi} waits for a subsequent key to complete a key mapping. @cindex leftright @IP{leftright [off]} @CO{Vi} only. This option causes the screen to be scrolled left-right to view lines longer than the screen, instead of the traditional @CO{vi} screen interface which folds long lines at the right-hand margin of the terminal. @cindex lines @IP{lines, li [24]} @CO{Vi} only. The number of lines in the screen. Setting this option causes @EV{ex,vi} to set (or reset) the environmental variable @LI{LINES}. See the section entitled @QB{Sizing the Screen} for more information. @cindex lisp @IP{lisp [off]} @CO{Vi} only. This option changes the behavior of the @CO{vi} @CO{(}, @CO{)}, @strong{@{}, @strong{@}}, @CO{[[} and @CO{]]} commands to match the Lisp language. Also, the @OP{autoindent} option's behavior is changed to be appropriate for Lisp. @sp 1 @emph{This option is not yet implemented.} @cindex list @IP{list [off]} This option causes lines to be displayed in an unambiguous fashion. Specifically, tabs are displayed as control characters, i.e. @QT{^I}, and the ends of lines are marked with a @QT{$} character. @cindex lock @IP{lock [on]} This option causes the editor to attempt to get an exclusive lock on any file being edited, read or written. Reading or writing a file that cannot be locked produces a warning message, but no other effect. Editing a file that cannot be locked results in a read only edit session, as if the @OP{readonly} edit option were set. @cindex magic @IP{magic [on]} This option is on by default. Turning the @OP{magic} option off causes all regular expression characters except for @QT{^} and @QT{$}, to be treated as ordinary characters. To re-enable characters individually, when the @OP{magic} option is off, precede them with a backslash @QT{\e} character. See the section entitled @QB{Regular Expressions and Replacement Strings} for more information. @cindex matchtime @IP{matchtime [7]} @CO{Vi} only. The 10th's of a second @CO{vi} pauses on the matching character when the @OP{showmatch} option is set. @cindex mesg @IP{mesg [on]} This option allows other users to contact you using the @XR{talk,1} and @XR{write,1} utilities, while you are editing. @EV{Ex,vi} does not turn message on, i.e. if messages were turned off when the editor was invoked, they will stay turned off. This option only permits you to disallow messages for the edit session. See the @XR{mesg,1} utility for more information. @cindex msgcat @IP{msgcat [./]} This option selects a message catalog to be used to display error and informational messages in a specified language. If the value of this option ends with a '/', it is treated as the name of a directory that contains a message catalog @QT{vi_XXXX}, where @QT{XXXX} is the value of the @LI{LANG}environmental variable, if it's set, or the value of the @LI{LC_MESSAGES}environmental variable if it's not. If neither of those environmental variables are set, or if the option doesn't end in a '/', the option is treated as the full path name of the message catalog to use. @sp 1 If any messages are missing from the catalog, the backup text (English) is used instead. @sp 1 See the distribution file @LI{catalog/README}for additional information on building and installing message catalogs. @cindex modelines @IP{modelines, modeline [off]} If the @OP{modelines} option is set, @EV{ex,vi} has historically scanned the first and last five lines of each file as it is read for editing, looking for any @CO{ex} commands that have been placed in those lines. After the startup information has been processed, and before the user starts editing the file, any commands embedded in the file are executed. @sp 1 Commands were recognized by the letters @QQ{e} or @QQ{v} followed by @QQ{x} or @QQ{i}, at the beginning of a line or following a tab or space character, and followed by a @QQ{:}, an @CO{ex} command, and another @QQ{:}. @sp 1 This option is a security problem of immense proportions, and should not be used under any circumstances. @sp 1 @emph{This option will never be implemented.} @comment I cannot get a double quote to print between the square brackets @comment to save my life. The ONLY way I've been able to get this to work @comment is with the .tr command. @cindex noprint @IP{noprint [""]} Characters that are never handled as printable characters. By default, the C library function @XR{isprint,3} is used to determine if a character is printable or not. This edit option overrides that decision. @cindex number @IP{number, nu [off]} Precede each line displayed with its current line number. @cindex octal @IP{octal [off]} Display unknown characters as octal numbers @PQ{"\e###"}, instead of the default hexadecimal @PQ{"\ex##"}. @cindex open @IP{open [on]} @CO{Ex} only. If this option is not set, the @CO{open} and @CO{visual} commands are disallowed. @cindex optimize @IP{optimize, opt [on]} @CO{Vi} only. Throughput of text is expedited by setting the terminal not to do automatic carriage returns when printing more than one (logical) line of output, greatly speeding output on terminals without addressable cursors when text with leading white space is printed. @sp 1 @emph{This option is not yet implemented.} @cindex paragraphs @IP{paragraphs, para [IPLPPPQPP LIpplpipbp]} @CO{Vi} only. Define additional paragraph boundaries for the @CO{@{} and @strong{@}} commands. The value of this option must be a character string consisting of zero or more character pairs. @sp 1 In the text to be edited, the character string @LI{.}, (where @LI{}is one of the character pairs in the option's value) defines a paragraph boundary. For example, if the option were set to @LI{LaA##}, then all of the following additional paragraph boundaries would be recognized: @sp 1 @example .La .A .## @end example @cindex path @IP{path []} The path option can be used to specify a -separated list of paths, similar to the @LI{PATH}environment variable in the shells. If this option is set, the name of the file to be edited is not an absolute pathname, the first component of the filename is not @QT{.} or @QT{..}, and the file to be edited doesn't exist in the current directory, the elements of the @OP{path} option are sequentially searched for a file of the specified name. If such a file is found, it is edited. @comment I cannot get a double quote to print between the square brackets @comment to save my life. The ONLY way I've been able to get this to work @comment is with the .tr command. @cindex print @IP{print [""]} Characters that are always handled as printable characters. By default, the C library function @XR{isprint,3} is used to determine if a character is printable or not. This edit option overrides that decision. @cindex prompt @IP{prompt [on]} @CO{Ex} only. This option causes @CO{ex} to prompt for command input with a @QT{:} character; when it is not set, no prompt is displayed. @cindex readonly @IP{readonly, ro [off]} This option causes a force flag to be required to attempt to write the file. Setting this option is equivalent to using the @strong{-R} command line option, or executing the @CO{vi} program using the name @CO{view}. @sp 1 The @OP{readonly} edit option is not usually persistent, like other edit options. If the @strong{-R} command line option is set, @CO{vi} is executed as @CO{view}, or the @OP{readonly} edit option is explicitly set, all files edited in the screen will be marked readonly, and the force flag will be required to write them. However, if none of these conditions are true, or the @OP{readonly} edit option is explicitly unset, then the @OP{readonly} edit option will toggle based on the write permissions of the file currently being edited as of when it is loaded into the edit buffer. In other words, the @OP{readonly} edit option will be set if the current file lacks write permissions, and will not be set if the user has write permissions for the file. @cindex recdir @IP{recdir [/var/tmp/vi.recover]} The directory where recovery files are stored. @sp 1 If you change the value of @OP{recdir}, be careful to choose a directory whose contents are not regularly deleted. Bad choices include directories in memory based filesystems, or @LI{/tmp}, on most systems, as their contents are removed when the machine is rebooted. @sp 1 Public directories like @LI{/usr/tmp}and @LI{/var/tmp}are usually safe, although some sites periodically prune old files from them. There is no requirement that you use a public directory, e.g. a sub-directory of your home directory will work fine. @sp 1 Finally, if you change the value of @OP{recdir}, you must modify the recovery script to operate in your chosen recovery area. @sp 1 See the section entitled @QB{Recovery} for further information. @cindex redraw @IP{redraw, re [off]} @CO{Vi} only. The editor simulates (using great amounts of output), an intelligent terminal on a dumb terminal (e.g. during insertions in @CO{vi} the characters to the right of the cursor are refreshed as each input character is typed). @sp 1 @emph{This option is not yet implemented.} @cindex remap @IP{remap [on]} If this option is set, it is possible to define macros in terms of other macros. Otherwise, each key is only remapped up to one time. For example, if @QT{A} is mapped to @QT{B}, and @QT{B} is mapped to @QT{C}, The keystroke @QT{A} will be mapped to @QT{C} if the @OP{remap} option is set, and to @QT{B} if it is not set. @cindex report @IP{report [5]} Set the threshold of the number of lines that need to be changed or yanked before a message will be displayed to the user. For everything but the yank command, the value is the largest value about which the editor is silent, i.e. by default, 6 lines must be deleted before the user is notified. However, if the number of lines yanked is greater than @emph{or equal to} the set value, it is reported to the user. @cindex ruler @IP{ruler [off]} @CO{Vi} only. Display a row/column ruler on the colon command line. @cindex scroll @IP{scroll, scr [(environment variable LINES - 1) / 2]} Set the number of lines scrolled by the @CO{ex} @CO{} and @CO{} commands. @sp 1 Historically, the @CO{ex} @CO{z} command, when specified without a count, used two times the size of the scroll value; the POSIX 1003.2 standard specified the window size, which is a better choice. @cindex searchincr @IP{searchincr [off]} The @OP{searchincr} edit option makes the search commands @CO{/} and @CO{?} incremental, i.e. the screen is updated and the cursor moves to the matching text as the search pattern is entered. If the search pattern is not found, the screen is beeped and the cursor remains on the colon-command line. Erasing characters from the search pattern backs the cursor up to the previous matching text. @cindex sections @IP{sections, sect [NHSHH HUnhsh]} @CO{Vi} only. Define additional section boundaries for the @CO{[[} and @CO{]]} commands. The @OP{sections} option should be set to a character string consisting of zero or more character pairs. In the text to be edited, the character string @LI{.}, (where @LI{}is one of the character pairs in the option's value), defines a section boundary in the same manner that @OP{paragraphs} option boundaries are defined. @cindex secure @IP{secure [off]} The @OP{secure} edit option turns off all access to external programs. This means that the versions of the @CO{read} and @CO{write} commands that filter text through other programs, the @CO{vi} @CO{!} and @CO{} commands, the @CO{ex} @CO{!}, @CO{script}, @CO{shell}, @CO{stop} and @CO{suspend} commands and file name expansion will not be permitted. Once set, the @OP{secure} edit option may not be unset. @cindex shell @IP{shell, sh [environment variable SHELL, or /bin/sh]} Select the shell used by the editor. The specified path is the pathname of the shell invoked by the @CO{vi} @CO{!} shell escape command and by the @CO{ex} @CO{shell} command. This program is also used to resolve any shell meta-characters in @CO{ex} commands. @comment I cannot get a double quote to print between the square brackets @comment to save my life. The ONLY way I've been able to get this to work @comment is with the .tr command. @cindex shellmeta @comment @IP{shellmeta [~@{[*?@$`'"\e]} @item @strong{shellmeta [~@{[*?$`'"\]} The set of characters that @CO{ex} checks for when doing file name expansion. If any of the specified characters are found in the file name arguments to the @CO{ex} commands, the arguments are expanded using the program defined by the @OP{shell} option. The default set of characters is a union of meta characters from the Version 7 and the Berkeley C shell. @cindex shiftwidth @IP{shiftwidth, sw [8]} Set the autoindent and shift command indentation width. This width is used by the @OP{autoindent} option and by the @CO{<}, @CO{>}, and @CO{shift} commands. @cindex showmatch @IP{showmatch, sm [off]} @CO{Vi} only. This option causes @CO{vi}, when a @comment QT ``@code{@}}'' or @QT{)} is entered, to briefly move the cursor the matching @comment QT ``@code{@{}'' or @QT{(}. See the @OP{matchtime} option for more information. @cindex showmode @IP{showmode, smd [off]} @CO{Vi} only. This option causes @CO{vi} to display a string identifying the current editor mode on the colon command line. The string is preceded by an asterisk (``*'') if the file has been modified since it was last completely written, @cindex sidescroll @IP{sidescroll [16]} @CO{Vi} only. Sets the number of columns that are shifted to the left or right, when @CO{vi} is doing left-right scrolling and the left or right margin is crossed. See the @OP{leftright} option for more information. @cindex slowopen @IP{slowopen, slow [off]} This option affects the display algorithm used by @CO{vi}, holding off display updating during input of new text to improve throughput when the terminal in use is slow and unintelligent. @sp 1 @emph{This option is not yet implemented.} @cindex sourceany @IP{sourceany [off]} If this option is turned on, @CO{vi} historically read startup files that were owned by someone other than the editor user. See the section entitled @QB{Startup Information} for more information. This option is a security problem of immense proportions, and should not be used under any circumstances. @sp 1 @emph{This option will never be implemented.} @cindex tabstop @IP{tabstop, ts [8]} This option sets tab widths for the editor display. @cindex taglength @IP{taglength, tl [0]} This option sets the maximum number of characters that are considered significant in a tag name. Setting the value to 0 makes all of the characters in the tag name significant. @cindex tags @IP{tags, tag [tags /var/db/libc.tags /sys/kern/tags]} Sets the list of tags files, in search order, which are used when the editor searches for a tag. @cindex term @IP{term, ttytype, tty [environment variable TERM]} Set the terminal type. Setting this option causes @EV{ex,vi} to set (or reset) the environmental variable @LI{TERM}. @cindex terse @IP{terse [off]} This option has historically made editor messages less verbose. It has no effect in this implementation. See the @OP{verbose} option for more information. @cindex tildeop @IP{tildeop [off]} Modify the @CO{~} command to take an associated motion. @cindex timeout @IP{timeout, to [on]} If this option is set, @EV{ex,vi} waits for a specific period for a subsequent key to complete a key mapping (see the @OP{keytime} option). If the option is not set, the editor waits until enough keys are entered to resolve the ambiguity, regardless of how long it takes. @cindex ttywerase @IP{ttywerase [off]} @CO{Vi} only. This option changes how @CO{vi} does word erase during text input. If this option is set, text is broken up into two classes, blank characters and nonblank characters. Changing from one class to another marks the end of a word. @cindex verbose @IP{verbose [off]} @CO{Vi} only. @CO{Vi} historically bells the terminal for many obvious mistakes, e.g. trying to move past the left-hand margin, or past the end of the file. If this option is set, an error message is displayed for all errors. @cindex w300 @IP{w300 [no default]} @CO{Vi} only. Set the window size if the baud rate is less than 1200 baud. See the @OP{window} option for more information. @cindex w1200 @IP{w1200 [no default]} @CO{Vi} only. Set the window size if the baud rate is equal to 1200 baud. See the @OP{window} option for more information. @cindex w9600 @IP{w9600 [no default]} @CO{Vi} only. Set the window size if the baud rate is greater than 1200 baud. See the @OP{window} option for more information. @cindex warn @IP{warn [on]} @CO{Ex} only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a @CO{!} command. @cindex window @IP{window, w, wi [environment variable LINES - 1]} This option determines the default number of lines in a screenful, as displayed by the @CO{z} command. It also determines the number of lines scrolled by the @CO{vi} commands @CO{} and @CO{}, and the default number of lines scrolled by the @CO{vi} commands @CO{} and @CO{}. The value of window can be unrelated to the real screen size, although it starts out as the number of lines on the screen. See the section entitled @QB{Sizing the Screen} for more information. Setting the value of the @OP{window} option is the same as using the @strong{-w} command line option. @sp 1 If the value of the @OP{window} option (as set by the @OP{window}, @OP{w300}, @OP{w1200} or @OP{w9600} options) is smaller than the actual size of the screen, large screen movements will result in displaying only that smaller number of lines on the screen. (Further movements in that same area will result in the screen being filled.) This can provide a performance improvement when viewing different places in one or more files over a slow link. @sp 1 Resetting the window size does not reset the default number of lines scrolled by the @CO{} and @CO{} commands. @cindex windowname @IP{windowname [off]} @CO{Vi} changes the name of the editor's icon/window to the current file name when it's possible and not destructive, i.e., when the editor can restore it to its original value on exit or when the icon/window will be discarded as the editor exits. If the @OP{windowname} edit option is set, @CO{vi} will change the icon/window name even when it's destructive and the icon/window name will remain after the editor exits. (This is the case for @XR{xterm,1}). @cindex wraplen @IP{wraplen, wl [0]} This option is identical to the @OP{wrapmargin} option, with the exception that it specifies the number of columns from the @emph{left} margin before the line splits, not the right margin. @sp 1 If both @OP{wraplen} and @OP{wrapmargin} are set, the @OP{wrapmargin} value is used. @cindex wrapmargin @IP{wrapmargin, wm [0]} @CO{Vi} only. If the value of the @OP{wrapmargin} option is non-zero, @CO{vi} will split lines so that they end at least that number of columns before the right-hand margin of the screen. (Note, the value of @OP{wrapmargin} is @emph{not} a text length. In a screen that is 80 columns wide, the command @QT{:set wrapmargin=8} attempts to keep the lines less than or equal to 72 columns wide.) @sp 1 Lines are split at the previous whitespace character closest to the number. Any trailing whitespace characters before that character are deleted. If the line is split because of an inserted @LI{}or @LI{}character, and you then enter another @LI{}character, it is discarded. @sp 1 If wrapmargin is set to 0, or if there is no blank character upon which to split the line, the line is not broken. @sp 1 If both @OP{wraplen} and @OP{wrapmargin} are set, the @OP{wrapmargin} value is used. @cindex wrapscan @IP{wrapscan, ws [on]} This option causes searches to wrap around the end or the beginning of the file, and back to the starting point. Otherwise, the end or beginning of the file terminates the search. @cindex writeany @IP{writeany, wa [off]} If this option is set, file-overwriting checks that would usually be made before the @CO{write} and @CO{xit} commands, or before an automatic write (see the @OP{autowrite} option), are not made. This allows a write to any file, provided the file permissions allow it. @end itemize nvi-1.81.6/docs/vi.ref/spell.ok0100644000076400001440000000531610720065506015252 0ustar skimousersABC Amir Autoindent Autoprint BRE's Bostic Bourne CDPATH CSCOPE Cscope DIRS DOUBLEQUOTE Dq Ds ERE's EXINIT Englar Ev FF Fa Fg FindScreen Fl Foregrounding HUnhsh IPLPPPQPP Kirkendall Korn LC LIpplpipbp LaA Li Lowercase MINUSSIGN Makefiles Mayoff NEX NEXINIT NHSHH NVI Neville Nex Nvi OS POSIX Perl PostScript QQ RE's README RECDIR Reference''USD:13 SENDMAIL SIGHUP SIGWINCH SQUOTE Se Std Std1003.2 Sven Sy TANDARDS TIOCGWINSZ TMPDIR TOC Tagnext Tagprev Tcl Tk Todo USD USD.doc USD:13 UUNET Unmap VI Verdoolaege Vi Vx Whitespace XOFF XON XOptions XXCOLUMNS XXXX XXXXXX XXb ZZ ab abbrev abc ags ai al altwerase ap api ar arg args att autoindent autoprint autowrite aw backgrounded backgrounding bbrev berkeley bf bg bigword bigwords bostic bp brev bsd bugs.current c2w carat cd cdpath cdy cedit changelog chd chdir cmd co count1 count2 creens cs cs.berkeley.edu cscope ctags cw db dbopen dd def di dir dit docs eE eFlRsv eFlRv eL eU ead eb edcompatible edu ee egrep elete elp elvis email enum eof errorbells esc escapetime eset eu ex.cmd.roff exrc ext exu exusage fcntl fg fi filec filesystem filesystems foo foregrounded foregrounding ftp.cs.berkeley.edu ftp.uu.net gdb gdb.script getpwent gs gzip'd halfbyte hange hangup hardtabs ht html http ic iclower ifdef ignorecase ile ind initially ious ir iscntrl isprint ist ize keystroke keystrokes keytime leftright lhs li lib libc libc.tags lineNum lineNumber lobal lowercase lp luR matchtime mber mesg meta mk mkexrc modeful modeline modelines ms msgcat ndo nex nexrc nk nomagic nonblank nonoverlapping nooption noprint nsert nul nvi nvi.tar.Z nvi.tar.z nz oin onnections op ove para pathname pathnames pe perl perld ppend prev pu py rc rc.local readonly rec recdir recfile recover.XXXX recover.XXXXXX recover.c recover.script redist redistributable reimplementations remapmax remapped repl res rew rhs rint ript rk rl ro roff rsion sc sccs scr screeen screenId se searchincr sendmail set.opt.roff settable setuid sh shareware shellmeta shiftwidth showmatch showmode sidescroll slowopen sm smd sourceany sp spell.ok ssg st su sual svi sw ta tabstop taglength tagn tagnext tagp tagpop tagprev tagstring tagt tagtop tc tcl tclproc terminfo th th's tildeop tl tmp toolchest tpath tr ts ttytype ttywerase uR ubstitute ucb uffers uit una unabbrev unescaped unm unmap unsets uppercase urce usr uunet v var ve vi vi.0.ps vi.0.txt vi.1 vi.XXXX vi.XXXXXX vi.cmd.roff vi.exrc vi.recover viAppendLine viDelLine viEndScreen viFindScreen viGetCursor viGetLine viGetMark viGetOpt viInsertLine viLastLine viMapKey viMsg viNewScreen viSetCursor viSetLine viSetMark viSetOpt viSwitchScreen viUnmMapKey vibackup virecovery viu viusage wa whitespace wi windowname wl wm wn wq wraplen wrapmargin wrapscan writeany ws www xaw xit xterm ya yy nvi-1.81.6/docs/vi.ref/vi.cmd.texi0100644000076400001440000022760110720065506015656 0ustar skimousers@comment Copyright (c) 1994 @comment The Regents of the University of California. All rights reserved. @comment Copyright (c) 1994, 1995, 1996 @comment Keith Bostic. All rights reserved. @comment @comment See the LICENSE file for redistribution information. @comment @comment $Id: vi.cmd.texi,v 8.1 2001/08/18 20:43:49 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:49 $ @comment @chapter Vi Description @CO{Vi} takes up the entire screen to display the edited file, except for the bottom line of the screen. The bottom line of the screen is used to enter @CO{exp} commands, and for @CO{vi} error and informational messages. If no other information is being displayed, the default display can show the current cursor row and cursor column, an indication of whether the file has been modified, and the current mode of the editor. See the @OP{ruler} and @OP{showmode} options for more information. Empty lines do not have any special representation on the screen, but lines on the screen that would logically come after the end of the file are displayed as a single tilde @PQ{~} character. To differentiate between empty lines and lines consisting of only whitespace characters, use the @OP{list} option. Historically, implementations of @CO{vi} have also displayed some lines as single asterisk @PQ{@@} characters. These were lines that were not correctly displayed, i.e. lines on the screen that did not correspond to lines in the file, or lines that did not fit on the current screen. @CO{Nvi} never displays lines in this fashion. @CO{Vi} is a modeful editor, i.e. it has two modes, @QQ{command} mode and @QQ{text input} mode. When @CO{vi} first starts, it is in command mode. There are several commands that change @CO{vi} into text input mode. The @LI{}character is used to resolve the text input into the file, and exit back into command mode. In @CO{vi} command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In @CO{vi} text insert mode, the cursor is positioned on the first column of characters which take up more than one column on the screen. When positioning the cursor to a new line and column, the type of movement is defined by the distance to the new cursor position. If the new position is close, the screen is scrolled to the new location. If the new position is far away, the screen is repainted so that the new position is on the screen. If the screen is scrolled, it is moved a minimal amount, and the cursor line will usually appear at the top or bottom of the screen. If the screen is repainted, the cursor line will appear in the center of the screen, unless the cursor is sufficiently close to the beginning or end of the file that this isn't possible. If the @OP{leftright} option is set, the screen may be scrolled or repainted in a horizontal direction as well as in a vertical one. A major difference between the historical @CO{vi} presentation and @CO{nvi} is in the scrolling and screen oriented position commands, @CO{}, @CO{}, @CO{}, @CO{}, @CO{}, @CO{}, @CO{H}, @CO{L} and @CO{M}. In historical implementations of @CO{vi}, these commands acted on physical (as opposed to logical, or screen) lines. For lines that were sufficiently long in relation to the size of the screen, this meant that single line scroll commands might repaint the entire screen, scrolling or screen positioning commands might not change the screen or move the cursor at all, and some lines simply could not be displayed, even though @CO{vi} would edit the file that contained them. In @CO{nvi}, these commands act on logical, i.e. screen lines. You are unlikely to notice any difference unless you are editing files with lines significantly longer than a screen width. @CO{Vi} keeps track of the currently @QQ{most attractive} cursor position. Each command description (for commands that alter the current cursor position), specifies if the cursor is set to a specific location in the line, or if it is moved to the @QQ{most attractive cursor position}. The latter means that the cursor is moved to the cursor position that is horizontally as close as possible to the current cursor position. If the current line is shorter than the cursor position @CO{vi} would select, the cursor is positioned on the last character in the line. (If the line is empty, the cursor is positioned on the first column of the line.) If a command moves the cursor to the most attractive position, it does not alter the current cursor position, and a subsequent movement will again attempt to move the cursor to that position. Therefore, although a movement to a line shorter than the currently most attractive position will cause the cursor to move to the end of that line, a subsequent movement to a longer line will cause the cursor to move back to the most attractive position. In addition, the @CO{$} command makes the end of each line the most attractive cursor position rather than a specific column. Each @CO{vi} command described below notes where the cursor ends up after it is executed. This position is described in terms of characters on the line, i.e. @QQ{the previous character}, or, @QQ{the last character in the line}. This is to avoid needing to continually refer to on what part of the character the cursor rests. The following words have special meaning for @CO{vi} commands. @itemize @bullet @cindex "previous context" @IP{previous context} The position of the cursor before the command which caused the last absolute movement was executed. Each @CO{vi} command described in the next section that is considered an absolute movement is so noted. In addition, specifying @emph{any} address to an @CO{ex} command is considered an absolute movement. @cindex "motion" @IP{motion} A second @CO{vi} command can be used as an optional trailing argument to the @CO{vi} @CO{<}, @CO{>}, @CO{!}, @CO{c}, @CO{d}, @CO{y}, and (depending on the @OP{tildeop} option) @CO{~} commands. This command indicates the end of the region of text that's affected by the command. The motion command may be either the command character repeated (in which case it means the current line) or a cursor movement command. In the latter case, the region affected by the command is from the starting or stopping cursor position which comes first in the file, to immediately before the starting or stopping cursor position which comes later in the file. Commands that operate on lines instead of using beginning and ending cursor positions operate on all of the lines that are wholly or partially in the region. In addition, some other commands become line oriented depending on where in the text they are used. The command descriptions below note these special cases. @sp 1 The following commands may all be used as motion components for @CO{vi} commands: @sp 1 @multitable {@CO{}} {@CO{'}} {@CO{}} {@CO{}} @item @CO{} @tab @CO{} @tab @CO{} @tab @CO{} @item @CO{} @tab @CO{} @tab @CO{} @tab @CO{$} @item @CO{%} @tab @CO{'} @tab @CO{(} @tab @CO{)} @item @CO{+} @tab @CO{,} @tab @CO{-} @tab @CO{/} @item @CO{0} @tab @CO{;} @tab @CO{?} @tab @CO{B} @item @CO{E} @tab @CO{F} @tab @CO{G} @tab @CO{H} @item @CO{L} @tab @CO{M} @tab @CO{N} @tab @CO{T} @item @CO{W} @tab @CO{[[} @tab @CO{]]} @tab @CO{^} @item @CO{_} @tab @CO{`} @tab @CO{b} @tab @CO{e} @item @CO{f} @tab @CO{h} @tab @CO{j} @tab @CO{k} @item @CO{l} @tab @CO{n} @tab @CO{t} @tab @CO{w} @item @strong{@{} @tab @CO{|} @tab @strong{@}} @end multitable @sp 1 The optional count prefix available for some of the @CO{vi} commands that take motion commands, or the count prefix available for the @CO{vi} commands that are used as motion components, may be included and is @emph{always} considered part of the motion argument. For example, the commands @QT{c2w} and @QT{2cw} are equivalent, and the region affected by the @CO{c} command is two words of text. In addition, if the optional count prefix is specified for both the @CO{vi} command and its motion component, the effect is multiplicative and is considered part of the motion argument. For example, the commands @QT{4cw} and @QT{2c2w} are equivalent, and the region affected by the @CO{c} command is four words of text. @cindex "count" @IP{count} A positive number used as an optional argument to most commands, either to give a size or a position (for display or movement commands), or as a repeat count (for commands that modify text). The count argument is always optional and defaults to 1 unless otherwise noted in the command description. @sp 1 When a @CO{vi} command synopsis shows both a @LI{[buffer]}and @LI{[count]}, they may be presented in any order. @cindex word @IP{word} Generally, in languages where it is applicable, @CO{vi} recognizes two kinds of words. First, a sequence of letters, digits and underscores, delimited at both ends by: characters other than letters, digits, or underscores, the beginning or end of a line, and the beginning or end of the file. Second, a sequence of characters other than letters, digits, underscores, or whitespace characters, delimited at both ends by: a letter, digit, underscore, or whitespace character, the beginning or end of a line, and the beginning or end of the file. For example, the characters @QT{ !@@#abc$%^ } contain three words: @QT{!@@#}, @QT{abc} and @QT{$%^}. @sp 1 Groups of empty lines (or lines containing only whitespace characters) are treated as a single word. @cindex "bigword" @IP{bigword} A set of non-whitespace characters preceded and followed by whitespace characters or the beginning or end of the file or line. For example, the characters @QT{ !@@#abc$%^ } contain one bigword: @QT{!@@#abc$%^}. @sp 1 Groups of empty lines (or lines containing only whitespace characters) are treated as a single bigword. @cindex "paragraph" @IP{paragraph} An area of text that begins with either the beginning of a file, an empty line, or a section boundary, and continues until either an empty line, section boundary, or the end of the file. @sp 1 Groups of empty lines (or lines containing only whitespace characters) are treated as a single paragraph. @sp 1 Additional paragraph boundaries can be defined using the @OP{paragraphs} option. @cindex "section" @IP{section} An area of text that starts with the beginning of the file or a line whose first character is an open brace @comment PQ ``@code{@{}'' and continues until the next section or the end of the file. @sp 1 Additional section boundaries can be defined using the @OP{sections} option. @cindex "sentence" @IP{sentence} An area of text that begins with either the beginning of the file or the first nonblank character following the previous sentence, paragraph, or section boundary and continues until the end of the file or a period @PQ{.} exclamation point @PQ{!} or question mark @PQ{?} character, followed by either an end-of-line or two whitespace characters. Any number of closing parentheses @PQ{)}, brackets @PQ{]}, double-quote @PQ{"} or single quote @PQ{'} characters can appear between the period, exclamation point, or question mark and the whitespace characters or end-of-line. @sp 1 Groups of empty lines (or lines containing only whitespace characters) are treated as a single sentence. @chapter Vi Commands @end itemize The following section describes the commands available in the command mode of the @CO{vi} editor. In each entry below, the tag line is a usage synopsis for the command character. In addition, the final line and column the cursor rests upon, and any options which affect the command are noted. @cindex @deftypefn Command {[count]} {} Search forward @LI{count}times for the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. The search is literal, i.e. no characters in the word have any special meaning in terms of Regular Expressions. It is an error if no matching pattern is found between the starting position and the end of the file. @sp 1 The @CO{} command is an absolute movement. The @CO{} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line where the word is found. @item Column: Set to the first character of the word. @item Options: Affected by the @OP{ignorecase} and @OP{wrapscan} options. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Page backward @LI{count}screens. Two lines of overlap are maintained, if possible, by displaying the window starting at line @LI{(top_line - count * window_size) + 2}, where @LI{window_size}is the value of the @OP{window} option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the beginning of the file. @table @asis @item Line: Set to the last line of text displayed on the screen. @item Column: Set to the first nonblank character of the line. @item Options: Affected by the @OP{window} option. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Scroll forward @LI{count}lines. If @LI{count}is not specified, scroll forward the number of lines specified by the last @CO{} or @CO{} command. If this is the first @CO{} or @CO{} command, scroll forward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the end of the file. @table @asis @item Line: Set to the current line plus the number of lines scrolled. @item Column: Set to the first nonblank character of the line. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Scroll forward @LI{count}lines, leaving the cursor on the current line and column, if possible. It is an error if the movement is past the end of the file. @table @asis @item Line: Unchanged unless the current line scrolls off the screen, in which case it is set to the first line on the screen. @item Column: Unchanged unless the current line scrolls off the screen, in which case it is set to the most attractive cursor position. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Page forward @LI{count}screens. Two lines of overlap are maintained, if possible, by displaying the window starting at line @LI{top_line + count * window_size - 2}, where @LI{window_size}is the value of the @OP{window} option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the end of the file. @table @asis @item Line: Set to the first line on the screen. @item Column: Set to the first nonblank character of the current line. @item Options: Affected by the @OP{window} option. @end table @end deftypefn @cindex @deftypefn Command {} {} Display the file information. The information includes the current pathname, the current line, the number of total lines in the file, the current line as a percentage of the total lines in the file, if the file has been modified, was able to be locked, if the file's name has been changed, and if the edit session is read-only. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} @deftypefnx Command {[count]} {h} Move the cursor back @LI{count}characters in the current line. It is an error if the cursor is on the first character in the line. @sp 1 The @CO{} and @CO{h} commands may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the @LI{current - count}character, or, the first character in the line if @LI{count}is greater than or equal to the number of characters in the line before the cursor. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} @cindex @deftypefnx Command {[count]} {} @cindex j @deftypefnx Command {[count]} {j} Move the cursor down @LI{count}lines without changing the current column. It is an error if the movement is past the end of the file. @sp 1 The @CO{}, @CO{} and @CO{j} commands may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the current line plus @LI{count}. @item Column: The most attractive cursor position. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {} {} @cindex @deftypefnx Command {} {} Repaint the screen. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} @cindex + @deftypefnx Command {[count]} {+} Move the cursor down @LI{count}lines to the first nonblank character of that line. It is an error if the movement is past the end of the file. @sp 1 The @CO{} and @CO{+} commands may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the current line plus @LI{count}. @item Column: Set to the first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} @cindex k @deftypefnx Command {[count]} {k} Move the cursor up @LI{count}lines, without changing the current column. It is an error if the movement is past the beginning of the file. @sp 1 The @CO{} and @CO{k} commands may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the current line minus @LI{count}. @item Column: The most attractive cursor position. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {} {} Return to the most recent tag context. The @CO{} command is an absolute movement. @table @asis @item Line: Set to the context of the previous tag command. @item Column: Set to the context of the previous tag command. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Scroll backward @LI{count}lines. If @LI{count}is not specified, scroll backward the number of lines specified by the last @CO{} or @CO{} command. If this is the first @CO{} or @CO{} command, scroll backward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the beginning of the file. @table @asis @item Line: Set to the current line minus the amount scrolled. @item Column: Set to the first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {} {} Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window. @table @asis @item Line: Set to the previous cursor position in the window. @item Column: Set to the previous cursor position in the window. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} Scroll backward @LI{count}lines, leaving the current line and column as is, if possible. It is an error if the movement is past the beginning of the file. @table @asis @item Line: Unchanged unless the current line scrolls off the screen, in which case it is set to the last line of text displayed on the screen. @item Column: Unchanged unless the current line scrolls off the screen, in which case it is the most attractive cursor position. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {} {} Suspend the current editor session. If the file has been modified since it was last completely written, and the @OP{autowrite} option is set, the file is written before the editor session is suspended. If this write fails, the editor session is not suspended. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: Affected by the @OP{autowrite} option. @end table @end deftypefn @cindex @deftypefn Command {} {} Execute @CO{ex} commands or cancel partial commands. If an @CO{ex} command is being entered (e.g. @CO{/}, @CO{?}, @CO{:} or @CO{!}), the command is executed. If a partial command has been entered, e.g. @QT{[0-9]*}, or @QT{[0-9]*[!<>cdy]}, the command is cancelled. Otherwise, it is an error. @table @asis @item Line: When an @CO{ex} command is being executed, the current line is set as described for that command. Otherwise, unchanged. @item Column: When an @CO{ex} command is being executed, the current column is set as described for that command. Otherwise, unchanged. @item Options: None. @end table @end deftypefn @cindex @deftypefn Command {} {} Push a tag reference onto the tag stack. The tags files (see the @OP{tags} option for more information) are searched for a tag matching the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. If a matching tag is found, the current file is discarded and the file containing the tag reference is edited. @sp 1 If the current file has been modified since it was last completely written, the command will fail. The @CO{} command is an absolute movement. @table @asis @item Line: Set to the line containing the matching tag string. @item Column: Set to the start of the matching tag string. @item Options: Affected by the @OP{tags} and @OP{taglength} options. @end table @end deftypefn @cindex @deftypefn Command {} {} Switch to the most recently edited file. @sp 1 If the file has been modified since it was last completely written, and the @OP{autowrite} option is set, the file is written out. If this write fails, the command will fail. Otherwise, if the current file has been modified since it was last completely written, the command will fail. @table @asis @item Line: Set to the line the cursor was on when the file was last edited. @item Column: Set to the column the cursor was on when the file was last edited. @item Options: Affected by the @OP{autowrite} option. @end table @end deftypefn @cindex @deftypefn Command {[count]} {} @cindex l @deftypefnx Command {[count]} {l} Move the cursor forward @LI{count}characters without changing the current line. It is an error if the cursor is on the last character in the line. @sp 1 The @CO{} and @CO{l} commands may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. In addition, these commands may be used as the motion components of other commands when the cursor is on the last character in the line, without error. @table @asis @item Line: Unchanged. @item Column: Set to the current character plus the next @LI{count}characters, or to the last character on the line if @LI{count}is greater than the number of characters in the line after the current character. @item Options: None. @end table @end deftypefn @cindex ! @deftypefn Command {[count]} {!} {motion shell-argument(s)} Replace text with results from a shell command. Pass the lines specified by the @LI{count}and @LI{motion}arguments as standard input to the program named by the @OP{shell} option, and replace those lines with the output (both standard error and standard output) of that command. @sp 1 After the motion is entered, @CO{vi} prompts for arguments to the shell command. @sp 1 Within those arguments, @QT{%} and @QT{#} characters are expanded to the current and alternate pathnames, respectively. The @QT{!} character is expanded with the command text of the previous @CO{!} or @CO{:!} commands. (Therefore, the command @CO{!!} repeats the previous @CO{!} command.) The special meanings of @QT{%}, @QT{#} and @QT{!} can be overridden by escaping them with a backslash. If no @CO{!} or @CO{:!} command has yet been executed, it is an error to use an unescaped @QT{!} character as a shell argument. The @CO{!} command does @emph{not} do shell expansion on the strings provided as arguments. If any of the above expansions change the arguments the user entered, the command is redisplayed at the bottom of the screen. @sp 1 @CO{Vi} then executes the program named by the @OP{shell} option, with a @strong{-c} flag followed by the arguments (which are bundled into a single argument). @sp 1 The @CO{!} command is permitted in an empty file. @sp 1 If the file has been modified since it was last completely written, the @CO{!} command will warn you. @table @asis @item Line: The first line of the replaced text. @item Column: The first column of the replaced text. @item Options: Affected by the @OP{shell} option. @end table @end deftypefn @cindex # @deftypefn Command {[count]} {#} {#|+|-} Increment or decrement the number referenced by the cursor. If the trailing character is a @LI{+}or @LI{#}, the number is incremented by @LI{count}. If the trailing character is a @LI{-}, the number is decremented by @LI{count}. @sp 1 A leading @QT{0X} or @QT{0x} causes the number to be interpreted as a hexadecimal number. Otherwise, a leading @QT{0} causes the number to be interpreted as an octal number, unless a non-octal digit is found as part of the number. Otherwise, the number is interpreted as a decimal number, and may have a leading @LI{+}or @LI{-}sign. The current number begins at the first non-blank character at or after the current cursor position, and extends up to the end of the line or the first character that isn't a possible character for the numeric type. The format of the number (e.g. leading 0's, signs) is retained unless the new value cannot be represented in the previous format. @sp 1 Octal and hexadecimal numbers, and the result of the operation, must fit into an @QT{unsigned long}. Similarly, decimal numbers and their result must fit into a @QT{signed long}. It is an error to use this command when the cursor is not positioned at a number. @sp 1 @table @asis @item Line: Unchanged. @item Column: Set to the first character in the cursor number. @item Options: None. @end table @end deftypefn @cindex $ @deftypefn Command {[count]} {$} Move the cursor to the end of a line. If @LI{count}is specified, the cursor moves down @LI{count - 1}lines. @sp 1 It is not an error to use the @CO{$} command when the cursor is on the last character in the line or when the line is empty. @sp 1 The @CO{$} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the cursor is at, or before the first nonblank character in the line, in which case it is line oriented. It is not an error to use the @CO{$} command as a motion component when the cursor is on the last character in the line, although it is an error when the line is empty. @table @asis @item Line: Set to the current line plus @LI{count}minus 1. @item Column: Set to the last character in the line. @item Options: None. @end table @end deftypefn @cindex % @deftypefn Command {} {%} Move to the matching character. The cursor moves to the parenthesis or curly brace which @emph{matches} the parenthesis or curly brace found at the current cursor position or which is the closest one to the right of the cursor on the line. It is an error to execute the @CO{%} command on a line without a parenthesis or curly brace. Historically, any @LI{count}specified to the @CO{%} command was ignored. @sp 1 The @CO{%} command is an absolute movement. The @CO{%} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is at or before the first nonblank character on its line, and the ending point is at or after the last nonblank character on its line, in which case it is line oriented. @table @asis @item Line: Set to the line containing the matching character. @item Column: Set to the matching character. @item Options: None. @end table @end deftypefn @cindex & @deftypefn Command {} {&} Repeat the previous substitution command on the current line. @sp 1 Historically, any @LI{count}specified to the @CO{&} command was ignored. @table @asis @item Line: Unchanged. @item Column: Unchanged if the cursor was on the last character in the line, otherwise, set to the first nonblank character in the line. @item Options: Affected by the @OP{edcompatible}, @OP{extended}, @OP{ignorecase} and @OP{magic} options. @end table @end deftypefn @cindex SQUOTE @deftypefn Command {} {'} @cindex ` @deftypefnx Command {} ` Return to a context marked by the character @LI{}. If @LI{}is the @QT{'} or @QT{`} character, return to the previous context. If @LI{}is any other character, return to the context marked by that character (see the @CO{m} command for more information). If the command is the @CO{\'} command, only the line value is restored, and the cursor is placed on the first nonblank character of that line. If the command is the @CO{`} command, both the line and column values are restored. @sp 1 It is an error if the context no longer exists because of line deletion. (Contexts follow lines that are moved, or which are deleted and then restored.) @sp 1 The @CO{\'} and @CO{`} commands are both absolute movements. They may be used as a motion component for other @CO{vi} commands. For the @CO{\'} command, any text copied into a buffer is line oriented. For the @CO{`} command, any text copied into a buffer is character oriented, unless it both starts and stops at the first character in the line, in which case it is line oriented. In addition, when using the @CO{`} command as a motion component, commands which move backward and started at the first character in the line, or move forward and ended at the first character in the line, are corrected to the last character of the line preceding the starting and ending lines, respectively. @table @asis @item Line: Set to the line from the context. @item Column: Set to the first nonblank character in the line, for the @CO{\'} command, and set to the context's column for the @CO{`} command. @item Options: None. @end table @end deftypefn @cindex ( @deftypefn Command {} {[count] (} Back up @LI{count}sentences. @sp 1 The @CO{(} command is an absolute movement. The @CO{(} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting and stopping points of the region are the first character in the line, in which case it is line oriented. If it is line oriented, the starting point of the region is adjusted to be the end of the line immediately before the starting cursor position. @table @asis @item Line: Set to the line containing the beginning of the sentence. @item Column: Set to the first nonblank character of the sentence. @item Options: Affected by the @OP{lisp} option. @end table @end deftypefn @cindex ) @deftypefn Command {[count]} {)} Move forward @LI{count}sentences. @sp 1 The @CO{)} command is an absolute movement. The @CO{)} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is the first character in the line, in which case it is line oriented. In the latter case, if the stopping point of the region is also the first character in the line, it is adjusted to be the end of the line immediately before it. @table @asis @item Line: Set to the line containing the beginning of the sentence. @item Column: Set to the first nonblank character of the sentence. @item Options: Affected by the @OP{lisp} option. @end table @end deftypefn @cindex , @deftypefn Command {[count]} {,} Reverse find character @LI{count}times. Reverse the last @CO{F}, @CO{f}, @CO{T} or @CO{t} command, searching the other way in the line, @LI{count}times. It is an error if a @CO{F}, @CO{f}, @CO{T} or @CO{t} command has not been performed yet. @sp 1 The @CO{,} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the searched-for character for the @CO{F} and @CO{f} commands, before the character for the @CO{t} command and after the character for the @CO{T} command. @item Options: None. @end table @end deftypefn @cindex MINUSSIGN @deftypefn Command {[count]} {-} Move to the first nonblank of the previous line, @LI{count}times. @sp 1 It is an error if the movement is past the beginning of the file. @sp 1 The @CO{-} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the current line minus @LI{count}. @item Column: Set to the first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex . @deftypefn Command {[count]} {.} Repeat the last @CO{vi} command that modified text. The repeated command may be a command and motion component combination. If @LI{count}is specified, it replaces @emph{both} the count specified for the repeated command, and, if applicable, for the repeated motion component. If @LI{count}is not specified, the counts originally specified to the command being repeated are used again. @sp 1 As a special case, if the @CO{\.} command is executed immediately after the @CO{u} command, the change log is rolled forward or backward, depending on the action of the @CO{u} command. @table @asis @item Line: Set as described for the repeated command. @item Column: Set as described for the repeated command. @item Options: None. @end table @end deftypefn @cindex /RE/ @deftypefn Command {} {/RE} @deftypefnx Command {} {/RE/} {[offset]} @cindex ?RE? @deftypefnx Command {} {?RE} @deftypefnx Command {} {?RE?} {[offset]} @cindex N @deftypefnx Command {} N @cindex n @deftypefnx Command {} n Search forward or backward for a regular expression. The commands beginning with a slash @PQ{/} character are forward searches, the commands beginning with a question mark @PQ{?} are backward searches. @CO{Vi} prompts with the leading character on the last line of the screen for a string. It then searches forward or backward in the file for the next occurrence of the string, which is interpreted as a Basic Regular Expression. @sp 1 The @CO{/} and @CO{?} commands are absolute movements. They may be used as the motion components of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the search started and ended on the first column of a line, in which case it is line oriented. In addition, forward searches ending at the first character of a line, and backward searches beginning at the first character in the line, are corrected to begin or end at the last character of the previous line. (Note, forward and backward searches can occur for both @CO{/} and @CO{?} commands, if the @OP{wrapscan} option is set.) @sp 1 If an offset from the matched line is specified (i.e. a trailing @QT{/} or @QT{?} character is followed by a signed offset), the buffer will always be line oriented (e.g. @QT{/string/+0} will always guarantee a line orientation). @sp 1 The @CO{N} command repeats the previous search, but in the reverse direction. The @CO{n} command repeats the previous search. If either the @CO{N} or @CO{n} commands are used as motion components for the @CO{!} command, you will not be prompted for the text of the bang command, instead the previous bang command will be executed. @sp 1 Missing RE's (e.g. @QT{//}, @QT{/}, @QT{??}, or @QT{?} search for the last search RE, in the indicated direction. @sp 1 Searches may be interrupted using the @LI{}character. @sp 1 Multiple search patterns may be grouped together by delimiting them with semicolons and zero or more whitespace characters, e.g. @LI{/foo/ ; ?bar?}searches forward for @LI{foo}and then, from that location, backwards for @LI{bar}. When search patterns are grouped together in this manner, the search patterns are evaluated left to right with the final cursor position determined by the last search pattern. @sp 1 It is also permissible to append a @CO{z} command to the search strings, e.g. @LI{/foo/ z.}searches forward for the next occurrence of @LI{foo}, and then positions that line in the middle of screen. @table @asis @item Line: Set to the line in which the match occurred. @item Column: Set to the first character of the matched string. @item Options: Affected by the @OP{edcompatible}, @OP{extended}, @OP{ignorecase}, @OP{magic}, and @OP{wrapscan} options. @end table @end deftypefn @cindex 0 @deftypefn Command {} {0} Move to the first character in the current line. It is not an error to use the @CO{0} command when the cursor is on the first character in the line, @sp 1 The @CO{0} command may be used as the motion component of other @CO{vi} commands, in which case it is an error if the cursor is on the first character in the line, and any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the first character in the line. @item Options: None. @end table @end deftypefn @cindex : @deftypefn Command {} {:} Execute an @CO{ex} command. @CO{Vi} prompts for an @CO{ex} command on the last line of the screen, using a colon @PQ{:} character. The command is terminated by a @LI{}, @LI{}or @LI{}character; all of these characters may be escaped by using a @LI{}character. The command is then executed. @sp 1 If the @CO{ex} command writes to the screen, @CO{vi} will prompt the user for a @LI{}before continuing when the @CO{ex} command finishes. Large amounts of output from the @CO{ex} command will be paged for the user, and the user prompted for a @LI{}or @LI{}key to continue. In some cases, a quit (normally a @QQ{q} character) or @LI{}may be entered to interrupt the @CO{ex} command. @sp 1 When the @CO{ex} command finishes, and the user is prompted to resume visual mode, it is also possible to enter another @QT{:} character followed by another @CO{ex} command. @table @asis @item Line: The current line is set as described for the @CO{ex} command. @item Column: The current column is set as described for the @CO{ex} command. @item Options: Affected as described for the @CO{ex} command. @end table @end deftypefn @cindex ; @deftypefn Command {[count]} {;} Repeat the last character find @LI{count}times. The last character find is one of the @CO{F}, @CO{f}, @CO{T} or @CO{t} commands. It is an error if a @CO{F}, @CO{f}, @CO{T} or @CO{t} command has not been performed yet. @sp 1 The @CO{;} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the searched-for character for the @CO{F} and @CO{f} commands, before the character for the @CO{t} command and after the character for the @CO{T} command. @item Options: None. @end table @end deftypefn @cindex < @deftypefn Command {[count]} {< motion} @cindex > @deftypefnx Command {[count]} {>} {motion} Shift lines left or right. Shift the number of lines in the region specified by the @LI{count}and @LI{motion}left (for the @CO{<} command) or right (for the @CO{>} command) by the number of columns specified by the @OP{shiftwidth} option. Only whitespace characters are deleted when shifting left. Once the first character in the line no longer contains a whitespace character, the command will succeed, but the line will not be modified. @table @asis @item Line: Unchanged. @item Column: Set to the first nonblank character in the line. @item Options: Affected by the @OP{shiftwidth} option. @end table @end deftypefn @cindex @@ @deftypefn Command {} {@@} {buffer} Execute a named buffer. Execute the named buffer as @CO{vi} commands. The buffer may include @CO{ex} commands, too, but they must be expressed as a @CO{:} command. If the buffer is line oriented, @LI{}characters are logically appended to each line of the buffer. If the buffer is character oriented, @LI{}characters are logically appended to all but the last line in the buffer. @sp 1 If the buffer name is @QT{@@}, or @QT{*}, then the last buffer executed shall be used. It is an error to specify @QT{@@@@} or @QT{@@*} if there were no previous buffer executions. The text of a buffer may contain a @CO{@@} command, and it is possible to create infinite loops in this manner. (The @LI{}character may be used to interrupt the loop.) @table @asis @item Line: The current line is set as described for the command(s). @item Column: The current column is set as described for the command(s). @item Options: None. @end table @end deftypefn @cindex A @deftypefn Command {[count]} {A} Enter input mode, appending the text after the end of the line. If @LI{count}is specified, the text is repeatedly input @LI{count - 1}more times after input mode is exited. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex B @deftypefn Command {[count]} {B} Move backward @LI{count}bigwords. Move the cursor backward to the beginning of a bigword by repeating the following algorithm: if the current position is at the beginning of a bigword or the character at the current position cannot be part of a bigword, move to the first character of the preceding bigword. Otherwise, move to the first character of the bigword at the current position. If no preceding bigword exists on the current line, move to the first character of the last bigword on the first preceding line that contains a bigword. @sp 1 The @CO{B} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line containing the word selected. @item Column: Set to the first character of the word selected. @item Options: None. @end table @end deftypefn @cindex C @deftypefn Command {[buffer]} {[count] C} Change text from the current position to the end-of-line. If @LI{count}is specified, the input text replaces from the current position to the end-of-line, plus @LI{count - 1}subsequent lines. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex D @deftypefn Command {[buffer]} {D} Delete text from the current position to the end-of-line. @sp 1 It is not an error to execute the @CO{D} command on an empty line. @table @asis @item Line: Unchanged. @item Column: Set to the character before the current character, or, column 1 if the cursor was on column 1. @item Options: None. @end table @end deftypefn @cindex E @deftypefn Command {[count]} {E} Move forward @LI{count}end-of-bigwords. Move the cursor forward to the end of a bigword by repeating the following algorithm: if the current position is the end of a bigword or the character at that position cannot be part of a bigword, move to the last character of the following bigword. Otherwise, move to the last character of the bigword at the current position. If no succeeding bigword exists on the current line, move to the last character of the first bigword on the next following line that contains a bigword. @sp 1 The @CO{E} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line containing the word selected. @item Column: Set to the last character of the word selected. @item Options: None. @end table @end deftypefn @cindex F @deftypefn Command {[count]} {F} {} Search @LI{count}times backward through the current line for @LI{}. @sp 1 The @CO{F} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the searched-for character. @item Options: None. @end table @end deftypefn @cindex G @deftypefn Command {[count]} {G} Move to line @LI{count}, or the last line of the file if @LI{count}not specified. @sp 1 The @CO{G} command is an absolute movement. The @CO{G} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to @LI{count}, if specified, otherwise, the last line. @item Column: Set to the first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex H @deftypefn Command {[count]} {H} Move to the screen line @LI{count - 1}lines below the top of the screen. @sp 1 The @CO{H} command is an absolute movement. The @CO{H} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the line @LI{count - 1}lines below the top of the screen. @item Column: Set to the first nonblank character of the @emph{screen} line. @item Options: None. @end table @end deftypefn @cindex I @deftypefn Command {[count]} {I} Enter input mode, inserting the text at the beginning of the line. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: None. @end table @end deftypefn @cindex J @deftypefn Command {[count]} {J} Join lines. If @LI{count}is specified, @LI{count}lines are joined; a minimum of two lines are always joined, regardless of the value of @LI{count}. @sp 1 If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis @PQ{(} do nothing. Otherwise, if the current line ends with a question mark @PQ{?}, period @PQ{.} or exclamation point @PQ{!}, insert two spaces. Otherwise, insert a single space. @sp 1 It is not an error to join lines past the end of the file, i.e. lines that do not exist. @table @asis @item Line: Unchanged. @item Column: Set to the character after the last character of the next-to-last joined line. @item Options: None. @end table @end deftypefn @cindex L @deftypefn Command {[count]} {L} Move to the screen line @LI{count - 1}lines above the bottom of the screen. @sp 1 The @CO{L} command is an absolute movement. The @CO{L} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @table @asis @item Line: Set to the line @LI{count - 1}lines above the bottom of the screen. @item Column: Set to the first nonblank character of the @emph{screen} line. @item Options: None. @end table @end deftypefn @cindex M @deftypefn Command {} {M} Move to the screen line in the middle of the screen. @sp 1 The @CO{M} command is an absolute movement. The @CO{M} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @sp 1 Historically, any @LI{count}specified to the @CO{M} command was ignored. @table @asis @item Line: Set to the line in the middle of the screen. @item Column: Set to the first nonblank character of the @emph{screen} line. @item Options: None. @end table @end deftypefn @cindex O @deftypefn Command {[count]} {O} Enter input mode, appending text in a new line above the current line. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @sp 1 Historically, any @LI{count}specified to the @CO{O} command was ignored. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex P @deftypefn Command {[buffer]} {P} Insert text from a buffer. Text from the buffer (the unnamed buffer by default) is inserted before the current column or, if the buffer is line oriented, before the current line. @table @asis @item Line: Set to the lowest numbered line insert, if the buffer is line oriented, otherwise unchanged. @item Column: Set to the first nonblank character of the appended text, if the buffer is line oriented, otherwise, the last character of the appended text. @item Options: None. @end table @end deftypefn @cindex Q @deftypefn Command {} {Q} Exit @CO{vi} (or visual) mode and switch to @CO{ex} mode. @table @asis @item Line: Unchanged. @item Column: No longer relevant. @item Options: None. @end table @end deftypefn @cindex R @deftypefn Command {[count]} {R} Enter input mode, replacing the characters in the current line. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @sp 1 If the end of the current line is reached, no more characters are replaced and any further characters input are appended to the line. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex S @deftypefn Command {[buffer] [count]} {S} Substitute @LI{count}lines. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex T @deftypefn Command {[count]} {T} {} Search backward, @LI{count}times, through the current line for the character @emph{after} the specified @LI{}. @sp 1 The @CO{T} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the character @emph{after} the searched-for character. @item Options: None. @end table @end deftypefn @cindex U @deftypefn Command {} {U} Restore the current line to its state before the cursor last moved to it. @table @asis @item Line: Unchanged. @item Column: The first character in the line. @item Options: None. @end table @end deftypefn @cindex W @deftypefn Command {[count]} {W} Move forward @LI{count}bigwords. Move the cursor forward to the beginning of a bigword by repeating the following algorithm: if the current position is within a bigword or the character at that position cannot be part of a bigword, move to the first character of the next bigword. If no subsequent bigword exists on the current line, move to the first character of the first bigword on the first following line that contains a bigword. @sp 1 The @CO{W} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: The line containing the word selected. @item Column: The first character of the word selected. @item Options: None. @end table @end deftypefn @cindex X @deftypefn Command {[buffer] [count]} {X} Delete @LI{count}characters before the cursor. If the number of characters to be deleted is greater than or equal to the number of characters to the beginning of the line, all of the characters before the current cursor position, to the beginning of the line, are deleted. @table @asis @item Line: Unchanged. @item Column: Set to the current character minus @LI{count}, or the first character if count is greater than the number of characters in the line before the cursor. @item Options: None. @end table @end deftypefn @cindex Y @deftypefn Command {[buffer] [count]} {Y} Copy (or @QQ{yank}) @LI{count}lines into the specified buffer. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: None. @end table @end deftypefn @cindex ZZ @deftypefn Command {} {ZZ} Write the file and exit @CO{vi}. The file is only written if it has been modified since the last complete write of the file to any file. @sp 1 The @CO{ZZ} command will exit the editor after writing the file, if there are no further files to edit. Entering two @QQ{quit} commands (i.e. @CO{wq}, @CO{quit}, @CO{xit} or @CO{ZZ}) in a row will override this check and the editor will exit, ignoring any files that have not yet been edited. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: None. @end table @end deftypefn @cindex [[ @deftypefn Command {[count]} {[[} Back up @LI{count}section boundaries. @sp 1 The @CO{[[} command is an absolute movement. The @CO{[[} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented. @sp 1 It is an error if the movement is past the beginning of the file. @table @asis @item Line: Set to the previous line that is @LI{count}section boundaries back, or the first line of the file if no more section boundaries exist preceding the current line. @item Column: Set to the first nonblank character in the line. @item Options: Affected by the @OP{sections} option. @end table @end deftypefn @cindex ]] @deftypefn Command {[count]} {]]} Move forward @LI{count}section boundaries. @sp 1 The @CO{]]} command is an absolute movement. The @CO{]]} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented. @sp 1 It is an error if the movement is past the end of the file. @table @asis @item Line: Set to the line that is @LI{count}section boundaries forward, or to the last line of the file if no more section boundaries exist following the current line. @item Column: Set to the first nonblank character in the line. @item Options: Affected by the @OP{sections} option. @end table @end deftypefn @cindex ^ @deftypefn Command {} {^} Move to first nonblank character on the current line. @sp 1 The @CO{^} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the first nonblank character of the current line. @item Options: None. @end table @end deftypefn @cindex _ @deftypefn Command {[count]} {_} Move down @LI{count - 1}lines, to the first nonblank character. The @CO{_} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is line oriented. @sp 1 It is not an error to execute the @CO{_} command when the cursor is on the first character in the line. @table @asis @item Line: The current line plus @LI{count - 1}. @item Column: The first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex a @deftypefn Command {[count]} {a} Enter input mode, appending the text after the cursor. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex b @deftypefn Command {[count]} {b} Move backward @LI{count}words. Move the cursor backward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the preceding word. Otherwise, the current position moves to the first character of the word at the current position. If no preceding word exists on the current line, move to the first character of the last word on the first preceding line that contains a word. @sp 1 The @CO{b} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line containing the word selected. @item Column: Set to the first character of the word selected. @item Options: None. @end table @end deftypefn @cindex c @deftypefn Command {[buffer] [count]} {c} {motion} Change the region of text specified by the @LI{count}and @LI{motion}. If only part of a single line is affected, then the last character being changed is marked with a @QT{$}. Otherwise, the region of text is deleted, and input mode is entered. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex d @deftypefn Command {[buffer] [count]} {d} {motion} Delete the region of text specified by the @LI{count}and @LI{motion}. @table @asis @item Line: Set to the line where the region starts. @item Column: Set to the first character in the line after the last character in the region. If no such character exists, set to the last character before the region. @item Options: None. @end table @end deftypefn @cindex e @deftypefn Command {[count]} {e} Move forward @LI{count}end-of-words. Move the cursor forward to the end of a word by repeating the following algorithm: if the current position is the end of a word, move to the last character of the following word. Otherwise, move to the last character of the word at the current position. If no succeeding word exists on the current line, move to the last character of the first word on the next following line that contains a word. @sp 1 The @CO{e} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line containing the word selected. @item Column: Set to the last character of the word selected. @item Options: None. @end table @end deftypefn @cindex f @deftypefn Command {[count]} {f} {} Search forward, @LI{count}times, through the rest of the current line for @LI{}. @sp 1 The @CO{f} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the searched-for character. @item Options: None. @end table @end deftypefn @cindex i @deftypefn Command {[count]} {i} Enter input mode, inserting the text before the cursor. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex m @deftypefn Command {} {m} {} Save the current context (line and column) as @LI{}. The exact position is referred to by @QT{`}. The line is referred to by @QT{'}. @sp 1 Historically, @LI{}was restricted to lower-case letters. @CO{Nvi} permits the use of any character. @table @asis @item Line: Unchanged. @item Column: Unchanged. @item Options: None. @end table @end deftypefn @cindex o @deftypefn Command {[count]} {o} Enter input mode, appending text in a new line under the current line. If @LI{count}is specified, the text input is repeatedly input @LI{count - 1}more times. @sp 1 Historically, any @LI{count}specified to the @CO{o} command was ignored. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex p @deftypefn Command {[buffer]} {p} Append text from a buffer. Text from the buffer (the unnamed buffer by default) is appended after the current column or, if the buffer is line oriented, after the current line. @table @asis @item Line: Set to the first line appended, if the buffer is line oriented, otherwise unchanged. @item Column: Set to the first nonblank character of the appended text if the buffer is line oriented, otherwise, the last character of the appended text. @item Options: None. @end table @end deftypefn @cindex r @deftypefn Command {[count]} {r} {} Replace characters. The next @LI{count}characters in the line are replaced with @LI{}. Replacing characters with @LI{}characters results in creating new, empty lines into the file. @sp 1 If @LI{}is @LI{}, the command is cancelled. @table @asis @item Line: Unchanged unless the replacement character is a @LI{}, in which case it is set to the current line plus @LI{count - 1}. @item Column: Set to the last character replaced, unless the replacement character is a @LI{}, in which case the cursor is in column 1 of the last line inserted. @item Options: None. @end table @end deftypefn @cindex s @deftypefn Command {[buffer] [count]} {s} Substitute @LI{count}characters in the current line starting with the current character. @table @asis @item Line: Set to the last line upon which characters were entered. @item Column: Set to the last character entered. @item Options: Affected by the @OP{altwerase}, @OP{autoindent}, @OP{beautify}, @OP{showmatch}, @OP{ttywerase} and @OP{wrapmargin} options. @end table @end deftypefn @cindex t @deftypefn Command {[count]} {t} {} Search forward, @LI{count}times, through the current line for the character immediately @emph{before} @LI{}. @sp 1 The @CO{t} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Unchanged. @item Column: Set to the character @emph{before} the searched-for character. @item Options: None. @end table @end deftypefn @cindex u @deftypefn Command {} {u} Undo the last change made to the file. If repeated, the @CO{u} command alternates between these two states, and is its own inverse. When used after an insert that inserted text on more than one line, the lines are saved in the numeric buffers. @sp 1 The @CO{.} command, when used immediately after the @CO{u} command, causes the change log to be rolled forward or backward, depending on the action of the @CO{u} command. @table @asis @item Line: Set to the position of the first line changed, if the reversal affects only one line or represents an addition or change; otherwise, the line preceding the deleted text. @item Column: Set to the cursor position before the change was made. @item Options: None. @end table @end deftypefn @cindex w @deftypefn Command {[count]} {w} Move forward @LI{count}words. Move the cursor forward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the next word. If no subsequent word exists on the current line, move to the first character of the first word on the first following line that contains a word. @sp 1 The @CO{w} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. @table @asis @item Line: Set to the line containing the word selected. @item Column: Set to the first character of the word selected. @item Options: None. @end table @end deftypefn @cindex x @deftypefn Command {[buffer] [count]} {x} Delete @LI{count}characters. The deletion is at the current character position. If the number of characters to be deleted is greater than or equal to the number of characters to the end of the line, all of the characters from the current cursor position to the end of the line are deleted. @table @asis @item Line: Unchanged. @item Column: Unchanged unless the last character in the line is deleted and the cursor is not already on the first character in the line, in which case it is set to the previous character. @item Options: None. @end table @end deftypefn @cindex y @deftypefn Command {[buffer] [count]} y {motion} Copy (or @QQ{yank}) the text region specified by the @LI{count}and @LI{motion}, into a buffer. @table @asis @item Line: Unchanged, unless the region covers more than a single line, in which case it is set to the line where the region starts. @item Column: Unchanged, unless the region covers more than a single line, in which case it is set to the character were the region starts. @item Options: None. @end table @end deftypefn @cindex z @deftypefn Command {[count1]} {z} {[count2] type} Redraw the screen with a window @LI{count2}lines long, with line @LI{count1}placed as specified by the @LI{type}character. If @LI{count1}is not specified, it defaults to the current line. If @LI{count2}is not specified, it defaults to the current window size. @sp 1 The following @LI{type}characters may be used: @table @asis @item + If @LI{count1}is specified, place the line @LI{count1}at the top of the screen. Otherwise, display the screen after the current screen, similarly to the @CO{} command. @item Place the line @LI{count1}at the top of the screen. @item . Place the line @LI{count1}in the center of the screen. @item - Place the line @LI{count1}at the bottom of the screen. @item ^ If @LI{count1}is specified, place the line that is at the top of the screen when @LI{count1}is at the bottom of the screen, at the bottom of the screen, i.e. display the screen before the screen before @LI{count1}. Otherwise, display the screen before the current screen, similarly to the @CO{} command. @end table @table @asis @item Line: Set to @LI{count1}unless @LI{count1}is not specified and the @LI{type}character was either @QT{^} or @QT{+}, in which case it is set to the line before the first line on the previous screen or the line after the last line on the previous screen, respectively. @item Column: Set to the first nonblank character in the line. @item Options: None. @end table @end deftypefn @cindex @{ @deftypefn Command {[count]} @{ Move backward @LI{count}paragraphs. @sp 1 The @strong{@{} command is an absolute movement. The @strong{@{} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting character is the first character on its line, in which case it is line oriented. @table @asis @item Line: Set to the line containing the beginning of the previous paragraph. @item Column: Set to the first nonblank character in the line. @item Options: Affected by the @OP{paragraph} option. @end table @end deftypefn @cindex | @deftypefn Command {[count]} {|} Move to a specific @emph{column} position on the current line. @sp 1 The @CO{|} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented. It is an error to use the @CO{|} command as a motion component and for the cursor not to move. @table @asis @item Line: Unchanged. @item Column: Set to the character occupying the column position identified by @LI{count}, if the position exists in the line. If the column length of the current line is less than @LI{count}, the cursor is moved to the last character in the line. @item Options: None. @end table @end deftypefn @cindex @} @deftypefn Command {[count]} @} Move forward @LI{count}paragraphs. @sp 1 The @strong{@}} command is an absolute movement. The @strong{@}} command may be used as the motion component of other @CO{vi} commands, in which case any text copied into a buffer is character oriented, unless the starting character is at or before any nonblank characters in its line, in which case it is line oriented. @table @asis @item Line: Set to the line containing the beginning of the next paragraph. @item Column: Set to the first nonblank character in the line. @item Options: Affected by the @OP{paragraph} option. @end table @end deftypefn @cindex ~ @deftypefn Command {[count]} {~} Reverse the case of the next @LI{count}character(s). This is the historic semantic for the @CO{~} command and it is only in effect if the @OP{tildeop} option is not set. @sp 1 Lowercase alphabetic characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected. @sp 1 Historically, the @CO{~} command did not take an associated count, nor did it move past the end of the current line. As it had no associated motion it was difficult to change the case of large blocks of text. In @CO{nvi}, if the cursor is on the last character of a line, and there are more lines in the file, the cursor moves to the next line. @sp 1 It is not an error to specify a count larger than the number of characters between the cursor and the end of the file. @table @asis @item Line: Set to the line of the character after @LI{count}characters, or, end of file. @item Column: Set to the character after @LI{count}characters, or, end-of-file. @item Options: Affected by the @OP{tildeop} option. @end table @end deftypefn @cindex ~ @deftypefn Command {[count]} {~} {motion} Reverse the case of the characters in a text region specified by the @LI{count}and @LI{motion}. Only in effect if the @OP{tildeop} option is set. @sp 1 Lowercase characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected. @table @asis @item Line: Set to the line of the character after the last character in the region. @item Column: Set to the character after the last character in the region. @item Options: Affected by the @OP{tildeop} option. @end table @end deftypefn @cindex @deftypefn Command {} {} Interrupt the current operation. Many of the potentially long-running @CO{vi} commands may be interrupted using the terminal interrupt character. These operations include searches, file reading and writing, filter operations and map character expansion. Interrupts are also enabled when running commands outside of @CO{vi}. @sp 1 If the @LI{}character is used to interrupt while entering an @CO{ex} command, the command is aborted, the cursor returns to its previous position, and @CO{vi} remains in command mode. @sp 1 Generally, if the @LI{}character is used to interrupt any operation, any changes made before the interrupt are left in place. @table @asis @item Line: Dependent on the operation being interrupted. @item Column: Dependent on the operation being interrupted. @item Options: None. @end table @end deftypefn @chapter Vi Text Input Commands The following section describes the commands available in the text input mode of the @CO{vi} editor. Historically, @CO{vi} implementations only permitted the characters inserted on the current line to be erased. In addition, only the @LI{}erase character and the @QT{0} and @QT{^} erase strings could erase autoindent characters. (Autoindent characters include both the characters inserted automatically at the beginning of an input line as well as characters inserted using the @LI{}command.) This implementation permits erasure to continue past the beginning of the current line, and back to where text input mode was entered. In addition, autoindent characters may be erased using the standard erase characters. For the line and word erase characters, reaching the autoindent characters forms a @QQ{soft} boundary, denoting the end of the current word or line erase. Repeating the word or line erase key will erase the autoindent characters. Historically, @CO{vi} always used @LI{}and @LI{}as character and word erase characters, respectively, regardless of the current terminal settings. This implementation accepts, in addition to these two characters, the current terminal characters for those operations. @cindex @deftypefn Input {} {} If the first character of the input is a @LI{}, the previous input is replayed, as if just entered. @end deftypefn @cindex @deftypefn Input {} {} If the previous character on the line was an autoindent character, erase characters to move the cursor back to the column immediately after the previous (1-based) column which is a multiple of the @OP{shiftwidth} edit option. This may result in any number of @LI{}and @LI{}characters preceding the cursor being changed. @sp 1 Otherwise, if the @OP{autoindent} option is set and the user is entering the first character in the line, @LI{}is ignored. Otherwise, a literal @LI{}character is entered. @end deftypefn @cindex ^ @deftypefn Input {} {^} If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. In addition, the autoindent level is reset to 0. @end deftypefn @cindex 0 @deftypefn Input {} {0} If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. The autoindent level is not altered. @end deftypefn @cindex @deftypefn Input {} {} Insert sufficient @LI{}and @LI{}characters to move the cursor forward to the column immediately after the next (1-based) column which is a multiple of the @OP{shiftwidth} edit option. This may result in any number of @LI{}and @LI{}characters preceding the cursor being changed. @sp 1 Historically, @CO{vi} did not permit the @LI{}command to be used unless the cursor was at the first column of a new line or it was preceded only by autoindent characters. @CO{Nvi} permits it to be used at any time during insert mode. @end deftypefn @cindex @deftypefn Input {} {} @cindex @deftypefnx Input {} {} Erase the last character. @end deftypefn @cindex "" @deftypefn Input {} {} Quote the next character. The next character will not be mapped (see the @CO{map} command for more information) or interpreted specially. A carat @PQ{^} character will be displayed immediately as a placeholder, but will be replaced by the next character. @end deftypefn @cindex @deftypefn Input {} {} If on the colon command line, and the @OP{filec} edit option is set, behave as described for that option. Otherwise, if on the colon command line, execute the command. Otherwise, if not on the colon command line, resolve all text input into the file, and return to command mode. @end deftypefn @cindex "" @deftypefn Input {} {} Erase the current line. @end deftypefn @cindex "" @deftypefn Input {} {} @cindex "" @deftypefnx Input {} {} Erase the last word. The definition of word is dependent on the @OP{altwerase} and @OP{ttywerase} options. @end deftypefn @cindex "" @deftypefn Input {} {[0-9A-Fa-f]+} Insert a character with the specified hexadecimal value into the text. The value is delimited by any non-hexadecimal character or the input of the maximum number of characters that can be translated into a single character value. @end deftypefn @cindex @deftypefn Input {} {} Interrupt text input mode, returning to command mode. If the @LI{}character is used to interrupt inserting text into the file, it is as if the @LI{}character was used; all text input up to the interruption is resolved into the file. @end deftypefn nvi-1.81.6/docs/vi.ref/vi.texi0100644000076400001440000013334210720065506015112 0ustar skimousers\input texinfo @setfilename vi.ref.info @setchapternewpage off @syncodeindex fn cp @comment Copyright (c) 1994 @comment The Regents of the University of California. All rights reserved. @comment Copyright (c) 1994, 1995, 1996 @comment Keith Bostic. All rights reserved. @comment @comment This document may not be republished without written permission from @comment Keith Bostic. @comment @comment See the LICENSE file for redistribution information. @comment @comment $Id: vi.texi,v 8.1 2001/08/18 20:43:50 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:50 $ @comment @comment @include ref.texi @titlepage @center @titlefont{Vi/Ex Reference Manual} @sp 1 @center @emph{Keith Bostic} @sp 1 @center Computer Science Division @center Department of Electrical Engineering and Computer Science @center University of California, Berkeley @center Berkeley, California 94720 @sp 1 @center @emph{Sven Verdoolaege} @sp 1 @center @today @sp 3 @center @emph{Abstract} This document is the reference guide for the 4.4BSD implementations of @EV{nex,nvi}, which are implementations of the historic Berkeley @EV{ex,vi} editors. @vskip 0pt plus 1filll Copyright @copyright{} 1991, 1992, 1993, 1994@* @hskip 2cm The Regents of the University of California. All Rights Reserved.@* Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996@* @hskip 2cm Keith Bostic. All Rights Reserved.@* Copyright @copyright{} 2001@* @hskip 2cm Sven Verdoolaege. All Rights Reserved.@* @page @center@emph{Acknowledgements} @sp 1 Bruce Englar encouraged the early development of the historic @EV{ex,vi} editor. Peter Kessler helped bring sanity to version 2's command layout. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made @EV{ex,vi} work on a large number of terminals and Unix systems. @CO{Nvi} is originally derived from software contributed to the University of California, Berkeley by Steve Kirkendall, the author of the @CO{vi} clone @CO{elvis}. IEEE Standard Portable Operating System Interface for Computer Environments (POSIX) 1003.2 style Regular Expression support was done by Henry Spencer. The curses library was originally done by Ken Arnold. Scrolling and reworking for @CO{nvi} was done by Elan Amir. George Neville-Neil added the Tcl interpreter, and Sven Verdoolaege added the Perl interpreter. Rob Mayoff added Cscope support. The Institute of Electrical and Electronics Engineers has given us permission to reprint portions of their documentation. Portions of this document are reprinted and reproduced from IEEE Std 1003.2-1992, IEEE Standard Portable Operating System Interface for Computer Environments (POSIX), copyright 1992 by the Institute of Electrical and Electronics Engineers, Inc. The financial support of UUNET Communications Services is gratefully acknowledged. @end titlepage @contents @chapter Description @CO{Vi} is a screen oriented text editor. @CO{Ex} is a line-oriented text editor. @CO{Ex} and @CO{vi} are different interfaces to the same program, and it is possible to switch back and forth during an edit session. @CO{View} is the equivalent of using the @strong{-R} (read-only) option of @CO{vi} . This reference manual is the one provided with the @EV{nex,nvi} versions of the @EV{ex,vi} text editors. @EV{Nex,nvi} are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) @EV{ex,vi} programs. This reference manual is accompanied by a traditional-style manual page. That manual page describes the functionality found in @EV{ex,vi} in far less detail than the description here. In addition, it describes the system interface to @EV{ex,vi}, e.g. command line options, session recovery, signals, environmental variables, and similar things. This reference is intended for users already familiar with @EV{ex,vi}. Anyone else should almost certainly read a good tutorial on the editor first. If you are in an unfamiliar environment, and you absolutely have to get work done immediately, see the section entitled @QB{Fast Startup} in the manual page. It is probably enough to get you started. There are a few features in @EV{nex,nvi} that are not found in historic versions of @EV{ex,vi}. Some of the more interesting of those features are briefly described in the next section, entitled @QB{Additional Features} . For the rest of this document, @EV{nex,nvi} is used only when it is necessary to distinguish it from the historic implementations of @EV{ex,vi}. Future versions of this software will be periodically made available by anonymous ftp, and can be retrieved from @LI{ftp.cs.berkeley.edu}, in the directory @LI{ucb/4bsd}. @chapter Additional Features in Nex/Nvi There are a few features in @EV{nex,nvi} that are not found in historic versions of @EV{ex,vi}. Some of the more interesting of these are as follows: @itemize @bullet @IP{8-bit clean data, large lines, files} @EV{Nex,nvi} will edit any format file. Line lengths are limited by available memory, and file sizes are limited by available disk space. The @CO{vi} text input mode command @CO{} can insert any possible character value into the text. @IP{Background and foreground screens} The @CO{bg} command backgrounds the current screen, and the @CO{fg} command foregrounds backgrounded screens. The @CO{display} command can be used to list the background screens. @IP{Command Editing} You can enter a normal editing window on the collected commands that you've entered on the @CO{vi} colon command-line, and then modify and/or execute the commands. See the @OP{cedit} edit option for more information. @IP{Displays} The @CO{display} command can be used to display the current buffers, the backgrounded screens, and the tags stack. @IP{Extended Regular Expressions} The @CO{extended} option causes Regular Expressions to be interpreted as as Extended Regular Expressions, (i.e.@: @command{egrep}(1) style Regular Expressions). @IP{File Name Completion} It is possible to do file name completion and file name displays when entering commands on the @CO{vi} colon command-line. See the @OP{filec} option for more information. @IP{Infinite undo} Changes made during an edit session may be rolled backward and forward. A @CO{.} command immediately after a @CO{u} command continues either forward or backward depending on whether the @CO{u} command was an undo or a redo. @IP{Left-right scrolling} The @CO{leftright} option causes @CO{nvi} to do left-right screen scrolling, instead of the traditional @CO{vi} line wrapping. @IP{Message Catalogs} It is possible to display informational and error messages in different languages by providing a catalog of messages. See the @OP{msgcat} option and the file @LI{catalog/README}for more information. @IP{Incrementing numbers} The @CO{#} command increments or decrements the number referenced by the cursor. @IP{Previous file} The @CO{previous} command edits the previous file from the argument list. @IP{Scripting languages} The @CO{:pe[rl] cmd}, @CO{:perld[o] cmd} and @CO{:tc[l] cmd} commands execute Perl and Tcl/Tk commands, respectively, on lines from the edit buffer. See the @QB{Scripting Languages} section and the specific commands for more information. @comment @IP{Shell screens} @comment The @comment @CO{:sc[ript] [file ...]} @comment command runs a shell in the screen. @comment Editing is unchanged, with the exception that a \fC\fP @comment enters the current line (stripped of any prompt) as input to the @comment shell. @IP{Split screens} The @CO{Edit} , @CO{Ex} , @CO{Next} , @CO{Previous} , @CO{Tag} and @CO{Visual} (in @CO{vi} mode) commands divide the screen into multiple editing regions and then perform their normal function in a new screen area. The @CO{} command rotates between the foreground screens. The @CO{resize} command can be used to grow or shrink a particular screen. @IP{Tag stacks} Tags are now maintained in a stack. The @CO{} command returns to the previous tag location. The @CO{tagpop} command returns to the most recent tag location by default, or, optionally to a specific tag number in the tag stack, or the most recent tag from a specified file. The @CO{display} command can be used to list the tags stack. The @CO{tagtop} command returns to the top of the tag stack. @IP{Usage information} The @CO{exusage} and @CO{viusage} commands provide usage information for all of the @CO{ex} and @CO{vi} commands by default, or, optionally, for a specific command or key. @IP{Word search} The @CO{} command searches for the word referenced by the cursor. @end itemize @chapter Startup Information @EV{Ex,vi} interprets one of two possible environmental variables and reads up to three of five possible files during startup. The variables and files are expected to contain @CO{ex} commands, not @CO{vi} commands. In addition, they are interpreted @emph{before} the file to be edited is read, and therefore many @CO{ex} commands may not be used. Generally, any command that requires output to the screen or that needs a file upon which to operate, will cause an error if included in a startup file or environmental variable. Because the @CO{ex} command set supported by @EV{nex,nvi} is a superset of the command set supported by historical implementations of @CO{ex} , @EV{nex,nvi} can use the startup files created for the historical implementations, but the converse may not be true. If the @strong{-s} (the historic - option) is specified, or if standard input is redirected from a file, all environmental variables and startup files are ignored. Otherwise, startup files and environmental variables are handled in the following order: @enumerate @item The file @LI{/etc/vi.exrc}is read, as long as it is owned by root or the effective user ID of the user. @item The environmental variable @LI{NEXINIT}(or the variable @LI{EXINIT}, if @LI{NEXINIT}is not set) is interpreted. @item If neither @LI{NEXINIT}or @LI{EXINIT}was set, and the @LI{HOME}environmental variable is set, the file @LI{$HOME/.nexrc}(or the file @LI{$HOME/.exrc}, if @LI{$HOME/.nexrc}does not exist) is read, as long as the effective user ID of the user is root or is the same as the owner of the file. @sp 1 When the $HOME directory is being used for both @EV{nex,nvi} and an historic implementation of @EV{ex,vi}, a possible solution is to put @EV{nex,nvi} specific commands in the @LI{.nexrc}file, along with a @CO{:source $HOME/.exrc} command to read in the commands common to both implementations. @item If the @OP{exrc} option was turned on by one of the previous startup information sources, the file @LI{.nexrc}(or the file @LI{.exrc}, if @LI{.nexrc}does not exist) is read, as long as the effective user ID of the user is the same as the owner of the file. @end enumerate No startup file is read if it is writable by anyone other than its owner. It is not an error for any of the startup environmental variables or files not to exist. Once all environmental variables are interpreted, and all startup files are read, the first file to be edited is read in (or a temporary file is created). Then, any commands specified using the @strong{-c} option are executed, in the context of that file. @chapter Recovery There is no recovery program for @EV{nex,nvi}, nor does @EV{nex,nvi} run setuid. Recovery files are created readable and writable by the owner only. Users may recover any file which they can read, and the superuser may recover any edit session. Edit sessions are backed by files in the directory named by the @OP{recdir} option (the directory @LI{/var/tmp/vi.recover}by default), and are named @QC{vi.XXXXXX}, where @QC{XXXXXX} is a number related to the process ID. When a file is first modified, a second recovery file containing an email message for the user is created, and is named @QC{recover.XXXXXX}, where, again, @QC{XXXXXX} is associated with the process ID. Both files are removed at the end of a normal edit session, but will remain if the edit session is abnormally terminated or the user runs the @CO{ex} @CO{preserve} command. The @OP{recdir} option may be set in either the user's or system's startup information, changing the recovery directory. (Note, however, that if a memory based file system is used as the backup directory, each system reboot will delete all of the recovery files! The same caution applies to directories such as @LI{/tmp}which are cleared of their contents by a system reboot, or @LI{/usr/tmp}which is periodically cleared of old files on many systems.) The recovery directory should be owned by root, or at least by a pseudo-user. In addition, if directory @QQ{sticky-bit} semantics are available, the directory should have the sticky-bit set so that files may only be removed by their owners. The recovery directory must be read, write, and executable by any user, i.e.@: mode 1777. If the recovery directory does not exist, @EV{ex,vi} will attempt to create it. This can result in the recovery directory being owned by a normal user, which means that that user will be able to remove other user's recovery and backup files. This is annoying, but is not a security issue as the user cannot otherwise access or modify the files. The recovery file has all of the necessary information in it to enable the user to recover the edit session. In addition, it has all of the necessary email headers for @XR{sendmail,8}. When the system is rebooted, all of the files in @LI{/var/tmp/vi.recover}named @QC{recover.XXXXXX} should be sent to their owners, by email, using the @strong{-t} option of @CO{sendmail} (or a similar mechanism in other mailers). If @EV{ex,vi} receives a hangup (SIGHUP) signal, or the user executes the @CO{ex} @CO{preserve} command, @EV{ex,vi} will automatically email the recovery information to the user. If your system does not have the @CO{sendmail} utility (or a mailer program which supports its interface) the source file @LI{nvi/common/recover.c}will have to be modified to use your local mail delivery programs. Note, if @EV{nex,nvi} is changed to use another mailer, it is important to remember that the owner of the file given to the mailer is the @EV{nex,nvi} user, so nothing in the file should be trusted as it may have been modified in an effort to compromise the system. Finally, the owner execute bit is set on backup files when they are created, and unset when they are first modified, e.g. backup files that have no associated email recovery file will have this bit set. (There is also a small window where empty files can be created and not yet have this bit set. This is due to the method in which the files are created.) Such files should be deleted when the system reboots. A simple way to do this cleanup is to run the Bourne shell script @CO{recover} , from your @LI{/etc/rc.local}(or other system startup) file. The script should work with the historic Bourne shell, a POSIX 1003.2 shell or the Korn shell. The @CO{recover} script is installed as part of the @EV{nex,nvi} installation process. Consult the manual page for details on recovering preserved or aborted editing sessions. @chapter Sizing the Screen The size of the screen can be set in a number of ways. @EV{Ex,vi} takes the following steps until values are obtained for both the number of rows and number of columns in the screen. @enumerate @item If the environmental variable @LI{LINES}exists, it is used to specify the number of rows in the screen. @item If the environmental variable @LI{COLUMNS}exists, it is used to specify the number of columns in the screen. @item The TIOCGWINSZ @XR{ioctl,2} is attempted on the standard error file descriptor. @item The termcap entry (or terminfo entry on System V machines) is checked for the @QQ{li} entry (rows) and the @QQ{co} entry (columns). @item The number of rows is set to 24, and the number of columns is set to 80. @end enumerate If a window change size signal (SIGWINCH) is received, the new window size is retrieved using the TIOCGWINSZ @XR{ioctl,2} call, and all other information is ignored. @chapter Character Display In both @CO{ex} and @CO{vi} printable characters as defined by @XR{isprint,3} are displayed using the local character set. Non-printable characters, for which @XR{iscntrl,3} returns true, and which are less than octal \e040, are displayed as the string @QT{^}, where @LI{}is the character that is the original character's value offset from the @QT{@@} character. For example, the octal character \e001 is displayed as @QT{^A}. If @XR{iscntrl,3} returns true for the octal character \e177, it is displayed as the string @QT{^?}. All other characters are displayed as either hexadecimal values, in the form @QT{0x ... 0x}, or as octal values, in the form @QT{\e ... \e}. The display of unknown characters is based on the value of the @OP{octal} option. In @CO{vi} command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In @CO{vi} text input mode, the cursor is positioned on the first column of characters which take up more than one column on the screen. @chapter Multiple Screens @CO{Nvi} supports multiple screens by dividing the window into regions. It also supports stacks of screens by permitting the user to change the set of screens that are currently displayed. The @CO{Edit} , @CO{Ex} , @CO{Fg} , @CO{Next} , @CO{Previous} , @CO{Tag} and @CO{Visual} (in @CO{vi} mode) commands divide the current screen into two regions of approximately equal size and then perform their usual action in a new screen area. If the cursor is in the lower half of the screen, the screen will split up, i.e.@: the new screen will be above the old one. If the cursor is in the upper half of the screen, the new screen will be below the old one. When more than one screen is editing a file, changes in any screen are reflected in all other screens editing the same file. Exiting a screen without saving any changes (or explicitly discarding them) is permitted until the last screen editing the file is exited, at which time the changes must be saved or discarded. The @CO{resize} command permits resizing of individual screens. Screens may be grown, shrunk or set to an absolute number of rows. The @CO{^W} command is used to switch between screens. Each @CO{^W} moves to the next lower screen in the window, or to the first screen in the window if there are no lower screens. The @CO{bg} command @QQ{backgrounds} the current screen. The screen disappears from the window, and the rows it occupied are taken over by a neighboring screen. It is an error to attempt to background the only screen in the window. The @CO{display screens} command displays the names of the files associated with the current backgrounded screens in the window. The @CO{fg [file]} command moves the specified screen from the list of backgrounded screens to the foreground. If no file argument is specified, the first screen on the list is foregrounded. By default, foregrounding consists of backgrounding the current screen, and replacing its space in the window with the foregrounded screen. Capitalizing the first letter of the command, i.e.@: @CO{Fg} , will foreground the backgrounded screen in a new screen instead of swapping it with the current screen. If the last foregrounded screen in the window is exited, and there are backgrounded screens, the first screen on the list of backgrounded screens takes over the window. @chapter Tags, Tag Stacks, and Cscope @CO{Nvi} supports the historic @CO{vi} tag command @CO{} , and the historic @CO{ex} tag command @CO{tag} . These commands change the current file context to a new location, based on information found in the @LI{tags}files. If you are unfamiliar with these commands, you should review their description in the @CO{ex} and @CO{vi} commands section of this manual. For additional information on tags files, see the discussion of the @OP{tags} edit option and the system @XR{ctags,1} manual page. In addition, @CO{nvi} supports the notion of @QQ{tags stacks}, using the @CO{} command. The @CO{} command returns the user to the previous context, i.e., the last place from which a @CO{} or @CO{tag} command was entered. These three commands provide the basic functionality which allows you to use @CO{vi} to review source code in a structured manner. @CO{Nvi} also provides two other basic @CO{ex} commands for tag support: @CO{tagpop} and @CO{tagtop} . The @CO{tagpop} command is identical to the @CO{} command, with the additional functionality that you may specify that modifications to the current file are to be discarded. This cannot be done using the @CO{} command. The @CO{tagtop} command discards all of the contexts that have been pushed onto the tag stack, returning to the context from which the first @CO{} or @CO{tag} command was entered. The historic @XR{ctags,1} tags file format supports only a single location per tag, normally the function declaration or structure or string definition. More sophisticated source code tools often provide multiple locations per tag, e.g., a list of the places from which a function is called or a string definition is used. An example of this functionality is the System V source code tool, @CO{cscope} . @sp 1 @CO{Cscope} creates a database of information on source code files, and supports a query language for that information as described in the @XR{cscope,1} manual page. @CO{Nvi} contains an interface to the @CO{cscope} query language which permits you to query @CO{cscope} and then sequentially step through the locations in the sources files which @CO{cscope} returns. There are two @CO{nvi} commands which support this ability to step through multiple locations. They are the @CO{ex} commands @CO{tagnext} and @CO{tagprev} . The @CO{tagnext} command moves to the next location for the current tag. The @CO{tagprev} command moves to the previous location for the current tag. (See the @CO{tagnext} and @CO{tagprev} command discussion in the @CO{ex} commands section of this manual for more information.) At any time during this sequential walk, you may use the @CO{} , @CO{tag} or @CO{cscope} commands to move to a new tag context, and then use the @CO{} or @CO{tagpop} commands to return and continue stepping through the locations for this tag. This is similar to the previous model of a simple tag stack, except that each entry in the tag stack may have more than one file context that is of interest. Although there is no widely distributed version of @XR{ctags,1} that creates tags files with multiple locations per tag, @CO{nvi} has been written to understand the obvious extension to the historic tags file format, i.e., more than a single line in the tags file with the same initial tag name. If you wish to extend your @CO{ctags} implementation or other tool with which you build tags files, this extension should be simple and will require no changes to @CO{nvi} . The @CO{nvi} and @CO{cscope} interface is based on the new @CO{ex} command @CO{cscope} , which has five subcommands: @CO{add} , @CO{find} , @CO{help} , @CO{kill} and @CO{reset} . The subcommand @CO{find} itself has eight subcommands: @CO{c} , @CO{d} , @CO{e} , @CO{f} , @CO{g} , @CO{i} , @CO{s} and @CO{t} . @itemize @bullet @IP{cs[cope] a[dd] file} The @CO{add} command attaches to the specified @CO{cscope} database. The file name is expanded using the standard filename expansions. If @CO{file} is a directory, the file @QQ{cscope.out} in that directory is used as the database. After @CO{nvi} attaches to a new database, all subsequent @CO{cscope} queries will be asked of that database. The result of any single query is the collection of response to the query from all of the attached databases. @sp 1 If the @QQ{CSCOPE_DIRS} environmental variable is set when @CO{nvi} is run, it is expected to be a or -separated list of @CO{cscope} databases or directories containing @CO{cscope} databases, to which the user wishes to attach. @IP{:cs[cope] f[ind] c|d|e|f|g|i|s|t buffer|pattern} The @CO{find} command is the @CO{cscope} query command for @CO{nvi} . For this command, @CO{nvi} queries all attached @CO{cscope} databases for the pattern. If the pattern is a double-quote character followed by a valid buffer name (e.g., @LI{}"" ), then the contents of the named buffer are used as the pattern. Otherwise, the pattern is a Regular Expression. @sp 1 The @CO{find} command pushes the current location onto the tags stack, and switches to the first location resulting from the query, if the query returned at least one result. @sp 1 File names returned by the @CO{cscope} query, if not absolute paths, are searched for relative to the directory where the @CO{cscope} database is located. In addition, if the file @QQ{cscope.tpath} appears in the same directory as the @CO{cscope} database, it is expected to contain a colon-separated list of directory names where files referenced by its associated @CO{cscope} database may be found. @sp 1 The @CO{find} subcommand is one of the following: @table @asis @item c Find callers of the name. @item d Find all function calls made from name. @item e Find pattern. @item f Find files with name as substring. @item g Find definition of name. @item i Find files #including name. @item s Find all uses of name. @item t Find assignments to name. @end table @IP{:cs[cope] h[elp] [command]} List the @CO{cscope} commands, or optionally list usage help for any single @CO{cscope} command. @IP{:display c[onnections]} Display the list of @CO{cscope} databases to which @CO{nvi} is currently connected. @IP{:cs[cope] k[ill] #} Disconnect from a specific @CO{cscope} database. The connection number is the one displayed by the @CO{ex} @CO{display connections} command. @IP{:cs[cope] r[eset]} Disconnect from all attached @CO{cscope} databases. @end itemize Cscope is not freely redistributable software, but is fairly inexpensive and easily available. To purchase a copy of @CO{cscope} , see http://www.att.com/ssg/products/toolchest.html. @chapter Regular Expressions and Replacement Strings Regular expressions are used in line addresses, as the first part of the @CO{ex} @CO{substitute} , @CO{global} , and @CO{v} commands, and in search patterns. The regular expressions supported by @EV{ex,vi} are, by default, the Basic Regular Expressions (BRE's) described in the IEEE POSIX Standard 1003.2. The @OP{extended} option causes all regular expressions to be interpreted as the Extended Regular Expressions (ERE's) described by the same standard. (See @XR{re_format,7} for more information.) Generally speaking, BRE's are the Regular Expressions found in @XR{ed,1} and @XR{grep,1}, and ERE's are the Regular Expressions found in @XR{egrep,1}. The following is not intended to provide a description of Regular Expressions. The information here only describes strings and characters which have special meanings in the @EV{ex,vi} version of RE's, or options which change the meanings of characters that normally have special meanings in RE's. @enumerate @item An empty RE (e.g. @QT{//} or @QT{??} is equivalent to the last RE used. @item The construct @QT{\e<} matches the beginning of a word. @item The construct @QT{\e>} matches the end of a word. @item The character @QT{~} matches the replacement part of the last @CO{substitute} command. @end enumerate When the @OP{magic} option is @emph{not} set, the only characters with special meanings are a @QT{^} character at the beginning of an RE, a @QT{$} character at the end of an RE, and the escaping character @QT{\e}. The characters @QT{.}, @QT{*}, @QT{[} and @QT{~} are treated as ordinary characters unless preceded by a @QT{\e}; when preceded by a @QT{\e} they regain their special meaning. Replacement strings are the second part of a @CO{substitute} command. The character @QT{&} (or @QT{\e&} if the @OP{magic} option is @emph{not} set) in the replacement string stands for the text matched by the RE that is being replaced. The character @QT{~} (or @QT{\e~} if the @OP{magic} option is @emph{not} set) stands for the replacement part of the previous @CO{substitute} command. It is only valid after a @CO{substitute} command has been performed. The string @QT{\e#}, where @QT{#} is an integer value from 1 to 9, stands for the text matched by the portion of the RE enclosed in the @QT{#}'th set of escaped parentheses, e.g. @QT{\e(} and @QT{\e)}. For example, @QT{s/abc\e(.*\e)def/\e1/} deletes the strings @QT{abc} and @QT{def} from the matched pattern. The strings @QT{\el}, @QT{\eu}, @QT{\eL} and @QT{\eU} can be used to modify the case of elements in the replacement string. The string @QT{\el} causes the next character to be converted to lowercase; the string @QT{\eu} behaves similarly, but converts to uppercase (e.g. @LI{s/abc/\eU&/}replaces the string @LI{abc}with @LI{ABC}). The string @QT{\eL} causes characters up to the end of the string or the next occurrence of the strings @QT{\ee} or @QT{\eE} to be converted to lowercase; the string @QT{\eU} behaves similarly, but converts to uppercase. If the entire replacement pattern is @QT{%}, then the last replacement pattern is used again. In @CO{vi} , inserting a @LI{}into the replacement string will cause the matched line to be split into two lines at that point. (The @LI{}will be discarded.) @chapter Scripting Languages The @CO{nvi} editor currently supports two scripting languages, Tcl/Tk and Perl. (Note that Perl4 isn't sufficient, and that the Perl5 used must be version 5.002 or later. See the @QB{Building Nvi} section for more information. The scripting language interface is still being worked on, therefore the following information is probably incomplete, probably wrong in cases, and likely to change. See the @LI{perl_api}and @LI{tcl_api}source directories for more information. As a quick reference, the following function calls are provided for both the Perl and Tcl interfaces. The Perl interface uses a slightly different naming convention, e.g. ``viFindScreen'' is named ``VI::FindScreen''. @itemize @bullet @IP{viFindScreen file} Return the @LI{screenId}associated with @LI{file}. @IP{viAppendLine screenId lineNumber text} Append @LI{text}as a new line after line number @LI{lineNumber}, in the screen @LI{screenId}. @IP{viDelLine screenId lineNum} Delete the line @LI{lineNumber}from the screen @LI{screenId}. @IP{viGetLine screenId lineNumber} Return the line @LI{lineNumber}from the screen @LI{screenId}. @IP{viInsertLine screenId lineNumber text} Insert @LI{text}as a new line before line number @LI{lineNumber}in the screen @LI{screenId}. @IP{viLastLine screenId} Return the line number of the last line in the screen @LI{screenId}. @IP{viSetLine screenId lineNumber text} Change the line @LI{lineNumber}in the screen @LI{screenId}to match the specified @LI{text}. @IP{viGetMark screenId mark} Return the current line and column for the specified @LI{mark}from the screen @LI{screenId}. @IP{viSetMark screenId mark line column} Set the specified @LI{mark}to be at line @LI{line}, column @LI{column}, in the screen @LI{screenId}. @IP{viGetCursor screenId} Return the current line and column for the cursor in the screen @LI{screenId}. @IP{viSetCursor screenId line column} Set the cursor in the screen @LI{screenId}to the specified @LI{line}and @LI{column}. @IP{viMsg screenId text} Display the specified @LI{text}as a vi message in the screen @LI{screenId}. @IP{viNewScreen screenId [file]} Create a new screen. @IP{viEndScreen screenId} Exit the screen @LI{screenId}. @IP{viSwitchScreen screenId screenId} Switch from the screen @LI{screenId}to the screen @LI{screenId}. @IP{viMapKey screenId key tclproc} Map the specified @LI{key}in the screen @LI{screenId}to the Tcl procedure @LI{tclproc}. @IP{viUnmMapKey screenId key} Unmap the specified @LI{key}in the screen @LI{screenId}@IP{viGetOpt screenId option} Return the value of the specified @LI{option}from the screen @LI{screenId}. @IP{viSetOpt screenId command} Set one or more options in the screen @LI{screenId}. @end itemize @chapter General Editor Description When @CO{ex} or @CO{vi} are executed, the text of a file is read (or a temporary file is created), and then all editing changes happen within the context of the copy of the file. @emph{No changes affect the actual file until the file is written out}, either using a write command or another command which is affected by the @OP{autowrite} option. All files are locked (using the @XR{flock,2} or @XR{fcntl,2} interfaces) during the edit session, to avoid inadvertently making modifications to multiple copies of the file. If a lock cannot be obtained for a file because it is locked by another process, the edit session is read-only (as if the @OP{readonly} option or the @strong{-R} flag had been specified). If a lock cannot be obtained for other reasons, the edit session will continue, but the file status information (see the @CO{} command) will reflect this fact. Both @CO{ex} and @CO{vi} are modeful editors, i.e.@: they have two modes, @QQ{command} mode and @QQ{text input} mode. The former is intended to permit you to enter commands which modifies already existing text. The latter is intended to permit you to enter new text. When @CO{ex} first starts running, it is in command mode, and usually displays a prompt (see the @OP{prompt} option for more information). The prompt is a single colon @PQ{:} character. There are three commands that switch @CO{ex} into text input mode: @CO{append} , @CO{change} and @CO{insert} . Once in input mode, entering a line containing only a single period @PQ{.} ends text input mode and returns to command mode, where the prompt is redisplayed. When @CO{vi} first starts running, it is in command mode as well. There are eleven commands that switch @CO{vi} into text input mode: @CO{A} , @CO{a} , @CO{C} , @CO{c} , @CO{I} , @CO{i} , @CO{O} , @CO{o} , @CO{R} , @CO{S} and @CO{s} . Once in input mode, entering an @LI{}character ends text input mode and returns to command mode. @EV{Ex,vi} present three different interfaces to editing a file. @CO{Ex} presents a line oriented interface. @CO{Vi} presents a full screen display oriented interface, also known as @QQ{visual mode}. In addition, there is a third mode, @QQ{open mode}, which is line oriented, but supports cursor movement and editing within the displayed line, similarly to visual mode. Open mode is not yet implemented in @CO{nvi} . The following words have special meanings in both the @CO{ex} and @CO{vi} command descriptions: @itemize @bullet @cindex @IP{} The interrupt character is used to interrupt the current operation. Normally @LI{}, whatever character is set for the current terminal is used. @cindex "" @IP{} The literal next character is used to escape the subsequent character from any special meaning. This character is always @LI{}. If the terminal is not set up to do XON/XOFF flow control, then @LI{}is used to mean literal next as well. @cindex "current pathname" @IP{current pathname} The pathname of the file currently being edited by vi. When the percent character @PQ{%} appears in a file name entered as part of an @CO{ex} command argument, it is replaced by the current pathname. (The @QT{%} character can be escaped by preceding it with a backslash.) @cindex "alternate pathname" @IP{alternate pathname} The name of the last file name mentioned in an @CO{ex} command, or, the previous current pathname if the last file mentioned becomes the current file. When the hash mark character @PQ{#} appears in a file name entered as part of an @CO{ex} command argument, it is replaced by the alternate pathname. (The @QT{#} character can be escaped by preceding it with a backslash.) @cindex buffer @IP{buffer} One of a number of named areas for saving copies of text. Commands that change or delete text can save the changed or deleted text into a specific buffer, for later use, if the command allows it (i.e.@: the @CO{ex} @CO{change} command cannot save the changed text in a named buffer). Buffers are named with a single character, preceded by a double quote, e.g. @LI{}"" in @CO{vi} and without the double quote, e.g. @LI{}, in @CO{ex} . (The double quote isn't necessary for @CO{ex} because buffers names are denoted by their position in the command line.) Historic implementations of @EV{ex,vi} limited @LI{}to the alphanumeric characters; @EV{nex,nvi} permits the use of any character without another meaning in the position where a buffer name is expected. @sp 1 Buffers named by uppercase characters are the same as buffers named by lowercase characters, e.g. the buffer named by the English character @QT{A} is the same as the buffer named by the character @QT{a}, with the exception that, if the buffer contents are being changed (as with a text deletion or @CO{vi} @CO{change} command), the text is @emph{appended} to the buffer, instead of replacing the current contents. @sp 1 The buffers named by the numeric characters (in English, @QT{1} through @QT{9}), are special. If a region of text including characters from more than one line, or a single line of text specified by using a line-oriented motion, is changed or deleted in the file using the @CO{vi} @CO{change} or @CO{delete} commands, a copy of the text is placed into the numeric buffer @QT{1}, regardless of the user specifying another buffer in which to save it. In addition, there are a few commands which, when used as a @LI{motion}with the @CO{vi} @CO{change} and @CO{delete} commands, @emph{always} copy the specified region of text into the numeric buffers regardless of the region including characters from more than one line. These commands are: @sp 1 @multitable {@CO{'}} {@CO{AA}} {@CO{AA}} {@CO{AA}} @item @CO{} @tab @CO{%} @tab @CO{(} @tab @CO{)} @item @CO{`} @tab @CO{/} @tab @CO{?} @tab @CO{N} @item @CO{n} @tab @strong{@{} @tab @strong{@}} @end multitable @sp 1 Before this copy is done, the previous contents of buffer @QT{1} are moved into buffer @QT{2}, @QT{2} into buffer @QT{3}, and so on. The contents of buffer @QT{9} are discarded. In @CO{vi} , text may be explicitly stored into the numeric buffers. In this case, the buffer rotation described above occurs before the replacement of the buffer's contents. The numeric buffers are only available in @LI{visual}and @LI{open}modes, and are not accessible by @CO{ex} in any way, although changed and deleted text is still stored there while in @CO{ex} mode. @sp 1 When a @CO{vi} command synopsis shows both a @LI{[buffer]}and a @LI{[count]}, they may be presented in any order. @sp 1 Finally, all buffers are either @QQ{line} or @QQ{character} oriented. All @CO{ex} commands which store text into buffers are line oriented. Some @CO{vi} commands which store text into buffers are line oriented, and some are character oriented; the description for each applicable @CO{vi} command notes whether text copied into buffers using the command is line or character oriented. In addition, the @CO{vi} command @CO{display buffers} displays the current orientation for each buffer. Generally, the only importance attached to this orientation is that if the buffer is subsequently inserted into the text, line oriented buffers create new lines for each of the lines they contain, and character oriented buffers create new lines for any lines @emph{other} than the first and last lines they contain. The first and last lines are inserted into the text at the current cursor position, becoming part of the current line. If there is more than one line in the buffer, however, the current line itself will be split. @cindex "unnamed buffer" @IP{unnamed buffer} The unnamed buffer is a text storage area which is used by commands that use or operate on a buffer when no buffer is specified by the user. If the command stores text into a buffer, the text is stored into the unnamed buffer even if a buffer is also specified by the user. It is not possible to append text to the unnamed buffer. If text is appended to a named buffer, the named buffer contains both the old and new text, while the unnamed buffer contains only the new text. There is no way to explicitly reference the unnamed buffer. @sp 1 Historically, the contents of the unnamed buffer were discarded by many different commands, even ones that didn't store text into it. @EV{Nex,nvi} never discards the contents of the unnamed buffer until new text replaces them. @cindex whitespace @IP{whitespace} The characters and . @cindex "" @IP{} The character represented by an ASCII @LI{}. This character is almost always treated identically to a @LI{}character, but differs in that it can be escaped into the file text or into a command. @cindex @IP{} The character represented by an ASCII @LI{}. This character is almost always treated identically to a @LI{}character, but differs in that it cannot be escaped into the file text or into a command. @end itemize @comment .oh 'Vi/Ex Reference (Vi Commands)''USD:13-%' @comment .eh 'USD:13-%''Vi/Ex Reference (Vi Commands)' @include vi.cmd.texi @comment .oh 'Vi/Ex Reference''USD:13-%' @comment .eh 'USD:13-%''Vi/Ex Reference' @chapter Ex Addressing Addressing in @CO{ex} (and when @CO{ex} commands are executed from @CO{vi} ) relates to the current line. In general, the current line is the last line affected by a command. The exact effect on the current line is discussed under the description of each command. When the file contains no lines, the current line is zero. Addresses are constructed by one or more of the following methods: @enumerate @item The address @QT{.} refers to the current line. @item The address @QT{$} refers to the last line of the file. @item The address @QT{N}, where @LI{N}is a positive number, refers to the N-th line of the file. @item The address @QT{'} or @QT{`} refers to the line marked with the name @LI{}. (See the @CO{k} or @CO{m} commands for more information on how to mark lines.) @item A regular expression (RE) enclosed by slashes @PQ{/} is an address, and it refers to the first line found by searching forward from the line @emph{after} the current line toward the end of the file, and stopping at the first line containing a string matching the RE. (The trailing slash can be omitted at the end of the command line.) @sp 1 If no RE is specified, i.e.@: the pattern is @QT{//}, the last RE used in any command is used in the search. @sp 1 If the @OP{extended} option is set, the RE is handled as an extended RE, not a basic RE. If the @OP{wrapscan} option is set, the search wraps around to the beginning of the file and continues up to and including the current line, so that the entire file is searched. @sp 1 The form @QT{\e/} is accepted for historic reasons, and is identical to @QT{//}. @item An RE enclosed in question marks @PQ{?} addresses the first line found by searching backward from the line @emph{preceding} the current line, toward the beginning of the file and stopping at the first line containing a string matching the RE. (The trailing question mark can be omitted at the end of a command line.) @sp 1 If no RE is specified, i.e.@: the pattern is @QT{??}, the last RE used in any command is used in the search. @sp 1 If the @OP{extended} option is set, the RE is handled as an extended RE, not a basic RE. If the @OP{wrapscan} option is set, the search wraps around from the beginning of the file to the end of the file and continues up to and including the current line, so that the entire file is searched. @sp 1 The form @QT{\e?} is accepted for historic reasons, and is identical to @QT{??}. @item An address followed by a plus sign @PQ{+} or a minus sign @PQ{-} followed by a number is an offset address and refers to the address plus (or minus) the indicated number of lines. If the address is omitted, the addition or subtraction is done with respect to the current line. @item An address of @QT{+} or @QT{-} followed by a number is an offset from the current line. For example, @QT{-5} is the same as @QT{.-5}. @item An address ending with @QT{+} or @QT{-} has 1 added to or subtracted from the address, respectively. As a consequence of this rule and of the previous rule, the address @QT{-} refers to the line preceding the current line. Moreover, trailing @QT{+} and @QT{-} characters have a cumulative effect. For example, @QT{++-++} refers to the current line plus 3. @item A percent sign @PQ{%} is equivalent to the address range @QT{1,$}. @end enumerate @CO{Ex} commands require zero, one, or two addresses. It is an error to specify an address to a command which requires zero addresses. If the user provides more than the expected number of addresses to any @CO{ex} command, the first addresses specified are discarded. For example, @QT{1,2,3,5}print prints lines 3 through 5, because the @CO{print} command only takes two addresses. The addresses in a range are separated from each other by a comma @PQ{,} or a semicolon @PQ{;}. In the latter case, the current line @PQ{.} is set to the first address, and only then is the second address calculated. This feature can be used to determine the starting line for forward and backward searches (see rules (5) and (6) above). The second address of any two-address sequence corresponds to a line that follows, in the file, the line corresponding to the first address. The first address must be less than or equal to the second address. The first address must be greater than or equal to the first line of the file, and the last address must be less than or equal to the last line of the file. @comment .oh 'Vi/Ex Reference (Ex Commands)''USD:13-%' @comment .eh 'USD:13-%''Vi/Ex Reference (Ex Commands)' @include ex.cmd.texi @comment .oh 'Vi/Ex Reference (Options)''USD:13-%' @comment .eh 'USD:13-%''Vi/Ex Reference (Options)' @include set.opt.texi @comment .oh 'Vi/Ex Reference''USD:13-%' @comment .eh 'USD:13-%''Vi/Ex Reference' @page @chapter Index @printindex cp @comment Force the TOC to an odd page, in case it's a duplex printer. @bye nvi-1.81.6/docs/vi.ref/vi.ref.txt0100444000076400001440000057302110720065721015532 0ustar skimousers1 Description ************* *Vi* is a screen oriented text editor. *Ex* is a line-oriented text editor. *Ex* and *vi* are different interfaces to the same program, and it is possible to switch back and forth during an edit session. *View* is the equivalent of using the *-R* (read-only) option of *vi* . This reference manual is the one provided with the *nex*/*nvi* versions of the *ex*/*vi* text editors. *Nex*/*nvi* are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) *ex*/*vi* programs. This reference manual is accompanied by a traditional-style manual page. That manual page describes the functionality found in *ex*/*vi* in far less detail than the description here. In addition, it describes the system interface to *ex*/*vi*, e.g. command line options, session recovery, signals, environmental variables, and similar things. This reference is intended for users already familiar with *ex*/*vi*. Anyone else should almost certainly read a good tutorial on the editor first. If you are in an unfamiliar environment, and you absolutely have to get work done immediately, see the section entitled "*Fast Startup*" in the manual page. It is probably enough to get you started. There are a few features in *nex*/*nvi* that are not found in historic versions of *ex*/*vi*. Some of the more interesting of those features are briefly described in the next section, entitled "*Additional Features*" . For the rest of this document, *nex*/*nvi* is used only when it is necessary to distinguish it from the historic implementations of *ex*/*vi*. Future versions of this software will be periodically made available by anonymous ftp, and can be retrieved from `ftp.cs.berkeley.edu', in the directory `ucb/4bsd'. 2 Additional Features in Nex/Nvi ******************************** There are a few features in *nex*/*nvi* that are not found in historic versions of *ex*/*vi*. Some of the more interesting of these are as follows: * *8-bit clean data, large lines, files* *Nex*/*nvi* will edit any format file. Line lengths are limited by available memory, and file sizes are limited by available disk space. The *vi* text input mode command ** can insert any possible character value into the text. * *Background and foreground screens* The *bg* command backgrounds the current screen, and the *fg* command foregrounds backgrounded screens. The *display* command can be used to list the background screens. * *Command Editing* You can enter a normal editing window on the collected commands that you've entered on the *vi* colon command-line, and then modify and/or execute the commands. See the `cedit' edit option for more information. * *Displays* The *display* command can be used to display the current buffers, the backgrounded screens, and the tags stack. * *Extended Regular Expressions* The *extended* option causes Regular Expressions to be interpreted as as Extended Regular Expressions, (i.e. `egrep'(1) style Regular Expressions). * *File Name Completion* It is possible to do file name completion and file name displays when entering commands on the *vi* colon command-line. See the `filec' option for more information. * *Infinite undo* Changes made during an edit session may be rolled backward and forward. A *.* command immediately after a *u* command continues either forward or backward depending on whether the *u* command was an undo or a redo. * *Left-right scrolling* The *leftright* option causes *nvi* to do left-right screen scrolling, instead of the traditional *vi* line wrapping. * *Message Catalogs* It is possible to display informational and error messages in different languages by providing a catalog of messages. See the `msgcat' option and the file `catalog/README'for more information. * *Incrementing numbers* The *#* command increments or decrements the number referenced by the cursor. * *Previous file* The *previous* command edits the previous file from the argument list. * *Scripting languages* The *:pe[rl] cmd*, *:perld[o] cmd* and *:tc[l] cmd* commands execute Perl and Tcl/Tk commands, respectively, on lines from the edit buffer. See the "*Scripting Languages*" section and the specific commands for more information. * *Split screens* The *Edit* , *Ex* , *Next* , *Previous* , *Tag* and *Visual* (in *vi* mode) commands divide the screen into multiple editing regions and then perform their normal function in a new screen area. The ** command rotates between the foreground screens. The *resize* command can be used to grow or shrink a particular screen. * *Tag stacks* Tags are now maintained in a stack. The ** command returns to the previous tag location. The *tagpop* command returns to the most recent tag location by default, or, optionally to a specific tag number in the tag stack, or the most recent tag from a specified file. The *display* command can be used to list the tags stack. The *tagtop* command returns to the top of the tag stack. * *Usage information* The *exusage* and *viusage* commands provide usage information for all of the *ex* and *vi* commands by default, or, optionally, for a specific command or key. * *Word search* The ** command searches for the word referenced by the cursor. 3 Startup Information ********************* *Ex*/*vi* interprets one of two possible environmental variables and reads up to three of five possible files during startup. The variables and files are expected to contain *ex* commands, not *vi* commands. In addition, they are interpreted _before_ the file to be edited is read, and therefore many *ex* commands may not be used. Generally, any command that requires output to the screen or that needs a file upon which to operate, will cause an error if included in a startup file or environmental variable. Because the *ex* command set supported by *nex*/*nvi* is a superset of the command set supported by historical implementations of *ex* , *nex*/*nvi* can use the startup files created for the historical implementations, but the converse may not be true. If the *-s* (the historic - option) is specified, or if standard input is redirected from a file, all environmental variables and startup files are ignored. Otherwise, startup files and environmental variables are handled in the following order: 1. The file `/etc/vi.exrc'is read, as long as it is owned by root or the effective user ID of the user. 2. The environmental variable `NEXINIT'(or the variable `EXINIT', if `NEXINIT'is not set) is interpreted. 3. If neither `NEXINIT'or `EXINIT'was set, and the `HOME'environmental variable is set, the file `$HOME/.nexrc'(or the file `$HOME/.exrc', if `$HOME/.nexrc'does not exist) is read, as long as the effective user ID of the user is root or is the same as the owner of the file. When the $HOME directory is being used for both *nex*/*nvi* and an historic implementation of *ex*/*vi*, a possible solution is to put *nex*/*nvi* specific commands in the `.nexrc'file, along with a *:source $HOME/.exrc* command to read in the commands common to both implementations. 4. If the `exrc' option was turned on by one of the previous startup information sources, the file `.nexrc'(or the file `.exrc', if `.nexrc'does not exist) is read, as long as the effective user ID of the user is the same as the owner of the file. No startup file is read if it is writable by anyone other than its owner. It is not an error for any of the startup environmental variables or files not to exist. Once all environmental variables are interpreted, and all startup files are read, the first file to be edited is read in (or a temporary file is created). Then, any commands specified using the *-c* option are executed, in the context of that file. 4 Recovery ********** There is no recovery program for *nex*/*nvi*, nor does *nex*/*nvi* run setuid. Recovery files are created readable and writable by the owner only. Users may recover any file which they can read, and the superuser may recover any edit session. Edit sessions are backed by files in the directory named by the `recdir' option (the directory `/var/tmp/vi.recover'by default), and are named "*vi.XXXXXX*", where "*XXXXXX*" is a number related to the process ID. When a file is first modified, a second recovery file containing an email message for the user is created, and is named "*recover.XXXXXX*", where, again, "*XXXXXX*" is associated with the process ID. Both files are removed at the end of a normal edit session, but will remain if the edit session is abnormally terminated or the user runs the *ex* *preserve* command. The `recdir' option may be set in either the user's or system's startup information, changing the recovery directory. (Note, however, that if a memory based file system is used as the backup directory, each system reboot will delete all of the recovery files! The same caution applies to directories such as `/tmp'which are cleared of their contents by a system reboot, or `/usr/tmp'which is periodically cleared of old files on many systems.) The recovery directory should be owned by root, or at least by a pseudo-user. In addition, if directory "sticky-bit" semantics are available, the directory should have the sticky-bit set so that files may only be removed by their owners. The recovery directory must be read, write, and executable by any user, i.e. mode 1777. If the recovery directory does not exist, *ex*/*vi* will attempt to create it. This can result in the recovery directory being owned by a normal user, which means that that user will be able to remove other user's recovery and backup files. This is annoying, but is not a security issue as the user cannot otherwise access or modify the files. The recovery file has all of the necessary information in it to enable the user to recover the edit session. In addition, it has all of the necessary email headers for `sendmail'(8). When the system is rebooted, all of the files in `/var/tmp/vi.recover'named "*recover.XXXXXX*" should be sent to their owners, by email, using the *-t* option of *sendmail* (or a similar mechanism in other mailers). If *ex*/*vi* receives a hangup (SIGHUP) signal, or the user executes the *ex* *preserve* command, *ex*/*vi* will automatically email the recovery information to the user. If your system does not have the *sendmail* utility (or a mailer program which supports its interface) the source file `nvi/common/recover.c'will have to be modified to use your local mail delivery programs. Note, if *nex*/*nvi* is changed to use another mailer, it is important to remember that the owner of the file given to the mailer is the *nex*/*nvi* user, so nothing in the file should be trusted as it may have been modified in an effort to compromise the system. Finally, the owner execute bit is set on backup files when they are created, and unset when they are first modified, e.g. backup files that have no associated email recovery file will have this bit set. (There is also a small window where empty files can be created and not yet have this bit set. This is due to the method in which the files are created.) Such files should be deleted when the system reboots. A simple way to do this cleanup is to run the Bourne shell script *recover* , from your `/etc/rc.local'(or other system startup) file. The script should work with the historic Bourne shell, a POSIX 1003.2 shell or the Korn shell. The *recover* script is installed as part of the *nex*/*nvi* installation process. Consult the manual page for details on recovering preserved or aborted editing sessions. 5 Sizing the Screen ******************* The size of the screen can be set in a number of ways. *Ex*/*vi* takes the following steps until values are obtained for both the number of rows and number of columns in the screen. 1. If the environmental variable `LINES'exists, it is used to specify the number of rows in the screen. 2. If the environmental variable `COLUMNS'exists, it is used to specify the number of columns in the screen. 3. The TIOCGWINSZ `ioctl'(2) is attempted on the standard error file descriptor. 4. The termcap entry (or terminfo entry on System V machines) is checked for the "li" entry (rows) and the "co" entry (columns). 5. The number of rows is set to 24, and the number of columns is set to 80. If a window change size signal (SIGWINCH) is received, the new window size is retrieved using the TIOCGWINSZ `ioctl'(2) call, and all other information is ignored. 6 Character Display ******************* In both *ex* and *vi* printable characters as defined by `isprint'(3) are displayed using the local character set. Non-printable characters, for which `iscntrl'(3) returns true, and which are less than octal \e040, are displayed as the string "`^'", where `'is the character that is the original character's value offset from the "`@'" character. For example, the octal character \e001 is displayed as "`^A'". If `iscntrl'(3) returns true for the octal character \e177, it is displayed as the string "`^?'". All other characters are displayed as either hexadecimal values, in the form "`0x ... 0x'", or as octal values, in the form "`e ... e'". The display of unknown characters is based on the value of the `octal' option. In *vi* command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In *vi* text input mode, the cursor is positioned on the first column of characters which take up more than one column on the screen. 7 Multiple Screens ****************** *Nvi* supports multiple screens by dividing the window into regions. It also supports stacks of screens by permitting the user to change the set of screens that are currently displayed. The *Edit* , *Ex* , *Fg* , *Next* , *Previous* , *Tag* and *Visual* (in *vi* mode) commands divide the current screen into two regions of approximately equal size and then perform their usual action in a new screen area. If the cursor is in the lower half of the screen, the screen will split up, i.e. the new screen will be above the old one. If the cursor is in the upper half of the screen, the new screen will be below the old one. When more than one screen is editing a file, changes in any screen are reflected in all other screens editing the same file. Exiting a screen without saving any changes (or explicitly discarding them) is permitted until the last screen editing the file is exited, at which time the changes must be saved or discarded. The *resize* command permits resizing of individual screens. Screens may be grown, shrunk or set to an absolute number of rows. The *^W* command is used to switch between screens. Each *^W* moves to the next lower screen in the window, or to the first screen in the window if there are no lower screens. The *bg* command "backgrounds" the current screen. The screen disappears from the window, and the rows it occupied are taken over by a neighboring screen. It is an error to attempt to background the only screen in the window. The *display screens* command displays the names of the files associated with the current backgrounded screens in the window. The *fg [file]* command moves the specified screen from the list of backgrounded screens to the foreground. If no file argument is specified, the first screen on the list is foregrounded. By default, foregrounding consists of backgrounding the current screen, and replacing its space in the window with the foregrounded screen. Capitalizing the first letter of the command, i.e. *Fg* , will foreground the backgrounded screen in a new screen instead of swapping it with the current screen. If the last foregrounded screen in the window is exited, and there are backgrounded screens, the first screen on the list of backgrounded screens takes over the window. 8 Tags, Tag Stacks, and Cscope ****************************** *Nvi* supports the historic *vi* tag command ** , and the historic *ex* tag command *tag* . These commands change the current file context to a new location, based on information found in the `tags'files. If you are unfamiliar with these commands, you should review their description in the *ex* and *vi* commands section of this manual. For additional information on tags files, see the discussion of the `tags' edit option and the system `ctags'(1) manual page. In addition, *nvi* supports the notion of "tags stacks", using the ** command. The ** command returns the user to the previous context, i.e., the last place from which a ** or *tag* command was entered. These three commands provide the basic functionality which allows you to use *vi* to review source code in a structured manner. *Nvi* also provides two other basic *ex* commands for tag support: *tagpop* and *tagtop* . The *tagpop* command is identical to the ** command, with the additional functionality that you may specify that modifications to the current file are to be discarded. This cannot be done using the ** command. The *tagtop* command discards all of the contexts that have been pushed onto the tag stack, returning to the context from which the first ** or *tag* command was entered. The historic `ctags'(1) tags file format supports only a single location per tag, normally the function declaration or structure or string definition. More sophisticated source code tools often provide multiple locations per tag, e.g., a list of the places from which a function is called or a string definition is used. An example of this functionality is the System V source code tool, *cscope* . *Cscope* creates a database of information on source code files, and supports a query language for that information as described in the `cscope'(1) manual page. *Nvi* contains an interface to the *cscope* query language which permits you to query *cscope* and then sequentially step through the locations in the sources files which *cscope* returns. There are two *nvi* commands which support this ability to step through multiple locations. They are the *ex* commands *tagnext* and *tagprev* . The *tagnext* command moves to the next location for the current tag. The *tagprev* command moves to the previous location for the current tag. (See the *tagnext* and *tagprev* command discussion in the *ex* commands section of this manual for more information.) At any time during this sequential walk, you may use the ** , *tag* or *cscope* commands to move to a new tag context, and then use the ** or *tagpop* commands to return and continue stepping through the locations for this tag. This is similar to the previous model of a simple tag stack, except that each entry in the tag stack may have more than one file context that is of interest. Although there is no widely distributed version of `ctags'(1) that creates tags files with multiple locations per tag, *nvi* has been written to understand the obvious extension to the historic tags file format, i.e., more than a single line in the tags file with the same initial tag name. If you wish to extend your *ctags* implementation or other tool with which you build tags files, this extension should be simple and will require no changes to *nvi* . The *nvi* and *cscope* interface is based on the new *ex* command *cscope* , which has five subcommands: *add* , *find* , *help* , *kill* and *reset* . The subcommand *find* itself has eight subcommands: *c* , *d* , *e* , *f* , *g* , *i* , *s* and *t* . * *cs[cope] a[dd] file* The *add* command attaches to the specified *cscope* database. The file name is expanded using the standard filename expansions. If *file* is a directory, the file "cscope.out" in that directory is used as the database. After *nvi* attaches to a new database, all subsequent *cscope* queries will be asked of that database. The result of any single query is the collection of response to the query from all of the attached databases. If the "CSCOPE_DIRS" environmental variable is set when *nvi* is run, it is expected to be a or -separated list of *cscope* databases or directories containing *cscope* databases, to which the user wishes to attach. * *:cs[cope] f[ind] c|d|e|f|g|i|s|t buffer|pattern* The *find* command is the *cscope* query command for *nvi* . For this command, *nvi* queries all attached *cscope* databases for the pattern. If the pattern is a double-quote character followed by a valid buffer name (e.g., `'"" ), then the contents of the named buffer are used as the pattern. Otherwise, the pattern is a Regular Expression. The *find* command pushes the current location onto the tags stack, and switches to the first location resulting from the query, if the query returned at least one result. File names returned by the *cscope* query, if not absolute paths, are searched for relative to the directory where the *cscope* database is located. In addition, if the file "cscope.tpath" appears in the same directory as the *cscope* database, it is expected to contain a colon-separated list of directory names where files referenced by its associated *cscope* database may be found. The *find* subcommand is one of the following: c Find callers of the name. d Find all function calls made from name. e Find pattern. f Find files with name as substring. g Find definition of name. i Find files #including name. s Find all uses of name. t Find assignments to name. * *:cs[cope] h[elp] [command]* List the *cscope* commands, or optionally list usage help for any single *cscope* command. * *:display c[onnections]* Display the list of *cscope* databases to which *nvi* is currently connected. * *:cs[cope] k[ill] #* Disconnect from a specific *cscope* database. The connection number is the one displayed by the *ex* *display connections* command. * *:cs[cope] r[eset]* Disconnect from all attached *cscope* databases. Cscope is not freely redistributable software, but is fairly inexpensive and easily available. To purchase a copy of *cscope* , see http://www.att.com/ssg/products/toolchest.html. 9 Regular Expressions and Replacement Strings ********************************************* Regular expressions are used in line addresses, as the first part of the *ex* *substitute* , *global* , and *v* commands, and in search patterns. The regular expressions supported by *ex*/*vi* are, by default, the Basic Regular Expressions (BRE's) described in the IEEE POSIX Standard 1003.2. The `extended' option causes all regular expressions to be interpreted as the Extended Regular Expressions (ERE's) described by the same standard. (See `re_format'(7) for more information.) Generally speaking, BRE's are the Regular Expressions found in `ed'(1) and `grep'(1), and ERE's are the Regular Expressions found in `egrep'(1). The following is not intended to provide a description of Regular Expressions. The information here only describes strings and characters which have special meanings in the *ex*/*vi* version of RE's, or options which change the meanings of characters that normally have special meanings in RE's. 1. An empty RE (e.g. "`//'" or "`??'" is equivalent to the last RE used. 2. The construct "`e<'" matches the beginning of a word. 3. The construct "`e>'" matches the end of a word. 4. The character "`~'" matches the replacement part of the last *substitute* command. When the `magic' option is _not_ set, the only characters with special meanings are a "`^'" character at the beginning of an RE, a "`$'" character at the end of an RE, and the escaping character "`e'". The characters "`.'", "`*'", "`['" and "`~'" are treated as ordinary characters unless preceded by a "`e'"; when preceded by a "`e'" they regain their special meaning. Replacement strings are the second part of a *substitute* command. The character "`&'" (or "`e&'" if the `magic' option is _not_ set) in the replacement string stands for the text matched by the RE that is being replaced. The character "`~'" (or "`e~'" if the `magic' option is _not_ set) stands for the replacement part of the previous *substitute* command. It is only valid after a *substitute* command has been performed. The string "`e#'", where "`#'" is an integer value from 1 to 9, stands for the text matched by the portion of the RE enclosed in the "`#'"'th set of escaped parentheses, e.g. "`e('" and "`e)'". For example, "`s/abce(.*e)def/e1/'" deletes the strings "`abc'" and "`def'" from the matched pattern. The strings "`el'", "`eu'", "`eL'" and "`eU'" can be used to modify the case of elements in the replacement string. The string "`el'" causes the next character to be converted to lowercase; the string "`eu'" behaves similarly, but converts to uppercase (e.g. `s/abc/eU&/'replaces the string `abc'with `ABC'). The string "`eL'" causes characters up to the end of the string or the next occurrence of the strings "`ee'" or "`eE'" to be converted to lowercase; the string "`eU'" behaves similarly, but converts to uppercase. If the entire replacement pattern is "`%'", then the last replacement pattern is used again. In *vi* , inserting a `'into the replacement string will cause the matched line to be split into two lines at that point. (The `'will be discarded.) 10 Scripting Languages ********************** The *nvi* editor currently supports two scripting languages, Tcl/Tk and Perl. (Note that Perl4 isn't sufficient, and that the Perl5 used must be version 5.002 or later. See the "*Building Nvi*" section for more information. The scripting language interface is still being worked on, therefore the following information is probably incomplete, probably wrong in cases, and likely to change. See the `perl_api'and `tcl_api'source directories for more information. As a quick reference, the following function calls are provided for both the Perl and Tcl interfaces. The Perl interface uses a slightly different naming convention, e.g. "viFindScreen" is named "VI::FindScreen". * *viFindScreen file* Return the `screenId'associated with `file'. * *viAppendLine screenId lineNumber text* Append `text'as a new line after line number `lineNumber', in the screen `screenId'. * *viDelLine screenId lineNum* Delete the line `lineNumber'from the screen `screenId'. * *viGetLine screenId lineNumber* Return the line `lineNumber'from the screen `screenId'. * *viInsertLine screenId lineNumber text* Insert `text'as a new line before line number `lineNumber'in the screen `screenId'. * *viLastLine screenId* Return the line number of the last line in the screen `screenId'. * *viSetLine screenId lineNumber text* Change the line `lineNumber'in the screen `screenId'to match the specified `text'. * *viGetMark screenId mark* Return the current line and column for the specified `mark'from the screen `screenId'. * *viSetMark screenId mark line column* Set the specified `mark'to be at line `line', column `column', in the screen `screenId'. * *viGetCursor screenId* Return the current line and column for the cursor in the screen `screenId'. * *viSetCursor screenId line column* Set the cursor in the screen `screenId'to the specified `line'and `column'. * *viMsg screenId text* Display the specified `text'as a vi message in the screen `screenId'. * *viNewScreen screenId [file]* Create a new screen. * *viEndScreen screenId* Exit the screen `screenId'. * *viSwitchScreen screenId screenId* Switch from the screen `screenId'to the screen `screenId'. * *viMapKey screenId key tclproc* Map the specified `key'in the screen `screenId'to the Tcl procedure `tclproc'. * *viUnmMapKey screenId key* Unmap the specified `key'in the screen `screenId' * *viGetOpt screenId option* Return the value of the specified `option'from the screen `screenId'. * *viSetOpt screenId command* Set one or more options in the screen `screenId'. 11 General Editor Description ***************************** When *ex* or *vi* are executed, the text of a file is read (or a temporary file is created), and then all editing changes happen within the context of the copy of the file. _No changes affect the actual file until the file is written out_, either using a write command or another command which is affected by the `autowrite' option. All files are locked (using the `flock'(2) or `fcntl'(2) interfaces) during the edit session, to avoid inadvertently making modifications to multiple copies of the file. If a lock cannot be obtained for a file because it is locked by another process, the edit session is read-only (as if the `readonly' option or the *-R* flag had been specified). If a lock cannot be obtained for other reasons, the edit session will continue, but the file status information (see the ** command) will reflect this fact. Both *ex* and *vi* are modeful editors, i.e. they have two modes, "command" mode and "text input" mode. The former is intended to permit you to enter commands which modifies already existing text. The latter is intended to permit you to enter new text. When *ex* first starts running, it is in command mode, and usually displays a prompt (see the `prompt' option for more information). The prompt is a single colon "`:'" character. There are three commands that switch *ex* into text input mode: *append* , *change* and *insert* . Once in input mode, entering a line containing only a single period "`.'" ends text input mode and returns to command mode, where the prompt is redisplayed. When *vi* first starts running, it is in command mode as well. There are eleven commands that switch *vi* into text input mode: *A* , *a* , *C* , *c* , *I* , *i* , *O* , *o* , *R* , *S* and *s* . Once in input mode, entering an `'character ends text input mode and returns to command mode. *Ex*/*vi* present three different interfaces to editing a file. *Ex* presents a line oriented interface. *Vi* presents a full screen display oriented interface, also known as "visual mode". In addition, there is a third mode, "open mode", which is line oriented, but supports cursor movement and editing within the displayed line, similarly to visual mode. Open mode is not yet implemented in *nvi* . The following words have special meanings in both the *ex* and *vi* command descriptions: * ** The interrupt character is used to interrupt the current operation. Normally `', whatever character is set for the current terminal is used. * ** The literal next character is used to escape the subsequent character from any special meaning. This character is always `'. If the terminal is not set up to do XON/XOFF flow control, then `'is used to mean literal next as well. * *current pathname* The pathname of the file currently being edited by vi. When the percent character "`%'" appears in a file name entered as part of an *ex* command argument, it is replaced by the current pathname. (The "`%'" character can be escaped by preceding it with a backslash.) * *alternate pathname* The name of the last file name mentioned in an *ex* command, or, the previous current pathname if the last file mentioned becomes the current file. When the hash mark character "`#'" appears in a file name entered as part of an *ex* command argument, it is replaced by the alternate pathname. (The "`#'" character can be escaped by preceding it with a backslash.) * *buffer* One of a number of named areas for saving copies of text. Commands that change or delete text can save the changed or deleted text into a specific buffer, for later use, if the command allows it (i.e. the *ex* *change* command cannot save the changed text in a named buffer). Buffers are named with a single character, preceded by a double quote, e.g. `'"" in *vi* and without the double quote, e.g. `', in *ex* . (The double quote isn't necessary for *ex* because buffers names are denoted by their position in the command line.) Historic implementations of *ex*/*vi* limited `'to the alphanumeric characters; *nex*/*nvi* permits the use of any character without another meaning in the position where a buffer name is expected. Buffers named by uppercase characters are the same as buffers named by lowercase characters, e.g. the buffer named by the English character "`A'" is the same as the buffer named by the character "`a'", with the exception that, if the buffer contents are being changed (as with a text deletion or *vi* *change* command), the text is _appended_ to the buffer, instead of replacing the current contents. The buffers named by the numeric characters (in English, "`1'" through "`9'"), are special. If a region of text including characters from more than one line, or a single line of text specified by using a line-oriented motion, is changed or deleted in the file using the *vi* *change* or *delete* commands, a copy of the text is placed into the numeric buffer "`1'", regardless of the user specifying another buffer in which to save it. In addition, there are a few commands which, when used as a `motion'with the *vi* *change* and *delete* commands, _always_ copy the specified region of text into the numeric buffers regardless of the region including characters from more than one line. These commands are: ** *%* *(* *)* *`* */* *?* *N* *n* *{* *}* Before this copy is done, the previous contents of buffer "`1'" are moved into buffer "`2'", "`2'" into buffer "`3'", and so on. The contents of buffer "`9'" are discarded. In *vi* , text may be explicitly stored into the numeric buffers. In this case, the buffer rotation described above occurs before the replacement of the buffer's contents. The numeric buffers are only available in `visual'and `open'modes, and are not accessible by *ex* in any way, although changed and deleted text is still stored there while in *ex* mode. When a *vi* command synopsis shows both a `[buffer]'and a `[count]', they may be presented in any order. Finally, all buffers are either "line" or "character" oriented. All *ex* commands which store text into buffers are line oriented. Some *vi* commands which store text into buffers are line oriented, and some are character oriented; the description for each applicable *vi* command notes whether text copied into buffers using the command is line or character oriented. In addition, the *vi* command *display buffers* displays the current orientation for each buffer. Generally, the only importance attached to this orientation is that if the buffer is subsequently inserted into the text, line oriented buffers create new lines for each of the lines they contain, and character oriented buffers create new lines for any lines _other_ than the first and last lines they contain. The first and last lines are inserted into the text at the current cursor position, becoming part of the current line. If there is more than one line in the buffer, however, the current line itself will be split. * *unnamed buffer* The unnamed buffer is a text storage area which is used by commands that use or operate on a buffer when no buffer is specified by the user. If the command stores text into a buffer, the text is stored into the unnamed buffer even if a buffer is also specified by the user. It is not possible to append text to the unnamed buffer. If text is appended to a named buffer, the named buffer contains both the old and new text, while the unnamed buffer contains only the new text. There is no way to explicitly reference the unnamed buffer. Historically, the contents of the unnamed buffer were discarded by many different commands, even ones that didn't store text into it. *Nex*/*nvi* never discards the contents of the unnamed buffer until new text replaces them. * *whitespace* The characters and . * ** The character represented by an ASCII `'. This character is almost always treated identically to a `'character, but differs in that it can be escaped into the file text or into a command. * ** The character represented by an ASCII `'. This character is almost always treated identically to a `'character, but differs in that it cannot be escaped into the file text or into a command. 12 Vi Description ***************** *Vi* takes up the entire screen to display the edited file, except for the bottom line of the screen. The bottom line of the screen is used to enter *exp* commands, and for *vi* error and informational messages. If no other information is being displayed, the default display can show the current cursor row and cursor column, an indication of whether the file has been modified, and the current mode of the editor. See the `ruler' and `showmode' options for more information. Empty lines do not have any special representation on the screen, but lines on the screen that would logically come after the end of the file are displayed as a single tilde "`~'" character. To differentiate between empty lines and lines consisting of only whitespace characters, use the `list' option. Historically, implementations of *vi* have also displayed some lines as single asterisk "`@'" characters. These were lines that were not correctly displayed, i.e. lines on the screen that did not correspond to lines in the file, or lines that did not fit on the current screen. *Nvi* never displays lines in this fashion. *Vi* is a modeful editor, i.e. it has two modes, "command" mode and "text input" mode. When *vi* first starts, it is in command mode. There are several commands that change *vi* into text input mode. The `'character is used to resolve the text input into the file, and exit back into command mode. In *vi* command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In *vi* text insert mode, the cursor is positioned on the first column of characters which take up more than one column on the screen. When positioning the cursor to a new line and column, the type of movement is defined by the distance to the new cursor position. If the new position is close, the screen is scrolled to the new location. If the new position is far away, the screen is repainted so that the new position is on the screen. If the screen is scrolled, it is moved a minimal amount, and the cursor line will usually appear at the top or bottom of the screen. If the screen is repainted, the cursor line will appear in the center of the screen, unless the cursor is sufficiently close to the beginning or end of the file that this isn't possible. If the `leftright' option is set, the screen may be scrolled or repainted in a horizontal direction as well as in a vertical one. A major difference between the historical *vi* presentation and *nvi* is in the scrolling and screen oriented position commands, **, **, **, **, **, **, *H*, *L* and *M*. In historical implementations of *vi*, these commands acted on physical (as opposed to logical, or screen) lines. For lines that were sufficiently long in relation to the size of the screen, this meant that single line scroll commands might repaint the entire screen, scrolling or screen positioning commands might not change the screen or move the cursor at all, and some lines simply could not be displayed, even though *vi* would edit the file that contained them. In *nvi*, these commands act on logical, i.e. screen lines. You are unlikely to notice any difference unless you are editing files with lines significantly longer than a screen width. *Vi* keeps track of the currently "most attractive" cursor position. Each command description (for commands that alter the current cursor position), specifies if the cursor is set to a specific location in the line, or if it is moved to the "most attractive cursor position". The latter means that the cursor is moved to the cursor position that is horizontally as close as possible to the current cursor position. If the current line is shorter than the cursor position *vi* would select, the cursor is positioned on the last character in the line. (If the line is empty, the cursor is positioned on the first column of the line.) If a command moves the cursor to the most attractive position, it does not alter the current cursor position, and a subsequent movement will again attempt to move the cursor to that position. Therefore, although a movement to a line shorter than the currently most attractive position will cause the cursor to move to the end of that line, a subsequent movement to a longer line will cause the cursor to move back to the most attractive position. In addition, the *$* command makes the end of each line the most attractive cursor position rather than a specific column. Each *vi* command described below notes where the cursor ends up after it is executed. This position is described in terms of characters on the line, i.e. "the previous character", or, "the last character in the line". This is to avoid needing to continually refer to on what part of the character the cursor rests. The following words have special meaning for *vi* commands. * *previous context* The position of the cursor before the command which caused the last absolute movement was executed. Each *vi* command described in the next section that is considered an absolute movement is so noted. In addition, specifying _any_ address to an *ex* command is considered an absolute movement. * *motion* A second *vi* command can be used as an optional trailing argument to the *vi* *<*, *>*, *!*, *c*, *d*, *y*, and (depending on the `tildeop' option) *~* commands. This command indicates the end of the region of text that's affected by the command. The motion command may be either the command character repeated (in which case it means the current line) or a cursor movement command. In the latter case, the region affected by the command is from the starting or stopping cursor position which comes first in the file, to immediately before the starting or stopping cursor position which comes later in the file. Commands that operate on lines instead of using beginning and ending cursor positions operate on all of the lines that are wholly or partially in the region. In addition, some other commands become line oriented depending on where in the text they are used. The command descriptions below note these special cases. The following commands may all be used as motion components for *vi* commands: ** ** ** ** ** ** ** *$* *%* *'* *(* *)* *+* *,* *-* */* *0* *;* *?* *B* *E* *F* *G* *H* *L* *M* *N* *T* *W* *[[* *]]* *^* *_* *`* *b* *e* *f* *h* *j* *k* *l* *n* *t* *w* *{* *|* *}* The optional count prefix available for some of the *vi* commands that take motion commands, or the count prefix available for the *vi* commands that are used as motion components, may be included and is _always_ considered part of the motion argument. For example, the commands "`c2w'" and "`2cw'" are equivalent, and the region affected by the *c* command is two words of text. In addition, if the optional count prefix is specified for both the *vi* command and its motion component, the effect is multiplicative and is considered part of the motion argument. For example, the commands "`4cw'" and "`2c2w'" are equivalent, and the region affected by the *c* command is four words of text. * *count* A positive number used as an optional argument to most commands, either to give a size or a position (for display or movement commands), or as a repeat count (for commands that modify text). The count argument is always optional and defaults to 1 unless otherwise noted in the command description. When a *vi* command synopsis shows both a `[buffer]'and `[count]', they may be presented in any order. * *word* Generally, in languages where it is applicable, *vi* recognizes two kinds of words. First, a sequence of letters, digits and underscores, delimited at both ends by: characters other than letters, digits, or underscores, the beginning or end of a line, and the beginning or end of the file. Second, a sequence of characters other than letters, digits, underscores, or whitespace characters, delimited at both ends by: a letter, digit, underscore, or whitespace character, the beginning or end of a line, and the beginning or end of the file. For example, the characters "`!@#abc$%^ '" contain three words: "`!@#'", "`abc'" and "`$%^'". Groups of empty lines (or lines containing only whitespace characters) are treated as a single word. * *bigword* A set of non-whitespace characters preceded and followed by whitespace characters or the beginning or end of the file or line. For example, the characters "`!@#abc$%^ '" contain one bigword: "`!@#abc$%^'". Groups of empty lines (or lines containing only whitespace characters) are treated as a single bigword. * *paragraph* An area of text that begins with either the beginning of a file, an empty line, or a section boundary, and continues until either an empty line, section boundary, or the end of the file. Groups of empty lines (or lines containing only whitespace characters) are treated as a single paragraph. Additional paragraph boundaries can be defined using the `paragraphs' option. * *section* An area of text that starts with the beginning of the file or a line whose first character is an open brace "`{'" and continues until the next section or the end of the file. Additional section boundaries can be defined using the `sections' option. * *sentence* An area of text that begins with either the beginning of the file or the first nonblank character following the previous sentence, paragraph, or section boundary and continues until the end of the file or a period "`.'" exclamation point "`!'" or question mark "`?'" character, followed by either an end-of-line or two whitespace characters. Any number of closing parentheses "`)'", brackets "`]'", double-quote "`"'" or single quote "`''" characters can appear between the period, exclamation point, or question mark and the whitespace characters or end-of-line. Groups of empty lines (or lines containing only whitespace characters) are treated as a single sentence. 13 Vi Commands ************** The following section describes the commands available in the command mode of the *vi* editor. In each entry below, the tag line is a usage synopsis for the command character. In addition, the final line and column the cursor rests upon, and any options which affect the command are noted. -- Command: [count] Search forward `count'times for the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. The search is literal, i.e. no characters in the word have any special meaning in terms of Regular Expressions. It is an error if no matching pattern is found between the starting position and the end of the file. The ** command is an absolute movement. The ** command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line where the word is found. Column: Set to the first character of the word. Options: Affected by the `ignorecase' and `wrapscan' options. -- Command: [count] Page backward `count'screens. Two lines of overlap are maintained, if possible, by displaying the window starting at line `(top_line - count * window_size) + 2', where `window_size'is the value of the `window' option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the beginning of the file. Line: Set to the last line of text displayed on the screen. Column: Set to the first nonblank character of the line. Options: Affected by the `window' option. -- Command: [count] Scroll forward `count'lines. If `count'is not specified, scroll forward the number of lines specified by the last ** or ** command. If this is the first ** or ** command, scroll forward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the end of the file. Line: Set to the current line plus the number of lines scrolled. Column: Set to the first nonblank character of the line. Options: None. -- Command: [count] Scroll forward `count'lines, leaving the cursor on the current line and column, if possible. It is an error if the movement is past the end of the file. Line: Unchanged unless the current line scrolls off the screen, in which case it is set to the first line on the screen. Column: Unchanged unless the current line scrolls off the screen, in which case it is set to the most attractive cursor position. Options: None. -- Command: [count] Page forward `count'screens. Two lines of overlap are maintained, if possible, by displaying the window starting at line `top_line + count * window_size - 2', where `window_size'is the value of the `window' option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the end of the file. Line: Set to the first line on the screen. Column: Set to the first nonblank character of the current line. Options: Affected by the `window' option. -- Command: Display the file information. The information includes the current pathname, the current line, the number of total lines in the file, the current line as a percentage of the total lines in the file, if the file has been modified, was able to be locked, if the file's name has been changed, and if the edit session is read-only. Line: Unchanged. Column: Unchanged. Options: None. -- Command: [count] -- Command: [count] h Move the cursor back `count'characters in the current line. It is an error if the cursor is on the first character in the line. The ** and *h* commands may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the `current - count'character, or, the first character in the line if `count'is greater than or equal to the number of characters in the line before the cursor. Options: None. -- Command: [count] -- Command: [count] -- Command: [count] j Move the cursor down `count'lines without changing the current column. It is an error if the movement is past the end of the file. The **, ** and *j* commands may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the current line plus `count'. Column: The most attractive cursor position. Options: None. -- Command: -- Command: Repaint the screen. Line: Unchanged. Column: Unchanged. Options: None. -- Command: [count] -- Command: [count] + Move the cursor down `count'lines to the first nonblank character of that line. It is an error if the movement is past the end of the file. The ** and *+* commands may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the current line plus `count'. Column: Set to the first nonblank character in the line. Options: None. -- Command: [count] -- Command: [count] k Move the cursor up `count'lines, without changing the current column. It is an error if the movement is past the beginning of the file. The ** and *k* commands may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the current line minus `count'. Column: The most attractive cursor position. Options: None. -- Command: Return to the most recent tag context. The ** command is an absolute movement. Line: Set to the context of the previous tag command. Column: Set to the context of the previous tag command. Options: None. -- Command: [count] Scroll backward `count'lines. If `count'is not specified, scroll backward the number of lines specified by the last ** or ** command. If this is the first ** or ** command, scroll backward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the beginning of the file. Line: Set to the current line minus the amount scrolled. Column: Set to the first nonblank character in the line. Options: None. -- Command: Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window. Line: Set to the previous cursor position in the window. Column: Set to the previous cursor position in the window. Options: None. -- Command: [count] Scroll backward `count'lines, leaving the current line and column as is, if possible. It is an error if the movement is past the beginning of the file. Line: Unchanged unless the current line scrolls off the screen, in which case it is set to the last line of text displayed on the screen. Column: Unchanged unless the current line scrolls off the screen, in which case it is the most attractive cursor position. Options: None. -- Command: Suspend the current editor session. If the file has been modified since it was last completely written, and the `autowrite' option is set, the file is written before the editor session is suspended. If this write fails, the editor session is not suspended. Line: Unchanged. Column: Unchanged. Options: Affected by the `autowrite' option. -- Command: Execute *ex* commands or cancel partial commands. If an *ex* command is being entered (e.g. */*, *?*, *:* or *!*), the command is executed. If a partial command has been entered, e.g. "`[0-9]*'", or "`[0-9]*[!<>cdy]'", the command is cancelled. Otherwise, it is an error. Line: When an *ex* command is being executed, the current line is set as described for that command. Otherwise, unchanged. Column: When an *ex* command is being executed, the current column is set as described for that command. Otherwise, unchanged. Options: None. -- Command: Push a tag reference onto the tag stack. The tags files (see the `tags' option for more information) are searched for a tag matching the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. If a matching tag is found, the current file is discarded and the file containing the tag reference is edited. If the current file has been modified since it was last completely written, the command will fail. The ** command is an absolute movement. Line: Set to the line containing the matching tag string. Column: Set to the start of the matching tag string. Options: Affected by the `tags' and `taglength' options. -- Command: Switch to the most recently edited file. If the file has been modified since it was last completely written, and the `autowrite' option is set, the file is written out. If this write fails, the command will fail. Otherwise, if the current file has been modified since it was last completely written, the command will fail. Line: Set to the line the cursor was on when the file was last edited. Column: Set to the column the cursor was on when the file was last edited. Options: Affected by the `autowrite' option. -- Command: [count] -- Command: [count] l Move the cursor forward `count'characters without changing the current line. It is an error if the cursor is on the last character in the line. The ** and *l* commands may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. In addition, these commands may be used as the motion components of other commands when the cursor is on the last character in the line, without error. Line: Unchanged. Column: Set to the current character plus the next `count'characters, or to the last character on the line if `count'is greater than the number of characters in the line after the current character. Options: None. -- Command: [count] ! motion shell-argument(s) Replace text with results from a shell command. Pass the lines specified by the `count'and `motion'arguments as standard input to the program named by the `shell' option, and replace those lines with the output (both standard error and standard output) of that command. After the motion is entered, *vi* prompts for arguments to the shell command. Within those arguments, "`%'" and "`#'" characters are expanded to the current and alternate pathnames, respectively. The "`!'" character is expanded with the command text of the previous *!* or *:!* commands. (Therefore, the command *!!* repeats the previous *!* command.) The special meanings of "`%'", "`#'" and "`!'" can be overridden by escaping them with a backslash. If no *!* or *:!* command has yet been executed, it is an error to use an unescaped "`!'" character as a shell argument. The *!* command does _not_ do shell expansion on the strings provided as arguments. If any of the above expansions change the arguments the user entered, the command is redisplayed at the bottom of the screen. *Vi* then executes the program named by the `shell' option, with a *-c* flag followed by the arguments (which are bundled into a single argument). The *!* command is permitted in an empty file. If the file has been modified since it was last completely written, the *!* command will warn you. Line: The first line of the replaced text. Column: The first column of the replaced text. Options: Affected by the `shell' option. -- Command: [count] # #|+|- Increment or decrement the number referenced by the cursor. If the trailing character is a `+'or `#', the number is incremented by `count'. If the trailing character is a `-', the number is decremented by `count'. A leading "`0X'" or "`0x'" causes the number to be interpreted as a hexadecimal number. Otherwise, a leading "`0'" causes the number to be interpreted as an octal number, unless a non-octal digit is found as part of the number. Otherwise, the number is interpreted as a decimal number, and may have a leading `+'or `-'sign. The current number begins at the first non-blank character at or after the current cursor position, and extends up to the end of the line or the first character that isn't a possible character for the numeric type. The format of the number (e.g. leading 0's, signs) is retained unless the new value cannot be represented in the previous format. Octal and hexadecimal numbers, and the result of the operation, must fit into an "`unsigned long'". Similarly, decimal numbers and their result must fit into a "`signed long'". It is an error to use this command when the cursor is not positioned at a number. Line: Unchanged. Column: Set to the first character in the cursor number. Options: None. -- Command: [count] $ Move the cursor to the end of a line. If `count'is specified, the cursor moves down `count - 1'lines. It is not an error to use the *$* command when the cursor is on the last character in the line or when the line is empty. The *$* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the cursor is at, or before the first nonblank character in the line, in which case it is line oriented. It is not an error to use the *$* command as a motion component when the cursor is on the last character in the line, although it is an error when the line is empty. Line: Set to the current line plus `count'minus 1. Column: Set to the last character in the line. Options: None. -- Command: % Move to the matching character. The cursor moves to the parenthesis or curly brace which _matches_ the parenthesis or curly brace found at the current cursor position or which is the closest one to the right of the cursor on the line. It is an error to execute the *%* command on a line without a parenthesis or curly brace. Historically, any `count'specified to the *%* command was ignored. The *%* command is an absolute movement. The *%* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is at or before the first nonblank character on its line, and the ending point is at or after the last nonblank character on its line, in which case it is line oriented. Line: Set to the line containing the matching character. Column: Set to the matching character. Options: None. -- Command: & Repeat the previous substitution command on the current line. Historically, any `count'specified to the *&* command was ignored. Line: Unchanged. Column: Unchanged if the cursor was on the last character in the line, otherwise, set to the first nonblank character in the line. Options: Affected by the `edcompatible', `extended', `ignorecase' and `magic' options. -- Command: ' -- Command: ` Return to a context marked by the character `'. If `'is the "`''" or "``'" character, return to the previous context. If `'is any other character, return to the context marked by that character (see the *m* command for more information). If the command is the *'* command, only the line value is restored, and the cursor is placed on the first nonblank character of that line. If the command is the *`* command, both the line and column values are restored. It is an error if the context no longer exists because of line deletion. (Contexts follow lines that are moved, or which are deleted and then restored.) The *'* and *`* commands are both absolute movements. They may be used as a motion component for other *vi* commands. For the *'* command, any text copied into a buffer is line oriented. For the *`* command, any text copied into a buffer is character oriented, unless it both starts and stops at the first character in the line, in which case it is line oriented. In addition, when using the *`* command as a motion component, commands which move backward and started at the first character in the line, or move forward and ended at the first character in the line, are corrected to the last character of the line preceding the starting and ending lines, respectively. Line: Set to the line from the context. Column: Set to the first nonblank character in the line, for the *'* command, and set to the context's column for the *`* command. Options: None. -- Command: [count] ( Back up `count'sentences. The *(* command is an absolute movement. The *(* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting and stopping points of the region are the first character in the line, in which case it is line oriented. If it is line oriented, the starting point of the region is adjusted to be the end of the line immediately before the starting cursor position. Line: Set to the line containing the beginning of the sentence. Column: Set to the first nonblank character of the sentence. Options: Affected by the `lisp' option. -- Command: [count] ) Move forward `count'sentences. The *)* command is an absolute movement. The *)* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is the first character in the line, in which case it is line oriented. In the latter case, if the stopping point of the region is also the first character in the line, it is adjusted to be the end of the line immediately before it. Line: Set to the line containing the beginning of the sentence. Column: Set to the first nonblank character of the sentence. Options: Affected by the `lisp' option. -- Command: [count] , Reverse find character `count'times. Reverse the last *F*, *f*, *T* or *t* command, searching the other way in the line, `count'times. It is an error if a *F*, *f*, *T* or *t* command has not been performed yet. The *,* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the searched-for character for the *F* and *f* commands, before the character for the *t* command and after the character for the *T* command. Options: None. -- Command: [count] - Move to the first nonblank of the previous line, `count'times. It is an error if the movement is past the beginning of the file. The *-* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the current line minus `count'. Column: Set to the first nonblank character in the line. Options: None. -- Command: [count] . Repeat the last *vi* command that modified text. The repeated command may be a command and motion component combination. If `count'is specified, it replaces _both_ the count specified for the repeated command, and, if applicable, for the repeated motion component. If `count'is not specified, the counts originally specified to the command being repeated are used again. As a special case, if the *.* command is executed immediately after the *u* command, the change log is rolled forward or backward, depending on the action of the *u* command. Line: Set as described for the repeated command. Column: Set as described for the repeated command. Options: None. -- Command: /RE -- Command: /RE/ [ -- Command: ?RE -- Command: ?RE? [ -- Command: N -- Command: n Search forward or backward for a regular expression. The commands beginning with a slash "`/'" character are forward searches, the commands beginning with a question mark "`?'" are backward searches. *Vi* prompts with the leading character on the last line of the screen for a string. It then searches forward or backward in the file for the next occurrence of the string, which is interpreted as a Basic Regular Expression. The */* and *?* commands are absolute movements. They may be used as the motion components of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the search started and ended on the first column of a line, in which case it is line oriented. In addition, forward searches ending at the first character of a line, and backward searches beginning at the first character in the line, are corrected to begin or end at the last character of the previous line. (Note, forward and backward searches can occur for both */* and *?* commands, if the `wrapscan' option is set.) If an offset from the matched line is specified (i.e. a trailing "`/'" or "`?'" character is followed by a signed offset), the buffer will always be line oriented (e.g. "`/string/+0'" will always guarantee a line orientation). The *N* command repeats the previous search, but in the reverse direction. The *n* command repeats the previous search. If either the *N* or *n* commands are used as motion components for the *!* command, you will not be prompted for the text of the bang command, instead the previous bang command will be executed. Missing RE's (e.g. "`//'", "`/'", "`??'", or "`?'" search for the last search RE, in the indicated direction. Searches may be interrupted using the `'character. Multiple search patterns may be grouped together by delimiting them with semicolons and zero or more whitespace characters, e.g. `/foo/ ; ?bar?'searches forward for `foo'and then, from that location, backwards for `bar'. When search patterns are grouped together in this manner, the search patterns are evaluated left to right with the final cursor position determined by the last search pattern. It is also permissible to append a *z* command to the search strings, e.g. `/foo/ z.'searches forward for the next occurrence of `foo', and then positions that line in the middle of screen. Line: Set to the line in which the match occurred. Column: Set to the first character of the matched string. Options: Affected by the `edcompatible', `extended', `ignorecase', `magic', and `wrapscan' options. -- Command: 0 Move to the first character in the current line. It is not an error to use the *0* command when the cursor is on the first character in the line, The *0* command may be used as the motion component of other *vi* commands, in which case it is an error if the cursor is on the first character in the line, and any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the first character in the line. Options: None. -- Command: : Execute an *ex* command. *Vi* prompts for an *ex* command on the last line of the screen, using a colon "`:'" character. The command is terminated by a `', `'or `'character; all of these characters may be escaped by using a `'character. The command is then executed. If the *ex* command writes to the screen, *vi* will prompt the user for a `'before continuing when the *ex* command finishes. Large amounts of output from the *ex* command will be paged for the user, and the user prompted for a `'or `'key to continue. In some cases, a quit (normally a "q" character) or `'may be entered to interrupt the *ex* command. When the *ex* command finishes, and the user is prompted to resume visual mode, it is also possible to enter another "`:'" character followed by another *ex* command. Line: The current line is set as described for the *ex* command. Column: The current column is set as described for the *ex* command. Options: Affected as described for the *ex* command. -- Command: [count] ; Repeat the last character find `count'times. The last character find is one of the *F*, *f*, *T* or *t* commands. It is an error if a *F*, *f*, *T* or *t* command has not been performed yet. The *;* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the searched-for character for the *F* and *f* commands, before the character for the *t* command and after the character for the *T* command. Options: None. -- Command: [count] < motion -- Command: [count] > motion Shift lines left or right. Shift the number of lines in the region specified by the `count'and `motion'left (for the *<* command) or right (for the *>* command) by the number of columns specified by the `shiftwidth' option. Only whitespace characters are deleted when shifting left. Once the first character in the line no longer contains a whitespace character, the command will succeed, but the line will not be modified. Line: Unchanged. Column: Set to the first nonblank character in the line. Options: Affected by the `shiftwidth' option. -- Command: @ buffer Execute a named buffer. Execute the named buffer as *vi* commands. The buffer may include *ex* commands, too, but they must be expressed as a *:* command. If the buffer is line oriented, `'characters are logically appended to each line of the buffer. If the buffer is character oriented, `'characters are logically appended to all but the last line in the buffer. If the buffer name is "`@'", or "`*'", then the last buffer executed shall be used. It is an error to specify "`@@'" or "`@*'" if there were no previous buffer executions. The text of a buffer may contain a *@* command, and it is possible to create infinite loops in this manner. (The `'character may be used to interrupt the loop.) Line: The current line is set as described for the command(s). Column: The current column is set as described for the command(s). Options: None. -- Command: [count] A Enter input mode, appending the text after the end of the line. If `count'is specified, the text is repeatedly input `count - 1'more times after input mode is exited. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [count] B Move backward `count'bigwords. Move the cursor backward to the beginning of a bigword by repeating the following algorithm: if the current position is at the beginning of a bigword or the character at the current position cannot be part of a bigword, move to the first character of the preceding bigword. Otherwise, move to the first character of the bigword at the current position. If no preceding bigword exists on the current line, move to the first character of the last bigword on the first preceding line that contains a bigword. The *B* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line containing the word selected. Column: Set to the first character of the word selected. Options: None. -- Command: [buffer] [count] C Change text from the current position to the end-of-line. If `count'is specified, the input text replaces from the current position to the end-of-line, plus `count - 1'subsequent lines. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [buffer] D Delete text from the current position to the end-of-line. It is not an error to execute the *D* command on an empty line. Line: Unchanged. Column: Set to the character before the current character, or, column 1 if the cursor was on column 1. Options: None. -- Command: [count] E Move forward `count'end-of-bigwords. Move the cursor forward to the end of a bigword by repeating the following algorithm: if the current position is the end of a bigword or the character at that position cannot be part of a bigword, move to the last character of the following bigword. Otherwise, move to the last character of the bigword at the current position. If no succeeding bigword exists on the current line, move to the last character of the first bigword on the next following line that contains a bigword. The *E* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line containing the word selected. Column: Set to the last character of the word selected. Options: None. -- Command: [count] F Search `count'times backward through the current line for `'. The *F* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the searched-for character. Options: None. -- Command: [count] G Move to line `count', or the last line of the file if `count'not specified. The *G* command is an absolute movement. The *G* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to `count', if specified, otherwise, the last line. Column: Set to the first nonblank character in the line. Options: None. -- Command: [count] H Move to the screen line `count - 1'lines below the top of the screen. The *H* command is an absolute movement. The *H* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the line `count - 1'lines below the top of the screen. Column: Set to the first nonblank character of the _screen_ line. Options: None. -- Command: [count] I Enter input mode, inserting the text at the beginning of the line. If `count'is specified, the text input is repeatedly input `count - 1'more times. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: None. -- Command: [count] J Join lines. If `count'is specified, `count'lines are joined; a minimum of two lines are always joined, regardless of the value of `count'. If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis "`('" do nothing. Otherwise, if the current line ends with a question mark "`?'", period "`.'" or exclamation point "`!'", insert two spaces. Otherwise, insert a single space. It is not an error to join lines past the end of the file, i.e. lines that do not exist. Line: Unchanged. Column: Set to the character after the last character of the next-to-last joined line. Options: None. -- Command: [count] L Move to the screen line `count - 1'lines above the bottom of the screen. The *L* command is an absolute movement. The *L* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Line: Set to the line `count - 1'lines above the bottom of the screen. Column: Set to the first nonblank character of the _screen_ line. Options: None. -- Command: M Move to the screen line in the middle of the screen. The *M* command is an absolute movement. The *M* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. Historically, any `count'specified to the *M* command was ignored. Line: Set to the line in the middle of the screen. Column: Set to the first nonblank character of the _screen_ line. Options: None. -- Command: [count] O Enter input mode, appending text in a new line above the current line. If `count'is specified, the text input is repeatedly input `count - 1'more times. Historically, any `count'specified to the *O* command was ignored. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [buffer] P Insert text from a buffer. Text from the buffer (the unnamed buffer by default) is inserted before the current column or, if the buffer is line oriented, before the current line. Line: Set to the lowest numbered line insert, if the buffer is line oriented, otherwise unchanged. Column: Set to the first nonblank character of the appended text, if the buffer is line oriented, otherwise, the last character of the appended text. Options: None. -- Command: Q Exit *vi* (or visual) mode and switch to *ex* mode. Line: Unchanged. Column: No longer relevant. Options: None. -- Command: [count] R Enter input mode, replacing the characters in the current line. If `count'is specified, the text input is repeatedly input `count - 1'more times. If the end of the current line is reached, no more characters are replaced and any further characters input are appended to the line. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [buffer] [count] S Substitute `count'lines. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [count] T Search backward, `count'times, through the current line for the character _after_ the specified `'. The *T* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the character _after_ the searched-for character. Options: None. -- Command: U Restore the current line to its state before the cursor last moved to it. Line: Unchanged. Column: The first character in the line. Options: None. -- Command: [count] W Move forward `count'bigwords. Move the cursor forward to the beginning of a bigword by repeating the following algorithm: if the current position is within a bigword or the character at that position cannot be part of a bigword, move to the first character of the next bigword. If no subsequent bigword exists on the current line, move to the first character of the first bigword on the first following line that contains a bigword. The *W* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: The line containing the word selected. Column: The first character of the word selected. Options: None. -- Command: [buffer] [count] X Delete `count'characters before the cursor. If the number of characters to be deleted is greater than or equal to the number of characters to the beginning of the line, all of the characters before the current cursor position, to the beginning of the line, are deleted. Line: Unchanged. Column: Set to the current character minus `count', or the first character if count is greater than the number of characters in the line before the cursor. Options: None. -- Command: [buffer] [count] Y Copy (or "yank") `count'lines into the specified buffer. Line: Unchanged. Column: Unchanged. Options: None. -- Command: ZZ Write the file and exit *vi*. The file is only written if it has been modified since the last complete write of the file to any file. The *ZZ* command will exit the editor after writing the file, if there are no further files to edit. Entering two "quit" commands (i.e. *wq*, *quit*, *xit* or *ZZ*) in a row will override this check and the editor will exit, ignoring any files that have not yet been edited. Line: Unchanged. Column: Unchanged. Options: None. -- Command: [count] [[ Back up `count'section boundaries. The *[[* command is an absolute movement. The *[[* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented. It is an error if the movement is past the beginning of the file. Line: Set to the previous line that is `count'section boundaries back, or the first line of the file if no more section boundaries exist preceding the current line. Column: Set to the first nonblank character in the line. Options: Affected by the `sections' option. -- Command: [count] ]] Move forward `count'section boundaries. The *]]* command is an absolute movement. The *]]* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented. It is an error if the movement is past the end of the file. Line: Set to the line that is `count'section boundaries forward, or to the last line of the file if no more section boundaries exist following the current line. Column: Set to the first nonblank character in the line. Options: Affected by the `sections' option. -- Command: ^ Move to first nonblank character on the current line. The *^* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the first nonblank character of the current line. Options: None. -- Command: [count] _ Move down `count - 1'lines, to the first nonblank character. The *_* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is line oriented. It is not an error to execute the *_* command when the cursor is on the first character in the line. Line: The current line plus `count - 1'. Column: The first nonblank character in the line. Options: None. -- Command: [count] a Enter input mode, appending the text after the cursor. If `count'is specified, the text input is repeatedly input `count - 1'more times. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [count] b Move backward `count'words. Move the cursor backward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the preceding word. Otherwise, the current position moves to the first character of the word at the current position. If no preceding word exists on the current line, move to the first character of the last word on the first preceding line that contains a word. The *b* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line containing the word selected. Column: Set to the first character of the word selected. Options: None. -- Command: [buffer] [count] c motion Change the region of text specified by the `count'and `motion'. If only part of a single line is affected, then the last character being changed is marked with a "`$'". Otherwise, the region of text is deleted, and input mode is entered. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [buffer] [count] d motion Delete the region of text specified by the `count'and `motion'. Line: Set to the line where the region starts. Column: Set to the first character in the line after the last character in the region. If no such character exists, set to the last character before the region. Options: None. -- Command: [count] e Move forward `count'end-of-words. Move the cursor forward to the end of a word by repeating the following algorithm: if the current position is the end of a word, move to the last character of the following word. Otherwise, move to the last character of the word at the current position. If no succeeding word exists on the current line, move to the last character of the first word on the next following line that contains a word. The *e* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line containing the word selected. Column: Set to the last character of the word selected. Options: None. -- Command: [count] f Search forward, `count'times, through the rest of the current line for `'. The *f* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the searched-for character. Options: None. -- Command: [count] i Enter input mode, inserting the text before the cursor. If `count'is specified, the text input is repeatedly input `count - 1'more times. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: m Save the current context (line and column) as `'. The exact position is referred to by "``'". The line is referred to by "`''". Historically, `'was restricted to lower-case letters. *Nvi* permits the use of any character. Line: Unchanged. Column: Unchanged. Options: None. -- Command: [count] o Enter input mode, appending text in a new line under the current line. If `count'is specified, the text input is repeatedly input `count - 1'more times. Historically, any `count'specified to the *o* command was ignored. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [buffer] p Append text from a buffer. Text from the buffer (the unnamed buffer by default) is appended after the current column or, if the buffer is line oriented, after the current line. Line: Set to the first line appended, if the buffer is line oriented, otherwise unchanged. Column: Set to the first nonblank character of the appended text if the buffer is line oriented, otherwise, the last character of the appended text. Options: None. -- Command: [count] r Replace characters. The next `count'characters in the line are replaced with `'. Replacing characters with `'characters results in creating new, empty lines into the file. If `'is `', the command is cancelled. Line: Unchanged unless the replacement character is a `', in which case it is set to the current line plus `count - 1'. Column: Set to the last character replaced, unless the replacement character is a `', in which case the cursor is in column 1 of the last line inserted. Options: None. -- Command: [buffer] [count] s Substitute `count'characters in the current line starting with the current character. Line: Set to the last line upon which characters were entered. Column: Set to the last character entered. Options: Affected by the `altwerase', `autoindent', `beautify', `showmatch', `ttywerase' and `wrapmargin' options. -- Command: [count] t Search forward, `count'times, through the current line for the character immediately _before_ `'. The *t* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Unchanged. Column: Set to the character _before_ the searched-for character. Options: None. -- Command: u Undo the last change made to the file. If repeated, the *u* command alternates between these two states, and is its own inverse. When used after an insert that inserted text on more than one line, the lines are saved in the numeric buffers. The *.* command, when used immediately after the *u* command, causes the change log to be rolled forward or backward, depending on the action of the *u* command. Line: Set to the position of the first line changed, if the reversal affects only one line or represents an addition or change; otherwise, the line preceding the deleted text. Column: Set to the cursor position before the change was made. Options: None. -- Command: [count] w Move forward `count'words. Move the cursor forward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the next word. If no subsequent word exists on the current line, move to the first character of the first word on the first following line that contains a word. The *w* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. Line: Set to the line containing the word selected. Column: Set to the first character of the word selected. Options: None. -- Command: [buffer] [count] x Delete `count'characters. The deletion is at the current character position. If the number of characters to be deleted is greater than or equal to the number of characters to the end of the line, all of the characters from the current cursor position to the end of the line are deleted. Line: Unchanged. Column: Unchanged unless the last character in the line is deleted and the cursor is not already on the first character in the line, in which case it is set to the previous character. Options: None. -- Command: [buffer] [count] y motion Copy (or "yank") the text region specified by the `count'and `motion', into a buffer. Line: Unchanged, unless the region covers more than a single line, in which case it is set to the line where the region starts. Column: Unchanged, unless the region covers more than a single line, in which case it is set to the character were the region starts. Options: None. -- Command: [count1] z [ Redraw the screen with a window `count2'lines long, with line `count1'placed as specified by the `type'character. If `count1'is not specified, it defaults to the current line. If `count2'is not specified, it defaults to the current window size. The following `type'characters may be used: + If `count1'is specified, place the line `count1'at the top of the screen. Otherwise, display the screen after the current screen, similarly to the ** command. Place the line `count1'at the top of the screen. . Place the line `count1'in the center of the screen. - Place the line `count1'at the bottom of the screen. ^ If `count1'is specified, place the line that is at the top of the screen when `count1'is at the bottom of the screen, at the bottom of the screen, i.e. display the screen before the screen before `count1'. Otherwise, display the screen before the current screen, similarly to the ** command. Line: Set to `count1'unless `count1'is not specified and the `type'character was either "`^'" or "`+'", in which case it is set to the line before the first line on the previous screen or the line after the last line on the previous screen, respectively. Column: Set to the first nonblank character in the line. Options: None. -- Command: [count] { Move backward `count'paragraphs. The *{* command is an absolute movement. The *{* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting character is the first character on its line, in which case it is line oriented. Line: Set to the line containing the beginning of the previous paragraph. Column: Set to the first nonblank character in the line. Options: Affected by the `paragraph' option. -- Command: [count] | Move to a specific _column_ position on the current line. The *|* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented. It is an error to use the *|* command as a motion component and for the cursor not to move. Line: Unchanged. Column: Set to the character occupying the column position identified by `count', if the position exists in the line. If the column length of the current line is less than `count', the cursor is moved to the last character in the line. Options: None. -- Command: [count] } Move forward `count'paragraphs. The *}* command is an absolute movement. The *}* command may be used as the motion component of other *vi* commands, in which case any text copied into a buffer is character oriented, unless the starting character is at or before any nonblank characters in its line, in which case it is line oriented. Line: Set to the line containing the beginning of the next paragraph. Column: Set to the first nonblank character in the line. Options: Affected by the `paragraph' option. -- Command: [count] ~ Reverse the case of the next `count'character(s). This is the historic semantic for the *~* command and it is only in effect if the `tildeop' option is not set. Lowercase alphabetic characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected. Historically, the *~* command did not take an associated count, nor did it move past the end of the current line. As it had no associated motion it was difficult to change the case of large blocks of text. In *nvi*, if the cursor is on the last character of a line, and there are more lines in the file, the cursor moves to the next line. It is not an error to specify a count larger than the number of characters between the cursor and the end of the file. Line: Set to the line of the character after `count'characters, or, end of file. Column: Set to the character after `count'characters, or, end-of-file. Options: Affected by the `tildeop' option. -- Command: [count] ~ motion Reverse the case of the characters in a text region specified by the `count'and `motion'. Only in effect if the `tildeop' option is set. Lowercase characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected. Line: Set to the line of the character after the last character in the region. Column: Set to the character after the last character in the region. Options: Affected by the `tildeop' option. -- Command: Interrupt the current operation. Many of the potentially long-running *vi* commands may be interrupted using the terminal interrupt character. These operations include searches, file reading and writing, filter operations and map character expansion. Interrupts are also enabled when running commands outside of *vi*. If the `'character is used to interrupt while entering an *ex* command, the command is aborted, the cursor returns to its previous position, and *vi* remains in command mode. Generally, if the `'character is used to interrupt any operation, any changes made before the interrupt are left in place. Line: Dependent on the operation being interrupted. Column: Dependent on the operation being interrupted. Options: None. 14 Vi Text Input Commands ************************* The following section describes the commands available in the text input mode of the *vi* editor. Historically, *vi* implementations only permitted the characters inserted on the current line to be erased. In addition, only the `'erase character and the "`0'" and "`^'" erase strings could erase autoindent characters. (Autoindent characters include both the characters inserted automatically at the beginning of an input line as well as characters inserted using the `'command.) This implementation permits erasure to continue past the beginning of the current line, and back to where text input mode was entered. In addition, autoindent characters may be erased using the standard erase characters. For the line and word erase characters, reaching the autoindent characters forms a "soft" boundary, denoting the end of the current word or line erase. Repeating the word or line erase key will erase the autoindent characters. Historically, *vi* always used `'and `'as character and word erase characters, respectively, regardless of the current terminal settings. This implementation accepts, in addition to these two characters, the current terminal characters for those operations. -- Input: If the first character of the input is a `', the previous input is replayed, as if just entered. -- Input: If the previous character on the line was an autoindent character, erase characters to move the cursor back to the column immediately after the previous (1-based) column which is a multiple of the `shiftwidth' edit option. This may result in any number of `'and `'characters preceding the cursor being changed. Otherwise, if the `autoindent' option is set and the user is entering the first character in the line, `'is ignored. Otherwise, a literal `'character is entered. -- Input: ^ If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. In addition, the autoindent level is reset to 0. -- Input: 0 If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. The autoindent level is not altered. -- Input: Insert sufficient `'and `'characters to move the cursor forward to the column immediately after the next (1-based) column which is a multiple of the `shiftwidth' edit option. This may result in any number of `'and `'characters preceding the cursor being changed. Historically, *vi* did not permit the `'command to be used unless the cursor was at the first column of a new line or it was preceded only by autoindent characters. *Nvi* permits it to be used at any time during insert mode. -- Input: -- Input: Erase the last character. -- Input: Quote the next character. The next character will not be mapped (see the *map* command for more information) or interpreted specially. A carat "`^'" character will be displayed immediately as a placeholder, but will be replaced by the next character. -- Input: If on the colon command line, and the `filec' edit option is set, behave as described for that option. Otherwise, if on the colon command line, execute the command. Otherwise, if not on the colon command line, resolve all text input into the file, and return to command mode. -- Input: Erase the current line. -- Input: -- Input: Erase the last word. The definition of word is dependent on the `altwerase' and `ttywerase' options. -- Input: [0-9A-Fa-f]+ Insert a character with the specified hexadecimal value into the text. The value is delimited by any non-hexadecimal character or the input of the maximum number of characters that can be translated into a single character value. -- Input: Interrupt text input mode, returning to command mode. If the `'character is used to interrupt inserting text into the file, it is as if the `'character was used; all text input up to the interruption is resolved into the file. 15 Ex Addressing **************** Addressing in *ex* (and when *ex* commands are executed from *vi* ) relates to the current line. In general, the current line is the last line affected by a command. The exact effect on the current line is discussed under the description of each command. When the file contains no lines, the current line is zero. Addresses are constructed by one or more of the following methods: 1. The address "`.'" refers to the current line. 2. The address "`$'" refers to the last line of the file. 3. The address "`N'", where `N'is a positive number, refers to the N-th line of the file. 4. The address "`''" or "``'" refers to the line marked with the name `'. (See the *k* or *m* commands for more information on how to mark lines.) 5. A regular expression (RE) enclosed by slashes "`/'" is an address, and it refers to the first line found by searching forward from the line _after_ the current line toward the end of the file, and stopping at the first line containing a string matching the RE. (The trailing slash can be omitted at the end of the command line.) If no RE is specified, i.e. the pattern is "`//'", the last RE used in any command is used in the search. If the `extended' option is set, the RE is handled as an extended RE, not a basic RE. If the `wrapscan' option is set, the search wraps around to the beginning of the file and continues up to and including the current line, so that the entire file is searched. The form "`e/'" is accepted for historic reasons, and is identical to "`//'". 6. An RE enclosed in question marks "`?'" addresses the first line found by searching backward from the line _preceding_ the current line, toward the beginning of the file and stopping at the first line containing a string matching the RE. (The trailing question mark can be omitted at the end of a command line.) If no RE is specified, i.e. the pattern is "`??'", the last RE used in any command is used in the search. If the `extended' option is set, the RE is handled as an extended RE, not a basic RE. If the `wrapscan' option is set, the search wraps around from the beginning of the file to the end of the file and continues up to and including the current line, so that the entire file is searched. The form "`e?'" is accepted for historic reasons, and is identical to "`??'". 7. An address followed by a plus sign "`+'" or a minus sign "`-'" followed by a number is an offset address and refers to the address plus (or minus) the indicated number of lines. If the address is omitted, the addition or subtraction is done with respect to the current line. 8. An address of "`+'" or "`-'" followed by a number is an offset from the current line. For example, "`-5'" is the same as "`.-5'". 9. An address ending with "`+'" or "`-'" has 1 added to or subtracted from the address, respectively. As a consequence of this rule and of the previous rule, the address "`-'" refers to the line preceding the current line. Moreover, trailing "`+'" and "`-'" characters have a cumulative effect. For example, "`++-++'" refers to the current line plus 3. 10. A percent sign "`%'" is equivalent to the address range "`1,$'". *Ex* commands require zero, one, or two addresses. It is an error to specify an address to a command which requires zero addresses. If the user provides more than the expected number of addresses to any *ex* command, the first addresses specified are discarded. For example, "`1,2,3,5'"print prints lines 3 through 5, because the *print* command only takes two addresses. The addresses in a range are separated from each other by a comma "`,'" or a semicolon "`;'". In the latter case, the current line "`.'" is set to the first address, and only then is the second address calculated. This feature can be used to determine the starting line for forward and backward searches (see rules (5) and (6) above). The second address of any two-address sequence corresponds to a line that follows, in the file, the line corresponding to the first address. The first address must be less than or equal to the second address. The first address must be greater than or equal to the first line of the file, and the last address must be less than or equal to the last line of the file. 16 Ex Description ***************** The following words have special meanings for *ex* commands. * ** The end-of-file character is used to scroll the screen in the *ex* editor. This character is normally `'. However, whatever character is set for the current terminal is supported as well as `'. * *line* A single-line address, given in any of the forms described in the section entitled "*Ex Addressing*" . The default for `line'is the current line. * *range* A line, or a pair of line addresses, separated by a comma or semicolon. (See the section entitled "*Ex Addressing*" for more information.) The default for range is the current line _only_, i.e. "`.,.'". A percent sign "`%'" stands for the range "`1,$'". The starting address must be less than, or equal to, the ending address. * *count* A positive integer, specifying the number of lines to be affected by the command; the default is 1. Generally, a count past the end-of-file may be specified, e.g. the command "`p 3000'" in a 10 line file is acceptable, and will print from the current line through the last line in the file. * *flags* One or more of the characters "#", "p", and "l". When a command that accepts these flags completes, the addressed line(s) are written out as if by the corresponding *#*, *l* or *p* commands. In addition, any number of "`+'" or "`-'" characters can be specified before, after, or during the flags, in which case the line written is not necessarily the one affected by the command, but rather the line addressed by the offset address specified. The default for `flags'is none. * *file* A pattern used to derive a pathname; the default is the current file. File names are subjected to normal `sh'(1) word expansions. Anywhere a file name is specified, it is also possible to use the special string "`/tmp'". This will be replaced with a temporary file name which can be used for temporary work, e.g. "`:e /tmp'" creates and edits a new file. If both a count and a range are specified for commands that use either, the starting line for the command is the _last_ line addressed by the range, and `count'- 1 subsequent lines are affected by the command, e.g. the command "`2,3p4'" prints out lines 3, 4, 5 and 6. When only a line or range is specified, with no command, the implied command is either a *list*, *number* or *print* command. The command used is the most recent of the three commands to have been used (including any use as a flag). If none of these commands have been used before, the *print* command is the implied command. When no range or count is specified and the command line is a blank line, the current line is incremented by 1 and then the current line is displayed. Zero or more whitespace characters may precede or follow the addresses, count, flags, or command name. Any object following a command name (such as buffer, file, etc.), that begins with an alphabetic character, should be separated from the command name by at least one whitespace character. Any character, including `', "`%'" and "`#'" retain their literal value when preceded by a backslash. 17 Ex Commands ************** The following section describes the commands available in the *ex* editor. In each entry below, the tag line is a usage synopsis for the command. Each command can be entered as the abbreviation (those characters in the synopsis command word preceding the "[" character), the full command (all characters shown for the command word, omitting the "[" and "]" characters), or any leading subset of the full command down to the abbreviation. For example, the args command (shown as "`ar[gs]'" in the synopsis) can be entered as "`ar'", "`arg'" or "`args'". Each *ex* command described below notes the new current line after it is executed, as well as any options that affect the command. -- Command: " A comment. Command lines beginning with the double-quote character "`"'" are ignored. This permits comments in editor scripts and startup files. -- Command: -- Command: Scroll the screen. Write the next N lines, where N is the value of the `scroll' option. The command is the end-of-file terminal character, which may be different on different terminals. Traditionally, it is the `'key. Historically, the *eof* command ignored any preceding count, and the `'character was ignored unless it was entered as the first character of the command. This implementation treats it as a command _only_ if entered as the first character of the command line, and otherwise treats it as any other character. Line: Set to the last line written. Options: Affected by the `scroll' option. -- Command: ! argument(s) -- Command: [range]! argument(s) Execute a shell command, or filter lines through a shell command. In the first synopsis, the remainder of the line after the "`!'" character is passed to the program named by the `shell' option, as a single argument. Within the rest of the line, "`%'" and "`#'" are expanded into the current and alternate pathnames, respectively. The character "`!'" is expanded with the command text of the previous *!* command. (Therefore, the command *!!* repeats the previous *!* command.) The special meanings of "`%'", "`#'", and "`!'" can be overridden by escaping them with a backslash. If no *!* or *:!* command has yet been executed, it is an error to use an unescaped "`!'" character. The *!* command does _not_ do shell expansion on the strings provided as arguments. If any of the above expansions change the command the user entered, the command is redisplayed at the bottom of the screen. *Ex* then executes the program named by the `shell' option, with a *-c* flag followed by the arguments (which are bundled into a single argument). The *!* command is permitted in an empty file. If the file has been modified since it was last completely written, the *!* command will warn you. A single "`!'" character is displayed when the command completes. In the second form of the *!* command, the remainder of the line after the "`!'" is passed to the program named by the `shell' option, as described above. The specified lines are passed to the program as standard input, and the standard and standard error output of the program replace the original lines. Line: Unchanged if no range was specified, otherwise set to the first line of the range. Options: Affected by the `shell' and `warn' options. -- Command: [range] # [ -- Command: [range] nu[mber] [ Display the selected lines, each preceded with its line number. The line number format is "%6d", followed by two spaces. Line: Set to the last line displayed. Options: Affected by the `list' option. -- Command: @ buffer -- Command: * buffer Execute a buffer. Each line in the named buffer is executed as an *ex* command. If no buffer is specified, or if the specified buffer is "`@'" or "`*'", the last buffer executed is used. -- Command: [range] <[< ...] [ Shift lines left or right. The specified lines are shifted to the left (for the *<* command) or right (for the *>* command), by the number of columns specified by the `shiftwidth' option. Only leading whitespace characters are deleted when shifting left; once the first column of the line contains a nonblank character, the *shift* command will succeed, but the line will not be modified. If the command character *<* or *>* is repeated more than once, the command is repeated once for each additional command character. Line: If the current line is set to one of the lines that are affected by the command, it is unchanged. Otherwise, it is set to the first nonblank character of the lowest numbered line shifted. Options: Affected by the `shiftwidth' option. -- Command: [line] = [ Display the line number of `line'(which defaults to the last line in the file). Line: Unchanged. Options: None. -- Command: [range] >[> ...] [ Shift right. The specified lines are shifted to the right by the number of columns specified by the `shiftwidth' option, by inserting tab and space characters. Empty lines are not changed. If the command character "`>'" is repeated more than once, the command is repeated once for each additional command character. Line: Set to the last line modified by the command. Options: Affected by the `shiftwidth' option. -- Command: ab[brev] lhs rhs Add an abbreviation to the current abbreviation list. When inserting text in *vi*, each time a non-word character is entered after a word character, a set of characters ending at the word character are checked for a match with `lhs'. If a match is found, they are replaced with `rhs'. The set of characters that are checked for a match are defined as follows, for inexplicable historical reasons. If only one or two characters were entered before the non-word character that triggered the check, and after the beginning of the insertion, or the beginning of the line or the file, or the last `'character that was entered, then the one or the both characters are checked for a match. Otherwise, the set includes both characters, as well as the characters that precede them that are the same word class (i.e. word or non-word) as the *second* to last character entered before the non-word character that triggered the check, back to the first `'character, the beginning of the insertion, or the beginning of the line or the file. For example, the abbreviations: :abbreviate abc ABC :abbreviate #i #include :abbreviate /*#i /*#include will all work, while the abbreviations: :abbreviate a#i A#include :abbreviate /* /******************** will not work, and are not permitted by *nvi*. To keep the abbreviation expansion from happening, the character immediately following the `lhs'characters should be quoted with a `'character. The replacement `rhs'is itself subject to both further abbreviation expansion and further map expansion. Line: Unchanged. Options: None. -- Command: [line] a[ppend][!] The input text is appended to the specified line. If line 0 is specified, the text is inserted at the beginning of the file. Set to the last line input. If no lines are input, then set to `line', or to the first line of the file if a `line'of 0 was specified. Following the command name with a "`!'" character causes the `autoindent' option to be toggled for the duration of the command. Line: Unchanged. Options: Affected by the `autoindent' and `number' options. -- Command: ar[gs] Display the argument list. The current argument is displayed inside of "`['" and "`]'" characters. The argument list is the list of operands specified on startup, which can be replaced using the *next* command. Line: Unchanged. Options: None. -- Command: bg *Vi* mode only. Background the current screen. The screen is unchanged, but is no longer accessible and disappears from the display. Use the *fg* command to bring the screen back to the display foreground. Line: Set to the current line when the screen was last edited. Options: None. -- Command: [range] c[hange][!] [ Replace the lines with input text. Following the command name with a "`!'" character causes the `autoindent' option to be toggled for the duration of the command. Line: Set to the last line input, or, if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line. Options: Affected by the `autoindent' and `number' options. -- Command: chd[ir][!] [ -- Command: cd[!] [ Change the current working directory. The `directory'argument is subjected to `sh'(1) word expansions. When invoked with no directory argument and the `HOME'environment variable is set, the directory named by the `HOME'environment variable becomes the new current directory. Otherwise, the new current directory becomes the directory returned by the `getpwent'(3) routine. The *chdir* command will fail if the file has been modified since the last complete write of the file. You can override this check by appending a "`!'" character to the command. Line: Unchanged. Options: Affected by the `cdpath' option. -- Command: [range] co[py] line [flags] -- Command: [range] t line [flags] Copy the specified lines (range) after the destination line. Line 0 may be specified to insert the lines at the beginning of the file. Line: Unchanged. Options: None. -- Command: cs[cope] command [args] Execute a *cscope* command. For more information, see the section of the reference manual entitled "*Tags, Tag Stacks, and Cscope*" . -- Command: [range] d[elete] [ Delete the lines from the file. The deleted text is saved in the specified buffer, or, if no buffer is specified, in the unnamed buffer. If the command name is followed by a letter that could be interpreted as either a buffer name or a flag value (because neither a `count'or `flags'values were given), *ex* treats the letter as a `flags'value if the letter immediately follows the command name, without any whitespace separation. If the letter is preceded by whitespace characters, it treats it as a buffer name. Line: Set to the line following the deleted lines, or to the last line if the deleted lines were at the end. Options: None. -- Command: di[splay] b[uffers] | c[onnections] | s[creens] | t[ags] Display buffers, *cscope* connections, screens or tags. The *display* command takes one of three additional arguments, which are as follows: b[uffers] Display all buffers (including named, unnamed, and numeric) that contain text. c[onnections] Display the source directories for all attached *cscope* databases. s[creens] Display the file names of all background screens. t[ags] Display the tags stack. Line: Unchanged. Options: None. -- Command: e[dit][!] [ -- Command: ex[!] [ -- Command: vs[plit][!] [ Edit a different file. If the current buffer has been modified since the last complete write, the command will fail. You can override this by appending a "`!'" character to the command name. If the "`+cmd'" option is specified, that *ex* command will be executed in the new file. Any *ex* command may be used, although the most common use of this feature is to specify a line number or search pattern to set the initial location in the new file. Capitalizing the first letter of the command, i.e., *Edit* or *Ex*, while in *vi* mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. *vsplit* is similar, but the screen will be split vertically to produce the new screen, rather than horizontally. Line: If you have previously edited the file, the current line will be set to your last position in the file. If that position does not exist, or you have not previously edited the file, the current line will be set to the first line of the file if you are in *vi* mode, and the last line of the file if you are in *ex*. Options: None. -- Command: exu[sage] [ Display usage for an *ex* command. If `command'is specified, a usage statement for that command is displayed. Otherwise, usage statements for all *ex* commands are displayed. Line: Unchanged. Options: None. -- Command: f[ile] [ Display and optionally change the file name. If a file name is specified, the current pathname is changed to the specified name. The current pathname, the number of lines, and the current position in the file are displayed. Line: Unchanged. Options: None. -- Command: fg [ *Vi* mode only. Foreground the specified screen. If the argument name doesn't exactly match the name of a file displayed by a background screen, it is compared against the last component of each of the file names. If no background screen is specified, the first background screen is foregrounded. By default, foregrounding causes the current screen to be swapped with the backgrounded screen. Capitalizing the first letter of the command, i.e. *Fg*, will foreground the backgrounded screen in a new screen instead of swapping it with the current screen. Line: Set to the current line when the screen was last edited. Options: None. -- Command: [range] g[lobal] /pattern/ [commands] -- Command: [range] v /pattern/ [commands] Apply commands to lines matching (or not matching) a pattern. The lines within the given range that match "`g[lobal]'", or do not match "`v'" the given pattern are selected. Then, the specified *ex* command(s) are executed with the current line "`.'" set to each selected line. If no range is specified, the entire file is searched for matching, or not matching, lines. Multiple commands can be specified, one per line, by escaping each `'character with a backslash, or by separating commands with a "`|'" character. If no commands are specified, the command defaults to the *print* command. For the *append*, *change* and *insert* commands, the input text must be part of the global command line. In this case, the terminating period can be omitted if it ends the commands. The *visual* command may also be specified as one of the *ex* commands. In this mode, input is taken from the terminal. Entering a *Q* command in *vi* mode causes the next line matching the pattern to be selected and *vi* to be reentered, until the list is exhausted. The *global*, *v* and *undo* commands cannot be used as part of these commands. The editor options `autoindent', `autoprint' and `report' are turned off for the duration of the *global* and *v* commands. Line: The last line modified. Options: Affected by the `ignorecase' and `magic' options. Turns off the `autoindent', `autoprint' and `report' options. -- Command: he[lp] Display a help message. Line: Unchanged. Options: None. -- Command: [line] i[nsert][!] The input text is inserted before the specified line. Following the command name with a "`!'" character causes the `autoindent' option setting to be toggled for the duration of this command. Line: Set to the last line input; if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line. Affected by the `autoindent' and `number' options. -- Command: [range] j[oin][!] [ Join lines of text together. A `count'specified to the *join* command specifies that the last line of the `range'plus `count'subsequent lines will be joined. (Note, this differs by one from the general rule where only `count'- 1 subsequent lines are affected.) If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis "`('", do nothing. Otherwise, if the current line ends with a question mark "`?'", period "`.'" or exclamation point "`!'", insert two spaces. Otherwise, insert a single space. Appending a "`!'" character to the command name causes a simpler join with no white-space processing. Line: Unchanged. Options: None. -- Command: [range] l[ist] [ Display the lines unambiguously. Tabs are displayed as "`^I'", and the end of the line is marked with a "`$'" character. Line: Set to the last line displayed. Options: Affected by the `number' option. -- Command: map[!] [ Define or display maps (for *vi* only). If "`lhs'" and "`rhs'" are not specified, the current set of command mode maps are displayed. If a "`!'" character is appended to to the command, the text input mode maps are displayed. Otherwise, when the "`lhs'" character sequence is entered in *vi*, the action is as if the corresponding "`rhs'" had been entered. If a "`!'" character is appended to the command name, the mapping is effective during text input mode, otherwise, it is effective during command mode. This allows "`lhs'" to have two different macro definitions at the same time: one for command mode and one for input mode. Whitespace characters require escaping with a `'character to be entered in the `lhs'string in visual mode. Normally, keys in the `rhs'string are remapped (see the `remap' option), and it is possible to create infinite loops. However, keys which map to themselves are not further remapped, regardless of the setting of the `remap' option. For example, the command "`:map n nz.'" maps the "`n'" key to the *n* and *z* commands. To exit an infinitely looping map, use the terminal `'character. Line: Unchanged. Options: Affected by the `remap' option. -- Command: [line] ma[rk] -- Command: [line] k Mark the line with the mark `'. The expressions "`''" and "``'" can then be used as an address in any command that uses one. Line: Unchanged. Options: None. -- Command: [range] m[ove] line Move the specified lines after the target line. A target line of 0 places the lines at the beginning of the file. Line: Set to the first of the moved lines. Options: None. -- Command: mk[exrc][!] file Write the abbreviations, editor options and maps to the specified file. Information is written in a form which can later be read back in using the *ex* *source* command. If `file'already exists, the *mkexrc* command will fail. This check can be overridden by appending a "`!'" character to the command. Line: Unchanged. Options: None. -- Command: n[ext][!] [ Edit the next file from the argument list. The *next* command will fail if the file has been modified since the last complete write. This check can be overridden by appending the "`!'" character to the command name. The argument list can optionally be replaced by specifying a new one as arguments to this command. In this case, editing starts with the first file on the new list. Capitalizing the first letter of the command, i.e. *Next*, while in *vi* mode, will set the argument list and edit the file in a new screen. In this case, any modifications to the current file are ignored. Line: Set as described for the *edit* command. Options: Affected by the options `autowrite' and `writeany'. -- Command: [line] o[pen] /pattern/ [flags] Enter open mode. Open mode is the same as being in *vi*, but with a one-line window. All the standard *vi* commands are available. If a match is found for the optional RE argument, the cursor is set to the start of the matching pattern. _This command is not yet implemented._ Line: Unchanged, unless the optional RE is specified, in which case it is set to the line where the matching pattern is found. Options: Affected by the `open' option. -- Command: pre[serve] Save the file in a form that can later be recovered using the *ex* *-r* option. When the file is preserved, an email message is sent to the user. Line: Unchanged. Options: None. -- Command: prev[ious][!] Edit the previous file from the argument list. The *previous* command will fail if the file has been modified since the last complete write. This check can be overridden by appending the "`!'" character to the command name. Capitalizing the first letter of the command, i.e. *Previous*, while in *vi* mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. Line: Set as described for the *edit* command. Options: Affected by the options `autowrite' and `writeany'. None. -- Command: [range] p[rint] [ Display the specified lines. Line: Set to the last line displayed. Options: Affected by the `list' and `number' option. -- Command: [line] pu[t] [ Append buffer contents to the current line. If a buffer is specified, its contents are appended to the line, otherwise, the contents of the unnamed buffer are used. Line: Set to the line after the current line. Options: None. -- Command: q[uit][!] End the editing session. If the file has been modified since the last complete write, the *quit* command will fail. This check may be overridden by appending a "`!'" character to the command. If there are more files to edit, the *quit* command will fail. Appending a "`!'" character to the command name or entering two *quit* commands (i.e. *wq*, *quit*, *xit* or *ZZ*) in a row) will override this check and the editor will exit. Line: Unchanged. Options: None. -- Command: [line] r[ead][!] [ Read a file. A copy of the specified file is appended to the line. If `line'is 0, the copy is inserted at the beginning of the file. If no file is specified, the current file is read; if there is no current file, then `file'becomes the current file. If there is no current file and no `file'is specified, then the *read* command will fail. If `file'is preceded by a "`!'" character, `file'is treated as if it were a shell command, and passed to the program named by the `shell' edit option. The standard and standard error outputs of that command are read into the file after the specified line. The special meaning of the "`!'" character can be overridden by escaping it with a backslash "`e'" character. Line: When executed from *ex*, the current line is set to the last line read. When executed from *vi*, the current line is set to the first line read. Options: None. -- Command: rec[over] file Recover `file'if it was previously saved. If no saved file by that name exists, the *recover* command behaves equivalently to the *edit* command. Line: Set as described for the *edit* command. Options: None. -- Command: res[ize] [ *Vi* mode only. Grow or shrink the current screen. If `size'is a positive, signed number, the current screen is grown by that many lines. If `size'is a negative, signed number, the current screen is shrunk by that many lines. If `size'is not signed, the current screen is set to the specified `size'. Applicable only to split screens. Line: Unchanged. Options: None. -- Command: rew[ind][!] Rewind the argument list. If the current file has been modified since the last complete write, the *rewind* command will fail. This check may be overridden by appending the "`!'" character to the command. Otherwise, the current file is set to the first file in the argument list. Line: Set as described for the *edit* command. Options: Affected by the `autowrite' and `writeany' options. -- Command: se[t] [ Display or set editor options. When no arguments are specified, the editor option `term', and any editor options whose values have been changed from the default settings are displayed. If the argument `all'is specified, the values of all of editor options are displayed. Specifying an option name followed by the character "`?'" causes the current value of that option to be displayed. The "`?'" can be separated from the option name by whitespace characters. The "`?'" is necessary only for Boolean valued options. Boolean options can be given values by the form "`set option'" to turn them on, or "`set nooption'" to turn them off. String and numeric options can be assigned by the form "`set option=value'". Any whitespace characters in strings can be included literally by preceding each with a backslash. More than one option can be set or listed by a single set command, by specifying multiple arguments, each separated from the next by whitespace characters. Line: Unchanged. Options: None. -- Command: sh[ell] Run the shell program. The program named by the `shell' option is run with a *-i* (for interactive) flag. Editing is resumed when that program exits. Line: Unchanged. Options: Affected by the `shell' option. -- Command: so[urce] file Read and execute *ex* commands from a file. *Source* commands may be nested. Line: Unchanged. Options: None. -- Command: [range] s[ubstitute] [ -- Command: [range] & [ -- Command: [range] ~ [ Make substitutions. Replace the first instance of `pattern'with the string `replace'on the specified line(s). If the "`/pattern/repl/'" argument is not specified, the "`/pattern/repl/'" from the previous *substitute* command is used. Any character other than an alphabetic, numeric, or backslash character may be used as the delimiter. If `options'includes the letter "`c'" (confirm), you will be prompted for confirmation before each replacement is done. An affirmative response (in English, a "`y'" character) causes the replacement to be made. A quit response (in English, a "`q'" character) causes the *substitute* command to be terminated. Any other response causes the replacement not to be made, and the *substitute* command continues. If `options'includes the letter "`g'" (global), all nonoverlapping instances of `pattern'in the line are replaced. The *&* version of the command is the same as not specifying a pattern or replacement string to the *substitute* command, and the "`&'" is replaced by the pattern and replacement information from the previous substitute command. The *~* version of the command is the same as *&* and *s*, except that the search pattern used is the last RE used in _any_ command, not necessarily the one used in the last *substitute* command. For example, in the sequence s/red/blue/ /green ~ the "`~'" is equivalent to "`s/green/blue/'". The *substitute* command may be interrupted, using the terminal interrupt character. All substitutions completed before the interrupt are retained. Line: Set to the last line upon which a substitution was made. Options: Affected by the `ignorecase' and `magic' option. -- Command: su[spend][!] -- Command: st[op][!] -- Comamnd: Suspend the edit session. Appending a "`!'" character to these commands turns off the `autowrite' option for the command. Line: Unchanged. Options: Affected by the `autowrite' and `writeany' options. -- Command: ta[g][!] tagstring Edit the file containing the specified tag. If the tag is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the *tag* command will fail. This check can be overridden by appending the "`!'" character to the command name. The *tag* command searches for `tagstring'in the tags file(s) specified by the `tags' option. (See `ctags'(1) for more information on tags files.) Capitalizing the first letter of the command, i.e. *Tag*, while in *vi* mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. Line: Set to the line indicated by the tag. Options: Affected by the `autowrite', `taglength', `tags' and `writeany' options. -- Command: tagn[ext][!] Edit the file containing the next context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the *tagnext* command will fail. This check can be overridden by appending the "`!'" character to the command name. Capitalizing the first letter of the command, i.e. *Tagnext*, while in *vi* mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. Line: Set to the line indicated by the tag. Options: Affected by the `autowrite' and `writeany' options. -- Command: tagp[op][!] [ Pop to the specified tag in the tags stack. If neither `file'or `number'is specified, the *tagpop* command pops to the most recent entry on the tags stack. If `file'or `number'is specified, the *tagpop* command pops to the most recent entry in the tags stack for that file, or numbered entry in the tags stack, respectively. (See the *display* command for information on displaying the tags stack.) If the file has been modified since the last complete write, the *tagpop* command will fail. This check may be overridden by appending a "`!'" character to the command name. Line: Set to the line indicated by the tag. Options: Affected by the `autowrite' and `writeany' options. -- Command: tagp[rev][!] Edit the file containing the previous context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the *tagprev* command will fail. This check can be overridden by appending the "`!'" character to the command name. Capitalizing the first letter of the command, i.e. *Tagprev*, while in *vi* mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. Line: Set to the line indicated by the tag. Options: Affected by the `autowrite' and `writeany' options. -- Command: tagt[op][!] Pop to the least recent tag on the tags stack, clearing the tags stack. If the file has been modified since the last complete write, the *tagtop* command will fail. This check may be overridden by appending a "`!'" character to the command name. Line: Set to the line indicated by the tag. Options: Affected by the `autowrite' and `writeany' options. -- Command: una[bbrev] lhs Delete an abbreviation. Delete `lhs'from the current list of abbreviations. Line: Unchanged. Options: None. -- Command: u[ndo] Undo the last change made to the file. Changes made by *global*, *v*, *visual* and map sequences are considered a single command. If repeated, the *u* command alternates between these two states, and is its own inverse. Line: Set to the last line modified by the command. Options: None. -- Command: unm[ap][!] lhs Unmap a mapped string. Delete the command mode map definition for `lhs'. If a "`!'" character is appended to the command name, delete the text input mode map definition instead. Line: Unchanged. Options: None. -- Command: ve[rsion] Display the version of the *ex/vi* editor. -- Command: [line] vi[sual] [ *Ex* mode only. Enter *vi*. The `type'is optional, and can be "`-'", "`+'" or "`^'", as in the *ex* *z* command, to specify the position of the specified line in the screen window. (The default is to place the line at the top of the screen window.) A `count'specifies the number of lines that will initially be displayed. (The default is the value of the `window' editor option.) Line: Unchanged unless `line'is specified, in which case it is set to that line. Options: None. -- Command: vi[sual][!] [ *Vi* mode only. Edit a new file. Identical to the "`edit[!] [+cmd] [file]'" command. Capitalizing the first letter of the command, i.e. *Visual*, will edit the file in a new screen. In this case, any modifications to the current file are ignored. -- Command: viu[sage] [ Display usage for a *vi* command. If `command'is specified, a usage statement for that command is displayed. Otherwise, usage statements for all *vi* commands are displayed. Line: Unchanged. Options: None. -- Command: [range] w[rite][!] [ -- Command: [range] w[rite] [ -- Command: [range] wn[!] [ -- Command: [range] wq[!] [ Write the file. The specified lines (the entire file, if no range is given) is written to `file'. If `file'is not specified, the current pathname is used. If `file'is specified, and it exists, or if the current pathname was set using the *file* command, and the file already exists, these commands will fail. Appending a "`!'" character to the command name will override this check and the write will be attempted, regardless. Specifying the optional "`>>'" string will cause the write to be appended to the file, in which case no tests are made for the file already existing. If the file is preceded by a "`!'" character, the program named by the shell edit option is invoked with file as its second argument, and the specified lines are passed as standard input to that command. The "`!'" in this usage must be separated from command name by at least one whitespace character. The special meaning of the "`!'" may be overridden by escaping it with a backslash "`e'" character. The *wq* version of the write command will exit the editor after writing the file, if there are no further files to edit. Appending a "`!'" character to the command name or entering two "quit" commands (i.e. *wq*, *quit*, *xit* or *ZZ*) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited. The *wn* version of the write command will move to the next file after writing the file, unless the write fails. Line: Unchanged. Options: Affected by the `readonly' and `writeany' options. -- Command: [range] x[it][!] [ Write the file if it has been modified. The specified lines are written to `file', if the file has been modified since the last complete write to any file. If no `range'is specified, the entire file is written. The *xit* command will exit the editor after writing the file, if there are no further files to edit. Appending a "`!'" character to the command name or entering two "quit" commands (i.e. *wq*, *quit*, *xit* or *ZZ*) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited. Line: Unchanged. Options: Affected by the `readonly' and `writeany' options. -- Command: [range] ya[nk] [ Copy the specified lines to a buffer. If no buffer is specified, the unnamed buffer is used. Line: Unchanged. Options: None. -- Command: [line] z [ Adjust the window. If no `type'is specified, then `count'lines following the specified line are displayed. The default `count'is the value of the `window' option. The `type'argument changes the position at which `line'is displayed on the screen by changing the number of lines displayed before and after `line'. The following `type'characters may be used: - Place the line at the bottom of the screen. + Place the line at the top of the screen. . Place the line in the middle of the screen. ^ Write out count lines starting `count * 2'lines before `line'; the net effect of this is that a "`z^'" command following a *z* command writes the previous page. = Center `line'on the screen with a line of hyphens displayed immediately before and after it. The number of preceding and following lines of text displayed are reduced to account for those lines. Line: Set to the last line displayed, with the exception of the "`='" `type', where the current line is set to the line specified by the command. Options: Affected by the `scroll' option. 18 Set Options ************** There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values. In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbreviations. (Regardless of the abbreviations, it is only necessary to use the minimum number of characters necessary to distinguish an abbreviation from all other commands for it to be accepted, in *nex*/*nvi*. Historically, only the full name and the official abbreviations were accepted by *ex*/*vi*. Using full names in your startup files and environmental variables will probably make them more portable.) The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associated value. Options apply to both *ex* and *vi* modes, unless otherwise specified. With a few exceptions, all options are settable per screen, i.e. the `tags' option can be set differently in each screen. The exceptions are the `columns', `lines', `secure' and `term' options. Changing these options modifies the respective information for all screens. For information on modifying the options or to display the options and their current values, see the "set" command in the section entitled "*Ex Commands*" . * *altwerase [off]* *Vi* only. Change how *vi* does word erase during text input. When this option is set, text is broken up into three classes: alphabetic, numeric and underscore characters, other nonblank characters, and blank characters. Changing from one class to another marks the end of a word. In addition, the class of the first character erased is ignored (which is exactly what you want when erasing pathname components). * *autoindent, ai [off]* If this option is set, whenever you create a new line (using the *vi* *A*, *a*, *C*, *c*, *I*, *i*, *O*, *o*, *R*, *r*, *S*, and *s* commands, or the *ex* *append*, *change*, and *insert* commands) the new line is automatically indented to align the cursor with the first nonblank character of the line from which you created it. Lines are indented using tab characters to the extent possible (based on the value of the `tabstop' option) and then using space characters as necessary. For commands inserting text into the middle of a line, any blank characters to the right of the cursor are discarded, and the first nonblank character to the right of the cursor is aligned as described above. The indent characters are themselves somewhat special. If you do not enter more characters on the new line before moving to another line, or entering `', the indent character will be deleted and the line will be empty. For example, if you enter `'twice in succession, the line created by the first `'will not have any characters in it, regardless of the indentation of the previous or subsequent line. Indent characters also require that you enter additional erase characters to delete them. For example, if you have an indented line, containing only blanks, the first `'character you enter will erase up to end of the indent characters, and the second will erase back to the beginning of the line. (Historically, only the `'key would erase the indent characters. Both the `'key and the usual erase keys work in *nvi*.) In addition, if the cursor is positioned at the end of the indent characters, the keys "`0'" will erase all of the indent characters for the current line, resetting the indentation level to 0. Similarly, the keys "`^'" will erase all of the indent characters for the current line, leaving the indentation level for future created lines unaffected. Finally, if the `autoindent' option is set, the *S* and *cc* commands change from the first nonblank of the line to the end of the line, instead of from the beginning of the line to the end of the line. * *autoprint, ap [off]* *Ex* only. Cause the current line to be automatically displayed after the *ex* commands *<*, *>*, *copy*, *delete*, *join*, *move*, *put*, *t*, *Undo*, and *undo*. This automatic display is suppressed during *global* and *v* commands, and for any command where optional flags are used to explicitly display the line. * *autowrite, aw [off]* If this option is set, the *vi* *!*, *^^*, *^]* and ** commands, and the *ex* *edit*, *next*, *rewind*, *stop*, *suspend*, *tag*, *tagpop*, and *tagtop* commands automatically write the current file back to the current file name if it has been modified since it was last written. If the write fails, the command fails and goes no further. Appending the optional force flag character "`!'" to the *ex* commands *next*, *rewind*, *stop*, *suspend*, *tag*, *tagpop*, and *tagtop* stops the automatic write from being attempted. (Historically, the *next* command ignored the optional force flag.) Note, the *ex* commands *edit*, *quit*, *shell*, and *xit* are _not_ affected by the `autowrite' option. The `autowrite' option is ignored if the file is considered read-only for any reason. * *backup [""]* If this option is set, it specifies a pathname used as a backup file, and, whenever a file is written, the file's current contents are copied to it. The pathname is "`#'", "`%'" and "`!'" expanded. If the first character of the pathname is "`N'", a version number is appended to the pathname (and the "`N'" character is then discarded). Version numbers are always incremented, and each backup file will have a version number one greater than the highest version number currently found in the directory. Backup files must be regular files, owned by the real user ID of the user running the editor, and not accessible by any other user. * *beautify, bf [off]* If this option is set, all control characters that are not currently being specially interpreted, other than `', `', and `', are discarded from commands read in by *ex* from command files, and from input text entered to *vi* (either into the file or to the colon command line). Text files read by *ex*/*vi* are _not_ affected by the `beautify' option. * *cdpath [environment variable CDPATH, or current directory]* This option is used to specify a colon separated list of directories which are used as path prefixes for any relative path names used as arguments for the *cd* command. The value of this option defaults to the value of the environmental variable `CDPATH'if it is set, otherwise to the current directory. For compatibility with the POSIX 1003.2 shell, the *cd* command does _not_ check the current directory as a path prefix for relative path names unless it is explicitly specified. It may be so specified by entering an empty string or a "`.'" character into the `CDPATH'variable or the option value. * *cedit [no default]* This option adds the ability to edit the colon command-line history. This option is set to a string. Whenever the first character of that string is entered on the colon command line, you will enter a normal editing window on the collected commands that you've entered on the *vi* colon command-line. You may then modify and/or execute the commands. All normal text editing is available, except that you cannot use ** to switch to an alternate screen. Entering a ** will execute the current line of the screen window as an ex command in the context of the screen from which you created the colon command-line screen, and you will then return to that screen. Because of *vi*'s parsing rules, it can be difficult to set the colon command-line edit character to the `'character. To set it to `', use "`set cedit='". If the `cedit' edit option is set to the same character as the `filec' edit option, *vi* will perform colon command-line editing if the character is entered as the first character of the line, otherwise, *vi* will perform file name expansion. * *columns, co [80]* The number of columns in the screen. Setting this option causes *ex*/*vi* to set (or reset) the environmental variable `COLUMNS'. See the section entitled "*Sizing the Screen*" more information. * *comment [off]* *Vi* only. If the first non-empty line of the file begins with the string "`#'", "`/*'" or "`//'", this option causes *vi* to skip to the end of that shell, C or C++ comment (probably a terribly boring legal notice) before displaying the file. * *directory, dir [environment variable TMPDIR, or /tmp]* The directory where temporary files are created. The environmental variable `TMPDIR'is used as the default value if it exists, otherwise `/tmp'is used. * *edcompatible, ed [off]* Remember the values of the "c" and "g" suffixes to the *substitute* commands, instead of initializing them as unset for each new command. Specifying pattern and replacement strings to the *substitute* command unsets the "c" and "g" suffixes as well. * *escapetime [1]* The 10th's of a second *ex*/*vi* waits for a subsequent key to complete an `'key mapping. * *errorbells, eb [off]* *Ex* only. *Ex* error messages are normally presented in inverse video. If that is not possible for the terminal, setting this option causes error messages to be announced by ringing the terminal bell. * *exrc, ex [off]* If this option is turned on in the EXINIT environment variables, or the system or $HOME startup files, the local startup files are read, unless they are the same as the system or $HOME startup files or fail to pass the standard permission checks. See the section entitled "*Startup Information*" for more information. * *extended [off]* This option causes all regular expressions to be treated as POSIX 1003.2 Extended Regular Expressions (which are similar to historic `egrep'(1) style expressions). * *filec [no default]* This option adds the ability to do shell expansion when entering input on the colon command line. This option is set to a string. Whenever the first character of that string is entered on the colon command line, the delimited string immediately before the cursor is expanded as if it were followed by a `*'character, and file name expansion for the *ex* edit command was done. If no match is found, the screen is flashed and text input resumed. If a single match results, that match replaces the expanded text. In addition, if the single match is for a directory, a `/'character is appended and file completion is repeated. If more than a single match results, any unique prefix shared by the matches replaces the expanded text, the matches are displayed, and text input resumed. Because of *vi*'s parsing rules, it can be difficult to set the path completion character to two command values, `'and `'. To set it to `', use "`set filec='". To set it to `', use "`set filec=e'". If the `cedit' edit option is set to the same character as the `filec' edit option, *vi* will perform colon command-line editing if the character is entered as the first character of the line, otherwise, *vi* will perform file name expansion. * *flash [on]* This option causes the screen to flash instead of beeping the keyboard, on error, if the terminal has the capability. * *hardtabs, ht [8]* This option defines the spacing between hardware tab settings, i.e. the tab expansion done by the operating system and/or the terminal itself. As *nex*/*nvi* never writes `'characters to the terminal, unlike historic versions of *ex*/*vi*, this option does not currently have any affect. * *iclower [off]* The `iclower' edit option makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string. * *ignorecase, ic [off]* This option causes regular expressions, both in *ex* commands and in searches, to be evaluated in a case-insensitive manner. * *keytime [6]* The 10th's of a second *ex*/*vi* waits for a subsequent key to complete a key mapping. * *leftright [off]* *Vi* only. This option causes the screen to be scrolled left-right to view lines longer than the screen, instead of the traditional *vi* screen interface which folds long lines at the right-hand margin of the terminal. * *lines, li [24]* *Vi* only. The number of lines in the screen. Setting this option causes *ex*/*vi* to set (or reset) the environmental variable `LINES'. See the section entitled "*Sizing the Screen*" for more information. * *lisp [off]* *Vi* only. This option changes the behavior of the *vi* *(*, *)*, *{*, *}*, *[[* and *]]* commands to match the Lisp language. Also, the `autoindent' option's behavior is changed to be appropriate for Lisp. _This option is not yet implemented._ * *list [off]* This option causes lines to be displayed in an unambiguous fashion. Specifically, tabs are displayed as control characters, i.e. "`^I'", and the ends of lines are marked with a "`$'" character. * *lock [on]* This option causes the editor to attempt to get an exclusive lock on any file being edited, read or written. Reading or writing a file that cannot be locked produces a warning message, but no other effect. Editing a file that cannot be locked results in a read only edit session, as if the `readonly' edit option were set. * *magic [on]* This option is on by default. Turning the `magic' option off causes all regular expression characters except for "`^'" and "`$'", to be treated as ordinary characters. To re-enable characters individually, when the `magic' option is off, precede them with a backslash "`e'" character. See the section entitled "*Regular Expressions and Replacement Strings*" for more information. * *matchtime [7]* *Vi* only. The 10th's of a second *vi* pauses on the matching character when the `showmatch' option is set. * *mesg [on]* This option allows other users to contact you using the `talk'(1) and `write'(1) utilities, while you are editing. *Ex*/*vi* does not turn message on, i.e. if messages were turned off when the editor was invoked, they will stay turned off. This option only permits you to disallow messages for the edit session. See the `mesg'(1) utility for more information. * *msgcat [./]* This option selects a message catalog to be used to display error and informational messages in a specified language. If the value of this option ends with a '/', it is treated as the name of a directory that contains a message catalog "`vi_XXXX'", where "`XXXX'" is the value of the `LANG'environmental variable, if it's set, or the value of the `LC_MESSAGES'environmental variable if it's not. If neither of those environmental variables are set, or if the option doesn't end in a '/', the option is treated as the full path name of the message catalog to use. If any messages are missing from the catalog, the backup text (English) is used instead. See the distribution file `catalog/README'for additional information on building and installing message catalogs. * *modelines, modeline [off]* If the `modelines' option is set, *ex*/*vi* has historically scanned the first and last five lines of each file as it is read for editing, looking for any *ex* commands that have been placed in those lines. After the startup information has been processed, and before the user starts editing the file, any commands embedded in the file are executed. Commands were recognized by the letters "e" or "v" followed by "x" or "i", at the beginning of a line or following a tab or space character, and followed by a ":", an *ex* command, and another ":". This option is a security problem of immense proportions, and should not be used under any circumstances. _This option will never be implemented._ * *noprint [""]* Characters that are never handled as printable characters. By default, the C library function `isprint'(3) is used to determine if a character is printable or not. This edit option overrides that decision. * *number, nu [off]* Precede each line displayed with its current line number. * *octal [off]* Display unknown characters as octal numbers "`"e###"'", instead of the default hexadecimal "`"ex##"'". * *open [on]* *Ex* only. If this option is not set, the *open* and *visual* commands are disallowed. * *optimize, opt [on]* *Vi* only. Throughput of text is expedited by setting the terminal not to do automatic carriage returns when printing more than one (logical) line of output, greatly speeding output on terminals without addressable cursors when text with leading white space is printed. _This option is not yet implemented._ * *paragraphs, para [IPLPPPQPP LIpplpipbp]* *Vi* only. Define additional paragraph boundaries for the *{* and *}* commands. The value of this option must be a character string consisting of zero or more character pairs. In the text to be edited, the character string `.', (where `'is one of the character pairs in the option's value) defines a paragraph boundary. For example, if the option were set to `LaA##', then all of the following additional paragraph boundaries would be recognized: .La .A .## * *path []* The path option can be used to specify a -separated list of paths, similar to the `PATH'environment variable in the shells. If this option is set, the name of the file to be edited is not an absolute pathname, the first component of the filename is not "`.'" or "`..'", and the file to be edited doesn't exist in the current directory, the elements of the `path' option are sequentially searched for a file of the specified name. If such a file is found, it is edited. * *print [""]* Characters that are always handled as printable characters. By default, the C library function `isprint'(3) is used to determine if a character is printable or not. This edit option overrides that decision. * *prompt [on]* *Ex* only. This option causes *ex* to prompt for command input with a "`:'" character; when it is not set, no prompt is displayed. * *readonly, ro [off]* This option causes a force flag to be required to attempt to write the file. Setting this option is equivalent to using the *-R* command line option, or executing the *vi* program using the name *view*. The `readonly' edit option is not usually persistent, like other edit options. If the *-R* command line option is set, *vi* is executed as *view*, or the `readonly' edit option is explicitly set, all files edited in the screen will be marked readonly, and the force flag will be required to write them. However, if none of these conditions are true, or the `readonly' edit option is explicitly unset, then the `readonly' edit option will toggle based on the write permissions of the file currently being edited as of when it is loaded into the edit buffer. In other words, the `readonly' edit option will be set if the current file lacks write permissions, and will not be set if the user has write permissions for the file. * *recdir [/var/tmp/vi.recover]* The directory where recovery files are stored. If you change the value of `recdir', be careful to choose a directory whose contents are not regularly deleted. Bad choices include directories in memory based filesystems, or `/tmp', on most systems, as their contents are removed when the machine is rebooted. Public directories like `/usr/tmp'and `/var/tmp'are usually safe, although some sites periodically prune old files from them. There is no requirement that you use a public directory, e.g. a sub-directory of your home directory will work fine. Finally, if you change the value of `recdir', you must modify the recovery script to operate in your chosen recovery area. See the section entitled "*Recovery*" for further information. * *redraw, re [off]* *Vi* only. The editor simulates (using great amounts of output), an intelligent terminal on a dumb terminal (e.g. during insertions in *vi* the characters to the right of the cursor are refreshed as each input character is typed). _This option is not yet implemented._ * *remap [on]* If this option is set, it is possible to define macros in terms of other macros. Otherwise, each key is only remapped up to one time. For example, if "`A'" is mapped to "`B'", and "`B'" is mapped to "`C'", The keystroke "`A'" will be mapped to "`C'" if the `remap' option is set, and to "`B'" if it is not set. * *report [5]* Set the threshold of the number of lines that need to be changed or yanked before a message will be displayed to the user. For everything but the yank command, the value is the largest value about which the editor is silent, i.e. by default, 6 lines must be deleted before the user is notified. However, if the number of lines yanked is greater than _or equal to_ the set value, it is reported to the user. * *ruler [off]* *Vi* only. Display a row/column ruler on the colon command line. * *scroll, scr [(environment variable LINES - 1) / 2]* Set the number of lines scrolled by the *ex* ** and ** commands. Historically, the *ex* *z* command, when specified without a count, used two times the size of the scroll value; the POSIX 1003.2 standard specified the window size, which is a better choice. * *searchincr [off]* The `searchincr' edit option makes the search commands */* and *?* incremental, i.e. the screen is updated and the cursor moves to the matching text as the search pattern is entered. If the search pattern is not found, the screen is beeped and the cursor remains on the colon-command line. Erasing characters from the search pattern backs the cursor up to the previous matching text. * *sections, sect [NHSHH HUnhsh]* *Vi* only. Define additional section boundaries for the *[[* and *]]* commands. The `sections' option should be set to a character string consisting of zero or more character pairs. In the text to be edited, the character string `.', (where `'is one of the character pairs in the option's value), defines a section boundary in the same manner that `paragraphs' option boundaries are defined. * *secure [off]* The `secure' edit option turns off all access to external programs. This means that the versions of the *read* and *write* commands that filter text through other programs, the *vi* *!* and ** commands, the *ex* *!*, *script*, *shell*, *stop* and *suspend* commands and file name expansion will not be permitted. Once set, the `secure' edit option may not be unset. * *shell, sh [environment variable SHELL, or /bin/sh]* Select the shell used by the editor. The specified path is the pathname of the shell invoked by the *vi* *!* shell escape command and by the *ex* *shell* command. This program is also used to resolve any shell meta-characters in *ex* commands. * *shellmeta [~{[*?$`'"\]* The set of characters that *ex* checks for when doing file name expansion. If any of the specified characters are found in the file name arguments to the *ex* commands, the arguments are expanded using the program defined by the `shell' option. The default set of characters is a union of meta characters from the Version 7 and the Berkeley C shell. * *shiftwidth, sw [8]* Set the autoindent and shift command indentation width. This width is used by the `autoindent' option and by the *<*, *>*, and *shift* commands. * *showmatch, sm [off]* *Vi* only. This option causes *vi*, when a "`}'" or "`)'" is entered, to briefly move the cursor the matching "`{'" or "`('". See the `matchtime' option for more information. * *showmode, smd [off]* *Vi* only. This option causes *vi* to display a string identifying the current editor mode on the colon command line. The string is preceded by an asterisk ("*") if the file has been modified since it was last completely written, * *sidescroll [16]* *Vi* only. Sets the number of columns that are shifted to the left or right, when *vi* is doing left-right scrolling and the left or right margin is crossed. See the `leftright' option for more information. * *slowopen, slow [off]* This option affects the display algorithm used by *vi*, holding off display updating during input of new text to improve throughput when the terminal in use is slow and unintelligent. _This option is not yet implemented._ * *sourceany [off]* If this option is turned on, *vi* historically read startup files that were owned by someone other than the editor user. See the section entitled "*Startup Information*" for more information. This option is a security problem of immense proportions, and should not be used under any circumstances. _This option will never be implemented._ * *tabstop, ts [8]* This option sets tab widths for the editor display. * *taglength, tl [0]* This option sets the maximum number of characters that are considered significant in a tag name. Setting the value to 0 makes all of the characters in the tag name significant. * *tags, tag [tags /var/db/libc.tags /sys/kern/tags]* Sets the list of tags files, in search order, which are used when the editor searches for a tag. * *term, ttytype, tty [environment variable TERM]* Set the terminal type. Setting this option causes *ex*/*vi* to set (or reset) the environmental variable `TERM'. * *terse [off]* This option has historically made editor messages less verbose. It has no effect in this implementation. See the `verbose' option for more information. * *tildeop [off]* Modify the *~* command to take an associated motion. * *timeout, to [on]* If this option is set, *ex*/*vi* waits for a specific period for a subsequent key to complete a key mapping (see the `keytime' option). If the option is not set, the editor waits until enough keys are entered to resolve the ambiguity, regardless of how long it takes. * *ttywerase [off]* *Vi* only. This option changes how *vi* does word erase during text input. If this option is set, text is broken up into two classes, blank characters and nonblank characters. Changing from one class to another marks the end of a word. * *verbose [off]* *Vi* only. *Vi* historically bells the terminal for many obvious mistakes, e.g. trying to move past the left-hand margin, or past the end of the file. If this option is set, an error message is displayed for all errors. * *w300 [no default]* *Vi* only. Set the window size if the baud rate is less than 1200 baud. See the `window' option for more information. * *w1200 [no default]* *Vi* only. Set the window size if the baud rate is equal to 1200 baud. See the `window' option for more information. * *w9600 [no default]* *Vi* only. Set the window size if the baud rate is greater than 1200 baud. See the `window' option for more information. * *warn [on]* *Ex* only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a *!* command. * *window, w, wi [environment variable LINES - 1]* This option determines the default number of lines in a screenful, as displayed by the *z* command. It also determines the number of lines scrolled by the *vi* commands ** and **, and the default number of lines scrolled by the *vi* commands ** and **. The value of window can be unrelated to the real screen size, although it starts out as the number of lines on the screen. See the section entitled "*Sizing the Screen*" for more information. Setting the value of the `window' option is the same as using the *-w* command line option. If the value of the `window' option (as set by the `window', `w300', `w1200' or `w9600' options) is smaller than the actual size of the screen, large screen movements will result in displaying only that smaller number of lines on the screen. (Further movements in that same area will result in the screen being filled.) This can provide a performance improvement when viewing different places in one or more files over a slow link. Resetting the window size does not reset the default number of lines scrolled by the ** and ** commands. * *windowname [off]* *Vi* changes the name of the editor's icon/window to the current file name when it's possible and not destructive, i.e., when the editor can restore it to its original value on exit or when the icon/window will be discarded as the editor exits. If the `windowname' edit option is set, *vi* will change the icon/window name even when it's destructive and the icon/window name will remain after the editor exits. (This is the case for `xterm'(1)). * *wraplen, wl [0]* This option is identical to the `wrapmargin' option, with the exception that it specifies the number of columns from the _left_ margin before the line splits, not the right margin. If both `wraplen' and `wrapmargin' are set, the `wrapmargin' value is used. * *wrapmargin, wm [0]* *Vi* only. If the value of the `wrapmargin' option is non-zero, *vi* will split lines so that they end at least that number of columns before the right-hand margin of the screen. (Note, the value of `wrapmargin' is _not_ a text length. In a screen that is 80 columns wide, the command "`:set wrapmargin=8'" attempts to keep the lines less than or equal to 72 columns wide.) Lines are split at the previous whitespace character closest to the number. Any trailing whitespace characters before that character are deleted. If the line is split because of an inserted `'or `'character, and you then enter another `'character, it is discarded. If wrapmargin is set to 0, or if there is no blank character upon which to split the line, the line is not broken. If both `wraplen' and `wrapmargin' are set, the `wrapmargin' value is used. * *wrapscan, ws [on]* This option causes searches to wrap around the end or the beginning of the file, and back to the starting point. Otherwise, the end or beginning of the file terminates the search. * *writeany, wa [off]* If this option is set, file-overwriting checks that would usually be made before the *write* and *xit* commands, or before an automatic write (see the `autowrite' option), are not made. This allows a write to any file, provided the file permissions allow it. 19 Index ******** nvi-1.81.6/docs/vi.ref/vi.ref.ps0100444000076400001440000235610710720065723015345 0ustar skimousers%!PS-Adobe-2.0 %%Creator: dvips(k) 5.95a Copyright 2005 Radical Eye Software %%Title: vi.dvi %%Pages: 81 %%PageOrder: Ascend %%BoundingBox: 0 0 595 842 %%DocumentFonts: CMBX12 CMTI10 CMR10 CMB10 CMSY10 CMBXTI10 CMTT10 CMSL10 %%+ CMSS10 CMR9 CMTI9 CMTT9 CMTT12 %%DocumentPaperSizes: a4 %%EndComments %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -o vi.ref.ps vi.dvi %DVIPSParameters: dpi=600 %DVIPSSource: TeX output 2007.11.18:1744 %%BeginProcSet: tex.pro 0 0 %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr 1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S /BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) (LaserWriter 16/600)]{A length product length le{A length product exch 0 exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end %%EndProcSet %%BeginProcSet: texps.pro 0 0 %! TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0 ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{ pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type /nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[ exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if} forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def end %%EndProcSet %%BeginFont: CMTT12 %!PS-AdobeFont-1.1: CMTT12 1.0 %%CreationDate: 1991 Aug 20 16:45:46 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTT12) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch true def end readonly def /FontName /CMTT12 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 34 /quotedbl put dup 43 /plus put dup 60 /less put dup 62 /greater put dup 94 /asciicircum put dup 123 /braceleft put dup 124 /bar put dup 125 /braceright put dup 126 /asciitilde put readonly def /FontBBox{-1 -234 524 695}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F0364CD5660FE13FF01BC20148F9C480BCD0E C81D5BFC66F04993DD73F0BE0AB13F53B1BA79FE5F618A4F672B16C06BE3251E 3BCB599BFA0E6041FBD558475370D693A959259A2699BA6E97CF40435B8E8A4B 426343E145DF14E59028D4E0941AB537E34024E6CDE0EA9AF8038A3260A0358D D5B1DB53582F0DAB7ADE29CF8DBA0992D5A94672DFF91573F38D9BFD1A57E161 E52DA1B41433C82261E47F79997DF603935D2A187A95F7A25D148FB3C2B6AA32 6B982C32C6B25867871ED7B38E150031A3DE568C8D3731A779EAAF09AC5CE6C5 A129C4147E56882B8068DF37C97C761694F1316AF93E33FF7E0B2F1F252735CE 0D9F7BCE136B06EE967ABE0C8DF24DCBBF99874702ED252B677F407CB39678CC 85DDFC2F45C552BA967E4158165ED16FECC4E32AC4D3B3EB8046DCDD37C92FDF F1F3710BB8EF5CA358ABACA33C7E5ACAD6BF5DC58BDFC3CF09BA2A38291D45A4 C15FF1916FE2EC47FDC80911EB9C61F5D355BEDFC9DB17588547763AC5F0B1CC 12D2FFB32E0803D37E3281DA9CE36C5433655526ACFB3A301C56FAB09DF07B5D 048B47687348DEB96F3F9C53CE56DDD312B93D3918CD92AF53FB9461864D11B8 0138918D0B1270C54873C4012CDE6F886DB11BCEA04B023EBB43E0D0A06BE725 741D08B9DB688731A6C9886C15A83C28DADCC81385EA239E045E8F3670CE03DB 9EE77ED067036595C9F3B1854343BE3A12E486B6E5A2F8AC44FA5378D28DCCEE 306B0E283AA444423F9A4FF38E2B56DCF67A39CEB2C643DAE86865517D5D0371 CB8797208ADEC637330A3A57902C9A88EDB75A7C16FA9850075D9F19578EC666 1353CC1FC512D59DFF847ACCD3D3A430B504B211673DDC4479821337AB4E5E64 4D5E90848C76F732F6BE07142161A75055CA7A1744B67B71BE0AE319150A4A4D 71B78385324001C91F4376736DB157E0D150C134B4D23E86C8854CF08B79EBFF EC5C1AFEDC40E127A2D57B12EEAD444631A314F065B823F90BB324FA5990103D A2B7D07F093EAA3465C7702BB0682F681388E27C56E4275FD9F8AC5C2056EF9F 467B1541F664630E2E758F89F9A18F7064D15ED1CC5B4FA2C8E34AC28DC6AFE0 2D768D62286C76E039C18E8CE548AA9E9C4BCBEAC99475560344060A53BC49A3 32E9DAE7B822888ADA8CCAFB7773D8EB85637A48E87FCD3F570C208EE50224E0 5F65B8B26A05EF0D80824DE5FA5216FCF1DE16700EBB38AC62D2057D3375C3CF A24B5AB19E03F886A72EA7A664F8891CB26C7A0172129974E0695E71650C8F12 17C0AAFEF6CDFB44C74FCDFBE8D9EE64CB353D76E590A0655B3610E343AE7929 664C3731942C4C6037BB35823D4AA3A3D5F931A8B1290FF9F99940C042F82AAC DDA8D567D37DB70D0F0999514A5E0F106B3E8F46B9B1680710F6DACE219A9452 4ACDDCB75D308B0920E412D4F18DD71CF9512815E00E16634E40AAD453D5856B 7004CD2A248C5C328EEDCCEBB92403A288AEDCA55213C1360406C2FE535C1122 F9D45EE17BFE551D1B6D7B3443509FEE9F32C4880B5E9A48102D1288C7E4B777 3C0A054E1BC7BA97CD64499DBD5C7EFBC166C95A7BAE5C180F0CFC18775032EE 58D87D056B1EB8FE0CF06182EB8344C2665FDFE6E063589071E13439D9C0B175 751537B7837C7FC18874F2E4365F9BB49D6CAD99AE2B450B1FDEF917AD61057F 4FDEB633137E19CB5AC254C692254CB479D41334943F4DFEFA13F84F47B74BB3 210013114EB4831522C51247AFA3B0DFDDCA340F1FD8CB3C753E363AFB5D5BC3 3C897B662AFB87B514FDD1EF5943FCBF7E8998C2A7204EA2AE8C30172E17AD60 E748BCF3821F18B32CA5926FBB7E119FF8FDB0FEB41FFA085EE0223B6272EEEC E4DB8BDD42A4ACE48C549E0E716656AA569D92A459EE1D722349D7D5FC0DC088 C2A485882554E31C85CE942268E0CD54B03875C2BE2DC3E3939EC0F22884AE13 AD4EF961179DE940063A476165CB896B99B7388BAB795F9308FF0DBD49E678F0 2332E50E5945BC7CC6A9B4B66929C75736AE461BA8B0B532E26CBC80EE488449 5A6382D22C798776842F34F0FFF91A521A6DF38191A8587E5C18CA679856134F 0999D43BFE994B989ECB8460F2CE7386B8839664F24BD646FBB23D50BDE09849 6B38360490D79D90B3DF7BB969832C14B888CAECCB8A4855E2255ED59861B80A AD31AC530AEF5B9068B4F124405345AC1986E97034A11A97144E774A2F3A25E7 E66A7389DD88ABFD02A84F3BC5DEC15EE7A0256A68D1B0357E4D18244EEBDD6C 5770851B4BD0AA1D2FDA4739988CDC7D90BA8B6505F1094AB640988D876F6EA9 C9D80D38591869B8D76850D543B015FFDE2B70A6F2DE02D3880FE0C023E12049 56608088BCC8B632176CD4C41019B623026108C9063A846F4E9415482959E985 22AB5841B2E6772FD16C64BEC76D5F8AFFF61A87D66650AFFA7E7528CA0CC014 42382A3A384A6570824BE4A05264485EAED85E2237E26D7E3EEDA5C6E253F695 E50826B36B9306ECA78A36D16EAD7FF3893F248357203B7CEEFF87260ED0F950 2480AEE77312E3368E7771E76DB33CA51C2D70282887135E9F89FBB79975EADF AC4A498A4A119AF9D6A451A1F9484BAD7536CD6308734C8B7DC9FA8D4E915945 359AEAFAD131D391FB38059620425F1BABCBDF080D7EB51EDC7FE547 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMTT9 %!PS-AdobeFont-1.1: CMTT9 1.0 %%CreationDate: 1991 Aug 20 16:46:24 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTT9) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch true def end readonly def /FontName /CMTT9 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 33 /exclam put dup 34 /quotedbl put dup 35 /numbersign put dup 39 /quoteright put dup 40 /parenleft put dup 42 /asterisk put dup 43 /plus put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 57 /nine put dup 60 /less put dup 62 /greater put dup 63 /question put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 93 /bracketright put dup 94 /asciicircum put dup 95 /underscore put dup 96 /quoteleft put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put dup 123 /braceleft put dup 124 /bar put dup 125 /braceright put dup 126 /asciitilde put readonly def /FontBBox{-6 -233 542 698}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D1E 2931CE5F5D18C658602059F07BE66E6EFC9239D7AB2FB8A4CBD41675B8ECF279 650C29E53B14AC0E392A664848C1844B1CECBB2D5CFB72D0916B675C9A9A1E35 F12696A6F628473C604A95376468E06E295AD6F76CEB939D94113532050B9D5A D2F41A9EFB9424D986612313B89EFE9C8A71313340B248F6853B1EDBF02B7F9E F447220FE131D7D54CFB8AA1281DBAEA73E665BACB1F164552CC0CEDB63BD4B1 4A9AE8AC6FA02242DBE8DA46B64B6BFC11762F0784F216FC8B9120D688D1705A 438B14F5E5DEAF2A98408B3B64620DE3732A4DAE6D08D5D97E34C75DAE19EABD BA0796165C1151BCBFB1DF8D29A63A8300DBDB9E3323CB82D0337598B83F4F2B A97CF5196D4D1CEC1EDB8966E548C0D9C194C932319610FB43EA1B86322FE641 AB48770FF13BD475A7267E142388563D1A400419C585B22A9886074687BEDF74 D905BE8EE440BA2ABF28EAB673399B7F129B9729DD5564C681954621903B84BB CAF89AC5ADB2932472DF29ADA2BDBDB4D05F65F28F5F4C529613D61858E0074A 082A852710A62A147C966F2B85B51B0BE85F11D2057C66FDD61F6C5755367980 9F4DE680601D4DA41B46F8D2148450000413C27AA39B586B74B977B25F0FD3C0 4BA1EBFAFDBEC531EA1210365091671CE3C86A6D4BC591C37DCC02570042575A 9D24252D6E01A8603753934D7EA5CAC1BE4E5AD2BA047DE8F3983B23A8A1511F B08D373B69E5076CE4300137B8805EBCC0AAB89BBB312A77835795E3C069322D 42C893A30AD739E2BDD299679B158F7493764F2321E3965141B5ED1C6F4765ED F46D391A646B30C90002B1C461AEE79E5F094CACCA656CEA3DB921CC5205F328 A2C69F817061D6C60B121EEE844CA5008F23DF08DB76DC2FCCC7DC69B44C0011 56AEA698DF335A6AAA41521E27A829BDD46020CAA697F254257C2DD023CA0379 277074AD2B5055326FE6E20349FD84B9C5DE09EA7BD7C41B3DD0BC2B7637C7F1 8BFF84A24CBEC28E457FB6BB16E8EEB22D40931B4E50CC2B99144F60938976FC 90100E6D251F19F193C6BF3F86155FB0427C9960927C3A274D706AED4B630748 9471F873478A230EE78049D8F73D6C931F6CE6ABD75DEE21EEC04EB9964C4DB5 60C91707DC3C03D49464DC3B1CD1903B9B4CA6C79B28D7987E6F461AAE01A6C4 71D64EE03C9FC5232CD41E02986C7F278B79E9FC830246A69ABADA87915663C4 C01FFFA581C97A89F3884D592587AC3EC3777A75809CE20E6431872BA826F985 E556BEB36A86ABBDD4E52B3251A7C9CBEF1C5B556933049736DF2EFA51D0C7E4 FF1306B84CA7DA16A2B5B847F6E1C241AD53A14E5ECB35A6CB3CDD6C16B4B8FB BCAB358D146B45B35F0EA7B21F8DC0998CB9C0D8F89A22C2CB2241E88F847B8C A4498AA5F264B126BE86B7712E90C4814DC43B9EE0C192AC9B91AA511EAA4811 687EF3C03A97C11066E570E86D269D0AE1F884447094EF431B7B29E9CAC593EB 43AB0BEF6B1CA499B90BACF6DC4C403D60C7275649890749B328A3FB77ABB09B 959FBBC438FA25F14C10AB8575C3360311F05F3C794D69A369AB39A06DEE1133 A366969410A713DD771602680EBA68700FF16019DA051D7B6DDD6A2B7F6AEE05 092CA2B1601D06A0E3A5A7A990AEC99B5ED76AC23E863A5065A1BB069CDF66C4 B6BBAAF61F4160721019A3C661768195F0C82CC457448FB3ABD967430AB4F3C6 6288DBE345B23EBF0D9493E524FBF8996C9845D5A0ABDE1D4DC065042630846B 5182CB449876FE94DED12C7A01564921CFE9C91EEB511FB8220D85435BC510C0 415F5E7594E5F39033F94598B01CB381DC788CBC3A686D02830CD940FCBCD0D4 8B06475113A74AD895FDBEC91A42D268AA399D5DFB3ACBFB70F45FA1DC6EC173 8419BCAD97160EE3B1AF7FEC5BD2E10D1A0891B933298E3E0EBF1A6BA53F6847 2438C2EF49608D818EE20A4C569A33178ADE8E3A9A3A02E657E9010E501299A6 28909EE723D27E3E6294670B653F9DA33D1E84C1ACDF851A01581261A9352DC5 40F75B3362DCF7181C6AEA896D0AA225B58DD87ADB1A0CDEB165C23A01A4E576 D3001225CC35FC3EB3AA5C17A6604943E58DEA3B4AB406012A770B81DE05AF6B 05AE3AEE5F2B892F93A6E36A82990320984BC5E67D32337C0737D8EE423F521E E33E0E04E5E1DF8DE4E0D1981A73EF479993797E8742AADE53B1310EE6D5E94F E11A3D2287C7FBDDCC9E2FD9428887339AC0A1B3BD363C9863EAB24C3B365C21 3FBC8AFDF0CE07897A264615B231BB22BE6CAA1581F5B308FD143BE901455509 74828AB1D0100D6C8848954071A2C649C45ED97D90871C9E698552A9085EEEB0 B69A4C5CD874069624D88B8736D1895F1A4D992894BE9010A4F8246B31C9F89E E3E2CE6F85C63C1D551AC1133A8E53D823A03158D023547A83B4C725B0C52389 21E657FF50E68052FFDE40ECCAFFF1D011047515D2065F10549347B1B04D695C 6633E79DFA51ACC69195D74F3542B5EDC5818E61A8D196CC361768A336351EB5 5F964B98228999850936904472A34AF550B5E3AE13A16CFFBE37B7EE510AA2B6 226AA04819DEBB123C7CA8BC880197971F038BB6C8716E34FE1D66DD04A212EC A74A7245ABA2E75B6C812D3AA468D83B4644111ABE34B14B25A6B4BE3F9252BA DECFF7EB9EA099461D1500BB4CD920B0C1C3ECD32798251C9E0954E8E81819C8 8188DE02A98382756050DFCECAF7EE31AD8BD19D00D1A84E8E34BFB4640C4E2E 3BC51787DB13C49DC0DB9C298AC9C0E9B50E4C6B424B075DB4824A08F54200C1 455A2517603A22BDD06B1386F969D58946E0839F7AB842179F48765B291BB3F9 F76C0999F3D12B39E45046658C99F8C851DFF29223A106598C9E270929C81687 EE9BC87FAF61EFD202D2BC70001C0F33CD956B5DBE70CA3E91904C639AC7326B 81C8EFB1F9CF2D91F10BF14C03BA7489D4A55879B6E97BEEC65ACD87EBBB9B2A 9299B1528FC15B54015FE912D5707CAD91E4637C413B2DA51B7EB13A1FB46485 BD09EA85E741414CD21772D5ED8F8625318011062C1A505A96E05CCB272C0E03 C57CAC7C8CDE82911785220DCAF85D41951B8479DDC3D33D70B9B87EE2FCFAFF CA28EA92FD5DD91C2B1457EF4C1BFFC4EF599ADB162B33E536240B7CB72D6124 973EBB4E15393560DC15A8E71488ACEC8626D0507A91E603F1512720775C24FE 1BCA010CC11D916156F9D5262B8E10CC0F48695567C4B80768844CBFDDEE4298 7BD9BFFAAEACE1A9B1F97702D498E095988C7F919122B2E0D784583AB54C05E9 B9052683701F5B64E9E051B1C6147075DB29FC491A00C7C134D8B207232C0E5F 1CE2AE3ACAA62FEC02654A5104B595572D295A1914A9AE1356CC1E3C62F97619 05915C72B29CC90A325D3A5ABD06D4853C83D7CAB64E588B9C11538971A61DDE 79FC2DA4DD6C9065D9D3D33886561113341127D790EB8C942D6B0DC5B959BB0E DFAE03421B009F1FF13C92A7378B25A8F8032CE55A37B1122D6A2F0F2722DBE0 A300E3A610A568D6EF22935AB9709EA2C7FD5E644AC693006145A5E806D2A7E4 0B4A1FE9484162B0652A00C17D45731BC774FA51D507E76523C8A4BAC1CD7C7A EB3E4483A9749B8AAF4B9480A9ED2F8BB0C956D245C2D332250AFAD96B30A128 6845AFFE01A2C0E88D650B00EAB4EA4FC6018C6D275B3536AA719D1AE619C775 71F0C5A152D0B2E9026853C04B2DE9A7772A1D3C934BCDBEC21DBFB0DD6BED63 D60285284DDB1A2C61B9967CFC5C0EF4DB694708D608FAB61889AA1F5812A81B 7396C22A81C966AA03CEA7B5D973FA084F3BC3AE17D45AA051DB0393F756E5E5 ABE99B6E473F36A0F2C113299103111A69BA0B3A476344ED178D3BB4318BF5BF 6D2D1E734A3CE7843203125D6997AEC7C8CB4F40AD91F7F941CF2BBD56F6ED92 BD55ABBB7235CBD9A6312311A870FBC83BA366929BF5C8115B7503311CB2C6AB ACD6DFE4FC1CD2D1E48F14637FFDAADF807CE965FDA379F498A19E058C73D729 87ECA9674FCBE5E78F49346ACED889FCB5D74EDEB12C25B952EF11AE01569E6B 7DE7E301DF350C824E8807147DC073F13874739D737D5E51A3F649C0BB76D096 345986900BBAE40CCEA41EA229D46FFD161EA6C45E1432C3E7E14F071DC273E6 2DE8DE5FCE2653E1D2E69DD099A9803FCDBCC21D093D3D927CB26F9AEC95E2D9 9542EA72B0D2B683301259E97AC494160C88E66437491D281EA9A6993735A605 23D8110AFF747A0D9CE668AD88A2CFA0D3E98A0E27DD31B37D9B3320F717CE27 122CFB1006036846E2DC350663DC49147D959A4BCE87C2C2FFF2A0DD90DAEFB7 8E7DBC9DD8BB550B831A6F4765EDDE6E7C4E81F4EFAB458ED797BA531FBE6797 B3F56FE5C93C7F9CF5AFDE364E73767834700D6F13404268E833938BC19127D3 C3D57DD17A5F20BB6B3FA217475CC16B9508138A1641709C38826427225598D3 D42BF7959A236604DE1146026A60D5A493312E3D45DE8A6697A9A670B21DB356 51A8A29C3C4C68AB8B88763D7A60164B3E5FEB4CECA179395E465CA4988F48A5 4479DA82B412B1576C77F005D8E5F483F4622B6D0EF01ADF13C15BE53921ED6B 377D44858CCBA0556D7BD01E8E742F823AF48C1043063E5D440D2A12B66BE97A F9598309655FD0B70C07327286B93B5011456FA8F3AEFB2E138DA6C8C1811118 3F7F08D1AFA1555A3A913E04E6C492449FF71F9D7F14C8B96DEDDBCBF8746057 32A5C0A844C918B6C9C176C0C0E1ECA50D25104BCF4FDD2DCA01D8B55487EDA7 E5D355A19C674CCC888CF07C0410E67D6322B1A2191A9F1C9A32D0897C412667 EEE651724F76512C178F44E5F8C0F71CC1A207CE94E4E6794BDC05A80A43636C A691AD4667F761BE601F0684C6C28379039F7A895B58E11417D5679094E7CF84 3061625FF5DDD637F253268B978877C13A4A2E54EFB59013917E70A772CACC35 74104DBCFDEDD4DD67A1B5DFCD3AC5520339AA2541036FB1F852F8BCB69D6749 29E9FF09D56C8569FFE03AE9B1E7C9792FFCC5402CD14788321CAF84539EC35E 8431CDABEC079853A31B070FD25B13C860F20AB77BE292EEA157E2505C30189B 0F3EAB3C7F360ADEE430D4F7E2F9915DED65B965E8BF40E4D83B7421FF23B381 AA9A5E9411ECDB77CD86ADB7131688B6568D676DEFD59273C860442887C76FCD 73A6BF75478A914A7D8239BE2E0692CF4F64E9F2A2FF29894888C9A8ED7D44A2 4E811C332884230E264314EB01C944B49E571C1BDE7D7E17FF220ED6E391F166 9C9A2CB6628612C64AA45DEBA9FF263DE4EBFC8849898EF6D1D92B4A063B4405 443F0095B4EF591B32444EC794E6ACA4E6190376922853F1BAEF279AE34DDAE5 0D7BD7BB6C150DBBCA7BB00256D7339C2A1F88E3CBFF39D6F7BC3FA7411D9D1D 3CE7F285840575C8CCC0AC212070B857049DE55EABD62A7E567EE8A8734A91C5 D18D09B2F2A10A3BFCB868644079661305A2BE49F7D4AD42E9E366C113054629 C2FEB1C1B0051FC0694DCFDA4046D4EF4DCDB240B26610789C7A779A8ED22E67 152B8B444053B07635C5A587B7978A2E578E210D7701E24D98BCD6347426D2C6 F5D5550B5893CD1829A4E341943E96198711C90F55A981BB1FAA251CB49B5F7E 33ED4163F37351D943F44D43A07779AB8142A9A652D4916D360BD6CF425AB263 B2F3F04A0EAF5BB0037394A00E28D1319A267A10ED094F641DD2392DFEEEC8B4 EE72651410349E2F8F78460B9A4C9951E29475CF90D8BB20F878E9CA53F9C62E 5CB2CB79D0BDE99A4F2850C04A674F73FEE7EB7E64734984722C21FA5DCDD9C8 D1C3AA4CA23910AF66C0581717A89B38356F6AAF5995CDC69610C361FA6EBFFE 66204628DB70B2886D36F7D9E819DDBC1B2AC1812F214416378EA57C1ADFB7FF CBCBAC38CDB5E4942125F8FBAF2DCB3C7DABBA5F74E57EC21D105DD50493652E 5D2CD53AAD4FEF28E8440BFF07B8D50D8F1964E17142F3C9650B2CEBD782DE39 D65259CEDEC6207E4102EF4A76EC841B85D36B43CC09E9E976EB9591C3B742AC 447B218C4E5FACB85EA155A066E62476BDA64EBF16ED0A36D3EF09D5B8BFC9C6 5306DC08180F269412591D341D439702005BB4F7FAE74B59447B7257B0519DDF 9980CEE7CB39B19034B108A8656DB5E5FAABEFB6C46D50A9D5B986DCECDA0957 50E608BC2F4B6E13735C7A8DE787716634E8149AE2404135203A1ADFBD080089 A0F110A2CC96AA389EF5A1F26A378C8B7E0C9849C7B20B8848EB610105C87B0A AF54525B20056A94DC11C015EC089FCD8EF5B5DFD444CCEFD25B317BE2A753DD D5C3F26451642A730DA84C3E6D46FBC1EE65CF7CD18389EA0A984B08E6839F6F 74F7CAF87833F8ABDC37C9AF90A8FB5EEF04A81A62426DF9A881F056BA8F433E FFB99A578AA47C0364B2C91869EFEF0D0F3A9219F8D60A1EBB7FE7B6EC979F5D 498F52957ED62AA1691488CA1C2F78EDE939ED59D726980324224F87C8BC3C17 C802DF5D1784E544385F1314A61F7842B66DE949AFEA1657D34DA748049ADF53 D4A0222851C38AA9A09E74C2B04170CCA0A42B37767E93B222E99EA4788A5896 B41C7F367077993B89001DD8D3F034FB8DA371874AE1AB63D166E03D26FC23EE 7D9F3C156154FF67A3EEA0C5F7F3ECF2299BAC74F92FCA8B7D50CBEC606B56F6 21E98EC17B472F0018DFEF310FB7C98CF7549C2ACC1185D89D8D808F9B42568D 6A3046EDC8B26E250BF7E374C1F76B687A9EE0419BD0AC85DF73E27027F6D20C 5F51EFA8D5E93ADF9A71459F371399AA85847B113FD8EF56F0020F691E8F0EFB 0FCE5726CEC4E7670C698E92CD1E88BE5646663BC36862F1E78B67911926E91F D0ADD5B52F59E1F89A240AD78AB7C3789B0C2CEB171D21E43814D5416A2FB129 8A4760BE1208670D2F4DC894739F7B468F9EAA7C2FE04C491A2F8FE80694D725 E4F4397759EC59E1E489E37F692E2C8281EB22E9C417A89123FBC304BB2C72DB 0F20278E6B34BDB6949929A4544E39CEA5D871037F4A7266717C51AA4ABF8098 1E10A0F2CAFF28C4995EB9B5D73BD6B2920DB26525D6EF8F4673E71BEBD3F895 34C98F090FF0AD0A8726168EC498F96134C645A98AB0EE141D73E3C2CE9B23CA 17D74F755B4DC751D18A8061EBAB4CA1FC9568CCA29D8A7EB22A808E082794CA 67099E00D1CF3AA75DBD1E92BA1B5EF89BAE48DCBFE5ED00F4E6F9F44BE0C7D2 7064597EC9622651030216D2BF0325A0484C2C11CF7B61027E7D65BF216E04B7 C10F5C34968F9B5801590E2EC608A311EE054F1D5638075B527DCB9A9831B286 BA90F669ABEA59825772D1F119FEF7A1EC3F9F5F967CE099884E8455EB9FD9D1 097601476800704DD0DF8CE189606880EA056137921B61DF8F25ACAAE8A5A6CD 599BC70F2FEEF5AAEF6CED16D00287DA2928BBEDFEAE8A822A57BE4471285D26 8DA8A6751BC2084E69AC2AF396C6FAF9EFA95CFA7A7E7D88401F85C588D8EF15 A4358626906EC16220E50D247E64569C7E79E270BFC5FD11D057C5BC5FC098B2 462665073C28C558BD072882FCAB2E54D6A2987A4DD1E84AC45783B9C31AC53B A0D692239B5DB251283E2FB87A143FCDEB091A1BED05706A232176930E92EFA3 3D8A5B437E77BE31CC9CE8BE8347B5E2867EC1AFF7AA5373FC67E85BC6EDAA97 D02A3E066F11E22311D88FDD0A1962F825A6A0727FD556F2023BAC5F2A62232C B072F95BC680E259DFCB5C08A45ABDB8FDF818312A1DBD82C8D3C5CCA2C4182D 5A683F09F816EA95888EDF3E5EB08AAE137E202D73D51270920676B536932B44 E20431C8BD0DCA502B8E0A8B9372AE147E33FFCE59FE3FF0E15A7BB581D00640 50134ED7B55D22C6979758010024E879494EADC2710AFA36D29FF4D0567B6CBF A9DC750E658A4A4A85CEFD58259BAB0334404353EA21FBE771E0833D46E2D9CB 41451BF2387074DBD57A864CA05E86D73B5CF3A06712394C534A19373EB6D682 CAF18420940FDB2BE55B3FF297428B194271E37C9C302118A9FD7BA6440166E9 F7C3B9A8C7D7001578855772672DAA529F7BCFDC970FBE6FC9E207C715A6BBAF 2E60188B165F81A63B82986F909182AA69B37EA79D01B6D6A51AE86D7105D558 495969C3CC471D23582433397A9B1414CF2A416D70CE8A3CB78231A6BB42E103 225308B18026B130E3A89C69539A891AAE49049C4D2B4020677DF5EFA552DFEC E58BDD17C363EB8BBAE677ADFC21163D4DA467190BBFECDDC5F9E6CE6E64AD1C A3DD7FD69D1E7B9E3E75267CA434583C038AA505A1C89997BD0D687F083A599C 78192BA62A8A4EBAA3086866BFD8062A40EC3CDBA08E8123F2864CF3CB98D0CF BA2839989759C59300D591C6E4665EB3FC47A12D6040CFD7E3DD9A6386F0322C A2D295FB1A5900DE9B82639157AF807CD3964260B0B6636A8E47AA9D3E592C90 65B7AB4B04144A878575C9B583F1ED279F1F9616158215041F711D059BB4DD8E FC51CA8FA1778CEA9AC45A1FFF2EFB1DA53D9B221ABEA12FEA060E0FDCB7D6E5 75E738247BE147DA486182AA2D1B4423EA9514FF055DE03BD1A84D7040B7F958 9AA1566A7582DE5512A449B5168BFB9106AEA56F3E6BA79AAF618D9F716B9D58 A9C567C122C4CE3ADD03B3FAFAD15033869A10C5F325790DD04EC23C19223EB4 D90980F901F2353DF04CB7A27CEB591571A778847F88AD9857A3D1ECAC84BE05 0C469F7BDC5D7394931CDE2B7C8606D7F30F163EB1AE4E538307BDE6B38EDB27 8336EC6CE89C47710BBE55AD42EF7FAFDD4C95CF9C7066A44C579FB56D8A17B8 066B5BBDEE1743C551A7D39F0AEFE196EC05918BF99930600107C8902F2F2BC3 CFD1C9051F54756125F057165220417A96CDD884320867C0A7A27D14C776F2DA A9785C8ABD11AB28D3D0541CE2488B296C1F07689F68F6BF62E5340E1174BDE3 39960F135C51F84F6B124A767745208D1402E5F439DA913C70181A90EA18BBA9 022A4D7D89D2281BF615B1764DC47C5B5E5CDB63BBA4572DBC1A7DC323239EC6 BE908397E3DE4CF08BBCEDAC8A386213E69E81BCD53EB04F37CC8BE50893C3D1 B0E9210548ECCA612EA557AED81526296D00BC930003DF84A884F2E4D8AA5D4E 19CE14505EF721B8E940ACA0EA2B4078CCA06C514DAAF96078BD01926975CE40 3CD350EC9F8FF6481F4167FD1E70B902F3B64780C963E643870501E771A0C5A5 2B93D434A189C5E09F49DB90457B7941F5815F30F38F3A5256D951238E42C2D3 C4EFEA6EF05F48EA79CAA3AAF18D3EEAC0C2263E205E9E5D35E3BF3341AF7DFC 1E38818D75B04A475B52F0058F1258C450F7CEA963E219C11A941371E6F36619 90477DEC069A811FEEF0B6D8E4515FB2D1B4520F83D819FD7CAC8936EE0E4C81 098C89A8C69CF3FD76A996B717E5596DD1F250E309324113B74E5769EE7E5600 6B4B9546E3D1E43CC19F3BA40889C4E13F9600648ABBC35B6CB463BB95749E59 005BA9EC9C25E620344CF496FD03C9F117BAD86CD627FC58A0694ADA9F96BC3C 52ED316F6CF78F188D6395E4EAB0EB9498B9AC56343F5E9349709BA2368AC078 D9C5F35519D84ECBEFFEAB25B928E44163D9583DD0F653120581E4EA2115D682 9CD2E70F69F5986DB67DA78E8A242A12F970A64D9C5B4430FC13868E33361CE1 21B57AEA11B6E760E4784C6AEEF90787F4DBB91B56F6B247216BCF8396FA867C 1FCE505383352EDA6DCF1EE6143D67561FA83A0E280776CF88DAD77BC43D711D 518C506683197FC4BC6F4C06679DC3B808540C75B3A10654BEDF1CF5AEC937C7 52CA95607C9883A671A72BE1D7A1F33281DAD5A786683520DEC96B884A50A1BB C109639DB34A887D4929E499D6B5B159E736021266173E489C4306A340C30121 006CC90CAF1FF00AE503249C35D486CD29E903FECB59ECDBDE814EB792B89313 68DA8F493D2C0742FA23F7D385379D1C8BA4F7C3A0D12E4EE5123510C7171409 DDAD02DEB1A98EBED0DD01A6D19ACE8486A610AED073BD19A50F432AD3DE9682 67E806FD316CD90E2C02905FFFAF1221B38D3A2D0E777D41FDF885B3F5013B83 7ECB8A8CCD216B1935EE8830EF682DA8FC76403FD4647D355ECDCCFE66C5ACA4 10200044D479C3796364BDCA8428C48284C40381390C78C4127EA34B05BA4489 2CADABE01F5760AB1E9422854FA23E3143C0B4691CE4368E9623D18B60CC00C7 C0DE27B31B028F2020182BA0BFCF34CCB6B1730431192F27205119C75FF49408 9F7B85C6F7B2F4ABCC94EA639B24BE90A8F1A930624302A287136C9E63BB657E B66DF5605ED47CA72122FE70C28D8CAECFF47A74A1FCD23E68A0B327ACA72B42 08EB93E632115B53C7639C7A95D5FD275215C975B3B04F8C4727E8D10BFC0F1A 768CBB1CD32B50914105CCFFE6F8F2045388F3EA59F0C2E6BB7EF3878742DF7E E0C26F68F6A355F61616EB77F4BD8CB9BF30CB28335D2C004903606A97556BCF 014E9D0576F4313737D01681F3FF8D13CF6077F1A6AEB3128903D6A6AD767DD6 581074F33B40E5FE8E8A69EF8C6BF273744AD280E6F926F11A1B0883631DE87E 4924EA698C0BA98B2EB193BAF7C60CC1391B176E09BB120674807845D0CA0975 BF81DD314CB9F53E330FF80EE10D3B2E75D309E35044BCA33DEF715C7CD04B8D 64550714749D520AF6EFAC80E26DE10893169DEC7E3952CD0DFC7B1734962400 ED9850361F94FF2EE558EF94FA92C153B0B99AE919B008B3203C156FA56287D4 EB0BABA6390D1BFBDCC15B96CCE34ECAF36BBC1E8B17E7F4D1561522A271A511 5B422241EE629636B5AF45A0C7E0C28C5F9E472FCE0FA39C25F65F733198F9DF 7786A238B09342EB846AB00ECC19F0406493A1391735AB7B0360725744D609EE 0BB13EF7C88A2DA90EE695F3088C83386926095C3D0B5F92743AB7452318321C 693C34BD3B1B5E01E43B81FE587E95A5DD70492CF9B308C24C484A3D067E413C E1CEE840418731488BA56726211AE0A47CC15289F0F625CD87F299C58CD1292D 43CC1913E8483C257DCC983ADF644806A02F436183611F14575A4BB3B5FA384B 01684552C683D716F9F05DF9358FB6D782302FCFFA9E45E9A34514783C45665C E7B6FDB2FFD8552B99B60BB3DAB78A38E77A1DCBF45FA71C21A89926859E2704 7AA9612C3DF9301E7FBEDD07A56EE588C883A0D7FCC6C0D15A8D76627F897EEF 5B2855DD4A662D9D1ED5694BC474219A6B625A9376E132B0748B8EC5DA1808C9 8723CC127B358B3B42263142DCF4E5205BFF498626742C31E5B5E9AF3B9D40F2 F9DD083A824B079645DC84657F7B7584CC035B14A7CF99A8394A56D59A4C88C3 9A44BC0C199FC513B2716B2A1517CCEFE3AD41436E11E2B97EA240AEAEEF8381 1DEEFE8356005E0F7FC76493338B9F6C166D571F86074E7E61FA1C2F5D872497 A63BA0A79A72C36B3AF2ACAD9956A5153B5ED8FFE887A8E7EDA87B8C40256D6B 44FF9663D1E7DD924B44A6A1C94E934C89109F20C4D69C72B476ACD50C6E4FAC A527EAF5672ACFDA295B54EF90408D6FC96E85E9C7BA8456DAC36CC0E657C538 4F46E9F870678885E839C003F640DADE6D00EE7A73BB3295CD999D36FC77EDE6 F749AB1ABB08AA2CC91018D4325D8D7061E2217FFABDAE8048E5294F476C3271 721344CDFDA5CCC197E9C55888395C63AC9EBBDE340AB852D2A3B28254303B7A 666269886C28A4284F1B0DBDFAE68EF4F48C36749124841FB1EA494AFB067E1D BD717F4EC71F6AE1C0ED3E29C1F08BFBDEB8F4267512BCEDEA5B2E48CE0C7117 BAC31E1615502CE96F6CF935D8CB6A0125D11941FA504BE298E64CB7457C36D9 8DBE8B59C9CFA3B509E4F80092154A3381993F5341F7EC3C30C633D3DD1D4F2B 9326110B9653AC856E7C2B1A8481CE67B3BE6A567EFB7B1CA147D87F15B70936 E11982365FB7C1FF88ADAAB719462EC4A9FD5E6681C4D48D481363EDE8BD54B2 3BAB5323AAEDAF3B7A201BCCFA2A311E87DEE3C6F09AEB34F700881F7CDAAD78 B7D2DBB4DC18A1EBB42A76EA6994C1914C0033E96BBA30066B9DAA58166BB3C1 F3C113AF006BAF3BFC20FDD2C34F92F9817B8FEA8C9FB48AF9B8A42E36FB593D 899173DED6EEE9BF73379F89DB0975A8104EFF3F214403E85F9FDBEFB1C69955 BF15F3A5E47632253BC8352218D57D88D702A89803377A973195DEB429D0556D F5D6F1E00319BE819D5088F63AAC88BC71C7A386C37207D743704672B1B8B1FE BB2FE3E187D7A1F67ED856792CB1DA271484CA8EE4FE12B2F49113D79EB3FB01 CAC3522CF1160F7EBA31B8D55DCBE040816E5461F84DC0FB5F77BFE40DB380E5 ED19087F9FDA63BF0D398D2761E18948E4BDBECC5F8E8A62667922EBCEC53079 4FD728AB5F729185D876163AB8769979B578BF2B7A752FB7B26E4CFD2F7C45B6 A2704843C401F19A0005272EDE782D6998F2C4DD457AFCBC6539CE16B0C67576 09FAC5E28115F2B42C47BDD8DEC4581B389627D056416DA5488F0891D81D7739 F0741FE4ED674634FCF6C3F23307BFDBB6A3B76C1F0F6B2383BB16222FFF363D 4230F12682D56AC2EF47D60B3BA58FD65ED6D36AA5952ACCBDDDD4EC5EA08EAB 0F11160A828F5722D073AAC3BF7017C9151A3435A132392E07638003E4CE9A7A F1460EA45CF5F02CC4CA2CEA603E6CAAC2226C5141591088650FA6F83CEB04A7 EC03CADC1C1307DEE89699176A26D6BECE403FF48E88B5BD392BE59034736F67 D490A5682B8E7DC7661E2E607F79918338E3E7DA6E98BE92C8CE5B3E2A9A7BBE 9A8CB556A90EA9F0BF75A54BA5727667CC8D3AFD57E295F8A41124F0D5464FDF 559BB342BF8E0506F19FD7DC6CF45E9FF4CC74155033365D40518668D1930A26 0893AEB36E44E2B80A348D494EC3E4686E5F9826EBD6C9A5D66662A2BA5648A0 71E7552AE31F1E748CBB5CE7EA08A6BABF496D816432CEFC035482A7D2B2A078 AE6AF7A31F34EF7962D437889701E437873C029F17DAA9B221D607DB467349DE 4C4D506048910AB0D3E444086D6F6E316E096E6A2FF7F15D6963FA108CCE06D1 4872B8B5A9CE4A200C772B6A9436A73C3A1A6CCC0BAF7888092A7215620308F1 5978C264FAD0A3A600D8CA8CF5838A63F40CB0918D21BC173CB2ABDBA4ED647D 0E5C2071DC669D2D7D3F5BB96215E2F3F44033B5EA4BC4026C9ABD2472984719 F0E1039F215F743F703BC5D4F5D49D02274012AEE8F762889F354AB2CB952E7C 64E60F86A2506F5E119ABB5F03F1A666222ABBD3612AF197931B2944A945D612 DB3E62F03261A8FF6197925B679ABD4C6B88E171CB77021D3D6DCDC906492866 D88A2FC143328C84000C59E8BA91D2C952F6C18C2660240DAEA2A937210805BF 3F0D2DEFB6E05638CB0EAF2C63636C728DDD526E623F17D1608289D922A6DAB6 D11B49334C31CA5C01AC0217F3F14AFFBF88A3C7B82019E991AC4DA122AFDD29 0695996EE5FAAAC3F6FD69E959F08DF6C3BA81CB2FCC7DEB30351058D639CD2E B5808A1FB4B2248C612B9C572C032E35CDA08432679EB9952E7579B036F7971A 8D14E1568D1A9C1E91022E4961B436E8990041325370F943518D06EFA74AC547 44957AECE1CEBE1FAA8881862B35C3BDC6FF9242ABACA0AB72221832EDB67084 03C5006A6D171B0F66E882846530A8BB5BF0D670BE2EBA98855817525EDAB563 BA7EA2E2DDA4F2A154B10A8D841B564CCEC80D63EF534F10476821B535BCB9AF A0E4672BE8C747BF3B5ECD8F4F7214E45CA1BE35B32FE25E7926FC8037DED5D9 4075B175BC9FDA4CA498B8E14672C67431D96D6CE6D79BD637352E249D25CD0F 8991E5A0E83BEB46FBD76EF1C2DCE052B3EB5703ABCE7165D503B7B78557F448 1F49CFFB2729237DA2185F2A4C6EF52A31DB18F8D8625FCD799FDF163FC8531A 94ECCF096478BDBEA39680B59041061C816E0AB0668ECC075A7D5A971AA0B183 FC16E3C9DFCA64A3795EDD078D02E90F6D89263AA90F54E426DE9AD6163A2637 7C60746E9FF93B0A594FB57BA66A22615AC7B0DA69AC08B90BE472CAAF56551F 6F8A5E3621F1B4F3E226D6DB3D23D8DF87A32EF7277A4DDEB4C1E20B436001C5 FB8FDD2394339C0B0C01C6A6C2AC91DE0DB23C006FDB20F5A50E9AF2D08D7A01 1D30BFC8FB72F7D01980FDCF5007DEE88D16A3F52EEC59B3C9635B8BACA1F560 81268C18BE19D4D97D2C985E989F121AC4F33CA9B69F5B3A7F5E89E704BA3522 47B077021F39517F863537979813CE60CDBC3F5875B98B6CFF8D04F29C77CF26 00D1615FF3A0DDD9C96A2179510F711DA1687A4C45AAEDE85828964266ABB0CF EE7449AAED4CF8F80F4FBC5E70D1941BA30E410EB2F6DD9E24D7DA920120B11B 1D058F06D576D640C96FC384E34DFB7447E3AEE444C549AD0051B22140870F32 FD5B3D1BB3145C2A88A422393069866FEDDB70B3EA8F946E145355E294D41688 1E35015B62C860E4D016BF9459F5EB2C2B66D65454194827105A3D45519471D8 3077773BBF90AEEE86063D68413FEC30810CE712975E7EC94D0DB15FC322F767 B5D9349DC2FAB297E9E56147260151A5A82A573C52C855B5D032F9133964E0D0 85DD89F426B58EE5183A1B00050F97A569F3B831A507758890A2FEB6D2FC640E 6F36FDB3F1FAAE5AD2217E781CCD4F76D69ABF9CA0C543BFD5CFCACE47454DD2 1168FDF00819837238BF5A51E5E15C33BF2472C7EC8EC452ED25856533844F1E 3FB69414214E49EC398390084DE1914D8690D1651E76B07C6DE54C71B8F6169A 10D44DFA3ADE5188EAED8EC447B9E1BE9EDB68306E522C7DB965D5C8622496F9 F76A2EF0257169F29D7E1FC80574579D97705F766F33AF657EB6D1248578735B 031F375D0503CBFDC5EE89AF3BA6747141F4302E6B4373954F253D5AC0E02A0B B4F9BB43E0066EFFAB09E0C04346B954FAC9ADDD6BF9F292C0DBA30F1A8B241A B2861F8000A196FF7367D40EDC1F01434AFA88E410B21BA6C6257ECD3BEE3C39 2CEC3641947BD6F6C6B7CC3608EB99555D25CB83D3AF8820701619A7C3288A9C 9586C691401887DBC3A2C98DE538A2B665ED947E60EE4214B9CD281932AC924D 1D46C978C5CCCBCA3EC4100D45FF4766CD3DD15C895CFE4337258DFE58EC07D0 908880BABA32D4E61CF0345703090826533A14E7EE206EB47852BD5C17C30463 3F9CEB1912DD2D3E1D6D95535F980E6884CC9A34AE7D6544E07C56B597137F76 D7C51AA73FA8C49ABE0D93F3021F522944CEC7A30A01F8AFAFE6CF1CB98EF9D9 1C025AD7089BD2A8AAE547EC4747ECA66ED9C42AD24964B519EB90D4CE54394D 5FFC390B39CF604C9B27DAE91070D1AC0FEF537F45B9CC67F7E2112043E2C4FD 56ED294DC1A8E436F191821A4DF8CEFB407D3ACF6EF6F6169473F603EB2C77B1 BCFC9C5480DF373B54E75DE1A80FEF1BCE81297FF62E1344EE16E094EA424AF2 B81392439734C5AA8CB1DECE63F172B82D825CCEB37736EEDF3EB04AA07C408A CDC430023808A44F1D8C69D9B72FF003D792124D2B8810A995AF0D7FA4B5F833 FD12D645A24FBC1904CE1D559F1D7DBBAEF220EC9EF031CA5F62DD8A55E66341 9770884254B8BB0D36BA4BE8FCA1DCC821BBFD5EEFA4641259468B6824E68DF2 0FADDB8B9C210583D8C5D926D328060530E0AA8372FE42A1418E6782489D13BF EE7CEA6282474D87D41866EE 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMTI9 %!PS-AdobeFont-1.1: CMTI9 1.0 %%CreationDate: 1991 Aug 18 21:08:07 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTI9) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.04 def /isFixedPitch false def end readonly def /FontName /CMTI9 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 46 /period put readonly def /FontBBox{-35 -250 1148 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9E3948FFB3DF7BFF10C9BDA4EFE5F68A8CB1526990D1357AE6D2F7C2D2EF8496 4E47B39E6712EB8908A3265E5FAB40567E866C244814449F1E993AAB422C3F1D DFA8C7118584F2E5197FD4BFA3A8AE9E953C6CD4672C0FF51E41C3A919749C1A F06650DF4C5E17492164BDBCDF22609A74BFA7F69960A64B9F949FFC2A807458 8579366C4F41BDE1FDFBCC4845FA19BBB6963D65EE8532549274BAEBDFF24FA6 03235D1BE37C06B1938AF369DA75BF38DDBC87A1FF445EAA16E1895ABE9506B9 211955753E447865D33CEF007391D2666A046277A30A49804FFCED3FEA5EB2C3 E52EE14A9F75241EA10C91974CDA6236EB840FD44D6DDE4D9B3266C3B99BD38B D835BCA8CB819C073480FB972CC028D218F6A1D344CE1B63F4FBF2C826F412E1 6E0B05A26125865A14FD7B7030B478BB8BC6BC395335C3BA940E1C348267F4F9 0AF97BBEE253511940F1048E175D3569F7D05A28851B6F50765FEB6C9654FEDC 1BF52F535DB5BB90C1BD5D2EBF75E0AEBE82B20507F3C28A03746781018D4EB2 298E4F2C27ACF73FA73EBE43F014BB575AAD516C0407B29E1653375135ECB74D C91372F06FA8EF37C31AF3FA48AE65318EAA6C34830A5377ABB2DFA5DA53A574 433484BA1466709A4B186761655C8E482833B697673E847C691079E7F1DCB8D6 1AD91101D757B83E2090337D525AEECB028FB3C9F6A6E6AD2F322CFDC5A833E6 1CE4EDBF41FD34FD61630581D222F854A76C2EA9FD72796A7C9CC1F6C2FCCD16 E95CA05826A4ECFADA6A5FB83C41A7131E52BA6585DD6DD78515D8F7327DFC6F 9404F89293D6ACB433CD0802C43F0E74C6C4766A23A6AE3788FE6CAE82E1A104 BAEC8BEFDEFE4F292F625E60362F3886F602CE4121BF0AAD93526314BCBB5971 40091A7BBF7EFB3BA355B88C897D9C70C841DE41309348751EDFFA8675215988 49CB1599834A01EC6CD4FD813AFF97A614F56975775D5F48E9C1A9CE532FAEB1 4EBE20C3FA87CFE03664C428BFC5C894668E507950005BD8C2BCA8998C1FB92C 4E6B791BA05B79F332EB8AF5B0F851B8B7EE372EC0861B09C007CDF43F82D0B7 35446F682A0DA7F4112CDABE4F922EACFCB7B8C88BF550B60957E7 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMR9 %!PS-AdobeFont-1.1: CMR9 1.0 %%CreationDate: 1991 Aug 20 16:39:59 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMR9) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMR9 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 13 /fl put dup 33 /exclam put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 61 /equal put dup 63 /question put dup 64 /at put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 93 /bracketright put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-39 -250 1036 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 92A36FADB679CF58BAFDD3E51DFDD314B91A605515D729EE20C42505FD4E0835 3C9D365B14C003BC6DD352F0228A8C161F172D2551CD1C67CD0B1B21DED53203 046FAFF9B1129167921DD82C5964F9DDDFE0D2686875BD075FC81831A941F20E C5CD90040A092E559F6D1D3B0E9BB71733595AE0EA6093F986377A96060BF12A A1B525CD9FA741FE051DD54A32BECD55A868DD63119A4370F8322CCBEC889BC2 A723CB4015FC4AA90AE873EA14DE13382CA9CF0D8DFB65F0ABEDFD9A64BB3F4D 731E2E1C9A1789228FF44116230A70C339C9819676022AB31B5C9C589AE9094B 09882051AD4637C1710D93E8DD117B4E7B478493B91EA6306FDB3FA6D738AAB1 49FBB21A00AC2A999C21445DE3177F21D8B6AAB33869C882613EA6B5EC56476B 5634181ECBF03BFEDB57F079EACE3B334F6F384BDF9D70AEBD592C8ECF21378B 54A8B5DBF7CB9282E16AA517E14843909339B5E7C55B038BF3BB493F3B884A1C C25F9E8FB912CBE23199AD9D2C3E573727701BA301526C66C3617B9514D6F11F 11930B1D97C17816C85B1BFD9B973A191B33CC3B391815AC46268691C741B2D4 48A840F1128D9B2F9CF07D0709FE796B23A836417BF7B5B12D67F74453C82F5F 25F7B30701D6F6D4F4DC623C0C27D6A6FBECC7312A3CD10932FC7C10851C3C52 24B75DEA8A648B7F34F5711DB0E843C914E25663C510185BC37BDB7593C1C259 21D8DDAD33982C336BF272BAB2F48E68217403FE9F54877B243614A87E64784D 2796EE4179FBF96123D1BEE3EF89D682B427BA4F12A1318A57F18BE5DD903815 26191BA3C6AD9EC21F3BFF3858C49B86E5AA31914985968F5DB84434464C2077 B8D1C3C6D50F0898095BC162B7693FF6B8AA294C79FA756312ED6607BB9DC3BA BEA2B92D915217EF6DA7D76822C6323B0D59E01B090AEB9626FB167788037087 7DB5C0A138676BA8D52CDE3253A7048478AE11EDD444135F1EC8F291A0CC4293 FA4B940C55F9D6B30DB4C2515D540F87044C815B7E58CF3076DE09B08BE04FBB 0EE0DEA7B7C72E00C55B83E707BD9DF7CD30D200ADFD7A10050EA922DDBB5365 D1BDBC69A166AEACDF4FB944F5E0170C35435F5FB7863601F748545912075915 F989697E6E7F0D98C784A863628160E4379C5A42ECD293C679E3CB2E75510A70 5F201A186B6AE8DF456FF51327F5AD7E643391DEA7EB891A7733F2F18BCC9786 8564339DC0C697740EA5056A65D8B0102F3FBC2D9AEA0076C1956F4E18BD43E7 532F7B2E1325103AF648B96E03D52ED4C130D685F57C0DBF9ED7C07E3F9313FD 4843A203279E4FC1D1896FE020E20539CFCED8BDBE69C6AF96568160C56472C6 2C6AFE0D0FB49FD2D77A14E151F23418D0671D0C7A9A4984325C0BA3A9BC3D0E F25A1E523FBDE64A6978A7A1643F8398CC2A66523EE770D370F73F8C76551699 D61CE3F9F620AEB492BD228DF45DEF195A45A6A6971C006FE9604F29F120A3F4 3660E0AAF93359A9E49BC622DA1077B9C09798E9BCC4DB14EE994D1EE87D916B C94A2EFD494D6712247E417624FBCFDE39D89FF749139F48AAC01C9B06B39CE3 953859E038B56AF170B05F3200C843CB19EEAEB9D06CEF1A0092932E809B01D3 FA59B03DFF0E098F7B5955BE696F8044229F49BC7337325D307104010810C1C0 9878400DDC7CC39ECC71A623425BA9A842C8C946EB2ADD02F6BF8BAF1B02A3DF 23ED3F7C28DCA414CC4FA9BF4E956C85D0FC2B2262FEDF3B5F1AE08A8AF6DE09 B7085567926B4E2A033144AC8484BD0C0621B87695FEC5D42AED05DF17B794CB D33888414A3A3298F03DC33374AC29A4F974D626624ECED0E3711D40C6E28AAA 45C685DE61149212468AB7C6F191ADDBD1C7F370601AF4A8145AF6C32D916179 37EA72E5D5CE5F621E9C5E80B00C07A135DE59B50528C7AFC838E80CAA0C53EA 010D83FAFE9A437FE9A10B46B7D1D06E202C4A7398563EFBCF81789673278580 A74C55814B524DE8DCC6637435EDE56C10A023AF77A1D3224F007793C11FC38C E28A1576635F8F8BA173A7236624402E763041BF8C7EAD9328A6D6074EA0A5A8 E1853C1AEEAC894C0A15AD5D29CFDD92EEB08BCC20B9892DE2858831DADFCFDF DCA1546231C58EF9600D488A74B38F030C1E58774508912818A5573CCCFCAF39 A42B65AC30C33B46372A182DDF1CF4CBA5CBDDE8575A64740E5345BEA6D38FAC C57237B036D3D7CB519F31B332070C006421B3A1459AAA506328775EF2EDFC44 CA800AA860242AA37D24C99F37D58A3A180AA125AA011CC01C2E53BD57AD4F33 8728C7A1BF058DBB173097E8BF45C50A23AD410325D69F7B2990B47174E89E64 20B0998FED76AD12F411C14B5672C6FF19AF7409B088A81050AD66FE0EF150F1 100D0A006DD92016DD2AA83A6227FF9AAB48732FEB3FB8C24D2671B42F9489F2 B1AF43EC917A424317B961E1EEA97F9493CF34EE7512B59D864542E71B569AB9 B6B8090E92F436E8427B8E6F9DE35C70C23A38A29F06AB2CE6CD128B70375E6F BA31CB65E4B03048410C9D3A591FC8108611D9C1EE81B1F861A9363A78276D12 4A706728B8B47A177A6815062BFEAB1285A757C6E0A407DB784C15B045B1C5A5 059D328CA3B8C8616B7AB6664D0A88979A79529267F0DDDC6CFB715491226DF8 D9898AF310F93041F083BC20CF5028902068A30F52F0575D258D9359F62BB1C6 0F5741D98457D2ACB8752D3FDC1BCF480EAC47C5BFD1C2D9684840D49ECD7F01 70A8376D1CE4B6D0322DCC061A1267B35AF136A507D10D4E8AC82A581B13B798 0DEC0C113AB899E84ED58A46125DAD7062F6C69D705BCD275B88FC20E9831A1D EF6ABBC89950006C64F3D23F070BE45BF2CA81DC9A89137E701C6EB4D485D228 C18AADFDAD764337E5E0C1509B1F69721C827F402CA527E46FA6E4DAF3202A82 26B97222CC9D09DC76B9B79EEB36471442101170FD70114B20816902928DEF01 BD6694ACE733AFEC4F71C3F56B65F0EED3391B1635CB2A58834FA89F9CF7254C 955055F415B8B9C737E10787F5047C53D2985D6EF309E53FE5D2DDB6FC606C2B 06EE14826EC918FF12D13F8B58D0BEBDE3D32873133BDAF1EC3380C45BD35BB1 67D182046A30D785A39D86BEBE4376B5B2789B73EA55CBD2C3E084A94BB4FC81 D28092889608A22B413906253BD72F724C3C773C5B58AD2CBF178D7ABFF09C90 FAC4547D142A7BBBB7D26A7D727E3E9D56ABF5A77807FD5F6ECD795AB25A1DB5 765AEC7BB25ECC8A423AAB94ABC29893430070ABC5067FF05ABF6933E8665E9C BAE04275D121FA4EC5D36731427F030DBCFEFA9B5A5F9FAD1409C30121D38BF8 3DAC007F3832747E9027FA84391B42AAEE6DAEB4C053F6FBB59722C93B17F730 686896ED1B3B35C41E219487778E9C18114D486ECE36C7B67C959CD19C80F658 91C0FB46A741C7FD7493D3072F5A5237EF4981CD4FA1608EB310C266B4AA038D CF508FE8FF050CA91ED4C88C2F32525FD9CDC36B10FFEEE974465C10870FAF0C 84C3BDD96758C788A0D3C4F85B41E178FB50012DC7EFF8D1034540C09D7853D0 8A00349D0CB9323A334B63B9C8244B2C538C0FFA4B5028A19E318993B9994A4B 60B248A577916C31BD63488FF0FEF71C2C62DF44BBCB72E11263C21B7C3094E6 6DB708AE3A8C44B02F7A47BA122D49B8E87EFF089408B05B8052DC15354572EC 46D2E2F9AA85A368E7D833066A4C4AAC738B958B89119E3C06B04C0A7B43542F 2B8E4F7AA31AC1D1D6A3B1D931BDF4D058AE309BF0EF1CA58B21B128765F4A74 34D5677C6AF93DFD26A0C50AA55E9D23A044B8D151822AA4BC9F2133425ACA7D EC94A7DB886B735C41940773FDCD2E216FDEBB7A15078B28146F75791F7940D6 DC9AB9033B1D896184D6975A130775AB53C35F5948DBBC2929639EAE56222250 890888CA2980B8F7B8BC3CC00FD20C68EAF109AA66E43D935408747F6FD49DB5 9E334F35D9CB5F3E8F613A02056245F5BC78F967AA11E5A44E59DBA31B397D18 EF07BF60444855A0E3FAE64B4C6EE410FE0DF02E030417A3CBC3FB7465105479 C083DAB1688FDFFE021E0CF18F749539B29EF5310F77C628E1EAAD5631E0E05E D8EA5B32D5EA7D44B3D3C50AE7DA40CCA8FFA1B05C64495C602C681A12262E19 7C7F6B5DC379C1850F1F845BD453F75D0923BDB4D342A4ECA8A1665A8D54E234 6265C6E66612F7DF68410A19850BFDFD213F5C98EEECE44FBCD35DF2458AE8F5 CF11DD6488C12D3C7C8001080FC8705BCE06B41CD3AAE275E50937ACE6E8F46F E8D61AA103A47D7EF9DDD97826F0F9618B22D3B0FC1404455120AFDF403ACD3B 7ADE10C8FB190804D88BE0CBD7AC8B9860F60CFF133889A61FA44A2A645A0284 5EF5E5578944BE389790E79326351A17591B5BBEE3F1D5BA917DE85878AEBFEA D1EC49D1FF4F817365BCC6C4F410FBDCF2FD1993E76538871F43547B64FD7B19 2E8750BF616632C139EF9250757EB0D9563B35637CF0C06E92B234A6A1F9A87F 2C0DCDFAA8DF6E125A01A9A8C373D3B87CF3B2BD66C3A256C45520C5F73CF03B 5F40D3D446F8160219E589DCEB8A49DFB6C51E17E7075D31DBE99C3B2ADB80F5 AD0A215E890F6BD307F47C0513CBDB8A1CD1DD3FF78C3EBC3351F3A1AF7169DC FB97FDFE39100B8F687389C27C6481C3256FAA963642606641C1BB41E3AE95C0 4ECAE12C4A7BEA925864C44899B9203464CFF86487D08DA4F77A3999D55666FB 0E22FCD42011CD7DC9DEAD8EFFE9CAD27F337D3E8813974DC67AB2D3850B1855 5AF5FFB3C36D2D6F6D035D34C9918D865D11E72EA77D905EE15405E881C98978 C7B815897FBA4A52AD257C81923C9B5EB37C9677041C6DABDDA81AE03AAA8BE0 71C21528C108F89F298E98AB607498470DE119C737BDC3583DF47BEC70D30A79 18DB1E91A2459B8C4FCCE142BC043BE0C34039E8FBC4A38E3F49FC2B70E7F64C FEE03916E04B7C766C624B979F7E83845C4A7D75E6927447A8BCAC4BF3C2B1BB 8DABB0784308A5C99210134D5C24C0A6FA6C28D2AB97109B35D16C05C8A19B4E 14CFEEFE23B7604F8B5E67ADA8D4B70E7F9813C1A35D234FDC204186F9346CA7 6D6D8E8BD36B1F0B0FDE4E2C2F7FD00C8A260679F3F040D41278A0AB69ED7270 E136B7693EC1B68BB13FB88DF2CA253D4BAEA583E60E4A311738D68B639468CA AF60897C7B84E1A25D7A9AC37725E20090A057CAD89ECD9F6C82289E9F17A9A5 34D3D1E2C235A7DF722F4447980AB4DF86FDACF3AD7568A87E3EDCD3C7031379 DB5D54F253E2E442974B59DBCF968A9104709A78CF69248B9205835B51C731D8 E3464D359E3A2A0693388B4CC092A24AC2CDA9011A9769C26E625F60D96CBBAB 938DB4A83BF95EC0652BD3AB5DCE690C159AFBAADF06A57138E8B046D82F7F41 B5621EFBAAB6FDBA96402896A109B4964395CE15E335A711A50DB364FA962AD8 D023344EBF2585773F086B71613C51450DA8F979F0F4CAC115124298079AD812 FAA3B415C22E1E67928DA6F91AA8A3494D16B2FA4024AEE56B4F4531EDBD6D0E 1955744518FE5E55E68CAF23840AB8D41D0E4A94F6FA75CD03C35CA2512D94D6 F589DF48E929F12FFC1FD852FC62B152676024F387703BFB2438E7DB424FB459 DD674660FB5051BFE9A08C5C11ED5B583CDCB360980823720C30B3DC1A84A3B7 F7357A0CB6BC4C1F7E3711382AC9C22CBD0DCEE2F8A7776080025CF12828B512 A4662A307BFBCF0960B43BA3BF8F64FFF7751171BF2E64BC40AE72343CE77C45 EF02AFC9C80198A6EF4CCA2E870916C7D19351AEE232ED9F85B19DC63FBA581B 7C7993F02E2AE60C44E2E432606AFA95D75F515579231CED57C660ED1AB47B65 8560D83798F1146FABFB1413C5E508CA40D2CE7D7CB17BA7B7D950817F1B57D5 11FF62B63DC16158A7681F10D840744FE837794F55776261DBBC01745BC8B4DA B3AF421113428A486D88B40E94FE5016E0513B79507DAEEAB30E7504F801024B 9418A78752DE9C993644800B38EBCE36E0111E0A45D029926168DE42C7D4E164 4A0EBBDE0E8E9E26BDE91F88418B6D90B855B2B1E76FA47FA2ABF78236358296 07F6980EC9A453064CB2939E80C52BEA732A4384D96803640CA99CF0BA2B1604 B2867C7E39A790F97250F187F1DD3DFD042750F5E9D07C6F13DE7EFB6C8AAB1D 6B8AAE88BF572D83BFE9F085084D03D1918E586C2C3B4ABD5EECABF0400D41FB 6C7E164E0706CBD13355FF5609153C5856853270F5BDD5AAEAA6F9B55852605C C44AF0EA668F023AF7DA31EB049128CB33943CD9F85FF581793464DAAB4411F1 4DF396CC01B45F15CB2104ED2381975C4773CE6F933ED9B6FE4A0B0D97263AA3 4F58C70AB7EC89CE18764C5E064509E0FE01CE03D045139760583877C3CCE80B 8A0F0FD10FE4587E8D9681E5A0AF63B2D5B2BE02196C0AE5A8873D8FDD60F89E 056DC0B67B7F0724D18CC0D73BE6F547201849CC5EE9C5FA5C0FF266C414C4B5 C43739F57ACCB86C934B8F5518BE6A0EC04930E0204F70133FA3C799CB555CF5 A1A5106C85464253F2E8593F71995AE48BD13184AD34BA7D493FC8C2B41EEB8E 45E49FF53731F3A65BDC2B87C8692CA2E9130036C7A481E78496662795250B37 5BC22C776535E05ECEE2DF75961A17DC034B08EE97EF091CAB54BA3A4B7322A8 6CBE22BC61ADDC9D458E0FAF6A233CA0A1A0D315AD4354D9EE17EED9A46909A0 1E713437506225824807EB4467086F3E5116E7F29C9F286095607733B8FFC589 BDBCCEF2D031F5AE1BBEB2F59656ABC5DA1E4A9BFEB3F45EDD9B1DE8122FCE3C 2EB0DFBDB00EBCEBED06D9288BE46895C4D2769B6181A064E0AC3A271B564D23 16DE5129A81E803791DA392AB382363DE32E32A82FC329D22CAD1A85BE92EB02 F9EE3B58D3E7EC194135CC0FE04918A968AD740EE6F1783106D25B147A4458F3 F428D85A6723B70881DDDE7FD83A550E73A73D46B504DCC5A733C2B4FEECA561 1388486A7D7A68A1602422DCE8220EAFE37795BE8AF0EAC3C3A4C76B6B3C11D2 6DD9D3D162115C751726CBF08AA79346EEC400882497AFF6701C3AC3ED041AF4 D6044375CFA5E532DD9C794591E06B1EA41C7F8425A4AE4A76D2E1B882436BB5 77FF0D9453374D55E5BDB95D33EA5C7B93D24E0B7D11234A92B34FFB0D73989B 4D44CA5BABEB56398C363C30D964DE2B4863DC66CA320B190C33A9785DB9F6D0 BC0F1056F7C5C1495EC1B21C9B01E1E01617A53B65DFC9183EE36D47617AF30F D3D84495672A1E7047E6726B2400A02DDA8A3A519DD2357264AC32A574C152B5 B91083BAF9D8CF844660E3C664E98FF31E2C8F1B6531D9C15CD78B3A264F66CC 9521FE100B951D45F60E6B84CAD9329CB70E48B454CA30BA784423002DA0C61B B4B57D197CC29F5DB045BFE2E62B486C7CA2950E400CEA0E12FA7B741B959F70 80C9C4CD23C842CC727784F1D68E10A1850CAF1061BA9E29652202A101DFE917 60BBA9651EDD0F2EF39B910C092F0C699C7FDCF611EE97EAF4356900C2BC0A89 DC828D686E88ECBC90757384E514F5F942B2B6A76FAEF43C22231C104CD0F2DF CE213B60BF870167C50F338332C1CFFA907BCFC509568A2DFFD94A8ABADFC7B2 73BBA9633D276985C5DE5E7D2455A61B6BB7C37D9FF62B8A3D5235B89C65FEAE 5791619AF4FD2696787688CD8D6A432915F0AFC923EB75A3A1FF000F6680F819 8389A24BFC461282759F0FE57FB0D08F1E9B018D43472CFAFA5AE0A43CBCF334 4EBE536CA6377C46531C7F4F9C42E887312DDD44A73EE8FA6E9ADD8ABC72014C 2198B720BDAAF9B018CCA65BB185CB62E956894210F7628F4B86C53028CF8327 2368E8BDBFBF08597B7BDD1E99940006838E4F4B2363D7B786424C37DC1AC159 E14B573F5FA3BB5B1EC936EBF7EB49474F8587F9F77CC4C3C3D4621CB69D4BFB E7B87E8D08B4D26B14B452A6704BC932C1F8C677FEF1ACD4CCAD65EFCEE2D060 7912B64E96A15E88D0E2354BF2B88F936D7E289BCC279B6C1A4A35491D00791A ADB1FCC2E98B7F9684F9F06C196A8C783A2A0FE115D053D4A742CD50B2FB5B14 5D2BCE316315F90B23166E05AC2154B921AC129A0689D38CDF85029FD50768F2 1DD26F9B53680C95651C08EB47808CF131B4F41A6DC7D144CD24DACF2A999049 67499A9BDD158620CCAFCA6C9003F0254CA0C6E0462B9CF35253C9F95DBC01C0 03E775C82211886FAA2085B487D3AB1AE8869B0C8BD0767874BFAEBADD2DE1CF 402E45DA6E7D1D42165DF95B44EF1E6E6C4C0BA3EF9E3E20E6D4134A983E69C9 08F3303A7489A9589A7120B0542E5C9DC4FDFBC98BCA73289D15D1253C178DBD 80655725275B8FDBED647105575A78AF67057F332C0B9096E07B8D1724671516 A5291F6B207ECF7D4A9387ACE82DF5FBE9E4EF2915034F2FD2A0C7B715A66A0E FC9693DC5A7B76F6FCC9413D6DEA45B4717206948F0790DEE2F3A3A188BA9634 C1AF6E17A53386D58A6154829AA9E22178A956DC83FD3C9A97F3FF59F5CDDB4A D67A248E7FB43626E29E50804F5446FEA3B79CAA919B220FE081511FB2957753 D814A4E96C48D3DE718B7357B9C804D2BB0ACF41AE11795AF80BD1FA3957377D 8D0688DBDFF7417621E4FB2D1C067AE3C56D6588C87FC649FE9AA1A09E208ACE 70FA7FDABDB7E5DCBE43B4F5D09821EF0881286943FEBACB0B1698C806A16DEA D1D49F05E2745724843A2A7DC47155F4111B9B1826FF17C8CE64E8D1033DBB6B 9B0E37E64D8C959BC7E609FFF1796F8141E0B6FEDFE41F813932FE2FDEAB142F 6C594975F5E768B2C35C835AA49C56737E7964F16D680CE3200A363F838C2B27 23604E88D9B8B8589D61E6A81C32075048EC89BA78042F4F4E90EFC43DA58125 F458FF5B32A7EBB896C93CAC5DC63E7E9D18B4A2E5E8F9DAB7F41F4CD1DC006F F195DFA42AF34A558B0B7ACBC2D457F658C08E6DD2BFCE101C5F042194C87718 BE69D3D13DDC30768EA8FE7E5F3ACDF9C9E18FB35CDDF3ADDE803F86C8373D11 1ACCFD7441B550857ACEDF2ABB3801B3C63546832C7D2F20CF010ABAB2211883 1E8E2DDF8A05B788F9B2B52528F5CDD744A471736EC044C5AD3E76F9C30BA564 0CC011A3DC64744C9249BFBBA2CAAB2B8822C9802840050C2656B777854630FD 2400AE451788B253E385B4CEB446E6C413AC2121CBA41105AE26FE17A1444B48 2D385D7DCD4243653F34AF61BD7FA42875D9680DEA5ED837589BD3F48909D962 15BC5EBA882F8AFC635B65340BC52BD806C3E9CD38315BBCCD20377E6B5F11ED 633E21C0A259315953A8C52AF66B0F900D8603B8FF76433B877356DE653BA19C B38D8DCF4F380BDCE40732C3604B51B8469396AB877DDDBFC22F7B8CEDDD9178 6EBD50DD0AC5937AEE364097A6C75D64A9DF5A0B583B348919D1CD44ED961012 C1EBBA4CDF2B0476DC49FF478CDC660E195C4A2351E0043A495D71378951B133 5CFBE681CD1DBAB0D8234EC71CDD104A351452D9BE002829CB7BE97544C51019 A96E8DB1AA747F2314EFBD3499B44B8C5C57BF217D55998E3F8CFDB85F0AEE87 CC22540423CC74BB7258C3633E30BE4CB0C20BF1302986ECDDABB8049F04DDCC 80A8EB3256D4F71A73E2674FA5965AE9B02AB1639BB6E386A4F3E0E32542DA84 2ECBF880D012BCAF6F957BBED68818B547B850BC3CC88FB685D5DCCAE9721EEC 85A5A818B69B6F9749A59695525D9870D0E3474AF079C01D05326C1939B6C738 4957434011CD65CC6B99A6446D282F24AAF122E2E775E9739728A02079F5FC23 95B8702136A88C2477AA18239008CDF7B5A85EE091AA056996AC51CF2D8CF73C 4DDB6321E7AAC67EB2619232974E615A1C6E2A6F9DA28C5194788BFC7AB27488 E65611F897EFD40B53B6998E29D4ADB8FA633EAD73E28EA792F17BE4EB2BB748 7BABE37E9A052C99995F33AD2282EF6F1F2CEFB74A827AD1B6597F99FA9CAFA2 50939F108B6F088EF782A1C0BF0B168170F4572583E2F494E9A1CF4F7E51A96B 56CD35F87D360AA89A8791CDDECF65AE3B0D280357FE904E6E68D454A4C0C24B C002922E7DDD5A4AB74126A29CF041FD1EBC361BDE9E53A010AE9C40709A11B9 8EDC57EFEE4F33CFACC4F2707B640080D31398D94C2F9735B4F9D714914E7742 2B6E09283D815381FA73E6DCC782B0D1CC36B2A19CF68E869F46D5859D75C66B 48118FB6160688B587CA4BA296D430A99975D57AF26E75762B7B355DDBC9CD81 13CD6C4251C4DE76EAD40DF3564746B7F517C47C9E45BA274E620E23B079F3C6 1FEE4CD7639318C25283F753662C8BF80BA4F75A9333932A9F5E821C497CFDF9 E1D0E9C3A6DC81D1AC0C0CBD067C579427294F53D990B4FE2D2A9EB8A4373FEF 21C5955E5B214F3F93112CE6DF231F280EA2862D52F3608ECDF3B98790A496CA 9D8FE9AC7FB33BDFE79F02F49C462248D384515B29034D469B4CBBB9007ABCA8 60194CB36385CC182656FECD102FD466A5291461345433B28A935C15E7A950D0 1B4C0FA6388A8C6C4F09238DCED21EBAC7ADB3172A23E938F6B16321175481FC 80422053DA697687B2D942F75257B10A44A042CC7F39F12DDFF6210B4D8AA5E7 A69ACDB7636C15F8657C208CE886F1BB4EC756A19875F6B85BA07A0270DFB9B6 6960752C36E9A703B788C303D9F340F897CE210DFCCDDCB884695CACE130F51D 69F7442ED55DB3D0B6A63FBE7FCEB01516FB256B6BB745E4D4D8D4EEAD9BBAEE E54272FF36B049CCEC583D58E9EB1C9B5E9C0606DEDB6DE6FC0632BEC4B2B0FC 6D423FC7563FABC5982219B05A0297F97DE7055209A6DA7DE184CD50FADE0BEE F9EF9EEBD53744EFDB1D7E7BFE794073A47C0EC831E4234B91C29F2C608041C3 7CA96B508736F870FE450C1208A6F745572F4E71A6E368FD8DDAD0FF99461F1C CB69C12187C477DEF0E68121CF672F1EF8C24F43498A6C81609FCBDBED729E38 E6E7AA21FD40C50349DAFB0FAD248A78B34ADAE9A2B6851ED16AE03C2B26B1BA F21175420EC80D5D53136F4EECA305CF61BE629CE7AD38F78C031AFB32AFD19C 0BFA681693AD3E704ECA8A4D413550E4277E141D2665AF0E8388C33A3DBAE517 BB37B32859664FC9A89FD04F137619187DFAB3F31F0F58C23887DB96B6A96C79 FB3D2C43022D75A2EC138447D5D4C95B6572C2F3E34471F64A755F0BD143A288 E4A624AA6CB8E401F5ADD0E5F1BA59301221374388255E12030397104DF7354D DA92F6E5032C6C685479F432D075199B263B75BBAF262DDA8DA195670285BBAB AD087B0826086FF769E7DCC3FCF7652DC99E80C651424CB831DDD8AB89E3715A 7E8D44553EDF26B8E1E0CE1E8F2646379AA8088F97F71B8A5B1C5606331ADD26 77383E602B1844CF1DC84466484A5C0AE28DE55930B4ACE039EF8EADB469E8AE 2657BCB8D73182935DC7948F8D2479BE1334126C838C97706510E7C52186E4DD 5CCE4433BE1906E4141A714FD3E85477BF6DD48E911519A6A40E39B4D85CDCEA 3EC4C010AE722178E7631297180FAF3500BD7816F90B0135B6A5B910D6F9DDCD 8EF81E29AE2C3395B8A4E81B2E854981A7BF2002B94C580E8425ABF7330293C0 0EECAE954A9C484E313A79E37D5A14B56C7388D339B94182E411816890CBE2ED BFA07499A4BFE12992EBBEE493267E72B53B3AC3B8FA474B262ECA0706AAF210 9ED44BEF36F8FE6BC544FDDB901AB0F494983C3B06F8FCCB81EA5E09437A2CDE AA987445BDC5440086C967B94498965AF8D631223D7DDBCF66BCE0324462C59F A5ADB8F09E8A453084861093F3BE2EF5B1DEFED3270095ED97C2AFE66C11A09A 48D0E652AA4EB71F4C0EBF013905435A5D840C8D41796C271755E8625C240528 38CA99C79F6833C5DF4E35D01B8946FD7E5E1745D1E6B2CD077149ABCE15DDB5 60F07EA4B9B29BAD932A6FB99E7B4ECD4F268DC3EEF3937FBDFCCA58393D4401 049C312067E5A706CAC523866BFE170633BBE09A715F91FC17B5C88164DBFBF8 C32CDBD6CE9B8B1A908334F7B40E35E927D9D01597157EB1E8BFA3F11801B1C5 4D068702E54B307FB4E04E08E0428DE4983842178A40DF77A43F3693A111CD84 E593659D457D0A2C8772864FB7BC65B31E2F53BEF6B595B550F67F03676B4EAC B1FDF08156AF7808E1531A916082CCA8756DE34145EDCF081C2747F1379A45A1 35F0E670AE2BAEC5042F40526C269F723BE610D39D1887A975FA6E2799B0781A 0E0E6740457A9D0242ADBC6080264CEB11CD9C19D0CFA1AC691F663A4CFC7189 26F418A0240920C2855DEFA0BB368DD2E473711B5A478583E300D06987D505D0 9C53298CDB022728AE37F0E1BCFE409E42C7C4815049186638A3DE834EA01C8E 2EAC767D6EEC4C2C29A5D4480353662FEF59B7FDE32C3EB0C957DE31F68C022F 27776162E85D90996970D7F0E56E1B7DBB595099F786231C260F84B3820DC0B1 0E4EA678546E9FEB2BC88DEB0968971067A944EC15DEBD4CBA0098A188B1C1EF A0BA5E8AE38204D43D8E91C3F9D5E1B7DABD783E955988A5666938054A67393D C75C88B0B2CF8989856BE697E4B68E32ABFA8930F4A78ACFCFD88F4ADD32AA30 245EAEAC74849D9996F893295BE051B296AB0E86D714110BD9775A5E103968BF A4E282EF6E3072D2973D72E2186CFF7818063DB0955CC9AEE3FFF15192D3E5CF 8147A8140708E241EBFAB0A4549C369DB5BCF0A19D0285470C8C8EAC6DB7D444 753DAC988B75209B6C023E132C32ABEDFEAAF60C2DE3445AD71C4403107663E8 DF1FA1AF0990F8133AEB03604B09091E97C0B4FC7694CA9D28BF9ADB91964486 8AB3FF20674C4C7780D6AA0EE8740BAB2BA3F842FC7F2A36E74C60D952FD53C7 B9C228CBCA320C97A14FDFCB6546E5E50CD54CF05D043008CD1BCB00457EDAF4 36AE3BA4AEA9BB1B9DEB916478BE7A815561F11548D314C891C027799B8A1033 79C1F42DC86A1159EF7FE9343AED455C3673317F4D231A59A5EC2B66B1D4D703 78255A49C4B18F092978EEE20610E9D16A2F444FEB08591D070C2175FA58E78E 68CBB15F952313263BB293DDBFD1BFBE3218F0897D78EB33B16C99CC2D6198C8 87F255E673F795009E8C759DF944FFBC02886D86530F07FBEB28D509ADBFBFC4 60106BBA6CE53F065FEFCEE9E3A12022AD56599448EA0EDF06FCF50BA3BD5279 FD6D59DC127C52DC2464906F58B051317F9EA54F31F2D4FC8C6240CCA5758B6E 25A47B68025CDA3A340AD3BC64AF9CA1FC1E9893DD30248DD89B5B33A98CE008 CAE4646DD3D9A4444555B8AC4C1E38E7293379A7091753548DCA089A69ED1371 87D7B45E50471FC2C748FC63627B7AA2FEAA545C7BD06176A52E051B8B2889DF A309DA056F621D9824ECD0E21938D5651C1A57A55DAE0EC6D70DC848CE32204C 926797C08D336941E66416F0AC6CBCF7B70BA6B49067EEDD3758D7B9632680EE 9F701116A1CF246910DE0B122D73F9AAECF42A190A2B1C334E057F2B23735A31 0794CAA2A97C3DA9CECC7A48536FA4785F574F0818C491BA2F02171648E1694B 85BBDFB26DD1324DD4F7AC4E2AB98FF2D25A855D9EFAB688A81A58BC269BC0E2 FA781EDAE409922EDC2E5455550EAF54502EA294EA18BF69F86B4C14E72E97CF 285863EBA043CE01BBF1F18942E0F8F7CDB4E7D07502E9F2EEE2CE4C34B725EA 248E27E58FE1B7C6C0816FB4BE4FBF6947C4ECA9E81C5DC1FE0EF3847939D0BB DF1703E02F1DDB466D48F54446AF78D338CF283C103BB00D1F692A141A94655D 50B57B997C4288D81D272559FE65A5ADEEDB0DB5A1376022B3F1C1F8C2951099 B42C0E913E6F709B9B03348F8D42C296EF83E584C51C23D5A2FC0D8FD5C3EB2A 6C6B1347EDBC100D769A2A90C1698D68CFB527A95B8109602B8348A402FA6884 3A5A6C680437C47927F02039A657BC72BB6C1906711040D5F6D0C958B743FE51 B57AD0FE292EF70FEA022EE792AB01CC50B5B6315B42348670A559FC3E8658AB BCD286EF63E92E421021631E7B9F64B693677EFB4FCDFF6A7F639A8896582AA2 DF245D64462B1127191FA3B1283D0DE84D1EF9E375A8A99BCB8777E32F9C1D44 8888A7BD7966C413FC19774EB9909C201060C534BB51358D38D4CADC670A2875 96D8C9BED22CF281E322340D1ED03AC92EDC0E20926E982FBA2ED161EEEDE9A3 B552DDA8502E90CC6F01CB692A6380F2305B5B750A7F555F00B74F28F3A2797D 6EB35A2C4E489BCC4A579831E92A46238D7CC3BF20112A8996A77F163CAF9DB2 EC76AB291266FBCB7E57BC73B79E4FC46C3BF73BEE76EB804BFAD92C028C370E 2C6AA354A2FE1A080A8B5EA2598EFF354FF35AFDC4FE099DC5DCC37AA5231ECB 24067C112E3A9329D3CC5C5DAB348A68800F1214EB3B9B690DCCE6B0A5CC534F C282F2D467F4ED43DE067C748075FADFA9A65B77866D3BD7A93D0E52FBDA4335 08EE3D2E7442DB3927A1E4E33A1ACEBB512FC3CFBE1ED82F45A505FE31C58AD2 C5260BFF69F3927FA4593E1B5F85689AAD39F4C0E582672190A8160940E33756 F445860AFF589F8F83DCFE5E9C2583635F7B4CE01AC72C464D4C2FD1439A7921 EFF4F5C7D79DC60B471010B7E9E0145825C50315CF081320952D5B8C16A43D39 F497953B1CB20D770117EAC43451E0DC8650F185EF6D3516C52B358FCA91CABC 3D01B2B8158791C422A7149FE982D4928BD2EF214E08299A1144B76455CE2D4B 4F8277F1F1DEA40EE8EFAB9A1A692FCF7BB4E053ADB0691069E82026DBD274BA 8FAFF2E0851B9BE8242BB60871B36F3ECCB88C52AE919FA29BEF1596E860306B 26D2B7211CD4539754A50BC8C63B68F47D62D09AA95205E40A10DA86336DC31D 978AE357EFF9BC75328729477670BFB64B1A8695CC91AC0A9A526037A8B25E62 F4CF3A5CC6CA819F5BF02ED63E92399A6AFC2467875238C76BCF4A008D3EF06E C72C5DB04A7DB8E4076B33416C3AE0864335F9E87568D4351924F3793C911838 6966AC9C473A70E3C5B5B60EC78E75814636BEDE8158DBCC11A3522FEA71067B 5036B5361D36F7FBF19CE26CE302FD9BCB2C226735C28960B8ECA3477E3370D5 A545BC470A3FA1EEA824A6893B2F30D716442FAABB8D66FA9443E2DE1B77CA3A 4B8CC040BBCFCFEA386BD49089B6E9630859E63CC9BBDE51C468E6016B8A1201 84666A4BD694C882BD523EB15EC5F4D9D964F62E6A6453D1DC76F984FE2E9C4D 3F975DF8C1B0A3D003233354A9B664BCB174040A1DC05BE656C1B65E2272B319 BC3DEF5611C580400E58E52E97BBA73B3F0E469C17BD8D86AEB94C812BD42A59 A6702B4E0BC2A5454079DD02877BD7EA93FD4B9FD50BC4BF932357B9FB143E5B 7225BC38085B2D7A81E5C4A42DAA71211DD9CFF4D0FEE27C3833F55CB50C2426 E0D925953A45EDA96DA80B7B11ADA616D74449AF119A9D90D9048861188EB63F 44991B95764C63070D7F54B512465228FF2D771AFBFC881E8CF7370663520DA6 E0034E19FA701FFBED3CAA5319C8B7ED26AA0A5564D3B5950817C1FBEA873C89 BDDE8A30910A0E56662E2E67776AE8FDE2AB575A7BF891CBDB2FFB83DA06B376 A25AF6C5B45B78C04921BA763DEB5B0D4616DD840F120D70EF8FF6F5DD8F4013 F26710D0DDAA0C91BDA7F8F72F151886EAE62E4BD5DB1C86B540A6A188CB10DF CE4CC8E6D78A7CBF36BB96FFCEF1641E2AAB23D9CE34A6DDA42ADB4C5AE8AA0F 5DF17E2DA1FD3F35CC5AD267DDF6D49A7062EE1E88F3F529330DB8A3B4F8D5A7 F8CA839702488CCCAFCC7A118E99C8A78452C5D46581AA1542813F7D0F2868C7 78308FD01B8A6485EC0DF879F2FD257EBCB14A3C285EF18A996DCF3F2F2C0C90 5677CFBF52599C8B617966A7346B4100A278DCDB5DD31F348AC7C44B5C561E5D B85B0DFF7D572D197C47CD2C6954104600DAF42A0B8DE03CF04616232C8C1F44 6ACC30801DAB954F7BFB1A03908CE0930FB46098EBB064DA4137FC93CCD3F8BE DDA1B358C250DAD130A841348BF3BBDDFB6DECEB8AAFEDA4C0287830A6C9818B 4F68653FA72B377F290405606F8907247ABD8FA33299FE48BF5891D2376B0E73 FBE7E617886A0CF6867509915E953AD6D11F0A85DCE6658A6C95F4E032803EC7 F8940CA8266D35BC7832407E5E821C147CDB93A369F8CBD50E94A8F331FCBCC2 DCFBA63BCF28F42D27F8DA3B863EB22F6E179695DCAA799640617CC29C7172BC CCFEBB2FBE025FC4ECF231F28578FBEC260BDD1335E0DCFDD69CD190EC73FE0A B89A4CA1D92EE068682BF6E33CD8D6281C84A6FC3B2395D2A71F6CCB18CFD583 EE468601B1DCFD58904E05F59934A44106A432F8B09EBE3D10BB366884CA04BB A957157CC1D37A7731409B0A14EF6855824D16BB80A03D9A77BA3697D8A03D39 6824CDC2F2C890197FCC6E9FEADF7C52DCD5D596306F79F05245587B91E5EA33 FF720AF7DADD9B4C3E3A8F9341B7534FD31FEA67AAE202749CA520C630EAED65 D18A566156A7DEA245A1877185167BBAD898072072F61D504B5E10823FD4B852 72EC22955DD94B91B525B6766AF5D164897FFCA274FE8FDC6D51B01ED4F29722 59FAFEB9A4F190E710F89E9B450CCD91C9C1D0C2B959E69FBB87C17BB51EB85D D9D6AF5A7C917D1EDD26ED17516B75141554E566A704106EFEDBFA737C84FD8F 1F91442357213C391404362B812D162799F7CD088FCB7D9B97D53F908D49EFE7 6D8DA8CA8D3E088A0151F90F13A3D58ACCB76C95BA144F3D5EC5DA1FDB7FCDC5 BFD2407410825BE7564A9EEA9A5BFD697EEFD902CFC3602FC7C0F244A07A6617 01789EE849CDE1D1DAF952464F19B97AB5D9ABD8B685AD7CD0EA889A6058F8BD 2B545652D4FBDE3109389805B3267EC43BBA7BD574246B2B0F9092372FCB5606 2670188ED6C232DA82829928D64A1ABFCA241BF0AADB6BB8C3B43CF0E196340A 085A68217662570AFD85DBCD318507877DA6B2CF10E9AA43A0D4F0C6E321590D 735BED6CFC59A54772E71A699E20C86F9E7E4D06FB9333C90E7661CE4D99B15E 913E1EA9194EABEF11768EA5B371E425FA3997827C9982DA0C9539137CD667D0 60029D053660E1C6F029F1A1AD2CE3822149E099CA0E2D7418AEC07E4EEF53DA CBEFEE48DBBE75AE5BD452DFF704468D6C27402F9A3613EB2D39C75BFA354F6E F701A918CBCD5F4D63D804E44AD394E20954DCCCC00088FB5A5A2D7BC993209D 0C6D9BEFD4977767A2557904484CD558A813D266753BB92FF4B85BC1658187C5 27E65379727EBFCDB7A7DB5F9150DBCFC378EC75C03CEAF423B63D38BC3040B9 7EDF38E5481D209D16F574979F617C2EC6CAA8C54E15B0E9C7A4868B2B61542E 44E0AF1BD483C5F940F31ACFE6A504958E77DBF20C888D03876A2096DFB95D66 96DA1720125C2E8FC117FC409905AE024B3868942FE73D7A3FAB1C720970AA75 9E7F34F148DCD07C6033D3DFE363C7699CDD36C21E4758A8C3F285F9DAFC21DE 21B7CE7EB30D297A1F32E0E9EF97A1E3A3843F33C6416FD2A6D69813B0A01C44 A7C611CB973BCAC71AB9FBC398984035426C2BF83A9A31C545DE1CCC08FFD609 9E860E736C21FCF212E568D641E6E630E8A596BEB568ED28D5E7BFC4F8546A95 8C976E8455139B64499A088196A2340BE1F92C8D5F065C1A593225EC588D1965 2604C6B067B8911CEDF81F928246D310D63D3C507F5AFDADA02743EFFA059358 EC6BEC194C3FDE9F7F77F541D506F57E9D3BD1D335430326FF3AFD2E6B020ED4 BBD48DC911DA5250B73793EE008AD9BF0F82F3B40CD3C5ACC8F0C4053E804F85 E5DAA62F9B396437B645FA8A4A7BD31AEF69DEFF01C830B03FE7F9318F80EAAD 871EBC110756901BAD048A44164C80A240281756FCE652E32F9F59B61EE98213 B1C572B457288573F12C7734E2AFFBED47E6CF089D45BDB818F7846A0E43CBCE E19550176DB223FE2F9AF3835BAAC39904247E8FE5EBB992F3BD1809A4DACA78 528423ADCD26ACB039F920041BE1D4ACADF45A33DB0149D9EBDD7B424A17F38C 7D4C1CF23971D0540998C45EFD846F56D756D7B1B009D0AC6BD23D0FBA6A7D5F 8F0C8812D579F20902FB20E06A1697E1C62BC66971D3950CB2435DE534A67009 E685C1C5E0FEEA52226FDE5B8A4373432FB3238C427FEAFB0D9DD830E585A8CC 8D77898B51AD3F033543FC9ACE5AC9E30A9503C762009AAAF9B8BC446EAE05FB 3DDC98B5622127200DD17AD2C5BD7944D6E32204316A2BB36C2ADBBE61FB23C3 46D1F288EAB1CB6C517C9A1B31DE8AF8448EFD64F782579438EA0A95B3421782 2B832273CD5AF2B7211472490561203A533ABB2B6BC0D6A0317B5CE0B674D166 E6BC73447C12818ECC15A6172345B1AB60737668E1B495E72E47F806BB25B98B EEB57353FC061F0FFFEB19974944AE5813C5F39D5ED3F79FF64BF652D63ED315 E0198C5B4CE4D31E0B290F7EE4041CF9871B7AC81B698889E3ED1B2EB7C19B4B 2AD5CF296D25930FA67CBFD656BFD46D66B5839102A694E4EF49F965714B8A34 2F252F156D4812A74BBD25FD044B00D5DB1E5556E21817BA666F948E65E49FEE AF5666EB1C1D343C448F9C6F0092A257E1E6AA207A201274F4D10884F1759028 EF72684A4EB4F0968A7555356A4CB6EFA2BD924A4347A225E7B4B5FB105CB0C7 D585369DA42BE23FCBD0DC41A2F9CB0B092D5CBA7B3FDA1E0719FD9F7C13EF46 05AD725962AD3537A484AF14671486AC9B8CEE80CB401AB87F68FF2EFA2556B2 6E57EE157D23AD8B9D3674EC080C65184B76A95FF73E4CB041D5463A3F506F83 D86687ECC74F85E0572A8E29AE20A3EC74DDDDDC9A174BB2A2598023D3409D30 690580DE2124467246A75291D8796E3A8A256E191B74F9444B3DD267ECE5247F E37E2529A7990D4CE0A048644827F91C47B427091309042F88EA3ECA865B6290 968A91CD4B3950956BA4945662EEAFC8A8FA7EB7C88CC26D50381C68594F1FF8 122491AAB6CDA41EFDCDDC4880EF4608557B9BACAEB06D79E3FA49A2C947BBD3 232CF54DC1A25F89B1B467693EEACB0E562B1B2F7AA12761985197BE1A382DD3 3AAEA5704F2ACF9AF4F866AE891898FED41BEB6C2096006852EE6F5537ED20D0 EDB34D4ED4848F5B36E04063BCB0A1DB0F744FA9CC7A12C78A93CBBADA927D7D 23DB1E87ED7934C2F130D351B8B6E9E1C77548692D81754F9221293555BA9E91 8D8F79623E67F912F6BAF6C7050D5C11F0DEDB20C7F647E0ACCFAED97A272467 D4AFF53708EC14DFD31FB7DBA7A33D9476AA1CA4E8F1AEE9CE5D3F077D026D44 546F0AA7DF3A45568E67B172608535377C6AFA5982CA7D5E0435647C02647468 6991814EA789E335FB7B112ABDA4DF1EE3F04714E0822E1ED26DF0FDE217C4D0 2A993F3D3AA8A7424FBB088B67D870857DB0B69C432DB0B51FDA6F3AA0D660AD 20A2991C8D8A4C3B4AAF68940A643FBCDF7DDBEA2E03D4836321EF2A13FC1CF0 B0022E7B948B84BDEB5AABB620C53F5A38429E266859F2468C66F34B7A8C0B3C 7EF7B2912B9C0DEC4EFFE0DBA861F8CD581B86D22604BB1A6735AC11327BA7BF E76707636C246D877DE77B7612565017D7B23C207709FE22D661468CAF45E06A 759988E319B790EBBE344D027F7D4A6306159B8B675F3ECA619D9854C603E8FA 435DE2EA9A649D916A727C3ACB37FD4494AB24E5D0C4381D30157B7F863C4D85 D9AA3BEE2CFB0B11C3B2A71AD7E453FFD9897A1B1B73ABDFA0C6E2C795C28345 0FB96B3FAFD3D8794D45981AB62B4EC88E8FBF85391CE424FCFF279041B0D5D0 5C65BAEEE51B3F5BF6E8C2D7542C3E05F564E3B933D25C3A51A7F072B23ED0E8 6D950786EB75DB17C6D07CC0C2DA9D6C33BCAB4CBE200D09325DB2B189A59CDD 2D5EBFB62CEE0978377497195C6A333FA1 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMB10 %!PS-AdobeFont-1.1: CMB10 1.0 %%CreationDate: 1991 Aug 20 16:34:36 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMB10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Bold) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMB10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 13 /fl put dup 33 /exclam put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 63 /question put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 93 /bracketright put dup 96 /quoteleft put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-62 -250 1011 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F00F963068B8B731A88D7740B0DDAED1B3F82 7DB9DFB4372D3935C286E39EE7AC9FB6A9B5CE4D2FAE1BC0E55AE02BFC464378 77B9F65C23E3BAB41EFAE344DDC9AB1B3CCBC0618290D83DC756F9D5BEFECB18 2DB0E39996C010F3024A5A3C69C8485664A4E3AA81348AE21A30280D0E3B6542 A770F048F31907891EAB8B57DC70FF775574D6CD26B8AC9C3E64C3631325BF0A 99AB413BDADAA3B51A3E168B03A856EC7D346A38BBB0A2700A23B2CA91120B9D 2AA5BE5A359C60CD78F055253785CC9701F5D670ABE4967D74838C3B267C6563 C9651AC41D8684AD5E913A5C9C547CA225A74782D1AC62020FC38E29C356950A 00E8F2B0752CDBF81EE4ACD59BDEBBB9523AE4764B995855F3A401EB4B04EE56 B10758196CB661448A3617B83CA88C41756EF131CFCE0C968B94B6C69AEC1E9F BF8B21837BC422D766B5089D81CF35A807394A026FE3160580695B1213968D90 8ECD1611E719A871E15C6085A17906F77B5B2DFA6AE670976758E67F8A4FC362 FC7299D85ECC3C0BBAD4649B9DAB4A2FB248D6481CF0CCF274634D37A5AA4DDC 31F3138AAF10998FD66F3817B77060E71C6D8F17205F9C098D81D952E0FE3831 2264C55D73215176470D8D75E7BE6E44514984B9D20208DB3ADD4767CAC09D41 9C8DAB6EDF4FA1AA2CB285CA28E30972B3BFA4F8600DB9216487655F91CD091A DEAA34823397C3D1CAF14A0F016A4EB2A2238881A285C0A4D2850F1D942637B2 A6BD6CF81D1A3A8B0E9ECE37710AE059A3DD5D5236726BF6EFF89C97B4E1C735 DBCA03EAE44BFB56C90EC7472FA83DD86D63E9FF50ABBFE1FC07FAE9ED061B73 6B15923CAB0A8F3DCB7C607594FAA48BC5D060259663B000B14B012FBB1407D2 626F8CAF1E097ED3B0D6C7D927ACF3383909B4E85803546AD4388E63D83DF79C 0780F94D6EA3FF97073F2376B5F32B40669023F5A2554E49ADF41B8DAAFA2A96 7E97E8526E8C9560F06CC7054EB8DC6ECD9B595CD914F4F507DA325954B30D9E C647F40AB0EAABA297659126CD2A602DE800D02783E35CE234DCE34A0630DA30 4D8DD0FDF535D0787844D1DBE7CD828F3E3C79BE60105F7127713AFF26C6CC15 DE60D20474E2D690B83A680F6268A5CA43EB2FE87E06A1F1BB03AFCF1B51FFD2 67CBF1D451BE28B74971E8AE088A5A7D168BC129FC5FAC8A564C85F6B177CA5A B44B26A155F01F62BCE4B1558FB25DC1A4417AFD7F06104375140DD86E154734 126CB5BFCEACAE1641641E52094E038E9A571C6504939A825F16BF5401458ABF 7AA5A41659BA4A2172817A5E3BEF3D3DB54026CC44C8262EA6E277CB2040206A D2282FB549C7426D48E9EAB43F3BB9789818EEF7C4A6204AB944989758FBF9B4 96B99DE8722582AD7361B2458F37B54EBCC8A24F60AD86D4879F6C4F1DA7834C 3610940D0D114BED570667EC73AD1A7E2061AF54C3792CC6C750A1AA5AE43A65 C7AF7672ABAFFB2E5B7382C9DF227C2B19B1C7B512C8BD526C7CABE2E4E2A43C 461C086C3AA482AAF5A2F125C2FE3C8194ACE7631A87035623EFFC8D133708DE E98FC35C357C707C143544CAD5D76936768194B172612715B6BBD86330147862 8925D3E2CFD073AD50A8AA4F722FC49900B6FA7F76DF1182FB8D00E31E78C5BD 35D1B5FB3878CE2D4FC6F413D06D29800C9440D202B9C36A24DC703351BEBDFD BBC781C14A522F713EB749B0A817DA368CEDCF249AD531DEB063AC4530CDBFD7 244CF858287738EC1B62821D3805178230566A718F2706AD54DA8125C2CDC126 2F55612ACB4D926D81C454272DA2B75046D874246F943F660300D651AB33225B E58FAA62D3610F4BEDE3250E8AA41A32A0F5002B13805716DE870D18B89FEA55 C189E87BDEB93F37DE0044EFF9AC69D6935D454B98462D3706A9465ED1CA1F9C 57DF5A67327781627DC8C3E68EAAF656F7DEF6EE3B33585E7B83307FA49A78A4 B26BC3589CB4AB4A26CD32807F7EF504CE67110CF8E42A4A4AF2A3330D20D0E5 55F1B85F576DD093513AFB487980B8EAA54C9F53407D3944509CCEBBD75BA4DE 1D3335CCDA0B663E463762E1F6BCC7087888F60AF64B55A0C36A82E622518DEC B057FC276F48102E5600D28BDE686BA5AB10B5D14372D5846CD6F99C2A8C8ED6 9333055815E96DDB736038D11CDFA80C13D07A11D1D3A151C1ACA2D82B0399EB 2BB45287851BAF329D726951E350DD4C9249F3A72130CDEB6F42798D6614282E 908B440EF88D55894F948B8673BFF548A5C0D433A12CC81530FBDF52FDA7DD57 619FC49665480D66EC084FE9CC53F26718B834BF448A8AD068781889B828F9B2 FD04586FCF400E3AD4DA4AC3198DC82C703313A32BE8702BA6A51BF7C0FBCADA 45B6DC0F9B0A3DF67E8B964C7D875860B821870ED1E0A5FD310DDE0BC54D997B CD0B2E74670845740F08CD9D811AB0CFC041C66E0B9F95A4ADBDB341A69AB2E2 3828669C38E73DC6945025AFE95AB9A280AE063287FD6BE9C2E839EB5BF57F54 EFEBBC402CB46F07FFF3BD7657F61C92A36EFB973542CFF0DD4AE1FDA6170A46 576081E008FA75793E46B2DFE855A8552CCB462D4CCE950657C7713C7B67318F A917B5E32E27E0A9C784B88371B8ED516A521C803DF0803B345BA61EC6E77931 90C3030C70E27E90C5791B2B9E7F445622295137773E53504A39067C4184CA20 1A2420C6262889B7C5B2794F76228AD7C4C94EF20D1491B03DCDB8EACB65CAF3 04E76E27538D193FDF5B3F27552C7C76F40C19BC2D4C097E40FB95225814BD0D A6DF398E3642CEF09D423CFD170E23A6D55964C35DC077C93BA64FDB7BED2980 222A0A63B164A1D11F269EE55838A842EB288FAC228E1DD21FB17B5FFDB824CA B31C283EB253DC92208A83ACE5FBFA5A93193EF8B3C678B32825499873AA2A3C 18A34EAB8A78F44D24CE433D709FAA568C2D867F41C28DD03F6792E873942647 03E67B862CD43DFED469DF33D78A24D481D4E1F0FC52A4B2068AABD9B2B13BF0 560130578A07195C545BC512D833BF4126E6814934C6737B3B10DE2ADE50CAA8 CB421FFF27C6B2F627E9A3AD95CAEF9CAB6C3CC719CB6850B0A807A49582D9BA 743761FB4201148084A74F6D3FEA9F7A9C1D89E85336B4C1A6504971396B6DB6 33E52F63F164271EB5A5EE3BD0193044CB2F34B6932FDF9DB3C2A8CFE5B989B8 426D8F4CEFB4B8640328D74ABE9DA529AE1AE20A477C00AA99018521F817D8E3 2687089E657943EFF965D331549074783E9382E8CA976A02A325C19DAADE376C B406B6A12E0DB979D9A87CCC7C24C36F61CCEA1E5C728C737395893663ADFEA2 135C35501900A5019C50399DE9710E66E52B0CAD873C38FECC6A993DE142F736 60134834F7CA4C66D084B7F6B9300B19BEEE7FEE96D46F8FC5EFAD1044C1AA3E 6FC9A7ED0CAEFAEE8A35800981F0D22D41D54683E7EF96B31010BC7B27B41FF8 13402A66722DF23B4693CEE05B466D93203C968979FAA5DAC336E943F95ECB0C 5EB4A8B7D3432848CEE652855EF971B5C54301C8DD615A922223EF54CB46CD3D A1CDF9F5146659E42A4623F9A2E9E9F1CBFEA0CBEFA0EE3207283FC3AACACD84 979E2A4C99B24001066BF941D2BEB2EBDC448738B1FDBFD2C97AB01FC4E99CC3 42BD253E83CCEBBCE490573B3C44018C9D768FD04A1A113557E64A040280EEB8 C1A657E36785FA9386DCE479D0A228C17CCE801D6CCF4AC60AF960F3B392737B 7F04B1B687E9418F55980F986D48A7068D397DB7619D2F28EF176AC36354EF46 22A73F13C5796B334B6B93DDA9DB2483DD8CA724480548FC78736C8BD51B617A 7E7BE547824FADD7B563DEEF78E4D41B066BC77C22F78E135DDDE5D4EDBB775A C3C1D3B505529353CBEB5D650CA49442B989FF1458CD869D24235C2F50296798 701D58022B8F496CC57F323CE2E094A539822BB5A366AF5394E24C7054D0E6A5 65205E7B58B6A1610E19A1BBE5B10089233E92EB7011D43C87CB72CB9504282E 446D10F34EB671342485CE2BFDE4C564D4944AE7181B234E3B37825E48268DAE 891B4C6B4C7B14CAEF1C368BFE61654CC2493D3EB9D0DFDB8ED0F39BD9A6D711 38B5D4A993DB44CE9F175929E24CF0A4DAE157E67B25234466165D4F3349CB4F 9A598BAB380AD3BC6A12B4B74D74CEF4023615E7E6E13A3A2F3DC621AABE4BB1 889ECA08B942891940BA440D11C03BA9243B278CB93C3D1E132ADD774748B897 79230FF22CBDA62C844B6B70684288F198CC124CAFBB02E1515C4A91CCA05262 825CD47384F97FE66075DD5FA8727A882C500FAB2B79A88C14215685A81CA1CB 515B05074B9DE3E9FC7041C314FC730AB9F910503C9DC5AB5ADDA53F7027EB6F 251D749644311D3E8F1CA49E7602EA4FACF5F7B50D0017AFAECBEC1757545607 44496CF7095BE891F997D2EEDD85B114DF7829AA482AE4CD5853A4EFD733B7F6 C9F0488AAE14383100DEF3D14B19505809347B6E76B82B43E56081C83A3CAB25 2603BDF054C12BCD47D99F825A855D689BEB4C8E9313885E3E243D78871DE8B4 459212868299C6A86049EF594B8D3453C360614BA5758E61A74429BD11505A17 77BA47A4C093B1424B7BA790E78E43441446EC27FE342FEA38F097B8B647DB1C DB8D98BFFB32685EB4C903B6057A1ABAA0D93252E66962706E10DB135374A2A7 8D48D4F190D34D66C295C04B2045F2C44530D05171DB8FD68EFFE29E86F6470A 00BD1A9C2B02915B9C34F269630E24C1F1350AFF8200517B298BF1E17D86F7FA 248EE5EDD533403EAE8BF06B8876323C2F902D0637A232E768B9612C682DF9D1 59B0C38236DD468BA86E41ACB0FE665148C111AFB2ED5447CD01433285C76E6B 06BE06876649E78F690B3A8C0BF24CCCE320319933E388FE2487B5A9F3D926B4 30EC2251BCD5D276CE214AF271FB838978A669B78C647242A8EC8C61486C7836 A3A3CE5ADF812AC1A17D9FDF0D1D1ABCB14CD529BA3704AFAED4DCC5958DA247 11C19F75A7C16ECC22CEAB7490541CAA84105A098A7884135E3834221158FFBE 7B57D6CF4517482AC611B6039558F3201ED157648BA011FC90286A573E81EBBF DB3B73FF169F5A6EFC2716BF7F66171DBC527A798D57CFB61C24432E51A95336 BBCEEB6B4564679E6D018BA44C74EB81CCEF5F3F145A8E4FEEFC81D45B80511D 0952A9FD1DF31DD5E6669C7AB46CF54F01BC563E9E7662A0581965FB57C1D6E9 D256EA8EA76A01DC64793338F1BD5BE28FC0EE1AB4BEF83D11DCC839C0D9BFD6 97F22ED4C204BD4D6632BD67753C133A7F5AD8D12BEFAF73D3F20BDCBD2C5CD5 0A6C0A48AFB14F5200A2C00B27A2832DB752531F4907F537D54CF1ACC222B6B1 1ABA36E67D25BAAB623D04FB0C61DE91909E90E2E932C83FCA30B6A8724BF39D B7A5A4CD42D3759E5479786327D6D82198CBC5ED2517484F414BB0B719B9463C E8DD10FED5FDAF44998C0D5318D10B7C4BA691867DBB263E27A6494A5FF89240 A0D2FBB396D7F19A94359074FAC2B264210F08115AD71FFFEA1CA66654EB391B 43D81AA69233E8058444EB71D38FBF8A80FB79FF8FBBCD72FCBC48B3E820F502 CDA401EA5FC565673F47D1AA5D214AD346E4FEC7F0451657D5AF74B0157C5D45 3DB90028EE11C28C7F22C44401F0BBFB37FBE7B417850A608A1C4F1BEFC6C24D FDD214B2CBF9CB7107A5599FD6E3B8B59EB40EBC1CA2B12596CC9FDD8A9C6B66 4E4F7070F36D3E0E5DC1D9062A03B7DC0CDF77F50854A61841610720FFC18D74 A48DBE0B78C38E8963FA76B602910858825720456AF97E059331B0421AB27BFC 5657E309463806624B68245CCD9BC0664807576F7BF4DA6E979B0B15CABB44CD 956276F547EFA5407F69C47395C65EE43FA13606BD260E5EBB834892881E21AA 34ED428897D275AACF11D5426C9A9D7B0BF4F02AF08A1EA20861929B3BCFE173 CB56C088C0A2586F816E62BAD71627D542657B11DF01BD70C211D4EB31B13B64 CE9514B82D6179BEC6FBCE6A31E0ACC8404B850D837C885EEFFD311405CC5BB2 770FC94B3837AF3E52246C4528C370E90D48CC5225F480AC01B9AEC2F5061990 A79E7CFC1D88A6DAFB27B3C873BDAAA9B9CF1C9BEE3787B9B33FA2A4877394C7 57F11166A6B608F15525F654BD8AE64767574F6B9ED8139AD41887799E6A9FBA 2384CDF1116A5A30E23B48857B1FE1D8392462BF353FFB39C8987D1B7F5601FE B350E89AB4678AB601055185068C1960193E403F34374BB1634E450DA783AC4E B6E44169A8622798F0D1D0E40B374DDAA6773B50548AED472B4710D5481DBA81 CE2CCBAB8581CD53EF7B058DD94DD4C61C4B4459F1832F66613A9F633405CAF4 BDF663E821474AB4E47D6A875ED4B32BF7CDD399481C69B44CCEA30C96C67359 8E7E9325B1E06178E0C36C78E363B5897AD7278AD5DDBC583A67173FD5337D17 DD87BE94A477165E9F022CBD9FA9ED77FE948C66926688615F8F47F14AA30E75 5D8B13D6AB0C1C04CC0B187C0F49D1D02EC5A64DC33E3B2A48783C924D00D625 490AA3423882AA308DB5614A17D92784536F2D1FEFC4A5818EF663BC6C36DB17 0017D920C503C62C382E8CEC21D481060122BBA70D49D224126121E4AC0EFDBD CAAFBEE6558D7496CF87A22FE239A891517F8E518EC0D315C6C45457A7E165D4 C9AC486088195D342BAA017302A9EA09239E47C74A509B23108E896432B02907 78720F5A91FD5C5A9FFF663DA2E9F51051491778AF8BDA3B997CB93E5E9C9970 1D5C8E2824CAD60049807723CE70C694150C3578BF6857FABF392ADF4D8F361C 8DB103D996F41C1D073744AB54C1193629F96191855C0CD140C3C8520339D29B D2262C9F944012C2033A498195EB9DCC8C97B5742BA39EA344ED3F7401F7FD9E 41A618C0BBB0578FCAAEFE1C4A7FAB7A0225504B32E353AA320F37F4D15189B6 0E7593AC272EF4998D45AAAD437994934CAB9D7726AF4669CC853B71D8C7A413 F3B7BAF09C338C2E5C35A730ADB6DE2E342A65B80787ECBA5DF03D44E78EB155 4A4E29F4BEC5FD248C2F834A93F1B8D09C4DD22A9CE21EBF3DD3558B749F1212 4920E4FFE9FEFBCE8D56E7C612825FF766FC90B8D8D5852C1C4B559FD4D033F3 6A753DE0523EE377823A885BC3305F0C821664E3C20BCFE3ABD53039DB66B1F2 156A9B254D8035F9368EDEDB45FD9E418E58590859D7AED66411EE7DC9F1E105 F655FA2243A123042245C4890DDF1F2A8D701E92BCE7EF06FE6B1D87078AB96F 78E8A50352CCE2EFC9B95C06E0398B4D004FF4147DAF9EF41A61C86458B69E5A 8C6876176465CD290379CA84EE7439E3A961EB0BEFC6FBFE905D706E522817C9 9A90424658ECE1A81CE3240B0B3D7F66D9B7220963FC4D79CFBA4E447921EF60 A1FF1FF1DD79C4EA6DDED829484A9FD3583F52B0EE594B08FFA228F64EF804AC E227DBF6492D27580ACC9F617B12B0E0A2576BF15C4984CC3D678EC0BBE4D230 A251CC34DECD4DA095671A2598153220F9FD4A5867E4EF5E8C619AC6B6FFAD41 D8359596497FD20D81945D8AE284778CCA0B93B75CD57F8DECE0DAB8CA6A2676 D1D0A23B76A816A59D27F293A2846A0BE3E2DB8C9D7ECA8E00DD8390DFF6E1B6 4262D9BF0C8B693C259430B2CD32FD0E814852C7380FD9E04999AB238C7FBFFF 0BB875FED196863FDFACD6A22EE8414B28DC5D30A486174D4CFB2CFA8F13DE12 8956B44907872FCE75EDD528F2A795917C1F0C7BFF7BBFD0A2EAFFBCAF3125F1 843297944EA775E3647E5515DFC33489379806BD6C054F4A499E264F03C5DF33 5FF3EB7B853C938572311076AE9D9EFA982FD64A8CEA812BBF852E57DA58654D E38BEC707A5011AD224868CD085C4DF8E6B73E6029EB04B95C6577778B5D38A0 A6F18B1487F1F5BA6BEACFB0370EBAFC741E0F7E9A9D1DBFE7B79F33AD80CAF6 A233E046C2BD32250E421090A5019523D157229DF4A6EDF97D9A4D53756FD9A7 F309C1FD6F00F26B1A824B010DD13FE64A9785509319363D5E32CC6633A6C2FE 066C1A62F10B0ED709B2F4D69201ABB9FB7DFA7EAF0107D3A1337D2959BED7C2 024C8C32956591ED51DC45963063C0C9A8B32B228CA751A2D0ADC7603D4CCFE7 1FC760460CBC96FAC5793C3994280372921A6588B4FDE6259E40B48810D5B561 D9A9F8C870DBB16AEC61756E4F6359659C4E8864C397319A04773C20C0898CAF 3FCC2088626E02DA49A63D4B308C5C0380D817B1D5FCB5BBB0507CE4DD6512F6 8ED52ECDE6EDAD88EDC3193475A98D2D2AD74483E9A2FE67A3E286E18812663F 8775260B6EC4C3D3307C80895805E51C8713C15F5B694B20BA3061C215480BDB 0CF11315C9AF3178C2BF78A50E36FFAB7D0FB87E9A43B2401112A8C06FEB81F9 665D1635F032F2D80EFA08089AA914454990923FC3A520A653AE73D334AFCB7A 349E13699FA40E6B5DF79480CEEAE358E9B231983C9B9D4A769CE8B1EAB0144E 62BED53D392604425552072A02B787C26F896589F82B5C09E11DB3D4B0A0FF3C A367CB06AB139AF4C4AD3B5C687A717A9B7CF6E3AAFC169261DCDF49349EDC63 3331C93F4E2058185293BE2A78925EF90F4F88A42CB0785B55DE4857ADF80118 8D075CDE087DAFEC2251D51B4A3AEBA51EEEC697A26D33F7065A6B10EEF8BA51 90A7A21D4590BA17FF10FE7EE48AD933927F490BDD6947330268AB1F6B5C22F5 91317C582B1CAFB5BCD1876B050B12ABB514DF612DCC3E0288606BEFCD1945F8 70854941E4A5CB23A8F8CB4A9F445C23E6841A73DE066227D7EC64247E533F4F 5336FF86654D51E9EEA55D89FA7749A8D9559B77AAE041EC2DE3A792E47FEDA8 1A87D1D8927E00EE375E9C40D13AD447B39495827D882F9078D68472CC044B5F CF65FCE5E87FF6B6A9DB7053614BB3449A5E0A8F94D5B6E7F745679AECB34B2E 299247260122373B3F6A67C31FAD8B64E250F7247C338681DD4C103608AFDAE0 5220C515A974CB3117441D380A22AE61781DA4DF045AC2D7A442EBA65F7134D8 5A8A26204640841248D82B3138855DD2A370EB1EFE9FA25A73EEF39C7C4D6FC1 CC66DCEEA6614BB25D518D82B5B1F223C130E4ADE0803D3DF367B5E1E1A9E89B AC83CD002D3591A4E93D09C1F688AF37A470704749E7CDA47202F1E728C42B88 8408605DF65C507605D6F2CC67597E1144D9BB6897B9C9025F7B0DA9AB7DD498 B598AE4D9EE8078AD0DC9D232F23B5C5C936300B6938C0C1F3211537308B609A F133300A8035087FCD32D2EE231BAD264EF0D87E3718CDDA4CC8E5045C989742 6DDAD5A7D38EDB66BF144DD47AE2043B7B81F0DFF93A7854D1039F877F399CBA 34E3ECEF1FF45B3D88786F9C7C2614A637D1E46DD194AEE3460E0CF8BA9183B4 0E3C42548306AA3CB6C66008DD15CBBE0A74415516CCEC3B4C4E496BED2FCBBC E16042959226C17641DE61B99C8A3DBF16CBDC91A51A1B879826C5AF91C3B38D D39EB432EE94A435B28D94297CD468EFDF350A85169C5D1A9A097961EB1921C0 918B1E0FA50E2CFB1FFBB4AD4E75EEAF7BD444C1F14B473FC887585B0679FE84 CB3A2E68B736315F3052CD42674BF34C3AB4AD68772D0F25BA54B79E467D5B5E F448E28A6A0C5F486D3F6EBFB80E7C4A45E0F12AD45BDDE44002774E7658A4BE 33C1C86A714FB2D09CA39719A72162A96FCCF149EB1C07A331BDCA8F4B6A2B9B 5A56245937187E1232DB80CDBB99F9B8FA4802E78CEC64917624590975A15BA2 82D4E8ECAD3AE66E045C929541B3BEE4D157465D38C68AC209309A3660AB8364 A7C049022F525D55BBD06260E38E1F1D00734B0B703D8EC700BCE11D0F02F1C6 D22FF92F990DDCEE9FD08E8066766A89285FDCE6E028AB026706767EA2B1900E FE15D2945E18BBB2464D94AFD9627210510EFF49A5888351B1407EC9D902B721 DE73E5F07B4F3E7586E88691177B58A229989E6F1313200FB88F587490A56F87 41F3C051976FF32DC897685F8F5BF83B3E938E3B438B854D05D27CBC9CE49C37 FB65A8B0D8B106D2A1E7429A2EEF86C0E321F426D64E1FCB1C2C1E96BF68FE0A 2D001E2EC0F07E7FA657EC555185F86470509774ED43848533DF23F1103D688E ADF751636037318A3C3AE882816AF635E68FE69284B2F2150E74B03698A85C7F 5F7D6F6AA68F59D0E2EBA88A9E009688BE62E6ECB10ADEA199A95CB3F30AE565 F4AA41842AA64FD1395BB6FEA563F89292C4471812C96B9404E649D40D2822E9 E7B03A94773AE001F1583DC16A317A8723FD0EA608B675DFF50AF0ECF388E0DB F3A6155D6FB81AD666A1D80FBD76A124A3938004C1FBBE2AFFF4E843EA82A417 1FDD60EB5ABDA85D2A671D8F914DF995E49C6EA1AE974E3D2CE80ACC79046901 CF7CF4C1656D7A4249B28A13253385FC2C6FB3F55C74BA1B7AC4297187FDD7F6 9C62600E237D75CDD06D7855C80572FA788877A37FA692C0466742C91DD3431F 3F1D50E0F17C037DFEA54FC1379A04E05462957B19A7CE73E9AA1ED653464EF7 02C76BDCCD16DE9B9E8A7AB7B8AA585DD93A42E58822E98246987993219551E2 3CD09E3C4958293A6630CD3E6E3EC8E4465DC7C2320400F7B4C7A1A75C6DB870 08B5F78AC761FA29FF97B569F82D78E04FF1BE9141E6C4C2A1DE94BD117BA998 8E5147EF6A66F26B4C37449417574222103651104F5BDC029FC3FA94CF7CB117 98241FFEDA21AEB2759A12BE1CCB3C84ED84B1EEC0CF7A8FF426653FAFC92995 76E2269399F7B752FAC6703918396B47A20FBDED29D6BBBF4A5932037BFD59B3 E42DCEB6D81600F25F4F00811903FB36775A53065AC39B87769D1AD95B86A556 01873993DF0D11C1535F6B81C79C7058FDA378B0F74CF0488B2408E83E596454 7D9E1CDE47763036EFD6850ABA98F194AD54E9B4BC481FF32C671AF372EA9944 FA2C58AC470F277224867F07C34E2F440C3BD8C0CFF0B05C89E3611CFC57F009 5B661F68107B80DA7015995077287025D0CB0254DCF2B1240207552489FDA968 C22424E4C7460B8B9EFCE44E18EA534B603258E9526BAE27738CC9E38367BCAA DB887B88E0DD3809F26F0DC56CD3F9BFB6BC8448E62BFB9C56D80EB27F6399C1 7BF370A1798053E55C1E6B3406D3E23036A5463F584D87A2BB28558426C6A70F AFBE0D58BF1439C4F241822FB71FB5BB83F9AB45DD508D113CE7D727F7477FB9 7591F1F6067789C15C8B195D21FA0389032C01DA166FDFD520DECA33A3C1A4C0 D028B53619A70322C3B7E6FBFAA884D2E488F48FD943C355BBE7C842FD9C26D9 4CDC4089A36B243EF6FA3CFFCAD81DA03F33AFF306526E6589306FC3BF7244FD B8465D80BC8B786186019CC6A269BE9F162DC50A11ECF3AC51EC370E588127D7 4E549E4B4E27E3639D4D2DB3FB17EB55BE407E4175FC4AE0B97EB890920BE229 E0781F5F95462FADB6BD70E8639A882D6E3141E72767F57177D07759A9ADE8D7 5AB461DFAF486F6A947CB9BCA3F5357934067E84FC40DCEF4BFF1076835CE1D6 8A9F9F106C756C637DF92FDB97B35675D41F57C9668559F86220D83532134678 4DA9AF9F0266A877E2139D982F34D1798762A5EDA3E2E6AF47CEAD75156F764E E2C57C3DC53AE9EA867D89CA96A632329CA1EB2805508F8C31368C6B5C4A6F8E 000874C09069AF06629510272E6C0B5C71D719A9EDD053EA40E32A8E2AC83A6A F4F058F6F44F9DBE4B7A83DC19989C86BB13B03CF3C1D40972548EA897A0C7B8 5789F7AE6666E50CC844A141C413AAD207AFD2492605CD0DE83AA9A88850EE47 EA437A73BFA2FB9596AD37BAE43A68C613E6DABE3428181874555C49256B6858 73D268929CE07BC7E052BC9D78125E66528F894F365B9D01375562D07BB34BA3 1CDE9BB8FD60133C238F17157707FE6B4CEA97EDC82E08632ABD9A4E94C2F2AE 5AF2387905DE606B6966DE25B8C1A1A59B4DFDF46AD22D8C966BEB96DFE44DFA D33E89301BFC3CFD2A926A6890507696CE911A30FCF07B0E9CBC879E8B887F6B A4BE8677AD5CD72FC3B50C6A169CD390BB6CF20EC33519C1D83B5F6EB4B3E2CE B4474C478AF15A264986299CC6E3B53C6C198CE0CA8462B88185544F52117A13 512DA34A95AD283C3C677A31AF5790B92D93607A7619B34B9985C51E5C0054C4 DB1761342CCB60D33CF05FAEA3A9ED031B2CE4058DC45E3934C0BF791F615F90 42288D19A09618D4727422CF33B437403FA6FB3D17D041D4984FCF8C94017134 B222DEA1787ADF22E270A193957CA657E298FC41A6F2AD90DD584005FD1C221B 8AC8966B204BF55434191BF6AD98EAE0D04FD9F66B3DC980EBE97BB8D4A4598A DD11FA270E096FAE924FF9D988254AB6FE3DC052F79EF823BF7F26C5DDF13B7D F3A89F6DD238D1AD3AD24006B54F21944A9934E42AC945DCE8B9AA4F6EDB98A9 76EC9567F9A6A97BDF6F1CE9946E697BEC043932AE5E40854F170411FBC0ECAA 50C988719AFB0F20B158AD28F4F840D0B074DEBA77167FD31236621625396FE2 0408880FE4FCBFE5ED7222AFCC469B1EFCA9A99A62AA2EEA2CF627B679F34567 89990B1CE5F748871632FD42C5BE71685E24D9404A5FC13227DD0A1606AC8BD7 89BA4F3C3A332F4AA965A4AB34AD13B61D983255EFEBA5F582DC30F4F5B3E457 BE1515CB728DF304F42E5B60CCF6CD66347DC59A982FEDF427B33EFE3B5DB651 C580F245F513C58B8B987FFB400C4C6FDC7A5D5987EE09E6C0944356ECD90DC3 2C0E3A10CA74E1F3B084062E29DB44D66CCD2A2779D05C3E34FB14EB639B69A2 2ABD124F3E915DCC94C37DCF6373813ED913E804FE590CAF4C474BBF94D1AB9C 10B7C4AF6C3711DB372AAF307A267B8527A79B2CE049DC5833F560E7DC2F5B01 74C3ED727B9EDEB567746F1B5D31234FF613E79D2637670541B9D59B5D7FBAAE F3B39D1C3F56F60C92141BFAD100A891906437092E1AC503CFFDD5DA58BD905B 8D8CF67899CA01156A3292B0AF92216541C84426FE8BA18C88D6D04D1FDAC155 FCB025E7A6174F1C0C8E6681E0631125AB8E6F8949B37CC1DC7211E90A174C1C CA058CEF568C23E51ACF3F026F50138C06C21523C23A39262EE9F057027DAA00 4BB43CE1ECF87A9971ACE080FDC6EF669FD9CEAFD0E4F5BCD3EB5A945CF7044E 893417E8DCF3116EBF689FEAF58E0596401CD7BE6F3FF61E48E7C9CCADA6060E 3426883ED4B228AD8A443710D32F625AE74EAE408A8470582E92F59FD2081EEB 081652CE3C7A5A7239FE0C89F60F9E298B572EA50C6CD61731803A864CCCE73F 651EB1A8EB5DD002AC781899EDB45DAEFD4019A4FED3FE93BFAD12617F32C9A1 B054B0D257F5769C79DC210ED32ACF886B8C0190C71D5CFF93B909FB9D494B5F 38FFED936F27B03BD02835959384DEEDF7967515CDBC33C1605A9652A1176512 C84854262A3318CB985C58FF75E723515C3BA1820B8E8A83FC0CF5C41D1F0A0C 83E928F907774961C56019436B2AAC93E113CFCF52AA606AF1399E640B5A3609 5984ED0DD728CA7EE42B066C8F4B2D037602B9B5833AEF9B1A77D920C8C2BA6D A76B389DFD11799F39214D1FC4914FD7D79D66ED1384F5A36CE3F17A4B798A78 62BB401C4FA62A2C61C81420B3C8D0462DAF79977E404103544CFCC61591634B 894E2AC71905A5C2FE509D227FDC509050F8829877314BE4F0FFC16953795E6A 96860BB9167E867450C2AC42F138216A53372846F99FD5F3FA377EB209BEBCC4 714722D6D50ABEAA9FB404A9634518646B7E6EB9C585D40561B0E95CAF0DFDF3 1FA390278CC9F8D6CB3AA6F4624EC24A9B676F4312A2C06254C0BD181549A0CC 11006ADEAB54486FDE6C4E56C6F180F926EE9CDE0629A1A8FBB3EB676AEB96F5 F12A06A84AC3E018A2CEDA17D73454B19248BBD2B22D85E0FAC7B019E6B9341E 48E8E4478F792567623D17726C82376CB218060F7689CB42642C33A0ECD675FE 68D02A44A76C3677F29D0AE27E7012747344A761E83D7F8C7816BA6D8CD5F6A2 E0C38A22AB2AADD6CC13BA1249B63CEA3AD6BCC4BB12364BE7D01ACBBF28C89A 134DD7443CA3F9284432A569F7E7746A00579AE85ECFC9BFB960F1E9022F5DC9 BEA5C1273D6011EF5FBF332B3AC456D1EC0D0417EDA86D48976A972B052AC1E5 B5C9D813A7DB2E33655AD6B7BDF08AD608E349E3B58480072D390BB35ADD67CA 683CA705F48A5619453A75742E7764C54E3B53873CE1D82783A996DF568B81CD 77053FB0CBFD861A2C7E0879EB75A666B83A874618D6F89156222F78F748B110 69C73A1EEB6633574E279193DD5FAFEB8A2DA4F1A560DE3A7B3535C82C8AC168 289BC934CD30CF470314ACD2F72FD9247A4B664579D3B2FB06501912099DC4EB DBF97980FF1E0FDAD33CB1B40BC5B31579D9C32D920E27D4B4508A14C0820AD7 83355DE93500725DBF6C16112DDB8B17A3C669A975D6DF2F06ADCF9E42268CF6 4187D8A68EAB5F3F079E8D4F5FC80F32B5142304B6EB4C3772B3B10FF14578AE F905647C94117B3B9E8F6B37A4D805AF04EA242A9BC1CC2F25E6555C0F711114 013621DFE20CC5EBA0E1A261300B65DA4E1E8008F0BF3EEC569B05B479EC40CC 103F2CA7C933FC40D002D155669B37D38496FC59A3076494A6F80598239D1600 F932F6A1AC8E4081FD6BEBEE27CF95CD4D29F9177AB0C0091E14E924D97A56B4 00C21D86FBB2E81BCAB2A25A97E66C76F1217BC2138AA73D9999E885160F0B35 01D6244BFEFFDB061758C579D5157E4C281660DABBF1E5A1A0393F56994033B9 D259B7366053745EBB52B6F2433DC25352C4BE3F5D718C8F2171D3E0B1434B91 7C1DDF79C503095F3DDEC86C8B41143D05C00105E56CDD06A8B3713FA045BCA8 1838D0F5CC4085B49209BC0719B77C49B8507819A4A458EC8FA9A47505C3AF9B FDEC5AD77D277CFCD2A14446DB2BE118CA49E429416C2799DD0578786E3D94D8 7FD43D21B782F25497CAD9C7AD2822AA9B19643340931454899682EAB5DAE521 9F09670007CF09AEBB7BE1463135B0D56F72B56C3D3CC640BE6931691F487EA8 F15DA2D2E4333B6C3815CD8D77EEF9BB25A6D288B711C0F925A69FCCD39C635E 1DB49335AC22EFC0FF2255EF1CE5C9D5D002F0347BB5D07A31635E1EB60EF5AE FD9B7B4CC9A1A9407D042FF4A76D01720672F3E7172422EB12BF25C79CCAA12E CF73076F4D94FEC705FDCE669DC492AE88864E6BC771305E2426975E72D1B687 BC68D682479C02290FA9D5382BEECD3C93985DF5615138DF6706B42819803407 B1C16E7DCDBA4439D932CCD72724350E886C90979554A50BE976D737062A7237 8A5BDA51E3733F17E95E1BB169F6FFF1C76E7E273AA256E98F9A0A6C2F30E836 BC8F5578F0FBF4840098071F2D8D093634C3E6703B4368D924E65BFAE9F598E6 1AB21B8078A970F75B3265615F034B877FB57154594DF4822FC2C4E34AFD7EED 6E65AF6ADE198DE33D6C17B6A6A202F014B78BB4CCD3C32605188ACC9A6AFCFD 0A4DE3F0A6F4176A7FBCFAFC30B7CE6301FA7ABC5F13F9D59A53DC837F203D58 68EE77BA3D8EDB06D56D6E3C1419A4AF8F2E4D387F48B41565E4AE00DF8A0EFC E8E9C2902398270C30D994C510D1E4BC01BB91BD2C18D17848D91932ACFA98FC E6F6F2444F3020E323EB17291D0A026CE2B83AF6F3AFE74CD6DF80ECB0270BF3 C66917A3BF2DFDCB6D9FDADC194C2E8E4F699BD3DEBE87B653FE1409E52DA950 705E771DE8AD5E5558874556333C9608B9CB2D491BA9CEB26E940D04AF9979EA 4EF7882F774EA05ABDADADE75445422281E7AC881422EFF7467D98A4B91DAD83 77A9CBC61C4757F4C7125C5404A9642BE7A82C164DF0E1CA1162CB40CC0B8CEF DFA1AB9BC129726FDD388B6FA30D65136D0962106815B8EEFEA92450412D540A F250839FAFFD1EA56F81DBD332C7EAF68A793C2E888234DEC6DE6D3D5EBEDD35 4A66C12D2D180D4A43CFE9821BBB05B4384EAD942797C78A25A0E888A2DD6673 6AA61368C3B37EC2F3066A2D1C9B96F8A08C2FE4FA01BB7C1555FE7C70780A43 E9F2346314A2B18C2A6FE227DDA84FD0A3E57E09AA8A4FEF3998B8A805B8893B DEFB9696F7A46D5F5C2F25C3B0F68B9180091895A3FF13C4020A90DEE965BC85 E850CCCC2DF417C4CDFD357F0589F00398DEE059F58525E4B3672645828BAA0B C90BB3A5AF470BAF196D1A6644CE515106A0A1D85AAAA2222BC5E836C7762C4C F12CF858C93D9D6F27983F62EF9695D7D9700A59FA3000C51B2806B0584AD8BD 978CBF293A8EA7166AAAC6414DB41D604D6757E14B52D366E6E2986F91E2739A 8690220AA67057C638F1B062B6C86A53FC8601A074E6FFBDFC32EC133092A509 C0EE932C3746744132ECC0C00A63972705AB6592DB63A6384969EC1C67F9100A 835E612A548F10AA0EA602363CCADCFC70958518B7CFD258E523490D951D7C92 6745E6D0887004975576B39AA875E374DE0864A619F04756745AEF9B2870B7E7 91DF17A72BC4EEA607150E26005279F4D18D197624EA7AF5F4E25039E631AE40 90912CE32A70627EB5EF53FC1CC873B99175A04F4DB36B028982435D1D93C0C3 6D4D5BA176AC9E5143360EE3B917291888ACA2E387BAC15655A3CFD0961541E6 8580E926195E663092B9853D6C28DB9FC812EBEF511DDC2DB88CAF24F106844A AB5B23FCFE9885D815D47E14E7B4027BC3AC8A8B81152B52C4EBE352BA5248F5 6EBF9646691C250EBD783C75B47E70FCF056F1A3C3CE06B3B04DE496551D36BD 2F836667B0229F6C2EA48964E34369BAA83D162174A336674A2DD465EDC2E0BB 6C684500DB2582F4450DF71AA4ADE23F5409A25A9B16421595D36DE41ECDB081 A989A49AB7DE3A928D3D5120F5C617A556A4BA014E74448747B1D11735841E7D 862BBD1FADCFCE0CE61A0712E405D4B7C4B52854D7FDD0A8B0C91079DFAF2B85 B105E048362270D3EDFAED453448749355CEE968AC1CB85C4607F0376012D0C8 FC22F4A7B2EDBE3D815E733D112ECE3811563487AE5E36A9EB45D9231D0F5653 089AD9289D464DAAF35DFF90891350A58F6D8E8C1B6C319710E1EB8D36D38DAF 49F28BFAD7D3724E5A3425D63D6D8C79CC40D33B575A8D459F17E9C1CE4CCABC 30898AE0301CB80BA78C192D58EF8FC9073371BC6C8E4F547348DADA57FC6231 E575AC120ED6C0B4BE2353418B18FC5F95421D29607E5DDBBAE158529C496D6A 2BF6B7E378E6F0B98A475C188879AB50A40AC9D1D62C8906FD7C29D50EB67D9A 67306C5FF2609EA15DF85B7C27659ABAC9FFA1EA7049DE3AB9B5A286817E260A EDC2154E18558B149878C38D6E38382CCE010D1147FDEA69E669548034250162 1473064BA78FCA4D189D729A87DE828F0374ACA9E07B3504182B3A44B1EB39F0 9E075B61130B8D379EC64E664B64763A77AE6EFE49A483E5489E7FADD87C9664 962522E0C8D8311EC6C593B1A35506C430870474241C7B7BC24FE14B653D80B7 BE49A9A34A9D110A7E35FCAE0317963EE84156A7DB1CF0C2FA4920065D7D592B 48764D906FAF4AED2ED90A817BA3207ACFAA6316AC103F24BAD23826A90F35CA 4CF7B584EC5D3934E2C5D8DE936C5858A374616FFA2AB82B896956EB9E3C62D7 71B7505FEC2BF59A39C9D38D8351CE914FD547678E7F60761224DF682323EB68 C6A31BC0ACEDE3B1F91B635F6B0659F02D50B69F540388288BC2D26D905724A7 7D99393434E2FEE934A2C1A75BDC15E0F761AE1328C5B800D4D9A6BFABD4DD5D 3EEAFA063549DE2D9DD5DF5B70D831C71B21F39C957FB45BCC1954167CE73EFB 2928EF798D0E1FA054570A7D5633182090DC1D9832A346D95F1605330D9B36DC 21D6918FA54FA0831D092389FA80521FC155FAA10368DC02151E6A3CC7208043 6CC1F71942C246E09771E0B7905BC35E42DC1B3F92E597D1F4F1B7DB7581F11D 07975D312171D6A24F2A69FFC023D07B1D3C6014857147D4501F811123365B49 BFB5EACE307782D1A0AE2BDDE302D69FA22C58EBADF9C5B40BE1E92D6617D695 CDC2D0A4EF84D1AF9DCBBBC2112BBEFEFA64BD1575D8F66E4404D86C40210C39 56FD030DA1D03FF8E3EBD4A904B78E6069B1654B48C82A0C6163936A044F8C81 5061230414B3D60C2D5CA0F9EF46D81EC37A9296E1B1669AEE3E973B12EE136D C68CDE9D4A73C3E81A5DB0250B58E83B942E155673DB5D9B324561BBC2415258 095CDB6066FD69724D40931ADC0A0232951ABD329D45DDAC8D0FC0EA3AFAD998 3D669D6FF65847B2FDFF2DD20A43ED1C1970C584149154EC679E84F930F18B7E F525CF98C5891AB37A57499C59DDF135DBF510AD6F852220AE703E72DDAACAA0 93226689AA7B737921E42AB9984D3C78D0D65C767D34D48BE1C9F62D4C0AE884 CF5E583322A7E0183D44E6D988979A2F4ABEABBD0FE1BE6433D36D4BD452B1CD EA5583A5885563A006FB12F0416D5B72F6CB0E8CF35073118F00C5D0DD3EC0F4 C74C2B0F94FBBD21E1E941FA89C9BA5BEC33BB36F743FCB7F3C303107422250A 5D14E57DA364B62B2696F3A494EB2ADB1905ED62A4003FA0487F1A92CAC9B6E0 FC779E408FE530391143B5D7C0130D2BB03A08B6CBEAD4F42FE85A1BB2B5D648 82834BEEF7E3738DCFCC7F7CCBFDE9FB5D886FE0F2E94D2DCA451684981576EA A195A05712679C22CA8C7C48DA3A32A220C495606DB6E95D826A537F84DA10BC 00DFA0F8B257D4FAB387E17C0E55F262E9F3436FC8BF6BE82EBC87D082A56593 AC08816CB48394AF76CA257BC51C0012B321BDB06F6228746FEA912E736CDD97 09F6FF48FE7E41746655FC494D773D0C57ACF5D95B713B7C254533F44A578ECC 0E6741D34CF1DE4925FBD71530ABA53D864ECED52D3454F2E27C53C27BA183DE 0D1EFB4931D7B28B0FFEEC249499E2E6088A17CCFB9993B7F84713DE997B4F98 B3DBC2DA115BF34E55213BB267FEE08313BCFF4A2F5CD957E4240A1EF6E54012 2E73D3433D9EC32695434920BEC60E9FB7298EED3A5830013C2C6D0AFE4C1647 800D3D46A16592BB96E80349D896840E20B151FB0DDB705FB23DC7F41863C057 5BDEB3C7AB08553C5084929A3790F9FB9C06F4182E2E576B69A4522EE91B8827 15B082BC720607D03A9BFFE1C73BA1E8694D97DE6FEF1108934D6014968C1C0A 8895AFFC931B26D19534624910FB378192E1965D36F520E28B54B700D4E75607 0E8E859166D738B5E8D58C214BD4CA236CA9B8A95691B140898194A0EE105D8C CFE5642C89BB2F7F0CB67A3FCDCDB724 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMSS10 %!PS-AdobeFont-1.1: CMSS10 1.0 %%CreationDate: 1991 Aug 20 17:33:34 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSS10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMSS10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 40 /parenleft put dup 41 /parenright put readonly def /FontBBox{-61 -250 999 759}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5CF7158F1163BDCEEA888D07B439DBD4E8B4C9 D198C03874B5E6F8FBF4922065A92BC3E66D05DE53971CB1424510E892442858 D69CE1F76E4DA76C87C763A4B2FE36321E54B1328C9155B8ED6361855A151723 3386AEA3D042B8D89C8C0E9A33E5DF3B466F7BB8C2C8A4ED4CDAFF55FC6D3EE6 0AF2CEBFC1AC3A6E6692F8BB81F82D86BAE85016AD62FCB05467082C2E5AD348 44D1439C2B59F65590E57CA0DE481A7A34E79931B1513C4C30156170409A4BB8 46D412D1DAF88AD30722F12DBCA1CCC6B4BCC28D06B0D29149DDEC520C8FBA13 6B82E2E1790F00B216282FF122EF0D47B70A1B29514DDF7C0435ED238C14BDF5 6DA243117FBEF7398F97EB95597707ED63C6797EBA1B46EA19ABB1DABDA171B3 16CD500F5D64CBFBE4F9CBC3E66A34427D3C4D0C432710289381F9BFD91B4FF4 1E3A896C3EEA2F3105C218877D6C0C6B763760FA364D00065E1CAE9DCB5676ED 286A9ED0D1C946DCA6A2A670EE0936FB4706CC62E234CFEED34AA615C48D2872 A087F30990C85E64BA68F3D5C117123467DB411C9F2D6F6858CC70C1E352C477 713097321B4C4FD4C5CDE305415F998E7245908EEDE6E056A736EA77BD8C639C 3A79FFD0B74B3D28F0494A115F2841CF8A8827AB5608F96FD8998A5F40FB3DFE 3AA0C7696DE4E1D18DC0D6E84B943175FC38FFC42A9C0CBB13A908978C98BFE5 034F88480F32B9DEB2FD228FF6CB0B89B045AB02020C82E3F5716DC640613185 9F597CE262729BC52132F43922B9E28BB71A30AC8709634561B22D13C4FAFE0A 12C4451969226B220038AD8DDA990A4E2CAD53DBEAB698898BBD3046234EB4EA 901287E71CB41296C431383AB85F18882F65BE36923F6C0FD6FADAC5B42FDB68 64C06E047434FA7A659EF7F3D1AA8E547939FBF9C2ED7AC829F03CA59AFFBFA5 A7AD2E0FC7BBE619961AE1785D09444B333993199FFED007382B54DDAEBE21E0 1E75E0AB6D309DBE53BC7BB9F95D342F51798574D70B95021FA40163A86BE6C9 342536A5730837C522D5314B1289D9B7E4EDD108BE7F35A20AB2A16608F6F007 6DDD702A5A9BA1325CE2C1CD020DF677872135CF04F4E4F1E9AA6B494E2BC22F 107C331A7E80718B030A1103804D144802E3B03EF7CB083BCCDEAC7B43F1B4F5 C1BF6016741B741CF7E12B4BF95221A72CC9F4657264771AA69C73DA1DA29102 65D01A0E61F3024E672AFCCBE13CD0B7F54AE1418B72E357A0BABB4D03073B1D F4EB54F899AD4A41A9F94DC200880A0DB99D67235A2451B25F710C29A882865B A922E56E9FC16756014FA5CBDB1C32750BD6835A70EB715CEA19A8872041905E 8C660BACDCA26C8247D6B3C10FA5DC240E433E479AC6AFCF57CF96697FF46BE6 44748E 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMSL10 %!PS-AdobeFont-1.1: CMSL10 1.0 %%CreationDate: 1991 Aug 20 16:40:20 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSL10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -9.46 def /isFixedPitch false def end readonly def /FontName /CMSL10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 13 /fl put dup 33 /exclam put dup 35 /numbersign put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 50 /two put dup 61 /equal put dup 63 /question put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 103 /g put dup 104 /h put dup 105 /i put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 121 /y put dup 122 /z put readonly def /FontBBox{-62 -250 1123 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9429B9D40924DC059325D9D4CC0344F3F997A99E6CC0676735EBCD685AAC9142 08DAFEC78BB41AFC2F1C219910BDF41D6279284EF600B69776CA15BC8A34347C 30783C52AFA60FBE3E353E2AE354CF87B558776A22C776C7A0B5AB5CE1F941EF C2D9CAC37294BF407A671F10E4743BF842143F4F7DFEE643BA3BBD8BB9E3F24A BCCF7F0ADF8BA500620C81033EAE8C4EF2C1DEF13AC575F1B3BBB66F093D3B78 5412B82B67FFA087AF57182B2230F9F2137180CA58A7D9B2C822FF04BE6CD01D 43B2CA7058C7B953F6D9B5D6E91ECBAA5CDE1159B0E59C83DBAD96D6C8C8BAB1 374EF652D10C0F3EE7104472C98DD3572AAF2D45A70BF7061447E21EE3C3BF23 DF39C2D1B35B42CD5297BEBE6BC94F7C9DC6E61EC67E4F677256FED9064BD3E4 B51A71B1D27CA4E5AA9E1D8080E6DAB5310711EEF87C40859FA935B19524AE83 63B163FA8397BDFF443227FEDF7DB27DC35D89FB1C5E435DA0619A5C88AFC73B 89A2DF5E767C5B536BC7167A840A0C32BD57A14DE69A7D0D819AC36FF32F908A 5070F32983BB007437E3500799DF5E0AD3710A4C0000F0098D5BE99F2EB9C1C2 C444FD9552D0DCA098A94B3BF176F511CEE13DB7EFFAED7C47B5ADCF8D4700F5 7B6DF50EE617C00966B9A2828882804DB7477F4A8CF5345B7F3568B4F72BCE73 2E2AA5BC4B4C70E21F3AD9AFC3B8605A00D67EF9ED1F4D13DDAA920D45B43CE0 0941BF17CF05D2B777C11D4D844AB20C0693D1DDF00B27D9E1AA2D98A4A06CC6 D342AD8F644F4787B66CA7D861E7CE13FCDA85C1B0C9F94009768EA89838EBA2 7818F40A3E173BB4F22A212B951CCD7D4DB259032DAB0219B6955D84D2323AC8 2322CC60D47E5D559C2F8425DE19AB4FC2C19E12EAA5354D0264EAAC8DDF3705 8C2687282F07D503FD638642BA69CABDE47996BB02725E61130ADBBA2254A393 8D4B85452A8CB9471DDAA5A482866001C5E892B20E906F72978E63F0C453722F 52F729D2C5A614A0A5BB85E7016917156FAD99F8ECE0273685B8F66C3C440F61 E84356CBFC3BE6D273F4640115F99EEB712823749561DC0E07C144228879AFBF 735DFBCF84FFF55F3CF3FF466877BB7773C9D28698ACC814FAE6C226D260F61E A5DE2A29CE4A0A651368C6AD2DF88CB5CF4D11FA89E8D540040F8A0C90C74331 879D377E888E67271A925F0F56CB72019FD226FC9CFA31E6F8EFF9E4A1D82115 EE7C245667F820CE9571F084241BDB99101654DB5E5C80572594EE4B7E6E2713 51A81163E41DF5B3AFE2F500D65F08E6F6DFF2F0AAA831501C841B47248DDEAC A553E0768552DCF8FBB1F0CC4FB255D41AC9BA89B3CAB6356A7C34ADC8023F4B 86EE267E377850905268F7CEBAD0120B0C265C6C83F8A4B32791E501C557723F 84B14A7D094C346AD0C375382A1EC2B133DFC78CC9B40542EF68266C3F1BF42E 34764284719409CFD0BA1064589D5C7199572CA3EACD2124642FDF7751E95E64 BCA9859FD03DC0D3FE192C0177A223BA0A3A8EB36C573113CB08B930297A7EEE DE26D8E25D4004B46EAC999A634C22EEED06CD7BAD971328F5FC29A58B86A381 263CC19327CA5DC1EFCE4FA35C3DECB39F61B3607D674AEE802B38E38423DDB9 89D03AE55F4A416929CC6F6FC73F32F0F0E3DFF2139C3B82A27AAB0E3AF5BEDB 4FDF92013E6565B07BA7B0661C006FACE7A23EEA1DB1C39588739DA0AB106C27 85F7C68BAB19FA1106D6694876AFA44CC2E4E01003508A37830E28E7A11E28D2 04C6F8C3D66F708B75B96F781E62B74CB459DD978347A88352CB5A0DFED0B088 C25B123433BEB7219382D67BEA270C43F06363C8BBDF9E883848C46EDFBFE9B7 BCD18791AC68583F0A1723A007AE7091A253904EC406075F3F55B5CED9F401BD 3C3BF300F4ECF43E684A42FE6E45ED2EF85997897B624E00E542A797541B829D BDB693832182F77B46BAF9B78D38F062997058741E33FDF46BB29D2EFB6A82F1 8A636A2F9C39276333BF278FC98F42D65B1CEE1421B85E25D5EAE21B81873888 D67C545C06D6220E7ECC5A08DCAABC1EB533140469054BD154BBF44DA0239AF5 9FD2081EE7353A083A6CD06BD7AC83F4E31AF0426619F45952A8C88A6E64AE01 BB799E5A988ED42DD8831464024A5004B8F64CCF55522ACFAB8DEF4CFD287CF8 D7150CB9C35F2038E7B8EF562EFEF110D674AA7A4D78B68D06A8AC24EB0E2251 CAC6E1856E161D2C3E72EAC6743C13C2B51DADD029F7CF17A49F72F3F092CF22 EB21B9E74FC079BF068F3034D8A9AF17BBEDB528F23941906923F32ACFC9CF49 BDFA50243C8EC8C0DA363F9AFB07E8F6F3D1E6128CF98C84A44651C1984D0372 ADFD1CF0C8E22AA66043442921464CE845D54C910100683AF49C00E30D515F57 A316EE42E9F8A440A48035A008A3B053B74738871B88267C2C59C078D171F554 64B79FFBAE7A04A161CD486123E5AAE4FF052D6B9D3FB28AEF97731F1B39CB8E DF79DC79CB9F84C4DF960537A1EB353B53283B372C58A1A9C7768ADE6DE543C4 A44D8D9053838A3CF48512BA4D8B839797A135E5C0C2292C2423C22FF77A617C D555DA4D8F5A63719DA2407364231260756D447F31E7CD6E1240834F55C0A19D 904341DDEC4DEB5CE5BDAFF52981EAECB30FEC476AD34E935C76000D2B9C5CFA 0B6CD6042073D450BAE3906A94E4A2AFFC84DC2ECA949D5578292150CCC1F076 28D8B835C7797B90D9FE1BA293A2B42AE87F585AC43E584C34A97F5FDC321DD8 D7C8CA83641D6327CE2EFC3902836E434165CF4C73A9AD03014C2208A31B50E1 8C4449A9C44312510FF1009207325423359F4EE0C2E3DA80933D657680AB3829 0F890202483E20C6C3A118A31220B0076E3AA89D5CDA98EDC6723D9EB449F8CA A8CB42DF25AA75A9C7BD8CC869EFD0217D3FDC545881E7FCA0B5359A58A177F7 B9B905E38DDF7109DCDACD9C88E0F80E3028B31E40ED3964D21452F4D45C24E9 D22DB801867C89DC192130042B375311D2EBAB78009BD81044908CE7E215465B 8F5799B55D61B8406117BD6E5C25E3000D4B8D470622EEBE2D42916D88B31ED1 5A15BCDC6CF4B291A32AA2E7883987B28178EFB89969D8EE19B83797056DB45C 1791AF1BE322B32C213761D3999A6C691E80F1090114477408623E6550FE51C5 C1F5CEC758035ABFDE2B5999C9BFC7D63A8EF5E607A4E4472B1A08479F58DE7F F207F74000C81E00F0B27105C55190D47C2BA2FD47E7346FED66559066788BCD C4DBB95895A637B6F899A02B69DFDB139D72F90586C2CECCBC63CCE6909D49FF 44235F8C3580BCAA69967E64848790430F1BA8DAADE54C95D7B5CDB07A13DDF2 F2EA3BF5071CFD3BAB7F0AFB23EEDC255FC7F96DD080275E9E56B4740AAF28E0 5C62B32E59411E59BE959E9D7D6DC5B7038B2858B28287977C194EFD01AB1FF9 DBF7ADFB90B197D5BEEEB8DDC7684E754832A24CC4751AF5DE85E00B8907A2EF E356A1B185B1033134D61D44BA621F6E6E383BF5DC2598146D1599B921575FF4 21D4B92FE91B824D003CBB59B107994A38561CF11CCEA3978E5AB5BE745A6A54 643826D6678C1D150537CCAC578B896B8003E29410CE2D9F401A074C847AF889 BECAEF1B38C10A520E68AF2DF301D9C45D653645CBD23CA79516BC57B4937D6E AB47D6FB1E1E494B58962ED25EBE9C2F9C77C93F8E3CE7C84509C58CA8364064 61F9A8D85CE3B80B2506452428C377DD65EB1917E0B73AF5DA5F76401A2ABFC9 DC8B8111F13D5C87853A6A629CDB1694564F7E4A332B416672045F32F286E4AA 6C2774D8A90E682B35C80DFD275F599DBDD210F7F3B0A85472A5A269268CFFD2 5A7C9ADAB78B29E7D437D65B74E7FCADA543D985C6ED222963B14910F14AE552 A45957C1FD376A89D404CDFA0C97C62580462BE4BEE87983A20B99266F80BB25 4403DD3B6DC101455E229CB871CF758EBB3C0185E479529AC88143CD296AC9E5 6A809C48C165E4CD028BC5DF838EB9ECC4DEA757B2AD279ECD5B8668E1B11933 E4984B45724DDFC92BE946E52B8223B5D69C0CEF47B6C7C5EF108429994A6D11 5373EBADBA1E6596788978B2CF03ED192C44A1C4E6BC49B268EED90C1D324BE4 692534EEAD5A82E0B77AF75AC406654592BEBF36EF603F31B14AABFA07E3FAB7 82253B947FC983E231A26671CC469ACD0E471BDE1EE07D0A70B604E7C88A184E 1C3BC690CA1CCC44497D298D87F14B77B3C75937BADCB871BD0AB6406460ECFE 1CD674F47B04CF10979043E7B0EEDD7C622611E1731BC46176C8C393DA032F56 550548CF6A98DBA104EED83222576DCE9FFAB1396E15B54E8258CBC0E6A6D1F2 6AAD4F393EAAD55B603DB8223FA8985BD254A3D4164C8B630A267E67573E7536 1AEE075556647C7E2F528B8B39F683AA74C1EBF0A87954BC38615A9533A207D7 10C51A84B215729011BD9C9270705F46E38DEFCF8A2544285F31ECFF62C91EAB F07796490853D42D12BC619935A22551E5757885F32901B0DB926CA16C3E553E 7C85BA2F994BF0F9633182A5B478C47FB32B08B773A441DD681184F6823FFA44 F9A1462AD775CD5C0C1CE99530DDD5A2B2DA8A184C7B9854FABA4CCD44C7D0AF E2335371DCD7385284A0E54439450621B3EAA8130B526257300A30C2F429215A EFBF58DC539D411CE936D263A152168DC7D0E2A8B74A88A011DD256AE7C720FB 5D6E3D6633F212D3B2074F6EF711A1D540583970D042A16E937C46A58F2FE14E F42A4BF6788CFE462C0BCA803AE662447F7989DD026548F34C4410A7C218A0F5 409EE8A37D7B83E8A8A08DDDB5B27417924288AE8E358344616C92280ECC1D03 BE7ECA753D0BE19EC0B534C36D5931CA1BF72933BFE7EA0FA33AC5E2C692B0A2 C93D1E80B987CF6712F87D24A2A805FDD4FFDFFAD7C949EB8AD0EB29F2007E84 C398EBDF94967477E2F14E76C5C606A64C2E69D67BD20CAF059BFDC66D81208D 174180E81665DB98DFB0146571F0D1FF09277253F9B02CEB5110FB2DAF43506E 6C2FC70478A2F1D5823FE6240C9F0C297CFC8525729EEADD35EFC6D6ED154C98 28020D1374D41E012D89107C1C97EBB2AA7F4D138EC3F2B4D1A82C664601B70B 23BC3B4FA6B532028B0FD19CBADF6AA77DF3FF2E9A31908306CE9F16B6C3775F A5CFB8D93AF980F3A477255D0B80619AF48BC6AB9E663A720F524CA4B6F8C5CF A68AAA496D71BE8E6810B937600F866AE6FBF20EA0A233F882B1825D11B24CE5 275EF07EB7A6F5E5D043DC33296793CF679F4BE3D687CD5F6067D1B70582270C 80EA57A731893E1B66DB17E94A3629AF53D2E9FB0A53DE2B7438D13B562C3127 43B4DC77D7538CD3D5F29F0B0AF81AB30D52D1F5A717C3D63E97E07AEA26B21D 06FF25E6E2D1E255360B4F0DEAE7FC36151436DF742278A1A194317A29C46BBF 316BE668CF2E9EFB77EBDA14A6EF8FD157A85EB118B0303E8F46D1085528284F B2921EE471CA52FDA0FFB1ECFFE968F50D4ADA312E75A8070F541FB6BF14725E 3DF4ABCA56418F141C49617874DFB164FA6FA14CC241E27B4CBEFFD595F3E9E0 27CFF615EC7C0ECE5508054EB43DFACC7B5F1E0F5EB3A9E7AB9A29EBF52E9971 92EDFDF90828E66860EA792A42B0AAD731C36C88E18474A838DBADFFC8F8A3AA 05ECA6D93E8CE9756E92EC5F1BE7E377434B2C452A5DE500B2ED16A8D369CC38 06F0FBC6CD3BE6F73F8DC1E0ACEFFCCAF058E1046E47FFCD96F2674B9EE85BB1 AD333B2EDA87643E6619A3B111AAC9447289E557ABC242557CDC3DBCAABA877B 7E35885D7AA54CE6590578DF8B22306E34B42E927C810191A08F9B49622445DC C0D22796D7313000054F986FB02205E0E7603C85CACC3BA257C8F28389FF6B32 D89F844023823F0CA224CCB075A8E1868BBA5E11DFEEBA5608FA15AE9A344109 BF2E483A43B578CBB28227C3307B2DF92281DC10B3980341A65B97DE97C501E6 435375A6009E1B6EA71818168EC9B1610442F9CBA0D378DCCA0F167C6661A167 7F3E75CB0063BEAE0FADDB5C99FCD2C1880F019ACEDCB4D667E5F3C05F669251 6932EA020D870DBEEBB205EB373A6F0EE46E0252A0F08DE249842D15BB28B603 79AD039438F429D306D1580FAE0279E2D1D838276C33BF1D3D277691278ED890 122AB5FD3E321C8A74C4EED767731D4DE95B921DFAF421DAE4C32BE6E3F0579A 456EE7A6A5C28520BE4066FF3EE709DEDE872A5952611FC9D3387763FE40E6BA 1D0072857FFF49D0ABD64509DD26E525CB318BEF924A83BEB7709BD320DE5495 701198A437E417E4A04BBCE7D78BB5BCC303A444DFBD79E0B86B20173BCC67C0 033439A3D4F604DFC14436E6F2C42FE295C7EA50221CD7979C4B3BFE18D88B56 C9F26AFE3E8C40FDB945747663A3551D1DDB491E4279088830E9F71379A6BC80 AA42A1677063369B25679694B98BC416A0E3768AE31EB8663B8EE6D0466F0FDF 65A337C80BB7AD1ED55ACE5660912D5237AAEE2F0ABA5FBF602AD6694F498694 BFE71B03F355254F6459C13DABE6B17441A432360172AEEDE3F6DD291146B7D6 C851C5BF0884BFC33E0DF3E20CB953AD32643B6D499E8F648C9AD81DC87A4814 B2FF1CB895B6416D2E8C8A6E83B897151C4845AC39C63E90CAAEF9A5E599CD40 F957F617EAFCA37A83AD830E933843905DC7077071479329D79D6CB65AB8875E C21CC65BA729DF1735766568DAD25912650C2CFBF2C206C91A814D2AE9754EF8 77F9155BD918C97048CB3FDDA16D0160674ADCD7091744B0CBE8CA4A33644133 EE3DFA7CDCBDE34561B449956220B4C71157464575E54DC385E7C42A67456629 8F6B5C69528A3FFD8E66851153102B0A20ADA7F3051B72A7DA71B4DFA37E3967 BB1C9DAF41690EB370F94AD0CAD0A63F11B51E2B6C124E58C70C837B38E2F70E BF330BE470108E27881E1B20AE4B9E96EAE3F7EF8135C11110748EFA53792ADA 2F27A7227000C10E2853ECF65644018209ABCD9A4E91F419FB4D26674C9F2A40 CA323D30CCD5B6572E0AB62090B7158487FB9CAF35F51087964602755E2CAC1B AB6AEE496B92BF6AF30206833113344274AF2F37AA6CCD60E8AB5E5E260E10E0 52165848DF7DCA345CC957852D0E4D6F7F4332D5B77409F00E2009BDA4DAFCAB 9C3386F01B077207D3AD36947FF30B977938E6A49B25C44D1F6E337D8606A8D2 8C95900CBFEB22D983CFAD0963F6C2C735AB2579006BCEB6CECE0AF8E006FAA7 BC15439240459F337AB1B26F093AE37AAD24AB8979AE54D7CBA4DF4FB30B0362 4992962915728F38E0E0FD3E42275D608CE0849E795E90F19463237CB0FF750E 13C9B1204CA14403234EBDD0056FF04230E381625F75CF0DB46962B2AF563020 CAAC609134CD8371F548661BFA0E6FF86BE2741C4B608A2D1684612A61D4B62B 651155520E2760DCFD501B938B7FA8566392F29DC1B3D05BCFF9E54F687A5338 D86E2F441945696D38575FFF6BE5C9AC54EDD4BEDED4E6973E9C6C0F0363EAEF D0CF2930B9215E168EF64E1B3E943C3B522B4E20E0F2F93B72F2CF42E1F03BAB CB143D94F0990493D8BCDA0D0BE16E7E18BB4EA0809DFDD7E57470AA4FCFF4A6 07FFC4F8731E587E4DFFEB99B3042C791DEFEF4B6CD573AA2B8C5EB6D327150C CC126D1E2990B8B486833AA63D894346E612669A68C43E86D2D7999AA17F8532 261C69020C27736F2D68F492477720D5394600CCEF19453A4D4069BC5FED262A B85984B6C7BA16BEDA9D2D9B1B3F599D23A65259EDC48C4F2E23E4706EFA4488 C4579A683C727B3B71696E7DB7E450C10B0B53FF9BDA09AC238C7B17739F20F0 F62AF77E854129C38832C6EB0BEF95DB5ED942415F4C1F50EF6C1AA8FADBBC4E B243598F464D83DA65BF0913CF4EE54B6D24968E91774FC285C28A53D2A0B864 170D55FA377DC3A8D12BDC68C72035820AACDC77E75771E4EA88CD89F3170F95 8606591018A4D584D9B1AE2BC59C506935DFEA2EBF90233066F77ACB5F7EA93F A2341C4251856EB428635C740B7A14F7A2A180A67F26679E4AB3F734B98AC379 50D89F0168FFC34F722A975E8A6E65DC92F1C41E3F93E77F604EE7F2BB1ACB00 7F3151B48263121C3C306C477B8354AEA979A7C944197DA90FBCDF391EF2C42E 51D5B0110C7818121FAFB1B1E59EA9689CA52189BC91CC6864BF22CAAF649661 80E7CDF261DAE873951924266C7266E4BA3B62B8607BE7F673F340C03AEB1D6F 0D7FE457DF26E3CD7E39A0D59D955B44F118ADC4413043D2A7869ED7A2A189E7 41DDD1125FEC038526F4E818FAFEDC691EA569BF606C339F5C37D8500435D702 D13C441A938F254972BFAC671F86134A2ADAA50C41DFDF31D09B313A7C4A1F86 4B927F7E44C693987B981A819AD119B6148EE747A664E590154EC568E1C467A5 1FCAFEE70B045584178D62CFC17C84F5F57FCD2D4EE11894889DDE71E819F722 0C40996B9C3F38862B10EB46073BC786D938F684EC1678FB86DF1FE573B16C3E 69C3357C273ACD83A14CF2E1B0F1AFBFDC902F27DA8B47F992663CA24C30EDBE 0547FD591FF27D8E54C952100F5E59151FBD805B477DA511689ABF670F1C9F40 C03BBF73A15964CF9DCA9F04342C018C61EC1AC4A486E30CE0EE8E945AAB8D0A F3BB7A74D3F0F885B75731E6DE446B252BBB89C699E66D7CE1BA45DEECA2BE8B 380655D35883E0A7E42D8B5D8B418E06C653C54E644D5FCADAD639CC9FEEB5D8 0C7FBA85FA049FFE096E32812F8959448A43 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMTT10 %!PS-AdobeFont-1.1: CMTT10 1.00B %%CreationDate: 1992 Apr 26 10:42:42 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTT10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch true def end readonly def /FontName /CMTT10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 33 /exclam put dup 34 /quotedbl put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 43 /plus put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 60 /less put dup 61 /equal put dup 62 /greater put dup 63 /question put dup 64 /at put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 92 /backslash put dup 93 /bracketright put dup 94 /asciicircum put dup 95 /underscore put dup 96 /quoteleft put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put dup 123 /braceleft put dup 124 /bar put dup 125 /braceright put dup 126 /asciitilde put readonly def /FontBBox{-4 -235 731 800}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D19 38DD5C4467F9DD8C5D1A2000B3A6BF2F25629BAEC199AE8BD4BA6ED9BBF7DABF D0E153BAB1C17900D4FCE209622ACD19E7C74C2807D0397357ED07AB460D5204 EB3A45B7AC4D106B7303AD8348853032A745F417943F9B4FED652B835AA49727 A8B4117AFF1D4BCE831EB510B6851796D0BE6982B76620CB3CE0C22CACDD4593 F244C14EEC0E5A7C4AC42392F81C01BC4257FE12AF33F4BFEA9108FF11CF9714 4DD6EC70A2C4C1E4F328A1EB25E43525FB1E16C07E28CC359DF61F426B7D41EA 6A0C84DD63275395A503AAE908E1C82D389FD12A21E86999799E7F24A994472E A10EAE77096709BE0D11AAD24A30D96E15A51D720AFB3B10D2E0AC8DC1A1204B E8725E00D7E3A96F9978BC19377034D93D080C4391E579C34FF9FC2379CB119F 1E5BBEA91AE20F343C6420BE1E2BD0636B04FCCC0BEE0DC2D56D66F06DB22438 452822CBEAF03EE9EAA8398F276EC0D92A7FB978C17805DB2F4A7DFBA56FD6AF 8670EB364F01DE8FCAFBAF657D68C3A03112915736CEABAA8BA5C0AC25288369 5D49BD891FABEFE8699A0AE3ED85B48ACB22229E15623399C93DE7D935734ADA DA7A1462C111D44AD53EA35B57E5D0B5FC0B481820E43222DB8EFCD5D30E15F9 BA304FA879392EE0BCC0E1A61E74B3A1FC3A3D170218D7244580C7AA0DC65D19 741FA5FE6F8CBF60250ACC27454BBF0897CA4B909C83A56672958752ED4B5E79 E18660764F155E86F09EFA9F7685F2F5027EC85A775287B30E2069DE4E4D5712 E7D033481A53A2702BA7542C71062173039030CF28D8B9C63B5596A9B42B33E7 D922944A38713383D3648A4AF160A3B0C8F3379BA4372BE2E7EA49AABA75AEEE C5DDE1D8BF68483C3D21271280ABB91D54CC819680322EAB72E1250A760BC8DA 726405EFE420635B5B7F0B48752C06083E92BDE06401C42A2C528C8A60381227 CEBEF0C9440DC034DAD9C19FB27DB399BDAEE22053591D6538587C768C1B7B0B 7D1E222D2D8AF3A6473CC4C0D6C3E0DB49068CEB8C9BD1C5CD486A50DAA10BC7 7D6286142355E3F21DD254E27C00C442728A0BAEC9D3F17AE9CE320D365152E9 EB0D5E3874F2BCEDA98521D23FCFC30B4B69DAD2ADBE80E5964ED0ABEF6C73B6 DAD30E2C5061E3747FE536E1A5D190D028F2130AF608F5DDF9DDDF1E77DC8437 ECB3EC93B33505DF47884DDBD1DC6BBE4098DF04A29AF6FA3AE344600D0AAB53 B3820DD7ECB600A3B8001C51AF2CA7A39AE1485A087FD1752DF68F55B52B4DA7 48030F2AA7E570B3D56C4EAD367B9B73FBC0A7356253233006178B9A6BC19081 B815B5988AE76FE6FAFD7AC239072B1106A3F509381AAEE79B2F2154CAC4727B D199CDC8B4D05DF4BA006982512ABD7539E28D937B0F87FF79A3F84C29ECF943 A8DCB8BDF8EA9E7A0E7CD60BC2308C96B3E889C797D0FF28FF4847016B3DA141 E76FC6BE78A6EE9CE07E651FF86E720A1A1F075972D36E5C55162E3FE26BCE3A 814BFEB12D4C5FD24340CFFED499C7CA183E57EC4F12CFFBE3291D43F7270575 C6C3306F832EF182ADD0AA14C4D8669A17C09F632406AFA195F90C4DDC39779E EC0A77E590211592D6EE19563963225C06C2F13265EBB5A6CFB7C17D9E77650D 11958305727AF662AE73AD0E3ED5F7E7086C5A0C3548A8129575980B06C715AF DD55C8DF869BED0A7883491030B1A7E82C5EB04E5A7D952E716DD8F2EF6275EE 087614CFAB55FCE2BBECD7E8D9C90FD8359E929D5E0A416A23BD58158318B4FF 87B095EB63F7F052B3A77F136FD66EB2C52BD46CD7DB3091A4B78A607112B12C 4D171B2A00B78B0E1C44B0D90C20D9244281F5123DC1F6063F91E9E3E48DE78B C862D848BAD073A4FCB5EEC9FF54B5AB8E234CCC3C7439C62ABC4A13EF1B8897 ABBF21F900C564C9A305FC36FC7224932F766E6E72C2EBB55953DFE2AFC2E3FD 33A0C6F0FDFF086E9FD796E7242596AE85B877223532667625E371D2156E4C04 0D7FFCD3337B93DF066CB6FE1E13960719EB7CB409EE805C08ACD2C06303ED9C E34C898787A43C1B428B896551C6FEB50A831C6F8CE2073EFC662EC286CB7555 A3B42E58772E82FEE206948B8C439FEC5E4ECB9E11DC3A4CBC7611E30890E408 637A01A2118441B4F9467A98BB2A1B03BB2F5D8E3DB7D1D15C188D9E856088EC B762F07B1C06024F7EF53A2FBD60C0A1F4C0275D07164545250ECEEF8CB15B04 A2D8AC44DDE818C4E49AAA50AC3F4E91B5C4A61B1B963D4B188CB5D1476E23F5 80F3E67A6AA4E86A6A3EDC6A513E49DB3EDABD76FCAC9087788EBCE9F11C2C80 0D1F76C1974BD8D9A12A9DC6DCFD147AA2836825A76895285F6AC0C5CB69E898 E3CDC6B688608AB14E31988B0E4963F548497C5FDA0046AD75CE9BF5BFE7E942 0006AEDDA0016E08B3250D48D1479C6D9765B1FB89AB521093299FDE2D9543EB D8DDD18BA694016A5C3465920A1F89C12FA6899A7FDD9F4403EBB2C64E851565 21B1D59C030704C1046076A3D8A0E54B3155B704F8C98ABA992CBBF9FD40ADA8 93FD774ED5B517E3AF397456E26E0D413592BD6F5E3EEE94B36826B91236EF5B 74571DBDCD66F0693A1DB2582783434FCA44D693C0D0F9E66423F1D3BF60CF1C 65AB1E785FC36C5C04FC36E23B6850E907F4D3D4A29B18E2312579035829CC54 94F44FEC2B33CC57BAAFEFAB09109B873CB63A54C57C79BB370A121BBFAE93CE 0A157D8E5B26193430A3823D58AF076F0FD6481E4D2E67A4F1DFCC0108CF540A BD0493DA4BA2797D101C123AF18E5EBC9DB40356AA63B555BF8A75FE600576A0 79B725466DC580F59BC21528A589B0093CE613EE21351E7D8DE946DB7E9B9C19 F9A0197A2F9F2FFB1C16DFB04B0DEEF5EDCF0012A46B4F02422931BD3F3E11CC 2B23C8107BCD4546C3AB0D09CAA5F0E163701D5744B8076748486859F6977292 229249FB4136DA5DCE55986310EB1C2463F3373C7102858E4F4F3121BEA7B530 024E40FA6AD655AAD3EA125DDC68654FF94B50516A6A5CB69181578CB905DD91 05FFB254FF4E7BF3185B8BCF3727B92AD8E5BD76869133B1E7D26C040A76EA1E 6B5AF81D8D752C7256FCBFA8C22BE5D5ADB846D1A18301583CB0B1E7010FDF20 5C13F004B60BD839277F1F72DDF490BB490DC4E6BCDC955CFFEA3293A6E166D9 D0E050887B2BE381EEB7EB0D296223AADFF8CB887FC7DF067C38AD6890E990ED A85469922860DE0B24083F5290A44A3B5D2CC779A08E39F3C0E642AD7A688478 DFA03466736CA63CD7C915D37E9E273BFF31DB6DD4A89B67D858C8A7E482BC21 88D142527EAA60597B24D15936D0DC7F6F61A578B2FAB836C96CFED55402EEC1 1076E30DEB09CB8CA599FC26AF67F3ECEBD57E11834B5D614E24FDFC0C2A9E44 4DB50401AEBAD93FE0476B0A2660ED369DD3201F4D1827325A0A17A53D8DEA19 EA0388327C707235E37CB963896E4305A7C3A0AA9D081F2260221CF509752646 B4F3D3DCE80D32E3CB235FB3B38CD870E8D221C1FB6EF7C1C2CEC982E5D8EA4E 988A7DC0BADD3BCC65D22DD06BB41CCFDD4999BC1EB4695A403D28F5EBBAAD22 B8992A292547899166F8965666BACA0086EA941DEFC2B1AE8DEF2A994C9B88E4 837D1FB8404340C8D4555F1BE40B4DE3B8362DB292983CB15924AE357DBAC305 EB83D8FC55227B5557F3A6E81A3E6AE8EFB95D6D830EDD9AEAB8A82FE40E24B4 C481CCB55DE34D5371571A897BE8DEBB2FB4FFA460D991E4008C78836974DE4D 75AC6897F7F286058933C833EEE0304FAF54B7FA2FAACC98E7061198FD8ADDBE DF542AE878C439BAA9C9C531A5826420B22351DDA3E965CFBF9964F033A78368 61C1CA8FE43BB2712EA301EE9BF0AC037432BED5BA05644F88CD58A7C5C63955 DA0A6615A61629A77C6F8B70149ECC72B2643EE9376D75C908ED3F5E14168E54 7B701ADC3D2DE358F5F27E20D37B3799EF04617A8ACE07F5E180740E10C1DFAE EDEFDEC2563E47E46F56ADD1D445E6D74970E0400A69B84F0B4B0B6327DE55E0 E072DA6B77AEF593C14782BAF68A9769267A8D67E523C0A912FC6D6BF9934467 70B16F8072588592B4051BE72854783332828EBFFB8B16E31338B1D8B2DBBD23 86F372EADF7607F17FFE872514D266DAD42DE2E86E9B46609E7A8DADE11D71E1 C4E8407F727E46BCADEC19F5E4FB03845556E319426B60054BAE3F051371EC11 08984B61AFEFAC764065E8B98B76799DADD1C5E75F5147A8090CDC00DC63D89B D809A3680C31B04E654844518EAA1317A72C9FB3BD728AFB9DAD5C1D123A275A D9F2D7A0F87F5DA643EB29820DF7F2CB553FAF6E35FA545F4E76FDAD4B6FB35C 5DC4D9610E38714C3465D3D3411D84BF52D1DDC06C2FC000D09E688C49996644 F73CA4F36F0534F8AF34E980C95A0C07A16B57FFA29A78B6BE88FF76CB6414D9 6E3C911A732A4B343DA733C2B28C9CF3F982590A52CD7C4B6396A5577F171125 8821442A9B9486B97E26E4D53A6A2FB26FEA3510C2733E5A0CA24AFDAB5F76DC 1121932440C9AC8022CEC708315323782E348D2AF87BFF31D21E66C54A796F22 661CEEAFC2FBA95AF5E3C9BFC00731F7D40E5506E7B150236452DFCA9D3D4B27 B546368F8C6F18A5ABE5B561FA4E7F05279932F59B5DE8AEAB73CD67F6DFA0A6 3DFA094569A33DAA6CCD8AC72E75FC704B0399DC73C73D0EAF1B99E2C3E338D6 12AD54BA3D8F2E5DE3DB7CB10045A55F50EED7C208C0DE059DFBD3F413C32C66 667FBC67969CA154D125892AAB17EA4DAF577F0A08CA14A2707000BD8FF10194 0CB76593E37AE9E2B9D3C65DFF29621E3555D200012679B00F1D5FE2F9AD317B ECCDE362021F989537338619BA1E33612F46D4FA053375478DB1CA009B739E39 FBF82A6578F9FFAF83CADA17F42025BC02CCFC6372C83006E9C715D7C0AD8B0F 4DA4053F8A7846BB2293C7D3801E9F2DF1CCA5750F51E957CA93B674FABA7055 73DD8C8943E8D8A25E0B29BB82449A68009AC0351427520EB0AB40FBA7BE7172 934E2A7E77DB5F74CF42FB1EEC4315A7EA268A23B870FF81304619710E38AB09 F6F969E039CF8F9F9373A37120C81A59A36A67885ADF64828B97CC357BCA2031 8EE3EF1EDC9B352BA4D400E1889E1683E274E932B3A66BD6EA1EE724C0ACA792 2795CDA0A49DBE30DB180F2BA93F8CCDC7911C83FBAC6CC4EDFA4F87EBB8990B B6D96D6AC878D1B311036FFE20F40A91618B0C331F88E9D97D97726E6C09E27E E65A1C1D309DE63A3A6B63772205A2BAC1F94AE4FA13F740FEB39ABAB5BFBF01 9A071F2747D7964790617922F0E5F8301E7C59F5529247F5D558C2DCB82B22D8 3483AE0D9D59757384E500A65565B0037BE7BAEE8D108710F4AAF706D2B68EA6 E15D6878500D96E1D72BA01CD463F2ADF7CF2780FF4E16CF5AFD7F855E3A3172 939D5EA60A9CB5D9844A48E226F2C25EE2608164E59108C51663C39EFECAACBD 01B7054D1725CECD98A599D7577D4E2FE3E5AADD1CCF354E28CBB1784B643DD3 A2D95E07A1E6097DB449AE8A288A01E1FA2549772496B8F529A91F060AB56ADA E784138A234739CC2360CA58E2AC69B67DB90849AFC79240FC23B1972C75CB11 00FE2D4CCACC07848833704C41940B8EA3DA3AB7152397DF1DA02F3F726F0FBD 109BAB19714358EE75EA77B289118645041A325369D348FE0D0A44559E074785 A15A59B7EA323A8776D6D9C9E43D70A6954B7F5C57B4F54ECCAF9F03B56E9348 3B15278B3393D61DD00F4A027E8AD1CB691663134486FAEA9FF53039421F87F9 0EE4B10CDB9646CCCDF1896A4B9489C423825D88AC772C5AA9974D60EB7D6741 1CEFC17148396962BAC992B0CC8ECB1D8590317DCEFA28E8D84299B2922414E3 5B208B04508E387D58BD2536A3A9AB2CC5C1FA3FCF8FCA51522FCA14823E9875 4868B3A00DE01B9A1DD72568C1A6B5F0BFD2CE46822C22948FC7CACEFCB30AD5 7C8329DD9E6513346BEE81AF7B9953C69A8E95EF4C1767001F7E405030639563 8F6521EE4EAAF79A15559EE794B59B13ED7727C29D0186D125E658F1BC77632F 3FFBA2A6ED00A55AA0305D3010C33137EB7934876A3503995E7459F26A1EE70E 5B8A36044EC587543D24BF2685D2F0101E4315DC0985E5D26B57B676064D50A5 F3BBA0478403648D3396F53F54F077C1D8DFECD6500C6BAA62A2F13AEBF2ADD2 37D975EA210609C5381DA486BD7B4462586AB387DDFAFCA1ECB3CF0512A29432 422A71EADC7631B27A11FC75C12FB8BBC4A4F2BE73667D065E960C06477661F6 184585E3799BE0793094D99C258075212EB54F5A0C953BA82A88C4D27147702D 38C3E8238B1C7EAC471E5EFE2BFC8C514DB432995BD4AC460C773E2D78E0A8CF 763465FE5F18F6860EDCE1B79AF778EC09C93F15FF0D757AD46F26CE925E6B44 3F867CBF85E06C7DAC52172BDF291EC0EE4B9894BF59D4203BC2434CE6F3D431 95C34EF813F007B234835F22E3A88E52E2EB0962A2DAF546F7769959CA700291 F67AFF8AED26EB640A389992917FC34788FC107D0209B0CCC5AFCAE0911426BD 673F995673E64FB9E7ADD5170958855227E9B8A7A18EBA9FCE36E932ECAC8D80 4B50E79F002241A2CF5D3C08FA3B72BB1FE2487E48750F034FE9B75798F46F35 58F28353F7E3667A1964BAFFEA27362729BD6E980994AB8F375639BD8ABDF35E 262E832C4FE9D6909DBE9B1208D62797CBEE81E4E7BCF16F5F79C5B9ABA16997 0F7519F5870CEB22AC91E1B834A46782AF42B0D4905F0DB66BA633D20A0E3330 5244E33EC8005B52BE5AAD7B029DD49F0E612E80C45BF1BFF99720B2C371E03D EF1BF2BB36F2D969BEFFCA4BF6D360472AFC2D8EFDCC5E3D8E24F2CB7E265FB3 05FD5FE8E2C9B0E81EC62369C0B9B93ED034A76944475AF42F5DB14B425D001E C19C55AF9A96CF73970B96AF2B57654A21EF7E56653BAA5C45D4872DDB48A2A3 0EDCD144F6A7947634E952695E9FAE5AA740DF68BB937F09F12C754E596BDC64 F8BD74A7FA57296176D3D6024BC9674B7895905FEB13D3EFF80D372B57074CFC FC0BC8A7DC19622854534EEBC493087519E74A73E40CC069625B395EADEB2A18 48B87BB4133EB0406CD320B23DC85AC414468484A4A0D3A18BD0301175F193BD A6311CB851FAA63C6FA6BE02A2047540CD6E429E4ECB9517D148E82C1EDFA1A3 E480C21BA6382F998B48B199641129B2CCCC1924316740FECEFC961C506A6D87 39AE8A2E6F9E8E2E2C686FEDEB71AC62E332F90E523624278460D100888315A4 C1E6A7B93499526A3CF39725FC8E3C648271D4171789E0FA33627A29FD4C2672 FBAA9B1DF86C070677D7863FFA3AB48E1EB5A316267E7695AD4323E7873C517E F96B0FB465ED931F2A7D92A75907893972DD2314D6ECAB75D1583E4D2D4CD5FD 33BB8875D14A4E73C9932A3C4EDDD99C9905E617257CFBFE829E40F2A9450BEB 0B0F5773DC63BF79929DE6D103D2C3E4C1F09C3FDCB09348C4D566760753DBF9 D1E9BAE39EF340F8B6FA432821FB2FAFCCC0992623D4D91A5845449B0E15D1DC B8CA4C315B6626AC3C4AB18C323690629E7DFCA9267A288B14C2868E66B329AA 058F68EF0FAD9B83819E6A8426B95F3AFF76CF5ACBA5822CB3CECAE1E8DE785D 8FA0C9D8C8DBBD05CA6ADAA7F3B73D1DAA4A830B89F75F3D5247A0A5F1F074F8 5A6DCDFEDB9A9768A77E87DE84CFE7F04F5FA737710950858B86236603872E9C BC669F8E62000160FF17A41D44860EA1CC0B9024EF17C843855336F2CEC6F00A 064CF981A7CE63B5235AA54CBCCBA8A9263A107FBC42B8FE75C926ACF12E5F1E 8F8FFB04F6239DC059601EA30355AD2DCEB3CE249213F736FA42B8A317F8E27E C5065774A8D7913293D9955A4FD4C20EA07774DBAE889EEE43A3353D421A354A 0406B1FDD73F361EAF215264106181AD06764A36B6D8F9695CCF07577FAAC374 03E68E2134429D513176E5D4157667CB8F2758B5AAD278F4D4066230B776D1F9 9E9BB63C683AAE2E052F0E7A1BD768B1DBDEFD9D79E4863EF0A6E241A7D42CD1 80F51970FE6029D7BD2351FDFD187866F5DBAF488301E4B83C0F8A1A57293855 DF4CB0CE8126E8BA8A10A706719BDE21FC83AE499FEAB44125657193B2E38226 F54C85056DBFCCB3FB2D2E94F54C84B29F625D660AA3915952B60CAD61B3BB26 E377952F5A65E3BBAC872D4ADED9001273515654E8D0BCE31558D2673F6AF7ED B44BDD33C52E1C8F3A7E91A9773D5DF94554CD653908C7EC3CDCE4B7B6DD9F66 F87EE807510A2195A58BA8EF3394512F31C8238E7A4B1CA478ED4F9F8DCD83FF AB596A40823203D86D3FE013BFDD744500C33E94F4022EA1DB6B86D1DB426CAF 938D994A467BB41CE65DB196867B821DFBA4A6536FA5E2E6A3A375991D9BCF04 87669DDF43F131389012BB8163033F3F3050879D5CBB17C2FEC335CE1264000B E780819140727B543159F50CA220CD816B51650AB9B577C104BC07BC3C5ED29F 759D1C7DFD6A8137708B44A3C3514B397C6AAF731BD5A1943E68167482EC84C5 A9C573F0D95FA5A17C66B79FC9970C1593676AF7EE8D3E85D0A4F0CB1CFAC0B4 FAF7D3FF4636C2A7A19823F47ABA57AAD29E877B78A75AE343A0273B20131FD9 B80B394A8C57D6462391536E63CE79F72D8DBA14438CE438942E2997C0062055 A846A9F8B590A50AAEB5A9A7A98E9E7048EDA483861E42BBCDEC3FD1CF498D56 D49E97F57DCB834294047F146A00B599665B16B8339EA970E74C76C35E625CCA A61D80F156470304F2954A4F65D987D52E5BDF1BED8B6931AAFD7D337242CB55 8121B825CC523FBAFB34B5190C7605237CBBE5593A39433495DE20FCD0710BAD 4898C8ECE1C679A05C16FE6660E116851CD6BEAF77B42A825801CA5C9C797504 52770FA852CC9CE6E7FED122204BD67D728E1B79FE30883EBABAD099435AC58F 8DF96281954B4AD12231B636C643490C983B1028C05FC14136B97E45BDC53479 AEB9FC2546DE673842F615462E00DF4E111A950700EA08BD80CD0911A43FB6CD 7AB2869FE2AA3F0E88807FA21B68811A221F171446071DF8EA778AB2B53CB0A6 5202BE4800AF9C6E73CE5D02991BF167100687E572D825A6A669A2359A62642A 426AD3B50FA8733E1A7D00BEFD71950566A01174E673D79719AD885F3B357AFF 3815F99E832BA39C844A126EA63C58EC34DEF950578DA38E9D63C6D661DA5505 7671E0B5E369C645FD4E0739EB10A0A4A0CBE219779774DB916732D216C891E3 7763435D2219F855452C870F4457DB3D43506189931540444015ED554A28A2AA 3EB8C24BAF3FDF47B0FC66576D7067FA0BE104EDCE910C99F4C9C0C771EF0929 5BB0BC7AF35466FBC48ADB22A20642F53A42845BCFC40A0BE9680D0A01BC915B E1BA073CD3DCD439A4E276A6141910929A01FB34B699403BACE0C5E4AC2FBF76 B59BD96A80AD18D0C9827C525BF6C758853E770B1A901482BD00B228D24C8AAA BCC25F64A575AC540E5B7DFE3034FB7650AECABF8D8A4426A73FB75BC065E9C8 D1598CC583E7CCAEDA9174E3481875A37C6CE64018287852FC538358844E9053 2475C21EABDE7E24B0B54724A68502F6BD26E6C322D96F8A126E65B24998AE58 C99671A25ADBC1AC46D7809F86ABD9E3AD3809FB1DAAD80E4C3AA1A0D6DC3D94 C3F7696481D742F5E71C77FFF6238B83052EA11033175EDE4D7CBF9CE7AF88AF A9C051FF270C79B74A7D8BE145F3B042197BCFBD47C0B5BEFE2A3F43DBA238E8 CACD79F75FD09DF2E17B802478B58517C196EB440AA94BD122E465343F9C8498 E3BBCB8F86AC6B260BE404E0F37FFA77BF2B68784ECC13FD1FA60F388D65F670 EA2E704DC1DCC1711CF9FBB09A527ACA1A23A669F7E303B01ABBB36E80AFAF1B ACE6170FC2AB3D2C11145DA449E05B623D6C8A122675AC3D2AA963449F0E0B49 AED325591345063D81261CF781A216167280CC100116FB3B679BFE5C7A2500D5 34697EF0EC748DEB7A5641298728684CE3A817E7B99D2D4CF480583549EF0243 541203F6425AED6B4F4CF80BFC766ECA77FAA20866A76304DA67CF3535FE2F7F 7EC7DE9D9779A164C34E2DD7C8195F746E5D198602B91F36A533B89FFA438FB5 F04982C9EBFDB333AE0567248E0CD8158FBBC2F27849D23F9320EC2A3B8B33E6 41E0D79E1848B83B93B27B615883BCBF1DAF72A358E8822FE19F8AD94D331BF7 F014E740392D7E10EE48CA92AFD3478BF74119BE86774EA5DECCE91663906FED 114465E100BF9B8A5BC5B1E1A59E69A4F499694C76F0A0093A097352AF7D1515 02099657CE5FA69E1F36D1379CD41AF001B6FF80AD6FD743DA30343EAD91B12C 7D444C84C7C32B4CDF80D4885D657D77B56F997DCEFEF26A100CE5B398F9169C 89AEBF48D557B3CB3D2AC5A3F85D72654C97D70887603D7BFDB675128CEA5751 B92C526C29A946B9A56248940762760738567BFD4FF152E4C00425B80597B52B 3C3B9D6B8B42946B47C4B795A167EA029295770996C16F3ECA0EAF8BB483670D 858820974F28A0905FD531165BC4A3399C35D70E500CAEBB8D3CEECCE59CA59B 88E247BBD30D45A9EEEBAF4ED6CAA56BBE12E96672444D67CD677FE7CE031F86 96EB5DF2861A540EB76148D94D8500430C131D0582B06B12EADFBEC2866DA87E 0774B662525913B6CC7016828B9F15BFB846FBCA36A287F0CEA4B36004502A73 BFC9863DE2B0ACB1B9EC852D1FF715C293ECD1993AA656A01AEA66BCC0EE5238 F100F05C922329AC064D4DD844AC7E9966C737138FD79132265698361038DF1A 9D752E0F5A5D6D1564A792B03EDE2B91082DAD0EE32CBEEBFA27424E3C718174 26D8E44180D5213A7CD5A5F6203DA51F58DFC4B9D787B604EB15E1F4BC0BD3C0 DB148609250159002D88A70A716E4A6C7F2D851275CB69B3902DCDDB37B817B7 E6E9D5ECC26CEC40D2C25C472406CACE6A9BAAB2271D96C1CF980195A77C4CD8 531F52B874E3B16A0A54F4F65B9FE56236A3B546DFE40A6CAA36A7FB3122216F F869A6D83BABFB38C2DC3F3CBEA8E86F4D2CE8DB2A3A4544336491C4733BFC5F 4E6890790F53E2F37D42223CD6BBB4CF906C651FC2956F5D7099C947B76068A1 D4247B111A73BA8B2E2919AA27B8E5D083E88CFA7569EFCC2AE9CDF1FA0C9C85 895FB5D68DE0CB3E422EE188369D95AB80EAF43DBF47F1A463A6B85BEEC2F972 AD9D3F19A5DB71C0E3DCCBDFEA2531B73A570C07E88C7B13EAF4DF20881FEA8F 83F19D7DEDD3B15403B53164348DB467262C1A4C871D33AEDB0EC776E7CD151B E16DC8E0948CD33CB9EFB3AB22847BA069E41D9D35D9AAFB350458A0316FB706 6F0A18DD0B99E5E42943B91C753692E4D5B7B0C4581D6B26C54D4C8423FB0588 0EC33A21171FFFE26774685CD1EC38CE5D2F5540FABC662B7A90CC8173D69614 DB0E64DDC76378331186805EB33427BFB0979F3B172B1069E88B779C3476A5B8 3656122A9BA949E3CE6D80D71023E3CB98A3C30597E963F52CBAA0571A6300AF 5E0BB7996B5B169988A75DA953153FA1BC03517BDC36BA08F7F74D64543B8D2B 86994DF588C46394BBBC5E3EFF244E30A51EE1B277839FA02ACC014E19446BE6 057F953459123338579FA60B10B998554FCE71D9362507BDD272B0F9D703F7D8 F5F3AC4663050A8002AA9E2D4FB4C55223D8B61A835D50532D334CA9DF4C110B D05610868184337B14FC5EA9BDFA14861CE6EA68139EE8152A5DC48DA84E209C E267B125EE84BD0A28208E2792E2FCD87A1A21D245C65EA4BFB25B79D008247E 411A4784FE2FBD8B1B9591DCB7CF2C1620859AE46FC3F168EC56A599D40BD5AE 834268800B1F8F85A61931F51E5B535FFAB2E83300DCA23592A987DDB42E633F 2459A8E100B9952C8C5862DB9E51B1EEC58DCD8EBDF3859F7188AC0261C5726E 187C5DF8B29DD35FC2AF9A52623E10A75A102D4FE18B4C904FD23E9CB088CA3C 0A1AADC44634F304AA75EACD44E7B6B2D2219A38274E195BA41914FD6A50E893 F575F3000A72E8F242792C9385E6CCBB06023DE4270E31E6C058AAEBD1278AD7 255178C18BBAC134410880A19FB765A40D3FB13E60C25A9C5157F367D7499BF3 C0D12EFF0CC9C51B304AF125C1BC40FE391999D6DEB06A13562218E21BDE9241 3552610028083A9E81D58648A71B1EAE1CA38D285C9F763A46E1F264090737E4 662652B96A9B85CA12E747F8E502E7EE3E65039B2B11F86893AB2F49840F58E0 D6166FE733B83D8887BE4DCC401920A562489C640453FB2EE8A0CEFE3D18FD12 A286755C4F284C494AEF5AFC689A387E57F36734CC4A0A3F25B9323DCF887990 4F5B57411B963925CA2750F568753E12A6ACEBCA2B93E72574BD5D3B1D1EA3C9 BBDCB32F2292111506B9A87C4CD642C3C91C2384855FFB36A6C01AA2337C6F4D E6E3BFF870ED5A75B4993C5CC8FAA6DC112C6413A9D93F03DF46EAA47C04934F 9C8D94A9D8C9346C5B82CE424C5A7F6080ECABBF30E42FC5E918AE14FB22849D 33A9ADC9EDA2A4979919333B1F83261983AC89965CDEDBC84DCAB40AEF88A0F9 0717BD009ACB5D9677FEFEC7886E2C07E983C7EC483B3E000E9E55177FBCFD46 B2908DFF6A55FB29A45C3FB15E88960579C69424FA7056A19DE27094D02C91CA 7E55E909CFA17D857D07BFC3FCD1C49F167C18E3B51DDFE091026249D8145294 4992E1E932E6E5947A02875324320614D1538DE6CEAFCCEC2A4DA60E9CACCBCB A5A83F53308B56420EF67FEC5CC6B22EB2CD3CCD078D6DB085E0F3582FD5E1D6 87F790CC66914318EE582DC839A9BD77FDD52AEE16BD47B69A19C1061806918F 5D11D4F30E465103EE6D792FE32C3D8006E0B9E4E6849D4C4A83D070DAC88476 19362C7B9381AB1D52D6887BEA5AEE97F56BA44E9536BEE84F316FEBC4117861 79F0E05DA8DDDE4F8466E1CAC865E9C416DB40CAA2F795BF37AAB63766AFC8C0 6730066C1DED84DC4033967FAC66624C0591B5084E80307465CE2AE0B0CCE51A 06B65A4FC0F30BC0AD8BC99A8A79670D14178EB762D9AF2BF911080D415ED61C 6CE1D78C23328310E0676DD336C01B56A638F770B1B7900017D38B4D9704AF7F 6C6E71E6BDCBCAB2EEA63D66D8D8CA1BAAAF5BFF9F42AB16D9FAA547ACC46349 AA1161B980ABD82C1C6B2AB4094D6AA6F4486B6B68EF57C15BC0AB55A57AC1F7 7A009B98F5BD53B36B8215CA5AE4A9D665CC387D600BEBDC1F6914CD13D37CC1 63260FCA3E526A4B3E892511E1AB003CE4FEC4CB347FFC554604BAE4AC0AD90A 81BDC8B5B2EB607457A4CEE153FB39C78FC1EBF3F9706D75384FE48D6738714F A934F68D5F16FDB704A2780E8135EE1247DA6E9AC616F3B898DA3DC4C0758E10 BF4BCD954A2C6DE7160679EABBCC701374D47E29D9FF26025D88D9B5BAB9E283 0A7F9CF796E0192A46523B9570722C3CB0D79131C1CB000ED8A3D3A97C6D404B C52B584D74DFDD78AA13E40DD517412CFCCE0A7C00F6C6238FC6FD0F26E80877 8A7EEFE351A5E07B1FA16025E51C4F2131495FCC5F6F6D5726D06BBE97D61539 FCA55B5886D85D03C736D71A61A703FD90CA2DF58003D02DE61658B88173E4C6 8E40F08FF0D08D2FBF4617E16A9D13A24C2866E0EC6D015E7669D58B59BA5F12 FAA7E09C032525580BCCE07C8709DC752D3B7F3B816C145082FFCAC98D45AE48 0ADB395A39756864D851972B20047B3F7A33F4FF3E75B212C1AF95BC6AF1066A F8CC749DE351E170EA4125401E5FBE34582041E7C3A86E9CE7F7A3ABE595BE1A 01E7DA4C24AB59C5DA382E05842B00656510FD7325585C167583D82003283BEE B25A376FD7490211F46598298C72D316FCCC4E2A3CE57F98D174256B6E01AD86 04056AED78E32983D7A5447CC4E5736620283DAA55CFB28032D386079198C420 9922A5752538529EC6E47D528F83FBF3B3C2561C1D7A29A42A6C846EEEBD573F FCE2A90EE612B1C70299A7A9F35E95C62B4995E3BD3DBEE5F7536AD357193174 55FDE6780514745FC79119B1B8703B81F5ECEDDAF18719C749124A18BADAAC24 C39B00572E54504AFD71DE864743A7D62DA1D5253C86C2BB0AED3555E74C001A 7B8AE3E5FCA23A5B1A48BDCED681670B4C55507A050B8D8B8C5C955A590C0D2F 35BC4AF5B1DA68FBAD35D1A9FC65ECC44700CA95F51AE0B5BFFE72362445C3D6 156B056BAE9F7982FEE3CDE50F1A0882310C5B430A4807C41F17B5197CE913AC 34D782A0A86C805D720880A56A22C2258CCF7E6AF943F7BC0508E87AC148FF02 07D9996758554E722344B35B9C84DB33566AE6B5F3FC3BA3002BAF1DA6EF7877 C9B4EAFA3BB8966449A09D466562AE066D9CB74469FF572457A0EFBC41FCC7D0 13A1AC9BD045004DDB41D63D81648A95B2B995FEDF9F1180D21B100E6EF6A825 F924E88A246EFCC3B7CE6E01DCC82E35430035B901AFAFEE0773CF20D0298338 40630D7F1D3B50B6A3216EF434060295740FACF59FCC188F30A0456E53442E93 AC312F5E2651970AB103067A9AA9BF613B9CA9D8147F909177FC3F218022AC59 915C81FB57778CD8811CBCF93F965FA7C387A03B5486A1E73F8A3E756809379E 72EC88AB8DB655139AED51147261BF7F42BCD7B3107AB5893E1E459C353BD4D1 0D25CD7E9FFE8F0D83C58D1281BF558DE8ED386751A455074939A5D0821ECCD8 BAFCFB424BF5D62B709CB889F9CD55E4A56E665E54BADD706A4607D953939755 2666CA6F9F0BBECF5E7C52C9B16CD4047F885ED24A378FA290B02F8129C53CA6 264CB9AE59BF5AE461C920B47DDAE5E532F97423FC123511722770E5990FEC94 2C179A887550B9FFBD41FEB258E553F6E8A80852C249C6D35AECEF24F1284EC5 F788C485C20D73D0E9EA1206D1CCAF614CD5446A4DEBF8FA730B267F29DBC0AC 9302E6C9F9E16CDC2700CAF3EE101321EE00B550DB9406B37427D72D3C5A8517 2947F71D7E79C8C83EB1C24700229D8BD82659778ED76C371E81994497A10785 E3910D20EE3B096E902D042863B2119AE745AA95C63E3D7D67625D72FDA1FE25 BFB3D6514E053117E8428DB3EB98C6DF9E9E14E1C57B7E68A1BDC25130A48750 15DEC47BB270770CC038BD9B4B3012300E1FA54A377F3FE8ACC65FE0C20E0BEA A3E366BB636A7FFAAC323460472AD88F1AA9B1AFCFD2307857FFBEF2E8F57501 91E7C53CE9EC5E993168D7B055980A4E4D12855CC38AC9B0ED1AF5E59FD8A603 C5C8F856FEB79E541FB2E21347321DD69C56451D331FE33BF1F7805F0EF4C875 6FD41C1C177A718783079071A5C8B84ACC1D47CA32C912E8B264E69C7B75C252 5E8A8438A53A32F5724A56A634047D7B7F27D76DDA00C1B8E108741217573B9C 4A588F42B30465D5A64D231BD55536A6E189BA6335BC6ED2C02189E083067DE2 5FB77A0F3AE12E8E3D9D204CAC9D339EFA2CDA09F4EE35ECA98F8166C31D4CD0 ADF8C8AF5F314CE11A73A62648379188D749CD116704BB6233CFA38A9AF35A10 E26EE84A8929BD50994EFE27D3DB6B168ADFA9FE3B3640AC199E0771402AB4DB CADF65DCC32F88ABC55FD919E7856FD8652EB1CC1F074A631110281C09F97F07 6ABDBA34F5AB416F1A97F9631BDB6395F7CED9713C557CAC5B09E7CF2C0579D1 879E1E82999FC3887743A9E865BBB28DA072C628463CB77189818B69DF7E07AF 26F5ABAEF679C6D99F279C8D2E8C52CFEC8366D9776D5AC5F4CD71ECA99FEE53 9E1A2D7D43B8EF8C132E3F3F52C2510985732B8376C2A5F5B1A6EE22FFE8825C CE6FE76D58BDC4DF18F26B8183A8080CB71864DBAC78F8F2BDF66089F7DAEE55 2F1AE3B829BCA5D8B1B007FB815903C216D4589291460853FE57BC53F275CD47 6BA31D81CEAAD3C7C3439F75E55CD3DB6F3FADFB9CB048DAD88F56560D0FB102 F1F75C2DF344EFFCDEB429A1B2F19865BBC0B966DC15005E9B9D8143D9D3CA34 30ABCC133CDF59EB678F4203DC97B88D4FDCDB0AEEA7F85B4FF8A86FA36D244E 9642F117F057AF726889150EDF9230A92ABB8165292116E2D7537A2609154A6F 7A74FA18D6743A287563176D11EDB58649BFFCDD6E267D6EECB35F3D36CA93BD A237621239B54391E02301644E2E38E1B0994BF15E10F9CD806DA3A4DE4CEDBF 31C55D545968D7B149E841A69A6D7FD42C3CC014C0C99371624A3FD9C19FB5A0 90E01187EFC033BC22BDFD8647277C5C21D0B6C6B0CA11DABBC13D64CCF9965B CAD184E53F0AB8D478C7329D53DC0F962656F6BCE019F16EE3A00172498782EC A5B2C21244B63926EDC99F868F40BC46A393880B5809D4A5EDE831AFCE1D17B3 9E92A49947615F021C9EBF1C4C727B3B4D11A11BE3D9B17066A9C9C59E92E7C9 6DA799A6BC95B2E4A01EC6C65C4ECFF1448849425D12ABC7C85B3DCB251B029C 757FC5708ED9035CACC485A8B181C04FF65FF02D3239E6BAFA8431DA1CE6B40B 8B0397F8C18F2CD0F02FB616EC1D0D7D1C4544777507A0087B36973B469A7FA9 26AB210497C167F362991787A74633668D91723852C99031DD3A11C22BF43F52 B65B8A507F74D03AEDB61AD662203B6B142F88CA6FB0995371BBF2EB6586F0F3 207B5B716BC10C6926433F10A0EE5B95B141E6FB7DE0F8824970A2316502B0FA B87181B24931CE4DA28EB592AB65A62E8AB16A33019D0FA907AF67B3C28C2C53 D8C0B9160B27CF1919E8A5B612495512452A62872B0DA02EB6FA46560B783F34 1F5C64B5917EEABE77E7F582D27F6355DE87C8812C9F82BDD0EC81C215F04259 C301E9C3E24E9726678E8D3C2F8231A4BD32A4EC94F51CF17ACAA1C4DC53A83D A3BD98C552798C8D4091EC783CDF9DD44A90421D63D75DD6C4417E0C6725156E 1A5AF35C304A4F74C4B3B258F21ECEAA2D4FB5FB97CDD7C3BEBAE098EF3A9E70 C337D93A1C1E53B675ED11F1DBBCFE6FF54F7FDA7EED2281591E2E04B620CACD 3A0283CA348579C0DC3A48FC753E9B2E6AC5A0CB0E90FDDBE4BE6A47FBFDB331 ED98E5AA53BA805006C4B56CD9235164F378A55C0B205A5B2538ECDC6F58CAA9 D94CA04A6F1A9DAE0E495A0EFEA136398FC79BC6C7022F75C4311D2FE85FFEE9 B9C7948338352C286D5311061A32687C0173354244E9925C9D1389D0CA7F7FA1 44F4ADECC38EEC4B7503A9BBA520B0F5AA40417E8FCCC9C9B2FDB17916AB3983 FABDEC9F827E58F70AA4E5CD18AB1285ACDDF03EA33A71E0CD7B90A72722692E DA3C4A00A886CF7CF8C27EDA824F699E12C2CE55D5C957F0924C1AAC86B7C28B F95C630537640FE7A1576CA06A0AB5370E697D66B342DD668B4F2C051C2C4DFA CA4486BDB7601FA96EE14C928AC92EF25217AAF63B4DB32E3A3869545721FC65 14D00304C873CDD322A0B2E5B4E754BDE8C66EAC596202BC5715E66C2A544035 849C837BE3F16EECB067E86F6CB7C77E2D90822085DCF4D477D81C5F7E05F600 B8554BD7932C1207789380558FD9C98FB9181D2964D85634717B1B113C66E38B 32394CB3DEB760B13D2C8F8E1FAABB8C872BC929AF118440E4361CEBC391D02F C610E9214779102456F7D276629504C024F2DC31F45A998F5C683966BD917105 F0163E7447B678C51281AC53F386DFAE6F962F12363610E4D69EBE116E1A9C7E 10E57EF3F78D228BC1CEF05B441D8E0790AFE313103404D617162A6EC07AFC57 24D5C6498195A5677F036D2394D52CB9B64EE7CB8B2ADE94852F6FC57FC00C1A 076604A26B48A11BC7D4B6B56BF72D8864472C9EB8E5ADDD4FE31BB1E7F4D5E1 5B7ACE38ACE8DBFA414C98E016E3C69571FE06F33283C9E720BC270328C9C9F3 BFF923B77A822EF8E2E5C675188E9CB06BBFD367ADE99EBD7E5C8C7D133E1BB6 DEEA304A3CC2AE641C480B3D71EF7307267EF857248E3D071391DEE30EB7EECF 67174DFCE4035E51E123E96F777EB1D8BDAFA66FE6460D04F3C71096E75ECF2B B67E7750777482A5BF83408B233E706E5B3D1FF2876657D45AB9C653AC67EEFA ABFE06CDC45D495FB71850C275DA119DC92B994BC56DEAFADEAB99E0E46D5FF5 697BCC56C8F3DF68BA4E98E3B870F450B22A16AB5E31D3906DC15E8C6F1565F1 3C62A0DF39BB0545E4E42C66CC7BA3244E848A0DF2EABB0715DBB5884D5E9509 6992CCFF4FE796F9C3803CEDB69DEAA0BFF329267C9ED2133FF869D0F3AC9BFE FAC22AF831179AAEC2CE074EDD45359A098B84BD3346F9F935D3FF32A323AD6E F1E2F61A636F583D17D691F31969B55EA2B7FCABF309BA6D090333A5DEBD7CA2 81A4231173D5C4532E0A72AA2C0A7B2BA110D111AF319FE04E7B45B22AB11A6D FCE20D987DC6988C64E29E445B501701241258C859A16A2644956A57ED0631B8 BFEB05DF15EC3FE6F5A4698EF1DC6594DF815C004A86B8BA562D7A4109076C85 A4A011C051EFFA49475DA43FFACC8FB47C91F9FC47F272B9DAF28E58E35AF91C CA6842062DCC8DFDBF0072C253975103131EED419CF0B55179824FD099961A5D F99FD3536B0B51AF0F5484A4F1BAADD54C20F29BC891A9673446D4774D463833 D049DD7113F9928560BDF08B54F34E70022EFCB4D2F652C2D0C8DB02AFD944EE 88AB65153F86921B4A54C58FB23C8659465C36E9E49931025647C141071A435B EBE2BDF2AABAB603EB9CAFBE4C23DE7875192BFF27215232BAE8C8FEE23BDF78 478813AD2AF0746999ACEE8926AE56895C542988DEFAAE2A0FEF77102C957C34 2DB9533C348CA625BEF8A613D187ADC4857E50A3B2023575F20C7AF2995C5DBA 68FD679E9EDCCA1BD03C6A7897AE21CAC271552F911F6C6A6F173153A64DB5E4 32F3DC44787F18A57CA49E8D74240824B4A69E681CBD49AA34F92CA07386A355 0D214AD91575C5E17A09C725A72E1C87B945C78CDDD4B85063A44C053941C8BB 56B679E290F446EC41D1461954F0504FCCC40427C67A270A408936954F99423B 4F588E48678EBB325A6D9520A35BDE4B4B826010A86735B21C15A81B011CB8AE 3388C47071AE1A56683FA89EC629BC1A6574CDDEB53C82A683AC9E1A11DA1685 D2CC03E5E2F031EEEF8F95460520360BF4AD37DC30D0BDC5031179E350009C61 236DECFA451B318043BCE24AD39AF63E46980C65C9FA7AC2D288DD86A2776E44 67B1E962E47851250340DFC80E156D2111A56343FD192107BBE4D9462D76A3B6 9AA6C27EB96B4BCE76A512A4369E919B93D9A687942AEE079A0DACEFCC5DCBA6 5A71F201BF3D9E25C979103A95CA3C23B8091BFEB91EB3CB21202413052D5245 4AB2E833FD2256A61178CB4D684EE690388760D8CB8F11405D28D59DE43E1B85 3F015E852AA845F0BA41F3B6D7AA33F3E1B4FF01CB633A60EF855AE12771B226 44F07812E20994B49A8D9D12BF5820BDCF9A9E66DE86EFB1BB71B61215999E6F 34C88B931D8C3B8344B49ACCC47D65CCB6B03D09A70C8A64C5F6C2B958C6E1E4 385DC99F52FAD34DF5472BB2EF6B7C08136763C4C29DB512084E9F2728850BE4 F9C7A2FC5C6912B36DB497C18F3D615ED149984FDA0A2329D942C5CFDB5659B0 6E6B837A76F4157811F4C1095E2F7E8B4718010308F3CD8867E4D5C4206419C3 79014ABD715C0A82235538A604E562AED3665FA9037E9D2C5C5CBBED909D1696 0955FEBA2466F63455B779B973D901045C1B7B6AEF9DC2D45FDD3886E18AE57F 27959B104F8746B683E657CF71FF97D9E256518F2B54A4C7C203269E9376EBB3 DFCB737BC6E1808C51E15077B52D8380AC8CCADEEF606EA76E5F6536C3D33279 B42EF012A3744F81C6CBAF19DD28222EC0BBEE845BEB4E61A77BEC6FCAB45762 EFC7DA19EC61496326A7B5E22BE70AE978C8A4081042B49964BC563DA8F6A9BC 90A4FF903B23F26D445D6FAD3AAE16AB2DEFAA30AFB46B35CCF5335CB9709F7E A84A35A6F7B94C3371D4CCC5358F184D2EF6A25A30CA57A53A2286317583EDAE C536D307D6143E455F675C1DD8D0692D055E7438DAFEB9B2C8E36B2672063024 2796C3DDFBBE75673AB4A01418C4100C36E31751252B54CD5FFF1442E4751AF7 EE558BF67709F42E27FFC1C19A607A6CF253A18D0B7DDB7A22A6E4C9356A2155 947335ABF5078E1900AEFC94558E5A28B215393CFCEAF05599925957CCAA8C6A 7512B10DB7B9C7BE75E7A983EAC999B860F8FDA8ACA6D0D2832CFFDFCC80195B FCC358B40DA10ADB9F869A69DF864FA3D1AE320F9A3C50D273A55FBB1A81561C C904A2AFCD4444F32CFDEB3508A3D0ED16BECCAE4E7A67EF9CC8F1CA236DC4E9 469DFE0DEEF11756DE751E718C538CE8ECC5B88253E1384DE42265788F644B09 D787767250DE2A9379C972DD2E369F56554131CFC452606ED2712F494815A4DF 8016E8B07A80E3D402271434AC2D0F1ECED9DBC332FE53911B1B6B20810A3033 C439B6023E89DA0E4C91408AAD4A4B2A600276AC3499EE3D185FB873EEFB3913 9754BEFBADC374CE95D6A82A35BD093CB69EED404726DE3C416D32C4C5A11D8E D52D10403CAD9B50308E9EFEB370647CC4E2F8FC0CFB52FABCA9AD1391D33CE5 CB82567F69753BB453611B1A0011EB93C5E259EC1683249418C89AA6E0075AB3 57ECF175CC9707D1564C61C7666EADC1093920AA0877B7FE71A579A53F10C22D BE52E8FA7F129FE82E19209C8AA65E9BCB24B7CE65467BDC7DF30750C04DF394 DA821F2AC47C61DB311F6A49E96C678B682F7B69CD4B29E26EA32EAFBAD8B442 AA7876E8BF1783460E11A9FDE3C93E2E69E8AF32AAC331AB913CEDC59B6CABD5 1569449893B8405AAD6A80106428A481AFF4C63B3293D6078BB335F2FBC3FB03 990431C55EDDE6BCD6595A48726FEBA55B7854616FCC5D59CD9E299C51E14C4B C56A68F0BA0B79 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMBXTI10 %!PS-AdobeFont-1.1: CMBXTI10 1.0 %%CreationDate: 1991 Aug 18 17:46:30 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMBXTI10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Bold) readonly def /ItalicAngle -14.04 def /isFixedPitch false def end readonly def /FontName /CMBXTI10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 46 /period put readonly def /FontBBox{-29 -250 1274 754}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D004B836D34E88C20EEB527CE1124209388A2DF E27A8DF298A2693A9D529916AA0B2176E6ED237F69D84A8FEEB36861D1847207 BE2BD61C6A412FFFEDFF13AFEC32AC7735BCCE5965F5966418A62ECB99112AB3 3BC938EC590FF6922659125EB67E260BF02885E49BA6019E696D33F0B53606A2 F515E0C45F323311613A94B838491BAB9FE230C5CC79D22925E3D882799F2707 C32975A494F0F9513E4D8332E7E54470D9721FBD345CDBB48286F2F19CC6D66E BB631DD6476A509167A49CA525A72CA50E82C1D08C2B372DB54C5949C753B632 2009B761EB90492ACD3CBE6A35CE1B66F3BC4D8DC36827CE4261A703328451D1 879438479917C1647772999171DCCF1491A1C9086E0C6393506768F8757BD81D 141C46EB9BF507EEC29962A0072B6C5D8C8588F3D68886CD2606DD3BD2FECCEF 63245494E93EEA12AAFB06110E54ADC444C7E7619627A48A464394E5DE06EB46 4C76A2FF010318BBE48B3776C826A265C66515717F7F2E943C60EBAB23D96B5B FD514A1C4E79BB3D3D2DEB936F90CD3FABF7B09FF7F564AB5CF4AF6A40E869FD 395885A88F4A138B3CA6943A2D430BBE43D91F7F17621CAF52FB7161DA3B2003 82244FB6EE792DCA1722C03392C296C029A2DCC5BAAB3EA03F8DEB039DC83AE1 763AAB84776A2CCFFAE9EAF0BFDAE417E8BE682D237FFEDAF224AC09C9665019 165CE32F5349E857177D94AD6396570932E1657ADE4D3FF57A3419946CCD210E 57E5A1D91CF708395942527D127606350924D71BC21C6F969288B1C8CA3404ED E6219985F7301A20621368F74747EAD38990A4C9F2B62913B8FDB93657409FF5 178DAA7C97C35EAFA47778CE03E863303582D8A9900EF4F8DA879DED54BACD7A 4A50C18AA2ED906FC4DC073B1E6CA1E3855AD5B7698EF4A96B77DBE19A12382A CFA8717DE230CB6182F2250885B8E90AC42A66484A7B527061B223A6D1CC72D4 890359E7E04690BFFA99FAB5CC9999F0873A9DBE49E33F79E483FAD72313DF9A 7B7D926461988C23CCE9F71AB7BB63BDB2B10B3F78176380AFFC154825C9BDCE 82303FBFC3B59E070438984C28D12E8655BBBF049125BF56DD2B0DE8C0450E55 82832DA59EBEB001AAD86F2317460DD7ED264611B9043614221ECF 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMBX12 %!PS-AdobeFont-1.1: CMBX12 1.0 %%CreationDate: 1991 Aug 20 16:34:54 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMBX12) readonly def /FamilyName (Computer Modern) readonly def /Weight (Bold) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMBX12 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 33 /exclam put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 38 /ampersand put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 61 /equal put dup 63 /question put dup 64 /at put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 93 /bracketright put dup 96 /quoteleft put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-53 -251 1139 750}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5F0364CD5660F74BEE96790DE35AFA90CCF712 B1805DA88AE375A04D99598EADFC625BDC1F9C315B6CF28C9BD427F32C745C99 AEBE70DAAED49EA45AF94F081934AA47894A370D698ABABDA4215500B190AF26 7FCFB7DDA2BC68605A4EF61ECCA3D61C684B47FFB5887A3BEDE0B4D30E8EBABF 20980C23312618EB0EAF289B2924FF4A334B85D98FD68545FDADB47F991E7390 B10EE86A46A5AF8866C010225024D5E5862D49DEB5D8ECCB95D94283C50A363D 68A49071445610F03CE3600945118A6BC0B3AA4593104E727261C68C4A47F809 D77E4CF27B3681F6B6F3AC498E45361BF9E01FAF5527F5E3CC790D3084674B3E 26296F3E03321B5C555D2458578A89E72D3166A3C5D740B3ABB127CF420C316D F957873DA04CF0DB25A73574A4DE2E4F2D5D4E8E0B430654CF7F341A1BDB3E26 77C194764EAD58C585F49EF10843FE020F9FDFD9008D660DE50B9BD7A2A87299 BC319E66D781101BB956E30643A19B93C8967E1AE4719F300BFE5866F0D6DA5E C55E171A24D3B707EFA325D47F473764E99BC8B1108D815CF2ACADFA6C4663E8 30855D673CE98AB78F5F829F7FA226AB57F07B3E7D4E7CE30ED3B7EB0D3035C5 148DA8D9FA34483414FDA8E3DC9E6C479E3EEE9A11A0547FC9085FA4631AD19C E936E0598E3197207FA7BB6E55CFD5EF72AEC12D9A9675241C7A71316B2E148D E2A1732B3627109EA446CB320EBBE2E78281CDF0890E2E72B6711335857F1E23 337C75E729701E93D5BEC0630CDC7F4E957233EC09F917E5CA703C7E93841598 0E73843FC6619DE017C8473A6D1B2BE5142DEBA285B98FA1CC5E64D2ADB981E6 472971848451A245DDF6AA3B8225E9AC8E4630B0FF32D679EC27ACAD85C6394E A6F71023B660EE883D8B676837E9EBA4E42BA8F365433A900F1DC3A9F0E88A26 3E3A805BDEEF054CB29D1A44D2BEA949BF251A81BEDB2F1B0CDC7696E22DFF3E 4861D70D425C9AD9B43793BE2B327EB1D8335C135B8CEC534A94081A1F60CF5F A385B9228E26461DD7A27B43A71B2E2AE169DE26578BB0A86F5F0823382F0D09 C3DE7A238D5567FC9A3E47329CFC655D20D8B66EF7CBFEB2F23E6F8BB4648B36 59C5756DC8644F19E19E7BDA46B2A6AB00CA742EB407B92C540981C721628018 7A7E9F2434CEE466F1991DB68427E3CA99DEF4ECD02EC8488310DAD8E8E2E112 CCD51D1F32A644BA7DEB5576CEEDC8163BAF659CF44CE2566B5C9BA7445207A6 9F1DFEB32E950ED5F4692222B16EB5F35A1A44882D5BD0ED9D68044C0384965A 9A545DF18D137D1B7B70B9554EAF85BFB2B4AB97A1197ECA7704F4B5451C3851 4B2080C261588D04BEACE5BD07DE32EF317497470B188DBC24EB3B6A081C9DE3 D757A67821A22F1FA7B38A5447DC72D74C59741E309743F19DC5F3A2BC98F3BB A5DD5E8AE1BC3D52046C190E5642B5E7AC8051D5789F99EF514BB4291E3CCF22 00880757E44ED5676D3BFADE57BCA677292307642A09F3F6119A0930E8B263C5 02212AB98F969D351DE215853EB9CDCDA848470010EC0ED829D8F6BC6757BF93 433C483F5A7D4A73E0214D7A297DE1CBE2E8584889265D3D8101A54CECB8DD81 FCF5A3A80EAD45642F584D7A8E4BD8A6A1DEF3ACAFCE323F354A18DE87965607 2DDD96BA9B729880130744F3F70B4FF15FC6D292F53C8A79DD0A55C10C4F3CDE 9B08D8F573D7DFBA56E52BE6981A0E5BCEFF4931A43664F628BB0C715020167F 6A3DF76453004FE92596615C9F2E170D41F740C4A3EC04D198FB6FE9830CA372 255311B7D2449B543CF162488FB9E53418DB14352CEF162CB55C028993897269 629AF57A0F95453A9F05681613E877B741E3D3BF29A42E1D892497D76B7D255B 0BD97103400AF8CAC2D634EFD57C562928BDC968ACD39041B72212162D0CC92E DD35EA9B1DC0C52D3910649C7981D443360E9630A510099E77278F1C1D82E584 86D07C1280B1C10E036B6694DB3E8B7B3DEF2389EF34333DB3583661C7364C36 C24E0F2E916092DAFA55D1703955B4F77C540533B9B58CFF67B0912157145224 7BF1C5829B1858391825F8934945B49D57D8AEF434129EEABC515AAF843382FB 44F3A1A44B770743933115644A57C392FDD708567E284675C846FACA0ECE5DA0 1199D1E497E645146FC902AE221CF90BB973222A17452F6E7D580A6DD717318F 4A85D9FB69CACA748F5423C86C1D35E91D47F66782D4979F89D4417E6A4BA080 811B1EC9F3735382DEC3967BF394E832313493E63BD9BC513A6D49734683B56D FE5735F0BA365469E2E6686B06F8DE9EC5B7C52E7B5EA54217AB6734328B7224 EC1F4F487F89E5B80D3931BB9B2117AF2248A5EE07BFC7AD81DB2472B6914439 6BB44388CC410C711DED40B1F4000CDCE9958FE2D9953EA0220F5E02C8AE40FA 44979EB5FF21CBBC2D417DB277CE8ECABA92231E46619EEABB23CA4B621657D1 4B83B23676E9A459A5AC92A3F5210B41E9DC2AC1F11B7D22F81CFF306E1151D7 C29B934BBD60ABE30469A15D3EF04C060949A76D33B289FC9B057266AF8132D8 0A0C8AEB450B24220DCDC8BCA1D91F87E4FDEB55D76138FABB71ED3C46F085FB F56FE780843AAB322BAB9F34267FEA666A5BF8C7B8DF7A836039EE2DF9575884 FEA3642233F37154D0E1AD73F896A9DBF2C65F10BCC973D5B81620410A2AFB6E C4974BFEAC6433D1EF4BC10E2473A0842B9BF55120A5B1FA8470A2183AF4B041 102345439B8ACD343B822DC94BE880A2412229945B838EF58434ADA3EA2C9B89 F606234F01A3DEC4B6BD5E23C377609FA5BF236FDEE9EF572F91324FDB348812 C9993A49EBB32FDB528ABCDBDB30E57201019C65B37CE12C17D2F73D6E4E7C57 514AB4A28339F404FC3E3FE41C81AE2EA9D3A2637C547A588C8FF1789A0FEBC5 16C4AD3E86DCC488228F0EDBE5014BF4367AC0B69A7F84168C215796F8B37AFE DAE0FF8419F4A5EC1D302FFCC65AE54AC39B7E5CFE341F611D50C5AA88EB8488 53B00473AE3FF5F7617452A9DBD21C3DD69A48F6E63489A9E6E61A178DD521C8 E5F5CE3FCF0B517F41FC1FC0C40180ED4716D5CA17E9B1E46B25DF38D3401689 21B5347EF1AA1BA83D48504E66A88F5A671759968B40D08F0127C2A3205B0BCE D9E7459D47A75E15C5461F5C7695F5C3494FDC14CFAF4CE77A27B01684B17A67 4FCCE35CF1ADE653C7291FD6FAA84642F1BDC9BC2F09BF0BF85EEF627A06A427 BFA870DB4FA3D3E0C81227D6BA928688832D9DC9EC619E0E6C61D1A61DDAD31E 28ADD24E43390084529C6DF13C5F89F187CD8B8CB45B20803D74CE92A5BA89F5 2FF64B056FA74B2CA6A167D4A351682E004856C176CCB6FC11DF21F3CE18B244 AE4FA3A6CAEC26C2BAC706FA16D57ED0BA92CB4E1C366D181948CDB22A0FCBF8 59BFFB0C7563864DB606FA70AF2B7EC09320FEE51A6954B65D6C2B49F19765EC BD94D84050F041E875A5704A60EB17009BD19640A0768CED72CF49E867FBE146 F6209A1A89AAD5757EAD376CDB63162C8E84BC45B020D0C265A7EDE66AC4908D 40E290F372433CAD539E24B51DAB4888F3FB05238775E88004AE97A3EF9AEE2C 75DF70CC6B8671016DA38DF35C676615694979DACD4BC8BD2EBBE1CE4EEBB1C2 E779CFDDF0F45E7843DA0F2F856E96F2A5E444AA616DA2C242CAF9B07C63EEBB 1C772BB41EE528E337F4D68493FDC54E62D5E21D110F96BDC6596ED2BF276FBF AB35BF300B3FF555521B18DE184895E8991683E41BA5EE55694E77C31A09E26B C9B42C4896425048184183800682919001DD6B6D3B659A2F39D7F1DA6C566708 2CD8471F7D0FD5B4E3F8967630BBEDEA1E6BF04FD3D1BFD8BCA0B2963E8DDCD0 D9167196C4FF4AF2E629D8F6F9AE7EF6849FD2D72055A51A09A2475BA9576109 AB045264EBC2CAD30E931837D81882A8A80E9D008B1E9C9FAA1316021E5B42A4 302CC5971709B2433016D2D9D895C945279572735ECFFF5CFB0EE0DA904F619C F363E12B9A9FAF3407439191862D6FD70222E000E1DC3DF51F650E7235879C14 07D34FA4986565B8559B839E69618AB082CAFF74C15E2EE91E1BDEB9BDB12432 8409D364AC6B0529A4C33DD3F37646C0B69B36AB0E0CAA785D3782D11A5F9024 5CAD9B6D3CDE9FFFFE0A7231D2FE8F4EE8C3458E327CB47C00D1BDEA4DE71603 73B856728CDDD3A36A8CADA95AECC6811BA4D0351E364460459E3E7180321625 D0E1397F979097C347C09697C8FA6DECB3E226B71AE3B5F120C90640F3C3C262 4D0D6163BE8D52D6C8CC3B964188B87DA58E65253B42EF81546F64131F5EC32D 1C7A65BDEBA92D5D0D65C75E6128CD1CE753F2D65A821C4D2414B396A218DDB3 5805BC747D97512DFC9834C0CA21D715E6DB8DF9CE5E3C1FDFB7BF2B0F22F0D4 9B7F59AE9EB994FA4A7869C96C80D357F93490C4FB62BB5F275F14B96636DEB8 BDD7E6507E43BE706BBB043B6D2FA279B2F33E62B9C89C56C8720332FF94F74F 2E352753100D41EA7A63090C32B09018733AC83EAC97F238CC54971361B6BFC7 A265E90140B015B86B58CE2C153E121EA9AC87CFB56735956F96B181BAF5341D 6C0EF55EBD5036CBCA12A8AF842D4B1CEA1AE9D6C5E4C8A28CF20C46BE4EB9EE E3333039BC0EE4B7069F290801A2F06AC8BDE42A6BCBB78B9D755A5D59D50A86 825C5862D359D7B36C39DBBF662F569211E73405C4B951BB3C0B624566AB4E25 880EDD0B12C1E77996928FAC797C11973217551CAC4099252B8C2D2E6BA76BB6 2540D20FC3DFDA8B0E49BEFDBF279F50FCE26B196C2A04426DE1594BC84330FD 5B9DCB25B008016F95B047001FF5C6A307D0FDFA48B9C30559290266EC5A3E0A A595AD2ACF7F02C1846C5F5040E0944FCA3A7A1AD660EB7FFC3B98E321F5E11F 4ED461FEB23F4405073C0041F903BC5AB099FD4412E6FDC0E3ABFCABF27E78D4 E61B1BFC20D88AE8BC0C679845DCADE181859FF943B2BD3044AA61E5CAC46E13 6C56EB80620D80609CDFFC3E1166552A4DFAC9BEF7D32FA2CB64DFB5F69CB822 69183EE3B67CE87D30B998839CE6A36DEC18B4B3F52C6EFAD2054F9158DEC6BB 3074AE4041C2ED8B77177AF716578FEF24827888E84541084637FAC298C92D1B 3B63A2EC15069983B89E9CB9E2546733D0BDA8D5E9EA8A2F2C10A764F01C550D 5840F7033A9FE6935F0547535ED804D2AED9E759FA8CA30FCAC739CF0D8A56EA 416C8C5CD77C0509E1CF4E6CB74A8803D7D9748801BF44D8FAE668FD48D2A09D 8838E279FBD75B09C62F4CA2EF852F5123F19089C2D66B20757F3D0A48E3E1B3 58A70267E95DCC8B4DA6A467A0BC44CD490AE15C043B44F3FB62A429A3B4E06F D342C9F8878F488E7DE1EF339799713296101C308134BB5A2E1BFD4BC6756CA5 CD33995432C4FBAB2BD26ED5727377842C5BB221C40A8BFA2F56C480B6B350F0 FFBEBF68E954EC9AF149F8499EE3747EA696D7471BA9B52EF3A5CF65971A99B0 BCC1336A17138BC87114EA2125F3244074A9054260AB3158BAC7362E11677570 B9852D48148861D21AB933E41383C55E20B4DCC4A7A332088C7BE214DD109C63 641777E93C9CE5BF348124E649F993A2D27CEF32018248C52CD075E8A117289A C07636198BE96278DF136A202E9CB92C3C77308C21D90F798A2025533293847A 65388F3E4B8C6B0040B64AC91C38E684A79BCEAA79E89810225AEB6B64C0D4EE E0ABA4108E19865A8C958B86DA8565DC67125911DE739ECA29255325A0CD82D2 B1E6D7557934638E9A3D370D1F130472E16A3F5F0AF7D7C1DAE09EB8AF490C43 3FE1676303EB3A1F81DF44B32627ACE72B812283DD855B94861CC23EE3CD1063 F1A6F58129781386004B665CBCEC4EA3614AEA73F7DBFC6871DBAB52D6A474D4 C07DCD0D0F218AC7C22FEFD2A029F8FB8E96C293EEE174C7C29F80AD26F57FCA DB36AD13036E910B355178A3413551356C751F0A773741E4195D4E2EC2B1E1A0 7601DB8A6938EE0CE555E393FFFC78809C420C6B4BC4FAA4722CC9AF024C7765 FDF301139E531A70E2DF44272D0F425574B970DFE325D356AB0CBC2D312B307B BC634CF6E52680E7D9D82D62CA60E8AAF1E720E7CF147CF4AB2D8020FCE489FF 55BF02CD5AC9FEA7297EE9BBF476139C41E3E7FAD935F65BCC5469FE3E39213D 84EBF890068CB65E386F6856ABC8C8BE41295BFF6CE431646CE526F8D2CFB677 55FF262C485C57EB0D4F7D94110F8C1E5AA383FB2F440A1C60AE9623AE39E328 D0A68E4F0FBF382AF54080B17ABB1CC6CCF466F5B573697D68A0AB0D11E2D81B 395E727F1FC3C2AF029FFBB853C4BAD2731BEAF62A6C96ECBFE2F9BF5CE68FFD 0C05EB5EF9F185165BFE4DFB236B12E0B49F29EF81E37D93127782580C3F0CFF F5A003C140390282A105A1F8EED6FBA6CCCDEC9A00244F2BB8BE50B1ACF0B137 0186657FEE677A2DE2688782EB1D82BB1445F90025799FF3E49E42CF87A532AC 77B51C2EF83985F5473DFF1F21009D34CEB30D6C54CCA2021D6288F859C8E47F B9DB3ADB0F18FCE4685AE4C0E7B6888B1D9027CB85950ECD4131881167999DBD 5699DA9AEA1342671A30930C3866E2CD6EA0348EA38292CE4DD6ADF97B7C1ECA ED3AE3A8623381C8C9D76ED3160A4ECB073821E39EBCE4973ACDEEA4F2026C1F F9190BCDA645528296CEF86B7C91B4A19AB566925DFF3B459E3AE50F3E46E4FB F4DBF02123AA8F8479E27B2515228FD0E8D1ADD82B9F49E22438382B3C5F2613 5B7819E6205643489D7762721838F9EE31260D2950F11B005782B26957026636 00459B9665543D204E0F80467C84DED1E546AB16BB9D7020FFB7B8409C0ECF30 565BBD226EFFA2D8FDCB8AAD215506151080C798AE002017A1159EA65A6D7582 6DAB371805A2C5FEDB0B62DC7B1F52CEC59244CB2F23F8DCDEBA74319511EAEB AC58BBFA7A003938DDD26FEC2D335172B2DC60F590C7CF3900A696C4DB132CD7 8082A37908907F0613E31658FF21515A49FF41B86FD05D12303FCD7A6F83EAAF 4E340F86D24A12481538E15E93B9498533CC5D0E376183E7ADC4C8B4642AEDB3 3C493BD064EDC8ABFA62970DBD62A379B020D1F4411898ECDF4C9550C2D700FC 5E50B5CBB534570983D93E39451F1308DDB6C340CFEA0B71B099B7B2EF8CFAEC C4B8E788B96053A6E79FEC4656C1A7FC991AF33A58B3470745F56E813B2A88EA 3E8D4A6FF936464534274698B0A9ED72639A18F56F3281E6E7EF430684F1F4D6 D2BD2A7C7C1A17858B8D424A529F23450109E909B9FA976AAD903B91C802E588 022B93294366AA751AEDE03AB07A0FD38D13531CCFC5957D63EF5E5CA9AEFBDE E94E1700E33E16D5FA2FB2EF3F07504A21383774AFEE8F203F4CF3DE006AB031 9160DE99D6266037DE2D446D612E37FD41F8FD5F7543C6A0EF7AD99C85F105A1 85A89EF249C5D621D711ED741C98BBDEBCB0CE926EAD6ABC85029FB51D53C8C6 3838A020A118A31A260D6FB093D5061F8156F10EA1AB0700B2A5EDBC1B885293 A4DAAA377B9006867517F9E06EB6CB104864DDEAE3B8276399507E0D764241CC C5100CA82A2938CFC073AE766740129C04CDF3BA967AF67834CF2DA43815A946 160622CBD6F5F72E4FF80E08016AE522C5321C3BCDB9489CB5D9312507BA01F6 89C4857363CA8C4038CDAED69CBCA26B2E0DDCEF442F671151D7F72B6D8AF8AC 18379D39BB00CF03D78F8D74A3EDF8B089E49285A7F7DF05743A8B127AC0534C AF472344DEFDAD10B3394EE18526B853522B4F5742FF3700732B449C2B22793E C7343C47CC0BB98662E135AA6220F6F74CB610D32133ED25A47206EF45D77C57 C22CF4DF963D7211072835E1E70BF2D2A4CC20994BB2681B60685ABFCD497998 6D886E67A4DEE27D1B3C7D87E48648197F197DE54926CF3AE28CD20F73BFC952 18D94FDEE08AE59EF098FCF720CE10D0924937B91FBD61D48CC0B59264924EB3 429AFF52D82291F78E8405E07B36A8CF8F04A238E0E511BE2DADD3D6F5D45C2A 11D79F68410346D261C1152E8E350C08B2E703EBA94ED56495DC0A58BC07B205 602F4997AC955BCB044F6CB533FC8E51D5FE2CA0BA40D34CA8F52E5B2CCDCE34 61817FFD89AB2E15D7322017FC03E843166B9710D932F98172461013AB6B2B89 FF9F4281189228F654E7478A58BE64E8EDB5F1CEE23E35FEA2D883FBCF733D70 B965888A779914D9B0BC7126D954130BCC9248663E27306636861331AC872185 8FA96DF3F5EFF38598F119C9CEC5EA61B0AEDCCA0DBB60EF0CBE52D32E5E6FE3 E04AF8EFB3AB5B64220A99C005537E17CB96BCEFCA722A5E369AF613425D8A10 97AE8D4930F25C7C91C6A8BCDA83AC318692F04A4BFC15CA43CD2AF2A80A3285 0A365C71A19DD7F3E8C6461CFEE5A0C203C1B707F1EE999FAF9BC42F63683B5C 6629DB6946F56FF15C6A0E681237D609809D9F7717225C0F704C318DCA59230D 8FA6813C8A242B68F9F2ED8D75AECBEA7F80243B8ED757B1191041429B4B4999 7BE0BB26E4B771824D5D7BC2ACA7FCBE3EADDF2346EA20E374023B1D312AACC3 185D67249CD176CDE88132D2538C3DD47197DA3EC6364F10E6A09726BBB12EC9 852949E7152535828B477DE94C30DADE9DFA290D891DCC88706DCE3F69C99B12 47DE24F17B8FE0E5CB3F108261AEF57F82895BF6B56820938656BC0775E50C52 2D99ED1054D563D304AC20330E21C637766C68C9AADC199F38900E4D9BD9412C 61979EC0D045B961F73D09DC2F6FF1849C761066B154178997C9CCEC6F27F45A 27B94491809DC7D0CF79BFD3593616105B33014AF593818F8E2D95AA67AC92A9 9C1FA7796F48BDEABC4DF6509619B8924390E3FF397682EF77EA07A2CA0873C4 60D2386007A11E70839AC912F1F7073FE3B98BF4DE6B907A15BB0F3B194C70FD 33CBEEE796703D973697DF05155B097DF97B331E0FE9456ABF17FC687C3B554D FED8FC7A2BDB22CEEB7936479A4B0B536CA2E8CF84BD039A7647D869F928AFD1 1D27E01E924BE5FDB42F6A90FEDDBFC241FFA93E5263ED7220FDA5A2DD94C92D 2154532ABB03AE0A810F1BD1374FD88572EFD6EE4265D5431C7CDD9F77346E04 24CCDD031AA63A64DEDB0728F305ABD3EF847CAD3453FD3D9310FBA0BCE048E9 E873BB9367AC093865A38FD89DD30FD02CC723CE90DC2CA0EE8E5133EA804421 81BBD3144CAA94FF3374315405BCFF9FCAD8D8DA391D53EC0EDAFB7ED6E27F08 5E5166A5F3DCAB801F650D0E56971771DA45D9984FE555735A70002E28650DC6 F4F75CFA3982DC738624BEFA1511E7BBA8377E9C0B21AD07CF06A614A99A4239 EB9D23A70A262CA2B359F73A47F8FA9C6CD75B3050DFDAFF15A45A9EB6FAF7D8 2CD2EFADA73A44FA68FFB806E86D38862C11D018F18AD24A80DC14F99A21B20A 8BB53442A48F24DF670BE6AC4A36C2B7DEDF2719153C29236A285000AB3E2770 AE6609B8326F4C840E89ADBCDEEC18400548781D1018C3124F94CFB92B2DC5A7 DAF74C2B95383D3D65EB496334EE74062400CEDB43DA7CE219CBF1192AE96C86 ABEF80BA667DCA7098A94C1EDA0FC80D2664CD0092150E3F04787222466D3540 F448AD585647FF86CD6B7BDEB07160515574AAB81EB20D0668C4E3A269212BAB 76683291790BDEFEE5C525142D1532EFFDC963729D3190D5DEE3D3968E66DD43 5112AD87BC8128B9C7E0AE77568E5BCF84D5F4404ADD459AFF96C05A3E7F5D79 44187E7A16F4150E932C5096D03EB3DF2CF188C65FFAFA2447201A12FEBA6F9B D71AC92B082A777EFE8291160F055B6CAA29696D79CA5E6B57068AE5AC96D886 4CC1748D4A2A658A77E658F3FFB88AFB364B4C81ED854A1F6444FFEF8EA84C76 42890F9666179E8C9558249B803CFCFCE6941299A72DDB6D3E7FF07940F6702D A3E4AFDBA7E7CB566A804A422D73470676ABB272AD9D8ADC3D1155ECAB9C74E1 8557A202A4DAF3085A44FF37FF469294A560F828405325B0ED0937454B3BD522 BD6C31CE06921BAF9FEC5A3B4E6D0C03EA539D986C4833C7E85EF77BB56854AD 22F613780C8FAB0EE5D812514E6DFCD022C3CF752A1A667D9DD8C4834899E3CC FC25E03AA1D095BF79E49B6F51374DE7DE0C0710CACFB497DDC9F57AF17B570C 441E076D16F6B2F863BE8FE78E82BBACCACC9FB1C862A59235533A3D99EF485E 09963167507570973FFF872F329D245FE7DDAB5E3A8CE979D8708D905CC5A38A 988322EE41B70A84DB0ED8EF64B659272DF95DB633AC0035286D6704BB459981 97552DDE55449A67B63032A2681C23171A96566E78C31ACF6BB8FCD26E0D7987 814E8A7C3A9344E4F6155E866392557372DF268922DC78827877FE19624AA32A 656BE8277A13DE59124843163EDFC5F02ECB4F871B85B14F4CF9116F9771127E 4BC7F7827B85D09EDD1C58E201191B48FC31C75E95CBF88A1E5129C603395DDC 9D0F57F2190B850D3F8283460B2C0A6DC1412B06F0DBD7A74045AB96CFD67DAB BCDDF99D418BF35A3A9920E4717BA4C3DB0E73844E8632148FA51CF8FC8D2749 994B2D3B8A5E6C2EC9CCE76C2DC31AB1E1F8E697DD6950B0A0DEB78512A0571F 17F60025F93B9CA3D828BDAED5B0EC2247838D969E9C4653B60F2E6EDDA93FE0 99F978BCD8C758295FDD1375E9261838AFDD9FD5F6B78BE5EBD2F751F0C130CB 8C5162CCEE04B4BE3547F06ACA0D56447B8597EEC6F3098FCD4A0927F01E6317 8D08FAEC804A773F1CB52E5D0A79EC790BF0616AB601212140D4A651C3597E1E 07581E554321F3E5B21C1BDAF5FA2C639B1A87F5CDA2B84EA24B052DD2AB99CE 9D4570D8C80368BB2752D891C001C452C3AB5F44B8176C0EB2E4234F2B95C515 0C852A5E8D66B27F5C3D2F83CA2A6D35C8569E75460D570559D34B20567A9DBE C1B5BF7CB7C91B101A51AB838C024320FCBEEE4AD503F43C2C5CA5E490EF86ED 08BD5314DE90B477074FEC9C41763BB1C5578FE474401A74AAFE58D32D8AE03C F5C8AE88A35B7638A87BACD6BE4FE1886D07B57EE26F714D08D2283A57BDBD1B 02B54BBDC151C28F56CD58BC53750B75B3087883C908339A737374617DFD9DB2 360B8CA0865910B3450B9A8A49767C9B72EEC8AF046C3DB2A01F91DBCACFBFF8 1458986FDCE72D71A934D38449B08621ECC2FD2038A2D3A65F0169E96F7E5C8E DE148FF48B9C89EAE84C661E73A9BB09087ECA5AB51EDFDC7122A039A785026B 1B80948BFE087330557E96B409FB9A9EFB723CE23035D0CB2DB908EA64DB68F0 FCB4A1848616C47E9CD4BA4809886920D422B883F556E844AE1A9BEBDB28FA6C 8BB35C63E7AD58361776A5F391B32B641C30AB61B94B5F4783C9836C76D8FA38 127D59684BAE8F23DAF6D3FD739BFBDC47FB45EC6082BFC5F0308467D3FE1AD2 AB6AD92651C3A7CAB62EA74CDC586254EBDF08D73A74AE12F30D974E369A35CD 4889A0947A7537AA44296CF8E008C52BEA65EBD2C9AED94BBD12E0DBF2F38BE8 E540C6006AB30D15333F1E1A6DFBD1640D09F5A6963DFA50A7AA05BEC91533C1 A0094AB4F570C0B3F8AD2DFE0C1DE4C3CC39430FBA062860398870B464E96907 FC35562FFF3E76D996B95F04A3D6356984195C78BBD24406706AB4525A8FCB8F 7450F409819261DB59D331F6FF85495C86CE306654533085185991C731FD808E 7814C5D91BDF4D3578511F0DA291AAD9040E51ECB95770208371BC2F69885AB8 9A18BC76770190D67C3CB5F196DEA796AEDE6CC9A3E845DB649465EC6813E111 42E33E524F7A7037D7B32549DB5E8F0986EFD831F90C6AB80256075CA09D092E 605664639AA9D37ACB1935AE3733BA0E12ABE90EF664C55DA655FF73F7097E7D F3C003595C107747FFF8B1AA29961B8A0B1C650C6932A4F60860058CCF3DAE22 154B89A0DADB5E563EA71E0BA6A4ED438D67997B00BDDE4A12CA602824381D22 E8940B8AC19BEC9B7B70B5814907E458DA9FAAF8BA44209845D16CD54F5707A3 8D36DB105960AAE4AE65B43166E1067B33D8F9C964FBF10769E7A659CDD22401 18DCC7CA0397AEED98A6B8A518DEBA78EACBB2585C79A3621C66DC8DB293126D CEDC898DC7205FB6A69626DC9D102722101CF8D561C11E582BE6F6D10BD91C39 284538EB9E40A10546DFB84369904E824A4E928288A49BEB4877C511AE48D4AA 55E9E836D4679FC3FA8395875ED5B2DB8FB55F3610F1CE177A7C1C443FB09F66 0144055848F5E964C6755B9222D94156725AB2F2C06B237A5D8E218D04DC1711 9DA47E11BF1347F407C7215AA40D67B777786A06AF057811836BEB50652FA65A B3D709CD1C08F43EC23ACB2B60F2BCDB0E682FB1823D12E08B769DBC6F1FAED1 A5B3702D989137578F8584C35601D1EE06260AB414B04484C57046818869562E 64D3F1FC389AD329DB0011E96EFBCDE4E08E684DD553B3527ACD17EC7E7C86B7 D72910BB6688E7FFC12EF41CAE2356F595CDE71DA0E507A204EC0E1DA3E90997 68E6AA54DCD692AA643C96E66A19BD512492D6585BA50754DB736822F9EF5ECC C4B11F89A346198280340DA282C8EF1E0FAFFC639EA0DF684DE9CF8ED39D8CDA E9EE8754BBFFDDFD14D2D624D1C1283B33C4FA67F31F64E580F7800A71243711 ED8DF85DAC71A7F5B6DB8E98B836616B1411F14ABB4F9DD99FD90C75066C165C 1C39E091686891A48B4455F477258F861E3248D382269B0546AA62735638838F AB7D7FEBFB6B1A23763E6EA06794C2CAF83617E1662D7A87D05A236EDEA56A8D 73AD74D782E18AA11132FF738958B58986CDAFAF96B3D5029C7858DA9B511D7F FCF3D2FAE04A3E8BFDC64CBAEB83B6310C8FFB48F3EE9B3672F4312F67BA2C0E B4E92A4E33086BFA6685F1B7C5E72FEB4C661559056E267BD417B2C180483F17 8CFFA694B741906B52B1FBC7EC06BA6F983D6ACCE2A67D566E889F831458AEBB 5F9BA0B1DEFE312CA09439520802EA2EF88AFD156993AF3AD0EB8CDFD557D21D 14AAECA4678F728AFA96FF814184F84A43068F9882DA6F096029990B8B487598 5310DDF034ACF24B81E5B3FC6321B0431A5060E18D4BA462C0082CEB17861A4F 807D61B2A65017EC1627A54B5CB5620FDC21947BD17D4F6085151E31B219B71D 49C48DA126599B3FB9D7579B86FE62C15D5936A252C53FFCDFC15DA2E20B2125 86730BDA923B2D6C1D504DCA713CB1C63D560FBAE75080B926527092D03CA7FA B2F7CE725D13537814F292D79455F4E1CAD8D712998BEBFC502ADD1B9BD9AC37 863217BDBB1796513E47592C41E7FE5896D492E675535C92D5AA9B2AF47AAF08 5F8F7A6574F19C4BE6318A11E3D8C908A29BDCD0BAFC9A140C8FAFEE079403A5 241031C76D3ABF8B10C3413E1BDB379700132CF6F167E71B8847D7276FD655B4 0F05CE91EF9F9800522AA4C06410FD7CDED2FB415BC89A7CE56F6A00CEA37E10 EB09263FF1E8C59495A357351FE6CF00DD9360F6CBA2119AADAA47C95A7AB89B BA75B74282568FE7B801683011F3C825B7E4BDE56129B3EDFE8FBF8BAD1AEC84 4C7AE2A12148853F9E765DE845984383A6CFC8D157096173DBEA0E1359819453 4326B11E274A2C5D53C365AD31B5829C8ECBC748C75BD62A7391DE9EC2E760A4 8990BD202071DD051C0049C49E674E3DA27022B861A72C79C3C493431C06545D 90A603EAD4036549BDD9448AD00C2CF2927442328923258419E4696EB5A25CEB FEABE104F6BAEC7FB2A241E91E337EB9798159601664E95F670593571204DB8E 3C590E20D5FECE5491EB31AD91B22B029C032F261A181040E7D091E39050A695 DEF6D8EFCCA2796C486EBC0CF31E5E00977CAC75A74BAF10543E7E8F38044BDA EEA5E60B067387488CF8202A35A8EC2F83D5E31A3D229934F2B8ECE4AAFB1319 76FB7CECBBBF98A1D9966F8FA3349BDB44D9CC8A4291DC1B4F63560DD7CCB0AF 57A17573E76A20D0E0C97DEEAED0053DA02EA4303697BECC8E91BC28D262C13A 923DDAA7D39869D098A65D7DCE140029DC1F0A2FEAD13160E3A0EC6B2D6C2FC2 D6F40786DE3E22186D2E400A8645DB815960BD77D9C0D8B0089C6AB07B0802C7 71F484E5CF5557C2781840FBBE56C58AEB4A3F296441F606CFFBE43442CDA489 A9796954BED438A841695B29EF9396DADC0F1EB4F6F6FF9AC74B7D541AE3B49B 15FD79D14DA0831D8D36FDDCD8FFC49E0AAD74A702F81FD6D5946C113B76FA7D AA0B92E951FFDFE39E879583D5120DFF549805939CA2EBF13C6FDD2CF94F85DB F04F7C2DCC445BA7153B0C1DD194E60C1D0608D0249F2044EFE94B9134D9DF25 B53358D2FD7E7A75B3D59A3EA6E3AD6FA58C32B11A3EF3BB4513A6C54FE36970 8538ACFAAA9018563E627612A2EFB1F4E148E9E7C45C821954427F554773E573 4726A90E4EF891D1BF15D864FDB6C7D4CB2B86AD741880E1B40E1F53C35AC1CB 8B04D239D82CD82329452C124C16E4DC18EA3A8F2EA0A76C9BF1DF8F0DB5BD46 155F033DEFC03F9CD2616B53A641939245C73679A517190C2705DCB0DDA31977 C0D2FEF8ACBA0E8BFF090CCE20C915E3F0FBAB886A8726DBA2C278272429D58F FE5884AA029D29E197F487874017D3532F1FF285E600E8A0C9B5247C09E58591 4D755EC1222B93ABE071D186D8A8B2E68C61331C28B189BAED90638EE4706202 7825604D2D4B8A8E00516D1CBAB6BB1AE3009B74CA8E5D9F75CD27EF00D88B46 62BC406B090C3BCA048A2D793BD95AC13E38E400DF51D9141875BBE7DEA5653A 65329EB88C828C61781922D6177F53D6D23852E2CF2B2609A3433534BA4C639D 8DBB3EFB100492E9B86C7680D79EFFC6D41131CEBAF6536A724E6A760ABB59CF E1589359A2233BFFF0C09E68B8EE3BDF8ED244EA2FDAABCE0F1CFCA80C1C49C8 7EC2B7E7FFF09AD7FBD07ED2518BC4BD406130E9D865D38329BFDEC6BC1EF296 0319708BB0E5B2C3EE61185E0C95C1445D0C7EAB962920CE09C671E26A51AF6A DDBA826156B325FF8D259E0C855110266F8AB853EA2EFF19C71ADD66E2CF5257 FC6A601729D141B5A565D3BEFAC66B68F05535169DA9745FBEEC613560275EEE A504F5D34C5D5F54DE30C2BFA7620C5BF75D401BB7AFC4D70EA4CF41F7E01E52 6562B7CA55C1FF2DF9DE86B849D168D07E04B7B291C4CD32CCEF8B99491AA7BD D4071DC78DD370DC9A9E1034413357104DB0EE4D1E7EA6BCB4E58FF164715CA7 3AD01BB9DF31D105ACDBDD18D93F7C7E2AA254424D318B29D8066516409486DE 19E687A875DC0AAC6B5921CEB8AD781C86AAD720B2DA17B23F78C351B1AFE082 6043EE508499BC929BE81D829B0B8F8D60D94FE6C50A6E230F3024FF5A601A5F AAB7CF58FA90E7A10CD1EDC306A2E07F5BC099C60E2F8A51CE68209CB7744C66 924238AE362C4DCCCFC7A1F85BF4F40EA646A9DA8C680663C7DBDA7F66C63512 22610198AE3F208C369F46307220AD8191DEBA757B8F8AEE3F33D0DDE266F8AA CBB3B69A092F198EA101C65F0996F2E9E6F7344FE373C5252F56AC7AD7C31876 BEB00396CC58632596ADF9772C492880AEBE5A0C187BAB126277F58A403C6274 CD669B746A4ED153ABAE26A6EAAA26354211021E651BC23C09D99199FEAE958E 905BF577A0482D90C17432D40B68094823C6B89E0612FFC4CE19E72EA5F2DDDC E93CA2A5983325E2714C0925396F0F61EF6909A38011DA813048B8C550D9D5F9 6809AB2791586D04F2B43351624CE21EE093E52E360379F04B3C8EB4F75145B3 18DB390F7454F2E04103988975F0BF76CDBF2D8181AE9E18FB7E630531458D77 70B9BB01A4D00A431D3A9CA24F2DC3A74B935155557085D07D4C754110916BA3 CF6E6C5C6071600B3FA3E8BA4837EFA53C94AEDE957706DD1D2F18696FC18316 0CE98B8EE89DEF5B1AAE7A5AFCCA6335C9ACB8D959CD20898BCDD41F59E96B9A B46FC67611886F715321370B70DA04C366913792D9AE41DF806FF37F3F2FF4BF 35AAA3BF5B3C28505580E3182773E812CAA3FC66947C369A6036B4A272CAA1A9 99AB20C2EC9CCFCC5D1D06F4AA109D9D233A911956744AA4A99D0A3B859A1BA8 E78630D8850C3D2580E41D8A465754952A839F55DC24C8A9F138CCEBE999682F D6FC16535ABA0D4954C5737A71BC82C1B927E0EC36D6408527EEF6F85FC45C22 933F14F0F721C657640C7F28E1E34513FEC828EB4AA93C1EDF43D9099FE1E3BD 1A2350596BAFF7CB7BB5887FE98DF295AD63005157159A26496F74265E53C463 DFB8C714EA018BF8968723DB868AAA023F083C0BEB557140B3950842B6566233 DCBAF43C9C402FB3645096C50FC2B32A314948CD8C69C40A957EF5351012D6BC 1F645AFE37176FEC58CD3658CCD9DF2361D92E97A1E4B9271A33C6C2863FBC7C 958FDA2C00155017249685FE85A3CA8F95D96219547797C9E9A861C04C3A2B7F 64D2CCA1906687E131B925373226A60387F699E38B100D358D9C0A08C94952CB 16E005B62AE2E42A6D8E371BEAD3857E36D0FCD4B39F8BDD95F3AC4894F40592 FEDD82A75803728661227B8A01FB736541DF52516EC225FFA5EFA142654CAF03 9090009BA7C75CB7AF1587FA8948BC4918EDBE9F352DEEF558075DA66F90E483 BF19FC957FF2DABF57BF9F5DDED7799DBC2094B7161F9D26F9F0F02C45DDE159 0749A3F6228A6AEAA96EDA2C11346C7FA4871583D2E9181ADA7065C0BE5F5B89 7E0F8D0CC47AAAE80CC525EBDE1ECCD378E3728F68B0D0E76B2D4056F2245574 3BB2701E1F1BC3407699253AD7C7C0FD262480B473EEF4AB916F0CBC7F78D72F B85C6F4F2828F4FC717BDCB28A0909C4538AAE2AB026895618D172C59AE028E1 C171D1A0562C70379694FF7A52B11555D09F635033505684EA2F151D71F6CBA9 B17A61BD031CF6291D04FC941004242E9A3B3647E1CFA68AE41B18A5533AC6BD 998A23448F6CD20DA79F1BC4EDC6FEACB211777B5E1670BE5319184D12EF51CA C4598C1A00D3F61FA826160BF7681A1888235A4422A86CB47D2038B0F404E592 2C7E201111968E30BD6C158A0BBA7B208FA21E4E66CF3F5623B9BB2C3DF32A51 1BD505F4A584868EA9AE425E8BD3483D78AEC565E2FEF1993111D854E0423827 15C83D7506C5724F2220D60F343BCEF9286776F4B0B78746F5FD81F88516B5DA B2916BAC8D2DB9B19462BC2AAFDF28FB24F9D4F4A68D7FACC446BF1778C0B550 A395ED60CD47F5B9232FEDA0CC7FEFA007D369601FC72AB4E0C1E4B715B1A7E2 94AD905D6741AA887D479C3BE263D0278377307D45696182BE0447FEF500C199 5F18E6BC6C913F94E703A5E96FBA598A19D0FAE013322B0CF83F00E0F9DEE2C2 629945FD064FEC52ECBC537ACA0D9252CF80796F035595A139804C5E65A86A9C B31A68F8E41E056D80B351E41B1474B3807A0D5A07466178CB3DC19326A45744 AACB0801647D7FD100EEA86EB089B66438105545DE84ABFDAB7CD5E0D784D9E9 52F5995B82BC3A5CE46ADC95653C28EB2523ECCD769B54D6E0DB4AF5CB7C2A86 664E67038974007BBB110125C1B4970C57790A21B7243E3876031CF6BC0590C3 5E0C92BD1B6E0059B83F60DFF87C8B743F2026C26F9470C0EC18507978A0391B 869AD0F313F5A9004E32E5CDD02B2A399AA8B8FB16AD5E2B52345AA03EF386E9 89861D1EB5AA7709AF11AA6C1C2ABA0B4877175E7B54B78EBC1374939FD3BB18 C241FD7149365FD549C407A0C91EFF6BF68967E41E6A6DD2524B32B27637425E FE52CF2FE7F87CF06D9AEBB133A37000E6894B9FB2B7E1037569E6D4D106AA85 3F4C55566595F9ED0236BB365CD0EDD467A6F86BF693652D404F6F579F1650A2 280070B4DD4321535455E33717DF477958BF3C99C3421DC85D8E8D6DF706466B F8057C721F7D63E8B38EDFE930DB386F30AB83FC1263897893ADFC553986A608 32C67959D5C5AE8A53839F66177490886E4D856ECB2425A41BBA6E40F248FA1E 129ADB4CF2A0D1F10F1FD5C5598693CB52CA8CBC7168C59CB4D1CDE3941E3BBD 68348A2175C7BF0209CA398B39951DC82975B9A27E6E2F0855C99F213D5E3254 62F54631B57539A6D934FBE3D90ED5D8C05516352B6FC0F84114521A088E1261 1821CA27B0FBB5AC488863057F6F2EA2AC71014AFE17276B064E3728FEE87093 93E416B0EFA448BF50CCE0A9C61AF21B72584BF226647C72589A3624FA7545A2 EB5DBD42ADF915CAF3517E79163F5A1A0E 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMSY10 %!PS-AdobeFont-1.1: CMSY10 1.0 %%CreationDate: 1991 Aug 15 07:20:57 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.0) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMSY10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.035 def /isFixedPitch false def end readonly def /FontName /CMSY10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 13 /circlecopyrt put dup 15 /bullet put readonly def /FontBBox{-29 -960 1116 775}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964 7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4 A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85 E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A 221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A 27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF 5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09 0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730 DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A 71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09 4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C 515DB70A8D4F6146FE068DC1E5DE8BC57036431151EC603C8BCFE359BBD953AD 5F3D998D8365AF76D4CF6A06FB66E1CBCFDB3A67D8880377CD677B9705EE853A D849F88A828E244FA5816B7D081D4D1975A56D771790C21AE05809BEE6613452 953F26C39CE61F0E134BC35404FE2F0B7D244D9A6F66E4D817D1C65024013AD3 5F242EDE94633B8E20EA42B07F83BA649F12B784B2AAFA542BC597C6C2C9AE9C 39D60FBA6CD16AADB5DFDABF22F37E244DF3987FBFA55031CFCD46ADF03650CE D6CDFFD87BF7407FFB63F3FE4C29FE753896101B2CEAB9007B66E29D6A5B85D3 FF91F888E445677157A5996FC7A3BD19BAF3A3BCF33F0719B992A0F013B1F0A1 82E42DF6F651071FB407F448DFF37653E2A0569BDD8EABC3280B3582745DB98B 644E5B341F531B0D81ED85F815B993C2B8B34CDDC6AE97606F6B3B1C5427F174 362FAB82B935087B568E6F526347058C406E878F1CC2DD05C26D35565347C5A5 7575891BB4 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMR10 %!PS-AdobeFont-1.1: CMR10 1.00B %%CreationDate: 1992 Feb 19 19:54:52 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMR10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle 0 def /isFixedPitch false def end readonly def /FontName /CMR10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 13 /fl put dup 14 /ffi put dup 33 /exclam put dup 34 /quotedblright put dup 35 /numbersign put dup 36 /dollar put dup 37 /percent put dup 39 /quoteright put dup 40 /parenleft put dup 41 /parenright put dup 42 /asterisk put dup 44 /comma put dup 45 /hyphen put dup 46 /period put dup 47 /slash put dup 48 /zero put dup 49 /one put dup 50 /two put dup 51 /three put dup 52 /four put dup 53 /five put dup 54 /six put dup 55 /seven put dup 56 /eight put dup 57 /nine put dup 58 /colon put dup 59 /semicolon put dup 61 /equal put dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put dup 89 /Y put dup 90 /Z put dup 91 /bracketleft put dup 92 /quotedblleft put dup 93 /bracketright put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 106 /j put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 120 /x put dup 121 /y put dup 122 /z put readonly def /FontBBox{-251 -250 1009 969}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171 9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758 469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8 2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4 87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0 92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C 295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75 409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C 4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF 2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E 0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008 24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B 43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575 5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC 96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3 7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3BEFD8D9C400015B65 0F2F536D035626B1FF0A69D732C7A1836D635C30C06BED4327737029E5BA5830 B9E88A4024C3326AD2F34F47B54739B48825AD6699F7D117EA4C4AEC4440BF6D AA0099DEFD326235965C63647921828BF269ECC87A2B1C8CAD6C78B6E561B007 97BE2BC7CA32B4534075F6491BE959D1F635463E71679E527F4F456F774B2AF8 FEF3D8C63B2F8B99FE0F73BA44B3CF15A613471EA3C7A1CD783D3EB41F4ACEE5 20759B6A4C4466E2D80EF7C7866BAD06E5DF0434D2C607FC82C9EBD4D8902EE4 0A7617C3AEACCB7CCE00319D0677AA6DB7E0250B51908F966977BD8C8D07FDBD F4D058444E7D7D91788DEA997CBE0545902E67194B7BA3CD0BF454FCA60B9A20 3E6BB526D2D5B5321EE18DD2A0B15E53BCB8E3E01067B30ED2DD2CB9B06D3122 A737435305D42DE9C6B614926BFD44DF10D14402EBEDFF0B144B1C9BD22D7379 5262FEEAFE31C8A721C2D46AA00C10681BA9970D09F1EA4FA77428025D4059BA 2988AC2E3D7246BAAAFB89745F0E38580546045527C8779A254DB08DCC6FB9B9 0E172209FBE3857AF495A7F2B34BC895A39A30F903DC6E3202D29AC110D868F4 7184CB78407B8B9D42F6375F67FD4B828592E4A977B9E71854D143CD1A9EDCD1 767CC2929E071FBA4C3D17500E28A23F697B5D5CC68D5F56EAD14BD504E07182 3FDC12F5404E74EC1C02AF00C1A6A17F958770ED4A024F5B3644DEFB61F2578E 56013D0B4E7CA3AD255E23DD63369A921D427EEE0E098E8148B16E8A5613A8F8 A5F1099E15AD16EC554B644DF306F0CF3571055A81F1B464529DB49E919F88E7 581066BEC4765E31BBE28C245BBF0B74610DBA30C63A71A4F3B60593A6B41C6C 636C980828CFE9A3362FBC02F1967F0F770A4790F90DEF9D56E0A76B0703FC58 2841E6E8D984FB476D4FEB960FFB6B386EC6CBB9EB83704B0AF63F38C77090A8 DAA165E6C6BC86601B14F8E9F504A9D578AF05128D8C1BCEA9D21057958D5DCF 63459352EAD6B4A2A666CC5D85855641CB31507F9E36680ABAEAAD15FCC0DE88 213B28CA601D37EB7C5F82538FD8D9D5C2EA061BA38836458DCCD51D0690B9F4 2B9A8ABBA47200F469549C5E2F623038514ECC9601FE2D8CE63F4B85BE8E8588 908E6D22A62FAEE36996A602D7C737BF30149B32052EF341E45E5F18FE4F8951 0971E43379FD0D60F68FEC99A30C9E0F94ABC2BEB668C611D6ECEAEBE7352BAB 60CF9BDCFEF34CABCB44D688077B3BC101F89FCE405F97311F8903BC2387F6D7 97CECC8AA4F174F5B110FEFFBE5B3216B778C9592324F58460D58E6B0CB3F2DC FB799B1CDF84277E0681A2F104B583A86ABAD11B83E2308B2A2E4DFBC2C7E735 A3C9820E87530231842DCD502A65BAF3125C210769C30E6B63ECFF4FE661FD5B 5026C20DC3C31523B5483AB6DB12CE6BE9E0E29390BA88ED8F62157C6FD948B1 5A09BA38A0C320169C6F8679E7A53629ADD9657B1C1585285879ADB8F2736911 ECDABFB23D1840E7A0F3B8F4BAD9B7508388DD936F8FB59ACCE2CA89BB36646B D17EC5CDC5F1212C6FF7D143BC2F88E73D85CDBE9F377BE69859FA49CD5F698D 0E1C0DA2032C259AF305DEF5BFA9BBD5260550F32F13D819AF8AA7FE96F17CC1 5884127EECAF077F81F1B3769B661E051E5A5C8996DEC5C5DAC902E100598F67 BCB75BFB59EEEF6DDDC9E7C616BA6D34F15615A35273F54E7DCC445DF52D179B 7041451C0748FF0E663CA7C2572E92D94CD3C5E3F526A406F9D215135B07B6CE B75810713A656A452035258F724167B4E32693F16EE000E318EE7F0D2AB85FD4 D2282AED61F9E1BEB8377F3D0CFEBA128BD10C0578E45FA8C8CAA5E074585831 03B3F28D048F84AA2365B4F02EC6DF74CEE27308B9F806D180D1A1D1BE0F5AD4 83A1052887461935C85B8261D99B9E35E5085080FDBF1A297A88BBDF568FF4AF 2DB3EFD07706D953C3CA79648CFDB79FB0A4D4A8E54EA4AFD793AA8889525398 8CADAD326E96B9415C6FC072854CC60BCB82C4ED5E88F285406B7830EF736287 72EBB34F4A9A6B237C8EDD95F67E676141838F54596D0B366B44F0AF3460F642 8398445B391107651C53F4E5C7DE9BE323D9134009A17B371717CA177D9AC3D1 9154C3C7B39C549CC69F5C17D7582D45BAA93479F52D222F5E6AEC7D12058AD1 244610D69D62EE8BA49C68880F6F81BC5DFA4DEA9D66D4AD023F76419A89086C 76B1DCE557C0A3882CDE2647DC73897322AC01D4BA87E6D47E58FE3AF78BF09B EB9F0B2A58D7785A0E77B309AAC2E789166310C4A33534B03B258D9F2825A32C 818E8983519131F70B0F4E286A57AF787812398DDF942748ECA6110F91D790FE A5B92E1A58D6D927D4B5E2322BA280EC816319400EA899168D0DD63A95AC474B 200ECA3CEBE25504878140C8EC06A8E0BF09A3766C6B4D484BC366D91B9C199A EC14E55C504C14C746CBC278312ADF1FC8572EC864B3F5E71BCF6C703B013A84 A39359C902997D6A6EDBD5B2B046A5304F6CF89195327CBEEBAA82BDD6EA0703 B44A98E65F8BCEA9C1FCD16C2EFF685C3097D24E0A99881FB7A2CD0C53D612F5 1B916483C890C3EBADBBEDCBF5EED68C9B13B52BB4990BD33BFECB60F78A9492 8C3E9F45CAFBB9A89432C2190C285CB4E395512C3C6B222EC4BD1227906E7B83 DEA3322048C7D691F240A30B6AC7C94D9F8B46AE58A91D706DDB5793D197501A 20FC3A2044723CB57CD95C5EE3AB1473C33A1BF94C45771FF55344C6D2EF733E FBA855E2D2AD7A0FD6DD35B2D67D4BFC282353427B4FAD2BC8D22949B43BE69D 4D443BC7AF4E7D74581495852B6584822E647FF9109E9A03508895E4C4ACB0DE 9CE11D47C7E945C587EEBA65331B78768317CB5FF7BD04C772FDD4046C938C82 8B7C4E1A4FA74024184DE2A5C916172869C179853CAB43972B5936E8FFBCB2E3 A460840BFA113455BE9D313658E69968CBA65A38908E7B8AED50037A2205A38D 927BF09A046160C90D1EBB7B0488272C44D759EE0422B2F4E37D72AD161748D4 88133D1F0917D56DB4F7B4A55A7FC8762AFB17C3E2E1AA5C834A3A916DD3C8FE 0CB4CE4182F94A7C2946A431263EF3298545740512AFDC17FFEF4255C2D62C0E 4017B4685E425394B0E1260F53C3B30CC8159CD43B7E4312FCC2F818B9B80B6A B17CA77F0E53FF848D7AB327ED0AFD87BEEFC7FD806A8626AFFD867B7A75266B 449598AA495A5F6F330B229BC7909A71E8A8C49AE5F7BA7EFF5A7C2BE02CBFFC E087F56DBCBE6CAB1C616A30526801BD9E111F064BA04216777C792BEF89D1CF 413BD8E9E2FF44317237BD081758A41D5EB51509799EE796B5752223BF709841 7A21066FDBB2361C17D51BAC62FA9DD0F00D7CFAE4EE4438F5179B4D1C5DC70D 26226D02D79EA6178715C69A8259736C4CDB1CAF5E0940DE3402573AB82ACB7B 5074D4C5023826EB3996BED27FC9A386224D81840999BE038D932678DE80D884 E5056ABEAF30FB44E90D4345B3B5F36F47B118CC772BB6F0E5AB39B19516D204 A091436D19A8CF5DE02553FDB46DAB17F7D29B85DF3F6A56BC0FD2CEC9C3D6B5 0C8AD90879A4A4A6373CD96AF44C58E72ECFEF34F37EB19FBD254E30080F6439 DE5BE1C9D77A3DDB24D6C1F414F938FD8061DAC1B7A361425F9B231DC263027A 779A40BF5516BC8F3353731EE4D2970766C0B82D9097A2B93A6F76253FB7E4A9 A69BD68BB2854A94A2ADE74D9AFEDC5EA43CAC18746DCD4B4354E9E3220CCD57 2858F8FAFBCFA47178E1BFC95A485F527C290A08AF2B3AFB5DA5540D12A8ABAE 7FA3314ABCB1DA61DF86FA67CDACFEAAD879EE63A5991ED672EF6AE10CC87221 211EC5734E4AEE8EE8CA2ADE643CF78A1ABACDFCF14321A67114AE7EF961818F 4B1A5DE18F08CDF858C1952EBE99875948D4848141BB8F63899309A596F1B9B3 1B837BCFCDC9EC08FF1CBC6752A998B705130C90798673D90C18D74B723BF2E3 C844411127D867A7B9652FA5299D96455DD54DFD433B9CA014ADD8BEDB71A7D0 11EAC5407DF34E7A96817701A56561C47E0DC517F83918F78C66BB50B12B3820 96F68AA060F858B1218AA78710E552C37DC2E1EFA18725A22941EF380B880B46 F532E49A44E1EDD0369724C3CCC208FCDD078E7855C66E10FC2BEC8AC19DE334 FA812866B12F22810D8A6FC341CCCAF4A8B47ADDAB8DCFBBB1F26F3193E99AD3 0DC75B3B6A1D852DDD2A6B00A4BDDB23F5503BAB7FCD83A7F2F2ABDD4C12BE34 DB34B8D93F18376E6C3B0796AD8687A5D871D0AB420E7AB113C0DB0E5F4A0EAF 66084553787182F83B41C7362690AAFBD0119E3F4B2E1DC9422EF73B07A04E4F 6553FF11ECCA4FED392A676522C21F152E2972CB0B4662F53644427C7145F10F 669FA64E1F646BFF40F90F54861B97615F0E42E3100301D551C82F80BB12BCEE E4554182B8395CFC8DBD3E9F18B29E1F0B199FB0D8E4522A8ACB6BAFE3CC05FC 6317A6636DA0B3D5B31D96C29D91CC7374FE731D8DC8F24105495DC2E440D2B7 84D797762302C671FE4A0EA505AD778F86D9CEA9931A3840880F3255DD5EF15E 004D0A03A71298A2C6600E997B9320411A27861CB3AED37AF2D47FA7709C6272 3398BEFF5B57148D0015D89CDE53987D5F21CD98A9BF4801AEEC16CCA2A73995 054E9F66702E55E7757AA1D710D82F400379BD10F9EE6F4F5ED7BF52B1589126 CCF86662182ECB03385F922EC408668CFD09027E16C4FDA6D63A08BED65CA415 A1FA562A8DA13B9731B07074B5665A740FD845F0B5904DCD38917452194504A6 0AF19255D76D0EA2526CF3B63BC19CA8312E3E5EB4417C716DB26B9BB32949D1 3B42DF95C5E8A6A998AC3A576F88E291BCDB53533E168AB9C7DE068229238D23 8F7BB188AFFFF53138FC4D1893A921EDEACC0AE684E5026E092F19FA6281DE66 E5142DD678AE37F2B41702F3F667818F8EF31465186ED4529BEA175B2B84EF29 DC85DEB16DFCFF2954B6157F9EFF96B156257CBD0E7738DB39C758A5A72C711D 1F72E2A6F6B8D3E096168B0CF71B563129A04B272462C3C0C0C8C2E73721959E 07532D02A0C9F7BE680F286C9004A06FCAC43109B1CFCD505D781BCFC115D073 6713D9DCA90CBECFD41F602285AF66234BAAEB3343195A4D55FAED61BD05ECB1 A3D550E66F1148619C12850576E8338784ABCC08D85DC796DEC1DA1F922A9300 5EC94B8A44A667B197EFDD818C4F3F4331F868C57AD51E83F0DDB6A1533D9EF4 38E6785996CFAAD2711D79941291066CC0CF2BD0A9869BEBB27C386010803B03 4F8A4422D4EFE894B8B5D3A6B7501D8BACD6F3BD0877D5FB19F59BA2D0B0FC0F 6B8FF65089AD0E2B3D68431F609F632FEFBD582CD153086E9F011D35D1366579 916855B32275EC3150F50D2F870FF1A134BC90AED25F5E63EF60229141A0DE3A F379AED304CD0847FCF0B6513C85BD9484F2F63DD3CF005655A90A1664CBA82E 1A7495A07F5595B504D184AF56469C74F4DF284649CAFB1CA07B00D6BFFD2EAC FE7152368DCB24FFEBFCD078F7A3CA034AF852264069A252FF7542C50A9B34D3 474CFF17804EB375E76EAE824E588AD6AB8D4D22BAF76424D624748A16390DC3 8F08CA2C3F55FF9399A83080233D1DCFA8F7149626B1CA24749880ACBFD89CE0 B794C766411507AA7DDF25BA12CD22D3E8F81DFC0E64DC90370DBE00A609622B 51B7D38B03AD4DC84AC4CA05A1C4A05A72796C8F073953E2DBB03B45D4AE2DCB C36C9F8B4DCDB60A92B16C9DD6CD0E5A1F755FF5F4F70BC9EB79E2A9AE0777A6 5B4D78C1BAFBE6E5D4A81DE84D11D1556765D7772F9C163DCDBED2CDC2410E1F B0293D5655D6B7EA6AF1FD2E26A727F685FC7A5838E3F506596F6F0626C19D0B 78653D50892782CD3F6EAE5E67D559A2426AADDA98BE1428CFDA633CFC0A3DDF C918B80D8452F4BD2A0F71C78782467B549AFB55DD04CC9B69D540A3EA0A0E62 511AA29B67D00118C21FFAEBFC35454F4844BFCF2F2D20F1B544475C50415320 CC67DC7FC324DFDBB4080A0D82687295246FA9D10E2FF32F338689728353695F 6F387C51E3759DF41C6C716ED7AD37B8669C06FCBA8F620158B8B2B33CE7F129 F47491E91B734005260848A7CFE2D15BBB65858E71B22AE97CA00E73DA59D026 FAFDC935EDAE593CF3C3B966C4747C7C263C45A22B7BB5B88610F3DD8DB0E26A B1E31C581478F7CDDF3B9C622043BFE512E03769730872891C60CEE200C68EAC 0BE935520701832775AEC436DD8CEEB3C16C9D98521831916DA47FADCD8211E1 33D620F45D798D9B415CCE0C07973A229ACB4315BEDD3BB857167C3213AD2010 2C8EF61B7554EA55501BC2750C95C8418E509CA55C40E72787632CA84F1254E1 D00CB10BE015D0964DE1FED834DA0E757585B5E82195C71A359C30E2282A6A33 322F61A88974E5A7D11AE3F1E89368499F0BD43E2A12BED7200827211EF6453C 5F398C557122D9DE7AF5E923A45261AC8845BDCC1C3BCD9229CAE2832F22822C 298E57345D818F78D2870D93D60E7FCF527F8C1DBE63EB80642FEDD230E09338 DD927CFEA8A21C5C1C800A4862035C8DAA949CB9D972619C043377441D71806C 7BA70F586D5B28FF2E3420A13AEA6097474A833A6C8AC29AB57CDEB5359EE912 CADBBBBB25D8F37C08304E5FB9BA8518FFFCDF2B40FA1712DEEA34AF5A2D773F 15245FF52E1C66BF462E7CBDBE6B9261FF714C2A562CF3AEA5055336CA2AB66B FB8BE0B0FFC7E4603E24E63B7141BBC5FCAB2DB3755156D2D56C924134872FB9 5CC7D81A75F9BD088C77C48C6C81E59F124A611A099CABE643FB1597BE472AD0 21A40ED48F96271264978C2E03C3923711527069AEDDFCA5603307F45B5EC13F 735F5D65CC80BBFCB66F5EEAF1B93EC4D9043BD31C8916B06247578252D9B967 3D9A64366BDDE78CC5CF37FEB39203C4C29298EE67AA91B40D22566A0E0321C7 BBDA4F0CAB641726E6BC638056D9AE94C3B29664063B07489459550933FC247F D6F28C6B7557B4DFF35A2B00B26F7DD608B25A41DBE23404EE3F7244C462AE56 9ED8291D628621A41346C329CA3A6E20AD7403BE152A70845DEF2E8BF2FB4BA3 7BA13CA0E4AF68141CC8D243B5CC34FF69FCAE5C4EA9D220075CA9CB37AA792A 7BFDCF86664EF66C4AA720FF1548AB0C9001796004FF0A8A52D8278B6F08AA38 B0B579FCC71EA138EE34EAE000E85EFD7D7227BEF10C61FC00BC99897EEF0FAA A4B970CD7E574F047F4565DD47328877F85A3C88197BFC2F321D98D256E1410E D6362FFD55B0894705A8F14664B9262E29D816909CF5F6823779BED11F70A623 F84EF82ADA8181A08E23B43016DEB7152E90F038AF86660118DE365FEFF373DC E4A97B79EBF1B773EFB3E96F2C9E6AF9392A651CE835E1752807E83D7D2EE694 04638A901E7964C6458C794E285F5208AA47149D7629056EB573E4B1A9E6AA3D 55E028684ACDE33C4809F143A809A87B9A81A357FA60400B3613EC9CD39DF5D9 57DC27AFEFF4129A182941F387A60652890A2889171DE6E5E7A44164839A8A9A CE41CE22F3E0E4B0E338DE495036912BBED16CB5E290E4A143E1B184D55B1C12 7EDDF4A3B46FC934E6DD32E3DA1465EF94C82D6AF45F969E39D8B4BEB1284DEF 0CFC54793F281A1AFE324FF5C7B388F8DD48BF37B40C30BEF9872262AC438016 D3D3FC4344F63EB80ECD830A96348D2BB43941A76C0543C4BC3F9D9A31524DF1 6F868196A64411D99A68879D5B988E5836A7D8E00CB4B83FB971DC5AD996938E B99BC9731B391DF67D34A113D730AE3808B76D5EE0B96ED2026C8A0D40CEC4B5 010E107C7BDF8BF6594F9764B6DB5B32A830C6B017653689DA995B222954A3FB 8EC1C89B79C34ADF7272332513A6FA9B6BC3AB3E525C0CBB177CE619F783BCC5 7B2798A4FB80397E60ED03D83D1A83C02A80837D1095540914403B6AFA5C6680 973D3EA66CA9C5995F950E9D06522C18BB197065CAEB7871D8F40FD80ED27E13 0B02D3A9326DB7FCE1F4364B74BAF93672812E5822F892A8486FA16F5E6EEE48 87FC4393462CF973BC4B35ACA23247ABC8A26386DB2A92E4E55D1439B97E9660 351B475901AEDE6724A15FF8C2F374D3E1CFEDB180497581D314539F0DA629DB 22F55EB53E796141EF1612DEC7ED21DEE00ABFC8290CEEFEDA18F101E0111DDB A0AB0F6316C618EFBA317A59E6832DE5C8BD5099D7D7EE4D5A5A82BC09201A35 7935209C6B6F8F1A9E1C2DBD1E89D5CC5828E749DD00169D5CCF9185E322C01F F73CC77B7EAF39C5F1DF97833A8E7FA81B8BFA7606EF5E267B674FD340CB4C7E 92E05A37942827DE72B2AB111AD7E50A035FA9A154A24975BBC21A1B17F29352 C3C5DF019734FF3B6AF5D44EC0C6D4E446DFBA13EC56D3BF239666F5D80E514F 34D527DBCD49DFB05B14EDF878FDEDAD660C7667A39A0AB9BDB8757D3275F0A8 3FCB76D7293A1DA4B24A1DE50B4E9E756CAC12AAC52A568937DA5FC0F101C3F8 62C15C9BBCFF1E9F324E23DB1C8E9BCD113DDFB7BCECBE6761E7DCC479E708EC B74DD6A2581A30848887B16B2AEBE886DF428C195A8AEC8A2056167508837C18 4BBAE372E2083E4A5B62CA4E2BB362D98C93E3941E06CFB61BE95FACAC740169 7C922902A4447CD0711DDEB7E937893D4519EB0747C5DE082E38E23B14985425 AD063DBBF29035280A47B3006FC7B23FA4D71B7BC97D17F83214D68D4CD0026B B21FA9B8CCE7FA5365D442DD695DF7DD6C8F200CA3382EB337C6925E2C3434CF 9555DE69347B46757FB2E518CB3BA5C30AB832D38A79936CD1CAC779CDBAC2F3 4127EEDB4AF9A191FA9155EFAC0CA9FBF05B9B4CAFED73896C483C3BE62AFDA6 7CD649C13355C57959DD4E839BF72AED220D328EBF5864CF0A984FCD2B726040 2D245595720A5DCAFDA70ACC82B39409FAD94740391EB9D29DD9AA5CBF529BED EDF6E6AB98AA2DE3DD254F22E22F7EFFCA3B9270F096FE382F138DC30231B294 CB9699A3B4A786969E3863BA197DA2D1EF016997B9E177E9078CAA7E2E9CEA90 BE5B6F348552A39A75AA73F3AF1F35414F0CCDDD33F160C636EBCB94D8AE0E95 174EF23C542CA1BD7958AB7368A08C0962FC503BD2E6F64C2F48F75FB0CFAB07 138F3549FAEEA817AF84CD18454FBAECD79B98245E47E2AF50EF196105D4BDD6 366BAC67E9C550410E21816632A9290192DA820C607981BA6754829151E8686F 14E033118AFB8DBC2DF6316AC5FD82A41277D44CCA3E602D6F3B3DC3E9E42E17 6B3C676022D45BA4AE96901EDD7B214A7DC5D4DDC38A0F7249D49FF351EF91FE 0F9C15FA6FCAB5F49CEFE923B6C85CE944D8F6E9482525986C9794297CD468E7 AC20A8595B1CB68B532CC57D605BAE68B8A5164BC6627D196D9B288C93632721 66EB8BA233D00C23AB3C279C2586E313DB22541A33E61F166446CF25BB35F48B AE30D8474F9E2BDDD9C4C8B756846709047B113E5AD24E898F58ADC1F7449D6C EC8337A0B743941C4D1492BE5055399A71E3065E6F6DA67914EA218B162AC040 DB4068801D5A692A2B03D3CDB34450B91A073FD22497E51DEA1E78A5070E2DED D17991CA9592E7BA7B0A71742267F7B5C73743CF9E88E2A2F7853BD6F4ACC815 8CA181DD0129DDE7EA9307CF3454BBF26FE01A00796E2B48F8E829E0765D1AD6 F581BCB3B6095AAE70A1B0705A3F3E41DC20DE89332BDC0650D0155F90BD7EEC B41BEC5BFF9AE94FF69EA7E6328AC00D1BA4A21C31CF5B53A0944719A2709198 494B167C393078403551C0BFDAAB21FB720A167D50FE0C7012A90A0DDEC33EB0 EF5528A39EE01D7989A5F17B6E06ED4C10895357B11B3E2BE6F2C8130A031601 CA95BBAAA3BE366E674BFD95A1574A0E212BE91C1E1DD6FDD1E841DC3F482932 A86DBF8C7F028C54DDA3E50C0BEAF9C72B1F4110610B038DAA39AC888EC82C7C CBA665CABA02CD52C57AE0DA200761DD60BB978945483EC5FEC22EFA3A5E7BEF 91AC33341B295F814E74C5021E84944433D95F3CE4E732314E0FF8923D8B6452 4CCD38A242C854E7563D42D23283F433F181A0A6E0B66B55DC85B7959489A329 636BF65C14FA3ED72C5DDF9F622698EC42D53B352B3EC24BA5D3A5D18FF2497D B5E0CCFF1BF3FEA6B7F695B204B12B976C37A2845C9E563638E14AB95B55F422 57B8F7168304C52C3178CFD0BF46C5FE0FB8180D5AAFC6932613E2750AF210B2 4BE24A8D1D2B223CEFF8A4E9977BAF537990DFEFD92FFE01FF3B0D3A87C478D4 0739D68B136495D1BCEC2915232C0CCB86822DCB0654640C272599EE15BF1108 3C9C9F97E65C3960517C4CA9D72AF8382A79A1313C605E60AA44E693909E029F 7DDEF597B00922FAA1866480392229405319E613A16A783C04F8689891CF28A5 153F59C4331FE8AC4C840D7AF5C10421E882E9D04041ECEE2B81A4845E9424C7 52944F9989A0AA965A34DDB4BA52DC011CC2741EA585B0D5619A50EBF8B513B9 CA6C612BE83B87087F048CBABD7DAA7D3EF115FF8DAA7DF1CB826C57E39E9B93 B370EFDBD3DDC0ADD0E06F59A03DDFA831FE705149DD9A968E39FC6AFDE84C52 C8DA8CBF2728E1D7B1FB1FBDBF01EF0D0707432A3FD30A7B8EB53E3395116B79 579A4DAA3E3086EB617917FFAC243838736CB644541330E638EE0DB670B0EDBE 886488F0FDC54A58039DB0EE22BD8C9DCEA4D9A5DEA46F887716917AAAA73C26 A4E9F1FBA7186F898721A7EDEDA4DBE2673EDB5DF03EAE283B58681E313CA78D 3B968C9A3ADDD1E08CF0E133ECF02747D40498FAF318DC92C77369EBF750B3C3 EED2E674F6B0D5D1498A20B5F9FCCF4DC9F9F500E061C904CF92F06076427EA5 F086FCBCCA90E107E2FB7B45C8ED69D61632053752E16C50936BBD8420445DCE 9A971AFB06D15B260A3B5AEBA856CA240E74DCA317CAA06DC990DA91E2970848 5A68C92D0189E1F030CE504E887979152B8A7F46651DC6A983762486854FFF6B 5979006805DB1BDC6DD6CD9B510BDCC98E7A9AAF3A304D89DA1192CD2991912F FC84AD022AA5A26A6ADE8C2B7C3B212F1BFACCB0407A902444AED8009B416046 B11873D0359B00F3069CFF45C461BF37E7EDA515CAD331CF0FAD21BB085BB99D A3A120C1CA5ACBC72A18101BCED9B96B10A30B1237E125A5A8BBDF22B70E247C DA02069383041A1DBEE6548F9A046B74ED58E720E96E1FE36B4E11947C9A463B 8017D5965FFE9CA60AEFAF7A5B07212CEEECD7223A0EC12878B9ED09DE2A3932 5DEA2F6763147D31C0AE44BF3C7819D3DD903C2C36550750F9515332D83178FF 9CDE64C726937E3269527BF654EC3CCD15728B493ACD0BBC149FC06C29DC08A7 C84212BF84965A8F60177DEF54442A8B51379D9D373C07ADA9D121C1826713D6 64A4EB57EF2E027C00492CF4ACD95C80ABFABABAC962C74B4F9C61FD3E9A8D9A 326ED122884A65F31387FA2C26926CD4914227B6C8F15E8DB1FDEC1D33DB72B7 3B3BDCDAE72B4208EC083A309F1882A0F8C385F0E958D92275163B4AFEBCFB99 5791798958DD434FD62FD63BC3D3D064E333E3B938654F397CAFDA6D8E6640C3 EE8BD454200B107DA4A6529FDA54F30F202CBBFFAF56DD8ECE3579A65A6E68F9 80DE988EBC15085989DA787FADB70CE5BEFE137685C3BDF50A9B6877291CFDEF 6BDDD8F2B853AACDDD0215C3300D20DA1CDCE76E07B2C45437D519C933F203E4 341498A045DBFB7618530409C54FCBF609DA3E3B333431431D7F5A14E9167D5C 5175153593B4A52541EF0C14DC20EFF0DA62E2B8A89447B2A051BAE0AAA5A585 7BB05D6B3981343EBDE0F17C746A80865E6154D35F61F9562D02752FB9373474 0623C16FABF6F4089A0E3854BBE9A1E3E66219012FA1C2B7F5B3C5F59333408B 734E2D19F918EC8629E8DECA058C1B9649A114E155A161799921A611E7B9DB13 F1D0B053D5F52AAA855D9514862734D7F18BBC3653A33224A9BE982A7FBE45E6 0878E3D70F990A96E6E3D77B58A36B296329E13D88EB486ECDE6F84F58A53A0E 40694EE4D3014DA57B0A6619EEB0AA3F891026889D147F6E8C9E809F173751A9 F2AE0B0978D351E82ED55240393829E25609E35C627DB2DA8B42C3F5E901CD47 F1704DEB46D5272DFF89C78A9B299CBE7EC20E4795F322374DCA5B1FBBCF63EC 22282441393C4BE6FF5AEF88B9D7A6394BBAF9FFA9D51935BD0524497D653921 B1CB367A606C899B3A1FDD0FD8BDEA9D4564AF665C8206FEB1BEAF4F2ED28FD1 F0186BFA80EEF1842AF6F0BEA449443DC6B241E36E51CAAE4F00F2862A745C72 6E969FF36D640943C3320DD00924C95395BBBA5C630430C5C2B2E2951CD4A6B9 35B094C4875975A7FBA46D4332B921099A4E24E6678026001F0BF7639344F665 EEFE305F5B4CE7D92CB85D390B95153ABC0DE9F368C757834B13D44EBFF8D29F 40FFB6EE0128D6BE68B3E9ACAF2E5DFDDCBD0E0C253836BA0933B083E31B4FC0 DFE4CB92AD1B688224F25C2466941557479CD970A150DD08D50BD24080DD90F9 EF2649DB381D2D7507D522388E0E63CA89381D857658BE953C979B2A7AF29841 A0E1DFB39C6B50254AEC5A3A470B0C336D0A96B44250534E1558040FE42F14FA 663F63064F3EFFE1CD6AC6F680A1C13D55DB87EE6FDCA34DB77592E659DCDF04 A4210C0F10900A1096E91D27274665976AA57AA7853112A4721135945CC8179C 45FDDAA6F5AFA92C28EEFB394CA6BA4DA344E9D887567C0D8F4C8D917F48989B BEDA84C7AAB802D3B2AA31EAFEA2A199A71A3800A86E5E11E65C379FE9FCDC9B 99E419F5650F1A3841DCD0A435348C36A39DBC02F472F1CF8446A8D41AEDAA89 333E9F910673C76810B4EB3BD4E8B968C11E97B31B7B32C2BD0C21C530E6BF0D 1F80CDB81332A1DE6C79DC490EE22779AE4A395D7E3DA4BCDE72CA37FC5EBB14 025D675A08E4030D210B4C98F5D06CD212FCF2C2D713521C7A3E7C6189155DF1 CDA3A0A06232FBE767684F72362D85BE024EFEAC906B664E40FC35B83B61FE2C 5A1BB5B72A68AEAEA7B6DBA7F91670231496051A5F88B4AE5E45B8CE336F905C 84ECBD9C084CEADEFC8B711ED209AAD93809E3ED1082F453039D1CE6118E5B32 DD0D0ABA988819828CD60B91E98343596CE47D6584D956F133B9A17F450A7D3A C5F008E5DC77263450CAFF45403161D9B079C954CB73231ED0F3B013F7156E2A 30FEA0D46BF402AFA1861A211A579D0BF620E1044F83183FD74FACE71BF0AAD5 B40FB2A23F603CD506E8B1B1CE264846BC4C4999D9E68CE367BB68F6B9945274 33391C6FDA9A85171BF3A38BA2B13C3D68A237522064465A7F0973E052EF2EA6 CFB9BD2ED383F5C8AA01CAE890845843BD4A54677F815066BB2FC8E1656D4653 3F993C40701ABBD33C96148D2550D935AE3143095FEEBAF32CA1D40152AD3C45 60799AE71245B0182FCAEEFC4FD59DDA57DF89628D2287B322DDE118CA4EBF5E F41ACED8B8DA95DE169B2E6F4E0577819A4E5768BDADDD19BE32E94C0E770ECE F82A931A328C46ACDBC1FE80239241C4027FA81538AA6B727EAF45949F5B5777 F76EC5B2B25BC0BC3C9EE1F890719F1F86BA5D4B3EC7EF92AFFAD0664969A966 3E350AE31123EC4F565E9097BCF8FD61DC97DDA3A7C1C95F2007ECCC08D9FE24 B44D301DC29BD49340D874D6AD7A9657A950270514CC3FD81DBCFA158358B494 C342FF5765FE6B5C903AE81FFEB17D4C6888BD27FC73BDBB8AD0823A7893645F 01F708423672572D8E6ED690F5949E649D352D785E18857FECB2C77EACC8CFC8 96CE6693CD07B2D0BE56996C12175DFEEE9C52EC8EF46236B4FDCAAC0A62A5BA 13BB74154257D57ABDA5421B66976B17F0BCCAF27A79DFB57A323C1889D03A47 775938868739638B3DFD6FDB92032EAA0293B4706446DB88B6BB754F4020F85A 828DBAC12748E9625ED1024CEB38FE36B2A671062645FA6D447CD5AEA7B6D1AB 8AE96AF666F53B46173E1ADD652EA45BAE094D85A255D443D1CE48A5ADBAF783 C073E02A43FD9C444D27BF754789A5B5279400BF152C790D84C8D998ED1249EF E8AA1C3F915AB806C7CC21BCAFB7C6BEBE2FC6FB06ECDEC0D30767C38A492651 ED788844320B61F52E4FF0990727F43D56262E2AEE8189CCE18C7006E722E1C0 BF0A4DF69E2AD606C1BFBC5784444D55DB859EC38CC6084F246B26BE13868E0F DA4D46EADC9FBE8B610F8622E70C0DA70FC439110F5B208E524825DE04E650F9 7A4AF007BE747D854AE5881A8DACDEDF4601C7659E53C793E8079E489A1FCA84 8D3673766C12CF6B8F3E6C54ECFC201A92DD83625CC92DA960C83C968BB30F5D 145BDF1F4C5BEF6BDC6AFB4BA1FB45ABE14713CC8DE3A6012AA7C4FCC95BDB49 83DA6F872D6870485B3761F032839A580DE93D5CD3ED94079BD42688C14AD23F E2A641D80FB4F0F347160FA35B49C1724CB668645DEC67F633E30964B7A2D9B4 D18F43CD470DA73A8CB90FC9E0835B2B15B28738D6250C9FF7390D625876AAE3 A21A44A7649398046C32744C1282C6259FD430B228A10E46003D624FA1CEB06A 61B751F7A525A592889E224A65AED3DDC4AA6B1521B698681EFA8801F5CDD54B 11F0BBE0766DF4AA9783BBE29B21563ED3DD40572EF20DE597885AC11AB99F75 B117EF50448145D978B144E91BB0944693E08E8291506D9A5B4A84AB599413E0 BC40600643C0D761332C29F3EB3E5A85009ABCDA0A6AF89969F2C0723C4B50DB 658B0454C48829C67AC9F109BA6B14C746D86142F8B382AD3CE6DC5E98DF782B F6021FAC01D9D5238E5304E3ED9142232664243CC8907A75FAF61A94A0FCB8B7 4AAB47152BB53503BA935827722155778A5207E4264860064F26902CCD248D6F 44C6106B04BD5DEC09D5A85F5A3183796BF59F9FA881D565ADD468EC93260E81 5F72492C508738AA13A62EDC235AF2BC5D321A7CBC30BC34111E5092EEA63F0D 76FB0D8E24B853573C2B2060F244E871EDBCDA5B034A67BF72512AD507B98726 E5B615C229698B01C566E02B947E036250224CC491E88677EEAED35641C2187B 36B2E7BF8E3AECD1177A04EAD30AC6A913851F284DA2ACA6D4D5A4A02DDDC1AD 792651C9966E7349A515966A5FF045AA45486EED4D819483CCA3CF2E602B256D 227D7FB27D16D424E81ACA35F7A9EBDF7484C945EDAE822F47FF27C005F21E82 C836CA9D21C0BE96A20EEC2552CE663AE1660DE5DF4CFD1C842ADB4643985636 E690B9D0706FB1370F599D9BA84048257D65C2B9C771E908DF8A36BD54C9A432 E007B390E54C2CE36501B8895024955F6726C1D53148846AEE65C6546420C6C1 7A34E405B9E2AC6E6BFBA5D5B8F9157816B4CDE5FCD1BB06ECB6980527BFCCD0 74ADABF38608F4B4D996469CACF7EEBBFFFA17790B29040CC9448CD348285766 EC61068B137D0F4CCAB973F3B8CCF796EC3F7387C6F8D128D961CA70C6B4AA9B 5421E1D97CD16E1E31CC2E2BFE91BF75B0328C3558EDE8045E12C38692DABFB3 1F323DBC9B900B0CFA8296530CCBDEE0ADD940B601E3A328977F1449E37B0EC3 594D710B1F4EA3C9CC01474494CA6B20288DE134D8C7E6C3AD5938C876BBDEDC 986D193AF04FDC33C8ECB5150A58184D593B017B9BE40262159FF2F215B4D816 5A38FB5C621809FEC01E0675E93F58BF0882D4F624F516D0D0D617642B0DC621 21D9745DE7EB94A9F54837D0AB6C7376EB70E33B03236D3495EF5324D2F8967F 80BA7DEDE334E332947F2B8D60C90CB79B90C1693C4F359BF86E52FB6D740CB2 6CCA57FA268864A4F26A51C55B59246A3843B4453031145A9FCCEAC883E2D58A 1D5632FDAF72744F01BCE93948F67EB0C10F2532DA2A37F27AF7F5AD41373295 F2A7D00F6EE44C349BFD5427B77CDFD2DE76C326CC3F9F365972C1924D601381 0F46E6E4D35156E759ABA51C7F0B16B786C459E90B574AD31B48FAF68539002F FAB4F9727CC75E9E87466778C0BFFE8CC8BCED16EE23C2288E578A779D3C5D8E DF45FAB9339EC2387733FC55E6FA695B78D669FD17DD6E3D6DC0294501E1408B 9F467074FE0AA85ACBDB5B2CB239F05CFB1732201891F7FD12A921F90195D79A 08764C8DD89D6094A0229DA9FF70967A09302F0ABD9CB49807566DED1698F9B6 0565A2659CBC78E0C8E4826D711A53B0BF7F829D8200403701D648A7E128D6E8 BE3613C4D17FD174991A02B94B98DA012EFEB22F76296BE95E5CA9AEFBF8E0DD 06B889FE798B2A7B7FA6EEA2FB61F7DC45412735C8A9673306BB44DE07F74647 CFBDC1AAEBA796F9877944E05B65473AF14E6EF6A64E4692857312A9062DA5E6 0EAA8A70BCA7753F8342F24C700E4636E9675A85F779FE9C92A50486C101A511 EEE42B261E2B8E8B19D6DD6AE09E0D1ED48D94513722ACEA1D82DD4E1A754879 924573D22879C38C5B92B2EB09782DED313CEEFD47CDD882C6562013DA2B0C6B 8CBE9D21DF11788FA39757F96E0C61580E9E270578EBE29F93C1F1AA1A298C2E 72D945213503E048319ACCDC4C8E4EB40A0B1833C346E82B890DE5627423B2A1 7A758252BAB2518CFB5A2624DD6473B38FDBBDA23A515FD99F00801855CA0950 AB48BE3E9D15B958ABD5E877F30F29815A04AEC483378C7F9B24057C87ECC200 22B606626B78BFE509AF559F691BC348485EA24338925E11D2BCEC94950AF502 544B77D85452629847A233B8EFCC24496FD0C616F5F4A3D6026CA43DF28BE2A2 B9E0BD6AF46FA49D79EA2522AD174135922FC4047596C96D82F616D03CEDF131 6054424B3D422841F58B0A19EB7B7C25E16C03989B64D65186F4B1AFF596EBE2 9DD6A079E392C0DF5E936227EF111F7B17EF45FEEF7A712B7C18B7731AA5A1D6 EAAD1BFB1621B4BF72FCDB02E300FBC4AC40329B516DA23A6817408237779064 7537072A5644FDBEA7DC24ACA1C13986600FDB976E412E3D1C6A2681E72882E1 098C4FFD40A764E335095C15783EBBCDEF9662BB83224449B1EFF0E13C1B7813 73904F368C2665185CAE812D89D2F94A3512D19E37310493137E53F1B144B149 429E862F814ADD6547C99AA0A639DF06B93750807AECD489BEC9D2DBB8D9E0BB B42E7507C0898658A00BD549F92A69889CD824FF281B65FF31064C02C9C801C3 35A32E779E6EA99F8B5FD908CCDC4D22D60DFC9277DB10792F042A50E401EF62 ECD9D0AA2CB663D844EBF373A76CDBF6BD3019A7275136BBA6C2B4045833495B C07404E0B7E042BF6091C773791410111890CD4074ECFC21BD26B2B2D5D7FFDD 130A0CB4E5ECB4B647F39B994BA32401A4106DA9B2D747E433E708E008DA6137 1F667406125F3066B8FA85755CEF0F192B4A46CCF9DDB7315DA5D1E7800A44F3 8E8393A1400C70753784982A079BBB884ED87A129644F7038E0622543DB3A4E5 9953F9D3B24720FF7A1B4D20D131CB704277BD1207C62067FA5DE213F715D202 519B1DD3ED1D1B8950ED56EB65BE579C3375BC0C9F955FE81CD858E9ACBC445C 21CF95CB24AF72A9561B29E64E8C301CF6127660E221C6DDB0961C4F35DE37B5 11EE03413F2CE8F2A820CB4EFC12ECE1853989E85C321B845236F1E6654FA701 566A3E20FD042C1767E0F769C3C46DE308A6E9DC37D25ABC51CD22D305BBBA8A 2640118FF101B7B5C90FDFDAC908937746CF384BBCF1191273EFB6C72B977ACA 03135498CE70C3708AC36D086081D89A60CF8328C4588FBD9B3532D0E17FF427 37BCE61E0502730BCE1CC4CB5C0BA2720B58D819A6B89BA1F911AA8447F6BB37 35C8898D36A5A31C17CC5D495C06D958B967688D815D23C1BD361AA5DF486640 E48E1DEC79F64E8C9CA7BC6F2BEDB0C877AE329666D367E1AEFE88E9C07C9F30 E507C82588612FD8B7A17E901E2D1CCAC028A783CBAD820990E4514EB18F2CED E41A8C8BE09EEBF97E1C78111C093B2F80F3EF07819952490C6FBEC2B53D2438 140D63A080DC1E4629DC306415F46DE871B580817C32048B3B2B07CF40870614 3AFE6A24A24CE8E39451E89D45321139E83AD74ACB8109807C2981C8F6832DED 77D80B5A49007D99D490CA1F6877A8925184AEE6770E1E555C570C68987EB182 43AC279F10206A3583511E491592D8AB3514E9CD5FE1EF50E12F7BCD2A96826C 7C0DADF80AB1D4F2055C209A13D0B931AE23CE0ED7300089871C9C16288589B0 EDCB0241E36299F60ED8563138C1760D82139277EC10D5FD628135CD7F617D78 CF708972C651CB44765FBFACC89FE068AB08F9984346B187996CD0D7CF76E419 3E0698BA2A11A06FC7E66116F1317406FF859816C4C5914C889ACF6EB850A3A7 67342238582319B2833EF00EC569C2C69C9768958619DB791C014AD8BB0D2DAD 276081F1390333437D050C8A714C9B33831B1556CA7214D36ED5D20A5306E0D0 F7C382ECF574443D064B93C5F68831728E2E573C2871C2B302EAB1BAD4AC2042 295097B5EBE9EC05CDF422B885585EE10CB299F856CA38AD598B07D9B9CB7191 1A1D7C377155B7B1DFC8527DB2628D54F45C3A4360D1F3E80DF84CE3CE55B318 5CDA21B2E024982B0324A9051BA90EF4D5FE11AA0DD31571CFDB0EB84C424D6B C5FAD4B9777C3C3B403C9B291FC8C9CD36FFA98B7D4453FD6FC5A87455F23A09 EAD97B0D6D134324FB64E5D7D91E4B8C2E9C33E883419DDDBCED42D105EA0169 FBBAFBC947409215F63A03E09F78873E7BA6478A73C2E0CE27756FFC7C38C7A6 6A3B0B09C2F9BF9F6C111F9497EA1BAB03B1A6A52A28C6E7811F01BC33D75BE8 600448A5650F7F074F19805AAF6BAFF695C8FC4854E570412CCFF8DF3B5B0441 309A77DE937D6474BB2E2787C65B7BE0C7743D3FD7EACD5BFD3775CA6F65B432 61362C134969F420EF517DAA5307D45E46C91748852F0483FF1C773B3D5B84CA B2C93C2574233270A9EE53BCEE9E42F34BF74E6C81B92185CD29F642E13AF49D 25064FE83567231E0896E170237AE22175710D9EC17C63904998B015B0157F36 857AAC7D2F0B68ABB938FFA756C0B149C4BB017B0282124373FC71B5B3BBDCC9 DF7CEE1514825527B9F2A6443F3FEAA60FEC6E9B5CC4E3EB20B9891B0484903C 69896BF321F0601C835927ED9BE71A42FE97E90A708BA581E75DBD0E05DC2955 D9D027D50DF7E3F8A6F08349A2464E8A2E33211CDD609DED0A506DA7B6BF5605 5C654447843516349528F410A5C52FA9CA93AAAAF6226F1525CCD5DDDA4571C0 A627EDC950368A6D401781239EAF55B05546CF60F5DE558423B70EBD63B2BA00 14F4EE0391F3BEEA9CBC3131EFDFEB9F3D1DC7C0C8CF74B6DD58A3412624B8DE 0E88DCCFF5B1CCBB20A6B3AF22C8F5C765D3534B365856E65BCE76C5E36C4290 D75203EBBA0F85A74DB3885B3B8B87BB9B2B27751B35FFDAC911D069B976E08E 5F316B0BA39E7148AF0199B9586E6BE5F1EE45464D8866BCC8CE317CD7E1C231 BA1E2421EC091AAD6911EEBD1EF4F99D00E2F46AE5DC9EC9F45C6B35DE1A3686 52BE01D489287F3098EB89191C835EB711EBED407BA52B81A7F37F9E3D0E826F D21987D8AB62D248C891288808BE3F1D4A98E236B7670383939D11043D57831F 1D85DAC9074D04FCBA90EDCF279FD49DCCC1C95B6BE928211B3FE9404561B91D 80762F7CD73906CEF66E11438F533BBD4F51061481751E9EAC5552CC4C3CED99 5DDA61E40452241E3F8FEF8EA0AEB9C2645EF3E4A9D8B231A92E8F9E0D7F51EF FBB12F7647B9DFDEF261D77826941E3F49451CCB8E27DCD0C09EF6F6F741F458 590696B03E64C7CADF3BCBC04F5EE6DCC73FE140DA0E81789F19013476D5A79B E8D8721861518D0F7BEF4AB6019EE60075FAFDCBEFBB36D3609A6C72D4D50132 89E0BE35454D4699F0C400C08F95AAD742C715EFF87C54D0614853638DBAD5F4 F331C8CF7AE0CF7242CAF5F10D8AAE1FAFAE0B2ED24BDF251863E7B826BC3C62 4A70FBEA888180BBB5C4033B029A6A76424BE8AFFEA6AB6FC6D29EF512743C3B 7BA33251CD4566A9BF3A21A711A67F4F2916193EC59F730B400466CA7692DE51 B3C781930A94E6DD59D3411D4FCB6E8AD771B06B6FA692E9E3B5FA86F8F76D84 D59ADC91DD5F730EB7E5AAAE6AC801061FCA38EEDC97958212493790D742EBC1 A386F7A9B0E83E9A2820B11ECEB882B060E1FAC01F9F60F74CBCE9F2400A28EE C02F44016135177A055488593C443B7B2431FBCB234FAF8E90A48B49532D257F E3934C2B78E56FB75BE9E9CC3B4AF8D858C6CAFF5449824D51C8C2E31CBBC2FD DC895E9FBDC41D405CA339EAD46067ED3B5E232C261BF9F3AB8BE353D8000CC6 5A63CC1BC0117ACA98E72CD48E393649F5AEB8EB226DCE2554881BAD5E1DA3D7 FFFCE852D34A2847B3E27268B120EBA3394FA4A124252E3A890A69DF8FDC4D47 5777D686BD892C2200E18E6978E58B8666FE80AEE3E809FAF2F8417B7D8F2F89 35CE45EC00EA9EACC306FA58E4FAEF74BC20826E74EA582C11C48C28201471ED C020470BF980A220B54D2986A9EEF558075DA23673175C1A9345562B04BB9ACB 7661F7754D93B5A080AFC0B8F149DD41DB0183EC0FCC4A7B9C01EB92595C19AA F88C3565865C8680F07D7DB8712DEB93B2F985478E8F50134DD814CF6EB2EE29 2B242958E6947480F52DB9B01EFDA3D68037BF6415100F332BB3A8F3939D9B5D AEBAACC6E70D6D6D05B0F5952A8CBB745BBB2FABCF0C13028C5FAF1269C956F5 8194072214A5F57445B138372AF56FA11E4AAB01B35C15E97EF8D000A6F33370 32647E376D27F411DEADE11B965CC92F507A7BD0ADF171C48E5814669A8CEDE0 010B33F4CD8C45B35F7664A77770B65A980DE3E9B7D9205891AF6F9603AF5541 2599A38FDD50E9EB8CE6B656338FF949A1353E10FC70E5E2D90051283F199842 FAB2B087F00FD4302CE5DDD833885E7E7607F9F35967D4A6F0BD364CC3ED66CE CFD950FBADAF9C73F3313A3B8B53C8E33073F26B24F196B53FA1F4D2F719F16B 54B715A92CA3E7E6F74B52241E5DFFAFEEB9B26B01CD528C5D2C4445D73972A4 03C549E96A6B81DBB43CA79CF9D13BFCEB2F7731CB5E3AAFD903496B2908E860 63648E2AA9DD3A7C8D05140CCC1632427811E6F4B2773F2BB5F373DCCC2245A0 067AD0641C50F121ADD6003EB22E7959D29E912EF883D687557792B9F92C9483 90F72AD8006BFCA2E09406339985F741A91AFFE9B6C10B4EE0E1F908E69DE5F2 51097BFA8783D644D9E3AA2C61DECBAF26317A1D6A60EA1831610E08866F8A68 653D6E1134DEE4B7DDB9FC5F593365AC6ACCE9BC215D20D76BEBA8CBFBD2E8D3 7E154E38C7897575F79B237773B3A478746ACDCCF9401DB72BDA35177C07439E C0097814D5BF173D445A814D8A20F6BA7249D0EA4A3A51F760969C17777B6FA8 FBFC6F2379888F55763741DFCE8D8239C15FB19E6AD791831FC0130A117F0840 F3C13A07ACEB928FB49C398CB293E1612437D06FC0B4E384AC359D921A13C6D8 91339D4975220846F66EC6339901D06E7684256B4E4E45A7DC18ACBE19A8CDF1 DF7DF45DDD27550C5AD977FD67AD9C5A9D2B26CC1EF923B99719F0ED74F336D0 7A1FD8D4DA6D1B808BA6E2968FB07FDA8B89B207807C3CFEFE2E64BAF0942672 B9961D3A0FFB199AD3C4AC319B193CB5AD81B96EB0682B3D3D6BD2F28E08D609 A11E0EADBEF5E2212D9E82DAF6F2D7D6112F4DC9FD50A99CB86E4226E0E32D0C DF4C5AE888175CD551DE1B2A68697D1A73D6392D22868DFA3624382F19949113 C1871FCEE51DBACD448B7541 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont %%BeginFont: CMTI10 %!PS-AdobeFont-1.1: CMTI10 1.00B %%CreationDate: 1992 Feb 19 19:56:16 % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. 11 dict begin /FontInfo 7 dict dup begin /version (1.00B) readonly def /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def /FullName (CMTI10) readonly def /FamilyName (Computer Modern) readonly def /Weight (Medium) readonly def /ItalicAngle -14.04 def /isFixedPitch false def end readonly def /FontName /CMTI10 def /PaintType 0 def /FontType 1 def /FontMatrix [0.001 0 0 0.001 0 0] readonly def /Encoding 256 array 0 1 255 {1 index exch /.notdef put} for dup 11 /ff put dup 12 /fi put dup 46 /period put dup 65 /A put dup 66 /B put dup 75 /K put dup 78 /N put dup 83 /S put dup 84 /T put dup 86 /V put dup 97 /a put dup 98 /b put dup 99 /c put dup 100 /d put dup 101 /e put dup 102 /f put dup 103 /g put dup 104 /h put dup 105 /i put dup 107 /k put dup 108 /l put dup 109 /m put dup 110 /n put dup 111 /o put dup 112 /p put dup 113 /q put dup 114 /r put dup 115 /s put dup 116 /t put dup 117 /u put dup 118 /v put dup 119 /w put dup 121 /y put readonly def /FontBBox{-163 -250 1146 969}readonly def currentdict end currentfile eexec D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE 3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B 532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470 B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B 986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958 9E3948FFB0B4E70F212EC976D65099D84E0D37A7A771C3101D6AD26A0513378F 21EC3643079EECE0C9AB54B4772E5DCA82D0D4ACC7F42FB493AA04A3BF4A1BD6 06ECE186315DBE9CFDCB1A0303E8D3E83027CD3AFA8F0BD466A8E8CA0E7164CF 55B332FAD43482748DD4A1CB3F40CB1F5E67192B8216A0D8FE30F9F05BF016F5 B5CC130A4B0796EE065495422FBA55BEE9BFD99D04464D987AC4D237C208FA86 0B112E55CE7B3782A34BC22E3DE31755D9AFF19E490C8E43B85E17ECE87FA8B9 1485831624D24F37C39BF9972D74E6EC4784727AC00B9C4A3AD3DA1C22BD6961 7E0ADAF55422F22ACA5E4DCD4DF9FCD187A566B7FB661D0530454D0DD6C6C50A 7A3875C6CBF8EC7769F32A1F3F7FC1C072BADEC97794D4E90E0035282A170402 356E5A9CD9ABD80AC4342A5283E458A7269252F4541CBB6452B39ED54D336D0B 19928E9CD1AB26AD83EB209E2EC75011A2643813053B5DBB0246097C4821B5F2 C92554E9140BE35B2DBFCD98809A8EC9FC910FDE9E0D86457C70ACB056EBF90F 244DC0A5BBD455E15D6E3180311D52CF50B0BF7D0A7F64F3A1821E0AEDBC2E7B AEB549FE1D51088C153799C6E089B5D5D65E1C4E2D2B430CDF1FFA23CCB25D95 5C4DD885310A706B320AB25C8D742C6F29953254FA54DAAEE60ED477877D19BC D28E9AB576B0EA088171FD000B60D73B3C57F754BC07EBC9BF751B7D2B32459D 993861B7C4B0D98C422A11BECEF76F4EFC0ECAEE89723E6CED53E3678D733363 2DF068AEF0FE7DFB57393BDAA439A6A4C396F86032A98009EAE1247B7DE83B3B E46DF2898598FF5E6CA6953127432A967E4FD41CDD60D6E413059A58FA556EF3 309178B57C16A763CFC9BEEC276944BDEA255789EF4E1ECDE1EA43EEDB955513 F42EDDCF39AE522A1DC2D80B2772B05DA60F3DC15A815A6BAFEDC399C7956E75 3851CB3588E22936FBFB63A58300298B11C45D82385C083D07AF133BB1BC941A FDD9F34D5E0B8087EF2A58C54D8AB7580EE3ED58AEB83B72CB9028F472ADBF11 05A77651F118824F6CD00209EFB60C1D32D46DF39770905D31D051FF2ACECBD0 08911D3CC25B783103E4A26EFDD866414ED5F0DD28A4BBECD38DAFA3F6719584 41085A247E4D927532D5F8146333FAF9EFA9194E1AD92E49F360A9D82DAF600B 2F9977F75FDD809C155CFD9540F40E3918B5F87E4A80DC5FF5BE96991A2CC872 3C6BF8604EF84B2A8DFAFA25AD0E5D539A57ED77E59C2A1D11BE79DBE7774828 7874E7DB593866FB52EB9EF208B1E46AA05790245AC31BA19170D6CAC0596C79 C53BAF12DA95057954A4CA2319941929B5B0DCD8BD916ED3ECFB3CBF210AB41F 0E6F18A7994C298F99A28185DC59D34B30B3F964F504FC35C20806F12B425126 B4722C19615244AA4B08E915F7A9C4AEC31AADE9498503E993364793C1D7DE0B 325A7DBBD9E325E70E653A9F181C45E79F3509C1CA0CA19AB164105F3875815B 2E3F5C87377FDE2AFDE7E820E52379EAE58FDD8D7F28C8562E8ED87B6AB1C375 E10DFFC15780813F9B35DD1D916D9F551166C92B01A95155583C3908B65BFA09 F64AFAE8CC652641B20B15C3131328E431B6BBEC604A4F7470E985BD683BC75B C0F3326DA46244BA9C89B176CD5B6BA9E7603CC32AFCFE479CB697A12A52AC0B 8017DAEE539F4EDCE074C2FC47E43A6A87A60684BA92EFE082DBAD7ACD0402C4 D020FC32F87DD34D0F5C14AE928C2CA650C1A5983E1ABFC7CE036922ABC2BCC5 01B3C7EB96153BCDCC14E7072A1E007866D860621077D10751C84808B54D9CA0 FF33C04113E1A4175538E3CD2685DAEB53A7D5B74DA241547097C671C3E9BA58 D36CED8496A8D095BE743C87283127834AB8C7957FF0A1DAE0EEC8949C19A8E8 3283963D271BF4C6461E2242D761CECF9C2D24402BEB4F5027BCFD9E336C31B8 F4795FAE0AE595830BEFF7AA97412066955CCED10D8F259A4E75754111A30E92 453681F1EB65E3FF3589F6745C7D7893804A1B5447EC4978341F87C335BC6987 E65D57D3BB3F0B004E803E4E1ADF0B000E883FE8A9AB918275F749232C76FD4D D4E527C83BA50670B04FE483B262C3839DCA0DFE04F36AB1CE115574D1C66AFC E2E0CDA9773E7820700379E5766560A4149F9FEB20C57AA64D34A7302326C32D 803C45301D23CEBB7DF9451ED3317ECC37248DCB39FB52EE0C2348ECC2F9F0C5 DE62B615BFCF3C36A27E62D601A9200F207E86F41AFFA85999787B1B959994EA BE3633A6C2144CD761BF8D2984BF1EB2D8F17FE2C7C7E6111BF0C5D959BE7BE2 3AD3C1C44E5C606440999C8E79F91F0DB8A049F8355FED9115FFED361A4EBA3D 297A07DFEB6EFD9FB2C162D09FB8E5436DAB72473E032DD086195876AB356B3F 908C817F7139AE492C88F5E337C458376D3D4246E84D9106ED3973ED7F47A080 F40AB0772C96E7E2FD8FF5DCCF2132E55878F150D293D8FBA66322488BE05669 6B847AC876A97A73234E521D8DF4E22B19D8FB7236A477BC7FE09A8F578ED5AC D9F329E9D5160B9B26DDCC07427CA67BE5A2ABC847CA8FF73A831D261E17FB6F E8A0C34DF853DCB9DEA14ACE4449B8E96ADE644A8834687FB09B6236350F12E6 CD6B66FF3C8B2EFED5678BF95DBDB699A70A5F3D86DA4CE101534610D8E2349F 96A7E9D84285BA65AB67EFC62F0950454FB92CE41ACBF2DBB89DA3C48BA8A197 A3D3614F884447F9A06BB1FF956A4317C1768A8E187D807D4EB0227A76ED6555 3A0610B56D7DEB3DA717C0684B3D2F663AD055342D77B97251B184D929C8D833 D24E55DC9BCCC043F35CDA436254A7767D14B15E3A43C2EE1CFE460D48D9EB7C A66577E3A908C936992A221A8EDB8C5DEC58B180AB8CAC207DC52BE58644CB70 7778A637091696C6347E9231157D901CE0633B9880ED1D123F30676F2569E0FC 8203F834CAE487998C59AF77FAE33AF46192933AC215292C3011604E2EBCCD64 2D90F62AB6150BC280028840FB3DE62994E8BE9010A852012F3E733674A7DEE4 E78D0960E7F4B110171EB286FC118D25513E0C3A6A7D301DA3960294800C51AF 68BD1960CD36C6FC054838239CA1ADD0B14BA282A00EEA9373FBB666CABB449A 33263300FCA80F607D1F0B3670299E6B9D45B42FE9AF6002EE3F7C2485BA78AB 92C5A3A2E1C1B37ABA1421A9DC65938FC5087F385A26AC2C7373787F5C014379 A3C6711DE13B9269AF1390CC5CC179038A12607340408385B70B35BE88137ED1 2297B56DD25131BC6EE9B38DE547AAD23BB2062A631F677B9E618AF86615022A BE0F345752CB6F6D1214CA3803CBADBE9E2C375EAB8BF83814C3F8E8A2DCB986 EA39E25C487AAA3C6A2417E57C42E525485512AC46D55245039EADF2490CA63B DFD06730EFB31D944DE30231237C79BE8E0541590AEA1AAA0C93AFB7EB69564C E69CFC51D5285A1543CE611F373DB976E985940D852FC86D98EE17EE9C475BBB 30B0FF1CABAC3F933C51203038C83EB4E4940271C99CC7C96B25E809B69B8AF4 C31E863611B22E20A84E0EF299C2607E69ADDF1655F010F17AA026315DF479F4 9B03AF7811E91DA6875BE474E4845B3457EA59E03FC6703559649487B1136605 53225CE516C5FC209D06AAE622A9B3DB4CD6E4707EBBB11516F5710DA14C3695 D5F744CA844CBC26E1D1DF16DC3D5E0D13300FFD487AABB3BA022DE6A71FD88F 4382E29ED909B087DDB003EE3355AC5293DE84FA17BA829398E26F0C95874FDB C9586C4E1FA8AFB5DF1DD66954A95057A8AC0D5D7EEC2656F07FAEE2F2234BC1 E88E8DEB370FE6777B393CCF968EDFD83322AC2ACDC3699E9DFD1701C395AD60 E157D3C78A9D8F9F7A1DF39A84B5681CCB260F1BAA3AA557361349A282F7BA90 BF07D28DC57B4DBCE83EA818E05C733665D8AABA9857E129E86A3395FD3D44A4 1BB71204C591DD15F49BD7A0F74965E0F0E8448A9254BD0FFD74DD0836FC8C2A 5D1D090855C6363F5D2F6A3A0DD253C25E4221456E4A21E006C81915C1F5F554 E844008698EA1D617CEEE900CBC1937BCEB8BEA21DAFE1F4E125C168F4E642F1 8E29C27F328B522FCF5DDC1D08B7F683F577EBA553844AF8366065E91CAE71A6 931842AFDB81DFB1029B432B49E216052BDFFDE9E2AC90F322F3DA35EFE1250B F91C3A5CB8849F402781DA303DDAEDE71B4E446178679F2203104F2F9FB54F42 D8BB4F3DA65FEA7DB0D7B26CCCED07CF122CEE56C6F1C9563C097403758BD0BD 133908CF0CD451232D0FED51764C49F438A627F74B8337816F9CDD43A0EECF28 D4C23B3942E41525022D941E02B4F53A23ED5CB421FDFE5E45CBD495972C90A7 16AC968788FC1537EA61C5BA8D9DF4F7B4F2296ABFFBD08CECF5CD086AD3A286 E546137401E386102B865A5E267E432586DEAAC743DF7D2421FA216570578946 A939798A8A1A97EF77593499CFE902E94F3A4E9AB8674075D1FE4AD4F5EDA011 9FF28C4E4C7F0F99DCA553EB8332B1EE620748ED42F3EA6F8847444752C08D34 0862A389790E528D078CC7FDF64FAE5200907F09D117B6426472751D44771264 CC335175AE7B105CF9FBACD2DC1848651B8460E2ED53CC2DF4FD2383718E37FC 68609FA8913BD7BCB3B8A24BFB1A40ADFC58D79CEF1D42D04406DDC1ABDE18FC 2C846B0722E3D0B4DB0D8C0B8AE2F614FB0EE4BDF0F3B9E537BE7359EADED26C 04EBB29E160BE6681220141DA070566832CB35267BF2D3CBB547FCC78A23D537 9FBC1C71ED136304152C82CF993B4951EAF2E88DF24B12A2A6C64185058F62E6 8A59E6794798FEA21EA1CD23C1B6D34C66012AA9B3E1392F6D358209769A93F9 E80713E39E4EC01790751EE76675978881E31D8468F520364A9B7A9D1C27F0B3 1D90A9B2A7494BDD401E3580C22D3CBD4FA55FD4344CB8CB510BE854D6A19902 2487E3C74C82A2268BE2CBDE20551209260DDB0BA4C44701AB8B62BDAE85BABA 12802AB56C8C1964F87482AD013281C7E07587FD14E454918B55835F828051A4 313F004C0740BB17DC39254C6325108FFFB02AC0849DBBCA11FCD36239E0A28D F3597BB532A0DF99C70B7B4AB6E3132592075C516C9E7B9E1AF38D69DA86877A D38508F9F2A03A3F66129F1EBD81D3A17C4F74EDB680AB689243DCF6527A4F2A 691A3081AE674EC6C303FC241208C4C0803CCB5A35D48A462D0714AD89DD283A B97CF980DF408B9089BB87F937A26BA3115F34E4B1B0C037AFC81D8F856F8080 90D9455FF1387B6E7EB13A798023A751D4480193453F4BCDE3902FA7A9952A72 492B2770F596ECC45019F0F841BFA1978CEC50D9A7CF959CA700F627D2F76336 BCBAB44A174A176DC8156256362243101082776EE80FC507FA9320659D3B8D58 FD1B2E06F6349B33264463DD4C9B006EB28032545D7A4ABA6F5B77876F4C9781 F079611D28A4127B85AFB5722C19716F4D5DAE7EFD57C1F8404A50FBC0A3DE77 A6B3C9C1070B06853EE9721EF0EF898FCFB3B6AD9DD0F6D453D9561F14C3550E F0F2E74075A18960D333733011581F337FD54E5C76563491596F5E3AC045141A B2D81D527D45E82E12EF4C9FC2B30498F5D7335167BB24FBC67282BA0D26E527 D681C605720A3E2A267CA4BA8D00B8FC05A6100448B307C9E1D72B6F1BBB768F 3FFA69A888377CA84FA7FCEEA4F7AE524DB092C582EF3A79C3F51C1C423CAFCC 7D7BBBAB163DDDA283DF63E8EC27337B4E1A564C5126D5E51143F0D89519FB30 85266C0A73935C246CB94AF3A4FF0B6CB8A9000C36563BFDDC5EB9D4F8EE39C1 9F148237B21FD15FD7B4DA3F806C45DAB01C963F66660D406CB437D4519DDE63 F819A48DDD1EB810A4EA6597D2A64A5674CD29AC58A0D336E9EC8F34538FBE1B 136793D29A1F46B5438E5D34057D9BCC3C19BA6ACC1BA82B8457DAB99BB35489 9877F534AE617E83FF7A5A6F19928C5954B3A4C6F71B7AB48FAE1081A611722E F3E9E1E36F767823793D58FF19538C7BBEB123FC17850C3FF1CB69DB943680B2 FE5EAC0FB77EAD3A8B8B2ED258F52F2CB5AA295DE3E3072075FD02A4BEC519E4 A7BA7BD39FB82F90BE4915F7571314E89D6642D143AAD7E1648DD00AD80CD31B 714C8CFCCE0295307666C90902FC8B617E226A6F140A42D094DABC142924D64B 28ABE9B40E1622E81E9A68DC81F46B6E4FC9855D09F02E6737FE2F7F14FD2757 38668D96BDBF2AF66FA408041BA953CF6376045ECB30AAE1279C705A8DCF41D1 E955C2D6D22C588F6130B3E1C171246C494EA58221A1D252D95CC1F46D161194 6734D49B66726683A0A5EE9DF28D4E221262324ADABA7E9AAF07A10D1839E341 968AB8489847BC915A796D5B4A5787255EF928834958C02877A6C881BAC5E06C 21A3EC159FFC8CB398DCE0BCBA8FFB5372385E76DD3585AE726A8203F5CA21CD 0F8117323DD9F14A3589AB435248B221C28E39470E67DD13D9544080FA34BF6A C8CE1202CB520C0BD31F943EA2292E75962C4710D843B1C4FBBE5C005D56BA74 623AD94663812AF6646B8ABBE4C321A7937A11488FBC1011669E3388CA59AB59 3A9306738BB364984DDA7BEE16B9AF142D14DCE093B0152982E0573B07D897F1 06042C74818E49760152B41C986A5886170CD5E0CB920F4A07F6C3BE4CB24687 FC219CD35B50628D2FD20351762AE4CB5366052F8E10B5B3F6C99AD5B56A3B41 7D2232478A42A755E5054EA4FC579D16E11E268353E39220E8BB69DED90700A9 4339529D0377CFFA9DD168FCC595ADC1379ED4C89F58FA5EE949F882DA66AFCD 705EF2E02A458330237546C91F3D7C379BBE12C0ECD4215A7AD914E81422E685 C1F46CDB5942E9103249A2FE8F9CD70A0615682077D956C1B70811A0EE2B062B 64BC7FB6D4093605B69F24084585C176D5B7800BFA80E2E5BD0749388185FBEA 80EBE32527585A2E42A5DB641633AADE48D957D92E5289BF3123901ACFB88CF9 E03D55D5EE6B8632F95193C47FC604B9A8D15E21396D6013E953D69B5403CB47 53C95F9ACB34B9BF5AC5C477AD6DF49F2457764EA7AFBB926E6A7AD0E05FE9FE 824E0419D85E6061111E596E651E575B137E957AC1814EEE5F4527C7106B96BB C56F8A09DB77CFA64394FA51A34E302954990D34079688A84C7FD0C40C239299 2822944A3EB42F8B22A17BF5560E9E53CF5CF33A1E5EDE86715E2D17EEBBABD7 8E4B23E9BD3CD744BDCC2AD442229E46FF4C7145BBB2AA1B2FD063100182604A EF291A5D15A33E1ED4ABA8D96E2A006C1BE0D95664F47BD35675EE856459BF85 C71402A2442E543421FE78473ED8D6F189D5A5B1CC8FE2F40470EB8D691A9717 B1EB6C870DA54F742B66A028F3E4D630355E100B3B820E1A58A628C0F5F45A26 B711EB9431BA9A6AFBA025D5D0DD817DA5267F26E000A8B8FB511448F7BA02E5 801F1483CB768E2FC1D44619C0A475F269E8F05B158F87E6D7CE94A3C2A7C365 D4B94E3823206993A4BB00277BCE0EFD3635C4C6584A0509F3E05AFCD108AC79 4B1725866AA58D83FA5D1647318EED2BB0C561E8FAC6EB9783D60D86CA545060 A58954AE0ACB143A45938FD632C6DD5FFB95798466D3B7EDB574312925A2AA37 C79AF1121338A7C9F28ABF81CC7AC2E511FA5142F203C9882F85830F02836A59 3CC09B05A1DF0846C711A4D7304E86418B97FD41336B1AABB7C77B3173B2223A 9CC00E36BFF2DB491D389B74A1832E921BB18E83E9878CD6D8B7C820FC29705E 9D1F3E26C4BBBBA1E0C04616702C43F64C84DB8B8090E0D4D71C5B432A8FEFB2 E7410D5048106C33C5F4CE61985004A5F5AACD004DDFC3F091218A6B02DF444A 0F7F11B9359B9DAE6BDFFDCF33CA007B77C761E88DB424FC80309FA982BEB762 CC9D1EF572188296C5034F59A2F5A368C20EA6048F3F01DEDE8EA1C114E2BFCD 9E084130FD3EF4B957BAB3E74172E1DDBE261AD09D5D47571DD88B5EB6F2015E 66CFE153BD1AB13F99C0D8967054146641AA1BA9D7AB94BCB35B388E5E6F2DE3 5A68303F8210969959845A5801C1D36F4FB46A85D7DCF7D546342110DA26E5D7 D3C2E7BB03A1E0482B4198CD7CEA84B0631497740BE0404B384E5734450E1899 CFBCB08048088C139027C0DD4DE6B90D52DD7D35BF9C7B632F89C2DD330E4ECD 8A6265F89E6EC8F8DFFFD29A493BD1001D77B20366146161207C3143637F178F D03366A5B49DA9CC2462B7F4937CF48A67929390125BA6691FF1F6EEBEC7B0D1 8132B3EEDC554333127AED1628A7A7D9DE96B58295057ECEB2B1805EE3FB8477 8B6FFD7BB7964AEED521FF0F4D8CF72F7A5FDFD0330F23D2B1154643D719A578 27C7048C0BA8F75012F7C2B2CB6336BCC2739B3B44AB75ABB99822490FB55808 01711DC5508D2C1D3AD12DC77F7B7524D6A664E464066C77B479F3ADD63F8415 1BCB12F2F7F386DDF54E53CC546980BFC011910A07C064F242CBD82858213F67 32D7926DD11B83A541CD30725C0D475560004F1439A068B3D28993F7EC96F2A2 E29D2D3544C50EEEDCBAFC0BF559E4AF20640D401783C137229B47FBD70DF701 17485497FCE140A5F07EE4DD26AA443B0E8DC5C004A71E0F92E154BB7BC8DD81 501705EBA6EE003A5234A0CEE052C7BCB111757777918ABBDD4DCE423E56B150 E205834D4F3D3CBA62319822C5F57363535A08798CE6928CE8D1D1F7C64260A3 39B128BEFB3B15F60500497D8A4AF80ECC46D8FD2D3A164968869EDC6F3D3EF9 0C8F78742E32CC9073395A99AF5BFDBAB982DC2681C022C9FB0C24F118D02811 7BD9362B6512CB1235D6875FAE25E223B22C43405D841C98B14043AA728A07AA 262E3C3AA1250E33A6D7FE31212DE62A2535CB44CD6F6360BBCBDF44AE19F76A FA9602E33AE65E9C0CB5EE6F30A36CA93D5864B2CB5F62A18A30D4977A1FE194 FBA194F857823915786D5ABFAE6A9D4790156DA2874A916765EE9F661FF4B1D9 859861092DF90ED245D85DB00414DEDC65068CB9AC0469D7B2FE2FA7A971B0BC 4C8E063E553EC4921C64A692F117E3A5803D4ABB4056A32C3C17DF038DD1FB12 26EA632BF0443464E5660DCA9C0828B8562A6039215B77BF98E396DCA1C1D0B4 FAE22FBE903157A7B4AF6A6B67B2787ABA0FBA34202D96964AE781CCED3BA049 9CFF65AD3589AFDED381E5C99EADFE2CC52B408B9A57FCCD191401A9B54C2D53 5A6435C5C257359650A64DA9F21F3390973AC10F0335A816605C4014E4DBA23F 7A7C6145333898F05FA34E2E9FF7B6D0CBDA26C74AA2A5B666E60BCF524290B5 378AB5A9699FB43F53D1101565EC2571ACC36AA0E9E54A39A2A3CDF4A7C8BE21 27EB4F19C0B620ED8E7EB79B4EB0BA23E1A587F7B1455561935E10FF8C8A111F 60BA6C3DAB9B6EC8C3A4A2806A7946B0341DECB8C21CBD04EE4215EE4B1850CE 39EC46728F8F4CBF91F7D68BED2946C8D1792D8C140FF03A73374820C085C0C1 85BAB984F62A388BE2DE2811753CAD7CF26ED6B318CC9BE4579C3AFEDB966717 9F8E6CC197C780B151542D65823C76D205F735A54D3D1117452BC60F1E9C5BE4 9712159E530ADA301346A9A308722CA7721AB94C9C543F6ABD115CCF85F651DE 8B9418D3F99F78E693470A64C27253B9C63057C8B69C060615B7C5F353EEEC2F 6075A28B922CF19CBA502180BFA07D003018A44FAECB2E79C8A1DA43672C940A F3BA87D06C2A4DF410DB663ABA88FE7DA5051D4F7AA4DE2EF681439E016D324A F8FA497D1ED0512AE75AED0CBD48084DB8790802E5D81B4A2FCA238DFFDD2ECA 81DD86B2F90594FE99CC322E72B1F822FAA34386743C1D0A3FECC8960050A9C7 0D62812F9AD9E69640E2B0D9AD04DB4688094F90E739BC5E1C569280F63FE222 485CE997EFE90140E0DB8CFB37B837011703C4E1DEABEBAF2E39E6548E224ABD E03CA3252BFF4A9D4938130CCE94A7CC925D0B5012B13C8D21C308BA50E91359 B4A2E192AAB42D79F9DC1BB7317D9E7B687A8DB103CC89683B0919DC082E4C5A B15964C8C57A3EBFEE0A4293351EBCB92EC0D2E3AF33038678BBC28D37409CAC E3F0EC4AB6A4FD69FA9268E92AF1902CFB0F1DEC394FAD95F32B13EE1EE4B835 57708DA584493AAB6F243F2C9C1A0A5089BABFEB0D4CD0A0A0449F31739FA32A B7800A647DD5EA33D15E4857C625C806E2B8FC1233E42453EE7E0C80A5BD6577 75E1F1E722655F2A6A7BDD5FA99BF5CCA581F8B31A1BAD2F913D3B5BEC241C05 81DDB3C5D64929E6966E21001527A3D088170F47F9462289AAFD50BA1FCF1EC3 46A81EF2618C4917042C6769DD5E43383F1D95D85446495FFF1CBEC727BD6EE4 C1BFB70DF1C33C09BCB7C1A25CE2E5B763C326A740BB607D675BBBAA84CC1B86 7155A18291B42A470AB5AB2F94F09CD6F8D41BAA98424EE5F9364AB6BC377DA3 33D126CD0753C65C802FD9769532EEB2A6A7C6F84CC26CD73C9F6B0F213342F6 50C967B8D36EC79212118B31B95FE48980C49C1C0ADB0DD07B187EFE3364F3E5 5D882E7BF3AA14013A28BCEE757DEF47C44DB5FB68E86DCA65369A1CF5FBB890 1B4D4C60152B6593FA725D8D1F9E8C1596207157F2EDC1B62BCDF630111AE843 44CC5E3E7D27E8FA9DAA7B85CF11A4F33110944C16C8654C0F72A12857F7F1F6 03FA3999746EDD9FE601A8C3E5D780ED8553ECAADC41C1063F1C6112778012D2 7BC7B74B9B73A7D5AC8CBEF4E0DC31628ABD5D40BC7FA1D3E0055B7230BA9ACA 48A2D3A117E7F687FF788AF4554A05035A444A9BE5EB7EDA8089BD06C635F73A ABBFC9C09D7B2BAE27F48FC81A1F9E97D43413DF05064BE2A0AF225E06E195B6 F8F1415BE63D0D2EEEA10C5F95E47F173DE78A6BF30A02D4C205B5313CF4B05B B154F42BC34FB226216B5F56DEF7B28C08722698E330C640B990C97280D6E1FE 4D2B5728034F22954F83A679AA788552A5B2283D552A7AE3D43B7BFED3A03509 2E13690BC2FCB6E9113E87A629650091A7C0B4BC94D27AAD09B08A166F2D64E2 E2A60272AAE0D4D681BF0669680062C28D79D3160B41BD656CFD03786D7485B4 8F86B10B5555F3C6A152FD7813E4ED2A6284100995097757EEC0B77AA554882D 3D0E4E3E15967420C7285DD8171E58335AE6F9F2035649A60CACB37078D37174 E6101B1529D3A96E8864DED0D98BDB19C42F146BB627106A272774ED6DBA63B7 01DB60A72BB79C316105C532A800C50C40531A74EFC0B06600D044CB4D3B4276 14FADBA34AAD7D647345E90A960581A87351E469723F9E12B248 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 cleartomark %%EndFont TeXDict begin 39139632 55387786 1000 600 600 (vi.dvi) @start /Fa 129[62 62 62 62 28[62 31[62 1[62 16[62 8[62 34[{}9 119.552 /CMTT12 rf /Fb 129[39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 1[39 39 39 39 39 1[39 39 39 39 39 39 39 39 39 39 1[39 39 39 39 39 39 39 39 39 39 1[39 39 1[39 2[39 8[39 39 39 39 1[39 39 1[39 39 3[39 39 39 33[{}74 74.7198 /CMTT9 rf /Fc 209[24 46[{}1 74.7198 /CMTI9 rf /Fd 133[34 41 41 55 41 43 30 30 30 41 43 38 43 64 21 41 23 21 43 38 23 34 43 34 43 38 3[21 1[21 47 58 58 79 1[58 55 43 57 60 52 60 58 70 48 1[39 28 58 60 50 52 59 55 54 58 60 36 1[60 1[21 21 38 38 38 38 38 38 38 38 38 38 38 21 26 21 1[38 30 30 1[60 64 38 64 1[21 19[43 43 45 11[{}82 74.7198 /CMR9 rf /Fe 162[28 1[28 91[{}2 99.6264 /CMB10 rf /Ff 214[35 35 40[{}2 90.9091 /CMSS10 rf /Fg 133[40 48 2[48 51 35 36 36 1[51 45 51 76 25 2[25 51 45 1[40 51 40 51 45 33[43 1[71 10[45 2[45 25 30 9[76 1[25 19[51 51 53 11[{}31 90.9091 /CMSL10 rf /Fh 129[52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 1[52 52 52 52 52 1[52 52 52 52 52 52 52 52 52 52 1[52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 7[52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 33[{}84 99.6264 /CMTT10 rf /Fi 129[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 2[48 48 48 48 48 48 48 48 48 48 48 48 48 1[48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 33[{}88 90.9091 /CMTT10 rf /Fj 209[43 46[{}1 119.552 /CMBXTI10 rf /Fk 133[60 71 71 1[71 75 52 53 55 1[75 67 75 112 37 71 1[37 75 67 41 61 75 60 1[65 37 2[37 1[37 82 102 102 139 102 103 94 75 100 101 92 101 105 128 81 105 69 50 105 106 85 88 103 97 96 102 105 64 1[105 1[37 37 67 67 67 67 67 67 67 67 67 67 67 37 45 37 1[67 52 52 37 105 112 67 112 1[41 33[{}79 119.552 /CMBX12 rf /Fl 133[72 85 85 1[85 90 63 64 66 1[90 81 90 134 45 85 1[45 90 81 49 74 90 72 90 78 10[122 1[112 90 120 2[121 126 153 97 2[60 1[127 101 106 124 117 1[122 7[81 81 81 81 81 81 81 81 81 81 81 2[45 44[{}50 143.462 /CMBX12 rf /Fm 240[45 1[91 13[{}2 90.9091 /CMSY10 rf /Fn 133[40 48 48 66 48 51 35 36 39 48 51 45 51 76 25 48 28 25 51 45 28 42 51 40 51 44 25 2[25 1[25 56 69 69 94 69 70 63 51 69 68 62 68 71 86 55 71 47 36 71 71 57 60 70 66 65 69 1[43 3[25 25 45 45 45 45 45 45 45 45 45 45 45 25 30 25 1[45 35 35 25 71 76 45 76 1[28 19[51 51 53 11[{}84 90.9091 /CMB10 rf /Fo 133[40 48 48 66 48 51 35 36 36 48 51 45 51 76 25 48 28 25 51 45 28 40 51 40 51 45 3[25 45 25 56 68 68 93 68 68 66 51 67 71 62 71 68 83 57 71 47 33 68 71 59 62 69 66 64 68 3[71 1[25 25 45 45 45 45 45 45 45 45 45 45 45 25 30 25 1[45 35 35 25 1[76 45 76 45 25 18[76 51 51 53 11[{}85 90.9091 /CMR10 rf /Fp 134[44 1[60 42 49 30 37 38 42 46 46 51 74 23 42 1[28 46 42 28 42 46 42 42 46 10[68 1[65 51 4[68 2[70 8[64 68 18[28 33[51 56 11[{}33 90.9091 /CMTI10 rf /Fq 135[102 2[108 2[79 3[108 1[54 2[54 2[59 88 1[86 1[94 10[146 3[144 4[184 7[127 21[97 47[{}15 172.154 /CMBX12 rf end %%EndProlog %%BeginSetup %%Feature: *Resolution 600dpi TeXDict begin %%PaperSize: A4 end %%EndSetup %%Page: 1 1 TeXDict begin 1 0 bop 890 1328 a Fq(Vi/Ex)64 b(Reference)j(Man)-5 b(ual)1699 1547 y Fp(Keith)33 b(Bostic)1414 1766 y Fo(Computer)c (Science)i(Division)744 1876 y(Departmen)m(t)h(of)e(Electrical)j (Engineering)d(and)g(Computer)g(Science)1286 1986 y(Univ)m(ersit)m(y)h (of)g(California,)g(Berk)m(eley)1431 2095 y(Berk)m(eley)-8 b(,)33 b(California)e(94720)1607 2314 y Fp(Sven)h(V)-7 b(er)i(do)g(olae)g(ge)1584 2533 y Fo(18)31 b(No)m(v)m(em)m(b)s(er)g (2007)1782 2972 y Fp(A)n(bstr)-5 b(act)150 3106 y Fo(This)25 b(do)s(cumen)m(t)h(is)f(the)h(reference)h(guide)f(for)f(the)h(4.4BSD)h (implemen)m(tations)h(of)e Fn(nex)p Fo(/)p Fn(n)m(vi)p Fo(,)h(whic)m(h)f(are)150 3216 y(implemen)m(tations)32 b(of)e(the)h(historic)g(Berk)m(eley)h Fn(ex)p Fo(/)p Fn(vi)g Fo(editors.)150 4682 y(Cop)m(yrigh)m(t)602 4679 y(c)577 4682 y Fm(\015)e Fo(1991,)j(1992,)f(1993,)g(1994)622 4792 y(The)e(Regen)m(ts)i(of)f(the)f(Univ)m(ersit)m(y)i(of)e (California.)42 b(All)31 b(Righ)m(ts)g(Reserv)m(ed.)150 4902 y(Cop)m(yrigh)m(t)602 4899 y(c)577 4902 y Fm(\015)f Fo(1991,)j(1992,)f(1993,)g(1994,)h(1995,)f(1996)622 5011 y(Keith)f(Bostic.)42 b(All)31 b(Righ)m(ts)g(Reserv)m(ed.)150 5121 y(Cop)m(yrigh)m(t)602 5118 y(c)577 5121 y Fm(\015)f Fo(2001)622 5230 y(Sv)m(en)h(V)-8 b(erdo)s(olaege.)43 b(All)31 b(Righ)m(ts)g(Reserv)m(ed.)p eop end %%Page: 2 2 TeXDict begin 2 1 bop 1579 408 a Fp(A)-5 b(cknow)5 b(le)-5 b(dgements)150 653 y Fo(Bruce)31 b(Englar)h(encouraged)g(the)f(early)h (dev)m(elopmen)m(t)h(of)e(the)h(historic)f Fn(ex)p Fo(/)p Fn(vi)i Fo(editor.)44 b(P)m(eter)32 b(Kessler)150 762 y(help)s(ed)21 b(bring)f(sanit)m(y)j(to)f(v)m(ersion)g(2's)g(command)g (la)m(y)m(out.)39 b(Bill)23 b(Jo)m(y)f(wrote)g(v)m(ersions)g(1)g(and)f (2.0)i(through)150 872 y(2.7,)39 b(and)c(created)i(the)f(framew)m(ork)g (that)g(users)f(see)h(in)g(the)g(presen)m(t)g(editor.)57 b(Mark)36 b(Horton)h(added)150 981 y(macros)c(and)e(other)i(features)f (and)g(made)g Fn(ex)p Fo(/)p Fn(vi)h Fo(w)m(ork)f(on)g(a)h(large)g(n)m (um)m(b)s(er)e(of)h(terminals)h(and)e(Unix)150 1091 y(systems.)150 1225 y Fn(Nvi)c Fo(is)g(originally)h(deriv)m(ed)f(from)g(soft)m(w)m (are)h(con)m(tributed)f(to)h(the)f(Univ)m(ersit)m(y)h(of)f(California,) h(Berk)m(eley)150 1335 y(b)m(y)i(Stev)m(e)i(Kirk)m(endall,)f(the)f (author)g(of)h(the)f Fn(vi)h Fo(clone)g Fn(elvis)p Fo(.)150 1469 y(IEEE)25 b(Standard)g(P)m(ortable)j(Op)s(erating)d(System)h(In)m (terface)h(for)f(Computer)f(En)m(vironmen)m(ts)h(\(POSIX\))150 1579 y(1003.2)33 b(st)m(yle)e(Regular)g(Expression)f(supp)s(ort)f(w)m (as)h(done)g(b)m(y)h(Henry)f(Sp)s(encer.)150 1714 y(The)f(curses)g (library)g(w)m(as)h(originally)h(done)f(b)m(y)f(Ken)g(Arnold.)40 b(Scrolling)31 b(and)e(rew)m(orking)g(for)h Fn(n)m(vi)g Fo(w)m(as)150 1823 y(done)g(b)m(y)g(Elan)h(Amir.)150 1958 y(George)h(Neville-Neil)i(added)c(the)h(Tcl)f(in)m(terpreter,)i (and)e(Sv)m(en)g(V)-8 b(erdo)s(olaege)33 b(added)d(the)h(P)m(erl)g(in)m (ter-)150 2067 y(preter.)150 2202 y(Rob)f(Ma)m(y)m(o\013)j(added)c (Cscop)s(e)h(supp)s(ort.)150 2336 y(The)40 b(Institute)h(of)f (Electrical)j(and)d(Electronics)i(Engineers)e(has)g(giv)m(en)i(us)e(p)s (ermission)f(to)i(reprin)m(t)150 2446 y(p)s(ortions)33 b(of)g(their)h(do)s(cumen)m(tation.)51 b(P)m(ortions)34 b(of)f(this)h(do)s(cumen)m(t)f(are)h(reprin)m(ted)f(and)g(repro)s (duced)150 2555 y(from)26 b(IEEE)g(Std)g(1003.2-1992,)32 b(IEEE)25 b(Standard)h(P)m(ortable)i(Op)s(erating)e(System)g(In)m (terface)i(for)e(Com-)150 2665 y(puter)h(En)m(vironmen)m(ts)i (\(POSIX\),)f(cop)m(yrigh)m(t)h(1992)h(b)m(y)e(the)h(Institute)f(of)h (Electrical)h(and)e(Electronics)150 2775 y(Engineers,)i(Inc.)150 2909 y(The)g(\014nancial)h(supp)s(ort)d(of)j(UUNET)f(Comm)m(unications) h(Services)g(is)f(gratefully)h(ac)m(kno)m(wledged.)p eop end %%Page: -1 3 TeXDict begin -1 2 bop 3725 -116 a Fo(i)150 299 y Fl(T)-13 b(able)53 b(of)h(Con)l(ten)l(ts)150 606 y Fk(1)135 b(Description)16 b Fj(.)k(.)g(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)61 b Fk(1)150 860 y(2)135 b(Additional)45 b(F)-11 b(eatures)46 b(in)f(Nex/Nvi)37 b Fj(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f (.)81 b Fk(1)150 1114 y(3)135 b(Startup)45 b(Information)40 b Fj(.)20 b(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)h(.)f(.)g(.)h(.)84 b Fk(3)150 1368 y(4)135 b(Reco)l(v)l(ery)22 b Fj(.)f(.)e(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.) g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h (.)f(.)h(.)f(.)g(.)67 b Fk(3)150 1622 y(5)135 b(Sizing)45 b(the)g(Screen)33 b Fj(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f (.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)78 b Fk(4)150 1877 y(6)135 b(Character)46 b(Displa)l(y)39 b Fj(.)19 b(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h (.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)83 b Fk(5)150 2131 y(7)135 b(Multiple)45 b(Screens)16 b Fj(.)k(.)g(.)f(.)g(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) f(.)61 b Fk(5)150 2385 y(8)135 b(T)-11 b(ags,)45 b(T)-11 b(ag)45 b(Stac)l(ks,)g(and)g(Cscop)t(e)14 b Fj(.)20 b(.)f(.)h(.)f(.)g (.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)59 b Fk(6)150 2639 y(9)135 b(Regular)46 b(Expressions)f(and)g(Replacemen)l(t)i (Strings)459 2772 y Fj(.)19 b(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.) f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)84 b Fk(8)150 3026 y(10)135 b(Scripting)45 b(Languages)40 b Fj(.)19 b(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h (.)f(.)g(.)h(.)f(.)h(.)83 b Fk(9)150 3280 y(11)135 b(General)46 b(Editor)f(Description)17 b Fj(.)k(.)e(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h (.)f(.)g(.)h(.)f(.)62 b Fk(10)150 3534 y(12)135 b(Vi)45 b(Description)13 b Fj(.)20 b(.)g(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)58 b Fk(13)150 3788 y(13)135 b(Vi)45 b(Commands)23 b Fj(.)d(.)f(.)g(.)h(.) f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h (.)f(.)g(.)h(.)f(.)68 b Fk(17)150 4042 y(14)135 b(Vi)45 b(T)-11 b(ext)45 b(Input)f(Commands)25 b Fj(.)19 b(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)69 b Fk(42)150 4296 y(15)135 b(Ex)45 b(Addressing)15 b Fj(.)k(.)g(.)h(.)f(.)h(.)f(.)g (.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.) f(.)h(.)59 b Fk(43)150 4550 y(16)135 b(Ex)45 b(Description)35 b Fj(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f (.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)79 b Fk(45)150 4804 y(17)135 b(Ex)45 b(Commands)13 b Fj(.)20 b(.)f(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.) f(.)g(.)58 b Fk(46)150 5058 y(18)135 b(Set)45 b(Options)34 b Fj(.)20 b(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f (.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)79 b Fk(62)150 5313 y(19)135 b(Index)27 b Fj(.)20 b(.)f(.)h(.)f(.)g(.)h(.) f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)h (.)f(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)g(.)h(.)72 b Fk(74)p eop end %%Page: 1 4 TeXDict begin 1 3 bop 150 -116 a Fo(Chapter)30 b(2:)41 b(Additional)31 b(F)-8 b(eatures)32 b(in)e(Nex/Nvi)1824 b(1)150 299 y Fl(1)80 b(Description)150 561 y Fn(Vi)29 b Fo(is)g(a)h(screen)f(orien)m(ted)h(text)h(editor.)41 b Fn(Ex)28 b Fo(is)i(a)f(line-orien)m(ted)i(text)f(editor.)41 b Fn(Ex)29 b Fo(and)f Fn(vi)i Fo(are)f(di\013eren)m(t)150 671 y(in)m(terfaces)34 b(to)g(the)e(same)i(program,)f(and)f(it)h(is)g (p)s(ossible)f(to)i(switc)m(h)f(bac)m(k)g(and)f(forth)g(during)g(an)g (edit)150 781 y(session.)41 b Fn(View)30 b Fo(is)h(the)f(equiv)-5 b(alen)m(t)32 b(of)f(using)e(the)i Fn(-R)g Fo(\(read-only\))g(option)g (of)f Fn(vi)h Fo(.)275 925 y(This)24 b(reference)h(man)m(ual)h(is)f (the)g(one)g(pro)m(vided)g(with)g(the)g Fn(nex)p Fo(/)p Fn(n)m(vi)h Fo(v)m(ersions)f(of)g(the)h Fn(ex)p Fo(/)p Fn(vi)g Fo(text)g(ed-)150 1034 y(itors.)40 b Fn(Nex)p Fo(/)p Fn(n)m(vi)29 b Fo(are)f(in)m(tended)f(as)g(bug-for-bug)g (compatible)i(replacemen)m(ts)g(for)e(the)g(original)i(F)-8 b(ourth)150 1144 y(Berk)m(eley)37 b(Soft)m(w)m(are)f(Distribution)g (\(4BSD\))h Fn(ex)p Fo(/)p Fn(vi)f Fo(programs.)55 b(This)35 b(reference)g(man)m(ual)h(is)f(accom-)150 1253 y(panied)g(b)m(y)h(a)g (traditional-st)m(yle)i(man)m(ual)e(page.)57 b(That)36 b(man)m(ual)g(page)g(describ)s(es)f(the)g(functionalit)m(y)150 1363 y(found)28 b(in)h Fn(ex)p Fo(/)p Fn(vi)i Fo(in)e(far)g(less)g (detail)i(than)e(the)h(description)f(here.)40 b(In)29 b(addition,)h(it)g(describ)s(es)e(the)i(sys-)150 1472 y(tem)h(in)m(terface)i(to)f Fn(ex)p Fo(/)p Fn(vi)p Fo(,)g(e.g.)43 b(command)31 b(line)g(options,)h(session)f(reco)m(v)m(ery)-8 b(,)34 b(signals,)e(en)m(vironmen)m(tal)150 1582 y(v)-5 b(ariables,)31 b(and)f(similar)h(things.)275 1726 y(This)40 b(reference)j(is)e(in)m(tended)h(for)f(users)g(already)h(familiar)h (with)e Fn(ex)p Fo(/)p Fn(vi)p Fo(.)76 b(An)m(y)m(one)42 b(else)h(should)150 1836 y(almost)35 b(certainly)f(read)g(a)g(go)s(o)s (d)f(tutorial)i(on)e(the)h(editor)g(\014rst.)49 b(If)33 b(y)m(ou)h(are)g(in)f(an)h(unfamiliar)f(en)m(vi-)150 1945 y(ronmen)m(t,)38 b(and)d(y)m(ou)i(absolutely)g(ha)m(v)m(e)g(to)g (get)g(w)m(ork)g(done)f(immediately)-8 b(,)39 b(see)e(the)f(section)h (en)m(titled)150 2055 y(\\)p Fn(F)-8 b(ast)32 b(Startup)p Fo(")e(in)g(the)h(man)m(ual)f(page.)42 b(It)30 b(is)h(probably)e (enough)i(to)g(get)g(y)m(ou)g(started.)275 2199 y(There)23 b(are)i(a)f(few)g(features)h(in)f Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(that)h(are)g(not)f(found)f(in)h(historic)g(v)m(ersions)h(of)f Fn(ex)p Fo(/)p Fn(vi)p Fo(.)40 b(Some)150 2308 y(of)34 b(the)g(more)g(in)m(teresting)i(of)e(those)g(features)g(are)h (brie\015y)e(describ)s(ed)f(in)i(the)g(next)g(section,)i(en)m(titled) 150 2418 y(\\)p Fn(Additional)41 b(F)-8 b(eatures)p Fo(")42 b(.)71 b(F)-8 b(or)41 b(the)g(rest)g(of)f(this)h(do)s(cumen)m(t,)i Fn(nex)p Fo(/)p Fn(n)m(vi)e Fo(is)f(used)g(only)g(when)g(it)h(is)150 2527 y(necessary)31 b(to)g(distinguish)e(it)i(from)f(the)h(historic)g (implemen)m(tations)h(of)e Fn(ex)p Fo(/)p Fn(vi)p Fo(.)275 2671 y(F)-8 b(uture)34 b(v)m(ersions)i(of)f(this)f(soft)m(w)m(are)j (will)e(b)s(e)f(p)s(erio)s(dically)h(made)g(a)m(v)-5 b(ailable)38 b(b)m(y)c(anon)m(ymous)h(ftp,)150 2781 y(and)30 b(can)g(b)s(e)g(retriev)m(ed)h(from)f Fi(ftp.cs.berkeley.edu)p Fo(,)c(in)k(the)g(directory)h Fi(ucb/4bsd)p Fo(.)150 3082 y Fl(2)80 b(Additional)52 b(F)-13 b(eatures)53 b(in)g(Nex/Nvi)150 3345 y Fo(There)32 b(are)g(a)g(few)g(features)g(in)g Fn(nex)p Fo(/)p Fn(n)m(vi)h Fo(that)f(are)h(not)f(found)e(in)i (historic)h(v)m(ersions)f(of)g Fn(ex)p Fo(/)p Fn(vi)p Fo(.)47 b(Some)150 3454 y(of)31 b(the)f(more)h(in)m(teresting)g(of)g (these)g(are)f(as)h(follo)m(ws:)225 3598 y Fm(\017)60 b Fn(8-bit)31 b(clean)g(data,)g(large)h(lines,)f(\014les)330 3737 y(Nex)p Fo(/)p Fn(n)m(vi)25 b Fo(will)g(edit)g(an)m(y)f(format)h (\014le.)39 b(Line)24 b(lengths)h(are)f(limited)h(b)m(y)f(a)m(v)-5 b(ailable)27 b(memory)-8 b(,)26 b(and)e(\014le)330 3847 y(sizes)h(are)g(limited)h(b)m(y)e(a)m(v)-5 b(ailable)27 b(disk)d(space.)40 b(The)24 b Fn(vi)h Fo(text)g(input)f(mo)s(de)g (command)h Fi(<)p Fn(con)m(trol-X)p Fi(>)330 3957 y Fo(can)31 b(insert)f(an)m(y)h(p)s(ossible)f(c)m(haracter)i(v)-5 b(alue)30 b(in)m(to)i(the)e(text.)225 4096 y Fm(\017)60 b Fn(Bac)m(kground)30 b(and)g(foreground)g(screens)330 4235 y Fo(The)37 b Fn(bg)h Fo(command)f(bac)m(kgrounds)g(the)h(curren)m (t)f(screen,)j(and)d(the)h Fn(fg)g Fo(command)f(foregrounds)330 4345 y(bac)m(kgrounded)46 b(screens.)89 b(The)46 b Fn(displa)m(y)g Fo(command)g(can)h(b)s(e)f(used)f(to)j(list)f(the)f(bac)m(kground)330 4454 y(screens.)225 4594 y Fm(\017)60 b Fn(Command)29 b(Editing)330 4733 y Fo(Y)-8 b(ou)26 b(can)h(en)m(ter)f(a)g(normal)g (editing)h(windo)m(w)e(on)h(the)g(collected)i(commands)e(that)g(y)m (ou'v)m(e)h(en)m(tered)330 4842 y(on)37 b(the)g Fn(vi)g Fo(colon)h(command-line,)h(and)e(then)f(mo)s(dify)g(and/or)h(execute)i (the)e(commands.)60 b(See)330 4952 y(the)31 b Fi(cedit)e Fo(edit)h(option)h(for)f(more)h(information.)225 5091 y Fm(\017)60 b Fn(Displa)m(ys)330 5230 y Fo(The)37 b Fn(displa)m(y)h Fo(command)g(can)g(b)s(e)f(used)h(to)g(displa)m(y)g (the)h(curren)m(t)e(bu\013ers,)i(the)f(bac)m(kgrounded)330 5340 y(screens,)31 b(and)e(the)i(tags)g(stac)m(k.)p eop end %%Page: 2 5 TeXDict begin 2 4 bop 150 -116 a Fo(Chapter)30 b(3:)41 b(Startup)29 b(Information)2287 b(2)225 299 y Fm(\017)60 b Fn(Extended)30 b(Regular)h(Expressions)330 436 y Fo(The)43 b Fn(extended)g Fo(option)h(causes)f(Regular)h(Expressions)e(to)i(b)s (e)e(in)m(terpreted)i(as)f(as)g(Extended)330 546 y(Regular)31 b(Expressions,)f(\(i.e.)h Fi(egrep)p Fo(\(1\))g(st)m(yle)g(Regular)g (Expressions\).)225 683 y Fm(\017)60 b Fn(File)31 b(Name)g(Completion) 330 821 y Fo(It)22 b(is)g(p)s(ossible)f(to)h(do)g(\014le)g(name)f (completion)i(and)f(\014le)f(name)h(displa)m(ys)g(when)f(en)m(tering)h (commands)330 930 y(on)30 b(the)h Fn(vi)f Fo(colon)i(command-line.)41 b(See)31 b(the)f Fi(filec)f Fo(option)i(for)f(more)h(information.)225 1068 y Fm(\017)60 b Fn(In\014nite)30 b(undo)330 1205 y Fo(Changes)j(made)g(during)f(an)h(edit)h(session)f(ma)m(y)h(b)s(e)f (rolled)g(bac)m(kw)m(ard)h(and)f(forw)m(ard.)48 b(A)34 b Fn(.)f Fo(com-)330 1315 y(mand)25 b(immediately)i(after)f(a)g Fn(u)f Fo(command)h(con)m(tin)m(ues)g(either)h(forw)m(ard)e(or)g(bac)m (kw)m(ard)h(dep)s(ending)330 1424 y(on)k(whether)g(the)h Fn(u)e Fo(command)i(w)m(as)f(an)h(undo)e(or)h(a)h(redo.)225 1562 y Fm(\017)60 b Fn(Left-righ)m(t)32 b(scrolling)330 1699 y Fo(The)22 b Fn(leftrigh)m(t)i Fo(option)f(causes)g Fn(n)m(vi)f Fo(to)i(do)e(left-righ)m(t)i(screen)e(scrolling,)k(instead) c(of)h(the)g(traditional)330 1809 y Fn(vi)31 b Fo(line)f(wrapping.)225 1946 y Fm(\017)60 b Fn(Message)32 b(Catalogs)330 2084 y Fo(It)43 b(is)f(p)s(ossible)g(to)h(displa)m(y)g(informational)g(and)f (error)g(messages)h(in)f(di\013eren)m(t)h(languages)h(b)m(y)330 2193 y(pro)m(viding)24 b(a)g(catalog)j(of)d(messages.)40 b(See)24 b(the)g Fi(msgcat)f Fo(option)h(and)g(the)g(\014le)g Fi(catalog/README)p Fo(for)330 2303 y(more)31 b(information.)225 2440 y Fm(\017)60 b Fn(Incremen)m(ting)31 b(n)m(um)m(b)s(ers)330 2578 y Fo(The)f Fn(#)g Fo(command)g(incremen)m(ts)h(or)f(decremen)m(ts) h(the)g(n)m(um)m(b)s(er)e(referenced)h(b)m(y)g(the)h(cursor.)225 2715 y Fm(\017)60 b Fn(Previous)31 b(\014le)330 2852 y Fo(The)f Fn(previous)g Fo(command)g(edits)h(the)f(previous)g(\014le)h (from)f(the)g(argumen)m(t)h(list.)225 2990 y Fm(\017)60 b Fn(Scripting)31 b(languages)330 3127 y Fo(The)44 b Fn(:p)s(e[rl])h(cmd)p Fo(,)i Fn(:p)s(erld[o])e(cmd)f Fo(and)g Fn(:tc[l])j(cmd)c Fo(commands)h(execute)i(P)m(erl)f(and)f (Tcl/Tk)330 3237 y(commands,)33 b(resp)s(ectiv)m(ely)-8 b(,)36 b(on)d(lines)g(from)f(the)h(edit)h(bu\013er.)47 b(See)33 b(the)g(\\)p Fn(Scripting)g(Languages)p Fo(")330 3346 y(section)f(and)d(the)i(sp)s(eci\014c)f(commands)g(for)g(more)h (information.)225 3484 y Fm(\017)60 b Fn(Split)30 b(screens)330 3621 y Fo(The)j Fn(Edit)h Fo(,)h Fn(Ex)e Fo(,)i Fn(Next)g Fo(,)g Fn(Previous)f Fo(,)h Fn(T)-8 b(ag)34 b Fo(and)g Fn(Visual)f Fo(\(in)h Fn(vi)g Fo(mo)s(de\))g(commands)f(divide)h(the) 330 3731 y(screen)g(in)m(to)h(m)m(ultiple)g(editing)f(regions)h(and)e (then)h(p)s(erform)e(their)i(normal)g(function)f(in)h(a)g(new)330 3840 y(screen)d(area.)45 b(The)31 b Fi(<)p Fn(con)m(trol-W)p Fi(>)i Fo(command)e(rotates)i(b)s(et)m(w)m(een)f(the)f(foreground)g (screens.)43 b(The)330 3950 y Fn(resize)32 b Fo(command)e(can)g(b)s(e)g (used)g(to)h(gro)m(w)g(or)f(shrink)f(a)i(particular)g(screen.)225 4087 y Fm(\017)60 b Fn(T)-8 b(ag)32 b(stac)m(ks)330 4225 y Fo(T)-8 b(ags)25 b(are)g(no)m(w)g(main)m(tained)g(in)g(a)g(stac)m(k.) 40 b(The)24 b Fi(<)p Fn(con)m(trol-T)p Fi(>)j Fo(command)d(returns)f (to)j(the)e(previous)330 4334 y(tag)29 b(lo)s(cation.)42 b(The)28 b Fn(tagp)s(op)g Fo(command)g(returns)f(to)h(the)h(most)f (recen)m(t)h(tag)h(lo)s(cation)f(b)m(y)f(default,)330 4444 y(or,)37 b(optionally)g(to)g(a)f(sp)s(eci\014c)f(tag)i(n)m(um)m(b) s(er)d(in)h(the)h(tag)h(stac)m(k,)i(or)c(the)h(most)g(recen)m(t)h(tag)f (from)330 4553 y(a)e(sp)s(eci\014ed)f(\014le.)52 b(The)33 b Fn(displa)m(y)h Fo(command)f(can)h(b)s(e)g(used)f(to)h(list)h(the)f (tags)h(stac)m(k.)52 b(The)33 b Fn(tagtop)330 4663 y Fo(command)d(returns)f(to)i(the)g(top)g(of)f(the)h(tag)g(stac)m(k.)225 4800 y Fm(\017)60 b Fn(Usage)31 b(information)330 4938 y Fo(The)e Fn(exusage)h Fo(and)f Fn(viusage)g Fo(commands)g(pro)m(vide) h(usage)g(information)f(for)g(all)i(of)e(the)g Fn(ex)h Fo(and)f Fn(vi)330 5047 y Fo(commands)h(b)m(y)g(default,)h(or,)g (optionally)-8 b(,)32 b(for)e(a)h(sp)s(eci\014c)f(command)g(or)h(k)m (ey)-8 b(.)225 5185 y Fm(\017)60 b Fn(W)-8 b(ord)31 b(searc)m(h)330 5322 y Fo(The)f Fi(<)p Fn(con)m(trol-A)p Fi(>)i Fo(command)e(searc)m (hes)h(for)f(the)h(w)m(ord)f(referenced)g(b)m(y)g(the)h(cursor.)p eop end %%Page: 3 6 TeXDict begin 3 5 bop 150 -116 a Fo(Chapter)30 b(4:)41 b(Reco)m(v)m(ery)2732 b(3)150 299 y Fl(3)80 b(Startup)53 b(Information)150 537 y Fn(Ex)p Fo(/)p Fn(vi)34 b Fo(in)m(terprets)g (one)g(of)g(t)m(w)m(o)h(p)s(ossible)e(en)m(vironmen)m(tal)i(v)-5 b(ariables)34 b(and)f(reads)h(up)e(to)j(three)f(of)g(\014v)m(e)150 646 y(p)s(ossible)28 b(\014les)h(during)f(startup.)40 b(The)28 b(v)-5 b(ariables)30 b(and)e(\014les)h(are)g(exp)s(ected)h(to) g(con)m(tain)g Fn(ex)f Fo(commands,)150 756 y(not)40 b Fn(vi)g Fo(commands.)69 b(In)39 b(addition,)j(they)e(are)h(in)m (terpreted)f Fp(b)-5 b(efor)g(e)47 b Fo(the)40 b(\014le)g(to)h(b)s(e)e (edited)h(is)g(read,)150 865 y(and)28 b(therefore)g(man)m(y)g Fn(ex)h Fo(commands)f(ma)m(y)h(not)f(b)s(e)g(used.)39 b(Generally)-8 b(,)30 b(an)m(y)f(command)f(that)g(requires)150 975 y(output)42 b(to)i(the)f(screen)g(or)f(that)i(needs)e(a)h(\014le)g (up)s(on)e(whic)m(h)h(to)i(op)s(erate,)j(will)c(cause)g(an)g(error)f (if)150 1084 y(included)30 b(in)g(a)g(startup)g(\014le)h(or)f(en)m (vironmen)m(tal)i(v)-5 b(ariable.)275 1220 y(Because)38 b(the)f Fn(ex)g Fo(command)g(set)h(supp)s(orted)d(b)m(y)i Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(is)g(a)g(sup)s(erset)f(of)h(the)h (command)e(set)150 1330 y(supp)s(orted)f(b)m(y)h(historical)h(implemen) m(tations)h(of)f Fn(ex)f Fo(,)j Fn(nex)p Fo(/)p Fn(n)m(vi)d Fo(can)h(use)f(the)h(startup)f(\014les)g(created)150 1439 y(for)30 b(the)h(historical)g(implemen)m(tations,)i(but)c(the)i (con)m(v)m(erse)h(ma)m(y)f(not)f(b)s(e)g(true.)275 1575 y(If)f(the)h Fn(-s)f Fo(\(the)i(historic)f(-)g(option\))g(is)g(sp)s (eci\014ed,)g(or)f(if)h(standard)f(input)f(is)i(redirected)g(from)g(a)g (\014le,)150 1685 y(all)h(en)m(vironmen)m(tal)h(v)-5 b(ariables)31 b(and)f(startup)g(\014les)g(are)h(ignored.)275 1820 y(Otherwise,)f(startup)f(\014les)h(and)g(en)m(vironmen)m(tal)h(v) -5 b(ariables)31 b(are)f(handled)g(in)f(the)i(follo)m(wing)g(order:)199 1956 y(1.)61 b(The)28 b(\014le)h Fi(/etc/vi.exrc)p Fo(is)d(read,)j(as)g (long)h(as)f(it)g(is)g(o)m(wned)g(b)m(y)f(ro)s(ot)h(or)g(the)g (e\013ectiv)m(e)j(user)c(ID)h(of)330 2065 y(the)i(user.)199 2201 y(2.)61 b(The)36 b(en)m(vironmen)m(tal)i(v)-5 b(ariable)37 b Fi(NEXINIT)p Fo(\(or)e(the)i(v)-5 b(ariable)37 b Fi(EXINIT)p Fo(,)g(if)f Fi(NEXINIT)p Fo(is)f(not)h(set\))i(is)330 2310 y(in)m(terpreted.)199 2445 y(3.)61 b(If)26 b(neither)h Fi(NEXINIT)p Fo(or)d Fi(EXINIT)p Fo(w)m(as)i(set,)i(and)e(the)h Fi(HOME)p Fo(en)m(vironmen)m(tal)g(v)-5 b(ariable)27 b(is)g(set,)h(the)f(\014le)330 2555 y Fi($HOME/.nexrc)p Fo(\(or)22 b(the)k(\014le)f Fi($HOME/.exrc)p Fo(,)f(if)h Fi($HOME/.nexrc)p Fo(do)s(es)d(not)j(exist\))i(is)e(read,)i(as)e(long) 330 2664 y(as)31 b(the)f(e\013ectiv)m(e)j(user)d(ID)g(of)h(the)g(user)e (is)i(ro)s(ot)f(or)h(is)f(the)h(same)f(as)h(the)g(o)m(wner)f(of)h(the)f (\014le.)330 2909 y(When)22 b(the)h($HOME)g(directory)g(is)f(b)s(eing)g (used)g(for)g(b)s(oth)g Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(and)g(an)h (historic)g(implemen)m(ta-)330 3019 y(tion)k(of)f Fn(ex)p Fo(/)p Fn(vi)p Fo(,)i(a)e(p)s(ossible)g(solution)g(is)g(to)h(put)e Fn(nex)p Fo(/)p Fn(n)m(vi)i Fo(sp)s(eci\014c)f(commands)f(in)h(the)g Fi(.nexrc)p Fo(\014le,)330 3128 y(along)40 b(with)e(a)h Fn(:source)h($HOME/.exrc)g Fo(command)f(to)g(read)g(in)f(the)h (commands)f(common)h(to)330 3238 y(b)s(oth)30 b(implemen)m(tations.)199 3373 y(4.)61 b(If)33 b(the)g Fi(exrc)f Fo(option)h(w)m(as)h(turned)e (on)h(b)m(y)g(one)g(of)h(the)f(previous)g(startup)f(information)i (sources,)330 3482 y(the)23 b(\014le)g Fi(.nexrc)p Fo(\(or)f(the)h (\014le)g Fi(.exrc)p Fo(,)g(if)g Fi(.nexrc)p Fo(do)s(es)e(not)i (exist\))h(is)f(read,)h(as)g(long)f(as)g(the)g(e\013ectiv)m(e)330 3592 y(user)30 b(ID)g(of)h(the)f(user)g(is)g(the)h(same)g(as)f(the)h(o) m(wner)f(of)h(the)f(\014le.)275 3753 y(No)g(startup)g(\014le)h(is)f (read)h(if)f(it)h(is)f(writable)h(b)m(y)f(an)m(y)m(one)i(other)e(than)h (its)f(o)m(wner.)275 3889 y(It)g(is)g(not)h(an)f(error)g(for)g(an)m(y)h (of)g(the)f(startup)g(en)m(vironmen)m(tal)i(v)-5 b(ariables)31 b(or)f(\014les)h(not)f(to)h(exist.)275 4025 y(Once)f(all)i(en)m (vironmen)m(tal)g(v)-5 b(ariables)31 b(are)g(in)m(terpreted,)g(and)f (all)i(startup)e(\014les)h(are)g(read,)g(the)g(\014rst)150 4134 y(\014le)h(to)h(b)s(e)e(edited)i(is)f(read)g(in)g(\(or)g(a)h(temp) s(orary)e(\014le)h(is)h(created\).)47 b(Then,)32 b(an)m(y)g(commands)g (sp)s(eci\014ed)150 4244 y(using)e(the)g Fn(-c)h Fo(option)g(are)g (executed,)h(in)e(the)g(con)m(text)i(of)f(that)g(\014le.)150 4528 y Fl(4)80 b(Reco)l(v)l(ery)150 4766 y Fo(There)31 b(is)h(no)g(reco)m(v)m(ery)i(program)d(for)h Fn(nex)p Fo(/)p Fn(n)m(vi)p Fo(,)h(nor)e(do)s(es)h Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(run)f(setuid.)45 b(Reco)m(v)m(ery)34 b(\014les)e(are)150 4876 y(created)27 b(readable)g(and)e(writable)i(b)m(y)f(the)g(o)m(wner) g(only)-8 b(.)40 b(Users)26 b(ma)m(y)g(reco)m(v)m(er)i(an)m(y)e(\014le) h(whic)m(h)e(they)i(can)150 4985 y(read,)k(and)e(the)i(sup)s(eruser)d (ma)m(y)j(reco)m(v)m(er)h(an)m(y)f(edit)g(session.)275 5121 y(Edit)26 b(sessions)g(are)g(bac)m(k)m(ed)i(b)m(y)e(\014les)g(in)g (the)g(directory)h(named)e(b)m(y)h(the)h Fi(recdir)d Fo(option)j(\(the)g(direc-)150 5230 y(tory)f Fi(/var/tmp/vi.recover)p Fo(b)m(y)20 b(default\),)27 b(and)e(are)h(named)f(\\)p Fn(vi.XXXXXX)p Fo(",)g(where)g(\\)p Fn(XXXXXX)p Fo(")150 5340 y(is)33 b(a)h(n)m(um)m(b)s(er)e(related)i(to)g(the)f(pro)s(cess)g (ID.)h(When)f(a)g(\014le)g(is)h(\014rst)e(mo)s(di\014ed,)h(a)h(second)f (reco)m(v)m(ery)i(\014le)p eop end %%Page: 4 7 TeXDict begin 4 6 bop 150 -116 a Fo(Chapter)30 b(5:)41 b(Sizing)31 b(the)f(Screen)2408 b(4)150 299 y(con)m(taining)41 b(an)e(email)i(message)f(for)f(the)h(user)f(is)g(created,)k(and)c(is)g (named)g(\\)p Fn(reco)m(v)m(er.XXXXXX)p Fo(",)150 408 y(where,)30 b(again,)h(\\)p Fn(XXXXXX)p Fo(")d(is)i(asso)s(ciated)h (with)e(the)h(pro)s(cess)f(ID.)h(Both)g(\014les)g(are)g(remo)m(v)m(ed)g (at)h(the)150 518 y(end)c(of)h(a)g(normal)f(edit)h(session,)h(but)e (will)h(remain)f(if)h(the)g(edit)g(session)f(is)h(abnormally)g (terminated)g(or)150 628 y(the)j(user)e(runs)g(the)i Fn(ex)f(preserv)m(e)h Fo(command.)275 758 y(The)43 b Fi(recdir)e Fo(option)k(ma)m(y)f(b)s(e)f(set)h(in)f(either)h(the)g (user's)f(or)g(system's)h(startup)f(information,)150 868 y(c)m(hanging)28 b(the)f(reco)m(v)m(ery)i(directory)-8 b(.)41 b(\(Note,)29 b(ho)m(w)m(ev)m(er,)h(that)d(if)g(a)h(memory)f (based)f(\014le)h(system)h(is)f(used)150 977 y(as)33 b(the)g(bac)m(kup)f(directory)-8 b(,)34 b(eac)m(h)g(system)f(reb)s(o)s (ot)f(will)h(delete)h(all)f(of)g(the)g(reco)m(v)m(ery)h(\014les!)47 b(The)33 b(same)150 1087 y(caution)h(applies)g(to)g(directories)g(suc)m (h)f(as)g Fi(/tmp)p Fo(whic)m(h)f(are)i(cleared)g(of)g(their)f(con)m (ten)m(ts)i(b)m(y)e(a)h(system)150 1197 y(reb)s(o)s(ot,)c(or)h Fi(/usr/tmp)p Fo(whic)m(h)d(is)i(p)s(erio)s(dically)h(cleared)g(of)g (old)f(\014les)g(on)h(man)m(y)f(systems.\))275 1327 y(The)20 b(reco)m(v)m(ery)j(directory)e(should)f(b)s(e)h(o)m(wned)g(b)m(y)g(ro)s (ot,)i(or)e(at)h(least)g(b)m(y)f(a)h(pseudo-user.)36 b(In)20 b(addition,)150 1437 y(if)27 b(directory)h(\\stic)m(ky-bit")h (seman)m(tics)g(are)e(a)m(v)-5 b(ailable,)31 b(the)c(directory)h (should)e(ha)m(v)m(e)i(the)g(stic)m(ky-bit)g(set)150 1546 y(so)35 b(that)g(\014les)f(ma)m(y)h(only)f(b)s(e)g(remo)m(v)m(ed)i (b)m(y)e(their)g(o)m(wners.)53 b(The)34 b(reco)m(v)m(ery)i(directory)f (m)m(ust)f(b)s(e)g(read,)150 1656 y(write,)d(and)f(executable)i(b)m(y)e (an)m(y)h(user,)e(i.e.)j(mo)s(de)e(1777.)275 1787 y(If)g(the)h(reco)m (v)m(ery)i(directory)f(do)s(es)f(not)g(exist,)h Fn(ex)p Fo(/)p Fn(vi)h Fo(will)e(attempt)h(to)g(create)h(it.)43 b(This)31 b(can)g(result)150 1896 y(in)k(the)g(reco)m(v)m(ery)i (directory)e(b)s(eing)g(o)m(wned)g(b)m(y)g(a)g(normal)g(user,)h(whic)m (h)f(means)g(that)h(that)f(user)g(will)150 2006 y(b)s(e)i(able)g(to)h (remo)m(v)m(e)h(other)f(user's)e(reco)m(v)m(ery)j(and)e(bac)m(kup)g (\014les.)62 b(This)36 b(is)h(anno)m(ying,)j(but)d(is)g(not)h(a)150 2115 y(securit)m(y)31 b(issue)f(as)h(the)g(user)e(cannot)i(otherwise)g (access)h(or)e(mo)s(dify)g(the)g(\014les.)275 2246 y(The)21 b(reco)m(v)m(ery)i(\014le)f(has)f(all)h(of)g(the)g(necessary)g (information)g(in)f(it)h(to)g(enable)g(the)g(user)f(to)h(reco)m(v)m(er) i(the)150 2356 y(edit)33 b(session.)46 b(In)32 b(addition,)h(it)g(has)f (all)h(of)f(the)h(necessary)g(email)g(headers)f(for)g Fi(sendmail)p Fo(\(8\).)45 b(When)150 2465 y(the)26 b(system)f(is)h (reb)s(o)s(oted,)g(all)h(of)e(the)h(\014les)f(in)g Fi (/var/tmp/vi.recover)p Fo(named)20 b(\\)p Fn(reco)m(v)m(er.XXXXXX)p Fo(")150 2575 y(should)42 b(b)s(e)g(sen)m(t)h(to)g(their)g(o)m(wners,)i (b)m(y)e(email,)k(using)42 b(the)g Fn(-t)i Fo(option)f(of)f Fn(sendmail)h Fo(\(or)g(a)g(similar)150 2684 y(mec)m(hanism)f(in)f (other)h(mailers\).)76 b(If)41 b Fn(ex)p Fo(/)p Fn(vi)i Fo(receiv)m(es)h(a)e(hangup)e(\(SIGHUP\))i(signal,)k(or)c(the)g(user) 150 2794 y(executes)27 b(the)f Fn(ex)g(preserv)m(e)g Fo(command,)h Fn(ex)p Fo(/)p Fn(vi)g Fo(will)f(automatically)j(email)d (the)g(reco)m(v)m(ery)i(information)150 2904 y(to)j(the)g(user.)275 3034 y(If)23 b(y)m(our)g(system)h(do)s(es)f(not)g(ha)m(v)m(e)i(the)f Fn(sendmail)f Fo(utilit)m(y)i(\(or)f(a)f(mailer)i(program)e(whic)m(h)g (supp)s(orts)f(its)150 3144 y(in)m(terface\))33 b(the)f(source)f (\014le)h Fi(nvi/common/recover.c)p Fo(will)26 b(ha)m(v)m(e)33 b(to)f(b)s(e)f(mo)s(di\014ed)f(to)i(use)f(y)m(our)h(lo)s(cal)150 3253 y(mail)h(deliv)m(ery)f(programs.)45 b(Note,)34 b(if)e Fn(nex)p Fo(/)p Fn(n)m(vi)h Fo(is)f(c)m(hanged)g(to)h(use)f(another)g (mailer,)h(it)g(is)f(imp)s(ortan)m(t)150 3363 y(to)h(remem)m(b)s(er)f (that)h(the)g(o)m(wner)g(of)f(the)h(\014le)g(giv)m(en)g(to)g(the)g (mailer)g(is)g(the)g Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(user,)f(so)h (nothing)150 3473 y(in)h(the)g(\014le)g(should)e(b)s(e)i(trusted)f(as)h (it)h(ma)m(y)f(ha)m(v)m(e)h(b)s(een)e(mo)s(di\014ed)g(in)g(an)h (e\013ort)h(to)f(compromise)h(the)150 3582 y(system.)275 3713 y(Finally)-8 b(,)38 b(the)d(o)m(wner)h(execute)h(bit)e(is)g(set)h (on)g(bac)m(kup)f(\014les)g(when)f(they)i(are)g(created,)i(and)c(unset) 150 3822 y(when)f(they)i(are)g(\014rst)f(mo)s(di\014ed,)g(e.g.)54 b(bac)m(kup)35 b(\014les)f(that)h(ha)m(v)m(e)h(no)e(asso)s(ciated)i (email)g(reco)m(v)m(ery)g(\014le)150 3932 y(will)c(ha)m(v)m(e)h(this)f (bit)g(set.)46 b(\(There)31 b(is)h(also)h(a)f(small)h(windo)m(w)e (where)g(empt)m(y)h(\014les)g(can)g(b)s(e)g(created)h(and)150 4042 y(not)h(y)m(et)h(ha)m(v)m(e)g(this)f(bit)g(set.)52 b(This)33 b(is)h(due)f(to)h(the)g(metho)s(d)g(in)f(whic)m(h)h(the)g (\014les)g(are)g(created.\))53 b(Suc)m(h)150 4151 y(\014les)30 b(should)g(b)s(e)f(deleted)j(when)d(the)i(system)f(reb)s(o)s(ots.)275 4282 y(A)35 b(simple)h(w)m(a)m(y)g(to)h(do)e(this)h(clean)m(up)g(is)g (to)g(run)e(the)i(Bourne)f(shell)h(script)g Fn(reco)m(v)m(er)i Fo(,)f(from)e(y)m(our)150 4391 y Fi(/etc/rc.local)p Fo(\(or)k(other)j (system)g(startup\))g(\014le.)75 b(The)41 b(script)h(should)f(w)m(ork)h (with)f(the)h(historic)150 4501 y(Bourne)26 b(shell,)h(a)f(POSIX)f (1003.2)j(shell)e(or)f(the)h(Korn)f(shell.)40 b(The)25 b Fn(reco)m(v)m(er)j Fo(script)e(is)g(installed)g(as)g(part)150 4610 y(of)31 b(the)f Fn(nex)p Fo(/)p Fn(n)m(vi)h Fo(installation)h(pro) s(cess.)275 4741 y(Consult)27 b(the)i(man)m(ual)f(page)i(for)e(details) h(on)f(reco)m(v)m(ering)i(preserv)m(ed)e(or)h(ab)s(orted)f(editing)h (sessions.)150 5016 y Fl(5)80 b(Sizing)53 b(the)f(Screen)150 5230 y Fo(The)28 b(size)h(of)f(the)g(screen)g(can)h(b)s(e)e(set)i(in)f (a)g(n)m(um)m(b)s(er)f(of)h(w)m(a)m(ys.)41 b Fn(Ex)p Fo(/)p Fn(vi)28 b Fo(tak)m(es)i(the)e(follo)m(wing)i(steps)e(un)m(til) 150 5340 y(v)-5 b(alues)31 b(are)f(obtained)h(for)f(b)s(oth)g(the)h(n)m (um)m(b)s(er)e(of)h(ro)m(ws)h(and)e(n)m(um)m(b)s(er)g(of)i(columns)f (in)g(the)h(screen.)p eop end %%Page: 5 8 TeXDict begin 5 7 bop 150 -116 a Fo(Chapter)30 b(7:)41 b(Multiple)31 b(Screens)2430 b(5)199 299 y(1.)61 b(If)33 b(the)h(en)m(vironmen)m(tal)g(v)-5 b(ariable)35 b Fi(LINES)p Fo(exists,)e(it)h(is)g(used)e(to)i(sp)s(ecify)g(the)f(n)m(um)m(b)s(er)f (of)i(ro)m(ws)f(in)330 408 y(the)e(screen.)199 543 y(2.)61 b(If)23 b(the)g(en)m(vironmen)m(tal)i(v)-5 b(ariable)24 b Fi(COLUMNS)p Fo(exists,)g(it)g(is)f(used)g(to)h(sp)s(ecify)f(the)h(n) m(um)m(b)s(er)e(of)h(columns)330 653 y(in)30 b(the)h(screen.)199 787 y(3.)61 b(The)30 b(TIOCGWINSZ)f Fi(ioctl)p Fo(\(2\))h(is)g (attempted)i(on)e(the)h(standard)e(error)h(\014le)h(descriptor.)199 922 y(4.)61 b(The)34 b(termcap)h(en)m(try)g(\(or)g(terminfo)g(en)m(try) g(on)g(System)f(V)h(mac)m(hines\))h(is)e(c)m(hec)m(k)m(ed)j(for)e(the)g (\\li")330 1032 y(en)m(try)c(\(ro)m(ws\))g(and)e(the)i(\\co")h(en)m (try)f(\(columns\).)199 1167 y(5.)61 b(The)30 b(n)m(um)m(b)s(er)f(of)h (ro)m(ws)h(is)f(set)h(to)g(24,)h(and)d(the)i(n)m(um)m(b)s(er)e(of)i (columns)f(is)g(set)h(to)g(80.)275 1327 y(If)23 b(a)h(windo)m(w)g(c)m (hange)h(size)f(signal)h(\(SIGWINCH\))g(is)f(receiv)m(ed,)i(the)f(new)e (windo)m(w)g(size)i(is)f(retriev)m(ed)150 1436 y(using)30 b(the)g(TIOCGWINSZ)f Fi(ioctl)p Fo(\(2\))i(call,)g(and)f(all)h(other)g (information)g(is)f(ignored.)150 1719 y Fl(6)80 b(Character)53 b(Displa)l(y)150 1955 y Fo(In)37 b(b)s(oth)h Fn(ex)g Fo(and)f Fn(vi)h Fo(prin)m(table)h(c)m(haracters)g(as)f(de\014ned)f(b)m (y)h Fi(isprint)p Fo(\(3\))f(are)i(displa)m(y)m(ed)f(using)g(the)150 2064 y(lo)s(cal)32 b(c)m(haracter)g(set.)275 2199 y(Non-prin)m(table)38 b(c)m(haracters,)k(for)37 b(whic)m(h)h Fi(iscntrl)p Fo(\(3\))f(returns) g(true,)j(and)d(whic)m(h)h(are)g(less)g(than)150 2309 y(o)s(ctal)f Fi(\\)p Fo(e040,)j(are)c(displa)m(y)m(ed)h(as)f(the)g (string)g(\\)p Fi(^)p Fo(",)f(where)h Fi()p Fo(is)d(the)j(c)m(har-)150 2419 y(acter)d(that)f(is)g(the)g(original)h (c)m(haracter's)g(v)-5 b(alue)33 b(o\013set)f(from)g(the)f(\\)p Fi(@)p Fo(")i(c)m(haracter.)46 b(F)-8 b(or)33 b(example,)g(the)150 2528 y(o)s(ctal)j(c)m(haracter)h Fi(\\)p Fo(e001)f(is)f(displa)m(y)m (ed)h(as)f(\\)p Fi(^A)p Fo(".)55 b(If)34 b Fi(iscntrl)p Fo(\(3\))h(returns)e(true)i(for)g(the)g(o)s(ctal)h(c)m(har-)150 2638 y(acter)d Fi(\\)p Fo(e177,)h(it)f(is)f(displa)m(y)m(ed)g(as)g(the) h(string)e(\\)p Fi(^?)p Fo(".)46 b(All)33 b(other)f(c)m(haracters)h (are)g(displa)m(y)m(ed)f(as)g(either)150 2747 y(hexadecimal)27 b(v)-5 b(alues,)28 b(in)d(the)h(form)g(\\)p Fi(0x)g(...) j(0x)p Fo(",)23 b(or)j(as)h(o)s(ctal)150 2857 y(v)-5 b(alues,)30 b(in)g(the)g(form)f(\\)p Fi (\\e)24 b(...)30 b(\\e)p Fo(".)36 b(The)29 b(displa)m(y)150 2966 y(of)i(unkno)m(wn)d(c)m (haracters)k(is)f(based)f(on)g(the)h(v)-5 b(alue)30 b(of)h(the)f Fi(octal)f Fo(option.)275 3101 y(In)j Fn(vi)i Fo(command)f(mo)s(de,)h (the)g(cursor)f(is)g(alw)m(a)m(ys)j(p)s(ositioned)d(on)g(the)h(last)g (column)g(of)f(c)m(haracters)150 3211 y(whic)m(h)i(tak)m(e)h(up)e(more) h(than)f(one)h(column)g(on)f(the)h(screen.)54 b(In)34 b Fn(vi)h Fo(text)h(input)e(mo)s(de,)i(the)f(cursor)f(is)150 3321 y(p)s(ositioned)h(on)g(the)h(\014rst)e(column)h(of)g(c)m (haracters)i(whic)m(h)e(tak)m(e)i(up)d(more)h(than)g(one)h(column)f(on) g(the)150 3430 y(screen.)150 3713 y Fl(7)80 b(Multiple)53 b(Screens)150 3949 y Fn(Nvi)31 b Fo(supp)s(orts)e(m)m(ultiple)i (screens)f(b)m(y)h(dividing)f(the)h(windo)m(w)f(in)m(to)h(regions.)42 b(It)30 b(also)i(supp)s(orts)d(stac)m(ks)150 4058 y(of)i(screens)f(b)m (y)g(p)s(ermitting)g(the)h(user)f(to)h(c)m(hange)g(the)g(set)g(of)f (screens)h(that)g(are)f(curren)m(tly)h(displa)m(y)m(ed.)275 4193 y(The)25 b Fn(Edit)i Fo(,)g Fn(Ex)f Fo(,)h Fn(Fg)g Fo(,)h Fn(Next)f Fo(,)g Fn(Previous)g Fo(,)h Fn(T)-8 b(ag)27 b Fo(and)f Fn(Visual)g Fo(\(in)h Fn(vi)f Fo(mo)s(de\))g (commands)g(divide)h(the)150 4303 y(curren)m(t)36 b(screen)h(in)m(to)g (t)m(w)m(o)h(regions)f(of)f(appro)m(ximately)i(equal)f(size)g(and)f (then)g(p)s(erform)f(their)h(usual)150 4413 y(action)d(in)f(a)g(new)f (screen)h(area.)46 b(If)31 b(the)h(cursor)f(is)h(in)g(the)g(lo)m(w)m (er)h(half)e(of)h(the)g(screen,)h(the)f(screen)g(will)150 4522 y(split)g(up,)f(i.e.)h(the)g(new)f(screen)h(will)g(b)s(e)f(ab)s(o) m(v)m(e)h(the)g(old)g(one.)44 b(If)32 b(the)f(cursor)g(is)h(in)f(the)h (upp)s(er)d(half)j(of)150 4632 y(the)f(screen,)f(the)h(new)f(screen)g (will)h(b)s(e)f(b)s(elo)m(w)g(the)h(old)f(one.)275 4767 y(When)35 b(more)g(than)h(one)g(screen)f(is)h(editing)g(a)g(\014le,)h (c)m(hanges)f(in)f(an)m(y)h(screen)g(are)g(re\015ected)g(in)f(all)150 4876 y(other)21 b(screens)h(editing)f(the)h(same)f(\014le.)38 b(Exiting)22 b(a)g(screen)f(without)g(sa)m(ving)h(an)m(y)g(c)m(hanges)g (\(or)f(explicitly)150 4986 y(discarding)32 b(them\))g(is)g(p)s (ermitted)g(un)m(til)g(the)h(last)g(screen)f(editing)g(the)h(\014le)f (is)g(exited,)i(at)e(whic)m(h)g(time)150 5095 y(the)f(c)m(hanges)g(m)m (ust)f(b)s(e)g(sa)m(v)m(ed)h(or)g(discarded.)275 5230 y(The)43 b Fn(resize)i Fo(command)e(p)s(ermits)g(resizing)h(of)g (individual)f(screens.)81 b(Screens)43 b(ma)m(y)i(b)s(e)e(gro)m(wn,)150 5340 y(shrunk)28 b(or)j(set)g(to)g(an)f(absolute)h(n)m(um)m(b)s(er)e (of)i(ro)m(ws.)p eop end %%Page: 6 9 TeXDict begin 6 8 bop 150 -116 a Fo(Chapter)30 b(8:)41 b(T)-8 b(ags,)31 b(T)-8 b(ag)32 b(Stac)m(ks,)f(and)f(Cscop)s(e)1904 b(6)275 299 y(The)27 b Fi(^)p Fn(W)h Fo(command)g(is)g(used)f(to)i (switc)m(h)g(b)s(et)m(w)m(een)f(screens.)40 b(Eac)m(h)29 b Fi(^)p Fn(W)f Fo(mo)m(v)m(es)h(to)g(the)f(next)h(lo)m(w)m(er)150 408 y(screen)h(in)h(the)f(windo)m(w,)g(or)h(to)g(the)f(\014rst)g (screen)g(in)g(the)h(windo)m(w)f(if)g(there)h(are)f(no)h(lo)m(w)m(er)g (screens.)275 545 y(The)37 b Fn(bg)h Fo(command)g(\\bac)m(kgrounds")g (the)h(curren)m(t)f(screen.)63 b(The)38 b(screen)g(disapp)s(ears)f (from)h(the)150 654 y(windo)m(w,)31 b(and)f(the)i(ro)m(ws)f(it)g(o)s (ccupied)g(are)h(tak)m(en)g(o)m(v)m(er)g(b)m(y)f(a)h(neigh)m(b)s(oring) e(screen.)43 b(It)31 b(is)h(an)f(error)f(to)150 764 y(attempt)h(to)h (bac)m(kground)e(the)g(only)h(screen)f(in)g(the)h(windo)m(w.)275 900 y(The)25 b Fn(displa)m(y)h(screens)h Fo(command)f(displa)m(ys)g (the)h(names)f(of)g(the)h(\014les)f(asso)s(ciated)i(with)e(the)g (curren)m(t)150 1010 y(bac)m(kgrounded)k(screens)g(in)g(the)h(windo)m (w.)275 1146 y(The)g Fn(fg)h([\014le])g Fo(command)g(mo)m(v)m(es)h(the) f(sp)s(eci\014ed)f(screen)g(from)h(the)f(list)i(of)f(bac)m(kgrounded)f (screens)150 1256 y(to)24 b(the)g(foreground.)38 b(If)23 b(no)h(\014le)f(argumen)m(t)h(is)g(sp)s(eci\014ed,)h(the)f(\014rst)e (screen)i(on)g(the)g(list)g(is)g(foregrounded.)150 1366 y(By)36 b(default,)i(foregrounding)d(consists)i(of)f(bac)m(kgrounding)g (the)g(curren)m(t)g(screen,)h(and)f(replacing)h(its)150 1475 y(space)31 b(in)f(the)h(windo)m(w)e(with)h(the)h(foregrounded)e (screen.)275 1612 y(Capitalizing)j(the)f(\014rst)g(letter)h(of)f(the)g (command,)g(i.e.)h Fn(Fg)f Fo(,)h(will)f(foreground)f(the)h(bac)m (kgrounded)150 1721 y(screen)f(in)h(a)f(new)g(screen)h(instead)f(of)h (sw)m(apping)f(it)h(with)f(the)g(curren)m(t)h(screen.)275 1858 y(If)40 b(the)h(last)h(foregrounded)e(screen)i(in)e(the)i(windo)m (w)e(is)h(exited,)k(and)c(there)g(are)g(bac)m(kgrounded)150 1967 y(screens,)31 b(the)f(\014rst)g(screen)g(on)h(the)f(list)h(of)g (bac)m(kgrounded)f(screens)g(tak)m(es)i(o)m(v)m(er)g(the)e(windo)m(w.) 150 2253 y Fl(8)80 b(T)-13 b(ags,)54 b(T)-13 b(ag)53 b(Stac)l(ks,)g(and)h(Cscop)t(e)150 2493 y Fn(Nvi)25 b Fo(supp)s(orts)d(the)i(historic)h Fn(vi)f Fo(tag)i(command)e Fi(<)p Fn(con)m(trol-])p Fi(>)i Fo(,)f(and)f(the)g(historic)h Fn(ex)g Fo(tag)g(command)f Fn(tag)150 2603 y Fo(.)40 b(These)30 b(commands)f(c)m(hange)i(the)f(curren)m(t)g(\014le)f(con)m (text)j(to)f(a)f(new)f(lo)s(cation,)j(based)d(on)h(information)150 2712 y(found)d(in)h(the)h Fi(tags)p Fo(\014les.)39 b(If)28 b(y)m(ou)g(are)h(unfamiliar)f(with)h(these)f(commands,)h(y)m(ou)g (should)e(review)i(their)150 2822 y(description)j(in)g(the)g Fn(ex)h Fo(and)e Fn(vi)h Fo(commands)g(section)h(of)g(this)f(man)m (ual.)46 b(F)-8 b(or)33 b(additional)g(information)150 2931 y(on)j(tags)h(\014les,)h(see)f(the)f(discussion)g(of)g(the)g Fi(tags)f Fo(edit)i(option)g(and)e(the)h(system)h Fi(ctags)p Fo(\(1\))f(man)m(ual)150 3041 y(page.)275 3177 y(In)c(addition,)i Fn(n)m(vi)f Fo(supp)s(orts)e(the)i(notion)g(of)h(\\tags)g(stac)m(ks",)i (using)c(the)h Fi(<)p Fn(con)m(trol-T)p Fi(>)i Fo(command.)150 3287 y(The)26 b Fi(<)p Fn(con)m(trol-T)p Fi(>)h Fo(command)f(returns)f (the)i(user)e(to)i(the)f(previous)g(con)m(text,)j(i.e.,)f(the)e(last)h (place)g(from)150 3397 y(whic)m(h)h(a)g Fi(<)p Fn(con)m(trol-])p Fi(>)i Fo(or)d Fn(tag)i Fo(command)f(w)m(as)g(en)m(tered.)41 b(These)27 b(three)h(commands)g(pro)m(vide)g(the)g(basic)150 3506 y(functionalit)m(y)k(whic)m(h)e(allo)m(ws)i(y)m(ou)e(to)h(use)g Fn(vi)f Fo(to)h(review)g(source)f(co)s(de)h(in)f(a)h(structured)e (manner.)275 3643 y Fn(Nvi)23 b Fo(also)g(pro)m(vides)g(t)m(w)m(o)h (other)f(basic)g Fn(ex)g Fo(commands)f(for)g(tag)i(supp)s(ort:)35 b Fn(tagp)s(op)23 b Fo(and)f Fn(tagtop)i Fo(.)38 b(The)150 3752 y Fn(tagp)s(op)23 b Fo(command)g(is)h(iden)m(tical)h(to)f(the)f Fi(<)p Fn(con)m(trol-T)p Fi(>)i Fo(command,)g(with)e(the)g(additional)h (functionalit)m(y)150 3862 y(that)j(y)m(ou)g(ma)m(y)g(sp)s(ecify)f (that)i(mo)s(di\014cations)e(to)i(the)e(curren)m(t)h(\014le)f(are)h(to) h(b)s(e)e(discarded.)39 b(This)25 b(cannot)150 3971 y(b)s(e)i(done)g (using)g(the)h Fi(<)p Fn(con)m(trol-T)p Fi(>)h Fo(command.)40 b(The)26 b Fn(tagtop)j Fo(command)f(discards)f(all)h(of)g(the)f(con)m (texts)150 4081 y(that)39 b(ha)m(v)m(e)g(b)s(een)e(pushed)f(on)m(to)j (the)f(tag)h(stac)m(k,)j(returning)37 b(to)i(the)f(con)m(text)h(from)f (whic)m(h)g(the)g(\014rst)150 4190 y Fi(<)p Fn(con)m(trol-])p Fi(>)32 b Fo(or)f Fn(tag)g Fo(command)f(w)m(as)h(en)m(tered.)275 4327 y(The)f(historic)h Fi(ctags)p Fo(\(1\))g(tags)h(\014le)f(format)g (supp)s(orts)e(only)i(a)g(single)g(lo)s(cation)i(p)s(er)c(tag,)k (normally)150 4436 y(the)j(function)f(declaration)i(or)f(structure)f (or)g(string)h(de\014nition.)56 b(More)36 b(sophisticated)h(source)f (co)s(de)150 4546 y(to)s(ols)26 b(often)g(pro)m(vide)g(m)m(ultiple)g (lo)s(cations)h(p)s(er)d(tag,)k(e.g.,)g(a)e(list)g(of)f(the)h(places)g (from)f(whic)m(h)g(a)h(function)150 4656 y(is)37 b(called)h(or)f(a)g (string)g(de\014nition)f(is)h(used.)59 b(An)37 b(example)g(of)g(this)g (functionalit)m(y)h(is)f(the)g(System)g(V)150 4765 y(source)31 b(co)s(de)f(to)s(ol,)i Fn(cscop)s(e)f Fo(.)275 5011 y Fn(Cscop)s(e)40 b Fo(creates)i(a)f(database)h(of)f(information)g(on)g (source)g(co)s(de)g(\014les,)i(and)d(supp)s(orts)f(a)j(query)150 5121 y(language)e(for)e(that)h(information)g(as)g(describ)s(ed)e(in)h (the)h Fi(cscope)p Fo(\(1\))f(man)m(ual)h(page.)66 b Fn(Nvi)39 b Fo(con)m(tains)150 5230 y(an)i(in)m(terface)h(to)g(the)f Fn(cscop)s(e)h Fo(query)e(language)j(whic)m(h)e(p)s(ermits)f(y)m(ou)h (to)h(query)e Fn(cscop)s(e)i Fo(and)e(then)150 5340 y(sequen)m(tially) 31 b(step)e(through)g(the)g(lo)s(cations)i(in)e(the)g(sources)h (\014les)f(whic)m(h)g Fn(cscop)s(e)h Fo(returns.)39 b(There)29 b(are)p eop end %%Page: 7 10 TeXDict begin 7 9 bop 150 -116 a Fo(Chapter)30 b(8:)41 b(T)-8 b(ags,)31 b(T)-8 b(ag)32 b(Stac)m(ks,)f(and)f(Cscop)s(e)1904 b(7)150 299 y(t)m(w)m(o)31 b Fn(n)m(vi)f Fo(commands)g(whic)m(h)f(supp) s(ort)f(this)i(abilit)m(y)h(to)g(step)f(through)f(m)m(ultiple)h(lo)s (cations.)42 b(They)30 b(are)150 408 y(the)e Fn(ex)h Fo(commands)f Fn(tagnext)i Fo(and)d Fn(tagprev)i Fo(.)40 b(The)28 b Fn(tagnext)i Fo(command)e(mo)m(v)m(es)h(to)g(the)g(next)f (lo)s(cation)150 518 y(for)k(the)h(curren)m(t)f(tag.)48 b(The)32 b Fn(tagprev)h Fo(command)f(mo)m(v)m(es)i(to)f(the)g(previous) e(lo)s(cation)j(for)f(the)f(curren)m(t)150 628 y(tag.)74 b(\(See)42 b(the)f Fn(tagnext)i Fo(and)d Fn(tagprev)i Fo(command)f(discussion)f(in)h(the)g Fn(ex)h Fo(commands)f(section)h (of)150 737 y(this)33 b(man)m(ual)g(for)f(more)h(information.\))49 b(A)m(t)33 b(an)m(y)h(time)f(during)f(this)g(sequen)m(tial)i(w)m(alk,)h (y)m(ou)e(ma)m(y)g(use)150 847 y(the)f Fi(<)p Fn(con)m(trol-])p Fi(>)j Fo(,)d Fn(tag)h Fo(or)g Fn(cscop)s(e)f Fo(commands)g(to)h(mo)m (v)m(e)g(to)g(a)g(new)f(tag)h(con)m(text,)i(and)c(then)h(use)g(the)150 956 y Fi(<)p Fn(con)m(trol-T)p Fi(>)c Fo(or)e Fn(tagp)s(op)h Fo(commands)f(to)h(return)e(and)h(con)m(tin)m(ue)h(stepping)f(through)g (the)g(lo)s(cations)i(for)150 1066 y(this)g(tag.)41 b(This)27 b(is)h(similar)h(to)f(the)h(previous)e(mo)s(del)h(of)g(a)h(simple)f (tag)h(stac)m(k,)h(except)f(that)f(eac)m(h)i(en)m(try)150 1176 y(in)g(the)h(tag)g(stac)m(k)h(ma)m(y)f(ha)m(v)m(e)h(more)e(than)g (one)h(\014le)f(con)m(text)j(that)e(is)f(of)h(in)m(terest.)275 1318 y(Although)h(there)g(is)g(no)g(widely)h(distributed)e(v)m(ersion)h (of)h Fi(ctags)p Fo(\(1\))f(that)g(creates)i(tags)f(\014les)f(with)150 1428 y(m)m(ultiple)c(lo)s(cations)h(p)s(er)e(tag,)j Fn(n)m(vi)e Fo(has)f(b)s(een)g(written)h(to)g(understand)e(the)i(ob)m(vious)g (extension)g(to)h(the)150 1537 y(historic)36 b(tags)f(\014le)g(format,) i(i.e.,)g(more)e(than)g(a)g(single)h(line)f(in)g(the)g(tags)h(\014le)f (with)f(the)h(same)h(initial)150 1647 y(tag)f(name.)51 b(If)34 b(y)m(ou)g(wish)f(to)h(extend)g(y)m(our)g Fn(ctags)h Fo(implemen)m(tation)h(or)e(other)g(to)s(ol)g(with)g(whic)m(h)g(y)m(ou) 150 1756 y(build)29 b(tags)j(\014les,)e(this)h(extension)g(should)e(b)s (e)h(simple)g(and)g(will)h(require)f(no)g(c)m(hanges)h(to)g Fn(n)m(vi)g Fo(.)275 1899 y(The)i Fn(n)m(vi)g Fo(and)g Fn(cscop)s(e)h Fo(in)m(terface)i(is)d(based)h(on)f(the)h(new)f Fn(ex)h Fo(command)f Fn(cscop)s(e)h Fo(,)h(whic)m(h)e(has)h(\014v)m(e) 150 2008 y(sub)s(commands:)52 b Fn(add)36 b Fo(,)j Fn(\014nd)d Fo(,)i Fn(help)f Fo(,)i Fn(kill)f Fo(and)e Fn(reset)i Fo(.)61 b(The)36 b(sub)s(command)f Fn(\014nd)h Fo(itself)i(has)f(eigh)m (t)150 2118 y(sub)s(commands:)i Fn(c)30 b Fo(,)h Fn(d)f Fo(,)g Fn(e)h Fo(,)g Fn(f)f Fo(,)g Fn(g)h Fo(,)g Fn(i)f Fo(,)h Fn(s)f Fo(and)g Fn(t)g Fo(.)225 2260 y Fm(\017)60 b Fn(cs[cop)s(e])32 b(a[dd])e(\014le)330 2399 y Fo(The)22 b Fn(add)g Fo(command)h(attac)m(hes)i(to)e(the)g(sp)s(eci\014ed)f Fn(cscop)s(e)i Fo(database.)39 b(The)22 b(\014le)h(name)g(is)g (expanded)330 2508 y(using)35 b(the)g(standard)f(\014lename)h (expansions.)54 b(If)35 b Fn(\014le)g Fo(is)g(a)h(directory)-8 b(,)37 b(the)e(\014le)g(\\cscop)s(e.out")i(in)330 2618 y(that)31 b(directory)g(is)f(used)g(as)g(the)h(database.)330 2756 y(After)37 b Fn(n)m(vi)g Fo(attac)m(hes)i(to)f(a)f(new)g (database,)i(all)f(subsequen)m(t)e Fn(cscop)s(e)i Fo(queries)f(will)g (b)s(e)f(ask)m(ed)i(of)330 2866 y(that)29 b(database.)41 b(The)28 b(result)h(of)f(an)m(y)h(single)h(query)e(is)g(the)h (collection)i(of)e(resp)s(onse)e(to)j(the)f(query)330 2975 y(from)h(all)h(of)g(the)f(attac)m(hed)i(databases.)330 3223 y(If)h(the)h(\\CSCOPE)p 1013 3223 28 4 v 39 w(DIRS")g(en)m (vironmen)m(tal)h(v)-5 b(ariable)34 b(is)g(set)g(when)f Fn(n)m(vi)h Fo(is)f(run,)h(it)g(is)g(exp)s(ected)330 3333 y(to)c(b)s(e)f(a)h Fi(<)p Fo(colon)p Fi(>)f Fo(or)h Fi(<)p Fo(blank)p Fi(>)p Fo(-separated)f(list)h(of)g Fn(cscop)s(e)f Fo(databases)i(or)e(directories)h(con)m(taining)330 3442 y Fn(cscop)s(e)h Fo(databases,)g(to)g(whic)m(h)f(the)h(user)f (wishes)g(to)h(attac)m(h.)225 3581 y Fm(\017)60 b Fn(:cs[cop)s(e])32 b(f[ind])e(c)p Fi(|)p Fn(d)p Fi(|)p Fn(e)p Fi(|)p Fn(f)p Fi(|)p Fn(g)p Fi(|)p Fn(i)p Fi(|)p Fn(s)p Fi(|)p Fn(t)g(bu\013er)p Fi(|)p Fn(pattern)330 3719 y Fo(The)41 b Fn(\014nd)e Fo(command)j(is)f(the)g Fn(cscop)s(e)h Fo(query)f(command)g(for)g Fn(n)m(vi)g Fo(.)74 b(F)-8 b(or)42 b(this)f(command,)j Fn(n)m(vi)330 3829 y Fo(queries)31 b(all)h(attac)m(hed)g Fn(cscop)s(e)g Fo(databases)f(for)g(the)g(pattern.)43 b(If)30 b(the)h(pattern)g(is)g(a)g(double-quote)330 3938 y(c)m(haracter)24 b(follo)m(w)m(ed)g(b)m(y)e(a)g(v)-5 b(alid)23 b(bu\013er)e(name)h(\(e.g.,)k Fi("<)p Fo(c)m(haracter)p Fi(>")d Fo(\),)h(then)e(the)g(con)m(ten)m(ts)i(of)f(the)330 4048 y(named)29 b(bu\013er)f(are)h(used)f(as)h(the)h(pattern.)40 b(Otherwise,)29 b(the)g(pattern)g(is)h(a)f(Regular)g(Expression.)330 4296 y(The)d Fn(\014nd)e Fo(command)i(pushes)f(the)h(curren)m(t)g(lo)s (cation)i(on)m(to)f(the)g(tags)g(stac)m(k,)h(and)e(switc)m(hes)h(to)g (the)330 4406 y(\014rst)j(lo)s(cation)i(resulting)e(from)g(the)h(query) -8 b(,)30 b(if)g(the)h(query)f(returned)f(at)i(least)h(one)e(result.) 330 4654 y(File)37 b(names)f(returned)f(b)m(y)i(the)f Fn(cscop)s(e)h Fo(query)-8 b(,)37 b(if)f(not)h(absolute)g(paths,)g(are) g(searc)m(hed)f(for)g(rel-)330 4763 y(ativ)m(e)42 b(to)f(the)g (directory)f(where)g(the)h Fn(cscop)s(e)f Fo(database)h(is)g(lo)s (cated.)71 b(In)40 b(addition,)j(if)d(the)h(\014le)330 4873 y(\\cscop)s(e.tpath")31 b(app)s(ears)d(in)h(the)h(same)f (directory)h(as)f(the)h Fn(cscop)s(e)f Fo(database,)i(it)e(is)h(exp)s (ected)f(to)330 4982 y(con)m(tain)c(a)g(colon-separated)g(list)g(of)f (directory)g(names)g(where)g(\014les)f(referenced)h(b)m(y)g(its)g(asso) s(ciated)330 5092 y Fn(cscop)s(e)31 b Fo(database)g(ma)m(y)g(b)s(e)f (found.)330 5340 y(The)g Fn(\014nd)f Fo(sub)s(command)f(is)j(one)f(of)h (the)f(follo)m(wing:)p eop end %%Page: 8 11 TeXDict begin 8 10 bop 150 -116 a Fo(Chapter)30 b(9:)41 b(Regular)31 b(Expressions)e(and)h(Replacemen)m(t)i(Strings)1260 b(8)330 299 y(c)440 b(Find)30 b(callers)h(of)g(the)g(name.)330 466 y(d)429 b(Find)30 b(all)h(function)f(calls)i(made)e(from)g(name.) 330 632 y(e)440 b(Find)30 b(pattern.)330 799 y(f)452 b(Find)30 b(\014les)g(with)g(name)h(as)f(substring.)330 966 y(g)435 b(Find)30 b(de\014nition)g(of)g(name.)330 1132 y(i)455 b(Find)30 b(\014les)g(#including)g(name.)330 1299 y(s)444 b(Find)30 b(all)h(uses)f(of)h(name.)330 1466 y(t)445 b(Find)30 b(assignmen)m(ts)h(to)g(name.)225 1604 y Fm(\017)60 b Fn(:cs[cop)s(e])32 b(h[elp])f([command])330 1742 y Fo(List)24 b(the)h Fn(cscop)s(e)f Fo(commands,)i(or)e (optionally)i(list)e(usage)h(help)f(for)g(an)m(y)g(single)h Fn(cscop)s(e)g Fo(command.)225 1880 y Fm(\017)60 b Fn(:displa)m(y)31 b(c[onnections])330 2019 y Fo(Displa)m(y)h(the)e(list)h(of)g Fn(cscop)s(e)g Fo(databases)g(to)g(whic)m(h)f Fn(n)m(vi)g Fo(is)h(curren)m(tly)f(connected.)225 2157 y Fm(\017)60 b Fn(:cs[cop)s(e])32 b(k[ill])g(#)330 2295 y Fo(Disconnect)22 b(from)f(a)g(sp)s(eci\014c)g Fn(cscop)s(e)g Fo(database.)39 b(The)20 b(connection)i(n)m(um)m(b)s(er)e(is)h(the)g(one)g(displa)m(y)m (ed)330 2404 y(b)m(y)30 b(the)h Fn(ex)g(displa)m(y)f(connections)h Fo(command.)225 2543 y Fm(\017)60 b Fn(:cs[cop)s(e])32 b(r[eset])330 2681 y Fo(Disconnect)g(from)e(all)h(attac)m(hed)h Fn(cscop)s(e)f Fo(databases.)275 2851 y(Cscop)s(e)21 b(is)g(not)g(freely)h(redistributable)f(soft)m(w)m(are,)k(but)20 b(is)i(fairly)f(inexp)s(ensiv)m(e)g(and)g(easily)h(a)m(v)-5 b(ailable.)150 2961 y(T)d(o)31 b(purc)m(hase)f(a)h(cop)m(y)g(of)f Fn(cscop)s(e)h Fo(,)g(see)g(h)m(ttp://www.att.com/ssg/pro)s(ducts/to)s (olc)m(hest.h)m(tml.)150 3258 y Fl(9)80 b(Regular)54 b(Expressions)d(and)j(Replacemen)l(t)e(Strings)150 3514 y Fo(Regular)29 b(expressions)f(are)h(used)e(in)i(line)f(addresses,)h (as)g(the)f(\014rst)g(part)g(of)h(the)f Fn(ex)h(substitute)g Fo(,)g Fn(global)150 3623 y Fo(,)i(and)e Fn(v)i Fo(commands,)f(and)g (in)g(searc)m(h)h(patterns.)275 3765 y(The)h(regular)i(expressions)f (supp)s(orted)f(b)m(y)h Fn(ex)p Fo(/)p Fn(vi)h Fo(are,)h(b)m(y)f (default,)g(the)g(Basic)h(Regular)e(Expres-)150 3875 y(sions)26 b(\(BRE's\))h(describ)s(ed)e(in)g(the)i(IEEE)e(POSIX)g (Standard)g(1003.2.)42 b(The)25 b Fi(extended)f Fo(option)j(causes)150 3984 y(all)45 b(regular)g(expressions)f(to)h(b)s(e)f(in)m(terpreted)h (as)f(the)h(Extended)f(Regular)h(Expressions)f(\(ERE's\))150 4094 y(describ)s(ed)f(b)m(y)g(the)h(same)g(standard.)80 b(\(See)45 b Fi(re_format)p Fo(\(7\))d(for)h(more)h(information.\))82 b(Generally)150 4204 y(sp)s(eaking,)35 b(BRE's)f(are)h(the)f(Regular)h (Expressions)e(found)f(in)i Fi(ed)p Fo(\(1\))h(and)e Fi(grep)p Fo(\(1\),)i(and)f(ERE's)g(are)150 4313 y(the)d(Regular)f (Expressions)g(found)f(in)h Fi(egrep)p Fo(\(1\).)275 4455 y(The)42 b(follo)m(wing)i(is)f(not)g(in)m(tended)g(to)g(pro)m (vide)g(a)g(description)g(of)g(Regular)g(Expressions.)77 b(The)150 4565 y(information)32 b(here)h(only)f(describ)s(es)f(strings) h(and)g(c)m(haracters)h(whic)m(h)f(ha)m(v)m(e)i(sp)s(ecial)f(meanings)f (in)g(the)150 4674 y Fn(ex)p Fo(/)p Fn(vi)37 b Fo(v)m(ersion)f(of)g (RE's,)h(or)f(options)g(whic)m(h)f(c)m(hange)i(the)f(meanings)g(of)g(c) m(haracters)h(that)g(normally)150 4784 y(ha)m(v)m(e)32 b(sp)s(ecial)f(meanings)f(in)g(RE's.)199 4926 y(1.)61 b(An)30 b(empt)m(y)h(RE)f(\(e.g.)42 b(\\)p Fi(//)p Fo(")31 b(or)f(\\)p Fi(??)p Fo(")h(is)f(equiv)-5 b(alen)m(t)32 b(to)f(the)g(last)g(RE)f(used.)199 5064 y(2.)61 b(The)30 b(construct)h(\\)p Fi(\\e<)p Fo(")f(matc)m(hes)i(the)e(b)s(eginning)g (of)g(a)h(w)m(ord.)199 5202 y(3.)61 b(The)30 b(construct)h(\\)p Fi(\\e>)p Fo(")f(matc)m(hes)i(the)e(end)g(of)g(a)h(w)m(ord.)199 5340 y(4.)61 b(The)30 b(c)m(haracter)i(\\)p Fi(~)p Fo(")f(matc)m(hes)g (the)g(replacemen)m(t)h(part)e(of)g(the)h(last)g Fn(substitute)g Fo(command.)p eop end %%Page: 9 12 TeXDict begin 9 11 bop 150 -116 a Fo(Chapter)30 b(10:)41 b(Scripting)30 b(Languages)2241 b(9)275 299 y(When)31 b(the)h Fi(magic)e Fo(option)i(is)g Fp(not)41 b Fo(set,)32 b(the)g(only)g(c)m(haracters)h(with)e(sp)s(ecial)i(meanings)e(are)h(a)g (\\)p Fi(^)p Fo(")150 408 y(c)m(haracter)d(at)f(the)f(b)s(eginning)f (of)i(an)f(RE,)g(a)h(\\)p Fi($)p Fo(")f(c)m(haracter)i(at)f(the)f(end)g (of)g(an)g(RE,)g(and)g(the)g(escaping)150 518 y(c)m(haracter)37 b(\\)p Fi(\\e)p Fo(".)57 b(The)35 b(c)m(haracters)j(\\)p Fi(.)p Fo(",)f(\\)p Fi(*)p Fo(",)h(\\)p Fi([)p Fo(")e(and)g(\\)p Fi(~)p Fo(")g(are)g(treated)h(as)e(ordinary)g(c)m(haracters)150 628 y(unless)30 b(preceded)g(b)m(y)g(a)h(\\)p Fi(\\e)p Fo(";)g(when)e(preceded)h(b)m(y)g(a)h(\\)p Fi(\\e)p Fo(")g(they)f (regain)h(their)g(sp)s(ecial)g(meaning.)275 760 y(Replacemen)m(t)h (strings)e(are)h(the)f(second)h(part)f(of)g(a)h Fn(substitute)g Fo(command.)275 891 y(The)k(c)m(haracter)j(\\)p Fi(&)p Fo(")f(\(or)f(\\)p Fi(\\e&)p Fo(")g(if)g(the)g Fi(magic)f Fo(option)i(is)f Fp(not)45 b Fo(set\))37 b(in)f(the)g(replacemen)m(t)i (string)150 1001 y(stands)27 b(for)h(the)g(text)h(matc)m(hed)g(b)m(y)e (the)i(RE)e(that)i(is)f(b)s(eing)f(replaced.)40 b(The)28 b(c)m(haracter)h(\\)p Fi(~)p Fo(")g(\(or)f(\\)p Fi(\\e~)p Fo(")150 1111 y(if)35 b(the)g Fi(magic)f Fo(option)h(is)g Fp(not)44 b Fo(set\))36 b(stands)f(for)f(the)i(replacemen)m(t)g(part)f (of)g(the)g(previous)g Fn(substitute)150 1220 y Fo(command.)40 b(It)31 b(is)f(only)h(v)-5 b(alid)31 b(after)f(a)h Fn(substitute)g Fo(command)f(has)g(b)s(een)g(p)s(erformed.)275 1352 y(The)c(string)h (\\)p Fi(\\e#)p Fo(",)i(where)d(\\)p Fi(#)p Fo(")i(is)f(an)h(in)m (teger)g(v)-5 b(alue)28 b(from)f(1)g(to)h(9,)h(stands)d(for)h(the)h (text)g(matc)m(hed)150 1462 y(b)m(y)i(the)g(p)s(ortion)f(of)h(the)g(RE) g(enclosed)g(in)g(the)g(\\)p Fi(#)p Fo("'th)g(set)h(of)f(escap)s(ed)g (paren)m(theses,)g(e.g.)42 b(\\)p Fi(\\e\()p Fo(")30 b(and)150 1571 y(\\)p Fi(\\e\))p Fo(".)40 b(F)-8 b(or)31 b(example,)g(\\)p Fi(s/abc\\e\(.*\\e\)def/\\e1/)p Fo(")24 b(deletes)31 b(the)f(strings)f(\\)p Fi(abc)p Fo(")h(and)f(\\)p Fi(def)p Fo(")g(from)150 1681 y(the)i(matc)m(hed)g(pattern.)275 1813 y(The)43 b(strings)g(\\)p Fi(\\el)p Fo(",)k(\\)p Fi(\\eu)p Fo(",)h(\\)p Fi(\\eL)p Fo(")43 b(and)g(\\)p Fi(\\eU)p Fo(")h(can)g(b)s(e)f(used)g(to)h(mo)s(dify)f(the)h(case)h(of) f(ele-)150 1922 y(men)m(ts)38 b(in)g(the)g(replacemen)m(t)i(string.)63 b(The)38 b(string)g(\\)p Fi(\\el)p Fo(")g(causes)g(the)g(next)h(c)m (haracter)g(to)g(b)s(e)e(con-)150 2032 y(v)m(erted)43 b(to)g(lo)m(w)m(ercase;)50 b(the)42 b(string)g(\\)p Fi(\\eu)p Fo(")h(b)s(eha)m(v)m(es)f(similarly)-8 b(,)46 b(but)c(con)m(v)m(erts)h (to)g(upp)s(ercase)e(\(e.g.)150 2141 y Fi(s/abc/\\eU&/)p Fo(replaces)35 b(the)i(string)g Fi(abc)p Fo(with)f Fi(ABC)p Fo(\).)61 b(The)37 b(string)g(\\)p Fi(\\eL)p Fo(")g(causes)g(c)m (haracters)i(up)d(to)150 2251 y(the)c(end)e(of)i(the)f(string)h(or)f (the)h(next)f(o)s(ccurrence)h(of)g(the)f(strings)g(\\)p Fi(\\ee)p Fo(")h(or)f(\\)p Fi(\\eE)p Fo(")h(to)g(b)s(e)e(con)m(v)m (erted)150 2361 y(to)h(lo)m(w)m(ercase;)i(the)e(string)f(\\)p Fi(\\eU)p Fo(")g(b)s(eha)m(v)m(es)h(similarly)-8 b(,)32 b(but)e(con)m(v)m(erts)h(to)h(upp)s(ercase.)275 2492 y(If)26 b(the)h(en)m(tire)h(replacemen)m(t)g(pattern)f(is)g(\\)p Fi(\045)p Fo(",)i(then)d(the)h(last)h(replacemen)m(t)h(pattern)e(is)g (used)f(again.)275 2624 y(In)32 b Fn(vi)i Fo(,)g(inserting)g(a)g Fi()p Fo(in)m(to)d(the)j(replacemen)m(t)h(string)f(will)g (cause)g(the)f(matc)m(hed)i(line)150 2734 y(to)c(b)s(e)f(split)g(in)m (to)i(t)m(w)m(o)f(lines)g(at)g(that)g(p)s(oin)m(t.)41 b(\(The)30 b Fi()p Fo(will)e(b)s(e)h(discarded.\))150 3011 y Fl(10)80 b(Scripting)52 b(Languages)150 3232 y Fo(The)37 b Fn(n)m(vi)h Fo(editor)g(curren)m(tly)g(supp)s(orts)e(t)m(w) m(o)j(scripting)f(languages,)j(Tcl/Tk)d(and)f(P)m(erl.)64 b(\(Note)39 b(that)150 3341 y(P)m(erl4)45 b(isn't)f(su\016cien)m(t,)49 b(and)43 b(that)i(the)f(P)m(erl5)h(used)f(m)m(ust)g(b)s(e)f(v)m(ersion) i(5.002)h(or)e(later.)83 b(See)45 b(the)150 3451 y(\\)p Fn(Building)30 b(Nvi)p Fo(")h(section)h(for)e(more)h(information.)275 3583 y(The)j(scripting)h(language)h(in)m(terface)g(is)f(still)g(b)s (eing)g(w)m(ork)m(ed)g(on,)h(therefore)f(the)g(follo)m(wing)h(infor-) 150 3693 y(mation)42 b(is)f(probably)g(incomplete,)k(probably)c(wrong)f (in)h(cases,)k(and)c(lik)m(ely)i(to)f(c)m(hange.)74 b(See)42 b(the)150 3802 y Fi(perl_api)p Fo(and)37 b Fi(tcl_api)p Fo(source)g(directories)k(for)e(more)g(information.)68 b(As)40 b(a)f(quic)m(k)h(reference,)j(the)150 3912 y(follo)m(wing)27 b(function)e(calls)i(are)f(pro)m(vided)f(for)g(b)s(oth)g(the)h(P)m(erl) g(and)f(Tcl)h(in)m(terfaces.)40 b(The)25 b(P)m(erl)h(in)m(terface)150 4021 y(uses)d(a)i(sligh)m(tly)g(di\013eren)m(t)f(naming)g(con)m(v)m(en) m(tion,)k(e.g.)39 b(\\viFindScreen")25 b(is)e(named)h (\\VI::FindScreen".)225 4153 y Fm(\017)60 b Fn(viFindScreen)30 b(\014le)330 4285 y Fo(Return)g(the)g Fi(screenId)p Fo(asso)s(ciated)g (with)g Fi(file)p Fo(.)225 4417 y Fm(\017)60 b Fn(viApp)s(endLine)28 b(screenId)i(lineNum)m(b)s(er)g(text)330 4549 y Fo(App)s(end)e Fi(text)p Fo(as)i(a)h(new)f(line)g(after)h(line)g(n)m(um)m(b)s(er)e Fi(lineNumber)p Fo(,)f(in)i(the)g(screen)h Fi(screenId)p Fo(.)225 4681 y Fm(\017)60 b Fn(viDelLine)31 b(screenId)f(lineNum)330 4813 y Fo(Delete)j(the)d(line)h Fi(lineNumber)p Fo(from)c(the)k(screen) f Fi(screenId)p Fo(.)225 4944 y Fm(\017)60 b Fn(viGetLine)32 b(screenId)e(lineNum)m(b)s(er)330 5076 y Fo(Return)g(the)g(line)h Fi(lineNumber)p Fo(from)c(the)k(screen)f Fi(screenId)p Fo(.)225 5208 y Fm(\017)60 b Fn(viInsertLine)31 b(screenId)f(lineNum)m (b)s(er)g(text)330 5340 y Fo(Insert)g Fi(text)p Fo(as)f(a)i(new)f(line) h(b)s(efore)f(line)g(n)m(um)m(b)s(er)f Fi(lineNumber)p Fo(in)f(the)i(screen)h Fi(screenId)p Fo(.)p eop end %%Page: 10 13 TeXDict begin 10 12 bop 150 -116 a Fo(Chapter)30 b(11:)41 b(General)32 b(Editor)e(Description)1922 b(10)225 299 y Fm(\017)60 b Fn(viLastLine)30 b(screenId)330 436 y Fo(Return)g(the)g(line)h(n)m(um)m(b)s(er)e(of)h(the)h(last)g(line)g(in) f(the)h(screen)f Fi(screenId)p Fo(.)225 573 y Fm(\017)60 b Fn(viSetLine)31 b(screenId)f(lineNum)m(b)s(er)g(text)330 710 y Fo(Change)g(the)h(line)g Fi(lineNumber)p Fo(in)c(the)j(screen)h Fi(screenId)p Fo(to)e(matc)m(h)i(the)g(sp)s(eci\014ed)e Fi(text)p Fo(.)225 847 y Fm(\017)60 b Fn(viGetMark)32 b(screenId)f(mark)330 984 y Fo(Return)f(the)g(curren)m(t)g(line)h(and)f (column)g(for)g(the)h(sp)s(eci\014ed)e Fi(mark)p Fo(from)g(the)i (screen)f Fi(screenId)p Fo(.)225 1121 y Fm(\017)60 b Fn(viSetMark)31 b(screenId)g(mark)f(line)h(column)330 1259 y Fo(Set)g(the)f(sp)s(eci\014ed)g Fi(mark)p Fo(to)g(b)s(e)g(at)h (line)f Fi(line)p Fo(,)g(column)g Fi(column)p Fo(,)f(in)h(the)h(screen) f Fi(screenId)p Fo(.)225 1396 y Fm(\017)60 b Fn(viGetCursor)31 b(screenId)330 1533 y Fo(Return)f(the)g(curren)m(t)g(line)h(and)f (column)g(for)g(the)h(cursor)e(in)h(the)h(screen)g Fi(screenId)p Fo(.)225 1670 y Fm(\017)60 b Fn(viSetCursor)30 b(screenId)h(line)f (column)330 1807 y Fo(Set)h(the)f(cursor)g(in)g(the)g(screen)h Fi(screenId)p Fo(to)e(the)h(sp)s(eci\014ed)g Fi(line)p Fo(and)f Fi(column)p Fo(.)225 1944 y Fm(\017)60 b Fn(viMsg)31 b(screenId)g(text)330 2081 y Fo(Displa)m(y)h(the)e(sp)s(eci\014ed)g Fi(text)p Fo(as)f(a)i(vi)g(message)g(in)f(the)h(screen)f Fi(screenId)p Fo(.)225 2218 y Fm(\017)60 b Fn(viNewScreen)31 b(screenId)f([\014le])330 2355 y Fo(Create)h(a)g(new)f(screen.)225 2492 y Fm(\017)60 b Fn(viEndScreen)29 b(screenId)330 2629 y Fo(Exit)i(the)f(screen)h Fi(screenId)p Fo(.)225 2767 y Fm(\017)60 b Fn(viSwitc)m(hScreen)31 b(screenId)f(screenId)330 2904 y Fo(Switc)m(h)g(from)g(the)h(screen)f Fi(screenId)p Fo(to)f(the)i(screen)f Fi(screenId)p Fo(.)225 3041 y Fm(\017)60 b Fn(viMapKey)31 b(screenId)g(k)m(ey)g(tclpro)s(c)330 3178 y Fo(Map)g(the)f(sp)s(eci\014ed)g Fi(key)p Fo(in)f(the)i(screen)f Fi(screenId)p Fo(to)f(the)i(Tcl)f(pro)s(cedure)f Fi(tclproc)p Fo(.)225 3315 y Fm(\017)60 b Fn(viUnmMapKey)30 b(screenId)h(k)m(ey)330 3452 y Fo(Unmap)f(the)g(sp)s(eci\014ed)g Fi(key)p Fo(in)f(the)i(screen) f Fi(screenId)225 3589 y Fm(\017)60 b Fn(viGetOpt)32 b(screenId)e(option)330 3726 y Fo(Return)g(the)g(v)-5 b(alue)31 b(of)g(the)f(sp)s(eci\014ed)g Fi(option)p Fo(from)e(the)j (screen)f Fi(screenId)p Fo(.)225 3863 y Fm(\017)60 b Fn(viSetOpt)31 b(screenId)g(command)330 4000 y Fo(Set)g(one)f(or)h (more)f(options)h(in)f(the)g(screen)h Fi(screenId)p Fo(.)150 4293 y Fl(11)80 b(General)53 b(Editor)f(Description)150 4543 y Fo(When)33 b Fn(ex)g Fo(or)g Fn(vi)g Fo(are)g(executed,)i(the)e (text)h(of)f(a)g(\014le)g(is)g(read)g(\(or)h(a)f(temp)s(orary)f(\014le) h(is)g(created\),)j(and)150 4652 y(then)41 b(all)g(editing)h(c)m (hanges)f(happ)s(en)f(within)g(the)h(con)m(text)i(of)e(the)g(cop)m(y)g (of)g(the)g(\014le.)72 b Fp(No)42 b(changes)150 4762 y(a\013e)-5 b(ct)36 b(the)g(actual)g(\014le)g(until)g(the)f(\014le)h (is)g(written)g(out)p Fo(,)f(either)f(using)f(a)h(write)g(command)f(or) h(another)150 4872 y(command)c(whic)m(h)g(is)h(a\013ected)h(b)m(y)e (the)g Fi(autowrite)e Fo(option.)275 5011 y(All)34 b(\014les)f(are)h (lo)s(c)m(k)m(ed)h(\(using)f(the)g Fi(flock)p Fo(\(2\))f(or)h Fi(fcntl)p Fo(\(2\))f(in)m(terfaces\))i(during)e(the)g(edit)i(session,) 150 5121 y(to)d(a)m(v)m(oid)h(inadv)m(erten)m(tly)f(making)g(mo)s (di\014cations)f(to)h(m)m(ultiple)g(copies)g(of)f(the)h(\014le.)43 b(If)31 b(a)g(lo)s(c)m(k)h(cannot)150 5230 y(b)s(e)g(obtained)i(for)e (a)i(\014le)f(b)s(ecause)g(it)g(is)g(lo)s(c)m(k)m(ed)i(b)m(y)d(another) i(pro)s(cess,)f(the)g(edit)g(session)h(is)f(read-only)150 5340 y(\(as)e(if)f(the)h Fi(readonly)d Fo(option)i(or)h(the)f Fn(-R)h Fo(\015ag)g(had)e(b)s(een)h(sp)s(eci\014ed\).)40 b(If)30 b(a)h(lo)s(c)m(k)g(cannot)g(b)s(e)f(obtained)p eop end %%Page: 11 14 TeXDict begin 11 13 bop 150 -116 a Fo(Chapter)30 b(11:)41 b(General)32 b(Editor)e(Description)1922 b(11)150 299 y(for)40 b(other)g(reasons,)j(the)d(edit)h(session)f(will)g(con)m(tin)m (ue,)k(but)c(the)g(\014le)g(status)g(information)h(\(see)g(the)150 408 y Fi(<)p Fn(con)m(trol-G)p Fi(>)32 b Fo(command\))f(will)g (re\015ect)g(this)f(fact.)275 542 y(Both)37 b Fn(ex)g Fo(and)f Fn(vi)g Fo(are)h(mo)s(deful)f(editors,)i(i.e.)g(they)f(ha)m(v) m(e)h(t)m(w)m(o)f(mo)s(des,)h(\\command")f(mo)s(de)g(and)150 651 y(\\text)24 b(input")f(mo)s(de.)38 b(The)22 b(former)g(is)h(in)m (tended)g(to)h(p)s(ermit)e(y)m(ou)h(to)h(en)m(ter)g(commands)e(whic)m (h)h(mo)s(di\014es)150 761 y(already)38 b(existing)g(text.)63 b(The)37 b(latter)i(is)e(in)m(tended)h(to)g(p)s(ermit)f(y)m(ou)g(to)i (en)m(ter)f(new)f(text.)62 b(When)38 b Fn(ex)150 870 y Fo(\014rst)27 b(starts)i(running,)e(it)h(is)g(in)g(command)g(mo)s (de,)g(and)f(usually)h(displa)m(ys)g(a)g(prompt)g(\(see)g(the)h Fi(prompt)150 980 y Fo(option)i(for)f(more)h(information\).)41 b(The)30 b(prompt)g(is)g(a)h(single)g(colon)g(\\)p Fi(:)p Fo(")g(c)m(haracter.)43 b(There)30 b(are)h(three)150 1089 y(commands)25 b(that)h(switc)m(h)f Fn(ex)h Fo(in)m(to)g(text)h (input)d(mo)s(de:)38 b Fn(app)s(end)23 b Fo(,)j Fn(c)m(hange)h Fo(and)d Fn(insert)i Fo(.)39 b(Once)25 b(in)g(input)150 1199 y(mo)s(de,)j(en)m(tering)h(a)f(line)h(con)m(taining)g(only)f(a)h (single)f(p)s(erio)s(d)f(\\)p Fi(.)p Fo(")h(ends)f(text)i(input)e(mo)s (de)h(and)f(returns)150 1309 y(to)k(command)f(mo)s(de,)g(where)g(the)h (prompt)e(is)i(redispla)m(y)m(ed.)275 1442 y(When)24 b Fn(vi)g Fo(\014rst)g(starts)h(running,)f(it)h(is)f(in)g(command)h(mo) s(de)e(as)i(w)m(ell.)40 b(There)24 b(are)h(elev)m(en)g(commands)150 1551 y(that)37 b(switc)m(h)f Fn(vi)g Fo(in)m(to)h(text)g(input)e(mo)s (de:)51 b Fn(A)36 b Fo(,)g Fn(a)g Fo(,)h Fn(C)f Fo(,)g Fn(c)g Fo(,)i Fn(I)e Fo(,)g Fn(i)g Fo(,)i Fn(O)e Fo(,)g Fn(o)g Fo(,)i Fn(R)d Fo(,)i Fn(S)e Fo(and)g Fn(s)h Fo(.)57 b(Once)36 b(in)150 1661 y(input)26 b(mo)s(de,)i(en)m(tering)g(an)f Fi()p Fo(c)m(haracter)f(ends)g(text)i(input)e(mo)s(de)h(and)g (returns)e(to)j(command)150 1771 y(mo)s(de.)275 1904 y Fn(Ex)p Fo(/)p Fn(vi)42 b Fo(presen)m(t)g(three)g(di\013eren)m(t)h (in)m(terfaces)g(to)g(editing)g(a)f(\014le.)76 b Fn(Ex)42 b Fo(presen)m(ts)g(a)h(line)f(orien)m(ted)150 2013 y(in)m(terface.)g Fn(Vi)29 b Fo(presen)m(ts)g(a)g(full)g(screen)g(displa)m(y)g(orien)m (ted)h(in)m(terface,)h(also)f(kno)m(wn)f(as)g(\\visual)h(mo)s(de".)150 2123 y(In)c(addition,)h(there)g(is)f(a)h(third)e(mo)s(de,)i(\\op)s(en)f (mo)s(de",)h(whic)m(h)f(is)h(line)f(orien)m(ted,)j(but)c(supp)s(orts)g (cursor)150 2232 y(mo)m(v)m(emen)m(t)37 b(and)e(editing)h(within)f(the) h(displa)m(y)m(ed)g(line,)h(similarly)f(to)h(visual)e(mo)s(de.)56 b(Op)s(en)34 b(mo)s(de)h(is)150 2342 y(not)c(y)m(et)g(implemen)m(ted)g (in)f Fn(n)m(vi)h Fo(.)275 2475 y(The)26 b(follo)m(wing)i(w)m(ords)e (ha)m(v)m(e)h(sp)s(ecial)h(meanings)e(in)g(b)s(oth)g(the)h Fn(ex)g Fo(and)f Fn(vi)g Fo(command)h(descriptions:)225 2608 y Fm(\017)60 b Fi(<)p Fn(in)m(terrupt)p Fi(>)330 2741 y Fo(The)21 b(in)m(terrupt)g(c)m(haracter)i(is)f(used)e(to)j(in)m (terrupt)e(the)h(curren)m(t)f(op)s(eration.)38 b(Normally)22 b Fi()p Fo(,)30 b(whatev)m(er)h(c)m(haracter)h (is)f(set)f(for)h(the)f(curren)m(t)g(terminal)h(is)g(used.)225 2984 y Fm(\017)60 b Fi(<)p Fn(literal-next)p Fi(>)330 3117 y Fo(The)30 b(literal)i(next)f(c)m(haracter)h(is)e(used)g(to)h (escap)s(e)g(the)g(subsequen)m(t)e(c)m(haracter)k(from)d(an)m(y)g(sp)s (ecial)330 3226 y(meaning.)57 b(This)36 b(c)m(haracter)h(is)f(alw)m(a)m (ys)h Fi()p Fo(.)54 b(If)36 b(the)g(terminal)g(is)g(not)g (set)h(up)d(to)j(do)330 3336 y(X)m(ON/X)m(OFF)32 b(\015o)m(w)f(con)m (trol,)h(then)e Fi()p Fo(is)d(used)j(to)h(mean)f(literal)i (next)f(as)f(w)m(ell.)225 3469 y Fm(\017)60 b Fn(curren)m(t)31 b(pathname)330 3602 y Fo(The)38 b(pathname)g(of)g(the)h(\014le)f (curren)m(tly)g(b)s(eing)g(edited)h(b)m(y)f(vi.)64 b(When)39 b(the)f(p)s(ercen)m(t)g(c)m(haracter)330 3712 y(\\)p Fi(\045)p Fo(")31 b(app)s(ears)f(in)h(a)g(\014le)g(name)g(en)m(tered)g (as)g(part)g(of)g(an)f Fn(ex)h Fo(command)g(argumen)m(t,)g(it)h(is)e (replaced)330 3821 y(b)m(y)k(the)h(curren)m(t)g(pathname.)53 b(\(The)34 b(\\)p Fi(\045)p Fo(")h(c)m(haracter)i(can)e(b)s(e)f(escap)s (ed)g(b)m(y)h(preceding)f(it)h(with)g(a)330 3931 y(bac)m(kslash.\))225 4064 y Fm(\017)60 b Fn(alternate)32 b(pathname)330 4197 y Fo(The)d(name)i(of)f(the)g(last)h(\014le)f(name)g(men)m(tioned)g(in)g (an)g Fn(ex)g Fo(command,)g(or,)g(the)h(previous)e(curren)m(t)330 4307 y(pathname)40 b(if)f(the)h(last)h(\014le)e(men)m(tioned)i(b)s (ecomes)f(the)g(curren)m(t)f(\014le.)69 b(When)39 b(the)h(hash)f(mark) 330 4416 y(c)m(haracter)30 b(\\)p Fi(#)p Fo(")f(app)s(ears)e(in)i(a)f (\014le)h(name)f(en)m(tered)h(as)g(part)f(of)g(an)h Fn(ex)f Fo(command)h(argumen)m(t,)g(it)g(is)330 4526 y(replaced)j(b)m(y)f(the)h (alternate)h(pathname.)44 b(\(The)31 b(\\)p Fi(#)p Fo(")h(c)m(haracter) h(can)f(b)s(e)e(escap)s(ed)i(b)m(y)f(preceding)330 4635 y(it)g(with)f(a)h(bac)m(kslash.\))225 4769 y Fm(\017)60 b Fn(bu\013er)330 4902 y Fo(One)31 b(of)h(a)g(n)m(um)m(b)s(er)e(of)i (named)f(areas)h(for)g(sa)m(ving)g(copies)g(of)g(text.)46 b(Commands)30 b(that)i(c)m(hange)h(or)330 5011 y(delete)h(text)f(can)g (sa)m(v)m(e)h(the)f(c)m(hanged)g(or)g(deleted)g(text)h(in)m(to)f(a)g (sp)s(eci\014c)g(bu\013er,)f(for)g(later)i(use,)f(if)330 5121 y(the)c(command)f(allo)m(ws)i(it)f(\(i.e.)h(the)e Fn(ex)h(c)m(hange)h Fo(command)e(cannot)h(sa)m(v)m(e)h(the)f(c)m (hanged)g(text)g(in)g(a)330 5230 y(named)e(bu\013er\).)39 b(Bu\013ers)27 b(are)h(named)f(with)g(a)h(single)g(c)m(haracter,)i (preceded)d(b)m(y)g(a)h(double)f(quote,)330 5340 y(e.g.)41 b Fi("<)p Fo(c)m(haracter)p Fi(>")28 b Fo(in)f Fn(vi)g Fo(and)g(without)g(the)g(double)g(quote,)i(e.g.)41 b Fi()p Fo(,)25 b(in)i Fn(ex)g Fo(.)40 b(\(The)p eop end %%Page: 12 15 TeXDict begin 12 14 bop 150 -116 a Fo(Chapter)30 b(11:)41 b(General)32 b(Editor)e(Description)1922 b(12)330 299 y(double)26 b(quote)h(isn't)f(necessary)h(for)f Fn(ex)g Fo(b)s(ecause)g(bu\013ers)f(names)i(are)f(denoted)g(b)m(y)h(their)f(p)s (osition)330 408 y(in)35 b(the)h(command)f(line.\))57 b(Historic)36 b(implemen)m(tations)h(of)f Fn(ex)p Fo(/)p Fn(vi)g Fo(limited)h Fi()p Fo(to)c(the)330 518 y(alphan)m(umeric)40 b(c)m(haracters;)47 b Fn(nex)p Fo(/)p Fn(n)m(vi)40 b Fo(p)s(ermits)f(the)i(use)e(of)i(an)m(y)f(c)m (haracter)i(without)e(another)330 628 y(meaning)31 b(in)f(the)g(p)s (osition)h(where)f(a)g(bu\013er)g(name)g(is)h(exp)s(ected.)330 865 y(Bu\013ers)39 b(named)f(b)m(y)h(upp)s(ercase)f(c)m(haracters)i (are)g(the)f(same)g(as)g(bu\013ers)f(named)h(b)m(y)g(lo)m(w)m(ercase) 330 975 y(c)m(haracters,)47 b(e.g.)76 b(the)42 b(bu\013er)f(named)h(b)m (y)f(the)i(English)e(c)m(haracter)j(\\)p Fi(A)p Fo(")e(is)g(the)g(same) h(as)f(the)330 1084 y(bu\013er)31 b(named)g(b)m(y)h(the)f(c)m(haracter) j(\\)p Fi(a)p Fo(",)f(with)e(the)h(exception)h(that,)g(if)e(the)h (bu\013er)f(con)m(ten)m(ts)j(are)330 1194 y(b)s(eing)27 b(c)m(hanged)h(\(as)g(with)f(a)h(text)g(deletion)g(or)g Fn(vi)f(c)m(hange)h Fo(command\),)h(the)e(text)h(is)g Fp(app)-5 b(ende)g(d)39 b Fo(to)330 1303 y(the)31 b(bu\013er,)e (instead)i(of)f(replacing)h(the)g(curren)m(t)f(con)m(ten)m(ts.)330 1541 y(The)22 b(bu\013ers)g(named)h(b)m(y)f(the)h(n)m(umeric)g(c)m (haracters)h(\(in)f(English,)i(\\)p Fi(1)p Fo(")e(through)f(\\)p Fi(9)p Fo("\),)k(are)d(sp)s(ecial.)330 1650 y(If)28 b(a)h(region)g(of)g (text)g(including)f(c)m(haracters)i(from)e(more)h(than)f(one)h(line,)g (or)f(a)h(single)g(line)g(of)g(text)330 1760 y(sp)s(eci\014ed)38 b(b)m(y)g(using)g(a)h(line-orien)m(ted)i(motion,)g(is)e(c)m(hanged)g (or)g(deleted)g(in)f(the)h(\014le)g(using)f(the)330 1870 y Fn(vi)h(c)m(hange)h Fo(or)f Fn(delete)h Fo(commands,)h(a)f(cop)m(y)f (of)h(the)f(text)h(is)f(placed)g(in)m(to)h(the)f(n)m(umeric)g(bu\013er) 330 1979 y(\\)p Fi(1)p Fo(",)e(regardless)e(of)g(the)f(user)g(sp)s (ecifying)h(another)g(bu\013er)f(in)g(whic)m(h)g(to)i(sa)m(v)m(e)g(it.) 54 b(In)34 b(addition,)330 2089 y(there)28 b(are)g(a)g(few)f(commands)g (whic)m(h,)h(when)f(used)f(as)i(a)g Fi(motion)p Fo(with)e(the)h Fn(vi)h(c)m(hange)h Fo(and)d Fn(delete)330 2198 y Fo(commands,)i Fp(always)38 b Fo(cop)m(y)29 b(the)f(sp)s(eci\014ed)g(region)h(of)f (text)h(in)m(to)g(the)g(n)m(umeric)f(bu\013ers)f(regardless)330 2308 y(of)k(the)f(region)h(including)f(c)m(haracters)i(from)e(more)g (than)g(one)h(line.)41 b(These)30 b(commands)g(are:)330 2545 y Fi(<)p Fn(con)m(trol-A)p Fi(>)151 b Fn(\045)192 b(\()232 b(\))330 2655 y(`)p Fi(<)p Fn(c)m(haracter)p Fi(>)131 b Fn(/)223 b(?)h(N)330 2765 y(n)572 b Fi({)220 b(})330 3002 y Fo(Before)42 b(this)f(cop)m(y)g(is)g(done,)j(the)d (previous)g(con)m(ten)m(ts)h(of)f(bu\013er)f(\\)p Fi(1)p Fo(")i(are)f(mo)m(v)m(ed)h(in)m(to)g(bu\013er)330 3112 y(\\)p Fi(2)p Fo(",)34 b(\\)p Fi(2)p Fo(")g(in)m(to)g(bu\013er)e(\\)p Fi(3)p Fo(",)i(and)e(so)i(on.)48 b(The)32 b(con)m(ten)m(ts)j(of)e (bu\013er)f(\\)p Fi(9)p Fo(")h(are)h(discarded.)47 b(In)33 b Fn(vi)g Fo(,)330 3221 y(text)d(ma)m(y)f(b)s(e)f(explicitly)j(stored)e (in)m(to)h(the)f(n)m(umeric)f(bu\013ers.)39 b(In)29 b(this)f(case,)j (the)e(bu\013er)f(rotation)330 3331 y(describ)s(ed)34 b(ab)s(o)m(v)m(e)j(o)s(ccurs)d(b)s(efore)h(the)h(replacemen)m(t)g(of)g (the)f(bu\013er's)f(con)m(ten)m(ts.)57 b(The)35 b(n)m(umeric)330 3440 y(bu\013ers)25 b(are)h(only)g(a)m(v)-5 b(ailable)28 b(in)e Fi(visual)p Fo(and)d Fi(open)p Fo(mo)s(des,)j(and)f(are)h(not)g (accessible)i(b)m(y)e Fn(ex)g Fo(in)g(an)m(y)330 3550 y(w)m(a)m(y)-8 b(,)32 b(although)f(c)m(hanged)g(and)f(deleted)h(text)g (is)g(still)g(stored)f(there)h(while)f(in)g Fn(ex)h Fo(mo)s(de.)330 3787 y(When)40 b(a)h Fn(vi)g Fo(command)f(synopsis)f(sho)m(ws)i(b)s (oth)e(a)i Fi([buffer])p Fo(and)d(a)j Fi([count])p Fo(,)g(they)g(ma)m (y)g(b)s(e)330 3897 y(presen)m(ted)30 b(in)g(an)m(y)h(order.)330 4134 y(Finally)-8 b(,)38 b(all)d(bu\013ers)f(are)h(either)g(\\line")h (or)f(\\c)m(haracter")i(orien)m(ted.)55 b(All)36 b Fn(ex)f Fo(commands)f(whic)m(h)330 4244 y(store)23 b(text)h(in)m(to)g (bu\013ers)d(are)j(line)f(orien)m(ted.)39 b(Some)23 b Fn(vi)f Fo(commands)h(whic)m(h)f(store)i(text)f(in)m(to)h(bu\013ers)330 4354 y(are)h(line)f(orien)m(ted,)i(and)e(some)h(are)f(c)m(haracter)i (orien)m(ted;)h(the)d(description)h(for)e(eac)m(h)j(applicable)f Fn(vi)330 4463 y Fo(command)f(notes)g(whether)g(text)h(copied)f(in)m (to)h(bu\013ers)e(using)g(the)h(command)g(is)g(line)g(or)g(c)m (haracter)330 4573 y(orien)m(ted.)42 b(In)30 b(addition,)i(the)e Fn(vi)h Fo(command)g Fn(displa)m(y)f(bu\013ers)g Fo(displa)m(ys)h(the)f (curren)m(t)h(orien)m(tation)330 4682 y(for)j(eac)m(h)h(bu\013er.)50 b(Generally)-8 b(,)36 b(the)f(only)f(imp)s(ortance)g(attac)m(hed)h(to)g (this)f(orien)m(tation)i(is)d(that)i(if)330 4792 y(the)d(bu\013er)f(is) h(subsequen)m(tly)g(inserted)g(in)m(to)h(the)f(text,)i(line)e(orien)m (ted)h(bu\013ers)e(create)i(new)f(lines)330 4902 y(for)j(eac)m(h)h(of)f (the)g(lines)g(they)h(con)m(tain,)h(and)e(c)m(haracter)h(orien)m(ted)g (bu\013ers)e(create)i(new)f(lines)g(for)330 5011 y(an)m(y)g(lines)f Fp(other)46 b Fo(than)34 b(the)g(\014rst)g(and)f(last)j(lines)e(they)h (con)m(tain.)54 b(The)33 b(\014rst)h(and)g(last)h(lines)g(are)330 5121 y(inserted)28 b(in)m(to)h(the)f(text)i(at)f(the)f(curren)m(t)g (cursor)f(p)s(osition,)i(b)s(ecoming)g(part)f(of)g(the)g(curren)m(t)g (line.)330 5230 y(If)f(there)g(is)g(more)h(than)f(one)g(line)h(in)f (the)g(bu\013er,)g(ho)m(w)m(ev)m(er,)i(the)f(curren)m(t)f(line)g (itself)h(will)g(b)s(e)f(split.)p eop end %%Page: 13 16 TeXDict begin 13 15 bop 150 -116 a Fo(Chapter)30 b(12:)41 b(Vi)31 b(Description)2422 b(13)225 299 y Fm(\017)60 b Fn(unnamed)29 b(bu\013er)330 438 y Fo(The)39 b(unnamed)g(bu\013er)f (is)i(a)g(text)h(storage)g(area)g(whic)m(h)e(is)h(used)f(b)m(y)h (commands)f(that)h(use)g(or)330 548 y(op)s(erate)g(on)f(a)g(bu\013er)f (when)g(no)h(bu\013er)g(is)g(sp)s(eci\014ed)f(b)m(y)h(the)g(user.)67 b(If)38 b(the)i(command)e(stores)330 658 y(text)g(in)m(to)f(a)g (bu\013er,)h(the)f(text)h(is)e(stored)h(in)m(to)h(the)f(unnamed)e (bu\013er)g(ev)m(en)j(if)f(a)g(bu\013er)e(is)i(also)330 767 y(sp)s(eci\014ed)31 b(b)m(y)g(the)h(user.)43 b(It)31 b(is)h(not)f(p)s(ossible)g(to)h(app)s(end)e(text)j(to)f(the)f(unnamed)f (bu\013er.)43 b(If)31 b(text)330 877 y(is)g(app)s(ended)f(to)i(a)g (named)f(bu\013er,)f(the)i(named)f(bu\013er)f(con)m(tains)j(b)s(oth)d (the)i(old)f(and)g(new)g(text,)330 986 y(while)37 b(the)g(unnamed)f (bu\013er)g(con)m(tains)j(only)e(the)g(new)g(text.)62 b(There)36 b(is)h(no)g(w)m(a)m(y)i(to)e(explicitly)330 1096 y(reference)31 b(the)f(unnamed)f(bu\013er.)330 1345 y(Historically)-8 b(,)52 b(the)46 b(con)m(ten)m(ts)h(of)f(the)f (unnamed)f(bu\013er)h(w)m(ere)h(discarded)f(b)m(y)g(man)m(y)g (di\013eren)m(t)330 1455 y(commands,)24 b(ev)m(en)g(ones)f(that)h (didn't)e(store)i(text)g(in)m(to)g(it.)39 b Fn(Nex)p Fo(/)p Fn(n)m(vi)24 b Fo(nev)m(er)g(discards)e(the)h(con)m(ten)m(ts)330 1564 y(of)31 b(the)f(unnamed)f(bu\013er)g(un)m(til)i(new)f(text)h (replaces)g(them.)225 1704 y Fm(\017)60 b Fn(whitespace)330 1843 y Fo(The)30 b(c)m(haracters)i Fi(<)p Fo(tab)p Fi(>)e Fo(and)g Fi(<)p Fo(space)p Fi(>)p Fo(.)225 1983 y Fm(\017)60 b Fi(<)p Fn(carriage-return)p Fi(>)330 2122 y Fo(The)28 b(c)m(haracter)h(represen)m(ted)f(b)m(y)g(an)g(ASCI)s(I)f Fi()p Fo(.)37 b(This)27 b(c)m(haracter)j(is)e(almost)h(alw)m (a)m(ys)330 2232 y(treated)k(iden)m(tically)g(to)g(a)f Fi()p Fo(c)m(haracter,)f(but)g(di\013ers)g(in)g(that)h(it)h (can)e(b)s(e)g(escap)s(ed)h(in)m(to)330 2342 y(the)f(\014le)f(text)h (or)g(in)m(to)g(a)g(command.)225 2481 y Fm(\017)60 b Fi(<)p Fn(newline)p Fi(>)330 2621 y Fo(The)28 b(c)m(haracter)h (represen)m(ted)f(b)m(y)g(an)g(ASCI)s(I)f Fi()p Fo(.)37 b(This)27 b(c)m(haracter)j(is)e(almost)h(alw)m(a)m(ys)330 2730 y(treated)g(iden)m(tically)h(to)f(a)g Fi()p Fo(c)m(haracter,)e(but)h(di\013ers)f(in)h(that)h(it)g(cannot)f(b)s(e)g (escap)s(ed)330 2840 y(in)m(to)j(the)g(\014le)f(text)i(or)e(in)m(to)h (a)g(command.)150 3142 y Fl(12)80 b(Vi)54 b(Description)150 3407 y Fn(Vi)36 b Fo(tak)m(es)i(up)d(the)i(en)m(tire)g(screen)f(to)h (displa)m(y)g(the)f(edited)h(\014le,)h(except)f(for)f(the)h(b)s(ottom)g (line)f(of)h(the)150 3517 y(screen.)k(The)30 b(b)s(ottom)h(line)g(of)g (the)f(screen)h(is)g(used)e(to)j(en)m(ter)f Fn(exp)f Fo(commands,)h(and)e(for)i Fn(vi)f Fo(error)h(and)150 3626 y(informational)h(messages.)42 b(If)30 b(no)g(other)h(information) g(is)g(b)s(eing)f(displa)m(y)m(ed,)h(the)g(default)g(displa)m(y)g(can) 150 3736 y(sho)m(w)g(the)g(curren)m(t)f(cursor)h(ro)m(w)g(and)f(cursor) g(column,)h(an)g(indication)h(of)f(whether)f(the)h(\014le)g(has)g(b)s (een)150 3845 y(mo)s(di\014ed,)25 b(and)f(the)h(curren)m(t)f(mo)s(de)h (of)f(the)h(editor.)40 b(See)25 b(the)g Fi(ruler)e Fo(and)h Fi(showmode)e Fo(options)j(for)g(more)150 3955 y(information.)275 4099 y(Empt)m(y)g(lines)h(do)f(not)h(ha)m(v)m(e)g(an)m(y)g(sp)s(ecial)g (represen)m(tation)h(on)e(the)h(screen,)g(but)f(lines)h(on)f(the)h (screen)150 4209 y(that)c(w)m(ould)f(logically)i(come)f(after)g(the)f (end)g(of)g(the)g(\014le)h(are)f(displa)m(y)m(ed)h(as)f(a)h(single)g (tilde)f(\\)p Fi(~)p Fo(")h(c)m(haracter.)150 4319 y(T)-8 b(o)28 b(di\013eren)m(tiate)i(b)s(et)m(w)m(een)f(empt)m(y)f(lines)h (and)e(lines)h(consisting)h(of)f(only)g(whitespace)h(c)m(haracters,)h (use)150 4428 y(the)c Fi(list)g Fo(option.)39 b(Historically)-8 b(,)30 b(implemen)m(tations)e(of)f Fn(vi)f Fo(ha)m(v)m(e)i(also)f (displa)m(y)m(ed)g(some)f(lines)h(as)f(single)150 4538 y(asterisk)i(\\)p Fi(@)p Fo(")h(c)m(haracters.)41 b(These)27 b(w)m(ere)h(lines)g(that)h(w)m(ere)f(not)g(correctly)h(displa)m(y)m (ed,)g(i.e.)40 b(lines)28 b(on)g(the)150 4647 y(screen)35 b(that)g(did)f(not)g(corresp)s(ond)g(to)h(lines)g(in)f(the)h(\014le,)h (or)e(lines)h(that)g(did)f(not)h(\014t)f(on)g(the)h(curren)m(t)150 4757 y(screen.)41 b Fn(Nvi)31 b Fo(nev)m(er)f(displa)m(ys)h(lines)f(in) g(this)h(fashion.)275 4902 y Fn(Vi)d Fo(is)g(a)h(mo)s(deful)e(editor,)i (i.e.)41 b(it)29 b(has)f(t)m(w)m(o)i(mo)s(des,)e(\\command")h(mo)s(de)f (and)g(\\text)h(input")f(mo)s(de.)150 5011 y(When)33 b Fn(vi)g Fo(\014rst)g(starts,)h(it)g(is)f(in)g(command)g(mo)s(de.)48 b(There)33 b(are)g(sev)m(eral)i(commands)e(that)g(c)m(hange)i Fn(vi)150 5121 y Fo(in)m(to)28 b(text)h(input)d(mo)s(de.)40 b(The)27 b Fi()p Fo(c)m(haracter)g(is)g(used)g(to)h(resolv)m(e) h(the)e(text)i(input)d(in)m(to)j(the)f(\014le,)150 5230 y(and)k(exit)h(bac)m(k)g(in)m(to)g(command)f(mo)s(de.)47 b(In)31 b Fn(vi)i Fo(command)f(mo)s(de,)g(the)h(cursor)f(is)g(alw)m(a)m (ys)i(p)s(ositioned)150 5340 y(on)c(the)h(last)g(column)f(of)g(c)m (haracters)i(whic)m(h)e(tak)m(e)i(up)d(more)i(than)f(one)h(column)f(on) g(the)g(screen.)41 b(In)30 b Fn(vi)p eop end %%Page: 14 17 TeXDict begin 14 16 bop 150 -116 a Fo(Chapter)30 b(12:)41 b(Vi)31 b(Description)2422 b(14)150 299 y(text)34 b(insert)g(mo)s(de,)f (the)h(cursor)f(is)g(p)s(ositioned)g(on)h(the)f(\014rst)g(column)g(of)g (c)m(haracters)i(whic)m(h)e(tak)m(e)i(up)150 408 y(more)c(than)f(one)g (column)g(on)h(the)f(screen.)275 560 y(When)e(p)s(ositioning)h(the)g (cursor)e(to)j(a)f(new)f(line)h(and)f(column,)h(the)g(t)m(yp)s(e)f(of)h (mo)m(v)m(emen)m(t)i(is)d(de\014ned)150 670 y(b)m(y)d(the)h(distance)g (to)g(the)f(new)g(cursor)f(p)s(osition.)40 b(If)24 b(the)i(new)f(p)s (osition)g(is)g(close,)j(the)e(screen)f(is)g(scrolled)150 779 y(to)k(the)f(new)g(lo)s(cation.)42 b(If)27 b(the)i(new)e(p)s (osition)i(is)f(far)g(a)m(w)m(a)m(y)-8 b(,)31 b(the)e(screen)f(is)g (repain)m(ted)h(so)f(that)h(the)f(new)150 889 y(p)s(osition)33 b(is)g(on)f(the)h(screen.)49 b(If)32 b(the)h(screen)g(is)g(scrolled,)h (it)g(is)e(mo)m(v)m(ed)i(a)f(minimal)g(amoun)m(t,)i(and)d(the)150 999 y(cursor)26 b(line)g(will)h(usually)f(app)s(ear)f(at)i(the)f(top)h (or)f(b)s(ottom)h(of)f(the)g(screen.)40 b(If)25 b(the)i(screen)f(is)g (repain)m(ted,)150 1108 y(the)31 b(cursor)e(line)i(will)g(app)s(ear)f (in)g(the)g(cen)m(ter)i(of)f(the)f(screen,)h(unless)f(the)g(cursor)g (is)h(su\016cien)m(tly)g(close)150 1218 y(to)j(the)f(b)s(eginning)g(or) g(end)g(of)g(the)g(\014le)h(that)f(this)g(isn't)h(p)s(ossible.)48 b(If)33 b(the)h Fi(leftright)c Fo(option)k(is)f(set,)150 1327 y(the)27 b(screen)h(ma)m(y)f(b)s(e)g(scrolled)h(or)f(repain)m(ted) g(in)g(a)g(horizon)m(tal)i(direction)f(as)f(w)m(ell)h(as)g(in)f(a)g(v)m (ertical)i(one.)275 1479 y(A)g(ma)5 b(jor)30 b(di\013erence)h(b)s(et)m (w)m(een)f(the)g(historical)h Fn(vi)f Fo(presen)m(tation)h(and)e Fn(n)m(vi)h Fo(is)g(in)g(the)g(scrolling)h(and)150 1589 y(screen)42 b(orien)m(ted)h(p)s(osition)f(commands,)i Fi(<)p Fn(con)m(trol-B)p Fi(>)p Fo(,)j Fi(<)p Fn(con)m(trol-D)p Fi(>)p Fo(,)f Fi(<)p Fn(con)m(trol-E)p Fi(>)p Fo(,)g Fi(<)p Fn(con)m(trol-F)p Fi(>)p Fo(,)150 1698 y Fi(<)p Fn(con)m(trol-U)p Fi(>)p Fo(,)27 b Fi(<)p Fn(con)m(trol-Y)p Fi(>)p Fo(,)h Fn(H)p Fo(,)c Fn(L)g Fo(and)g Fn(M)p Fo(.)h(In)f (historical)i(implemen)m(tations)g(of)e Fn(vi)p Fo(,)i(these)f (commands)150 1808 y(acted)38 b(on)e(ph)m(ysical)h(\(as)g(opp)s(osed)f (to)h(logical,)k(or)36 b(screen\))h(lines.)59 b(F)-8 b(or)38 b(lines)e(that)h(w)m(ere)g(su\016cien)m(tly)150 1917 y(long)29 b(in)g(relation)g(to)h(the)f(size)g(of)g(the)g(screen,)g (this)g(mean)m(t)g(that)g(single)h(line)f(scroll)g(commands)f(migh)m(t) 150 2027 y(repain)m(t)36 b(the)h(en)m(tire)f(screen,)i(scrolling)f(or)f (screen)g(p)s(ositioning)g(commands)g(migh)m(t)g(not)h(c)m(hange)g(the) 150 2137 y(screen)27 b(or)g(mo)m(v)m(e)i(the)e(cursor)g(at)h(all,)h (and)d(some)i(lines)f(simply)g(could)g(not)g(b)s(e)g(displa)m(y)m(ed,)h (ev)m(en)g(though)150 2246 y Fn(vi)42 b Fo(w)m(ould)f(edit)h(the)g (\014le)f(that)h(con)m(tained)h(them.)74 b(In)41 b Fn(n)m(vi)p Fo(,)k(these)d(commands)f(act)h(on)g(logical,)47 b(i.e.)150 2356 y(screen)29 b(lines.)41 b(Y)-8 b(ou)30 b(are)g(unlik)m(ely)f(to)h (notice)h(an)m(y)f(di\013erence)f(unless)g(y)m(ou)h(are)f(editing)h (\014les)g(with)f(lines)150 2465 y(signi\014can)m(tly)j(longer)f(than)f (a)g(screen)h(width.)275 2617 y Fn(Vi)36 b Fo(k)m(eeps)g(trac)m(k)i(of) e(the)g(curren)m(tly)h(\\most)g(attractiv)m(e")i(cursor)d(p)s(osition.) 58 b(Eac)m(h)37 b(command)f(de-)150 2727 y(scription)28 b(\(for)h(commands)e(that)i(alter)g(the)g(curren)m(t)f(cursor)f(p)s (osition\),)i(sp)s(eci\014es)f(if)g(the)h(cursor)e(is)h(set)150 2836 y(to)k(a)g(sp)s(eci\014c)f(lo)s(cation)i(in)e(the)h(line,)g(or)g (if)f(it)h(is)f(mo)m(v)m(ed)i(to)f(the)g(\\most)g(attractiv)m(e)i (cursor)d(p)s(osition".)150 2946 y(The)38 b(latter)i(means)f(that)g (the)g(cursor)f(is)h(mo)m(v)m(ed)h(to)f(the)g(cursor)f(p)s(osition)h (that)g(is)g(horizon)m(tally)i(as)150 3056 y(close)28 b(as)f(p)s(ossible)f(to)h(the)g(curren)m(t)f(cursor)g(p)s(osition.)40 b(If)26 b(the)g(curren)m(t)h(line)g(is)f(shorter)h(than)f(the)h(cursor) 150 3165 y(p)s(osition)35 b Fn(vi)g Fo(w)m(ould)f(select,)k(the)c (cursor)g(is)h(p)s(ositioned)g(on)f(the)h(last)h(c)m(haracter)g(in)e (the)h(line.)54 b(\(If)35 b(the)150 3275 y(line)29 b(is)f(empt)m(y)-8 b(,)30 b(the)f(cursor)f(is)g(p)s(ositioned)h(on)f(the)h(\014rst)f (column)g(of)h(the)g(line.\))40 b(If)28 b(a)h(command)g(mo)m(v)m(es)150 3384 y(the)f(cursor)f(to)h(the)g(most)g(attractiv)m(e)i(p)s(osition,)f (it)f(do)s(es)f(not)h(alter)g(the)g(curren)m(t)f(cursor)g(p)s(osition,) i(and)150 3494 y(a)h(subsequen)m(t)f(mo)m(v)m(emen)m(t)i(will)f(again)g (attempt)h(to)f(mo)m(v)m(e)h(the)e(cursor)g(to)h(that)g(p)s(osition.)41 b(Therefore,)150 3603 y(although)25 b(a)g(mo)m(v)m(emen)m(t)h(to)f(a)g (line)g(shorter)f(than)h(the)f(curren)m(tly)h(most)f(attractiv)m(e)k(p) s(osition)d(will)f(cause)150 3713 y(the)h(cursor)f(to)h(mo)m(v)m(e)h (to)f(the)g(end)e(of)i(that)g(line,)h(a)f(subsequen)m(t)f(mo)m(v)m (emen)m(t)j(to)e(a)g(longer)g(line)g(will)f(cause)150 3823 y(the)31 b(cursor)e(to)i(mo)m(v)m(e)h(bac)m(k)f(to)g(the)g(most)g (attractiv)m(e)i(p)s(osition.)275 3974 y(In)20 b(addition,)k(the)d Fn($)h Fo(command)f(mak)m(es)h(the)g(end)f(of)g(eac)m(h)i(line)e(the)h (most)g(attractiv)m(e)i(cursor)d(p)s(osition)150 4084 y(rather)30 b(than)g(a)h(sp)s(eci\014c)f(column.)275 4236 y(Eac)m(h)j Fn(vi)g Fo(command)f(describ)s(ed)g(b)s(elo)m(w)h (notes)g(where)g(the)g(cursor)f(ends)g(up)f(after)j(it)f(is)g (executed.)150 4345 y(This)e(p)s(osition)g(is)h(describ)s(ed)e(in)i (terms)f(of)h(c)m(haracters)h(on)e(the)h(line,)g(i.e.)45 b(\\the)33 b(previous)e(c)m(haracter",)150 4455 y(or,)e(\\the)g(last)h (c)m(haracter)g(in)e(the)h(line".)41 b(This)28 b(is)g(to)i(a)m(v)m(oid) g(needing)e(to)i(con)m(tin)m(ually)g(refer)e(to)i(on)e(what)150 4565 y(part)i(of)h(the)f(c)m(haracter)i(the)f(cursor)f(rests.)275 4716 y(The)f(follo)m(wing)j(w)m(ords)e(ha)m(v)m(e)i(sp)s(ecial)f (meaning)f(for)g Fn(vi)h Fo(commands.)225 4868 y Fm(\017)60 b Fn(previous)30 b(con)m(text)330 5011 y Fo(The)i(p)s(osition)h(of)g (the)h(cursor)e(b)s(efore)g(the)h(command)g(whic)m(h)g(caused)g(the)g (last)h(absolute)f(mo)m(v)m(e-)330 5121 y(men)m(t)c(w)m(as)h(executed.) 41 b(Eac)m(h)30 b Fn(vi)f Fo(command)g(describ)s(ed)f(in)h(the)g(next)g (section)h(that)g(is)f(considered)330 5230 y(an)j(absolute)i(mo)m(v)m (emen)m(t)g(is)f(so)g(noted.)47 b(In)32 b(addition,)h(sp)s(ecifying)g Fp(any)41 b Fo(address)32 b(to)h(an)f Fn(ex)h Fo(com-)330 5340 y(mand)d(is)g(considered)g(an)g(absolute)h(mo)m(v)m(emen)m(t.)p eop end %%Page: 15 18 TeXDict begin 15 17 bop 150 -116 a Fo(Chapter)30 b(12:)41 b(Vi)31 b(Description)2422 b(15)225 299 y Fm(\017)60 b Fn(motion)330 440 y Fo(A)29 b(second)f Fn(vi)h Fo(command)f(can)h(b)s (e)f(used)g(as)h(an)f(optional)i(trailing)g(argumen)m(t)f(to)g(the)g Fn(vi)g Fi(<)p Fo(,)g Fi(>)p Fo(,)f Fn(!)p Fo(,)h Fn(c)p Fo(,)330 549 y Fn(d)p Fo(,)35 b Fn(y)p Fo(,)h(and)e(\(dep)s(ending)g (on)g(the)h Fi(tildeop)e Fo(option\))i Fi(~)g Fo(commands.)53 b(This)34 b(command)g(indicates)330 659 y(the)g(end)g(of)g(the)h (region)f(of)h(text)g(that's)g(a\013ected)g(b)m(y)f(the)h(command.)52 b(The)33 b(motion)i(command)330 769 y(ma)m(y)j(b)s(e)g(either)g(the)g (command)f(c)m(haracter)j(rep)s(eated)e(\(in)g(whic)m(h)f(case)i(it)f (means)g(the)g(curren)m(t)330 878 y(line\))g(or)g(a)f(cursor)g(mo)m(v)m (emen)m(t)j(command.)61 b(In)37 b(the)h(latter)g(case,)j(the)c(region)h (a\013ected)h(b)m(y)f(the)330 988 y(command)k(is)g(from)g(the)h (starting)g(or)f(stopping)g(cursor)g(p)s(osition)g(whic)m(h)g(comes)h (\014rst)f(in)g(the)330 1097 y(\014le,)35 b(to)f(immediately)h(b)s (efore)e(the)h(starting)g(or)g(stopping)f(cursor)g(p)s(osition)h(whic)m (h)g(comes)g(later)330 1207 y(in)39 b(the)g(\014le.)68 b(Commands)38 b(that)h(op)s(erate)h(on)f(lines)h(instead)f(of)h(using)e (b)s(eginning)h(and)f(ending)330 1316 y(cursor)26 b(p)s(ositions)h(op)s (erate)h(on)e(all)i(of)f(the)g(lines)g(that)h(are)f(wholly)g(or)g (partially)h(in)e(the)h(region.)41 b(In)330 1426 y(addition,)33 b(some)g(other)g(commands)f(b)s(ecome)g(line)h(orien)m(ted)g(dep)s (ending)e(on)h(where)g(in)g(the)h(text)330 1536 y(they)e(are)f(used.)40 b(The)30 b(command)g(descriptions)h(b)s(elo)m(w)f(note)h(these)g(sp)s (ecial)g(cases.)330 1786 y(The)f(follo)m(wing)i(commands)e(ma)m(y)h (all)g(b)s(e)f(used)f(as)i(motion)g(comp)s(onen)m(ts)f(for)h Fn(vi)f Fo(commands:)330 2037 y Fi(<)p Fn(con)m(trol-A)p Fi(>)134 b(<)p Fn(con)m(trol-H)p Fi(>)149 b(<)p Fn(con)m(trol-J)p Fi(>)132 b(<)p Fn(con)m(trol-M)p Fi(>)330 2146 y(<)p Fn(con)m(trol-N)p Fi(>)g(<)p Fn(con)m(trol-P)p Fi(>)158 b(<)p Fn(space)p Fi(>)273 b Fn($)330 2256 y(\045)530 b(')p Fi(<)p Fn(c)m(haracter)p Fi(>)131 b Fn(\()547 b(\))330 2365 y Fi(+)558 b Fn(,)598 b(-)552 b(/)330 2475 y(0)561 b(;)598 b(?)539 b(B)330 2585 y(E)546 b(F)566 b(G)511 b(H)330 2694 y(L)551 b(M)537 b(N)511 b(T)330 2804 y(W)h([[)573 b(]])532 b Fi(^)p 336 2913 28 5 v 936 2913 a Fn(`)p Fi(<)p Fn(c)m(haracter)p Fi(>)131 b Fn(b)531 b(e)330 3023 y(f)578 b(h)572 b(j)554 b(k)330 3133 y(l)581 b(n)572 b(t)547 b(w)330 3242 y Fi({)558 b(|)575 b(})330 3493 y Fo(The)41 b(optional)i(coun)m(t)g(pre\014x)d(a)m(v)-5 b(ailable)44 b(for)e(some)g(of)g(the)g Fn(vi)g Fo(commands)f(that)i(tak)m(e)g (motion)330 3602 y(commands,)31 b(or)f(the)h(coun)m(t)g(pre\014x)f(a)m (v)-5 b(ailable)32 b(for)f(the)g Fn(vi)f Fo(commands)g(that)i(are)f (used)e(as)i(motion)330 3712 y(comp)s(onen)m(ts,)j(ma)m(y)g(b)s(e)e (included)h(and)f(is)h Fp(always)43 b Fo(considered)33 b(part)g(of)g(the)g(motion)h(argumen)m(t.)330 3821 y(F)-8 b(or)25 b(example,)h(the)d(commands)h(\\)p Fi(c2w)p Fo(")g(and)f(\\)p Fi(2cw)p Fo(")g(are)i(equiv)-5 b(alen)m(t,)26 b(and)e(the)f(region)i (a\013ected)g(b)m(y)330 3931 y(the)f Fn(c)g Fo(command)g(is)g(t)m(w)m (o)h(w)m(ords)f(of)g(text.)39 b(In)24 b(addition,)h(if)f(the)g (optional)h(coun)m(t)g(pre\014x)e(is)h(sp)s(eci\014ed)330 4041 y(for)36 b(b)s(oth)g(the)h Fn(vi)g Fo(command)f(and)g(its)h (motion)h(comp)s(onen)m(t,)g(the)f(e\013ect)h(is)f(m)m(ultiplicativ)m (e)j(and)330 4150 y(is)e(considered)h(part)f(of)g(the)h(motion)g (argumen)m(t.)65 b(F)-8 b(or)39 b(example,)j(the)c(commands)g(\\)p Fi(4cw)p Fo(")h(and)330 4260 y(\\)p Fi(2c2w)p Fo(")27 b(are)h(equiv)-5 b(alen)m(t,)30 b(and)d(the)h(region)g(a\013ected)h(b)m (y)f(the)g Fn(c)g Fo(command)f(is)h(four)f(w)m(ords)g(of)h(text.)225 4510 y Fm(\017)60 b Fn(coun)m(t)330 4651 y Fo(A)39 b(p)s(ositiv)m(e)h (n)m(um)m(b)s(er)e(used)g(as)h(an)g(optional)h(argumen)m(t)f(to)h(most) f(commands,)i(either)f(to)f(giv)m(e)330 4761 y(a)g(size)g(or)g(a)g(p)s (osition)g(\(for)f(displa)m(y)h(or)g(mo)m(v)m(emen)m(t)h(commands\),)h (or)e(as)g(a)g(rep)s(eat)g(coun)m(t)g(\(for)330 4870 y(commands)32 b(that)h(mo)s(dify)f(text\).)48 b(The)32 b(coun)m(t)h(argumen)m(t)g(is)f(alw)m(a)m(ys)i(optional)g(and)e (defaults)g(to)330 4980 y(1)f(unless)e(otherwise)i(noted)g(in)f(the)g (command)h(description.)330 5230 y(When)h(a)g Fn(vi)g Fo(command)g(synopsis)f(sho)m(ws)h(b)s(oth)g(a)g Fi([buffer])p Fo(and)d Fi([count])p Fo(,)i(they)h(ma)m(y)h(b)s(e)e(pre-)330 5340 y(sen)m(ted)g(in)f(an)m(y)h(order.)p eop end %%Page: 16 19 TeXDict begin 16 18 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(16)225 299 y Fm(\017)60 b Fn(w)m(ord)330 430 y Fo(Generally)-8 b(,)28 b(in)d(languages)h(where)e(it)i(is)f (applicable,)i Fn(vi)e Fo(recognizes)i(t)m(w)m(o)f(kinds)e(of)h(w)m (ords.)39 b(First,)27 b(a)330 540 y(sequence)g(of)g(letters,)i(digits)f (and)e(underscores,)h(delimited)g(at)g(b)s(oth)g(ends)f(b)m(y:)38 b(c)m(haracters)29 b(other)330 650 y(than)d(letters,)i(digits,)g(or)e (underscores,)g(the)h(b)s(eginning)e(or)h(end)g(of)g(a)g(line,)i(and)d (the)i(b)s(eginning)e(or)330 759 y(end)i(of)h(the)g(\014le.)40 b(Second,)29 b(a)f(sequence)g(of)g(c)m(haracters)i(other)e(than)g (letters,)h(digits,)h(underscores,)330 869 y(or)41 b(whitespace)h(c)m (haracters,)k(delimited)c(at)g(b)s(oth)f(ends)f(b)m(y:)63 b(a)42 b(letter,)j(digit,)g(underscore,)f(or)330 978 y(whitespace)34 b(c)m(haracter,)h(the)f(b)s(eginning)e(or)h(end)g(of)g (a)g(line,)i(and)d(the)i(b)s(eginning)e(or)h(end)f(of)i(the)330 1088 y(\014le.)42 b(F)-8 b(or)31 b(example,)h(the)e(c)m(haracters)i(\\) p Fi(!@#abc$\045^)p Fo(")d(con)m(tain)j(three)f(w)m(ords:)41 b(\\)p Fi(!@#)p Fo(",)31 b(\\)p Fi(abc)p Fo(")g(and)330 1198 y(\\)p Fi($\045^)p Fo(".)330 1439 y(Groups)i(of)h(empt)m(y)g (lines)g(\(or)g(lines)g(con)m(taining)i(only)e(whitespace)g(c)m (haracters\))i(are)e(treated)h(as)330 1548 y(a)c(single)g(w)m(ord.)225 1680 y Fm(\017)60 b Fn(bigw)m(ord)330 1811 y Fo(A)42 b(set)g(of)f(non-whitespace)h(c)m(haracters)h(preceded)e(and)g(follo)m (w)m(ed)i(b)m(y)e(whitespace)h(c)m(haracters)330 1921 y(or)35 b(the)g(b)s(eginning)f(or)h(end)f(of)h(the)g(\014le)g(or)g (line.)55 b(F)-8 b(or)35 b(example,)i(the)e(c)m(haracters)i(\\)p Fi(!@#abc$\045^)p Fo(")330 2030 y(con)m(tain)32 b(one)e(bigw)m(ord:)41 b(\\)p Fi(!@#abc$\045^)p Fo(".)330 2271 y(Groups)33 b(of)h(empt)m(y)g (lines)g(\(or)g(lines)g(con)m(taining)i(only)e(whitespace)g(c)m (haracters\))i(are)e(treated)h(as)330 2381 y(a)c(single)g(bigw)m(ord.) 225 2513 y Fm(\017)60 b Fn(paragraph)330 2644 y Fo(An)39 b(area)h(of)g(text)g(that)g(b)s(egins)e(with)h(either)h(the)g(b)s (eginning)e(of)i(a)f(\014le,)j(an)d(empt)m(y)h(line,)i(or)e(a)330 2754 y(section)d(b)s(oundary)-8 b(,)36 b(and)g(con)m(tin)m(ues)h(un)m (til)f(either)g(an)g(empt)m(y)h(line,)h(section)f(b)s(oundary)-8 b(,)36 b(or)g(the)330 2863 y(end)30 b(of)g(the)h(\014le.)330 3104 y(Groups)i(of)h(empt)m(y)g(lines)g(\(or)g(lines)g(con)m(taining)i (only)e(whitespace)g(c)m(haracters\))i(are)e(treated)h(as)330 3214 y(a)c(single)g(paragraph.)330 3455 y(Additional)g(paragraph)f(b)s (oundaries)f(can)h(b)s(e)g(de\014ned)f(using)h(the)h Fi(paragraphs)c Fo(option.)225 3587 y Fm(\017)60 b Fn(section)330 3718 y Fo(An)28 b(area)h(of)f(text)h(that)g(starts)f(with)g(the)h(b)s (eginning)e(of)h(the)h(\014le)f(or)g(a)h(line)f(whose)g(\014rst)f(c)m (haracter)330 3828 y(is)j(an)h(op)s(en)e(brace)i(\\)p Fi({)p Fo(")g(and)f(con)m(tin)m(ues)h(un)m(til)g(the)f(next)h(section)h (or)e(the)g(end)g(of)h(the)f(\014le.)330 4069 y(Additional)h(section)h (b)s(oundaries)c(can)j(b)s(e)f(de\014ned)f(using)h(the)g Fi(sections)f Fo(option.)225 4200 y Fm(\017)60 b Fn(sen)m(tence)330 4332 y Fo(An)32 b(area)i(of)f(text)h(that)f(b)s(egins)g(with)f(either)h (the)g(b)s(eginning)g(of)g(the)g(\014le)f(or)h(the)g(\014rst)f(non)m (blank)330 4441 y(c)m(haracter)22 b(follo)m(wing)g(the)e(previous)g (sen)m(tence,)k(paragraph,)e(or)e(section)i(b)s(oundary)c(and)i(con)m (tin)m(ues)330 4551 y(un)m(til)35 b(the)g(end)f(of)h(the)g(\014le)g(or) g(a)g(p)s(erio)s(d)e(\\)p Fi(.)p Fo(")j(exclamation)h(p)s(oin)m(t)e(\\) p Fi(!)p Fo(")g(or)g(question)g(mark)f(\\)p Fi(?)p Fo(")330 4661 y(c)m(haracter,)d(follo)m(w)m(ed)f(b)m(y)f(either)g(an)f (end-of-line)i(or)e(t)m(w)m(o)i(whitespace)g(c)m(haracters.)41 b(An)m(y)29 b(n)m(um)m(b)s(er)330 4770 y(of)21 b(closing)g(paren)m (theses)g(\\)p Fi(\))p Fo(",)j(brac)m(k)m(ets)e(\\)p Fi(])p Fo(",)h(double-quote)e(\\)p Fi(")p Fo(")g(or)g(single)g(quote)g (\\)p Fi(')p Fo(")g(c)m(haracters)330 4880 y(can)h(app)s(ear)e(b)s(et)m (w)m(een)i(the)g(p)s(erio)s(d,)g(exclamation)i(p)s(oin)m(t,)f(or)e (question)h(mark)f(and)g(the)g(whitespace)330 4989 y(c)m(haracters)32 b(or)e(end-of-line.)330 5230 y(Groups)j(of)h(empt)m(y)g(lines)g(\(or)g (lines)g(con)m(taining)i(only)e(whitespace)g(c)m(haracters\))i(are)e (treated)h(as)330 5340 y(a)c(single)g(sen)m(tence.)p eop end %%Page: 17 20 TeXDict begin 17 19 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(17)330 299 y Fl(13)80 b(Vi)54 b(Commands)150 571 y Fo(The)38 b(follo)m(wing)i(section)f(describ)s(es) e(the)i(commands)f(a)m(v)-5 b(ailable)41 b(in)c(the)i(command)f(mo)s (de)g(of)g(the)h Fn(vi)150 680 y Fo(editor.)i(In)28 b(eac)m(h)i(en)m (try)f(b)s(elo)m(w,)h(the)f(tag)i(line)e(is)g(a)g(usage)h(synopsis)e (for)h(the)g(command)g(c)m(haracter.)42 b(In)150 790 y(addition,)30 b(the)h(\014nal)e(line)h(and)g(column)g(the)g(cursor)f (rests)h(up)s(on,)f(and)g(an)m(y)h(options)h(whic)m(h)e(a\013ect)j(the) 150 899 y(command)e(are)h(noted.)3290 1109 y([Command])-3600 b Fh([count])54 b()390 1218 y Fo(Searc)m(h)40 b(forw)m(ard)g Fi(count)p Fo(times)f(for)h(the)g(curren)m(t)g(w)m(ord.) 69 b(The)40 b(curren)m(t)g(w)m(ord)f(b)s(egins)h(at)h(the)390 1328 y(\014rst)26 b(non-whitespace)h(c)m(haracter)i(on)e(or)g(after)g (the)g(curren)m(t)g(cursor)f(p)s(osition,)i(and)e(extends)h(up)390 1437 y(to)35 b(the)g(next)g(non-w)m(ord)f(c)m(haracter)j(or)d(the)h (end)f(of)h(the)g(line.)54 b(The)34 b(searc)m(h)h(is)g(literal,)j(i.e.) 54 b(no)390 1547 y(c)m(haracters)32 b(in)d(the)i(w)m(ord)e(ha)m(v)m(e)j (an)m(y)e(sp)s(ecial)h(meaning)f(in)g(terms)g(of)g(Regular)h (Expressions.)40 b(It)390 1657 y(is)29 b(an)f(error)h(if)f(no)h(matc)m (hing)h(pattern)f(is)f(found)g(b)s(et)m(w)m(een)h(the)g(starting)h(p)s (osition)f(and)f(the)h(end)390 1766 y(of)i(the)f(\014le.)390 2023 y(The)23 b Fi(<)p Fn(con)m(trol-A)p Fi(>)i Fo(command)f(is)f(an)h (absolute)g(mo)m(v)m(emen)m(t.)41 b(The)23 b Fi(<)p Fn(con)m(trol-A)p Fi(>)i Fo(command)e(ma)m(y)390 2132 y(b)s(e)g(used)f(as)i(the)f(motion) h(comp)s(onen)m(t)g(of)f(other)h Fn(vi)f Fo(commands,)i(in)e(whic)m(h)g (case)h(an)m(y)g(text)g(copied)390 2242 y(in)m(to)31 b(a)g(bu\013er)e(is)i(c)m(haracter)h(orien)m(ted.)390 2420 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(where)f(the)g(w)m(ord)g (is)h(found.)390 2592 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(c)m (haracter)i(of)e(the)h(w)m(ord.)390 2764 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(ignorecase)e Fo(and)i Fi(wrapscan)e Fo(options.)3290 2973 y([Command])-3600 b Fh([count])54 b()390 3083 y Fo(P)m(age)27 b(bac)m(kw)m(ard)g Fi(count)p Fo(screens.)37 b(Tw)m(o)26 b(lines)g(of)g(o)m(v)m(erlap)h(are)f(main)m(tained,)i(if)e(p)s (ossible,)g(b)m(y)g(dis-)390 3192 y(pla)m(ying)35 b(the)g(windo)m(w)f (starting)i(at)f(line)g Fi(\(top_line)28 b(-)i(count)f(*)h (window_size\))d(+)j(2)p Fo(,)35 b(where)390 3302 y Fi(window_size)p Fo(is)27 b(the)k(v)-5 b(alue)31 b(of)f(the)h Fi(window)d Fo(option.)41 b(\(In)30 b(the)h(case)g(of)g(split)f(screens,)h(this)f (size)390 3412 y(is)38 b(corrected)i(to)f(the)g(curren)m(t)f(screen)h (size.\))66 b(It)38 b(is)h(an)f(error)g(if)h(the)f(mo)m(v)m(emen)m(t)j (is)d(past)h(the)390 3521 y(b)s(eginning)30 b(of)g(the)h(\014le.)390 3699 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(of)g(text)g (displa)m(y)m(ed)g(on)f(the)h(screen.)390 3871 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m(haracter)i(of)e(the)h (line.)390 4043 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(window)f Fo(option.)3290 4252 y([Command])-3600 b Fh([count])54 b()390 4362 y Fo(Scroll)29 b(forw)m(ard)e Fi(count)p Fo(lines.)39 b(If)28 b Fi(count)p Fo(is)f(not)i(sp)s (eci\014ed,)f(scroll)h(forw)m(ard)f(the)g(n)m(um)m(b)s(er)f(of)i(lines) 390 4472 y(sp)s(eci\014ed)22 b(b)m(y)h(the)g(last)h Fi(<)p Fn(con)m(trol-D)p Fi(>)g Fo(or)f Fi(<)p Fn(con)m(trol-U)p Fi(>)h Fo(command.)38 b(If)22 b(this)h(is)g(the)g(\014rst)f Fi(<)p Fn(con)m(trol-)390 4581 y(D)p Fi(>)h Fo(or)h Fi(<)p Fn(con)m(trol-U)p Fi(>)i Fo(command,)f(scroll)g(forw)m(ard)e(half)h (the)h(n)m(um)m(b)s(er)d(of)i(lines)h(in)e(the)i(screen.)38 b(\(In)390 4691 y(the)29 b(case)h(of)e(split)h(screens,)g(the)g (default)g(scrolling)h(distance)f(is)g(corrected)g(to)h(half)e(the)h (curren)m(t)390 4800 y(screen)h(size.\))42 b(It)31 b(is)f(an)h(error)f (if)g(the)g(mo)m(v)m(emen)m(t)j(is)d(past)h(the)f(end)g(of)h(the)f (\014le.)390 4978 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h (plus)f(the)g(n)m(um)m(b)s(er)f(of)i(lines)f(scrolled.)390 5150 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(of)e(the)h(line.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 18 21 TeXDict begin 18 20 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(18)3290 299 y([Command])-3600 b Fh([count])54 b()390 408 y Fo(Scroll)33 b(forw)m(ard)e Fi(count)p Fo(lines,)h(lea)m(ving)i(the)e(cursor)g(on)g (the)g(curren)m(t)g(line)h(and)e(column,)i(if)f(p)s(os-)390 518 y(sible.)41 b(It)30 b(is)h(an)f(error)g(if)g(the)h(mo)m(v)m(emen)m (t)h(is)f(past)f(the)h(end)e(of)i(the)g(\014le.)390 694 y(Line:)282 b(Unc)m(hanged)32 b(unless)g(the)g(curren)m(t)g(line)g (scrolls)h(o\013)f(the)g(screen,)h(in)f(whic)m(h)f(case)i(it)870 804 y(is)d(set)h(to)g(the)g(\014rst)f(line)g(on)h(the)f(screen.)390 974 y(Column:)141 b(Unc)m(hanged)32 b(unless)g(the)g(curren)m(t)g(line) g(scrolls)h(o\013)f(the)g(screen,)h(in)f(whic)m(h)f(case)i(it)870 1084 y(is)d(set)h(to)g(the)g(most)g(attractiv)m(e)i(cursor)d(p)s (osition.)390 1254 y(Options:)141 b(None.)3290 1460 y([Command])-3600 b Fh([count])54 b()390 1570 y Fo(P)m(age)46 b(forw)m(ard)f Fi(count)p Fo(screens.)82 b(Tw)m(o)45 b(lines)g(of)g(o)m(v)m(erlap)h(are)g(main)m(tained,)j(if)c(p)s (ossible,)j(b)m(y)390 1680 y(displa)m(ying)33 b(the)f(windo)m(w)g (starting)h(at)g(line)g Fi(top_line)28 b(+)i(count)f(*)h(window_size)e (-)i(2)p Fo(,)i(where)390 1789 y Fi(window_size)p Fo(is)27 b(the)k(v)-5 b(alue)31 b(of)f(the)h Fi(window)d Fo(option.)41 b(\(In)30 b(the)h(case)g(of)g(split)f(screens,)h(this)f(size)390 1899 y(is)f(corrected)h(to)f(the)g(curren)m(t)g(screen)f(size.\))42 b(It)29 b(is)g(an)f(error)h(if)f(the)h(mo)m(v)m(emen)m(t)i(is)e(past)g (the)g(end)390 2008 y(of)i(the)f(\014le.)390 2184 y(Line:)282 b(Set)31 b(to)g(the)f(\014rst)g(line)h(on)f(the)g(screen.)390 2355 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(of)e(the)h(curren)m(t)f(line.)390 2525 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(window)f Fo(option.)3290 2731 y([Command])-3600 b Fh()390 2841 y Fo(Displa)m(y)42 b(the)e(\014le)h(information.)72 b(The)40 b(information)g(includes)h (the)f(curren)m(t)h(pathname,)i(the)390 2951 y(curren)m(t)32 b(line,)i(the)f(n)m(um)m(b)s(er)e(of)i(total)h(lines)f(in)f(the)h (\014le,)h(the)f(curren)m(t)f(line)h(as)g(a)g(p)s(ercen)m(tage)h(of)390 3060 y(the)g(total)i(lines)f(in)e(the)i(\014le,)g(if)f(the)h(\014le)f (has)g(b)s(een)f(mo)s(di\014ed,)h(w)m(as)h(able)g(to)f(b)s(e)g(lo)s(c)m (k)m(ed,)j(if)d(the)390 3170 y(\014le's)d(name)f(has)g(b)s(een)g(c)m (hanged,)h(and)f(if)g(the)h(edit)g(session)f(is)g(read-only)-8 b(.)390 3346 y(Line:)282 b(Unc)m(hanged.)390 3516 y(Column:)141 b(Unc)m(hanged.)390 3687 y(Options:)g(None.)3290 3893 y([Command])-3600 b Fh([count])54 b()3290 4002 y Fo([Command])-3600 b Fh([count])54 b(h)390 4112 y Fo(Mo)m(v)m(e)32 b(the)e(cursor)g(bac)m(k)h Fi(count)p Fo(c)m(haracters)f(in)f(the)i(curren)m(t)f(line.)40 b(It)31 b(is)f(an)g(error)f(if)h(the)h(cursor)390 4222 y(is)f(on)h(the)f (\014rst)g(c)m(haracter)i(in)e(the)g(line.)390 4477 y(The)e Fi(<)p Fn(con)m(trol-H)p Fi(>)j Fo(and)d Fn(h)g Fo(commands)g(ma)m(y)h (b)s(e)f(used)g(as)h(the)g(motion)g(comp)s(onen)m(t)g(of)g(other)g Fn(vi)390 4586 y Fo(commands,)h(in)g(whic)m(h)g(case)i(an)m(y)f(text)g (copied)g(in)m(to)g(a)g(bu\013er)e(is)i(c)m(haracter)h(orien)m(ted.)390 4762 y(Line:)282 b(Unc)m(hanged.)390 4933 y(Column:)141 b(Set)37 b(to)h(the)f Fi(current)29 b(-)h(count)p Fo(c)m(haracter,)39 b(or,)g(the)e(\014rst)g(c)m(haracter)h(in)f(the)h(line)870 5042 y(if)d Fi(count)p Fo(is)e(greater)j(than)e(or)h(equal)g(to)g(the)g (n)m(um)m(b)s(er)f(of)g(c)m(haracters)i(in)f(the)g(line)870 5152 y(b)s(efore)30 b(the)h(cursor.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 19 22 TeXDict begin 19 21 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(19)3290 299 y([Command])-3600 b Fh([count])54 b()3290 408 y Fo([Command])-3600 b Fh([count])54 b()3290 518 y Fo([Command])-3600 b Fh([count])54 b(j)390 628 y Fo(Mo)m(v)m(e)28 b(the)e(cursor)g(do)m (wn)f Fi(count)p Fo(lines)g(without)h(c)m(hanging)h(the)f(curren)m(t)g (column.)39 b(It)26 b(is)g(an)g(error)390 737 y(if)k(the)h(mo)m(v)m (emen)m(t)h(is)f(past)f(the)h(end)e(of)i(the)g(\014le.)390 989 y(The)24 b Fi(<)p Fn(con)m(trol-J)p Fi(>)p Fo(,)k Fi(<)p Fn(con)m(trol-N)p Fi(>)f Fo(and)d Fn(j)h Fo(commands)g(ma)m(y)g (b)s(e)g(used)f(as)h(the)g(motion)h(comp)s(onen)m(t)390 1099 y(of)31 b(other)f Fn(vi)h Fo(commands,)f(in)g(whic)m(h)g(case)i (an)m(y)e(text)i(copied)e(in)m(to)i(a)f(bu\013er)e(is)h(line)h(orien)m (ted.)390 1270 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h (plus)f Fi(count)p Fo(.)390 1437 y(Column:)141 b(The)30 b(most)h(attractiv)m(e)i(cursor)d(p)s(osition.)390 1605 y(Options:)141 b(None.)3290 1805 y([Command])-3600 b Fh()3290 1914 y Fo([Command])g Fh()390 2024 y Fo(Repain)m(t)31 b(the)g(screen.)390 2195 y(Line:)282 b(Unc)m(hanged.)390 2362 y(Column:)141 b(Unc)m(hanged.)390 2530 y(Options:)g(None.)3290 2730 y([Command])-3600 b Fh([count])54 b()3290 2839 y Fo([Command])-3600 b Fh([count])54 b(+)390 2949 y Fo(Mo)m(v)m(e)30 b(the)e(cursor)f(do)m (wn)g Fi(count)p Fo(lines)f(to)j(the)f(\014rst)f(non)m(blank)g(c)m (haracter)i(of)f(that)g(line.)41 b(It)27 b(is)h(an)390 3059 y(error)i(if)g(the)h(mo)m(v)m(emen)m(t)h(is)f(past)f(the)h(end)e (of)i(the)f(\014le.)390 3311 y(The)d Fi(<)p Fn(con)m(trol-M)p Fi(>)j Fo(and)d Fi(+)h Fo(commands)f(ma)m(y)h(b)s(e)f(used)g(as)h(the)g (motion)h(comp)s(onen)m(t)f(of)g(other)g Fn(vi)390 3420 y Fo(commands,)i(in)g(whic)m(h)g(case)i(an)m(y)f(text)g(copied)g(in)m (to)g(a)g(bu\013er)e(is)i(line)f(orien)m(ted.)390 3591 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h(plus)f Fi(count)p Fo(.)390 3759 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (non)m(blank)g(c)m(haracter)i(in)e(the)g(line.)390 3926 y(Options:)141 b(None.)3290 4126 y([Command])-3600 b Fh([count])54 b()3290 4236 y Fo([Command])-3600 b Fh([count])54 b(k)390 4345 y Fo(Mo)m(v)m(e)34 b(the)f(cursor)f(up)f Fi(count)p Fo(lines,)h(without)g(c)m(hanging)h(the)g(curren)m(t)f (column.)46 b(It)33 b(is)f(an)g(error)390 4455 y(if)e(the)h(mo)m(v)m (emen)m(t)h(is)f(past)f(the)h(b)s(eginning)e(of)i(the)f(\014le.)390 4707 y(The)f Fi(<)p Fn(con)m(trol-P)p Fi(>)i Fo(and)e Fn(k)g Fo(commands)h(ma)m(y)g(b)s(e)e(used)h(as)h(the)f(motion)i(comp)s (onen)m(t)e(of)h(other)g Fn(vi)390 4816 y Fo(commands,)g(in)g(whic)m(h) g(case)i(an)m(y)f(text)g(copied)g(in)m(to)g(a)g(bu\013er)e(is)i(line)f (orien)m(ted.)390 4988 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g (line)h(min)m(us)f Fi(count)p Fo(.)390 5155 y(Column:)141 b(The)30 b(most)h(attractiv)m(e)i(cursor)d(p)s(osition.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 20 23 TeXDict begin 20 22 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(20)3290 299 y([Command])-3600 b Fh()390 408 y Fo(Return)39 b(to)h(the)g(most)g(recen)m(t)g (tag)h(con)m(text.)70 b(The)39 b Fi(<)p Fn(con)m(trol-T)p Fi(>)j Fo(command)d(is)h(an)f(absolute)390 518 y(mo)m(v)m(emen)m(t.)390 679 y(Line:)282 b(Set)31 b(to)g(the)f(con)m(text)i(of)f(the)g(previous) e(tag)j(command.)390 840 y(Column:)141 b(Set)31 b(to)g(the)f(con)m (text)i(of)f(the)g(previous)e(tag)j(command.)390 1001 y(Options:)141 b(None.)3290 1188 y([Command])-3600 b Fh([count])54 b()390 1297 y Fo(Scroll)34 b(bac)m(kw)m(ard)f Fi(count)p Fo(lines.)49 b(If)33 b Fi(count)p Fo(is)e(not)j(sp)s (eci\014ed,)g(scroll)g(bac)m(kw)m(ard)f(the)h(n)m(um)m(b)s(er)e(of)390 1407 y(lines)k(sp)s(eci\014ed)g(b)m(y)g(the)g(last)h Fi(<)p Fn(con)m(trol-D)p Fi(>)h Fo(or)e Fi(<)p Fn(con)m(trol-U)p Fi(>)i Fo(command.)57 b(If)36 b(this)g(is)g(the)h(\014rst)390 1516 y Fi(<)p Fn(con)m(trol-D)p Fi(>)27 b Fo(or)f Fi(<)p Fn(con)m(trol-U)p Fi(>)h Fo(command,)f(scroll)h(bac)m(kw)m(ard)f(half)g (the)f(n)m(um)m(b)s(er)g(of)h(lines)f(in)h(the)390 1626 y(screen.)41 b(\(In)29 b(the)h(case)h(of)e(split)h(screens,)g(the)g (default)g(scrolling)h(distance)f(is)g(corrected)h(to)f(half)390 1735 y(the)k(curren)m(t)g(screen)g(size.\))53 b(It)34 b(is)g(an)g(error)g(if)g(the)g(mo)m(v)m(emen)m(t)i(is)e(past)g(the)g(b) s(eginning)g(of)g(the)390 1845 y(\014le.)390 2006 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h(min)m(us)f(the)g(amoun)m(t)h (scrolled.)390 2167 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m (blank)g(c)m(haracter)i(in)e(the)g(line.)390 2328 y(Options:)141 b(None.)3290 2514 y([Command])-3600 b Fh()390 2624 y Fo(Switc)m(h)32 b(to)h(the)g(next)f(lo)m(w)m(er)i(screen)e(in)g (the)h(windo)m(w,)f(or,)h(to)g(the)g(\014rst)e(screen)i(if)f(there)g (are)h(no)390 2734 y(lo)m(w)m(er)f(screens)e(in)g(the)h(windo)m(w.)390 2895 y(Line:)282 b(Set)31 b(to)g(the)f(previous)g(cursor)g(p)s(osition) g(in)g(the)h(windo)m(w.)390 3056 y(Column:)141 b(Set)31 b(to)g(the)f(previous)g(cursor)g(p)s(osition)g(in)g(the)h(windo)m(w.) 390 3216 y(Options:)141 b(None.)3290 3403 y([Command])-3600 b Fh([count])54 b()390 3513 y Fo(Scroll)32 b(bac)m(kw)m(ard)h Fi(count)p Fo(lines,)e(lea)m(ving)j(the)e(curren)m (t)g(line)g(and)f(column)h(as)g(is,)h(if)f(p)s(ossible.)45 b(It)390 3622 y(is)30 b(an)h(error)f(if)g(the)h(mo)m(v)m(emen)m(t)h(is) e(past)h(the)f(b)s(eginning)g(of)h(the)f(\014le.)390 3784 y(Line:)282 b(Unc)m(hanged)32 b(unless)g(the)g(curren)m(t)g(line)g (scrolls)h(o\013)f(the)g(screen,)h(in)f(whic)m(h)f(case)i(it)870 3893 y(is)d(set)h(to)g(the)g(last)g(line)g(of)f(text)i(displa)m(y)m(ed) f(on)f(the)h(screen.)390 4054 y(Column:)141 b(Unc)m(hanged)32 b(unless)g(the)g(curren)m(t)g(line)g(scrolls)h(o\013)f(the)g(screen,)h (in)f(whic)m(h)f(case)i(it)870 4163 y(is)d(the)h(most)g(attractiv)m(e)i (cursor)d(p)s(osition.)390 4324 y(Options:)141 b(None.)3290 4511 y([Command])-3600 b Fh()390 4621 y Fo(Susp)s(end)37 b(the)k(curren)m(t)f(editor)g(session.)70 b(If)40 b(the)g(\014le)g(has) g(b)s(een)g(mo)s(di\014ed)f(since)h(it)h(w)m(as)f(last)390 4730 y(completely)g(written,)i(and)c(the)h Fi(autowrite)d Fo(option)j(is)g(set,)i(the)e(\014le)g(is)g(written)f(b)s(efore)h(the) 390 4840 y(editor)31 b(session)f(is)h(susp)s(ended.)38 b(If)30 b(this)g(write)h(fails,)g(the)f(editor)h(session)g(is)f(not)h (susp)s(ended.)390 5001 y(Line:)282 b(Unc)m(hanged.)390 5162 y(Column:)141 b(Unc)m(hanged.)390 5322 y(Options:)g(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(option.)p eop end %%Page: 21 24 TeXDict begin 21 23 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(21)3290 299 y([Command])-3600 b Fh()390 408 y Fo(Execute)23 b Fn(ex)g Fo(commands)f(or)g (cancel)i(partial)f(commands.)37 b(If)22 b(an)g Fn(ex)h Fo(command)f(is)g(b)s(eing)g(en)m(tered)390 518 y(\(e.g.)44 b Fn(/)p Fo(,)32 b Fn(?)p Fo(,)f Fn(:)42 b Fo(or)30 b Fn(!)p Fo(\),)i(the)f(command)g(is)g(executed.)43 b(If)30 b(a)i(partial)f(command)g(has)g(b)s(een)f(en)m(tered,)390 628 y(e.g.)43 b(\\)p Fi([0-9]*)p Fo(",)30 b(or)g(\\)p Fi([0-9]*[!<>cdy])p Fo(",)e(the)j(command)g(is)f(cancelled.)43 b(Otherwise,)31 b(it)g(is)g(an)390 737 y(error.)390 898 y(Line:)282 b(When)38 b(an)g Fn(ex)h Fo(command)f(is)g(b)s(eing)g (executed,)k(the)c(curren)m(t)g(line)h(is)f(set)h(as)g(de-)870 1008 y(scrib)s(ed)29 b(for)i(that)f(command.)41 b(Otherwise,)30 b(unc)m(hanged.)390 1168 y(Column:)141 b(When)39 b(an)g Fn(ex)h Fo(command)f(is)h(b)s(eing)f(executed,)j(the)e(curren)m(t)f (column)g(is)h(set)g(as)870 1278 y(describ)s(ed)29 b(for)h(that)h (command.)41 b(Otherwise,)30 b(unc)m(hanged.)390 1438 y(Options:)141 b(None.)3290 1625 y([Command])-3600 b Fh()390 1734 y Fo(Push)28 b(a)i(tag)h(reference)g(on)m(to)f (the)g(tag)h(stac)m(k.)42 b(The)30 b(tags)g(\014les)g(\(see)h(the)f Fi(tags)e Fo(option)i(for)g(more)390 1844 y(information\))39 b(are)g(searc)m(hed)g(for)g(a)g(tag)g(matc)m(hing)h(the)f(curren)m(t)f (w)m(ord.)65 b(The)38 b(curren)m(t)g(w)m(ord)390 1953 y(b)s(egins)c(at)h(the)g(\014rst)f(non-whitespace)h(c)m(haracter)h(on)e (or)h(after)g(the)f(curren)m(t)h(cursor)f(p)s(osition,)390 2063 y(and)c(extends)h(up)f(to)i(the)f(next)g(non-w)m(ord)f(c)m (haracter)j(or)e(the)g(end)f(of)h(the)g(line.)43 b(If)31 b(a)g(matc)m(hing)390 2172 y(tag)j(is)f(found,)f(the)i(curren)m(t)e (\014le)h(is)g(discarded)g(and)f(the)h(\014le)g(con)m(taining)h(the)f (tag)i(reference)e(is)390 2282 y(edited.)390 2527 y(If)23 b(the)g(curren)m(t)g(\014le)g(has)g(b)s(een)f(mo)s(di\014ed)g(since)i (it)g(w)m(as)f(last)h(completely)h(written,)g(the)e(command)390 2637 y(will)31 b(fail.)41 b(The)30 b Fi(<)p Fn(con)m(trol-])p Fi(>)i Fo(command)f(is)f(an)g(absolute)h(mo)m(v)m(emen)m(t.)390 2798 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e (matc)m(hing)i(tag)f(string.)390 2958 y(Column:)141 b(Set)31 b(to)g(the)f(start)h(of)g(the)f(matc)m(hing)i(tag)f(string.)390 3119 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(tags)g Fo(and)f Fi(taglength)f Fo(options.)3290 3305 y([Command])-3600 b Fh()390 3415 y Fo(Switc)m(h)30 b(to)i(the)e(most)h(recen)m (tly)h(edited)e(\014le.)390 3660 y(If)f(the)i(\014le)f(has)f(b)s(een)g (mo)s(di\014ed)g(since)i(it)f(w)m(as)g(last)h(completely)h(written,)e (and)f(the)h Fi(autowrite)390 3769 y Fo(option)k(is)g(set,)i(the)e (\014le)g(is)g(written)h(out.)51 b(If)34 b(this)g(write)g(fails,)i(the) e(command)g(will)g(fail.)52 b(Oth-)390 3879 y(erwise,)33 b(if)f(the)g(curren)m(t)g(\014le)g(has)f(b)s(een)h(mo)s(di\014ed)e (since)j(it)f(w)m(as)h(last)f(completely)i(written,)f(the)390 3988 y(command)d(will)h(fail.)390 4149 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(the)g(cursor)e(w)m(as)i(on)f(when)g(the)g(\014le)h (w)m(as)f(last)i(edited.)390 4310 y(Column:)141 b(Set)31 b(to)g(the)f(column)g(the)h(cursor)f(w)m(as)g(on)h(when)e(the)i(\014le) f(w)m(as)h(last)g(edited.)390 4470 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(option.)3290 4657 y([Command])-3600 b Fh([count])54 b()3290 4766 y Fo([Command])-3600 b Fh([count])54 b(l)390 4876 y Fo(Mo)m(v)m(e)32 b(the)e(cursor)g(forw)m (ard)f Fi(count)p Fo(c)m(haracters)i(without)f(c)m(hanging)h(the)f (curren)m(t)g(line.)41 b(It)30 b(is)g(an)390 4985 y(error)g(if)g(the)h (cursor)f(is)g(on)g(the)h(last)g(c)m(haracter)h(in)e(the)h(line.)390 5230 y(The)42 b Fi(<)p Fn(space)p Fi(>)g Fo(and)g Fn(l)g Fo(commands)g(ma)m(y)h(b)s(e)f(used)g(as)g(the)h(motion)g(comp)s(onen)m (t)g(of)f(other)h Fn(vi)390 5340 y Fo(commands,)k(in)c(whic)m(h)h(case) h(an)m(y)f(text)g(copied)g(in)m(to)h(a)f(bu\013er)f(is)h(c)m(haracter)h (orien)m(ted.)82 b(In)p eop end %%Page: 22 25 TeXDict begin 22 24 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(22)390 299 y(addition,)26 b(these)f(commands) e(ma)m(y)i(b)s(e)f(used)f(as)i(the)f(motion)h(comp)s(onen)m(ts)f(of)h (other)f(commands)390 408 y(when)29 b(the)i(cursor)f(is)g(on)g(the)h (last)g(c)m(haracter)h(in)e(the)h(line,)g(without)f(error.)390 564 y(Line:)282 b(Unc)m(hanged.)390 719 y(Column:)141 b(Set)28 b(to)h(the)f(curren)m(t)g(c)m(haracter)h(plus)e(the)h(next)h Fi(count)p Fo(c)m(haracters,)f(or)g(to)h(the)f(last)870 829 y(c)m(haracter)k(on)d(the)h(line)h(if)f Fi(count)p Fo(is)e(greater)j(than)f(the)g(n)m(um)m(b)s(er)f(of)h(c)m(haracters)h (in)870 938 y(the)g(line)f(after)h(the)g(curren)m(t)f(c)m(haracter.)390 1093 y(Options:)141 b(None.)3290 1271 y([Command])-3600 b Fh([count])54 b(!)46 b Fg(motion)31 b(shell-argumen)m(t)p Ff(\()p Fg(s)p Ff(\))p Fh(<)p Fg(carriage-return)p Fh(>)390 1381 y Fo(Replace)45 b(text)f(with)f(results)h(from)f(a)h(shell)f (command.)80 b(P)m(ass)44 b(the)g(lines)g(sp)s(eci\014ed)e(b)m(y)i(the) 390 1491 y Fi(count)p Fo(and)32 b Fi(motion)p Fo(argumen)m(ts)g(as)i (standard)f(input)f(to)j(the)e(program)h(named)f(b)m(y)h(the)f Fi(shell)390 1600 y Fo(option,)39 b(and)e(replace)h(those)f(lines)g (with)g(the)g(output)g(\(b)s(oth)g(standard)f(error)g(and)h(standard) 390 1710 y(output\))30 b(of)h(that)g(command.)390 1952 y(After)g(the)f(motion)h(is)g(en)m(tered,)g Fn(vi)f Fo(prompts)g(for)g (argumen)m(ts)h(to)g(the)f(shell)h(command.)390 2194 y(Within)39 b(those)h(argumen)m(ts,)i(\\)p Fi(\045)p Fo(")e(and)e(\\)p Fi(#)p Fo(")i(c)m(haracters)g(are)g(expanded)e(to)i (the)g(curren)m(t)f(and)390 2303 y(alternate)29 b(pathnames,)e(resp)s (ectiv)m(ely)-8 b(.)42 b(The)26 b(\\)p Fi(!)p Fo(")i(c)m(haracter)g(is) f(expanded)f(with)h(the)g(command)390 2413 y(text)j(of)g(the)g (previous)f Fn(!)39 b Fo(or)30 b Fn(:!)40 b Fo(commands.)g (\(Therefore,)30 b(the)g(command)f Fn(!)p Fi(<)p Fn(motion)p Fi(>)p Fn(!)40 b Fo(rep)s(eats)390 2523 y(the)21 b(previous)g Fn(!)37 b Fo(command.\))h(The)21 b(sp)s(ecial)h(meanings)f(of)h(\\)p Fi(\045)p Fo(",)h(\\)p Fi(#)p Fo(")f(and)f(\\)p Fi(!)p Fo(")h(can)f(b)s(e)g(o)m(v)m(erridden)390 2632 y(b)m(y)31 b(escaping)h(them)f(with)g(a)h(bac)m(kslash.)44 b(If)31 b(no)g Fn(!)43 b Fo(or)31 b Fn(:!)43 b Fo(command)31 b(has)g(y)m(et)h(b)s(een)f(executed,)h(it)390 2742 y(is)h(an)f(error)h (to)g(use)g(an)g(unescap)s(ed)e(\\)p Fi(!)p Fo(")j(c)m(haracter)g(as)f (a)g(shell)g(argumen)m(t.)49 b(The)32 b Fn(!)47 b Fo(command)390 2851 y(do)s(es)26 b Fp(not)36 b Fo(do)26 b(shell)g(expansion)g(on)h (the)f(strings)g(pro)m(vided)g(as)h(argumen)m(ts.)39 b(If)26 b(an)m(y)h(of)f(the)h(ab)s(o)m(v)m(e)390 2961 y(expansions)38 b(c)m(hange)i(the)e(argumen)m(ts)h(the)g(user)e(en)m (tered,)42 b(the)c(command)h(is)f(redispla)m(y)m(ed)h(at)390 3071 y(the)31 b(b)s(ottom)f(of)h(the)f(screen.)390 3313 y Fn(Vi)g Fo(then)f(executes)i(the)f(program)g(named)f(b)m(y)h(the)g Fi(shell)e Fo(option,)i(with)g(a)g Fn(-c)h Fo(\015ag)f(follo)m(w)m(ed)h (b)m(y)390 3422 y(the)g(argumen)m(ts)f(\(whic)m(h)h(are)f(bundled)f(in) m(to)i(a)g(single)g(argumen)m(t\).)390 3664 y(The)f Fn(!)40 b Fo(command)30 b(is)h(p)s(ermitted)f(in)g(an)g(empt)m(y)h(\014le.)390 3906 y(If)d(the)h(\014le)g(has)f(b)s(een)g(mo)s(di\014ed)g(since)h(it)g (w)m(as)g(last)h(completely)g(written,)g(the)e Fn(!)40 b Fo(command)29 b(will)390 4016 y(w)m(arn)h(y)m(ou.)390 4171 y(Line:)282 b(The)30 b(\014rst)f(line)i(of)g(the)f(replaced)h (text.)390 4326 y(Column:)141 b(The)30 b(\014rst)f(column)i(of)f(the)h (replaced)g(text.)390 4482 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shell)f Fo(option.)3290 4660 y([Command])-3600 b Fh([count])54 b(#)46 b Fg(#)p Fh(|+|)p Fg(-)390 4769 y Fo(Incremen)m(t)25 b(or)g(decremen)m(t)g(the)h(n)m(um)m(b)s(er)d (referenced)i(b)m(y)g(the)g(cursor.)38 b(If)24 b(the)h(trailing)h(c)m (haracter)390 4879 y(is)33 b(a)g Fi(+)p Fo(or)g Fi(#)p Fo(,)g(the)g(n)m(um)m(b)s(er)f(is)h(incremen)m(ted)g(b)m(y)g Fi(count)p Fo(.)46 b(If)33 b(the)g(trailing)h(c)m(haracter)g(is)f(a)g Fi(-)p Fo(,)h(the)390 4988 y(n)m(um)m(b)s(er)29 b(is)h(decremen)m(ted)i (b)m(y)e Fi(count)p Fo(.)390 5230 y(A)24 b(leading)g(\\)p Fi(0X)p Fo(")g(or)f(\\)p Fi(0x)p Fo(")h(causes)g(the)g(n)m(um)m(b)s(er) e(to)i(b)s(e)f(in)m(terpreted)h(as)f(a)h(hexadecimal)h(n)m(um)m(b)s (er.)390 5340 y(Otherwise,)39 b(a)e(leading)h(\\)p Fi(0)p Fo(")g(causes)f(the)h(n)m(um)m(b)s(er)d(to)j(b)s(e)f(in)m(terpreted)g (as)h(an)f(o)s(ctal)h(n)m(um)m(b)s(er,)p eop end %%Page: 23 26 TeXDict begin 23 25 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(23)390 299 y(unless)37 b(a)h(non-o)s(ctal)g (digit)h(is)e(found)f(as)i(part)g(of)f(the)h(n)m(um)m(b)s(er.)61 b(Otherwise,)39 b(the)f(n)m(um)m(b)s(er)e(is)390 408 y(in)m(terpreted)k(as)g(a)g(decimal)g(n)m(um)m(b)s(er,)h(and)e(ma)m(y)h (ha)m(v)m(e)h(a)f(leading)h Fi(+)p Fo(or)e Fi(-)p Fo(sign.)68 b(The)39 b(curren)m(t)390 518 y(n)m(um)m(b)s(er)25 b(b)s(egins)g(at)i (the)f(\014rst)g(non-blank)f(c)m(haracter)j(at)e(or)h(after)f(the)g (curren)m(t)g(cursor)g(p)s(osition,)390 628 y(and)43 b(extends)g(up)g(to)h(the)g(end)f(of)g(the)h(line)g(or)f(the)h(\014rst) f(c)m(haracter)i(that)f(isn't)g(a)f(p)s(ossible)390 737 y(c)m(haracter)32 b(for)e(the)h(n)m(umeric)f(t)m(yp)s(e.)41 b(The)30 b(format)h(of)f(the)h(n)m(um)m(b)s(er)e(\(e.g.)42 b(leading)31 b(0's,)g(signs\))g(is)390 847 y(retained)g(unless)e(the)i (new)f(v)-5 b(alue)31 b(cannot)g(b)s(e)e(represen)m(ted)i(in)f(the)g (previous)g(format.)390 1093 y(Octal)41 b(and)e(hexadecimal)i(n)m(um)m (b)s(ers,)g(and)e(the)g(result)h(of)g(the)g(op)s(eration,)i(m)m(ust)e (\014t)f(in)m(to)i(an)390 1202 y(\\)p Fi(unsigned)29 b(long)p Fo(".)37 b(Similarly)-8 b(,)24 b(decimal)f(n)m(um)m(b)s(ers)e (and)g(their)h(result)g(m)m(ust)g(\014t)g(in)m(to)h(a)f(\\)p Fi(signed)390 1312 y(long)p Fo(".)64 b(It)39 b(is)f(an)g(error)g(to)i (use)e(this)g(command)g(when)g(the)g(cursor)g(is)g(not)h(p)s(ositioned) f(at)i(a)390 1421 y(n)m(um)m(b)s(er.)390 1666 y(Line:)282 b(Unc)m(hanged.)390 1828 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (c)m(haracter)i(in)e(the)g(cursor)g(n)m(um)m(b)s(er.)390 1989 y(Options:)141 b(None.)3290 2177 y([Command])-3600 b Fh([count])54 b($)390 2286 y Fo(Mo)m(v)m(e)40 b(the)f(cursor)f(to)h (the)f(end)g(of)h(a)f(line.)66 b(If)37 b Fi(count)p Fo(is)g(sp)s (eci\014ed,)j(the)f(cursor)f(mo)m(v)m(es)h(do)m(wn)390 2396 y Fi(count)29 b(-)h(1)p Fo(lines.)390 2642 y(It)k(is)f(not)h(an)g (error)f(to)h(use)f(the)h Fn($)g Fo(command)f(when)g(the)h(cursor)f(is) g(on)h(the)g(last)g(c)m(haracter)h(in)390 2751 y(the)c(line)f(or)h (when)e(the)i(line)f(is)h(empt)m(y)-8 b(.)390 2997 y(The)38 b Fn($)h Fo(command)g(ma)m(y)g(b)s(e)f(used)g(as)h(the)g(motion)g(comp) s(onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)h(in)390 3107 y(whic)m(h)29 b(case)h(an)m(y)g(text)g(copied)f(in)m(to)h(a)g (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted,)f(unless)f(the)g(cursor)g (is)g(at,)390 3216 y(or)i(b)s(efore)g(the)g(\014rst)f(non)m(blank)h(c)m (haracter)i(in)e(the)g(line,)h(in)f(whic)m(h)g(case)h(it)f(is)h(line)f (orien)m(ted.)44 b(It)390 3326 y(is)32 b(not)g(an)g(error)g(to)h(use)e (the)i Fn($)f Fo(command)g(as)g(a)g(motion)h(comp)s(onen)m(t)f(when)f (the)i(cursor)e(is)h(on)390 3436 y(the)f(last)g(c)m(haracter)h(in)e (the)g(line,)h(although)g(it)g(is)f(an)h(error)f(when)f(the)i(line)f (is)h(empt)m(y)-8 b(.)390 3598 y(Line:)282 b(Set)31 b(to)g(the)f (curren)m(t)g(line)h(plus)f Fi(count)p Fo(min)m(us)e(1.)390 3759 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(in)e (the)h(line.)390 3920 y(Options:)141 b(None.)3290 4108 y([Command])-3600 b Fh(\045)390 4217 y Fo(Mo)m(v)m(e)32 b(to)f(the)f(matc)m(hing)h(c)m(haracter.)42 b(The)30 b(cursor)f(mo)m(v)m(es)i(to)g(the)f(paren)m(thesis)g(or)g(curly)g (brace)390 4327 y(whic)m(h)39 b Fp(matches)47 b Fo(the)39 b(paren)m(thesis)g(or)g(curly)f(brace)h(found)f(at)h(the)g(curren)m(t)g (cursor)f(p)s(osition)390 4437 y(or)g(whic)m(h)f(is)h(the)g(closest)h (one)f(to)g(the)g(righ)m(t)g(of)g(the)g(cursor)f(on)h(the)g(line.)63 b(It)38 b(is)f(an)h(error)f(to)390 4546 y(execute)32 b(the)f Fn(\045)f Fo(command)h(on)f(a)h(line)g(without)g(a)g(paren)m (thesis)f(or)h(curly)f(brace.)42 b(Historically)-8 b(,)390 4656 y(an)m(y)31 b Fi(count)p Fo(sp)s(eci\014ed)d(to)j(the)g Fn(\045)f Fo(command)g(w)m(as)h(ignored.)390 4902 y(The)38 b Fn(\045)h Fo(command)f(is)h(an)f(absolute)i(mo)m(v)m(emen)m(t.)67 b(The)39 b Fn(\045)f Fo(command)h(ma)m(y)g(b)s(e)f(used)g(as)h(the)390 5011 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f(in)m(to) g(a)g(bu\013er)390 5121 y(is)34 b(c)m(haracter)i(orien)m(ted,)h(unless) c(the)i(starting)g(p)s(oin)m(t)f(of)g(the)h(region)g(is)f(at)h(or)f(b)s (efore)g(the)h(\014rst)390 5230 y(non)m(blank)d(c)m(haracter)i(on)f (its)g(line,)h(and)e(the)h(ending)f(p)s(oin)m(t)g(is)h(at)g(or)g(after) g(the)g(last)g(non)m(blank)390 5340 y(c)m(haracter)f(on)e(its)h(line,)g (in)f(whic)m(h)g(case)i(it)e(is)h(line)g(orien)m(ted.)p eop end %%Page: 24 27 TeXDict begin 24 26 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(24)390 299 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(matc)m(hing)i(c)m(haracter.) 390 454 y(Column:)141 b(Set)31 b(to)g(the)f(matc)m(hing)i(c)m (haracter.)390 609 y(Options:)141 b(None.)3290 786 y([Command])-3600 b Fh(&)390 896 y Fo(Rep)s(eat)31 b(the)f(previous)g(substitution)g (command)h(on)f(the)g(curren)m(t)g(line.)390 1138 y(Historically)-8 b(,)33 b(an)m(y)e Fi(count)p Fo(sp)s(eci\014ed)d(to)j(the)g Fn(&)f Fo(command)g(w)m(as)h(ignored.)390 1293 y(Line:)282 b(Unc)m(hanged.)390 1448 y(Column:)141 b(Unc)m(hanged)32 b(if)f(the)g(cursor)g(w)m(as)g(on)h(the)f(last)h(c)m(haracter)h(in)e (the)g(line,)h(otherwise,)870 1557 y(set)f(to)g(the)g(\014rst)e(non)m (blank)h(c)m(haracter)i(in)e(the)h(line.)390 1712 y(Options:)141 b(A\013ected)43 b(b)m(y)e(the)g Fi(edcompatible)p Fo(,)g Fi(extended)p Fo(,)h Fi(ignorecase)d Fo(and)i Fi(magic)f Fo(op-)870 1822 y(tions.)3290 1999 y([Command])-3600 b Fh(')3290 2109 y Fo([Command])g Fh(`)390 2219 y Fo(Return)38 b(to)i(a)f(con)m(text)i(mark)m(ed)f(b)m(y)e(the)i (c)m(haracter)g Fi()p Fo(.)64 b(If)39 b Fi()p Fo(is)d(the)390 2328 y(\\)p Fi(')p Fo(")k(or)g(\\)p Fi(`)p Fo(")h(c)m(haracter,)j(return)39 b(to)h(the)g(previous)g(con)m(text.)71 b(If)39 b Fi()p Fo(is)e(an)m(y)k(other)390 2438 y(c)m(haracter,)d(return)33 b(to)j(the)e(con)m(text)j(mark)m(ed)e (b)m(y)f(that)i(c)m(haracter)g(\(see)f(the)g Fn(m)g Fo(command)f(for) 390 2547 y(more)24 b(information\).)40 b(If)23 b(the)i(command)f(is)g (the)g Fi(\\)p Fn(')g Fo(command,)i(only)e(the)g(line)h(v)-5 b(alue)24 b(is)h(restored,)390 2657 y(and)j(the)h(cursor)g(is)f(placed) i(on)f(the)g(\014rst)f(non)m(blank)g(c)m(haracter)j(of)e(that)g(line.) 41 b(If)28 b(the)h(command)390 2767 y(is)h(the)h Fn(`)g Fo(command,)f(b)s(oth)g(the)g(line)h(and)f(column)g(v)-5 b(alues)31 b(are)f(restored.)390 3008 y(It)e(is)g(an)g(error)f(if)h (the)g(con)m(text)i(no)e(longer)h(exists)f(b)s(ecause)g(of)g(line)g (deletion.)41 b(\(Con)m(texts)30 b(follo)m(w)390 3118 y(lines)h(that)g(are)f(mo)m(v)m(ed,)i(or)e(whic)m(h)g(are)h(deleted)g (and)f(then)g(restored.\))390 3360 y(The)25 b Fi(\\)p Fn(')g Fo(and)g Fn(`)g Fo(commands)g(are)h(b)s(oth)f(absolute)h(mo)m(v) m(emen)m(ts.)41 b(They)25 b(ma)m(y)h(b)s(e)e(used)h(as)g(a)h(motion)390 3469 y(comp)s(onen)m(t)g(for)f(other)g Fn(vi)h Fo(commands.)38 b(F)-8 b(or)26 b(the)g Fi(\\)p Fn(')f Fo(command,)h(an)m(y)g(text)g (copied)g(in)m(to)g(a)g(bu\013er)390 3579 y(is)d(line)g(orien)m(ted.)40 b(F)-8 b(or)23 b(the)h Fn(`)f Fo(command,)i(an)m(y)e(text)h(copied)g (in)m(to)g(a)f(bu\013er)f(is)h(c)m(haracter)i(orien)m(ted,)390 3689 y(unless)h(it)g(b)s(oth)g(starts)h(and)e(stops)i(at)g(the)f (\014rst)g(c)m(haracter)i(in)e(the)g(line,)i(in)e(whic)m(h)g(case)h(it) g(is)g(line)390 3798 y(orien)m(ted.)41 b(In)27 b(addition,)h(when)f (using)g(the)h Fn(`)f Fo(command)h(as)f(a)h(motion)h(comp)s(onen)m(t,)f (commands)390 3908 y(whic)m(h)j(mo)m(v)m(e)h(bac)m(kw)m(ard)g(and)f (started)g(at)h(the)f(\014rst)g(c)m(haracter)i(in)d(the)i(line,)g(or)f (mo)m(v)m(e)h(forw)m(ard)390 4017 y(and)e(ended)f(at)i(the)f(\014rst)f (c)m(haracter)j(in)e(the)g(line,)h(are)f(corrected)i(to)e(the)h(last)g (c)m(haracter)g(of)g(the)390 4127 y(line)g(preceding)f(the)h(starting)g (and)f(ending)f(lines,)i(resp)s(ectiv)m(ely)-8 b(.)390 4282 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(from)f(the)g(con)m(text.) 390 4437 y(Column:)141 b(Set)33 b(to)h(the)f(\014rst)f(non)m(blank)g(c) m(haracter)i(in)f(the)g(line,)h(for)e(the)h Fi(\\)p Fn(')g Fo(command,)h(and)870 4546 y(set)d(to)g(the)g(con)m(text's)h(column)e (for)g(the)h Fn(`)f Fo(command.)390 4701 y(Options:)141 b(None.)3290 4879 y([Command])-3600 b Fh([count])54 b(\()390 4989 y Fo(Bac)m(k)32 b(up)d Fi(count)p Fo(sen)m(tences.)390 5230 y(The)43 b Fn(\()h Fo(command)g(is)g(an)f(absolute)i(mo)m(v)m (emen)m(t.)83 b(The)43 b Fn(\()h Fo(command)f(ma)m(y)i(b)s(e)e(used)g (as)h(the)390 5340 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f (in)m(to)g(a)g(bu\013er)p eop end %%Page: 25 28 TeXDict begin 25 27 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(25)390 299 y(is)38 b(c)m(haracter)i(orien)m (ted,)h(unless)c(the)h(starting)h(and)e(stopping)h(p)s(oin)m(ts)g(of)g (the)g(region)g(are)h(the)390 408 y(\014rst)33 b(c)m(haracter)j(in)d (the)h(line,)i(in)d(whic)m(h)h(case)h(it)f(is)g(line)h(orien)m(ted.)52 b(If)33 b(it)i(is)f(line)g(orien)m(ted,)i(the)390 518 y(starting)e(p)s(oin)m(t)e(of)h(the)g(region)h(is)f(adjusted)f(to)i(b)s (e)e(the)h(end)f(of)h(the)g(line)g(immediately)h(b)s(efore)390 628 y(the)d(starting)g(cursor)e(p)s(osition.)390 778 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(b)s (eginning)g(of)h(the)f(sen)m(tence.)390 928 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m(haracter)i(of)e(the)h (sen)m(tence.)390 1078 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(lisp)g Fo(option.)3290 1248 y([Command])-3600 b Fh([count])54 b(\))390 1358 y Fo(Mo)m(v)m(e)32 b(forw)m(ard)e Fi(count)p Fo(sen)m(tences.)390 1597 y(The)43 b Fn(\))h Fo(command)g(is)g(an)f(absolute)i(mo)m(v)m(emen)m(t.)83 b(The)43 b Fn(\))h Fo(command)f(ma)m(y)i(b)s(e)e(used)g(as)h(the)390 1707 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f(in)m(to) g(a)g(bu\013er)390 1817 y(is)34 b(c)m(haracter)i(orien)m(ted,)g(unless) d(the)h(starting)h(p)s(oin)m(t)f(of)g(the)g(region)h(is)f(the)g (\014rst)g(c)m(haracter)h(in)390 1926 y(the)e(line,)i(in)d(whic)m(h)h (case)h(it)g(is)f(line)g(orien)m(ted.)50 b(In)32 b(the)h(latter)i (case,)g(if)e(the)g(stopping)g(p)s(oin)m(t)g(of)390 2036 y(the)27 b(region)h(is)g(also)g(the)g(\014rst)e(c)m(haracter)j(in)e (the)g(line,)i(it)f(is)f(adjusted)g(to)h(b)s(e)e(the)i(end)f(of)g(the)h (line)390 2145 y(immediately)k(b)s(efore)e(it.)390 2295 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(b)s (eginning)g(of)h(the)f(sen)m(tence.)390 2445 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m(haracter)i(of)e(the)h (sen)m(tence.)390 2596 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(lisp)g Fo(option.)3290 2766 y([Command])-3600 b Fh([count])54 b(,)390 2876 y Fo(Rev)m(erse)31 b(\014nd)d(c)m (haracter)j Fi(count)p Fo(times.)40 b(Rev)m(erse)30 b(the)g(last)h Fn(F)p Fo(,)f Fn(f)p Fo(,)g Fn(T)f Fo(or)h Fn(t)g Fo(command,)g(searc)m (hing)390 2985 y(the)35 b(other)g(w)m(a)m(y)h(in)e(the)h(line,)i Fi(count)p Fo(times.)53 b(It)34 b(is)h(an)g(error)f(if)h(a)g Fn(F)p Fo(,)g Fn(f)p Fo(,)h Fn(T)f Fo(or)f Fn(t)i Fo(command)e(has)390 3095 y(not)d(b)s(een)e(p)s(erformed)g(y)m(et.)390 3334 y(The)39 b Fn(,)k Fo(command)d(ma)m(y)g(b)s(e)f(used)h(as)g(the)g (motion)g(comp)s(onen)m(t)h(of)f(other)g Fn(vi)g Fo(commands,)i(in)390 3444 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 3594 y(Line:)282 b(Unc)m(hanged.)390 3744 y(Column:)141 b(Set)35 b(to)i(the)e(searc)m(hed-for)h(c)m(haracter)h(for)e(the)g Fn(F)h Fo(and)e Fn(f)h Fo(commands,)i(b)s(efore)e(the)870 3853 y(c)m(haracter)29 b(for)e(the)h Fn(t)f Fo(command)h(and)e(after)i (the)g(c)m(haracter)h(for)e(the)g Fn(T)h Fo(command.)390 4004 y(Options:)141 b(None.)3290 4174 y([Command])-3600 b Fh([count])54 b(-)390 4284 y Fo(Mo)m(v)m(e)32 b(to)g(the)e(\014rst)g (non)m(blank)g(of)g(the)h(previous)f(line,)h Fi(count)p Fo(times.)390 4523 y(It)f(is)h(an)f(error)g(if)g(the)h(mo)m(v)m(emen)m (t)h(is)f(past)f(the)h(b)s(eginning)f(of)g(the)h(\014le.)390 4762 y(The)39 b Fn(-)h Fo(command)g(ma)m(y)g(b)s(e)f(used)g(as)h(the)g (motion)g(comp)s(onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)i(in)390 4872 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(line)h(orien)m(ted.)390 5022 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h(min)m(us)f Fi(count)p Fo(.)390 5172 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (non)m(blank)g(c)m(haracter)i(in)e(the)g(line.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 26 29 TeXDict begin 26 28 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(26)3290 299 y([Command])-3600 b Fh([count])54 b(.)390 408 y Fo(Rep)s(eat)36 b(the)f(last)h Fn(vi)f Fo(command)g(that)g(mo)s(di\014ed)f(text.)56 b(The)35 b(rep)s(eated)g(command)f(ma)m(y)i(b)s(e)f(a)390 518 y(command)e(and)g(motion)h(comp)s(onen)m(t)f(com)m(bination.)51 b(If)32 b Fi(count)p Fo(is)g(sp)s(eci\014ed,)i(it)g(replaces)g Fp(b)-5 b(oth)390 628 y Fo(the)39 b(coun)m(t)g(sp)s(eci\014ed)f(for)g (the)g(rep)s(eated)h(command,)i(and,)f(if)e(applicable,)k(for)c(the)h (rep)s(eated)390 737 y(motion)i(comp)s(onen)m(t.)70 b(If)40 b Fi(count)p Fo(is)f(not)h(sp)s(eci\014ed,)i(the)e(coun)m(ts)h (originally)g(sp)s(eci\014ed)f(to)h(the)390 847 y(command)30 b(b)s(eing)g(rep)s(eated)h(are)f(used)g(again.)390 1126 y(As)21 b(a)g(sp)s(ecial)g(case,)j(if)d(the)g Fi(\\)p Fn(.)37 b Fo(command)20 b(is)h(executed)h(immediately)g(after)f(the)g Fn(u)f Fo(command,)j(the)390 1236 y(c)m(hange)28 b(log)g(is)e(rolled)h (forw)m(ard)g(or)f(bac)m(kw)m(ard,)i(dep)s(ending)e(on)g(the)h(action)h (of)f(the)g Fn(u)f Fo(command.)390 1448 y(Line:)282 b(Set)31 b(as)f(describ)s(ed)f(for)i(the)f(rep)s(eated)h(command.)390 1642 y(Column:)141 b(Set)31 b(as)f(describ)s(ed)f(for)i(the)f(rep)s (eated)h(command.)390 1837 y(Options:)141 b(None.)3290 2091 y([Command])-3600 b Fh(/RE)3290 2201 y Fo([Command])g Fh(/RE/)47 b Fe([)p Fg(o\013set)p Fe(])p Fh(<)p Fg(carriage-return)p Fh(>)3290 2311 y Fo([Command])-3600 b Fh(?RE)3290 2420 y Fo([Command])g Fh(?RE?)47 b Fe([)p Fg(o\013set)p Fe(])p Fh(<)p Fg(carriage-return)p Fh(>)3290 2530 y Fo([Command])-3600 b Fh(N)3290 2639 y Fo([Command])g Fh(n)390 2749 y Fo(Searc)m(h)30 b(forw)m(ard)f(or)g (bac)m(kw)m(ard)h(for)f(a)h(regular)f(expression.)41 b(The)28 b(commands)i(b)s(eginning)e(with)390 2858 y(a)i(slash)g(\\)p Fi(/)p Fo(")h(c)m(haracter)g(are)f(forw)m(ard)g(searc)m(hes,)h(the)f (commands)g(b)s(eginning)f(with)g(a)i(question)390 2968 y(mark)h(\\)p Fi(?)p Fo(")h(are)f(bac)m(kw)m(ard)h(searc)m(hes.)47 b Fn(Vi)32 b Fo(prompts)f(with)h(the)h(leading)g(c)m(haracter)h(on)e (the)g(last)390 3078 y(line)c(of)h(the)f(screen)g(for)g(a)g(string.)40 b(It)28 b(then)g(searc)m(hes)h(forw)m(ard)e(or)h(bac)m(kw)m(ard)h(in)f (the)g(\014le)g(for)g(the)390 3187 y(next)j(o)s(ccurrence)f(of)h(the)f (string,)h(whic)m(h)f(is)g(in)m(terpreted)h(as)g(a)f(Basic)i(Regular)f (Expression.)390 3466 y(The)i Fn(/)h Fo(and)g Fn(?)50 b Fo(commands)34 b(are)g(absolute)g(mo)m(v)m(emen)m(ts.)53 b(They)34 b(ma)m(y)g(b)s(e)f(used)g(as)h(the)g(motion)390 3576 y(comp)s(onen)m(ts)41 b(of)h(other)f Fn(vi)h Fo(commands,)i(in)d (whic)m(h)g(case)h(an)m(y)g(text)g(copied)g(in)m(to)g(a)g(bu\013er)e (is)390 3686 y(c)m(haracter)32 b(orien)m(ted,)g(unless)e(the)g(searc)m (h)i(started)f(and)f(ended)f(on)i(the)g(\014rst)e(column)i(of)f(a)h (line,)390 3795 y(in)40 b(whic)m(h)g(case)h(it)g(is)f(line)g(orien)m (ted.)71 b(In)40 b(addition,)j(forw)m(ard)d(searc)m(hes)h(ending)e(at)i (the)g(\014rst)390 3905 y(c)m(haracter)29 b(of)e(a)g(line,)h(and)f(bac) m(kw)m(ard)g(searc)m(hes)h(b)s(eginning)e(at)i(the)f(\014rst)f(c)m (haracter)j(in)d(the)h(line,)390 4014 y(are)e(corrected)i(to)e(b)s (egin)g(or)g(end)f(at)i(the)g(last)f(c)m(haracter)i(of)e(the)h (previous)e(line.)39 b(\(Note,)28 b(forw)m(ard)390 4124 y(and)d(bac)m(kw)m(ard)i(searc)m(hes)g(can)f(o)s(ccur)g(for)g(b)s(oth)f Fn(/)h Fo(and)g Fn(?)39 b Fo(commands,)27 b(if)e(the)i Fi(wrapscan)c Fo(option)390 4234 y(is)30 b(set.\))390 4513 y(If)i(an)h(o\013set)h(from)e(the)h(matc)m(hed)g(line)g(is)g(sp)s (eci\014ed)f(\(i.e.)49 b(a)33 b(trailing)g(\\)p Fi(/)p Fo(")h(or)e(\\)p Fi(?)p Fo(")i(c)m(haracter)g(is)390 4622 y(follo)m(w)m(ed)26 b(b)m(y)d(a)i(signed)e(o\013set\),)k(the)d (bu\013er)f(will)h(alw)m(a)m(ys)i(b)s(e)d(line)h(orien)m(ted)h(\(e.g.) 40 b(\\)p Fi(/string/+0)p Fo(")390 4732 y(will)31 b(alw)m(a)m(ys)h (guaran)m(tee)g(a)e(line)h(orien)m(tation\).)390 5011 y(The)39 b Fn(N)g Fo(command)g(rep)s(eats)h(the)f(previous)g(searc)m (h,)j(but)d(in)g(the)h(rev)m(erse)f(direction.)69 b(The)38 b Fn(n)390 5121 y Fo(command)f(rep)s(eats)g(the)h(previous)e(searc)m (h.)62 b(If)37 b(either)h(the)f Fn(N)h Fo(or)f Fn(n)g Fo(commands)g(are)g(used)g(as)390 5230 y(motion)30 b(comp)s(onen)m(ts)g (for)g(the)f Fn(!)40 b Fo(command,)30 b(y)m(ou)g(will)g(not)g(b)s(e)f (prompted)g(for)g(the)h(text)h(of)f(the)390 5340 y(bang)g(command,)h (instead)f(the)h(previous)f(bang)g(command)g(will)h(b)s(e)f(executed.)p eop end %%Page: 27 30 TeXDict begin 27 29 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(27)390 299 y(Missing)122 b(RE's)f(\(e.g.)314 b(\\)p Fi(//)p Fo(",)140 b(\\)p Fi(/) p Fo(",)390 408 y(\\)p Fi(??)p Fo(",)32 b(or)k(\\)p Fi(?)p Fo(")31 b(searc)m(h)36 b(for)f(the)h(last)g(searc)m(h)g(RE,)390 518 y(in)30 b(the)h(indicated)g(direction.)390 756 y(Searc)m(hes)g(ma)m(y)g(b)s(e)f (in)m(terrupted)f(using)h(the)h Fi()p Fo(c)m(haracter.)390 993 y(Multiple)43 b(searc)m(h)f(patterns)g(ma)m(y)g(b)s(e)f(group)s(ed) g(together)i(b)m(y)f(delimiting)g(them)g(with)f(semi-)390 1103 y(colons)35 b(and)f(zero)h(or)f(more)g(whitespace)h(c)m (haracters,)i(e.g.)53 b Fi(/foo/)29 b(;)h(?bar?)p Fo(searc)m(hes)j (forw)m(ard)390 1212 y(for)i Fi(foo)p Fo(and)f(then,)j(from)e(that)h (lo)s(cation,)i(bac)m(kw)m(ards)e(for)f Fi(bar)p Fo(.)55 b(When)35 b(searc)m(h)h(patterns)g(are)390 1322 y(group)s(ed)29 b(together)i(in)f(this)g(manner,)g(the)g(searc)m(h)g(patterns)g(are)h (ev)-5 b(aluated)31 b(left)g(to)g(righ)m(t)f(with)390 1431 y(the)h(\014nal)f(cursor)f(p)s(osition)i(determined)f(b)m(y)g(the) h(last)g(searc)m(h)g(pattern.)390 1669 y(It)45 b(is)h(also)g(p)s (ermissible)f(to)h(app)s(end)d(a)j Fn(z)g Fo(command)f(to)h(the)g (searc)m(h)g(strings,)j(e.g.)86 b Fi(/foo/)390 1778 y(z.)p Fo(searc)m(hes)28 b(forw)m(ard)e(for)h(the)h(next)f(o)s(ccurrence)g(of) h Fi(foo)p Fo(,)f(and)f(then)h(p)s(ositions)h(that)f(line)h(in)f(the) 390 1888 y(middle)j(of)h(screen.)390 2034 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(in)f(whic)m(h)g(the)h(matc)m(h)g(o)s (ccurred.)390 2180 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(c)m (haracter)i(of)e(the)h(matc)m(hed)g(string.)390 2326 y(Options:)141 b(A\013ected)57 b(b)m(y)e(the)g Fi(edcompatible)p Fo(,)k Fi(extended)p Fo(,)g Fi(ignorecase)p Fo(,)g Fi(magic)p Fo(,)i(and)870 2436 y Fi(wrapscan)28 b Fo(options.)3290 2600 y([Command])-3600 b Fh(0)390 2710 y Fo(Mo)m(v)m(e)26 b(to)f(the)g(\014rst)e(c)m(haracter)j(in)e(the)h(curren)m(t)f(line.)39 b(It)24 b(is)g(not)h(an)f(error)g(to)h(use)f(the)g Fn(0)h Fo(command)390 2819 y(when)k(the)i(cursor)f(is)g(on)g(the)h(\014rst)f (c)m(haracter)i(in)e(the)g(line,)390 3057 y(The)38 b Fn(0)h Fo(command)g(ma)m(y)g(b)s(e)f(used)g(as)h(the)g(motion)g(comp)s (onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)h(in)390 3166 y(whic)m(h)27 b(case)h(it)f(is)g(an)g(error)g(if)g(the)g(cursor)f (is)h(on)g(the)g(\014rst)g(c)m(haracter)h(in)f(the)g(line,)h(and)f(an)m (y)g(text)390 3276 y(copied)k(in)m(to)g(a)g(bu\013er)e(is)i(c)m (haracter)h(orien)m(ted.)390 3422 y(Line:)282 b(Unc)m(hanged.)390 3568 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(c)m(haracter)i(in)e (the)g(line.)390 3714 y(Options:)141 b(None.)3290 3879 y([Command])-3600 b Fh(:)390 3988 y Fo(Execute)23 b(an)f Fn(ex)h Fo(command.)38 b Fn(Vi)22 b Fo(prompts)g(for)g(an)g Fn(ex)h Fo(command)f(on)g(the)h(last)g(line)f(of)h(the)g(screen,)390 4098 y(using)31 b(a)g(colon)i(\\)p Fi(:)p Fo(")f(c)m(haracter.)45 b(The)30 b(command)h(is)h(terminated)g(b)m(y)f(a)g Fi ()p Fo(,)390 4208 y Fi()p Fo(or)i Fi()p Fo(c)m(haracter;)j(all)g(of)f(these)h(c)m(haracters)g(ma) m(y)g(b)s(e)e(escap)s(ed)h(b)m(y)g(using)g(a)390 4317 y Fi()p Fo(c)m(haracter.)j(The)30 b(command)h(is)f(then)g (executed.)390 4555 y(If)37 b(the)g Fn(ex)g Fo(command)g(writes)g(to)h (the)g(screen,)h Fn(vi)e Fo(will)g(prompt)g(the)g(user)f(for)h(a)h Fi()p Fo(b)s(efore)i(con)m(tin)m(uing)j (when)e(the)h Fn(ex)g Fo(command)g(\014nishes.)74 b(Large)43 b(amoun)m(ts)f(of)g(out-)390 4774 y(put)35 b(from)h(the)g Fn(ex)g Fo(command)g(will)g(b)s(e)f(paged)i(for)e(the)h(user,)h(and)f (the)g(user)f(prompted)g(for)h(a)390 4883 y Fi()p Fo(or)e Fi()p Fo(k)m(ey)k(to)i(con)m(tin)m(ue.)68 b(In)39 b(some)g(cases,)j(a)e(quit)f(\(normally)h(a)390 4993 y(\\q")31 b(c)m(haracter\))i(or)d Fi()p Fo(ma)m(y)e(b)s(e)i(en)m(tered)h(to)g(in)m(terrupt)f(the)g Fn(ex)h Fo(command.)390 5230 y(When)g(the)h Fn(ex)g Fo(command)f (\014nishes,)g(and)g(the)g(user)g(is)h(prompted)e(to)i(resume)f(visual) h(mo)s(de,)f(it)390 5340 y(is)f(also)i(p)s(ossible)e(to)h(en)m(ter)g (another)f(\\)p Fi(:)p Fo(")h(c)m(haracter)h(follo)m(w)m(ed)g(b)m(y)f (another)f Fn(ex)h Fo(command.)p eop end %%Page: 28 31 TeXDict begin 28 30 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(28)390 299 y(Line:)282 b(The)30 b(curren)m(t)g(line)h(is)f(set)h(as)g(describ)s(ed)e(for)h(the)h Fn(ex)f Fo(command.)390 465 y(Column:)141 b(The)30 b(curren)m(t)g (column)g(is)h(set)g(as)f(describ)s(ed)f(for)i(the)f Fn(ex)h Fo(command.)390 632 y(Options:)141 b(A\013ected)32 b(as)e(describ)s(ed)f(for)i(the)f Fn(ex)h Fo(command.)3290 831 y([Command])-3600 b Fh([count])54 b(;)390 940 y Fo(Rep)s(eat)31 b(the)g(last)g(c)m(haracter)h(\014nd)d Fi(count)p Fo(times.)40 b(The)30 b(last)i(c)m(haracter)g(\014nd)d(is)h(one)h(of)g(the)f Fn(F)p Fo(,)h Fn(f)p Fo(,)390 1050 y Fn(T)j Fo(or)h Fn(t)f Fo(commands.)52 b(It)34 b(is)h(an)f(error)g(if)g(a)h Fn(F)p Fo(,)f Fn(f)p Fo(,)h Fn(T)g Fo(or)f Fn(t)g Fo(command)g(has)g (not)h(b)s(een)e(p)s(erformed)390 1159 y(y)m(et.)390 1411 y(The)39 b Fn(;)45 b Fo(command)39 b(ma)m(y)i(b)s(e)e(used)g(as)h (the)g(motion)g(comp)s(onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)i(in)390 1520 y(whic)m(h)30 b(case)i(an)m(y)e(text)i (copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 1690 y(Line:)282 b(Unc)m(hanged.)390 1857 y(Column:)141 b(Set)35 b(to)i(the)e(searc)m(hed-for)h(c)m(haracter)h(for)e(the)g Fn(F)h Fo(and)e Fn(f)h Fo(commands,)i(b)s(efore)e(the)870 1966 y(c)m(haracter)29 b(for)e(the)h Fn(t)f Fo(command)h(and)e(after)i (the)g(c)m(haracter)h(for)e(the)g Fn(T)h Fo(command.)390 2133 y(Options:)141 b(None.)3290 2332 y([Command])-3600 b Fh([count])54 b(<)f(motion)3290 2441 y Fo([Command])-3600 b Fh([count])54 b(>)46 b Fg(motion)390 2551 y Fo(Shift)d(lines)i(left)g (or)f(righ)m(t.)82 b(Shift)44 b(the)g(n)m(um)m(b)s(er)f(of)h(lines)g (in)g(the)h(region)f(sp)s(eci\014ed)g(b)m(y)g(the)390 2660 y Fi(count)p Fo(and)26 b Fi(motion)p Fo(left)h(\(for)g(the)h Fi(<)g Fo(command\))g(or)f(righ)m(t)i(\(for)f(the)g Fi(>)f Fo(command\))h(b)m(y)g(the)f(n)m(um-)390 2770 y(b)s(er)32 b(of)g(columns)h(sp)s(eci\014ed)e(b)m(y)i(the)g Fi(shiftwidth)c Fo(option.)48 b(Only)32 b(whitespace)h(c)m(haracters)i(are)390 2880 y(deleted)h(when)e(shifting)i(left.)56 b(Once)35 b(the)h(\014rst)f(c)m(haracter)i(in)e(the)g(line)h(no)f(longer)h(con)m (tains)h(a)390 2989 y(whitespace)31 b(c)m(haracter,)h(the)f(command)f (will)h(succeed,)g(but)e(the)i(line)g(will)f(not)h(b)s(e)f(mo)s (di\014ed.)390 3159 y(Line:)282 b(Unc)m(hanged.)390 3326 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(in)e(the)g(line.)390 3492 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shiftwidth)e Fo(option.)3290 3691 y([Command])-3600 b Fh(@)46 b Fg(bu\013er)390 3801 y Fo(Execute)29 b(a)g(named)f(bu\013er.)39 b(Execute)29 b(the)g(named)f(bu\013er)f(as)i Fn(vi)f Fo(commands.)40 b(The)28 b(bu\013er)f(ma)m(y)390 3910 y(include)g Fn(ex)h Fo(commands,)f(to)s(o,)i(but)e(they)g(m)m(ust)h(b)s(e)e(expressed)h(as) g(a)h Fn(:)39 b Fo(command.)h(If)26 b(the)i(bu\013er)390 4020 y(is)d(line)g(orien)m(ted,)i Fi()p Fo(c)m(haracters)d (are)i(logically)h(app)s(ended)c(to)j(eac)m(h)g(line)f(of)h(the)f (bu\013er.)390 4129 y(If)30 b(the)g(bu\013er)f(is)i(c)m(haracter)g (orien)m(ted,)h Fi()p Fo(c)m(haracters)d(are)i(logically)i (app)s(ended)28 b(to)j(all)390 4239 y(but)f(the)g(last)h(line)g(in)f (the)h(bu\013er.)390 4490 y(If)e(the)g(bu\013er)f(name)i(is)f(\\)p Fi(@)p Fo(",)h(or)g(\\)p Fi(*)p Fo(",)g(then)f(the)g(last)h(bu\013er)f (executed)h(shall)f(b)s(e)g(used.)39 b(It)30 b(is)f(an)390 4600 y(error)f(to)i(sp)s(ecify)f(\\)p Fi(@@)p Fo(")g(or)g(\\)p Fi(@*)p Fo(")g(if)g(there)g(w)m(ere)g(no)g(previous)f(bu\013er)g (executions.)41 b(The)29 b(text)h(of)390 4709 y(a)j(bu\013er)f(ma)m(y)h (con)m(tain)h(a)f Fi(@)f Fo(command,)h(and)f(it)h(is)g(p)s(ossible)f (to)i(create)g(in\014nite)e(lo)s(ops)h(in)f(this)390 4819 y(manner.)40 b(\(The)30 b Fi()p Fo(c)m(haracter)f(ma)m (y)i(b)s(e)f(used)f(to)i(in)m(terrupt)f(the)h(lo)s(op.\))390 4989 y(Line:)282 b(The)30 b(curren)m(t)g(line)h(is)f(set)h(as)g (describ)s(ed)e(for)h(the)h(command\(s\).)390 5156 y(Column:)141 b(The)30 b(curren)m(t)g(column)g(is)h(set)g(as)f(describ)s(ed)f(for)i (the)f(command\(s\).)390 5322 y(Options:)141 b(None.)p eop end %%Page: 29 32 TeXDict begin 29 31 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(29)3290 299 y([Command])-3600 b Fh([count])54 b(A)390 408 y Fo(En)m(ter)31 b(input)g(mo)s(de,)g(app)s (ending)f(the)h(text)i(after)f(the)f(end)g(of)g(the)h(line.)44 b(If)30 b Fi(count)p Fo(is)g(sp)s(eci\014ed,)390 518 y(the)h(text)g(is)f(rep)s(eatedly)h(input)e Fi(count)g(-)h(1)p Fo(more)h(times)g(after)g(input)e(mo)s(de)h(is)g(exited.)390 692 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h) h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 860 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m(tered.)390 1029 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 1139 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 1342 y([Command])-3600 b Fh([count])54 b(B)390 1451 y Fo(Mo)m(v)m(e)29 b(bac)m(kw)m(ard)e Fi(count)p Fo(bigw)m(ords.)38 b(Mo)m(v)m(e)29 b(the)e(cursor)f(bac)m (kw)m(ard)h(to)h(the)f(b)s(eginning)f(of)h(a)g(big-)390 1561 y(w)m(ord)h(b)m(y)f(rep)s(eating)i(the)f(follo)m(wing)h (algorithm:)40 b(if)28 b(the)g(curren)m(t)g(p)s(osition)g(is)g(at)h (the)f(b)s(eginning)390 1671 y(of)37 b(a)h(bigw)m(ord)e(or)i(the)f(c)m (haracter)h(at)g(the)f(curren)m(t)g(p)s(osition)g(cannot)h(b)s(e)e (part)h(of)g(a)h(bigw)m(ord,)390 1780 y(mo)m(v)m(e)h(to)f(the)g (\014rst)e(c)m(haracter)j(of)f(the)f(preceding)h(bigw)m(ord.)61 b(Otherwise,)39 b(mo)m(v)m(e)g(to)f(the)g(\014rst)390 1890 y(c)m(haracter)f(of)e(the)g(bigw)m(ord)g(at)h(the)g(curren)m(t)e (p)s(osition.)56 b(If)34 b(no)h(preceding)g(bigw)m(ord)g(exists)h(on) 390 1999 y(the)29 b(curren)m(t)f(line,)i(mo)m(v)m(e)g(to)g(the)e (\014rst)g(c)m(haracter)j(of)e(the)f(last)i(bigw)m(ord)f(on)f(the)h (\014rst)f(preceding)390 2109 y(line)j(that)g(con)m(tains)g(a)g(bigw)m (ord.)390 2362 y(The)37 b Fn(B)g Fo(command)g(ma)m(y)h(b)s(e)e(used)h (as)h(the)f(motion)h(comp)s(onen)m(t)g(of)f(other)h Fn(vi)f Fo(commands,)i(in)390 2472 y(whic)m(h)30 b(case)i(an)m(y)e(text)i (copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 2645 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(w)m (ord)g(selected.)390 2814 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (c)m(haracter)i(of)e(the)h(w)m(ord)f(selected.)390 2983 y(Options:)141 b(None.)3290 3186 y([Command])-3600 b Fh([buffer])55 b([count])f(C)390 3296 y Fo(Change)d(text)i(from)e(the)h (curren)m(t)f(p)s(osition)h(to)g(the)g(end-of-line.)105 b(If)51 b Fi(count)p Fo(is)f(sp)s(eci\014ed,)390 3405 y(the)42 b(input)g(text)h(replaces)g(from)e(the)i(curren)m(t)f(p)s (osition)g(to)h(the)f(end-of-line,)k(plus)41 b Fi(count)29 b(-)390 3515 y(1)p Fo(subsequen)m(t)g(lines.)390 3688 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h)h(c) m(haracters)i(w)m(ere)f(en)m(tered.)390 3857 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m(tered.)390 4026 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 4136 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 4339 y([Command])-3600 b Fh([buffer])55 b(D)390 4448 y Fo(Delete)33 b(text)e(from)f(the)g (curren)m(t)h(p)s(osition)f(to)h(the)g(end-of-line.)390 4702 y(It)f(is)h(not)g(an)f(error)g(to)h(execute)h(the)e Fn(D)g Fo(command)g(on)h(an)f(empt)m(y)h(line.)390 4875 y(Line:)282 b(Unc)m(hanged.)390 5044 y(Column:)141 b(Set)43 b(to)g(the)f(c)m(haracter)i(b)s(efore)e(the)h(curren)m(t)f(c)m (haracter,)48 b(or,)d(column)e(1)f(if)h(the)870 5154 y(cursor)30 b(w)m(as)g(on)h(column)f(1.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 30 33 TeXDict begin 30 32 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(30)3290 299 y([Command])-3600 b Fh([count])54 b(E)390 408 y Fo(Mo)m(v)m(e)25 b(forw)m(ard)d Fi(count)p Fo(end-of-bigw)m(ords.)36 b(Mo)m(v)m(e)25 b(the)e(cursor)f(forw)m(ard)g(to)h(the)g(end)e(of)i(a)g(bigw)m(ord)390 518 y(b)m(y)h(rep)s(eating)h(the)g(follo)m(wing)g(algorithm:)39 b(if)25 b(the)f(curren)m(t)g(p)s(osition)h(is)f(the)h(end)e(of)i(a)g (bigw)m(ord)f(or)390 628 y(the)j(c)m(haracter)h(at)f(that)g(p)s (osition)f(cannot)h(b)s(e)f(part)g(of)h(a)f(bigw)m(ord,)i(mo)m(v)m(e)f (to)h(the)e(last)h(c)m(haracter)390 737 y(of)h(the)g(follo)m(wing)h (bigw)m(ord.)39 b(Otherwise,)28 b(mo)m(v)m(e)i(to)e(the)g(last)g(c)m (haracter)h(of)f(the)g(bigw)m(ord)f(at)i(the)390 847 y(curren)m(t)e(p)s(osition.)40 b(If)26 b(no)h(succeeding)h(bigw)m(ord)f (exists)h(on)f(the)g(curren)m(t)g(line,)h(mo)m(v)m(e)h(to)f(the)f(last) 390 956 y(c)m(haracter)32 b(of)f(the)f(\014rst)g(bigw)m(ord)g(on)g(the) h(next)f(follo)m(wing)i(line)f(that)g(con)m(tains)g(a)g(bigw)m(ord.)390 1199 y(The)37 b Fn(E)g Fo(command)h(ma)m(y)g(b)s(e)f(used)g(as)h(the)g (motion)g(comp)s(onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)h(in)390 1308 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 1464 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(w)m(ord) g(selected.)390 1620 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m (haracter)h(of)f(the)g(w)m(ord)f(selected.)390 1776 y(Options:)141 b(None.)3290 1956 y([Command])-3600 b Fh([count])54 b(F)46 b(<)p Fg(c)m(haracter)p Fh(>)390 2065 y Fo(Searc)m(h)31 b Fi(count)p Fo(times)e(bac)m(kw)m(ard)i(through)f(the)g(curren)m(t)g (line)h(for)f Fi()p Fo(.)390 2308 y(The)37 b Fn(F)h Fo(command)g(ma)m(y)g(b)s(e)g(used)f(as)h(the)g(motion)g(comp) s(onen)m(t)g(of)g(other)h Fn(vi)f Fo(commands,)h(in)390 2417 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 2573 y(Line:)282 b(Unc)m(hanged.)390 2729 y(Column:)141 b(Set)31 b(to)g(the)f(searc)m(hed-for)h(c)m(haracter.)390 2885 y(Options:)141 b(None.)3290 3065 y([Command])-3600 b Fh([count])54 b(G)390 3174 y Fo(Mo)m(v)m(e)32 b(to)g(line)e Fi(count)p Fo(,)f(or)i(the)f(last)i(line)e(of)h(the)f(\014le)h(if)f Fi(count)p Fo(not)f(sp)s(eci\014ed.)390 3417 y(The)39 b Fn(G)g Fo(command)g(is)h(an)f(absolute)h(mo)m(v)m(emen)m(t.)69 b(The)39 b Fn(G)g Fo(command)g(ma)m(y)h(b)s(e)f(used)f(as)i(the)390 3526 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f(in)m(to) g(a)g(bu\013er)390 3636 y(is)h(line)h(orien)m(ted.)390 3792 y(Line:)282 b(Set)31 b(to)g Fi(count)p Fo(,)e(if)h(sp)s (eci\014ed,)g(otherwise,)h(the)g(last)g(line.)390 3948 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(in)e(the)g(line.)390 4104 y(Options:)141 b(None.)3290 4283 y([Command])-3600 b Fh([count])54 b(H)390 4393 y Fo(Mo)m(v)m(e)32 b(to)g(the)e(screen)h(line)f Fi(count)f(-)h(1)p Fo(lines)h(b)s(elo)m(w)f(the)h(top)f(of)h(the)f (screen.)390 4635 y(The)39 b Fn(H)g Fo(command)g(is)h(an)f(absolute)h (mo)m(v)m(emen)m(t.)69 b(The)39 b Fn(H)g Fo(command)g(ma)m(y)h(b)s(e)f (used)f(as)i(the)390 4745 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f (in)m(to)g(a)g(bu\013er)390 4854 y(is)h(line)h(orien)m(ted.)390 5010 y(Line:)282 b(Set)31 b(to)g(the)f(line)h Fi(count)e(-)h(1)p Fo(lines)g(b)s(elo)m(w)h(the)f(top)h(of)g(the)f(screen.)390 5166 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(of)e(the)h Fp(scr)-5 b(e)g(en)38 b Fo(line.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 31 34 TeXDict begin 31 33 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(31)3290 299 y([Command])-3600 b Fh([count])54 b(I)390 408 y Fo(En)m(ter)26 b(input)f(mo)s(de,)i (inserting)f(the)g(text)h(at)f(the)g(b)s(eginning)g(of)g(the)g(line.)39 b(If)26 b Fi(count)p Fo(is)e(sp)s(eci\014ed,)390 518 y(the)31 b(text)g(input)e(is)i(rep)s(eatedly)f(input)g Fi(count)f(-)h(1)p Fo(more)g(times.)390 673 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h)h(c)m(haracters) i(w)m(ere)f(en)m(tered.)390 828 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m(tered.)390 982 y(Options:)141 b(None.)3290 1160 y([Command])-3600 b Fh([count])54 b(J)390 1269 y Fo(Join)38 b(lines.)65 b(If)38 b Fi(count)p Fo(is)f(sp)s(eci\014ed,)j Fi(count)p Fo(lines)d(are)i (joined;)j(a)d(minim)m(um)f(of)g(t)m(w)m(o)i(lines)f(are)390 1379 y(alw)m(a)m(ys)32 b(joined,)e(regardless)h(of)g(the)f(v)-5 b(alue)31 b(of)g Fi(count)p Fo(.)390 1621 y(If)h(the)h(curren)m(t)g (line)g(ends)f(with)h(a)g(whitespace)h(c)m(haracter,)h(all)f (whitespace)f(is)g(stripp)s(ed)e(from)390 1730 y(the)44 b(next)h(line.)83 b(Otherwise,)47 b(if)d(the)h(next)f(line)h(starts)g (with)f(a)g(op)s(en)g(paren)m(thesis)g(\\)p Fi(\()p Fo(")h(do)390 1840 y(nothing.)c(Otherwise,)29 b(if)h(the)g(curren)m(t)g(line)g(ends)f (with)h(a)g(question)g(mark)g(\\)p Fi(?)p Fo(",)h(p)s(erio)s(d)d(\\)p Fi(.)p Fo(")j(or)390 1950 y(exclamation)i(p)s(oin)m(t)d(\\)p Fi(!)p Fo(",)h(insert)f(t)m(w)m(o)i(spaces.)41 b(Otherwise,)31 b(insert)f(a)h(single)g(space.)390 2191 y(It)f(is)h(not)g(an)f(error)g (to)h(join)f(lines)h(past)f(the)h(end)e(of)i(the)g(\014le,)f(i.e.)42 b(lines)30 b(that)h(do)g(not)f(exist.)390 2346 y(Line:)282 b(Unc)m(hanged.)390 2501 y(Column:)141 b(Set)25 b(to)h(the)f(c)m (haracter)h(after)f(the)g(last)h(c)m(haracter)g(of)f(the)g (next-to-last)j(joined)c(line.)390 2656 y(Options:)141 b(None.)3290 2833 y([Command])-3600 b Fh([count])54 b(L)390 2943 y Fo(Mo)m(v)m(e)32 b(to)g(the)e(screen)h(line)f Fi(count)f(-)h(1)p Fo(lines)h(ab)s(o)m(v)m(e)g(the)g(b)s(ottom)f(of)h (the)g(screen.)390 3185 y(The)41 b Fn(L)g Fo(command)g(is)g(an)g (absolute)h(mo)m(v)m(emen)m(t.)76 b(The)41 b Fn(L)g Fo(command)g(ma)m (y)h(b)s(e)f(used)f(as)i(the)390 3294 y(motion)29 b(comp)s(onen)m(t)g (of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g (text)h(copied)f(in)m(to)g(a)g(bu\013er)390 3404 y(is)h(line)h(orien)m (ted.)390 3559 y(Line:)282 b(Set)31 b(to)g(the)f(line)h Fi(count)e(-)h(1)p Fo(lines)g(ab)s(o)m(v)m(e)i(the)e(b)s(ottom)h(of)g (the)f(screen.)390 3713 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (non)m(blank)g(c)m(haracter)i(of)e(the)h Fp(scr)-5 b(e)g(en)38 b Fo(line.)390 3868 y(Options:)141 b(None.)3290 4046 y([Command])-3600 b Fh(M)390 4155 y Fo(Mo)m(v)m(e)32 b(to)g(the)e(screen)h(line)f(in)g(the)h(middle)f(of)g(the)h(screen.)390 4397 y(The)37 b Fn(M)h Fo(command)f(is)g(an)g(absolute)h(mo)m(v)m(emen) m(t.)64 b(The)37 b Fn(M)h Fo(command)f(ma)m(y)h(b)s(e)f(used)f(as)i (the)390 4507 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f (in)m(to)g(a)g(bu\013er)390 4616 y(is)h(line)h(orien)m(ted.)390 4858 y(Historically)-8 b(,)33 b(an)m(y)e Fi(count)p Fo(sp)s(eci\014ed)d (to)j(the)g Fn(M)g Fo(command)f(w)m(as)h(ignored.)390 5013 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(in)f(the)h(middle)f(of)g (the)h(screen.)390 5167 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (non)m(blank)g(c)m(haracter)i(of)e(the)h Fp(scr)-5 b(e)g(en)38 b Fo(line.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 32 35 TeXDict begin 32 34 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(32)3290 299 y([Command])-3600 b Fh([count])54 b(O)390 408 y Fo(En)m(ter)36 b(input)g(mo)s(de,)h(app)s (ending)e(text)j(in)d(a)i(new)f(line)h(ab)s(o)m(v)m(e)g(the)g(curren)m (t)f(line.)58 b(If)36 b Fi(count)p Fo(is)390 518 y(sp)s(eci\014ed,)30 b(the)g(text)i(input)d(is)i(rep)s(eatedly)f(input)g Fi(count)f(-)h(1)p Fo(more)g(times.)390 757 y(Historically)-8 b(,)33 b(an)m(y)e Fi(count)p Fo(sp)s(eci\014ed)d(to)j(the)g Fn(O)f Fo(command)h(w)m(as)f (ignored.)390 905 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s (on)e(whic)m(h)h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 1054 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m (tered.)390 1202 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 1312 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 1480 y([Command])-3600 b Fh([buffer])55 b(P)390 1589 y Fo(Insert)36 b(text)i(from)f(a)g (bu\013er.)60 b(T)-8 b(ext)37 b(from)g(the)g(bu\013er)f(\(the)h (unnamed)f(bu\013er)g(b)m(y)g(default\))i(is)390 1699 y(inserted)27 b(b)s(efore)g(the)h(curren)m(t)f(column)g(or,)i(if)e(the) h(bu\013er)e(is)i(line)f(orien)m(ted,)i(b)s(efore)f(the)f(curren)m(t) 390 1809 y(line.)390 1957 y(Line:)282 b(Set)31 b(to)h(the)f(lo)m(w)m (est)i(n)m(um)m(b)s(ered)d(line)h(insert,)g(if)g(the)h(bu\013er)e(is)h (line)g(orien)m(ted,)h(oth-)870 2067 y(erwise)e(unc)m(hanged.)390 2215 y(Column:)141 b(Set)33 b(to)g(the)g(\014rst)f(non)m(blank)g(c)m (haracter)i(of)f(the)g(app)s(ended)e(text,)j(if)f(the)f(bu\013er)g(is) 870 2325 y(line)f(orien)m(ted,)g(otherwise,)g(the)g(last)g(c)m (haracter)h(of)f(the)f(app)s(ended)f(text.)390 2473 y(Options:)141 b(None.)3290 2641 y([Command])-3600 b Fh(Q)390 2751 y Fo(Exit)31 b Fn(vi)f Fo(\(or)h(visual\))g(mo)s(de)f(and)g(switc)m(h)g (to)i Fn(ex)e Fo(mo)s(de.)390 2899 y(Line:)282 b(Unc)m(hanged.)390 3048 y(Column:)141 b(No)31 b(longer)g(relev)-5 b(an)m(t.)390 3196 y(Options:)141 b(None.)3290 3364 y([Command])-3600 b Fh([count])54 b(R)390 3474 y Fo(En)m(ter)34 b(input)f(mo)s(de,)h (replacing)h(the)f(c)m(haracters)h(in)f(the)g(curren)m(t)f(line.)52 b(If)33 b Fi(count)p Fo(is)f(sp)s(eci\014ed,)390 3584 y(the)f(text)g(input)e(is)i(rep)s(eatedly)f(input)g Fi(count)f(-)h(1)p Fo(more)g(times.)390 3822 y(If)38 b(the)h(end)g(of)g(the)g(curren)m(t)f (line)i(is)f(reac)m(hed,)j(no)c(more)h(c)m(haracters)i(are)e(replaced)g (and)g(an)m(y)390 3932 y(further)29 b(c)m(haracters)j(input)d(are)i (app)s(ended)e(to)i(the)f(line.)390 4080 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h)h(c)m(haracters) i(w)m(ere)f(en)m(tered.)390 4229 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m(tered.)390 4377 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 4487 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 4655 y([Command])-3600 b Fh([buffer])55 b([count])f(S)390 4765 y Fo(Substitute)30 b Fi(count)p Fo(lines.)390 4913 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h)h(c)m(haracters)i(w)m (ere)f(en)m(tered.)390 5062 y(Column:)141 b(Set)31 b(to)g(the)f(last)h (c)m(haracter)h(en)m(tered.)390 5210 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 5320 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)p eop end %%Page: 33 36 TeXDict begin 33 35 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(33)3290 299 y([Command])-3600 b Fh([count])54 b(T)46 b(<)p Fg(c)m(haracter)p Fh(>)390 408 y Fo(Searc)m(h)39 b(bac)m(kw)m(ard,)j Fi(count)p Fo(times,)f(through)d(the)h(curren)m(t)g(line)g(for)g(the)g(c)m (haracter)h Fp(after)50 b Fo(the)390 518 y(sp)s(eci\014ed)30 b Fi()p Fo(.)390 762 y(The)37 b Fn(T)g Fo(command)h(ma)m(y)g (b)s(e)e(used)h(as)h(the)f(motion)i(comp)s(onen)m(t)e(of)h(other)g Fn(vi)f Fo(commands,)i(in)390 871 y(whic)m(h)30 b(case)i(an)m(y)e(text) i(copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.) 390 1030 y(Line:)282 b(Unc)m(hanged.)390 1189 y(Column:)141 b(Set)31 b(to)g(the)f(c)m(haracter)i Fp(after)41 b Fo(the)31 b(searc)m(hed-for)g(c)m(haracter.)390 1348 y(Options:)141 b(None.)3290 1532 y([Command])-3600 b Fh(U)390 1641 y Fo(Restore)31 b(the)g(curren)m(t)f(line)h(to)g(its)g(state)g(b)s(efore) f(the)h(cursor)f(last)h(mo)m(v)m(ed)g(to)g(it.)390 1800 y(Line:)282 b(Unc)m(hanged.)390 1959 y(Column:)141 b(The)30 b(\014rst)f(c)m(haracter)j(in)f(the)f(line.)390 2118 y(Options:)141 b(None.)3290 2302 y([Command])-3600 b Fh([count])54 b(W)390 2411 y Fo(Mo)m(v)m(e)27 b(forw)m(ard)e Fi(count)p Fo(bigw)m(ords.)37 b(Mo)m(v)m(e)28 b(the)d(cursor)g(forw)m (ard)f(to)i(the)g(b)s(eginning)e(of)h(a)h(bigw)m(ord)390 2521 y(b)m(y)35 b(rep)s(eating)g(the)g(follo)m(wing)h(algorithm:)51 b(if)35 b(the)g(curren)m(t)f(p)s(osition)h(is)g(within)f(a)h(bigw)m (ord)g(or)390 2630 y(the)26 b(c)m(haracter)g(at)h(that)e(p)s(osition)h (cannot)g(b)s(e)f(part)g(of)g(a)h(bigw)m(ord,)g(mo)m(v)m(e)h(to)f(the)g (\014rst)e(c)m(haracter)390 2740 y(of)k(the)g(next)g(bigw)m(ord.)40 b(If)28 b(no)f(subsequen)m(t)h(bigw)m(ord)f(exists)i(on)f(the)g(curren) m(t)g(line,)h(mo)m(v)m(e)g(to)g(the)390 2850 y(\014rst)g(c)m(haracter)h (of)g(the)f(\014rst)g(bigw)m(ord)g(on)g(the)h(\014rst)e(follo)m(wing)j (line)f(that)g(con)m(tains)g(a)g(bigw)m(ord.)390 3093 y(The)35 b Fn(W)g Fo(command)g(ma)m(y)h(b)s(e)e(used)h(as)g(the)h (motion)g(comp)s(onen)m(t)f(of)h(other)f Fn(vi)h Fo(commands,)g(in)390 3203 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 3362 y(Line:)282 b(The)30 b(line)h(con)m(taining)h(the)e(w)m(ord)g (selected.)390 3521 y(Column:)141 b(The)30 b(\014rst)f(c)m(haracter)j (of)f(the)g(w)m(ord)f(selected.)390 3680 y(Options:)141 b(None.)3290 3863 y([Command])-3600 b Fh([buffer])55 b([count])f(X)390 3973 y Fo(Delete)35 b Fi(count)p Fo(c)m(haracters)e (b)s(efore)g(the)g(cursor.)48 b(If)32 b(the)h(n)m(um)m(b)s(er)f(of)h(c) m(haracters)h(to)g(b)s(e)e(deleted)390 4082 y(is)g(greater)h(than)f(or) f(equal)i(to)f(the)g(n)m(um)m(b)s(er)f(of)h(c)m(haracters)h(to)g(the)f (b)s(eginning)f(of)h(the)g(line,)h(all)390 4192 y(of)e(the)h(c)m (haracters)h(b)s(efore)e(the)g(curren)m(t)g(cursor)g(p)s(osition,)h(to) g(the)f(b)s(eginning)g(of)g(the)g(line,)i(are)390 4302 y(deleted.)390 4461 y(Line:)282 b(Unc)m(hanged.)390 4619 y(Column:)141 b(Set)33 b(to)g(the)g(curren)m(t)f(c)m(haracter)i(min)m (us)e Fi(count)p Fo(,)g(or)h(the)g(\014rst)f(c)m(haracter)i(if)e(coun)m (t)870 4729 y(is)e(greater)i(than)e(the)h(n)m(um)m(b)s(er)e(of)h(c)m (haracters)i(in)e(the)h(line)f(b)s(efore)g(the)h(cursor.)390 4888 y(Options:)141 b(None.)3290 5071 y([Command])-3600 b Fh([buffer])55 b([count])f(Y)390 5181 y Fo(Cop)m(y)30 b(\(or)h(\\y)m(ank"\))h Fi(count)p Fo(lines)d(in)m(to)j(the)e(sp)s (eci\014ed)g(bu\013er.)390 5340 y(Line:)282 b(Unc)m(hanged.)p eop end %%Page: 34 37 TeXDict begin 34 36 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(34)390 299 y(Column:)141 b(Unc)m(hanged.)390 453 y(Options:)g(None.)3290 628 y([Command])-3600 b Fh(ZZ)390 738 y Fo(W)-8 b(rite)37 b(the)e(\014le)h(and)f(exit)h Fn(vi)p Fo(.)56 b(The)35 b(\014le)g(is)h(only)f(written)h(if)f(it)h (has)f(b)s(een)g(mo)s(di\014ed)f(since)i(the)390 847 y(last)31 b(complete)h(write)f(of)f(the)h(\014le)f(to)h(an)m(y)g (\014le.)390 1089 y(The)38 b Fn(ZZ)f Fo(command)h(will)h(exit)g(the)g (editor)f(after)h(writing)f(the)h(\014le,)i(if)d(there)g(are)h(no)f (further)390 1198 y(\014les)c(to)h(edit.)52 b(En)m(tering)34 b(t)m(w)m(o)h(\\quit")g(commands)f(\(i.e.)53 b Fn(wq)p Fo(,)34 b Fn(quit)p Fo(,)i Fn(xit)e Fo(or)g Fn(ZZ)p Fo(\))f(in)h(a)g (ro)m(w)h(will)390 1308 y(o)m(v)m(erride)d(this)f(c)m(hec)m(k)h(and)e (the)h(editor)h(will)f(exit,)h(ignoring)f(an)m(y)g(\014les)g(that)h(ha) m(v)m(e)g(not)f(y)m(et)h(b)s(een)390 1417 y(edited.)390 1571 y(Line:)282 b(Unc)m(hanged.)390 1725 y(Column:)141 b(Unc)m(hanged.)390 1878 y(Options:)g(None.)3290 2054 y([Command])-3600 b Fh([count])54 b([[)390 2164 y Fo(Bac)m(k)32 b(up)d Fi(count)p Fo(section)h(b)s(oundaries.)390 2405 y(The)41 b Fn([[)i Fo(command)f(is)f(an)h(absolute)h(mo)m(v)m(emen)m (t.)77 b(The)41 b Fn([[)i Fo(command)e(ma)m(y)i(b)s(e)e(used)g(as)h (the)390 2515 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f (in)m(to)g(a)g(bu\013er)390 2624 y(is)h(c)m(haracter)h(orien)m(ted,)g (unless)e(the)h(starting)h(p)s(osition)f(is)g(column)f(0,)i(in)e(whic)m (h)h(case)g(it)h(is)f(line)390 2734 y(orien)m(ted.)390 2975 y(It)g(is)h(an)f(error)g(if)g(the)h(mo)m(v)m(emen)m(t)h(is)f(past) f(the)h(b)s(eginning)f(of)g(the)h(\014le.)390 3129 y(Line:)282 b(Set)28 b(to)g(the)g(previous)f(line)g(that)i(is)e Fi(count)p Fo(section)g(b)s(oundaries)f(bac)m(k,)j(or)f(the)g(\014rst)870 3238 y(line)33 b(of)g(the)h(\014le)f(if)g(no)g(more)g(section)h(b)s (oundaries)d(exist)j(preceding)f(the)g(curren)m(t)870 3348 y(line.)390 3501 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g (non)m(blank)g(c)m(haracter)i(in)e(the)g(line.)390 3655 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(sections)f Fo(option.)3290 3831 y([Command])-3600 b Fh([count])54 b(]])390 3940 y Fo(Mo)m(v)m(e)32 b(forw)m(ard)e Fi(count)p Fo(section)g(b)s(oundaries.)390 4182 y(The)41 b Fn(]])i Fo(command)f(is)f(an)h(absolute)h(mo)m(v)m(emen)m(t.)77 b(The)41 b Fn(]])i Fo(command)e(ma)m(y)i(b)s(e)e(used)g(as)h(the)390 4291 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f(in)m(to) g(a)g(bu\013er)390 4401 y(is)h(c)m(haracter)h(orien)m(ted,)g(unless)e (the)h(starting)h(p)s(osition)f(is)g(column)f(0,)i(in)e(whic)m(h)h (case)g(it)h(is)f(line)390 4510 y(orien)m(ted.)390 4752 y(It)g(is)h(an)f(error)g(if)g(the)h(mo)m(v)m(emen)m(t)h(is)f(past)f (the)h(end)f(of)g(the)h(\014le.)390 4905 y(Line:)282 b(Set)26 b(to)g(the)g(line)g(that)g(is)g Fi(count)p Fo(section)f(b)s (oundaries)f(forw)m(ard,)i(or)g(to)g(the)g(last)h(line)870 5015 y(of)k(the)f(\014le)h(if)f(no)g(more)h(section)g(b)s(oundaries)e (exist)i(follo)m(wing)h(the)f(curren)m(t)f(line.)390 5169 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(in)e(the)g(line.)390 5322 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(sections)f Fo(option.)p eop end %%Page: 35 38 TeXDict begin 35 37 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(35)3290 299 y([Command])-3600 b Fh(^)390 408 y Fo(Mo)m(v)m(e)32 b(to)g(\014rst)d(non)m(blank)h(c)m (haracter)i(on)e(the)h(curren)m(t)f(line.)390 656 y(The)38 b Fi(^)g Fo(command)g(ma)m(y)i(b)s(e)d(used)h(as)h(the)g(motion)g(comp) s(onen)m(t)g(of)f(other)h Fn(vi)g Fo(commands,)h(in)390 765 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 929 y(Line:)282 b(Unc)m(hanged.)390 1092 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m(haracter)i(of)e(the)h(curren)m (t)f(line.)390 1254 y(Options:)141 b(None.)3290 1445 y([Command])-3600 b Fh([count])54 b(_)390 1555 y Fo(Mo)m(v)m(e)33 b(do)m(wn)d Fi(count)f(-)h(1)p Fo(lines,)h(to)h(the)f(\014rst)f(non)m (blank)h(c)m(haracter.)43 b(The)p 2980 1555 28 5 v 101 w(command)31 b(ma)m(y)h(b)s(e)390 1664 y(used)f(as)h(the)g(motion)g (comp)s(onen)m(t)g(of)g(other)g Fn(vi)g Fo(commands,)g(in)f(whic)m(h)h (case)h(an)m(y)f(text)g(copied)390 1774 y(in)m(to)f(a)g(bu\013er)e(is)i (line)g(orien)m(ted.)390 2021 y(It)f(is)f(not)h(an)f(error)g(to)i (execute)g(the)p 1684 2021 V 99 w(command)e(when)f(the)i(cursor)f(is)g (on)h(the)g(\014rst)e(c)m(haracter)390 2131 y(in)i(the)h(line.)390 2295 y(Line:)282 b(The)30 b(curren)m(t)g(line)h(plus)e Fi(count)g(-)h(1)p Fo(.)390 2457 y(Column:)141 b(The)30 b(\014rst)f(non)m(blank)h(c)m(haracter)i(in)e(the)h(line.)390 2620 y(Options:)141 b(None.)3290 2810 y([Command])-3600 b Fh([count])54 b(a)390 2920 y Fo(En)m(ter)30 b(input)g(mo)s(de,)g(app) s(ending)f(the)h(text)h(after)g(the)g(cursor.)40 b(If)30 b Fi(count)p Fo(is)f(sp)s(eci\014ed,)g(the)i(text)390 3029 y(input)e(is)i(rep)s(eatedly)g(input)e Fi(count)g(-)h(1)p Fo(more)g(times.)390 3194 y(Line:)282 b(Set)31 b(to)g(the)f(last)h (line)g(up)s(on)e(whic)m(h)h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 3356 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m (tered.)390 3519 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 3628 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 3819 y([Command])-3600 b Fh([count])54 b(b)390 3928 y Fo(Mo)m(v)m(e)25 b(bac)m(kw)m(ard)f Fi(count)p Fo(w)m(ords.)36 b(Mo)m(v)m(e)26 b(the)d(cursor)g(bac)m(kw)m (ard)g(to)h(the)g(b)s(eginning)e(of)i(a)f(w)m(ord)g(b)m(y)390 4038 y(rep)s(eating)g(the)f(follo)m(wing)i(algorithm:)38 b(if)22 b(the)g(curren)m(t)g(p)s(osition)h(is)f(at)h(the)f(b)s (eginning)g(of)g(a)h(w)m(ord,)390 4148 y(mo)m(v)m(e)39 b(to)f(the)f(\014rst)g(c)m(haracter)i(of)e(the)h(preceding)f(w)m(ord.) 61 b(Otherwise,)39 b(the)f(curren)m(t)f(p)s(osition)390 4257 y(mo)m(v)m(es)29 b(to)g(the)f(\014rst)f(c)m(haracter)j(of)e(the)g (w)m(ord)g(at)g(the)g(curren)m(t)g(p)s(osition.)40 b(If)28 b(no)f(preceding)h(w)m(ord)390 4367 y(exists)39 b(on)f(the)h(curren)m (t)f(line,)i(mo)m(v)m(e)g(to)f(the)g(\014rst)e(c)m(haracter)j(of)f(the) f(last)h(w)m(ord)f(on)g(the)h(\014rst)390 4476 y(preceding)30 b(line)h(that)g(con)m(tains)h(a)e(w)m(ord.)390 4724 y(The)38 b Fn(b)g Fo(command)g(ma)m(y)h(b)s(e)e(used)h(as)g(the)h(motion)g(comp) s(onen)m(t)g(of)f(other)h Fn(vi)f Fo(commands,)i(in)390 4833 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 4997 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(w)m(ord) g(selected.)390 5160 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(c)m (haracter)i(of)e(the)h(w)m(ord)f(selected.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 36 39 TeXDict begin 36 38 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(36)3290 299 y([Command])-3600 b Fh([buffer])55 b([count])f(c)46 b Fg(motion)390 408 y Fo(Change)30 b(the)h(region)g(of)g(text)h(sp)s(eci\014ed)d(b)m(y)i (the)g Fi(count)p Fo(and)d Fi(motion)p Fo(.)40 b(If)30 b(only)g(part)h(of)f(a)h(single)390 518 y(line)22 b(is)f(a\013ected,)k (then)c(the)g(last)h(c)m(haracter)h(b)s(eing)e(c)m(hanged)h(is)f(mark)m (ed)g(with)g(a)h(\\)p Fi($)p Fo(".)38 b(Otherwise,)390 628 y(the)31 b(region)g(of)f(text)h(is)g(deleted,)g(and)f(input)f(mo)s (de)h(is)h(en)m(tered.)390 790 y(Line:)282 b(Set)31 b(to)g(the)f(last)h (line)g(up)s(on)e(whic)m(h)h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 951 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m (tered.)390 1112 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 1221 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 1409 y([Command])-3600 b Fh([buffer])55 b([count])f(d)46 b Fg(motion)390 1518 y Fo(Delete)33 b(the)d(region)h(of)g(text)g(sp)s(eci\014ed)f(b)m(y)g (the)h Fi(count)p Fo(and)d Fi(motion)p Fo(.)390 1680 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(where)f(the)g(region)h (starts.)390 1841 y(Column:)141 b(Set)28 b(to)h(the)f(\014rst)f(c)m (haracter)j(in)d(the)h(line)h(after)f(the)g(last)h(c)m(haracter)g(in)f (the)g(region.)870 1951 y(If)i(no)g(suc)m(h)g(c)m(haracter)i(exists,)f (set)g(to)g(the)g(last)g(c)m(haracter)h(b)s(efore)e(the)h(region.)390 2112 y(Options:)141 b(None.)3290 2300 y([Command])-3600 b Fh([count])54 b(e)390 2409 y Fo(Mo)m(v)m(e)34 b(forw)m(ard)e Fi(count)p Fo(end-of-w)m(ords.)45 b(Mo)m(v)m(e)34 b(the)e(cursor)g (forw)m(ard)f(to)i(the)g(end)e(of)i(a)f(w)m(ord)g(b)m(y)390 2519 y(rep)s(eating)g(the)f(follo)m(wing)h(algorithm:)44 b(if)31 b(the)g(curren)m(t)g(p)s(osition)g(is)h(the)f(end)f(of)i(a)f(w) m(ord,)g(mo)m(v)m(e)390 2628 y(to)h(the)g(last)g(c)m(haracter)h(of)f (the)g(follo)m(wing)h(w)m(ord.)44 b(Otherwise,)31 b(mo)m(v)m(e)i(to)g (the)e(last)i(c)m(haracter)g(of)390 2738 y(the)k(w)m(ord)g(at)g(the)g (curren)m(t)g(p)s(osition.)60 b(If)37 b(no)f(succeeding)i(w)m(ord)e (exists)i(on)f(the)g(curren)m(t)f(line,)390 2848 y(mo)m(v)m(e)30 b(to)g(the)f(last)g(c)m(haracter)h(of)f(the)g(\014rst)f(w)m(ord)h(on)f (the)h(next)g(follo)m(wing)h(line)f(that)h(con)m(tains)g(a)390 2957 y(w)m(ord.)390 3203 y(The)38 b Fn(e)i Fo(command)e(ma)m(y)i(b)s(e) e(used)g(as)h(the)g(motion)h(comp)s(onen)m(t)f(of)g(other)g Fn(vi)g Fo(commands,)i(in)390 3313 y(whic)m(h)30 b(case)i(an)m(y)e (text)i(copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m (ted.)390 3474 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h (the)e(w)m(ord)g(selected.)390 3636 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(of)f(the)g(w)m(ord)f(selected.)390 3797 y(Options:)141 b(None.)3290 3984 y([Command])-3600 b Fh([count])54 b(f)46 b(<)p Fg(c)m(haracter)p Fh(>)390 4094 y Fo(Searc)m(h)31 b(forw)m(ard,)f Fi(count)p Fo(times,)g(through)f (the)i(rest)f(of)h(the)f(curren)m(t)h(line)f(for)g Fi()p Fo(.)390 4340 y(The)39 b Fn(f)h Fo(command)g(ma)m(y)g(b)s(e)g(used)f (as)h(the)g(motion)h(comp)s(onen)m(t)f(of)g(other)g Fn(vi)g Fo(commands,)i(in)390 4449 y(whic)m(h)30 b(case)i(an)m(y)e(text)i (copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 4611 y(Line:)282 b(Unc)m(hanged.)390 4772 y(Column:)141 b(Set)31 b(to)g(the)f(searc)m(hed-for)h(c)m(haracter.)390 4933 y(Options:)141 b(None.)3290 5121 y([Command])-3600 b Fh([count])54 b(i)390 5230 y Fo(En)m(ter)31 b(input)f(mo)s(de,)h (inserting)g(the)g(text)h(b)s(efore)e(the)i(cursor.)41 b(If)31 b Fi(count)p Fo(is)e(sp)s(eci\014ed,)i(the)g(text)390 5340 y(input)e(is)i(rep)s(eatedly)g(input)e Fi(count)g(-)h(1)p Fo(more)g(times.)p eop end %%Page: 37 40 TeXDict begin 37 39 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(37)390 299 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m(h)h(c)m(haracters)i(w)m (ere)f(en)m(tered.)390 453 y(Column:)141 b(Set)31 b(to)g(the)f(last)h (c)m(haracter)h(en)m(tered.)390 608 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 718 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 895 y([Command])-3600 b Fh(m)46 b(<)p Fg(c)m(haracter)p Fh(>)390 1004 y Fo(Sa)m(v)m(e)37 b(the)g(curren)m(t)f(con)m(text)i (\(line)e(and)g(column\))g(as)h Fi()p Fo(.)54 b(The)36 b(exact)i(p)s(osition)e(is)390 1114 y(referred)30 b(to)h(b)m(y)f(\\)p Fi(`)p Fo(".)38 b(The)30 b(line)h(is)f(referred)g(to)h(b)m(y)f(\\)p Fi(')p Fo(".)390 1355 y(Historically)-8 b(,)34 b Fi()p Fo(w)m(as)28 b(restricted)j(to)g(lo)m(w)m(er-case)j(letters.)43 b Fn(Nvi)31 b Fo(p)s(ermits)f(the)g(use)h(of)390 1465 y(an)m(y)g(c)m(haracter.)390 1620 y(Line:)282 b(Unc)m(hanged.)390 1774 y(Column:)141 b(Unc)m(hanged.)390 1929 y(Options:)g(None.)3290 2106 y([Command])-3600 b Fh([count])54 b(o)390 2215 y Fo(En)m(ter)36 b(input)g(mo)s(de,)h(app)s(ending)e(text)i(in)f(a)h(new) f(line)g(under)f(the)i(curren)m(t)f(line.)58 b(If)36 b Fi(count)p Fo(is)390 2325 y(sp)s(eci\014ed,)30 b(the)g(text)i(input)d (is)i(rep)s(eatedly)f(input)g Fi(count)f(-)h(1)p Fo(more)g(times.)390 2567 y(Historically)-8 b(,)33 b(an)m(y)e Fi(count)p Fo(sp)s(eci\014ed)d (to)j(the)g Fn(o)g Fo(command)f(w)m(as)h(ignored.)390 2721 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up)s(on)e(whic)m (h)h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 2876 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m(tered.)390 3030 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 3140 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 3317 y([Command])-3600 b Fh([buffer])55 b(p)390 3426 y Fo(App)s(end)30 b(text)j(from)e(a)h (bu\013er.)44 b(T)-8 b(ext)32 b(from)g(the)g(bu\013er)f(\(the)h (unnamed)e(bu\013er)h(b)m(y)h(default\))g(is)390 3536 y(app)s(ended)d(after)j(the)f(curren)m(t)g(column)f(or,)i(if)f(the)g (bu\013er)f(is)h(line)g(orien)m(ted,)h(after)g(the)f(curren)m(t)390 3646 y(line.)390 3800 y(Line:)282 b(Set)42 b(to)h(the)f(\014rst)f(line) i(app)s(ended,)g(if)f(the)g(bu\013er)f(is)h(line)g(orien)m(ted,)47 b(otherwise)870 3910 y(unc)m(hanged.)390 4064 y(Column:)141 b(Set)35 b(to)g(the)g(\014rst)f(non)m(blank)g(c)m(haracter)i(of)f(the)g (app)s(ended)d(text)k(if)f(the)f(bu\013er)g(is)870 4174 y(line)d(orien)m(ted,)g(otherwise,)g(the)g(last)g(c)m(haracter)h(of)f (the)f(app)s(ended)f(text.)390 4328 y(Options:)141 b(None.)3290 4505 y([Command])-3600 b Fh([count])54 b(r)46 b(<)p Fg(c)m(haracter)p Fh(>)390 4615 y Fo(Replace)62 b(c)m(haracters.)134 b(The)61 b(next)g Fi(count)p Fo(c)m(haracters)g(in)g(the)g(line)g(are)h (replaced)f(with)390 4725 y Fi()p Fo(.)82 b(Replacing)46 b(c)m(haracters)h(with)e Fi()p Fo(c)m(haracters)f(results)h(in)g(creating)390 4834 y(new,)30 b(empt)m(y)h(lines)f(in)m(to)i(the)e(\014le.)390 5076 y(If)g Fi()p Fo(is)d Fi()p Fo(,)i(the)h(command)g (is)h(cancelled.)390 5230 y(Line:)282 b(Unc)m(hanged)41 b(unless)e(the)i(replacemen)m(t)h(c)m(haracter)g(is)e(a)h Fi()p Fo(,)f(in)g(whic)m(h)870 5340 y(case)31 b(it)g(is)g(set)g(to)g(the)f(curren)m(t)h(line)f(plus)g Fi(count)f(-)h(1)p Fo(.)p eop end %%Page: 38 41 TeXDict begin 38 40 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(38)390 299 y(Column:)141 b(Set)41 b(to)h(the)g(last)g(c)m(haracter)h(replaced,)h(unless)d(the)g (replacemen)m(t)i(c)m(haracter)g(is)870 408 y(a)f Fi()p Fo(,)h(in)f(whic)m(h)f(case)i(the)f(cursor)g(is)g(in)f(column)h(1)h(of) f(the)g(last)h(line)870 518 y(inserted.)390 671 y(Options:)141 b(None.)3290 847 y([Command])-3600 b Fh([buffer])55 b([count])f(s)390 956 y Fo(Substitute)30 b Fi(count)p Fo(c)m(haracters)g(in)g(the)h (curren)m(t)f(line)h(starting)g(with)f(the)h(curren)m(t)f(c)m (haracter.)390 1110 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(up) s(on)e(whic)m(h)h(c)m(haracters)i(w)m(ere)f(en)m(tered.)390 1263 y(Column:)141 b(Set)31 b(to)g(the)f(last)h(c)m(haracter)h(en)m (tered.)390 1417 y(Options:)141 b(A\013ected)80 b(b)m(y)f(the)g Fi(altwerase)p Fo(,)89 b Fi(autoindent)p Fo(,)g Fi(beautify)p Fo(,)g Fi(showmatch)p Fo(,)870 1526 y Fi(ttywerase)28 b Fo(and)i Fi(wrapmargin)d Fo(options.)3290 1702 y([Command])-3600 b Fh([count])54 b(t)46 b(<)p Fg(c)m(haracter)p Fh(>)390 1811 y Fo(Searc)m(h)34 b(forw)m(ard,)g Fi(count)p Fo(times,)g(through)f (the)h(curren)m(t)g(line)g(for)f(the)h(c)m(haracter)i(immediately)390 1921 y Fp(b)-5 b(efor)g(e)38 b Fi()p Fo(.)390 2162 y(The)h Fn(t)h Fo(command)f(ma)m(y)h(b)s(e)f(used)f(as)i(the)f (motion)h(comp)s(onen)m(t)g(of)g(other)f Fn(vi)h Fo(commands,)h(in)390 2271 y(whic)m(h)30 b(case)i(an)m(y)e(text)i(copied)e(in)m(to)i(a)f (bu\013er)e(is)h(c)m(haracter)i(orien)m(ted.)390 2425 y(Line:)282 b(Unc)m(hanged.)390 2578 y(Column:)141 b(Set)31 b(to)g(the)f(c)m(haracter)i Fp(b)-5 b(efor)g(e)38 b Fo(the)31 b(searc)m(hed-for)g(c)m(haracter.)390 2732 y(Options:)141 b(None.)3290 2907 y([Command])-3600 b Fh(u)390 3017 y Fo(Undo)23 b(the)h(last)h(c)m(hange)g(made)f(to)h(the)f(\014le.)38 b(If)24 b(rep)s(eated,)h(the)f Fn(u)f Fo(command)h(alternates)h(b)s(et) m(w)m(een)390 3126 y(these)30 b(t)m(w)m(o)g(states,)h(and)e(is)g(its)g (o)m(wn)h(in)m(v)m(erse.)41 b(When)29 b(used)f(after)i(an)f(insert)g (that)h(inserted)f(text)390 3236 y(on)h(more)h(than)f(one)h(line,)g (the)f(lines)h(are)f(sa)m(v)m(ed)i(in)e(the)h(n)m(umeric)f(bu\013ers.) 390 3477 y(The)d Fn(.)39 b Fo(command,)28 b(when)e(used)h(immediately)h (after)g(the)f Fn(u)g Fo(command,)h(causes)f(the)h(c)m(hange)g(log)390 3587 y(to)j(b)s(e)f(rolled)h(forw)m(ard)e(or)i(bac)m(kw)m(ard,)g(dep)s (ending)e(on)h(the)h(action)g(of)g(the)f Fn(u)g Fo(command.)390 3740 y(Line:)282 b(Set)37 b(to)h(the)f(p)s(osition)h(of)f(the)g (\014rst)g(line)g(c)m(hanged,)j(if)d(the)g(rev)m(ersal)h(a\013ects)h (only)870 3850 y(one)25 b(line)g(or)g(represen)m(ts)g(an)g(addition)g (or)g(c)m(hange;)j(otherwise,)f(the)e(line)g(preceding)870 3959 y(the)31 b(deleted)g(text.)390 4113 y(Column:)141 b(Set)31 b(to)g(the)f(cursor)g(p)s(osition)g(b)s(efore)g(the)h(c)m (hange)g(w)m(as)g(made.)390 4266 y(Options:)141 b(None.)3290 4441 y([Command])-3600 b Fh([count])54 b(w)390 4551 y Fo(Mo)m(v)m(e)36 b(forw)m(ard)e Fi(count)p Fo(w)m(ords.)50 b(Mo)m(v)m(e)37 b(the)d(cursor)g(forw)m(ard)f(to)i(the)g(b)s(eginning)e (of)i(a)f(w)m(ord)g(b)m(y)390 4661 y(rep)s(eating)41 b(the)f(follo)m(wing)i(algorithm:)62 b(if)41 b(the)f(curren)m(t)g(p)s (osition)h(is)f(at)i(the)e(b)s(eginning)g(of)h(a)390 4770 y(w)m(ord,)33 b(mo)m(v)m(e)i(to)e(the)g(\014rst)f(c)m(haracter)j (of)e(the)g(next)g(w)m(ord.)48 b(If)32 b(no)h(subsequen)m(t)f(w)m(ord)h (exists)g(on)390 4880 y(the)26 b(curren)m(t)g(line,)i(mo)m(v)m(e)g(to)f (the)f(\014rst)g(c)m(haracter)i(of)e(the)g(\014rst)g(w)m(ord)g(on)g (the)g(\014rst)g(follo)m(wing)i(line)390 4989 y(that)j(con)m(tains)h(a) e(w)m(ord.)390 5230 y(The)37 b Fn(w)g Fo(command)g(ma)m(y)g(b)s(e)g (used)g(as)g(the)h(motion)f(comp)s(onen)m(t)h(of)f(other)h Fn(vi)f Fo(commands,)i(in)390 5340 y(whic)m(h)30 b(case)i(an)m(y)e (text)i(copied)e(in)m(to)i(a)f(bu\013er)e(is)h(c)m(haracter)i(orien)m (ted.)p eop end %%Page: 39 42 TeXDict begin 39 41 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(39)390 299 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m(taining)h(the)e(w)m(ord)g(selected.)390 468 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(c)m(haracter)i(of)e (the)h(w)m(ord)f(selected.)390 636 y(Options:)141 b(None.)3290 839 y([Command])-3600 b Fh([buffer])55 b([count])f(x)390 949 y Fo(Delete)44 b Fi(count)p Fo(c)m(haracters.)75 b(The)41 b(deletion)i(is)e(at)i(the)f(curren)m(t)f(c)m(haracter)j(p)s (osition.)74 b(If)42 b(the)390 1058 y(n)m(um)m(b)s(er)21 b(of)h(c)m(haracters)i(to)f(b)s(e)e(deleted)i(is)f(greater)h(than)f(or) g(equal)h(to)g(the)f(n)m(um)m(b)s(er)f(of)h(c)m(haracters)390 1168 y(to)37 b(the)g(end)f(of)g(the)h(line,)i(all)e(of)g(the)f(c)m (haracters)i(from)e(the)h(curren)m(t)f(cursor)g(p)s(osition)h(to)g(the) 390 1277 y(end)30 b(of)g(the)h(line)g(are)f(deleted.)390 1451 y(Line:)282 b(Unc)m(hanged.)390 1619 y(Column:)141 b(Unc)m(hanged)31 b(unless)e(the)i(last)g(c)m(haracter)h(in)e(the)h (line)g(is)f(deleted)h(and)f(the)h(cursor)870 1729 y(is)g(not)h (already)g(on)f(the)h(\014rst)e(c)m(haracter)j(in)e(the)h(line,)g(in)f (whic)m(h)g(case)h(it)g(is)f(set)h(to)870 1839 y(the)f(previous)e(c)m (haracter.)390 2007 y(Options:)141 b(None.)3290 2210 y([Command])-3600 b Fh([buffer])55 b([count])f(y)46 b Fg(motion)390 2320 y Fo(Cop)m(y)30 b(\(or)h(\\y)m(ank"\))h(the)f(text)g (region)g(sp)s(eci\014ed)f(b)m(y)g(the)g Fi(count)p Fo(and)f Fi(motion)p Fo(,)g(in)m(to)i(a)g(bu\013er.)390 2493 y(Line:)282 b(Unc)m(hanged,)43 b(unless)d(the)h(region)g(co)m(v)m(ers)g(more)g (than)f(a)h(single)g(line,)i(in)d(whic)m(h)870 2603 y(case)31 b(it)g(is)g(set)g(to)g(the)f(line)h(where)f(the)h(region)f(starts.)390 2771 y(Column:)141 b(Unc)m(hanged,)43 b(unless)d(the)h(region)g(co)m(v) m(ers)g(more)g(than)f(a)h(single)g(line,)i(in)d(whic)m(h)870 2881 y(case)31 b(it)g(is)g(set)g(to)g(the)f(c)m(haracter)i(w)m(ere)f (the)g(region)g(starts.)390 3049 y(Options:)141 b(None.)3290 3252 y([Command])-3600 b Fh([count1])55 b(z)45 b Fe([)p Fg(coun)m(t2)p Fe(])32 b Fg(t)m(yp)s(e)390 3362 y Fo(Redra)m(w)d(the)g (screen)g(with)g(a)g(windo)m(w)f Fi(count2)p Fo(lines)g(long,)i(with)f (line)g Fi(count1)p Fo(placed)f(as)h(sp)s(eci-)390 3472 y(\014ed)f(b)m(y)g(the)h Fi(type)p Fo(c)m(haracter.)40 b(If)28 b Fi(count1)p Fo(is)f(not)i(sp)s(eci\014ed,)f(it)h(defaults)g (to)g(the)g(curren)m(t)f(line.)40 b(If)390 3581 y Fi(count2)p Fo(is)29 b(not)h(sp)s(eci\014ed,)g(it)h(defaults)g(to)g(the)f(curren)m (t)g(windo)m(w)g(size.)390 3834 y(The)g(follo)m(wing)i Fi(type)p Fo(c)m(haracters)e(ma)m(y)h(b)s(e)f(used:)390 4008 y Fi(+)432 b Fo(If)22 b Fi(count1)p Fo(is)f(sp)s(eci\014ed,)i (place)h(the)e(line)h Fi(count1)p Fo(at)f(the)g(top)h(of)f(the)h (screen.)38 b(Other-)870 4117 y(wise,)26 b(displa)m(y)e(the)h(screen)f (after)h(the)g(curren)m(t)f(screen,)i(similarly)f(to)g(the)f Fi(<)p Fn(con)m(trol-)870 4227 y(F)p Fi(>)30 b Fo(command.)390 4396 y Fi(<)p Fo(carriage-return)p Fi(>)870 4505 y Fo(Place)i(the)e (line)h Fi(count1)p Fo(at)e(the)i(top)g(of)f(the)h(screen.)390 4674 y(.)455 b(Place)32 b(the)e(line)h Fi(count1)p Fo(in)d(the)j(cen)m (ter)g(of)g(the)g(screen.)390 4843 y(-)450 b(Place)32 b(the)e(line)h Fi(count1)p Fo(at)e(the)i(b)s(ottom)g(of)f(the)h (screen.)390 5011 y Fi(^)432 b Fo(If)30 b Fi(count1)p Fo(is)f(sp)s(eci\014ed,)h(place)h(the)g(line)f(that)h(is)g(at)g(the)g (top)f(of)h(the)f(screen)h(when)870 5121 y Fi(count1)p Fo(is)36 b(at)h(the)h(b)s(ottom)f(of)h(the)f(screen,)i(at)f(the)f(b)s (ottom)h(of)f(the)h(screen,)h(i.e.)870 5230 y(displa)m(y)22 b(the)g(screen)g(b)s(efore)g(the)g(screen)g(b)s(efore)g Fi(count1)p Fo(.)36 b(Otherwise,)24 b(displa)m(y)e(the)870 5340 y(screen)30 b(b)s(efore)g(the)h(curren)m(t)f(screen,)h(similarly)g (to)g(the)g Fi(<)p Fn(con)m(trol-B)p Fi(>)g Fo(command.)p eop end %%Page: 40 43 TeXDict begin 40 42 bop 150 -116 a Fo(Chapter)30 b(13:)41 b(Vi)31 b(Commands)2429 b(40)390 299 y(Line:)282 b(Set)40 b(to)h Fi(count1)p Fo(unless)c Fi(count1)p Fo(is)i(not)h(sp)s (eci\014ed)f(and)g(the)h Fi(type)p Fo(c)m(haracter)h(w)m(as)870 408 y(either)27 b(\\)p Fi(^)p Fo(")h(or)f(\\)p Fi(+)p Fo(",)h(in)e(whic)m(h)h(case)h(it)f(is)g(set)h(to)f(the)g(line)g(b)s (efore)g(the)g(\014rst)f(line)h(on)870 518 y(the)32 b(previous)f (screen)i(or)e(the)i(line)f(after)g(the)g(last)h(line)f(on)g(the)g (previous)g(screen,)870 628 y(resp)s(ectiv)m(ely)-8 b(.)390 798 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(in)e(the)g(line.)390 968 y(Options:)141 b(None.)3290 1173 y([Command])-3600 b Fh([count])54 b({)390 1283 y Fo(Mo)m(v)m(e)32 b(bac)m(kw)m(ard)f Fi(count)p Fo(paragraphs.)390 1538 y(The)42 b Fi({)g Fo(command)g(is)g(an)g(absolute)h(mo)m(v)m(emen) m(t.)78 b(The)42 b Fi({)g Fo(command)g(ma)m(y)g(b)s(e)g(used)f(as)i (the)390 1647 y(motion)29 b(comp)s(onen)m(t)g(of)g(other)g Fn(vi)f Fo(commands,)h(in)f(whic)m(h)h(case)g(an)m(y)g(text)h(copied)f (in)m(to)g(a)g(bu\013er)390 1757 y(is)g(c)m(haracter)h(orien)m(ted,)g (unless)e(the)g(starting)i(c)m(haracter)g(is)f(the)f(\014rst)g(c)m (haracter)i(on)f(its)g(line,)g(in)390 1866 y(whic)m(h)h(case)i(it)e(is) h(line)g(orien)m(ted.)390 2042 y(Line:)282 b(Set)31 b(to)g(the)f(line)h (con)m(taining)h(the)e(b)s(eginning)g(of)h(the)f(previous)g(paragraph.) 390 2212 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c) m(haracter)i(in)e(the)g(line.)390 2382 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(paragraph)e Fo(option.)3290 2587 y([Command])-3600 b Fh([count])54 b(|)390 2697 y Fo(Mo)m(v)m(e)32 b(to)g(a)e(sp)s(eci\014c)g Fp(c)-5 b(olumn)39 b Fo(p)s(osition)30 b(on)h(the)f(curren)m(t)g(line.)390 2952 y(The)38 b Fi(|)g Fo(command)g(ma)m(y)i(b)s(e)d(used)h(as)h(the)g (motion)g(comp)s(onen)m(t)g(of)f(other)h Fn(vi)g Fo(commands,)h(in)390 3061 y(whic)m(h)35 b(case)i(an)m(y)e(text)i(copied)f(in)m(to)g(a)g (bu\013er)e(is)i(c)m(haracter)h(orien)m(ted.)57 b(It)35 b(is)h(an)f(error)g(to)h(use)390 3171 y(the)31 b Fi(|)f Fo(command)g(as)g(a)h(motion)g(comp)s(onen)m(t)g(and)f(for)g(the)g (cursor)g(not)h(to)g(mo)m(v)m(e.)390 3346 y(Line:)282 b(Unc)m(hanged.)390 3516 y(Column:)141 b(Set)33 b(to)h(the)e(c)m (haracter)j(o)s(ccup)m(ying)e(the)g(column)g(p)s(osition)g(iden)m (ti\014ed)f(b)m(y)h Fi(count)p Fo(,)870 3626 y(if)e(the)g(p)s(osition)h (exists)f(in)g(the)g(line.)44 b(If)30 b(the)i(column)f(length)g(of)g (the)h(curren)m(t)f(line)870 3736 y(is)f(less)h(than)f Fi(count)p Fo(,)f(the)i(cursor)f(is)g(mo)m(v)m(ed)h(to)h(the)e(last)h (c)m(haracter)h(in)e(the)h(line.)390 3906 y(Options:)141 b(None.)3290 4111 y([Command])-3600 b Fh([count])54 b(})390 4221 y Fo(Mo)m(v)m(e)32 b(forw)m(ard)e Fi(count)p Fo(paragraphs.)390 4476 y(The)22 b Fi(})f Fo(command)h(is)g(an)g(absolute)h(mo)m(v)m(emen) m(t.)40 b(The)22 b Fi(})f Fo(command)h(ma)m(y)h(b)s(e)e(used)h(as)g (the)g(motion)390 4585 y(comp)s(onen)m(t)28 b(of)g(other)g Fn(vi)g Fo(commands,)g(in)f(whic)m(h)h(case)h(an)m(y)f(text)h(copied)f (in)m(to)h(a)f(bu\013er)e(is)i(c)m(har-)390 4695 y(acter)35 b(orien)m(ted,)g(unless)e(the)h(starting)g(c)m(haracter)i(is)d(at)i(or) e(b)s(efore)g(an)m(y)h(non)m(blank)f(c)m(haracters)390 4804 y(in)d(its)h(line,)g(in)f(whic)m(h)g(case)h(it)g(is)g(line)f (orien)m(ted.)390 4980 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(con)m (taining)h(the)e(b)s(eginning)g(of)h(the)f(next)h(paragraph.)390 5150 y(Column:)141 b(Set)31 b(to)g(the)f(\014rst)g(non)m(blank)g(c)m (haracter)i(in)e(the)g(line.)390 5320 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(paragraph)e Fo(option.)p eop end %%Page: 41 44 TeXDict begin 41 43 bop 150 -116 a Fo(Chapter)30 b(14:)41 b(Vi)31 b(T)-8 b(ext)31 b(Input)e(Commands)1967 b(41)3290 299 y([Command])-3600 b Fh([count])54 b(~)390 408 y Fo(Rev)m(erse)32 b(the)f(case)i(of)e(the)g(next)h Fi(count)p Fo(c)m(haracter\(s\).)44 b(This)30 b(is)h(the)g(historic)h(seman)m(tic)h(for)e(the)390 518 y Fi(~)f Fo(command)g(and)g(it)h(is)f(only)h(in)f(e\013ect)i(if)e (the)h Fi(tildeop)d Fo(option)j(is)f(not)h(set.)390 759 y(Lo)m(w)m(ercase)g(alphab)s(etic)f(c)m(haracters)h(are)f(c)m(hanged)f (to)i(upp)s(ercase,)d(and)h(upp)s(ercase)f(c)m(haracters)390 868 y(are)j(c)m(hanged)g(to)g(lo)m(w)m(ercase.)43 b(No)31 b(other)g(c)m(haracters)g(are)g(a\013ected.)390 1109 y(Historically)-8 b(,)37 b(the)d Fi(~)f Fo(command)h(did)f(not)h(tak)m (e)h(an)e(asso)s(ciated)i(coun)m(t,)h(nor)d(did)g(it)h(mo)m(v)m(e)h (past)390 1218 y(the)30 b(end)g(of)h(the)f(curren)m(t)g(line.)41 b(As)30 b(it)h(had)f(no)g(asso)s(ciated)i(motion)f(it)g(w)m(as)f (di\016cult)h(to)g(c)m(hange)390 1328 y(the)f(case)h(of)e(large)i(blo)s (c)m(ks)f(of)g(text.)42 b(In)29 b Fn(n)m(vi)p Fo(,)h(if)f(the)h(cursor) f(is)h(on)g(the)g(last)g(c)m(haracter)h(of)f(a)g(line,)390 1437 y(and)g(there)g(are)h(more)g(lines)f(in)g(the)h(\014le,)g(the)f (cursor)g(mo)m(v)m(es)i(to)f(the)f(next)h(line.)390 1678 y(It)c(is)h(not)f(an)g(error)g(to)h(sp)s(ecify)f(a)h(coun)m(t)f(larger) h(than)f(the)h(n)m(um)m(b)s(er)e(of)h(c)m(haracters)i(b)s(et)m(w)m(een) f(the)390 1788 y(cursor)i(and)g(the)g(end)g(of)g(the)h(\014le.)390 1940 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(of)f(the)h(c)m(haracter)h (after)f Fi(count)p Fo(c)m(haracters,)g(or,)f(end)g(of)h(\014le.)390 2092 y(Column:)141 b(Set)31 b(to)g(the)f(c)m(haracter)i(after)f Fi(count)p Fo(c)m(haracters,)g(or,)f(end-of-\014le.)390 2244 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(tildeop)f Fo(option.)3290 2418 y([Command])-3600 b Fh([count])54 b(~)46 b Fg(motion)390 2527 y Fo(Rev)m(erse)29 b(the)e(case)i(of)f(the) g(c)m(haracters)h(in)e(a)h(text)h(region)f(sp)s(eci\014ed)f(b)m(y)h (the)g Fi(count)p Fo(and)d Fi(motion)p Fo(.)390 2637 y(Only)30 b(in)g(e\013ect)i(if)e(the)h Fi(tildeop)d Fo(option)j(is)f (set.)390 2878 y(Lo)m(w)m(ercase)25 b(c)m(haracters)g(are)e(c)m(hanged) h(to)g(upp)s(ercase,)g(and)f(upp)s(ercase)f(c)m(haracters)j(are)e(c)m (hanged)390 2987 y(to)31 b(lo)m(w)m(ercase.)43 b(No)31 b(other)g(c)m(haracters)h(are)e(a\013ected.)390 3139 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(of)f(the)h(c)m(haracter)h (after)f(the)f(last)i(c)m(haracter)g(in)e(the)g(region.)390 3292 y(Column:)141 b(Set)31 b(to)g(the)f(c)m(haracter)i(after)f(the)g (last)g(c)m(haracter)h(in)e(the)g(region.)390 3444 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(tildeop)f Fo(option.)3290 3617 y([Command])-3600 b Fh()390 3727 y Fo(In)m(terrupt)31 b(the)h(curren)m(t)g(op)s(eration.)46 b(Man)m(y)33 b(of)f(the)g(p)s (oten)m(tially)i(long-running)d Fn(vi)h Fo(commands)390 3837 y(ma)m(y)e(b)s(e)g(in)m(terrupted)f(using)g(the)h(terminal)h(in)m (terrupt)e(c)m(haracter.)42 b(These)30 b(op)s(erations)g(include)390 3946 y(searc)m(hes,)49 b(\014le)44 b(reading)g(and)g(writing,)j (\014lter)d(op)s(erations)h(and)e(map)h(c)m(haracter)i(expansion.)390 4056 y(In)m(terrupts)29 b(are)i(also)g(enabled)g(when)e(running)g (commands)h(outside)g(of)h Fn(vi)p Fo(.)390 4296 y(If)e(the)h Fi()p Fo(c)m(haracter)e(is)i(used)f(to)i(in)m(terrupt)e (while)h(en)m(tering)g(an)g Fn(ex)g Fo(command,)g(the)390 4406 y(command)36 b(is)h(ab)s(orted,)h(the)e(cursor)g(returns)f(to)i (its)g(previous)f(p)s(osition,)j(and)c Fn(vi)i Fo(remains)f(in)390 4515 y(command)30 b(mo)s(de.)390 4756 y(Generally)-8 b(,)59 b(if)52 b(the)g Fi()p Fo(c)m(haracter)e(is)i(used)f (to)i(in)m(terrupt)e(an)m(y)i(op)s(eration,)58 b(an)m(y)390 4866 y(c)m(hanges)31 b(made)g(b)s(efore)f(the)g(in)m(terrupt)g(are)h (left)g(in)f(place.)390 5018 y(Line:)282 b(Dep)s(enden)m(t)30 b(on)h(the)f(op)s(eration)h(b)s(eing)f(in)m(terrupted.)390 5170 y(Column:)141 b(Dep)s(enden)m(t)30 b(on)h(the)f(op)s(eration)h(b)s (eing)f(in)m(terrupted.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 42 45 TeXDict begin 42 44 bop 150 -116 a Fo(Chapter)30 b(14:)41 b(Vi)31 b(T)-8 b(ext)31 b(Input)e(Commands)1967 b(42)150 299 y Fl(14)80 b(Vi)54 b(T)-13 b(ext)53 b(Input)f(Commands)150 569 y Fo(The)36 b(follo)m(wing)i(section)f(describ)s(es)f(the)h (commands)f(a)m(v)-5 b(ailable)39 b(in)d(the)h(text)g(input)e(mo)s(de)i (of)f(the)h Fn(vi)150 679 y Fo(editor.)275 826 y(Historically)-8 b(,)40 b Fn(vi)d Fo(implemen)m(tations)g(only)g(p)s(ermitted)e(the)i(c) m(haracters)h(inserted)e(on)g(the)g(curren)m(t)150 935 y(line)c(to)h(b)s(e)e(erased.)45 b(In)31 b(addition,)h(only)g(the)g Fi()p Fo(erase)e(c)m(haracter)j(and)e(the)h(\\)p Fi(0)p Fo(")44 b(and)g(\\)p Fi(^)p Fo(")e(erase)j(strings)g(could)f(erase)h(autoinden)m(t)h(c)m (haracters.)84 b(\(Autoinden)m(t)150 1154 y(c)m(haracters)32 b(include)f(b)s(oth)f(the)h(c)m(haracters)i(inserted)d(automatically)k (at)e(the)f(b)s(eginning)f(of)h(an)g(input)150 1264 y(line)h(as)g(w)m (ell)g(as)g(c)m(haracters)h(inserted)e(using)g(the)h Fi()p Fo(command.\))41 b(This)30 b(implemen)m(tation)150 1374 y(p)s(ermits)44 b(erasure)g(to)i(con)m(tin)m(ue)f(past)g(the)g(b)s (eginning)f(of)h(the)f(curren)m(t)h(line,)k(and)44 b(bac)m(k)h(to)g (where)150 1483 y(text)34 b(input)e(mo)s(de)h(w)m(as)g(en)m(tered.)50 b(In)32 b(addition,)i(autoinden)m(t)g(c)m(haracters)h(ma)m(y)e(b)s(e)g (erased)g(using)g(the)150 1593 y(standard)d(erase)h(c)m(haracters.)42 b(F)-8 b(or)31 b(the)g(line)f(and)g(w)m(ord)g(erase)h(c)m(haracters,)h (reac)m(hing)g(the)e(autoinden)m(t)150 1702 y(c)m(haracters)42 b(forms)d(a)i(\\soft")g(b)s(oundary)-8 b(,)41 b(denoting)g(the)f(end)f (of)i(the)f(curren)m(t)g(w)m(ord)f(or)i(line)f(erase.)150 1812 y(Rep)s(eating)31 b(the)g(w)m(ord)f(or)g(line)h(erase)g(k)m(ey)g (will)g(erase)g(the)f(autoinden)m(t)h(c)m(haracters.)275 1959 y(Historically)-8 b(,)38 b Fn(vi)c Fo(alw)m(a)m(ys)i(used)d Fi()p Fo(and)e Fi()p Fo(as)g(c)m(haracter)36 b(and)d(w)m(ord)h(erase)150 2068 y(c)m(haracters,)40 b(resp)s(ectiv)m(ely)-8 b(,)40 b(regardless)d(of)g(the)g(curren)m(t)f (terminal)h(settings.)61 b(This)35 b(implemen)m(tation)150 2178 y(accepts,)h(in)d(addition)h(to)h(these)f(t)m(w)m(o)h(c)m (haracters,)h(the)e(curren)m(t)g(terminal)g(c)m(haracters)h(for)f (those)g(op-)150 2287 y(erations.)3480 2496 y([Input])-3601 b Fh()390 2606 y Fo(If)29 b(the)g(\014rst)g(c)m(haracter)h(of)g (the)f(input)f(is)i(a)f Fi()p Fo(,)g(the)g(previous)g(input)f(is)h (repla)m(y)m(ed,)i(as)e(if)h(just)390 2715 y(en)m(tered.)3480 2924 y([Input])-3601 b Fh()390 3033 y Fo(If)28 b(the)h(previous)f(c)m(haracter)i(on)f(the)f(line)h(w)m(as)g(an)g (autoinden)m(t)g(c)m(haracter,)i(erase)e(c)m(haracters)h(to)390 3143 y(mo)m(v)m(e)e(the)f(cursor)g(bac)m(k)g(to)h(the)f(column)g (immediately)h(after)g(the)f(previous)f(\(1-based\))i(column)390 3252 y(whic)m(h)g(is)g(a)h(m)m(ultiple)g(of)f(the)g Fi(shiftwidth)e Fo(edit)j(option.)40 b(This)27 b(ma)m(y)i(result)f(in)g(an)m(y)h(n)m (um)m(b)s(er)e(of)390 3362 y Fi()p Fo(and)h Fi()p Fo(c)m(haracters)i(preceding)h(the)f(cursor)g(b)s(eing)g(c)m(hanged.) 390 3618 y(Otherwise,)e(if)g(the)f Fi(autoindent)e Fo(option)j(is)g (set)g(and)f(the)h(user)f(is)g(en)m(tering)i(the)e(\014rst)g(c)m (haracter)390 3728 y(in)43 b(the)g(line,)k Fi()p Fo(is)41 b(ignored.)79 b(Otherwise,)47 b(a)c(literal)i Fi()p Fo(c)m(haracter)d(is)390 3837 y(en)m(tered.)3480 4046 y([Input])-3601 b Fh(^)390 4156 y Fo(If)39 b(the)h(previous)g(c)m(haracter)h(on)f(the)g(line)g(w)m(as)g(an)g (autoinden)m(t)g(c)m(haracter,)45 b(erase)40 b(all)h(of)f(the)390 4265 y(autoinden)m(t)31 b(c)m(haracters)h(on)e(the)h(line.)41 b(In)29 b(addition,)i(the)g(autoinden)m(t)g(lev)m(el)h(is)e(reset)h(to) g(0.)3480 4474 y([Input])-3601 b Fh(0)390 4583 y Fo(If)39 b(the)h(previous)g(c)m(haracter)h(on)f(the)g(line)g(w)m (as)g(an)g(autoinden)m(t)g(c)m(haracter,)45 b(erase)40 b(all)h(of)f(the)390 4693 y(autoinden)m(t)31 b(c)m(haracters)h(on)e (the)h(line.)41 b(The)30 b(autoinden)m(t)h(lev)m(el)h(is)e(not)h (altered.)3480 4902 y([Input])-3601 b Fh()390 5011 y Fo(Insert)68 b(su\016cien)m(t)h Fi()p Fo(and)e Fi()p Fo(c)m(haracters)h(to)h(mo)m(v)m(e)h(the)f(cursor)f(forw)m (ard)g(to)390 5121 y(the)60 b(column)f(immediately)i(after)f(the)g (next)f(\(1-based\))i(column)e(whic)m(h)h(is)f(a)h(m)m(ultiple)390 5230 y(of)55 b(the)f Fi(shiftwidth)e Fo(edit)j(option.)113 b(This)54 b(ma)m(y)h(result)f(in)g(an)m(y)h(n)m(um)m(b)s(er)e(of)i Fi()p Fo(and)390 5340 y Fi()p Fo(c)m(haracters)30 b(preceding)g(the)h(cursor)f(b)s(eing)g(c)m(hanged.)p eop end %%Page: 43 46 TeXDict begin 43 45 bop 150 -116 a Fo(Chapter)30 b(15:)41 b(Ex)31 b(Addressing)2419 b(43)390 299 y(Historically)-8 b(,)29 b Fn(vi)c Fo(did)e(not)i(p)s(ermit)f(the)h Fi()p Fo(command)c(to)26 b(b)s(e)e(used)g(unless)g(the)h(cursor)390 408 y(w)m(as)g(at)g(the)g(\014rst)f(column)g(of)h(a)g(new)f(line)h(or)f (it)i(w)m(as)f(preceded)f(only)g(b)m(y)h(autoinden)m(t)g(c)m (haracters.)390 518 y Fn(Nvi)31 b Fo(p)s(ermits)e(it)i(to)g(b)s(e)f (used)g(at)h(an)m(y)f(time)i(during)d(insert)h(mo)s(de.)3480 708 y([Input])-3601 b Fh()3480 818 y Fo([Input])g Fh()390 928 y Fo(Erase)30 b(the)h(last)g(c)m(haracter.)3480 1118 y([Input])-3601 b Fh()390 1228 y Fo(Quote)44 b(the)f(next)g(c)m(haracter.)81 b(The)43 b(next)h(c)m(haracter)g(will)g (not)f(b)s(e)g(mapp)s(ed)f(\(see)i(the)g Fn(map)390 1337 y Fo(command)33 b(for)g(more)g(information\))h(or)f(in)m(terpreted)h (sp)s(ecially)-8 b(.)50 b(A)34 b(carat)g(\\)p Fi(^)p Fo(")g(c)m(haracter)h(will)390 1447 y(b)s(e)24 b(displa)m(y)m(ed)i (immediately)g(as)f(a)g(placeholder,)i(but)d(will)h(b)s(e)f(replaced)h (b)m(y)g(the)g(next)g(c)m(haracter.)3480 1637 y([Input])-3601 b Fh()390 1747 y Fo(If)32 b(on)f(the)i(colon)g(command)f(line,) h(and)e(the)h Fi(filec)f Fo(edit)h(option)h(is)f(set,)h(b)s(eha)m(v)m (e)g(as)f(describ)s(ed)390 1856 y(for)40 b(that)h(option.)71 b(Otherwise,)43 b(if)d(on)g(the)h(colon)g(command)f(line,)k(execute)d (the)g(command.)390 1966 y(Otherwise,)31 b(if)g(not)h(on)f(the)g(colon) h(command)f(line,)h(resolv)m(e)h(all)f(text)g(input)e(in)m(to)i(the)g (\014le,)g(and)390 2075 y(return)d(to)i(command)g(mo)s(de.)3480 2266 y([Input])-3601 b Fh()390 2375 y Fo(Erase)30 b(the)h(curren)m(t)f(line.)3480 2566 y([Input])-3601 b Fh()3480 2675 y Fo([Input])g Fh()390 2785 y Fo(Erase)43 b(the)f(last)i(w)m(ord.)76 b(The)42 b(de\014nition)h(of)f(w)m(ord)g(is)h(dep)s(enden)m(t)e(on)i (the)g Fi(altwerase)d Fo(and)390 2894 y Fi(ttywerase)28 b Fo(options.)3480 3085 y([Input])-3601 b Fh([0-9A-Fa-f])q (+)390 3194 y Fo(Insert)36 b(a)h(c)m(haracter)i(with)d(the)h(sp)s (eci\014ed)f(hexadecimal)i(v)-5 b(alue)37 b(in)m(to)h(the)f(text.)60 b(The)37 b(v)-5 b(alue)37 b(is)390 3304 y(delimited)29 b(b)m(y)f(an)m(y)g(non-hexadecimal)h(c)m(haracter)h(or)e(the)g(input)f (of)i(the)f(maxim)m(um)g(n)m(um)m(b)s(er)f(of)390 3414 y(c)m(haracters)32 b(that)f(can)f(b)s(e)g(translated)h(in)m(to)h(a)e (single)h(c)m(haracter)h(v)-5 b(alue.)3480 3604 y([Input])-3601 b Fh()390 3713 y Fo(In)m(terrupt)21 b(text)h(input)f(mo)s (de,)i(returning)e(to)h(command)f(mo)s(de.)38 b(If)21 b(the)g Fi()p Fo(c)m(haracter)390 3823 y(is)32 b(used)g(to)h(in)m(terrupt)f(inserting)g(text)h(in)m(to)h(the)e (\014le,)h(it)g(is)g(as)f(if)g(the)h Fi()p Fo(c)m(haracter)f(w) m(as)390 3933 y(used;)e(all)h(text)g(input)f(up)f(to)i(the)g(in)m (terruption)f(is)g(resolv)m(ed)i(in)m(to)f(the)g(\014le.)150 4221 y Fl(15)80 b(Ex)54 b(Addressing)150 4464 y Fo(Addressing)25 b(in)h Fn(ex)h Fo(\(and)f(when)f Fn(ex)h Fo(commands)g(are)h(executed)g (from)f Fn(vi)g Fo(\))h(relates)g(to)g(the)f(curren)m(t)g(line.)150 4574 y(In)k(general,)i(the)f(curren)m(t)f(line)h(is)g(the)g(last)g (line)g(a\013ected)h(b)m(y)f(a)g(command.)41 b(The)30 b(exact)i(e\013ect)g(on)f(the)150 4683 y(curren)m(t)d(line)g(is)g (discussed)f(under)f(the)i(description)g(of)g(eac)m(h)h(command.)40 b(When)28 b(the)g(\014le)g(con)m(tains)h(no)150 4793 y(lines,)i(the)f(curren)m(t)h(line)f(is)h(zero.)275 4930 y(Addresses)e(are)i(constructed)f(b)m(y)h(one)f(or)h(more)f(of)h(the)f (follo)m(wing)i(metho)s(ds:)199 5068 y(1.)61 b(The)30 b(address)f(\\)p Fi(.)p Fo(")i(refers)f(to)h(the)g(curren)m(t)f(line.) 199 5204 y(2.)61 b(The)30 b(address)f(\\)p Fi($)p Fo(")i(refers)f(to)h (the)g(last)g(line)g(of)f(the)h(\014le.)199 5340 y(3.)61 b(The)30 b(address)f(\\)p Fi(N)p Fo(",)j(where)d Fi(N)p Fo(is)i(a)f(p)s(ositiv)m(e)i(n)m(um)m(b)s(er,)d(refers)h(to)h(the)g (N-th)f(line)h(of)g(the)f(\014le.)p eop end %%Page: 44 47 TeXDict begin 44 46 bop 150 -116 a Fo(Chapter)30 b(15:)41 b(Ex)31 b(Addressing)2419 b(44)199 299 y(4.)61 b(The)36 b(address)g(\\)p Fi(')p Fo(")e(or)i(\\)p Fi(`)p Fo(")e(refers)i(to)h(the)g(line)g(mark)m(ed)g(with)f(the)330 408 y(name)30 b Fi()p Fo(.)38 b(\(See)30 b(the)h Fn(k)f Fo(or)g Fn(m)g Fo(commands)g(for)f(more)i(information)f(on)g(ho) m(w)g(to)h(mark)330 518 y(lines.\))199 659 y(5.)61 b(A)35 b(regular)h(expression)f(\(RE\))g(enclosed)h(b)m(y)f(slashes)g(\\)p Fi(/)p Fo(")h(is)f(an)g(address,)h(and)e(it)i(refers)f(to)h(the)330 768 y(\014rst)h(line)i(found)d(b)m(y)i(searc)m(hing)h(forw)m(ard)e (from)h(the)g(line)g Fp(after)49 b Fo(the)38 b(curren)m(t)g(line)g(to)m (w)m(ard)h(the)330 878 y(end)26 b(of)g(the)h(\014le,)h(and)e(stopping)g (at)h(the)g(\014rst)e(line)i(con)m(taining)h(a)f(string)f(matc)m(hing)i (the)f(RE.)f(\(The)330 987 y(trailing)31 b(slash)g(can)f(b)s(e)g (omitted)h(at)h(the)e(end)g(of)g(the)h(command)f(line.\))330 1237 y(If)d(no)g(RE)g(is)g(sp)s(eci\014ed,)g(i.e.)i(the)e(pattern)h(is) f(\\)p Fi(//)p Fo(",)h(the)g(last)g(RE)f(used)f(in)h(an)m(y)g(command)g (is)h(used)330 1347 y(in)i(the)h(searc)m(h.)330 1597 y(If)h(the)h Fi(extended)e Fo(option)i(is)g(set,)h(the)f(RE)f(is)h (handled)f(as)h(an)f(extended)h(RE,)g(not)g(a)g(basic)g(RE.)330 1707 y(If)28 b(the)i Fi(wrapscan)c Fo(option)k(is)f(set,)h(the)f(searc) m(h)g(wraps)f(around)g(to)i(the)f(b)s(eginning)f(of)h(the)h(\014le)f (and)330 1816 y(con)m(tin)m(ues)i(up)f(to)h(and)f(including)g(the)g (curren)m(t)g(line,)h(so)g(that)g(the)f(en)m(tire)i(\014le)e(is)h (searc)m(hed.)330 2066 y(The)f(form)g(\\)p Fi(\\e/)p Fo(")g(is)h(accepted)g(for)f(historic)h(reasons,)g(and)f(is)g(iden)m (tical)i(to)g(\\)p Fi(//)p Fo(".)199 2207 y(6.)61 b(An)44 b(RE)g(enclosed)h(in)f(question)g(marks)g(\\)p Fi(?)p Fo(")h(addresses)e(the)i(\014rst)e(line)i(found)e(b)m(y)h(searc)m(hing) 330 2316 y(bac)m(kw)m(ard)29 b(from)f(the)h(line)f Fp(pr)-5 b(e)g(c)g(e)g(ding)39 b Fo(the)28 b(curren)m(t)h(line,)g(to)m(w)m(ard)g (the)g(b)s(eginning)f(of)g(the)h(\014le)g(and)330 2426 y(stopping)k(at)h(the)g(\014rst)e(line)i(con)m(taining)h(a)f(string)f (matc)m(hing)h(the)g(RE.)f(\(The)g(trailing)i(question)330 2535 y(mark)30 b(can)h(b)s(e)f(omitted)h(at)g(the)g(end)e(of)i(a)g (command)f(line.\))330 2786 y(If)d(no)g(RE)g(is)g(sp)s(eci\014ed,)g (i.e.)i(the)e(pattern)h(is)f(\\)p Fi(??)p Fo(",)h(the)g(last)g(RE)f (used)f(in)h(an)m(y)g(command)g(is)h(used)330 2895 y(in)i(the)h(searc)m (h.)330 3145 y(If)h(the)h Fi(extended)e Fo(option)i(is)g(set,)h(the)f (RE)f(is)h(handled)f(as)h(an)f(extended)h(RE,)g(not)g(a)g(basic)g(RE.) 330 3255 y(If)g(the)h Fi(wrapscan)d Fo(option)k(is)e(set,)j(the)d (searc)m(h)i(wraps)d(around)h(from)g(the)h(b)s(eginning)f(of)h(the)g (\014le)330 3364 y(to)i(the)f(end)f(of)i(the)f(\014le)g(and)f(con)m (tin)m(ues)i(up)e(to)i(and)e(including)h(the)g(curren)m(t)g(line,)i(so) e(that)h(the)330 3474 y(en)m(tire)31 b(\014le)g(is)f(searc)m(hed.)330 3724 y(The)g(form)g(\\)p Fi(\\e?)p Fo(")g(is)h(accepted)g(for)f (historic)h(reasons,)g(and)f(is)g(iden)m(tical)i(to)g(\\)p Fi(??)p Fo(".)199 3865 y(7.)61 b(An)35 b(address)g(follo)m(w)m(ed)i(b)m (y)f(a)g(plus)f(sign)h(\\)p Fi(+)p Fo(")g(or)g(a)g(min)m(us)f(sign)g (\\)p Fi(-)p Fo(")i(follo)m(w)m(ed)g(b)m(y)e(a)i(n)m(um)m(b)s(er)d(is) 330 3974 y(an)39 b(o\013set)h(address)e(and)g(refers)g(to)i(the)f (address)f(plus)g(\(or)h(min)m(us\))g(the)g(indicated)g(n)m(um)m(b)s (er)f(of)330 4084 y(lines.)i(If)29 b(the)g(address)f(is)h(omitted,)h (the)f(addition)g(or)g(subtraction)g(is)g(done)g(with)f(resp)s(ect)h (to)h(the)330 4193 y(curren)m(t)g(line.)199 4334 y(8.)61 b(An)31 b(address)g(of)h(\\)p Fi(+)p Fo(")g(or)g(\\)p Fi(-)p Fo(")g(follo)m(w)m(ed)h(b)m(y)f(a)g(n)m(um)m(b)s(er)e(is)i(an)f (o\013set)i(from)e(the)h(curren)m(t)f(line.)45 b(F)-8 b(or)330 4443 y(example,)31 b(\\)p Fi(-5)p Fo(")g(is)f(the)h(same)g(as) f(\\)p Fi(.-5)p Fo(".)199 4584 y(9.)61 b(An)39 b(address)f(ending)g (with)h(\\)p Fi(+)p Fo(")g(or)g(\\)p Fi(-)p Fo(")g(has)g(1)g(added)g (to)g(or)g(subtracted)g(from)f(the)i(address,)330 4693 y(resp)s(ectiv)m(ely)-8 b(.)58 b(As)36 b(a)g(consequence)g(of)g(this)f (rule)g(and)g(of)h(the)g(previous)f(rule,)i(the)f(address)e(\\)p Fi(-)p Fo(")330 4803 y(refers)29 b(to)h(the)f(line)g(preceding)h(the)f (curren)m(t)g(line.)41 b(Moreo)m(v)m(er,)31 b(trailing)g(\\)p Fi(+)p Fo(")e(and)g(\\)p Fi(-)p Fo(")g(c)m(haracters)330 4913 y(ha)m(v)m(e)j(a)e(cum)m(ulativ)m(e)i(e\013ect.)43 b(F)-8 b(or)31 b(example,)g(\\)p Fi(++-++)p Fo(")f(refers)g(to)h(the)g (curren)m(t)f(line)h(plus)e(3.)154 5053 y(10.)61 b(A)30 b(p)s(ercen)m(t)h(sign)f(\\)p Fi(\045)p Fo(")h(is)g(equiv)-5 b(alen)m(t)32 b(to)f(the)f(address)g(range)g(\\)p Fi(1,$)p Fo(".)275 5230 y Fn(Ex)d Fo(commands)h(require)g(zero,)i(one,)g(or)e(t) m(w)m(o)i(addresses.)39 b(It)29 b(is)f(an)g(error)g(to)h(sp)s(ecify)f (an)h(address)e(to)150 5340 y(a)k(command)f(whic)m(h)g(requires)g(zero) h(addresses.)p eop end %%Page: 45 48 TeXDict begin 45 47 bop 150 -116 a Fo(Chapter)30 b(16:)41 b(Ex)31 b(Description)2405 b(45)275 299 y(If)22 b(the)i(user)f(pro)m (vides)g(more)h(than)f(the)g(exp)s(ected)h(n)m(um)m(b)s(er)e(of)i (addresses)e(to)j(an)m(y)e Fn(ex)h Fo(command,)h(the)150 408 y(\014rst)30 b(addresses)g(sp)s(eci\014ed)f(are)i(discarded.)41 b(F)-8 b(or)31 b(example,)g(\\)p Fi(1,2,3,5)p Fo("prin)m(t)e(prin)m(ts) h(lines)h(3)g(through)150 518 y(5,)g(b)s(ecause)f(the)h Fn(prin)m(t)f Fo(command)g(only)h(tak)m(es)h(t)m(w)m(o)g(addresses.)275 664 y(The)c(addresses)h(in)g(a)h(range)g(are)f(separated)h(from)f(eac)m (h)i(other)e(b)m(y)h(a)f(comma)i(\\)p Fi(,)p Fo(")f(or)f(a)h(semicolon) 150 774 y(\\)p Fi(;)p Fo(".)65 b(In)38 b(the)g(latter)i(case,)i(the)c (curren)m(t)h(line)f(\\)p Fi(.)p Fo(")h(is)g(set)g(to)g(the)f(\014rst)g (address,)i(and)d(only)i(then)f(is)150 883 y(the)33 b(second)g(address) f(calculated.)49 b(This)32 b(feature)h(can)g(b)s(e)f(used)g(to)i (determine)f(the)g(starting)g(line)g(for)150 993 y(forw)m(ard)i(and)g (bac)m(kw)m(ard)h(searc)m(hes)g(\(see)h(rules)e(\(5\))h(and)f(\(6\))i (ab)s(o)m(v)m(e\).)58 b(The)35 b(second)g(address)g(of)h(an)m(y)150 1103 y(t)m(w)m(o-address)e(sequence)f(corresp)s(onds)e(to)j(a)f(line)g (that)g(follo)m(ws,)i(in)d(the)h(\014le,)h(the)f(line)g(corresp)s (onding)150 1212 y(to)27 b(the)f(\014rst)f(address.)38 b(The)25 b(\014rst)g(address)g(m)m(ust)h(b)s(e)f(less)h(than)g(or)f (equal)i(to)f(the)g(second)g(address.)38 b(The)150 1322 y(\014rst)30 b(address)g(m)m(ust)h(b)s(e)f(greater)i(than)f(or)f(equal) i(to)f(the)g(\014rst)f(line)i(of)f(the)g(\014le,)g(and)f(the)h(last)h (address)150 1431 y(m)m(ust)e(b)s(e)g(less)h(than)f(or)g(equal)h(to)g (the)g(last)g(line)g(of)f(the)h(\014le.)150 1737 y Fl(16)80 b(Ex)54 b(Description)150 2006 y Fo(The)30 b(follo)m(wing)i(w)m(ords)e (ha)m(v)m(e)h(sp)s(ecial)g(meanings)g(for)f Fn(ex)g Fo(commands.)225 2152 y Fm(\017)60 b Fi(<)p Fn(end-of-\014le)p Fi(>)330 2293 y Fo(The)29 b(end-of-\014le)h(c)m(haracter)h(is)f(used)f(to)h (scroll)g(the)g(screen)g(in)f(the)h Fn(ex)g Fo(editor.)41 b(This)29 b(c)m(haracter)i(is)330 2402 y(normally)g Fi()p Fo(.)37 b(Ho)m(w)m(ev)m(er,)c(whatev)m(er)e(c)m(haracter)h(is)e(set)h (for)f(the)h(curren)m(t)f(terminal)h(is)330 2512 y(supp)s(orted)e(as)h (w)m(ell)h(as)g Fi()p Fo(.)225 2652 y Fm(\017)60 b Fn(line)330 2793 y Fo(A)35 b(single-line)i(address,)f(giv)m(en)g(in)f (an)m(y)g(of)h(the)f(forms)g(describ)s(ed)f(in)h(the)g(section)h(en)m (titled)h(\\)p Fn(Ex)330 2902 y(Addressing)p Fo(")30 b(.)40 b(The)30 b(default)h(for)f Fi(line)p Fo(is)f(the)i(curren)m(t)f (line.)225 3043 y Fm(\017)60 b Fn(range)330 3183 y Fo(A)26 b(line,)i(or)e(a)g(pair)g(of)g(line)h(addresses,)f(separated)h(b)m(y)f (a)g(comma)h(or)f(semicolon.)41 b(\(See)26 b(the)h(section)330 3292 y(en)m(titled)35 b(\\)p Fn(Ex)e(Addressing)p Fo(")g(for)g(more)h (information.\))50 b(The)33 b(default)h(for)f(range)h(is)g(the)f (curren)m(t)330 3402 y(line)39 b Fp(only)p Fo(,)j(i.e.)67 b(\\)p Fi(.,.)p Fo(".)f(A)39 b(p)s(ercen)m(t)g(sign)g(\\)p Fi(\045)p Fo(")g(stands)f(for)h(the)g(range)g(\\)p Fi(1,$)p Fo(".)66 b(The)38 b(starting)330 3512 y(address)29 b(m)m(ust)i(b)s(e)e (less)i(than,)g(or)f(equal)h(to,)g(the)g(ending)f(address.)225 3652 y Fm(\017)60 b Fn(coun)m(t)330 3792 y Fo(A)32 b(p)s(ositiv)m(e)g (in)m(teger,)i(sp)s(ecifying)e(the)f(n)m(um)m(b)s(er)g(of)h(lines)f(to) i(b)s(e)e(a\013ected)i(b)m(y)f(the)f(command;)i(the)330 3902 y(default)27 b(is)f(1.)40 b(Generally)-8 b(,)29 b(a)d(coun)m(t)h(past)g(the)f(end-of-\014le)h(ma)m(y)g(b)s(e)f(sp)s (eci\014ed,)g(e.g.)41 b(the)26 b(command)330 4011 y(\\)p Fi(p)k(3000)p Fo(")d(in)f(a)h(10)h(line)f(\014le)g(is)g(acceptable,)j (and)c(will)i(prin)m(t)e(from)h(the)g(curren)m(t)f(line)i(through)e (the)330 4121 y(last)31 b(line)g(in)f(the)h(\014le.)225 4261 y Fm(\017)60 b Fn(\015ags)330 4402 y Fo(One)26 b(or)g(more)h(of)g (the)f(c)m(haracters)i(\\#",)g(\\p",)g(and)e(\\l".)40 b(When)27 b(a)f(command)h(that)g(accepts)g(these)330 4511 y(\015ags)40 b(completes,)j(the)d(addressed)f(line\(s\))h(are)g (written)g(out)g(as)g(if)f(b)m(y)h(the)f(corresp)s(onding)g Fn(#)p Fo(,)330 4621 y Fn(l)c Fo(or)g Fn(p)f Fo(commands.)53 b(In)34 b(addition,)i(an)m(y)f(n)m(um)m(b)s(er)e(of)i(\\)p Fi(+)p Fo(")h(or)e(\\)p Fi(-)p Fo(")h(c)m(haracters)i(can)e(b)s(e)f(sp) s(eci\014ed)330 4731 y(b)s(efore,)24 b(after,)i(or)d(during)f(the)h (\015ags,)i(in)e(whic)m(h)g(case)h(the)f(line)h(written)f(is)g(not)g (necessarily)h(the)g(one)330 4840 y(a\013ected)29 b(b)m(y)f(the)g (command,)h(but)e(rather)h(the)g(line)g(addressed)f(b)m(y)h(the)g (o\013set)h(address)e(sp)s(eci\014ed.)330 4950 y(The)j(default)g(for)h Fi(flags)p Fo(is)e(none.)225 5090 y Fm(\017)60 b Fn(\014le)330 5230 y Fo(A)36 b(pattern)g(used)f(to)i(deriv)m(e)g(a)f(pathname;)j(the) d(default)g(is)g(the)g(curren)m(t)g(\014le.)58 b(File)37 b(names)f(are)330 5340 y(sub)5 b(jected)30 b(to)h(normal)g Fi(sh)p Fo(\(1\))f(w)m(ord)g(expansions.)p eop end %%Page: 46 49 TeXDict begin 46 48 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(46)275 299 y(An)m(ywhere)37 b(a)g(\014le)h(name)f(is)h(sp)s(eci\014ed,)h(it)f(is)f(also)i(p)s (ossible)e(to)h(use)f(the)h(sp)s(ecial)g(string)f(\\)p Fi(/tmp)p Fo(".)150 408 y(This)d(will)h(b)s(e)e(replaced)i(with)g(a)f (temp)s(orary)h(\014le)f(name)h(whic)m(h)f(can)h(b)s(e)f(used)f(for)i (temp)s(orary)f(w)m(ork,)150 518 y(e.g.)42 b(\\)p Fi(:e)30 b(/tmp)p Fo(")g(creates)h(and)f(edits)h(a)g(new)f(\014le.)275 655 y(If)d(b)s(oth)g(a)i(coun)m(t)f(and)g(a)g(range)g(are)h(sp)s (eci\014ed)e(for)h(commands)f(that)i(use)f(either,)h(the)f(starting)h (line)150 764 y(for)g(the)g(command)f(is)h(the)g Fp(last)39 b Fo(line)29 b(addressed)f(b)m(y)h(the)g(range,)h(and)e Fi(count)p Fo(-)g(1)h(subsequen)m(t)f(lines)i(are)150 874 y(a\013ected)i(b)m(y)e(the)h(command,)f(e.g.)42 b(the)30 b(command)h(\\)p Fi(2,3p4)p Fo(")e(prin)m(ts)h(out)h(lines)f(3,)h(4,)g (5)g(and)f(6.)275 1011 y(When)25 b(only)h(a)h(line)f(or)g(range)g(is)g (sp)s(eci\014ed,)h(with)e(no)h(command,)h(the)f(implied)g(command)f(is) h(either)150 1120 y(a)43 b Fn(list)p Fo(,)j Fn(n)m(um)m(b)s(er)c Fo(or)g Fn(prin)m(t)h Fo(command.)77 b(The)42 b(command)g(used)g(is)g (the)h(most)g(recen)m(t)g(of)g(the)g(three)150 1230 y(commands)26 b(to)i(ha)m(v)m(e)g(b)s(een)e(used)g(\(including)h(an)m(y)g(use)g(as)g (a)g(\015ag\).)40 b(If)26 b(none)h(of)g(these)g(commands)g(ha)m(v)m(e) 150 1340 y(b)s(een)35 b(used)g(b)s(efore,)i(the)f Fn(prin)m(t)g Fo(command)g(is)g(the)g(implied)g(command.)57 b(When)35 b(no)h(range)g(or)g(coun)m(t)150 1449 y(is)31 b(sp)s(eci\014ed)f(and)h (the)g(command)g(line)g(is)g(a)h(blank)e(line,)i(the)f(curren)m(t)g (line)h(is)f(incremen)m(ted)g(b)m(y)g(1)h(and)150 1559 y(then)e(the)h(curren)m(t)f(line)h(is)f(displa)m(y)m(ed.)275 1696 y(Zero)36 b(or)g(more)h(whitespace)g(c)m(haracters)h(ma)m(y)f (precede)g(or)f(follo)m(w)i(the)f(addresses,)h(coun)m(t,)g(\015ags,)150 1805 y(or)31 b(command)f(name.)41 b(An)m(y)31 b(ob)5 b(ject)31 b(follo)m(wing)h(a)f(command)f(name)h(\(suc)m(h)f(as)h (bu\013er,)f(\014le,)h(etc.\),)h(that)150 1915 y(b)s(egins)j(with)g(an) g(alphab)s(etic)h(c)m(haracter,)i(should)c(b)s(e)h(separated)h(from)e (the)i(command)f(name)g(b)m(y)g(at)150 2024 y(least)d(one)e(whitespace) h(c)m(haracter.)275 2161 y(An)m(y)43 b(c)m(haracter,)48 b(including)43 b Fi()p Fo(,)f(\\)p Fi(\045)p Fo(")i(and)f(\\)p Fi(#)p Fo(")h(retain)f(their)h(literal)g(v)-5 b(alue)150 2271 y(when)29 b(preceded)h(b)m(y)h(a)f(bac)m(kslash.)150 2557 y Fl(17)80 b(Ex)54 b(Commands)150 2798 y Fo(The)40 b(follo)m(wing)i(section)f(describ)s(es)f(the)h(commands)f(a)m(v)-5 b(ailable)43 b(in)d(the)g Fn(ex)h Fo(editor.)71 b(In)40 b(eac)m(h)i(en)m(try)150 2908 y(b)s(elo)m(w,)31 b(the)f(tag)i(line)f (is)f(a)h(usage)g(synopsis)e(for)i(the)f(command.)275 3045 y(Eac)m(h)42 b(command)f(can)g(b)s(e)g(en)m(tered)h(as)g(the)f (abbreviation)h(\(those)g(c)m(haracters)h(in)e(the)h(synopsis)150 3154 y(command)37 b(w)m(ord)g(preceding)g(the)g(\\[")h(c)m(haracter\),) j(the)c(full)g(command)g(\(all)h(c)m(haracters)h(sho)m(wn)d(for)150 3264 y(the)c(command)g(w)m(ord,)h(omitting)g(the)f(\\[")h(and)f(\\]")h (c)m(haracters\),)i(or)d(an)m(y)g(leading)h(subset)f(of)g(the)g(full) 150 3374 y(command)f(do)m(wn)f(to)i(the)f(abbreviation.)43 b(F)-8 b(or)31 b(example,)h(the)f(args)g(command)g(\(sho)m(wn)g(as)g (\\)p Fi(ar[gs])p Fo(")150 3483 y(in)f(the)h(synopsis\))f(can)g(b)s(e)g (en)m(tered)h(as)g(\\)p Fi(ar)p Fo(",)f(\\)p Fi(arg)p Fo(")h(or)f(\\)p Fi(args)p Fo(".)275 3620 y(Eac)m(h)38 b Fn(ex)g Fo(command)g(describ)s(ed)e(b)s(elo)m(w)i(notes)h(the)f(new)f (curren)m(t)g(line)h(after)h(it)f(is)g(executed,)j(as)150 3730 y(w)m(ell)31 b(as)g(an)m(y)g(options)f(that)h(a\013ect)h(the)f (command.)3290 3918 y([Command])-3600 b Fh(")390 4028 y Fo(A)45 b(commen)m(t.)86 b(Command)44 b(lines)i(b)s(eginning)e(with)h (the)g(double-quote)h(c)m(haracter)h(\\)p Fi(")p Fo(")f(are)390 4138 y(ignored.)41 b(This)29 b(p)s(ermits)h(commen)m(ts)h(in)f(editor)h (scripts)f(and)g(startup)g(\014les.)3290 4326 y([Command])-3600 b Fh()3290 4436 y Fo([Command])g Fh()390 4546 y Fo(Scroll)31 b(the)f(screen.)41 b(W)-8 b(rite)31 b(the)g(next)f(N)h(lines,)f(where)g(N)g(is)h(the)f(v)-5 b(alue)31 b(of)f(the)h Fi(scroll)d Fo(option.)390 4655 y(The)22 b(command)h(is)f(the)h(end-of-\014le)g(terminal)g(c)m (haracter,)j(whic)m(h)d(ma)m(y)g(b)s(e)f(di\013eren)m(t)h(on)f (di\013eren)m(t)390 4765 y(terminals.)41 b(T)-8 b(raditionally)g(,)32 b(it)f(is)g(the)f Fi()p Fo(k)m(ey)-8 b(.)390 5011 y(Historically)g(,)62 b(the)54 b Fn(eof)h Fo(command)e(ignored)h (an)m(y)g(preceding)g(coun)m(t,)60 b(and)53 b(the)h Fi()p Fo(c)m(haracter)h(w)m(as)f(ignored)h(unless)f(it)h(w)m (as)f(en)m(tered)h(as)g(the)g(\014rst)e(c)m(haracter)j(of)f(the)390 5230 y(command.)g(This)34 b(implemen)m(tation)i(treats)g(it)g(as)f(a)h (command)f Fp(only)44 b Fo(if)35 b(en)m(tered)g(as)g(the)h(\014rst)390 5340 y(c)m(haracter)c(of)f(the)f(command)g(line,)h(and)f(otherwise)h (treats)g(it)g(as)g(an)m(y)f(other)h(c)m(haracter.)p eop end %%Page: 47 50 TeXDict begin 47 49 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(47)390 299 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(written.)390 462 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(scroll)f Fo(option.)3290 654 y([Command])-3600 b Fh(!)46 b Fg(argumen)m(t)p Ff(\()p Fg(s)p Ff(\))3290 764 y Fo([Command])-3600 b Fh([range]!)48 b Fg(argumen)m(t)p Ff(\()p Fg(s)p Ff(\))390 874 y Fo(Execute)28 b(a)g(shell)f(command,)h(or)f(\014lter)h(lines)f(through)f(a)i(shell)g (command.)39 b(In)26 b(the)i(\014rst)e(synop-)390 983 y(sis,)j(the)g(remainder)g(of)g(the)g(line)g(after)g(the)g(\\)p Fi(!)p Fo(")h(c)m(haracter)g(is)f(passed)f(to)i(the)f(program)f(named) 390 1093 y(b)m(y)i(the)h Fi(shell)e Fo(option,)i(as)f(a)h(single)g (argumen)m(t.)390 1341 y(Within)f(the)h(rest)f(of)h(the)f(line,)h(\\)p Fi(\045)p Fo(")g(and)e(\\)p Fi(#)p Fo(")i(are)g(expanded)e(in)m(to)i (the)g(curren)m(t)f(and)f(alternate)390 1450 y(pathnames,)23 b(resp)s(ectiv)m(ely)-8 b(.)40 b(The)21 b(c)m(haracter)i(\\)p Fi(!)p Fo(")g(is)f(expanded)e(with)i(the)g(command)f(text)i(of)f(the) 390 1560 y(previous)29 b Fn(!)40 b Fo(command.)g(\(Therefore,)30 b(the)g(command)f Fn(!!)40 b Fo(rep)s(eats)30 b(the)g(previous)f Fn(!)40 b Fo(command.\))390 1670 y(The)30 b(sp)s(ecial)h(meanings)g(of) g(\\)p Fi(\045)p Fo(",)g(\\)p Fi(#)p Fo(",)g(and)f(\\)p Fi(!)p Fo(")i(can)e(b)s(e)g(o)m(v)m(erridden)h(b)m(y)f(escaping)i(them) e(with)390 1779 y(a)35 b(bac)m(kslash.)56 b(If)35 b(no)g Fn(!)54 b Fo(or)35 b Fn(:!)54 b Fo(command)35 b(has)g(y)m(et)h(b)s(een) f(executed,)i(it)f(is)f(an)g(error)f(to)i(use)f(an)390 1889 y(unescap)s(ed)27 b(\\)p Fi(!)p Fo(")i(c)m(haracter.)42 b(The)28 b Fn(!)40 b Fo(command)28 b(do)s(es)g Fp(not)38 b Fo(do)28 b(shell)h(expansion)f(on)g(the)h(strings)390 1998 y(pro)m(vided)e(as)h(argumen)m(ts.)41 b(If)27 b(an)m(y)h(of)g(the) g(ab)s(o)m(v)m(e)h(expansions)e(c)m(hange)i(the)f(command)g(the)g(user) 390 2108 y(en)m(tered,)j(the)g(command)f(is)g(redispla)m(y)m(ed)h(at)g (the)g(b)s(ottom)g(of)f(the)h(screen.)390 2356 y Fn(Ex)d Fo(then)h(executes)h(the)f(program)g(named)f(b)m(y)h(the)g Fi(shell)e Fo(option,)j(with)f(a)g Fn(-c)g Fo(\015ag)h(follo)m(w)m(ed)g (b)m(y)390 2466 y(the)h(argumen)m(ts)f(\(whic)m(h)h(are)f(bundled)f(in) m(to)i(a)g(single)g(argumen)m(t\).)390 2714 y(The)f Fn(!)40 b Fo(command)30 b(is)h(p)s(ermitted)f(in)g(an)g(empt)m(y)h(\014le.)390 2962 y(If)d(the)h(\014le)g(has)f(b)s(een)g(mo)s(di\014ed)g(since)h(it)g (w)m(as)g(last)h(completely)g(written,)g(the)e Fn(!)40 b Fo(command)29 b(will)390 3071 y(w)m(arn)h(y)m(ou.)390 3319 y(A)g(single)i(\\)p Fi(!)p Fo(")e(c)m(haracter)i(is)f(displa)m(y)m (ed)g(when)e(the)i(command)f(completes.)390 3567 y(In)24 b(the)g(second)h(form)f(of)h(the)f Fn(!)39 b Fo(command,)25 b(the)g(remainder)f(of)h(the)f(line)h(after)g(the)g(\\)p Fi(!)p Fo(")g(is)f(passed)390 3677 y(to)34 b(the)f(program)f(named)h(b) m(y)f(the)h Fi(shell)f Fo(option,)i(as)f(describ)s(ed)f(ab)s(o)m(v)m (e.)49 b(The)33 b(sp)s(eci\014ed)f(lines)390 3786 y(are)k(passed)f(to)h (the)g(program)f(as)g(standard)g(input,)h(and)f(the)g(standard)g(and)g (standard)f(error)390 3896 y(output)c(of)h(the)f(program)g(replace)i (the)e(original)i(lines.)390 4061 y(Line:)282 b(Unc)m(hanged)29 b(if)g(no)g(range)h(w)m(as)f(sp)s(eci\014ed,)g(otherwise)g(set)h(to)g (the)f(\014rst)f(line)i(of)f(the)870 4171 y(range.)390 4334 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shell)f Fo(and)h Fi(warn)f Fo(options.)3290 4526 y([Command])-3600 b Fh([range])54 b(#)46 b Fe([)p Fg(coun)m(t)p Fe(])31 b([)p Fg(\015ags)p Fe(])3290 4636 y Fo([Command])-3600 b Fh([range])54 b(nu[mber])48 b Fe([)p Fg(coun)m(t)p Fe(])31 b([)p Fg(\015ags)p Fe(])390 4746 y Fo(Displa)m(y)h(the)e (selected)i(lines,)f(eac)m(h)g(preceded)f(with)g(its)h(line)g(n)m(um)m (b)s(er.)390 4994 y(The)f(line)h(n)m(um)m(b)s(er)e(format)h(is)h (\\\0456d",)g(follo)m(w)m(ed)h(b)m(y)e(t)m(w)m(o)i(spaces.)390 5159 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(displa)m(y)m(ed.) 390 5322 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(list)g Fo(option.)p eop end %%Page: 48 51 TeXDict begin 48 50 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(48)3290 299 y([Command])-3600 b Fh(@)53 b(buffer)3290 408 y Fo([Command])-3600 b Fh(*)46 b Fg(bu\013er)390 518 y Fo(Execute)29 b(a)f(bu\013er.)39 b(Eac)m(h)29 b(line)f(in)g(the)g(named)f(bu\013er)g(is)h(executed)h(as) g(an)e Fn(ex)i Fo(command.)40 b(If)27 b(no)390 628 y(bu\013er)32 b(is)h(sp)s(eci\014ed,)h(or)f(if)g(the)g(sp)s(eci\014ed)g(bu\013er)f (is)h(\\)p Fi(@)p Fo(")h(or)f(\\)p Fi(*)p Fo(",)h(the)g(last)g (bu\013er)e(executed)i(is)390 737 y(used.)3290 923 y([Command])-3600 b Fh([range])54 b(<[<)g(...])46 b Fe([)p Fg(coun)m(t)p Fe(])31 b([)p Fg(\015ags)p Fe(])390 1032 y Fo(Shift)26 b(lines)h(left)g(or)g(righ)m(t.)40 b(The)26 b(sp)s(eci\014ed)g(lines)h (are)g(shifted)f(to)i(the)e(left)i(\(for)f(the)f Fi(<)h Fo(command\))390 1142 y(or)f(righ)m(t)i(\(for)e(the)h Fi(>)f Fo(command\),)i(b)m(y)e(the)h(n)m(um)m(b)s(er)e(of)i(columns)f (sp)s(eci\014ed)g(b)m(y)g(the)h Fi(shiftwidth)390 1251 y Fo(option.)56 b(Only)34 b(leading)i(whitespace)g(c)m(haracters)h(are) e(deleted)h(when)e(shifting)h(left;)k(once)d(the)390 1361 y(\014rst)22 b(column)h(of)g(the)f(line)i(con)m(tains)g(a)f(non)m (blank)f(c)m(haracter,)k(the)d Fn(shift)g Fo(command)f(will)h(succeed,) 390 1471 y(but)30 b(the)g(line)h(will)g(not)f(b)s(e)g(mo)s(di\014ed.) 390 1715 y(If)23 b(the)g(command)h(c)m(haracter)g Fi(<)f Fo(or)h Fi(>)f Fo(is)g(rep)s(eated)h(more)f(than)g(once,)j(the)d (command)g(is)h(rep)s(eated)390 1825 y(once)31 b(for)f(eac)m(h)i (additional)f(command)f(c)m(haracter.)390 1985 y(Line:)282 b(If)30 b(the)h(curren)m(t)g(line)g(is)g(set)g(to)h(one)f(of)g(the)g (lines)g(that)g(are)g(a\013ected)h(b)m(y)f(the)g(com-)870 2095 y(mand,)25 b(it)g(is)g(unc)m(hanged.)38 b(Otherwise,)26 b(it)f(is)g(set)g(to)g(the)g(\014rst)f(non)m(blank)g(c)m(haracter)870 2204 y(of)31 b(the)f(lo)m(w)m(est)i(n)m(um)m(b)s(ered)d(line)i (shifted.)390 2364 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shiftwidth)e Fo(option.)3290 2550 y([Command])-3600 b Fh([line])54 b(=)46 b Fe([)p Fg(\015ags)p Fe(])390 2659 y Fo(Displa)m(y)32 b(the)e(line)h(n)m(um)m(b)s(er)e(of)h Fi(line)p Fo(\(whic)m(h)g(defaults)g(to)h(the)g(last)g(line)g(in)f(the) g(\014le\).)390 2820 y(Line:)282 b(Unc)m(hanged.)390 2980 y(Options:)141 b(None.)3290 3165 y([Command])-3600 b Fh([range])54 b(>[>)g(...])46 b Fe([)p Fg(coun)m(t)p Fe(])31 b([)p Fg(\015ags)p Fe(])390 3275 y Fo(Shift)39 b(righ)m(t.)69 b(The)39 b(sp)s(eci\014ed)g(lines)h(are)g(shifted)f(to)h (the)g(righ)m(t)g(b)m(y)f(the)h(n)m(um)m(b)s(er)f(of)g(columns)390 3384 y(sp)s(eci\014ed)c(b)m(y)h(the)h Fi(shiftwidth)c Fo(option,)38 b(b)m(y)e(inserting)g(tab)h(and)e(space)i(c)m(haracters.) 59 b(Empt)m(y)390 3494 y(lines)31 b(are)f(not)h(c)m(hanged.)390 3738 y(If)e(the)i(command)e(c)m(haracter)j(\\)p Fi(>)p Fo(")e(is)g(rep)s(eated)g(more)g(than)g(once,)h(the)f(command)g(is)g (rep)s(eated)390 3848 y(once)h(for)f(eac)m(h)i(additional)f(command)f (c)m(haracter.)390 4008 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g (mo)s(di\014ed)e(b)m(y)i(the)f(command.)390 4168 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shiftwidth)e Fo(option.)3290 4354 y([Command])-3600 b Fh(ab[brev])48 b Fg(lhs)30 b(rhs)390 4463 y Fo(Add)d(an)h(abbreviation)g(to)h(the)f(curren)m(t)f (abbreviation)i(list.)40 b(When)28 b(inserting)g(text)h(in)e Fn(vi)p Fo(,)i(eac)m(h)390 4573 y(time)c(a)f(non-w)m(ord)f(c)m (haracter)j(is)e(en)m(tered)g(after)h(a)f(w)m(ord)g(c)m(haracter,)j(a)d (set)h(of)f(c)m(haracters)h(ending)390 4682 y(at)i(the)g(w)m(ord)f(c)m (haracter)j(are)e(c)m(hec)m(k)m(ed)h(for)f(a)g(matc)m(h)g(with)f Fi(lhs)p Fo(.)39 b(If)26 b(a)h(matc)m(h)h(is)e(found,)h(they)g(are)390 4792 y(replaced)k(with)f Fi(rhs)p Fo(.)40 b(The)30 b(set)h(of)g(c)m (haracters)h(that)f(are)g(c)m(hec)m(k)m(ed)h(for)e(a)h(matc)m(h)h(are)e (de\014ned)g(as)390 4902 y(follo)m(ws,)g(for)e(inexplicable)h (historical)h(reasons.)40 b(If)28 b(only)g(one)h(or)f(t)m(w)m(o)i(c)m (haracters)g(w)m(ere)e(en)m(tered)390 5011 y(b)s(efore)c(the)h(non-w)m (ord)g(c)m(haracter)h(that)f(triggered)h(the)f(c)m(hec)m(k,)j(and)c (after)i(the)f(b)s(eginning)f(of)h(the)390 5121 y(insertion,)g(or)e (the)g(b)s(eginning)f(of)h(the)g(line)h(or)f(the)g(\014le,)i(or)d(the)i (last)f Fi()p Fo(c)m(haracter)g(that)h(w)m(as)390 5230 y(en)m(tered,)30 b(then)e(the)h(one)f(or)h(the)g(b)s(oth)e(c)m (haracters)j(are)f(c)m(hec)m(k)m(ed)i(for)d(a)h(matc)m(h.)41 b(Otherwise,)29 b(the)390 5340 y(set)f(includes)g(b)s(oth)f(c)m (haracters,)j(as)f(w)m(ell)g(as)f(the)g(c)m(haracters)h(that)g(precede) f(them)g(that)g(are)h(the)p eop end %%Page: 49 52 TeXDict begin 49 51 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(49)390 299 y(same)25 b(w)m(ord)f(class)h (\(i.e.)40 b(w)m(ord)24 b(or)h(non-w)m(ord\))f(as)h(the)f Fn(second)h Fo(to)g(last)g(c)m(haracter)h(en)m(tered)f(b)s(efore)390 408 y(the)31 b(non-w)m(ord)f(c)m(haracter)i(that)f(triggered)h(the)f(c) m(hec)m(k,)h(bac)m(k)g(to)f(the)g(\014rst)f Fi()p Fo(c)m(haracter,)390 518 y(the)h(b)s(eginning)e(of)i(the)f(insertion,)h (or)f(the)h(b)s(eginning)f(of)g(the)h(line)f(or)h(the)f(\014le.)390 766 y(F)-8 b(or)31 b(example,)g(the)g(abbreviations:)390 1013 y(:abbreviate)131 b(ab)s(c)183 b(ABC)390 1123 y(:abbreviate)131 b(#i)221 b(#include)390 1232 y(:abbreviate)131 b(/*#i)g(/*#include)390 1370 y(will)31 b(all)g(w)m(ork,)g(while)f(the)h(abbreviations:)390 1618 y(:abbreviate)131 b(a#i)176 b(A#include)390 1727 y(:abbreviate)131 b(/*)232 b(/**************)q(**)q(**)q(**)390 1865 y(will)31 b(not)f(w)m(ork,)h(and)f(are)h(not)f(p)s(ermitted)g(b)m (y)g Fn(n)m(vi)p Fo(.)390 2113 y(T)-8 b(o)34 b(k)m(eep)g(the)f (abbreviation)h(expansion)f(from)g(happ)s(ening,)g(the)h(c)m(haracter)h (immediately)f(fol-)390 2222 y(lo)m(wing)d(the)g Fi(lhs)p Fo(c)m(haracters)g(should)e(b)s(e)h(quoted)h(with)f(a)g Fi()p Fo(c)m(haracter.)390 2470 y(The)f(replacemen)m(t)i Fi(rhs)p Fo(is)e(itself)h(sub)5 b(ject)30 b(to)g(b)s(oth)f(further)f (abbreviation)i(expansion)g(and)f(fur-)390 2579 y(ther)h(map)g (expansion.)390 2744 y(Line:)282 b(Unc)m(hanged.)390 2907 y(Options:)141 b(None.)3290 3098 y([Command])-3600 b Fh([line])54 b(a[ppend][!])390 3207 y Fo(The)39 b(input)g(text)h(is)g (app)s(ended)e(to)i(the)g(sp)s(eci\014ed)f(line.)68 b(If)40 b(line)f(0)h(is)g(sp)s(eci\014ed,)i(the)d(text)i(is)390 3317 y(inserted)32 b(at)g(the)g(b)s(eginning)f(of)h(the)g(\014le.)45 b(Set)32 b(to)h(the)f(last)g(line)g(input.)44 b(If)32 b(no)f(lines)h(are)h(input,)390 3426 y(then)e(set)h(to)h Fi(line)p Fo(,)e(or)g(to)i(the)f(\014rst)e(line)i(of)g(the)g(\014le)g (if)f(a)h Fi(line)p Fo(of)f(0)h(w)m(as)g(sp)s(eci\014ed.)43 b(F)-8 b(ollo)m(wing)390 3536 y(the)27 b(command)f(name)h(with)f(a)h (\\)p Fi(!)p Fo(")g(c)m(haracter)h(causes)f(the)f Fi(autoindent)e Fo(option)j(to)g(b)s(e)f(toggled)390 3646 y(for)k(the)h(duration)f(of)g (the)h(command.)390 3810 y(Line:)282 b(Unc)m(hanged.)390 3973 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autoindent)e Fo(and)i Fi(number)e Fo(options.)3290 4164 y([Command])-3600 b Fh(ar[gs])390 4274 y Fo(Displa)m(y)34 b(the)f(argumen)m(t)g(list.)49 b(The)33 b(curren)m(t)f(argumen)m(t)i(is)f(displa)m(y)m(ed)g(inside)g (of)g(\\)p Fi([)p Fo(")g(and)f(\\)p Fi(])p Fo(")390 4383 y(c)m(haracters.)46 b(The)32 b(argumen)m(t)g(list)g(is)g(the)g(list)h (of)f(op)s(erands)e(sp)s(eci\014ed)h(on)h(startup,)g(whic)m(h)g(can)390 4493 y(b)s(e)e(replaced)h(using)e(the)i Fn(next)g Fo(command.)390 4657 y(Line:)282 b(Unc)m(hanged.)390 4820 y(Options:)141 b(None.)3290 5011 y([Command])-3600 b Fh(bg)390 5121 y Fn(Vi)36 b Fo(mo)s(de)f(only)-8 b(.)58 b(Bac)m(kground)36 b(the)h(curren)m(t)e(screen.)58 b(The)35 b(screen)h(is)g(unc)m(hanged,) h(but)e(is)h(no)390 5230 y(longer)c(accessible)i(and)d(disapp)s(ears)f (from)i(the)g(displa)m(y)-8 b(.)45 b(Use)32 b(the)g Fn(fg)g Fo(command)f(to)i(bring)e(the)390 5340 y(screen)f(bac)m(k)i(to)f(the)f (displa)m(y)h(foreground.)p eop end %%Page: 50 53 TeXDict begin 50 52 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(50)390 299 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h(when)e(the)i(screen)g(w)m(as)f(last)i (edited.)390 453 y(Options:)141 b(None.)3290 628 y([Command])-3600 b Fh([range])54 b(c[hange][!])49 b Fe([)p Fg(coun)m(t)p Fe(])390 738 y Fo(Replace)27 b(the)f(lines)g(with)f(input)g(text.)40 b(F)-8 b(ollo)m(wing)28 b(the)e(command)g(name)g(with)f(a)h(\\)p Fi(!)p Fo(")g(c)m(haracter)390 847 y(causes)31 b(the)f Fi(autoindent)e Fo(option)j(to)g(b)s(e)f(toggled)i(for)e(the)g (duration)g(of)h(the)g(command.)390 1001 y(Line:)282 b(Set)30 b(to)g(the)g(last)h(line)f(input,)f(or,)h(if)f(no)h(lines)g(w) m(ere)g(input,)f(set)h(to)g(the)g(line)g(b)s(efore)870 1111 y(the)c(target)i(line,)g(or)e(to)h(the)f(\014rst)f(line)i(of)f (the)g(\014le)h(if)f(there)g(are)h(no)f(lines)g(preceding)870 1220 y(the)31 b(target)g(line.)390 1374 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autoindent)e Fo(and)i Fi(number)e Fo(options.)3290 1550 y([Command])-3600 b Fh(chd[ir][!])48 b Fe([)p Fg(directory)p Fe(])3290 1659 y Fo([Command])-3600 b Fh(cd[!])47 b Fe([)p Fg(directory)p Fe(])390 1769 y Fo(Change)61 b(the)h(curren)m(t)f(w)m(orking)g (directory)-8 b(.)135 b(The)61 b Fi(directory)p Fo(argumen)m(t)e(is)i (sub)5 b(jected)390 1878 y(to)51 b Fi(sh)p Fo(\(1\))g(w)m(ord)g (expansions.)101 b(When)50 b(in)m(v)m(ok)m(ed)i(with)e(no)h(directory)g (argumen)m(t)g(and)f(the)390 1988 y Fi(HOME)p Fo(en)m(vironmen)m(t)56 b(v)-5 b(ariable)58 b(is)e(set,)65 b(the)56 b(directory)i(named)e(b)m (y)h(the)f Fi(HOME)p Fo(en)m(vironmen)m(t)390 2098 y(v)-5 b(ariable)40 b(b)s(ecomes)g(the)g(new)f(curren)m(t)g(directory)-8 b(.)69 b(Otherwise,)42 b(the)d(new)g(curren)m(t)g(directory)390 2207 y(b)s(ecomes)31 b(the)f(directory)h(returned)e(b)m(y)i(the)f Fi(getpwent)p Fo(\(3\))f(routine.)390 2448 y(The)c Fn(c)m(hdir)h Fo(command)f(will)h(fail)g(if)g(the)f(\014le)h(has)f(b)s(een)g(mo)s (di\014ed)g(since)h(the)f(last)i(complete)g(write)390 2558 y(of)d(the)g(\014le.)39 b(Y)-8 b(ou)25 b(can)f(o)m(v)m(erride)h (this)f(c)m(hec)m(k)i(b)m(y)e(app)s(ending)e(a)j(\\)p Fi(!)p Fo(")f(c)m(haracter)i(to)f(the)f(command.)390 2712 y(Line:)282 b(Unc)m(hanged.)390 2865 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(cdpath)f Fo(option.)3290 3041 y([Command])-3600 b Fh([range])54 b(co[py])48 b Fg(line)30 b Fe([)p Fg(\015ags)p Fe(])3290 3151 y Fo([Command])-3600 b Fh([range])54 b(t)46 b Fg(line)31 b Fe([)p Fg(\015ags)p Fe(])390 3260 y Fo(Cop)m(y)e(the)g(sp)s(eci\014ed)f(lines)g(\(range\))i (after)f(the)g(destination)h(line.)40 b(Line)29 b(0)g(ma)m(y)g(b)s(e)f (sp)s(eci\014ed)g(to)390 3370 y(insert)i(the)h(lines)f(at)i(the)e(b)s (eginning)g(of)g(the)h(\014le.)390 3524 y(Line:)282 b(Unc)m(hanged.)390 3677 y(Options:)141 b(None.)3290 3853 y([Command])-3600 b Fh(cs[cope])48 b Fg(command)30 b Fe([)p Fg(args)p Fe(])390 3963 y Fo(Execute)36 b(a)g Fn(cscop)s(e)g Fo(command.)56 b(F)-8 b(or)36 b(more)g(information,)h(see)f(the)g(section)g(of)g(the)f (reference)390 4072 y(man)m(ual)c(en)m(titled)h(\\)p Fn(T)-8 b(ags,)32 b(T)-8 b(ag)31 b(Stac)m(ks,)h(and)d(Cscop)s(e)p Fo(")i(.)3290 4248 y([Command])-3600 b Fh([range])54 b(d[elete])48 b Fe([)p Fg(bu\013er)p Fe(])29 b([)p Fg(coun)m(t)p Fe(])i([)p Fg(\015ags)p Fe(])390 4357 y Fo(Delete)j(the)e(lines)h(from) e(the)h(\014le.)46 b(The)32 b(deleted)g(text)h(is)f(sa)m(v)m(ed)h(in)f (the)g(sp)s(eci\014ed)g(bu\013er,)f(or,)i(if)390 4467 y(no)j(bu\013er)f(is)i(sp)s(eci\014ed,)g(in)f(the)g(unnamed)f (bu\013er.)57 b(If)36 b(the)h(command)f(name)g(is)g(follo)m(w)m(ed)i(b) m(y)390 4577 y(a)h(letter)h(that)g(could)f(b)s(e)f(in)m(terpreted)h(as) g(either)h(a)f(bu\013er)f(name)h(or)g(a)g(\015ag)g(v)-5 b(alue)40 b(\(b)s(ecause)390 4686 y(neither)27 b(a)h Fi(count)p Fo(or)e Fi(flags)p Fo(v)-5 b(alues)27 b(w)m(ere)h(giv)m (en\),)h Fn(ex)f Fo(treats)h(the)e(letter)i(as)f(a)g Fi(flags)p Fo(v)-5 b(alue)26 b(if)i(the)390 4796 y(letter)38 b(immediately)g(follo)m(ws)f(the)g(command)g(name,)h(without)f(an)m(y)g (whitespace)g(separation.)390 4905 y(If)30 b(the)g(letter)i(is)f (preceded)f(b)m(y)g(whitespace)h(c)m(haracters,)h(it)f(treats)g(it)g (as)g(a)g(bu\013er)e(name.)390 5059 y(Line:)282 b(Set)27 b(to)h(the)g(line)f(follo)m(wing)i(the)e(deleted)h(lines,)g(or)f(to)h (the)f(last)h(line)g(if)f(the)g(deleted)870 5169 y(lines)k(w)m(ere)f (at)i(the)e(end.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 51 54 TeXDict begin 51 53 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(51)3290 299 y([Command])-3600 b Fh(di[splay])48 b Fg(b)p Fe([)p Fg(u\013ers)p Fe(])29 b Fh(|)i Fg(c)p Fe([)p Fg(onnections)p Fe(])g Fh(|)g Fg(s)p Fe([)p Fg(creens)p Fe(])f Fh(|)g Fg(t)p Fe([)p Fg(ags)p Fe(])390 408 y Fo(Displa)m(y)g(bu\013ers,)e Fn(cscop)s(e)h Fo(connections,)h(screens)e(or)h(tags.)41 b(The)28 b Fn(displa)m(y)g Fo(command)h(tak)m(es)h(one)390 518 y(of)h(three)f(additional)h(argumen)m(ts,)g(whic)m(h)f(are)h(as)g (follo)m(ws:)390 670 y(b[u\013ers])163 b(Displa)m(y)22 b(all)g(bu\013ers)d(\(including)i(named,)h(unnamed,)g(and)e(n)m (umeric\))h(that)h(con)m(tain)870 780 y(text.)390 932 y(c[onnections])870 1041 y(Displa)m(y)32 b(the)e(source)h(directories)g (for)f(all)h(attac)m(hed)i Fn(cscop)s(e)e Fo(databases.)390 1193 y(s[creens])151 b(Displa)m(y)32 b(the)e(\014le)h(names)f(of)g(all) i(bac)m(kground)e(screens.)390 1345 y(t[ags])269 b(Displa)m(y)32 b(the)e(tags)i(stac)m(k.)390 1497 y(Line:)282 b(Unc)m(hanged.)390 1649 y(Options:)141 b(None.)3290 1823 y([Command])-3600 b Fh(e[dit][!])48 b Fe([)p Fh(+)p Fg(cmd)p Fe(])30 b([)p Fg(\014le)p Fe(])3290 1932 y Fo([Command])-3600 b Fh(ex[!])47 b Fe([)p Fh(+)p Fg(cmd)p Fe(])30 b([)p Fg(\014le)p Fe(])3290 2042 y Fo([Command])-3600 b Fh(vs[plit][!])49 b Fe([)p Fh(+)p Fg(cmd)p Fe(])30 b([)p Fg(\014le)p Fe(])390 2151 y Fo(Edit)k(a)h(di\013eren)m(t)g(\014le.)52 b(If)34 b(the)h(curren)m(t) f(bu\013er)f(has)h(b)s(een)g(mo)s(di\014ed)f(since)i(the)f(last)h (complete)390 2261 y(write,)c(the)g(command)f(will)h(fail.)42 b(Y)-8 b(ou)31 b(can)g(o)m(v)m(erride)g(this)g(b)m(y)f(app)s(ending)f (a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)390 2370 y(the)f(command)f (name.)390 2611 y(If)j(the)g(\\)p Fi(+cmd)p Fo(")f(option)i(is)f(sp)s (eci\014ed,)g(that)h Fn(ex)f Fo(command)g(will)g(b)s(e)f(executed)i(in) f(the)g(new)g(\014le.)390 2720 y(An)m(y)g Fn(ex)g Fo(command)g(ma)m(y)h (b)s(e)e(used,)h(although)g(the)h(most)f(common)g(use)g(of)g(this)g (feature)g(is)g(to)390 2830 y(sp)s(ecify)d(a)h(line)f(n)m(um)m(b)s(er)g (or)g(searc)m(h)h(pattern)f(to)i(set)e(the)h(initial)h(lo)s(cation)g (in)e(the)g(new)g(\014le.)390 3070 y(Capitalizing)36 b(the)e(\014rst)f(letter)i(of)g(the)f(command,)h(i.e.,)h Fn(Edit)e Fo(or)f Fn(Ex)p Fo(,)i(while)f(in)g Fn(vi)g Fo(mo)s(de,)h(will)390 3180 y(edit)i(the)f(\014le)g(in)g(a)h(new)f (screen.)58 b(In)36 b(this)g(case,)j(an)m(y)d(mo)s(di\014cations)h(to)g (the)f(curren)m(t)g(\014le)h(are)390 3290 y(ignored.)54 b Fn(vsplit)35 b Fo(is)g(similar,)i(but)d(the)h(screen)g(will)h(b)s(e)e (split)h(v)m(ertically)i(to)f(pro)s(duce)d(the)i(new)390 3399 y(screen,)c(rather)f(than)g(horizon)m(tally)-8 b(.)390 3551 y(Line:)282 b(If)30 b(y)m(ou)h(ha)m(v)m(e)h(previously)e(edited)h (the)f(\014le,)h(the)g(curren)m(t)f(line)h(will)g(b)s(e)f(set)h(to)g(y) m(our)870 3661 y(last)j(p)s(osition)g(in)f(the)h(\014le.)50 b(If)33 b(that)i(p)s(osition)e(do)s(es)g(not)h(exist,)i(or)d(y)m(ou)h (ha)m(v)m(e)h(not)870 3770 y(previously)f(edited)i(the)e(\014le,)j(the) d(curren)m(t)h(line)g(will)g(b)s(e)f(set)h(to)h(the)f(\014rst)f(line)h (of)870 3880 y(the)29 b(\014le)h(if)f(y)m(ou)g(are)h(in)f Fn(vi)g Fo(mo)s(de,)h(and)e(the)i(last)g(line)f(of)g(the)h(\014le)f(if) g(y)m(ou)h(are)f(in)g Fn(ex)p Fo(.)390 4032 y(Options:)141 b(None.)3290 4205 y([Command])-3600 b Fh(exu[sage])48 b Fe([)p Fg(command)p Fe(])390 4315 y Fo(Displa)m(y)d(usage)f(for)f(an) g Fn(ex)h Fo(command.)79 b(If)43 b Fi(command)p Fo(is)f(sp)s (eci\014ed,)k(a)e(usage)g(statemen)m(t)h(for)390 4424 y(that)39 b(command)f(is)h(displa)m(y)m(ed.)65 b(Otherwise,)40 b(usage)f(statemen)m(ts)h(for)f(all)g Fn(ex)g Fo(commands)f(are)390 4534 y(displa)m(y)m(ed.)390 4686 y(Line:)282 b(Unc)m(hanged.)390 4838 y(Options:)141 b(None.)3290 5011 y([Command])-3600 b Fh(f[ile])47 b Fe([)p Fg(\014le)p Fe(])390 5121 y Fo(Displa)m(y)36 b(and)d(optionally)j(c)m(hange)g(the)f(\014le)f(name.)53 b(If)34 b(a)h(\014le)f(name)h(is)f(sp)s(eci\014ed,)h(the)g(curren)m(t) 390 5230 y(pathname)g(is)g(c)m(hanged)h(to)g(the)f(sp)s(eci\014ed)g (name.)55 b(The)34 b(curren)m(t)h(pathname,)i(the)e(n)m(um)m(b)s(er)f (of)390 5340 y(lines,)d(and)f(the)g(curren)m(t)g(p)s(osition)h(in)f (the)g(\014le)h(are)g(displa)m(y)m(ed.)p eop end %%Page: 52 55 TeXDict begin 52 54 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(52)390 299 y(Line:)282 b(Unc)m(hanged.)390 446 y(Options:)141 b(None.)3290 613 y([Command])-3600 b Fh(fg)46 b Fe([)p Fg(name)p Fe(])390 723 y Fn(Vi)26 b Fo(mo)s(de)g(only)-8 b(.)39 b(F)-8 b(oreground)27 b(the)f(sp)s (eci\014ed)f(screen.)40 b(If)25 b(the)i(argumen)m(t)f(name)g(do)s (esn't)g(exactly)390 832 y(matc)m(h)38 b(the)f(name)g(of)g(a)g(\014le)g (displa)m(y)m(ed)g(b)m(y)g(a)g(bac)m(kground)g(screen,)i(it)e(is)g (compared)g(against)390 942 y(the)27 b(last)g(comp)s(onen)m(t)g(of)g (eac)m(h)h(of)f(the)g(\014le)g(names.)39 b(If)26 b(no)h(bac)m(kground)f (screen)h(is)g(sp)s(eci\014ed,)g(the)390 1051 y(\014rst)j(bac)m (kground)g(screen)g(is)h(foregrounded.)390 1290 y(By)39 b(default,)i(foregrounding)e(causes)g(the)g(curren)m(t)f(screen)h(to)h (b)s(e)e(sw)m(app)s(ed)f(with)i(the)g(bac)m(k-)390 1399 y(grounded)i(screen.)75 b(Capitalizing)44 b(the)e(\014rst)f(letter)i (of)f(the)g(command,)j(i.e.)76 b Fn(Fg)p Fo(,)45 b(will)d(fore-)390 1509 y(ground)g(the)h(bac)m(kgrounded)f(screen)h(in)f(a)h(new)f(screen) h(instead)g(of)g(sw)m(apping)f(it)h(with)g(the)390 1618 y(curren)m(t)30 b(screen.)390 1766 y(Line:)282 b(Set)31 b(to)g(the)f(curren)m(t)g(line)h(when)e(the)i(screen)g(w)m(as)f(last)i (edited.)390 1914 y(Options:)141 b(None.)3290 2080 y([Command])-3600 b Fh([range])54 b(g[lobal])48 b Fg(/pattern/)32 b Fe([)p Fg(commands)p Fe(])3290 2190 y Fo([Command])-3600 b Fh([range])54 b(v)46 b Fg(/pattern/)32 b Fe([)p Fg(commands)p Fe(])390 2299 y Fo(Apply)37 b(commands)g(to)h(lines)g(matc)m(hing)h(\(or)f(not)f (matc)m(hing\))i(a)f(pattern.)63 b(The)37 b(lines)g(within)390 2409 y(the)c(giv)m(en)h(range)f(that)h(matc)m(h)f(\\)p Fi(g[lobal])p Fo(",)g(or)g(do)f(not)h(matc)m(h)h(\\)p Fi(v)p Fo(")g(the)f(giv)m(en)h(pattern)f(are)390 2519 y(selected.)39 b(Then,)23 b(the)g(sp)s(eci\014ed)e Fn(ex)h Fo(command\(s\))h(are)f(executed)h(with)e(the)i(curren)m(t)e(line)i(\\) p Fi(.)p Fo(")f(set)390 2628 y(to)31 b(eac)m(h)h(selected)g(line.)42 b(If)30 b(no)g(range)h(is)g(sp)s(eci\014ed,)f(the)g(en)m(tire)i(\014le) f(is)f(searc)m(hed)h(for)g(matc)m(hing,)390 2738 y(or)f(not)h(matc)m (hing,)h(lines.)390 2976 y(Multiple)95 b(commands)g(can)f(b)s(e)g(sp)s (eci\014ed,)110 b(one)95 b(p)s(er)f(line,)111 b(b)m(y)94 b(escaping)i(eac)m(h)390 3086 y Fi()p Fo(c)m(haracter)56 b(with)g(a)i(bac)m(kslash,)64 b(or)57 b(b)m(y)g(separating)g(commands)g (with)f(a)h(\\)p Fi(|)p Fo(")390 3195 y(c)m(haracter.)119 b(If)56 b(no)f(commands)h(are)g(sp)s(eci\014ed,)62 b(the)56 b(command)g(defaults)g(to)h(the)f Fn(prin)m(t)390 3305 y Fo(command.)390 3543 y(F)-8 b(or)39 b(the)g Fn(app)s(end)p Fo(,)g Fn(c)m(hange)g Fo(and)f Fn(insert)h Fo(commands,)h(the)f(input)e (text)j(m)m(ust)e(b)s(e)g(part)g(of)h(the)390 3652 y(global)c(command)e (line.)49 b(In)33 b(this)g(case,)j(the)d(terminating)h(p)s(erio)s(d)e (can)i(b)s(e)e(omitted)j(if)e(it)h(ends)390 3762 y(the)d(commands.)390 4000 y(The)c Fn(visual)g Fo(command)g(ma)m(y)h(also)g(b)s(e)e(sp)s (eci\014ed)h(as)g(one)h(of)f(the)h Fn(ex)f Fo(commands.)40 b(In)26 b(this)h(mo)s(de,)390 4110 y(input)41 b(is)h(tak)m(en)h(from)f (the)g(terminal.)77 b(En)m(tering)42 b(a)h Fn(Q)f Fo(command)g(in)f Fn(vi)i Fo(mo)s(de)e(causes)i(the)390 4219 y(next)31 b(line)h(matc)m(hing)g(the)f(pattern)g(to)h(b)s(e)f(selected)h(and)f Fn(vi)g Fo(to)h(b)s(e)e(reen)m(tered,)i(un)m(til)g(the)f(list)h(is)390 4329 y(exhausted.)390 4567 y(The)e Fn(global)p Fo(,)i Fn(v)e Fo(and)g Fn(undo)f Fo(commands)h(cannot)h(b)s(e)f(used)f(as)i (part)f(of)h(these)f(commands.)390 4805 y(The)21 b(editor)h(options)g Fi(autoindent)p Fo(,)f Fi(autoprint)e Fo(and)i Fi(report)f Fo(are)i(turned)f(o\013)h(for)f(the)h(duration)390 4915 y(of)31 b(the)f Fn(global)i Fo(and)d Fn(v)i Fo(commands.)390 5063 y(Line:)282 b(The)30 b(last)h(line)g(mo)s(di\014ed.)390 5210 y(Options:)141 b(A\013ected)69 b(b)m(y)f(the)h Fi(ignorecase)c Fo(and)j Fi(magic)e Fo(options.)155 b(T)-8 b(urns)66 b(o\013)j(the)870 5320 y Fi(autoindent)p Fo(,)28 b Fi(autoprint)g Fo(and)h Fi(report)g Fo(options.)p eop end %%Page: 53 56 TeXDict begin 53 55 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(53)3290 299 y([Command])-3600 b Fh(he[lp])390 408 y Fo(Displa)m(y)32 b(a)e(help)g(message.)390 560 y(Line:)282 b(Unc)m(hanged.)390 712 y(Options:)141 b(None.)3290 886 y([Command])-3600 b Fh([line])54 b(i[nsert][!])390 995 y Fo(The)22 b(input)g(text)i(is)e(inserted)h(b)s(efore)f(the)h(sp)s (eci\014ed)f(line.)38 b(F)-8 b(ollo)m(wing)25 b(the)e(command)g(name)f (with)390 1105 y(a)31 b(\\)p Fi(!)p Fo(")h(c)m(haracter)g(causes)g(the) f Fi(autoindent)d Fo(option)j(setting)h(to)g(b)s(e)e(toggled)j(for)d (the)h(duration)390 1214 y(of)g(this)f(command.)390 1366 y(Line:)282 b(Set)29 b(to)g(the)f(last)h(line)g(input;)f(if)h(no)f (lines)h(w)m(ere)f(input,)h(set)f(to)i(the)e(line)h(b)s(efore)f(the)870 1476 y(target)38 b(line,)g(or)e(to)h(the)g(\014rst)e(line)i(of)f(the)h (\014le)f(if)g(there)h(are)f(no)h(lines)f(preceding)870 1586 y(the)31 b(target)g(line.)42 b(A\013ected)31 b(b)m(y)f(the)h Fi(autoindent)d Fo(and)h Fi(number)g Fo(options.)3290 1759 y([Command])-3600 b Fh([range])54 b(j[oin][!])49 b Fe([)p Fg(coun)m(t)p Fe(])30 b([)p Fg(\015ags)p Fe(])390 1868 y Fo(Join)g(lines)h(of)f(text)i(together.)390 2109 y(A)37 b Fi(count)p Fo(sp)s(eci\014ed)e(to)i(the)h Fn(join)e Fo(command)h(sp)s(eci\014es)g(that)g(the)g(last)h(line)f(of)g(the)g Fi(range)p Fo(plus)390 2218 y Fi(count)p Fo(subsequen)m(t)27 b(lines)j(will)g(b)s(e)f(joined.)40 b(\(Note,)32 b(this)d(di\013ers)g (b)m(y)g(one)h(from)f(the)h(general)g(rule)390 2328 y(where)g(only)g Fi(count)p Fo(-)g(1)g(subsequen)m(t)g(lines)h(are)f(a\013ected.\))390 2568 y(If)i(the)h(curren)m(t)g(line)g(ends)f(with)h(a)g(whitespace)h(c) m(haracter,)h(all)f(whitespace)f(is)g(stripp)s(ed)e(from)390 2678 y(the)43 b(next)f(line.)78 b(Otherwise,)45 b(if)e(the)g(next)f (line)h(starts)g(with)f(a)h(op)s(en)f(paren)m(thesis)h(\\)p Fi(\()p Fo(",)j(do)390 2788 y(nothing.)41 b(Otherwise,)29 b(if)h(the)g(curren)m(t)g(line)g(ends)f(with)h(a)g(question)g(mark)g (\\)p Fi(?)p Fo(",)h(p)s(erio)s(d)d(\\)p Fi(.)p Fo(")j(or)390 2897 y(exclamation)i(p)s(oin)m(t)d(\\)p Fi(!)p Fo(",)h(insert)f(t)m(w)m (o)i(spaces.)41 b(Otherwise,)31 b(insert)f(a)h(single)g(space.)390 3138 y(App)s(ending)42 b(a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)i(to)e (the)g(command)g(name)f(causes)i(a)f(simpler)f(join)h(with)f(no)390 3247 y(white-space)31 b(pro)s(cessing.)390 3399 y(Line:)282 b(Unc)m(hanged.)390 3551 y(Options:)141 b(None.)3290 3724 y([Command])-3600 b Fh([range])54 b(l[ist])48 b Fe([)p Fg(coun)m(t)p Fe(])30 b([)p Fg(\015ags)p Fe(])390 3834 y Fo(Displa)m(y)g(the)g(lines)f(unam)m(biguously)-8 b(.)40 b(T)-8 b(abs)29 b(are)h(displa)m(y)m(ed)g(as)f(\\)p Fi(^I)p Fo(",)h(and)f(the)g(end)g(of)g(the)h(line)390 3944 y(is)g(mark)m(ed)h(with)f(a)h(\\)p Fi($)p Fo(")g(c)m(haracter.)390 4096 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(displa)m(y)m(ed.) 390 4248 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(number)f Fo(option.)3290 4421 y([Command])-3600 b Fh(map[!])47 b Fe([)p Fg(lhs)30 b(rhs)p Fe(])390 4530 y Fo(De\014ne)h(or)f(displa)m(y)h(maps)e(\(for)i Fn(vi)f Fo(only\).)390 4771 y(If)38 b(\\)p Fi(lhs)p Fo(")h(and)g(\\)p Fi(rhs)p Fo(")g(are)g(not)g(sp)s(eci\014ed,)i(the)e(curren)m(t)f(set)i (of)f(command)g(mo)s(de)f(maps)h(are)390 4880 y(displa)m(y)m(ed.)54 b(If)35 b(a)g(\\)p Fi(!)p Fo(")g(c)m(haracter)h(is)f(app)s(ended)e(to)j (to)f(the)g(command,)h(the)f(text)h(input)d(mo)s(de)390 4990 y(maps)d(are)h(displa)m(y)m(ed.)390 5230 y(Otherwise,)42 b(when)d(the)i(\\)p Fi(lhs)p Fo(")f(c)m(haracter)h(sequence)g(is)f(en)m (tered)g(in)g Fn(vi)p Fo(,)j(the)d(action)i(is)e(as)g(if)390 5340 y(the)f(corresp)s(onding)g(\\)p Fi(rhs)p Fo(")g(had)g(b)s(een)f (en)m(tered.)68 b(If)39 b(a)h(\\)p Fi(!)p Fo(")g(c)m(haracter)h(is)e (app)s(ended)f(to)i(the)p eop end %%Page: 54 57 TeXDict begin 54 56 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(54)390 299 y(command)41 b(name,)i(the)e (mapping)g(is)f(e\013ectiv)m(e)k(during)39 b(text)j(input)e(mo)s(de,)j (otherwise,)i(it)c(is)390 408 y(e\013ectiv)m(e)48 b(during)43 b(command)i(mo)s(de.)84 b(This)44 b(allo)m(ws)j(\\)p Fi(lhs)p Fo(")e(to)g(ha)m(v)m(e)i(t)m(w)m(o)f(di\013eren)m(t)f(macro) 390 518 y(de\014nitions)30 b(at)h(the)g(same)f(time:)42 b(one)30 b(for)h(command)f(mo)s(de)g(and)f(one)i(for)f(input)g(mo)s (de.)390 767 y(Whitespace)39 b(c)m(haracters)g(require)e(escaping)i (with)e(a)h Fi()p Fo(c)m(haracter)d(to)k(b)s(e)e(en-)390 877 y(tered)31 b(in)f(the)g Fi(lhs)p Fo(string)g(in)g(visual)g(mo)s (de.)390 1126 y(Normally)-8 b(,)25 b(k)m(eys)d(in)g(the)g Fi(rhs)p Fo(string)f(are)h(remapp)s(ed)e(\(see)j(the)f Fi(remap)e Fo(option\),)25 b(and)c(it)i(is)e(p)s(ossible)390 1235 y(to)45 b(create)g(in\014nite)f(lo)s(ops.)81 b(Ho)m(w)m(ev)m(er,) 49 b(k)m(eys)c(whic)m(h)f(map)f(to)i(themselv)m(es)g(are)f(not)g (further)390 1345 y(remapp)s(ed,)29 b(regardless)i(of)g(the)f(setting)i (of)f(the)f Fi(remap)f Fo(option.)42 b(F)-8 b(or)31 b(example,)g(the)g (command)390 1455 y(\\)p Fi(:map)f(n)g(nz.)p Fo(")g(maps)g(the)g(\\)p Fi(n)p Fo(")h(k)m(ey)g(to)g(the)g Fn(n)f Fo(and)f Fn(z)i Fo(commands.)390 1704 y(T)-8 b(o)31 b(exit)g(an)f(in\014nitely)h(lo)s (oping)f(map,)h(use)f(the)g(terminal)h Fi()p Fo(c)m(haracter.)390 1870 y(Line:)282 b(Unc)m(hanged.)390 2035 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(remap)f Fo(option.)3290 2229 y([Command])-3600 b Fh([line])54 b(ma[rk])47 b(<)p Fg(c)m(haracter)p Fh(>)3290 2339 y Fo([Command])-3600 b Fh([line])54 b(k)46 b(<)p Fg(c)m(haracter)p Fh(>)390 2448 y Fo(Mark)39 b(the)g(line)g(with)f(the)h(mark)f Fi()p Fo(.)62 b(The)38 b(expressions)g(\\)p Fi(')p Fo(")f(and)390 2558 y(\\)p Fi(`)p Fo(")28 b(can)j(then)f(b)s(e)f(used)h(as)h(an)f(address)f(in)h(an)m(y)h (command)f(that)h(uses)f(one.)390 2725 y(Line:)282 b(Unc)m(hanged.)390 2889 y(Options:)141 b(None.)3290 3083 y([Command])-3600 b Fh([range])54 b(m[ove])48 b Fg(line)390 3193 y Fo(Mo)m(v)m(e)30 b(the)d(sp)s(eci\014ed)g(lines)h(after)g(the)f(target)j(line.)40 b(A)27 b(target)i(line)f(of)g(0)g(places)g(the)g(lines)f(at)i(the)390 3303 y(b)s(eginning)h(of)g(the)h(\014le.)390 3469 y(Line:)282 b(Set)31 b(to)g(the)f(\014rst)g(of)g(the)h(mo)m(v)m(ed)g(lines.)390 3634 y(Options:)141 b(None.)3290 3828 y([Command])-3600 b Fh(mk[exrc][!])49 b Fg(\014le)390 3938 y Fo(W)-8 b(rite)31 b(the)e(abbreviations,)h(editor)g(options)g(and)e(maps)h(to)h(the)g(sp) s(eci\014ed)e(\014le.)41 b(Information)29 b(is)390 4047 y(written)k(in)g(a)h(form)f(whic)m(h)g(can)g(later)i(b)s(e)d(read)i (bac)m(k)g(in)f(using)f(the)i Fn(ex)f(source)h Fo(command.)49 b(If)390 4157 y Fi(file)p Fo(already)32 b(exists,)i(the)f Fn(mk)m(exrc)h Fo(command)e(will)h(fail.)48 b(This)32 b(c)m(hec)m(k)i(can)f(b)s(e)f(o)m(v)m(erridden)h(b)m(y)390 4266 y(app)s(ending)c(a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)f(the)f (command.)390 4433 y(Line:)282 b(Unc)m(hanged.)390 4598 y(Options:)141 b(None.)3290 4792 y([Command])-3600 b Fh(n[ext][!])48 b Fe([)p Fg(\014le)31 b(...)p Fe(])390 4902 y Fo(Edit)42 b(the)g(next)g(\014le)f(from)h(the)g(argumen)m(t)g (list.)76 b(The)41 b Fn(next)h Fo(command)g(will)g(fail)g(if)g(the)g (\014le)390 5011 y(has)c(b)s(een)g(mo)s(di\014ed)f(since)i(the)g(last)g (complete)h(write.)66 b(This)38 b(c)m(hec)m(k)i(can)f(b)s(e)e(o)m(v)m (erridden)i(b)m(y)390 5121 y(app)s(ending)22 b(the)j(\\)p Fi(!)p Fo(")f(c)m(haracter)i(to)e(the)h(command)e(name.)39 b(The)23 b(argumen)m(t)i(list)f(can)h(optionally)390 5230 y(b)s(e)38 b(replaced)h(b)m(y)f(sp)s(ecifying)g(a)h(new)f(one)h (as)g(argumen)m(ts)f(to)i(this)e(command.)65 b(In)37 b(this)i(case,)390 5340 y(editing)31 b(starts)g(with)f(the)g(\014rst)g (\014le)h(on)f(the)g(new)g(list.)p eop end %%Page: 55 58 TeXDict begin 55 57 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(55)390 299 y(Capitalizing)32 b(the)e(\014rst)g(letter)h(of)g(the)f(command,)g(i.e.)42 b Fn(Next)p Fo(,)31 b(while)f(in)g Fn(vi)g Fo(mo)s(de,)h(will)f(set)h (the)390 408 y(argumen)m(t)f(list)g(and)f(edit)h(the)f(\014le)h(in)f(a) h(new)f(screen.)40 b(In)29 b(this)g(case,)i(an)m(y)f(mo)s (di\014cations)g(to)g(the)390 518 y(curren)m(t)g(\014le)h(are)f (ignored.)390 681 y(Line:)282 b(Set)31 b(as)f(describ)s(ed)f(for)i(the) f Fn(edit)h Fo(command.)390 842 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g(options)h Fi(autowrite)d Fo(and)i Fi(writeany)p Fo(.)3290 1031 y([Command])-3600 b Fh([line])54 b(o[pen])47 b Fg(/pattern/)32 b Fe([)p Fg(\015ags)p Fe(])390 1140 y Fo(En)m(ter)26 b(op)s(en)g(mo)s(de.)39 b(Op)s(en)25 b(mo)s(de)h(is)g(the)g(same)h(as)g(b)s(eing)e(in)h Fn(vi)p Fo(,)i(but)d(with)h(a)h(one-line)g(windo)m(w.)390 1250 y(All)k(the)f(standard)f Fn(vi)h Fo(commands)g(are)g(a)m(v)-5 b(ailable.)43 b(If)29 b(a)i(matc)m(h)g(is)f(found)e(for)i(the)g (optional)h(RE)390 1359 y(argumen)m(t,)g(the)g(cursor)e(is)i(set)g(to)g (the)f(start)h(of)g(the)f(matc)m(hing)i(pattern.)390 1606 y Fp(This)h(c)-5 b(ommand)35 b(is)e(not)g(yet)g(implemente)-5 b(d.)390 1768 y Fo(Line:)282 b(Unc)m(hanged,)31 b(unless)f(the)g (optional)i(RE)e(is)g(sp)s(eci\014ed,)g(in)g(whic)m(h)g(case)i(it)f(is) f(set)h(to)870 1878 y(the)g(line)f(where)g(the)h(matc)m(hing)g(pattern) g(is)f(found.)390 2039 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(open)g Fo(option.)3290 2228 y([Command])-3600 b Fh(pre[serve])390 2337 y Fo(Sa)m(v)m(e)33 b(the)f(\014le)g(in)f(a)h (form)f(that)h(can)g(later)h(b)s(e)e(reco)m(v)m(ered)i(using)f(the)f Fn(ex)h(-r)g Fo(option.)45 b(When)32 b(the)390 2447 y(\014le)e(is)h (preserv)m(ed,)f(an)g(email)i(message)f(is)g(sen)m(t)g(to)g(the)f (user.)390 2610 y(Line:)282 b(Unc)m(hanged.)390 2771 y(Options:)141 b(None.)3290 2960 y([Command])-3600 b Fh(prev[ious][!])390 3069 y Fo(Edit)32 b(the)g(previous)f(\014le)h (from)f(the)h(argumen)m(t)g(list.)46 b(The)31 b Fn(previous)h Fo(command)f(will)i(fail)f(if)g(the)390 3179 y(\014le)d(has)f(b)s(een)g (mo)s(di\014ed)f(since)i(the)g(last)g(complete)h(write.)41 b(This)27 b(c)m(hec)m(k)k(can)d(b)s(e)g(o)m(v)m(erridden)h(b)m(y)390 3288 y(app)s(ending)g(the)h(\\)p Fi(!)p Fo(")h(c)m(haracter)h(to)g(the) e(command)g(name.)390 3535 y(Capitalizing)f(the)f(\014rst)e(letter)j (of)f(the)f(command,)h(i.e.)41 b Fn(Previous)p Fo(,)29 b(while)e(in)g Fn(vi)h Fo(mo)s(de,)g(will)f(edit)390 3644 y(the)g(\014le)f(in)g(a)h(new)f(screen.)39 b(In)26 b(this)g(case,)j(an)m(y)e(mo)s(di\014cations)f(to)h(the)g(curren)m(t)f (\014le)h(are)g(ignored.)390 3807 y(Line:)282 b(Set)31 b(as)f(describ)s(ed)f(for)i(the)f Fn(edit)h Fo(command.)390 3968 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g(options)h Fi(autowrite)d Fo(and)i Fi(writeany)p Fo(.)38 b(None.)3290 4157 y([Command])-3600 b Fh([range])54 b(p[rint])48 b Fe([)p Fg(coun)m(t)p Fe(])31 b([)p Fg(\015ags)p Fe(])390 4266 y Fo(Displa)m(y)h(the)e(sp)s(eci\014ed)g(lines.)390 4429 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(displa)m(y)m(ed.) 390 4590 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(list)g Fo(and)f Fi(number)g Fo(option.)3290 4779 y([Command])-3600 b Fh([line])54 b(pu[t])47 b Fe([)p Fg(bu\013er)p Fe(])390 4889 y Fo(App)s(end)34 b(bu\013er)h(con)m(ten)m(ts)i(to)g(the)f(curren) m(t)f(line.)58 b(If)35 b(a)h(bu\013er)f(is)h(sp)s(eci\014ed,)h(its)f (con)m(ten)m(ts)i(are)390 4998 y(app)s(ended)29 b(to)i(the)f(line,)h (otherwise,)g(the)g(con)m(ten)m(ts)h(of)f(the)f(unnamed)f(bu\013er)g (are)i(used.)390 5161 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(after)g (the)f(curren)m(t)h(line.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 56 59 TeXDict begin 56 58 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(56)3290 299 y([Command])-3600 b Fh(q[uit][!])390 408 y Fo(End)23 b(the)h(editing)h(session.)39 b(If)23 b(the)i(\014le)f(has)g(b)s(een)f(mo)s(di\014ed)g(since)h(the)g (last)h(complete)h(write,)g(the)390 518 y Fn(quit)k Fo(command)g(will)g (fail.)41 b(This)30 b(c)m(hec)m(k)h(ma)m(y)g(b)s(e)e(o)m(v)m(erridden)h (b)m(y)g(app)s(ending)e(a)j(\\)p Fi(!)p Fo(")f(c)m(haracter)390 628 y(to)h(the)g(command.)390 873 y(If)c(there)h(are)g(more)f(\014les)h (to)g(edit,)h(the)e Fn(quit)h Fo(command)f(will)h(fail.)41 b(App)s(ending)25 b(a)j(\\)p Fi(!)p Fo(")g(c)m(haracter)390 982 y(to)k(the)e(command)h(name)g(or)g(en)m(tering)g(t)m(w)m(o)h Fn(quit)f Fo(commands)g(\(i.e.)43 b Fn(wq)p Fo(,)30 b Fn(quit)p Fo(,)i Fn(xit)f Fo(or)g Fn(ZZ)p Fo(\))f(in)h(a)390 1092 y(ro)m(w\))g(will)g(o)m(v)m(erride)g(this)f(c)m(hec)m(k)i(and)e (the)h(editor)f(will)h(exit.)390 1253 y(Line:)282 b(Unc)m(hanged.)390 1413 y(Options:)141 b(None.)3290 1600 y([Command])-3600 b Fh([line])54 b(r[ead][!])48 b Fe([)p Fg(\014le)p Fe(])390 1709 y Fo(Read)30 b(a)h(\014le.)40 b(A)31 b(cop)m(y)f(of)h(the)f(sp)s (eci\014ed)f(\014le)h(is)g(app)s(ended)f(to)h(the)h(line.)41 b(If)29 b Fi(line)p Fo(is)g(0,)i(the)f(cop)m(y)390 1819 y(is)e(inserted)g(at)h(the)f(b)s(eginning)f(of)h(the)g(\014le.)40 b(If)28 b(no)g(\014le)g(is)g(sp)s(eci\014ed,)g(the)g(curren)m(t)g (\014le)g(is)g(read;)h(if)390 1928 y(there)k(is)f(no)g(curren)m(t)g (\014le,)i(then)e Fi(file)p Fo(b)s(ecomes)f(the)i(curren)m(t)f(\014le.) 47 b(If)31 b(there)i(is)f(no)h(curren)m(t)f(\014le)390 2038 y(and)e(no)g Fi(file)p Fo(is)f(sp)s(eci\014ed,)h(then)g(the)h Fn(read)f Fo(command)g(will)h(fail.)390 2283 y(If)h Fi(file)p Fo(is)f(preceded)h(b)m(y)h(a)f(\\)p Fi(!)p Fo(")h(c)m(haracter,)i Fi(file)p Fo(is)c(treated)j(as)e(if)h(it)g(w)m(ere)g(a)f(shell)h (command,)390 2393 y(and)43 b(passed)h(to)h(the)f(program)g(named)f(b)m (y)h(the)h Fi(shell)d Fo(edit)j(option.)82 b(The)43 b(standard)h(and) 390 2502 y(standard)27 b(error)g(outputs)g(of)h(that)h(command)e(are)h (read)g(in)m(to)g(the)g(\014le)g(after)g(the)g(sp)s(eci\014ed)f(line.) 390 2612 y(The)38 b(sp)s(ecial)h(meaning)g(of)g(the)g(\\)p Fi(!)p Fo(")g(c)m(haracter)h(can)f(b)s(e)f(o)m(v)m(erridden)h(b)m(y)g (escaping)g(it)g(with)g(a)390 2721 y(bac)m(kslash)31 b(\\)p Fi(\\e)p Fo(")g(c)m(haracter.)390 2882 y(Line:)282 b(When)24 b(executed)h(from)e Fn(ex)p Fo(,)j(the)e(curren)m(t)g(line)g (is)g(set)h(to)f(the)h(last)f(line)h(read.)38 b(When)870 2992 y(executed)31 b(from)f Fn(vi)p Fo(,)h(the)g(curren)m(t)f(line)g (is)h(set)g(to)g(the)f(\014rst)g(line)h(read.)390 3152 y(Options:)141 b(None.)3290 3338 y([Command])-3600 b Fh(rec[over])48 b Fg(\014le)390 3448 y Fo(Reco)m(v)m(er)c Fi(file)p Fo(if)c(it)j(w)m(as)f(previously)f(sa)m(v)m(ed.)76 b(If)41 b(no)h(sa)m(v)m(ed)h(\014le)f(b)m(y)f(that)i(name)e(exists,)46 b(the)390 3558 y Fn(reco)m(v)m(er)33 b Fo(command)d(b)s(eha)m(v)m(es)h (equiv)-5 b(alen)m(tly)32 b(to)f(the)f Fn(edit)h Fo(command.)390 3719 y(Line:)282 b(Set)31 b(as)f(describ)s(ed)f(for)i(the)f Fn(edit)h Fo(command.)390 3879 y(Options:)141 b(None.)3290 4065 y([Command])-3600 b Fh(res[ize])48 b Fe([)p Fh(+|)p Fg(-)p Fe(])p Fg(size)390 4175 y Fn(Vi)25 b Fo(mo)s(de)g(only)-8 b(.)39 b(Gro)m(w)26 b(or)f(shrink)e(the)j(curren)m(t)e(screen.)40 b(If)24 b Fi(size)p Fo(is)g(a)i(p)s(ositiv)m(e,)h(signed)e(n)m(um)m(b)s (er,)390 4284 y(the)31 b(curren)m(t)f(screen)g(is)h(gro)m(wn)f(b)m(y)h (that)g(man)m(y)f(lines.)42 b(If)29 b Fi(size)p Fo(is)h(a)h(negativ)m (e,)i(signed)d(n)m(um)m(b)s(er,)390 4394 y(the)38 b(curren)m(t)g (screen)h(is)f(shrunk)e(b)m(y)i(that)h(man)m(y)f(lines.)64 b(If)38 b Fi(size)p Fo(is)f(not)i(signed,)h(the)e(curren)m(t)390 4504 y(screen)30 b(is)h(set)g(to)g(the)f(sp)s(eci\014ed)g Fi(size)p Fo(.)40 b(Applicable)31 b(only)f(to)h(split)g(screens.)390 4665 y(Line:)282 b(Unc)m(hanged.)390 4825 y(Options:)141 b(None.)3290 5011 y([Command])-3600 b Fh(rew[ind][!])390 5121 y Fo(Rewind)23 b(the)i(argumen)m(t)f(list.)39 b(If)24 b(the)g(curren)m(t)g(\014le)h(has)e(b)s(een)h(mo)s(di\014ed)f(since)h (the)g(last)h(complete)390 5230 y(write,)j(the)e Fn(rewind)g Fo(command)g(will)h(fail.)40 b(This)25 b(c)m(hec)m(k)j(ma)m(y)f(b)s(e)f (o)m(v)m(erridden)h(b)m(y)f(app)s(ending)f(the)390 5340 y(\\)p Fi(!)p Fo(")31 b(c)m(haracter)h(to)f(the)g(command.)p eop end %%Page: 57 60 TeXDict begin 57 59 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(57)390 299 y(Otherwise,)30 b(the)h(curren)m(t)f(\014le)g(is)h(set)g(to)g(the)g(\014rst)e(\014le)i (in)f(the)g(argumen)m(t)h(list.)390 460 y(Line:)282 b(Set)31 b(as)f(describ)s(ed)f(for)i(the)f Fn(edit)h Fo(command.)390 620 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)3290 806 y([Command])-3600 b Fh(se[t])47 b Fe([)p Fg(option)p Fe([)p Fg(=)p Fe([)p Fg(v)-5 b(alue)p Fe(]])31 b Fg(...)p Fe(])41 b([)p Fg(no)s(option)30 b(...)p Fe(])41 b([)p Fg(option?)g(...)p Fe(])g([)p Fg(all)p Fe(])390 916 y Fo(Displa)m(y)e(or)g(set)f(editor)h(options.)65 b(When)38 b(no)g(argumen)m(ts)h(are)f(sp)s(eci\014ed,)i(the)f(editor)f (option)390 1026 y Fi(term)p Fo(,)22 b(and)g(an)m(y)g(editor)g(options) g(whose)f(v)-5 b(alues)22 b(ha)m(v)m(e)h(b)s(een)e(c)m(hanged)h(from)f (the)h(default)g(settings)390 1135 y(are)33 b(displa)m(y)m(ed.)47 b(If)32 b(the)g(argumen)m(t)h Fi(all)p Fo(is)e(sp)s(eci\014ed,)i(the)f (v)-5 b(alues)33 b(of)f(all)i(of)e(editor)h(options)g(are)390 1245 y(displa)m(y)m(ed.)390 1490 y(Sp)s(ecifying)40 b(an)f(option)i (name)f(follo)m(w)m(ed)i(b)m(y)e(the)g(c)m(haracter)h(\\)p Fi(?)p Fo(")g(causes)f(the)h(curren)m(t)e(v)-5 b(alue)390 1600 y(of)42 b(that)h(option)f(to)h(b)s(e)f(displa)m(y)m(ed.)76 b(The)42 b(\\)p Fi(?)p Fo(")g(can)h(b)s(e)e(separated)i(from)e(the)h (option)h(name)390 1709 y(b)m(y)g(whitespace)h(c)m(haracters.)81 b(The)43 b(\\)p Fi(?)p Fo(")h(is)f(necessary)h(only)f(for)g(Bo)s(olean) i(v)-5 b(alued)43 b(options.)390 1819 y(Bo)s(olean)34 b(options)f(can)h(b)s(e)e(giv)m(en)i(v)-5 b(alues)33 b(b)m(y)g(the)g(form)f(\\)p Fi(set)e(option)p Fo(")i(to)i(turn)d(them)i (on,)h(or)390 1928 y(\\)p Fi(set)c(nooption)p Fo(")37 b(to)i(turn)e(them)i(o\013.)65 b(String)38 b(and)g(n)m(umeric)g (options)h(can)g(b)s(e)e(assigned)i(b)m(y)390 2038 y(the)28 b(form)f(\\)p Fi(set)j(option=value)p Fo(".)37 b(An)m(y)28 b(whitespace)g(c)m(haracters)h(in)e(strings)h(can)g(b)s(e)f(included) 390 2147 y(literally)f(b)m(y)d(preceding)h(eac)m(h)h(with)f(a)g(bac)m (kslash.)40 b(More)24 b(than)g(one)g(option)h(can)f(b)s(e)f(set)h(or)g (listed)390 2257 y(b)m(y)30 b(a)g(single)h(set)f(command,)h(b)m(y)e(sp) s(ecifying)h(m)m(ultiple)h(argumen)m(ts,)g(eac)m(h)g(separated)f(from)g (the)390 2367 y(next)h(b)m(y)f(whitespace)h(c)m(haracters.)390 2528 y(Line:)282 b(Unc)m(hanged.)390 2688 y(Options:)141 b(None.)3290 2874 y([Command])-3600 b Fh(sh[ell])390 2984 y Fo(Run)26 b(the)h(shell)g(program.)40 b(The)26 b(program)h(named)f(b)m(y)h(the)h Fi(shell)d Fo(option)j(is)f(run)e (with)i(a)g Fn(-i)h Fo(\(for)390 3093 y(in)m(teractiv)m(e\))34 b(\015ag.)41 b(Editing)30 b(is)h(resumed)e(when)g(that)i(program)f (exits.)390 3254 y(Line:)282 b(Unc)m(hanged.)390 3415 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(shell)f Fo(option.)3290 3601 y([Command])-3600 b Fh(so[urce])48 b Fg(\014le)390 3711 y Fo(Read)31 b(and)e(execute)j Fn(ex)f Fo(commands)f(from)g(a)g(\014le.)41 b Fn(Source)31 b Fo(commands)f(ma)m(y)h(b)s(e)e(nested.)390 3871 y(Line:)282 b(Unc)m(hanged.)390 4032 y(Options:)141 b(None.)3290 4218 y([Command])-3600 b Fh([range])54 b(s[ubstitute])c Fe([)p Fg(/pattern/replace/)p Fe(])32 b([)p Fg(options)p Fe(])f([)p Fg(coun)m(t)p Fe(])f([)p Fg(\015ags)p Fe(])3290 4328 y Fo([Command])-3600 b Fh([range])54 b(&)46 b Fe([)p Fg(options)p Fe(])31 b([)p Fg(coun)m(t)p Fe(])f([)p Fg(\015ags)p Fe(])3290 4437 y Fo([Command])-3600 b Fh([range])54 b(~)46 b Fe([)p Fg(options)p Fe(])31 b([)p Fg(coun)m(t)p Fe(])f([)p Fg(\015ags)p Fe(])390 4547 y Fo(Mak)m(e)j(substitutions.)43 b(Replace)32 b(the)g(\014rst)e(instance)i(of)f Fi(pattern)p Fo(with)e(the)j(string)f Fi(replace)p Fo(on)390 4657 y(the)56 b(sp)s(eci\014ed)f(line\(s\).)117 b(If)55 b(the)g(\\)p Fi(/pattern/repl/)p Fo(")e(argumen)m(t)j(is)g(not)f(sp)s(eci\014ed,)62 b(the)390 4766 y(\\)p Fi(/pattern/repl/)p Fo(")36 b(from)j(the)h (previous)f Fn(substitute)h Fo(command)f(is)h(used.)67 b(An)m(y)39 b(c)m(haracter)390 4876 y(other)e(than)f(an)g(alphab)s (etic,)j(n)m(umeric,)f Fi(<)p Fo(blank)p Fi(>)e Fo(or)h(bac)m(kslash)g (c)m(haracter)h(ma)m(y)f(b)s(e)f(used)g(as)390 4985 y(the)31 b(delimiter.)390 5230 y(If)36 b Fi(options)p Fo(includes)f(the)i (letter)h(\\)p Fi(c)p Fo(")f(\(con\014rm\),)i(y)m(ou)e(will)g(b)s(e)f (prompted)g(for)h(con\014rmation)390 5340 y(b)s(efore)23 b(eac)m(h)h(replacemen)m(t)h(is)e(done.)39 b(An)22 b(a\016rmativ)m(e)j (resp)s(onse)e(\(in)g(English,)h(a)g(\\)p Fi(y)p Fo(")g(c)m(haracter\)) p eop end %%Page: 58 61 TeXDict begin 58 60 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(58)390 299 y(causes)38 b(the)g(replacemen)m (t)h(to)f(b)s(e)f(made.)63 b(A)38 b(quit)f(resp)s(onse)g(\(in)g (English,)j(a)e(\\)p Fi(q)p Fo(")g(c)m(haracter\))390 408 y(causes)31 b(the)g Fn(substitute)g Fo(command)g(to)h(b)s(e)e (terminated.)42 b(An)m(y)31 b(other)g(resp)s(onse)f(causes)i(the)f(re-) 390 518 y(placemen)m(t)23 b(not)f(to)g(b)s(e)f(made,)j(and)c(the)i Fn(substitute)g Fo(command)f(con)m(tin)m(ues.)39 b(If)21 b Fi(options)p Fo(includes)390 628 y(the)h(letter)h(\\)p Fi(g)p Fo(")g(\(global\),)j(all)d(nono)m(v)m(erlapping)f(instances)h (of)f Fi(pattern)p Fo(in)d(the)k(line)f(are)g(replaced.)390 870 y(The)36 b Fn(&)h Fo(v)m(ersion)g(of)h(the)f(command)g(is)g(the)g (same)g(as)g(not)g(sp)s(ecifying)g(a)h(pattern)f(or)g(replace-)390 979 y(men)m(t)c(string)g(to)g(the)g Fn(substitute)g Fo(command,)g(and)f (the)h(\\)p Fi(&)p Fo(")g(is)f(replaced)i(b)m(y)e(the)h(pattern)g(and) 390 1089 y(replacemen)m(t)f(information)f(from)e(the)i(previous)f (substitute)g(command.)390 1331 y(The)d Fi(~)g Fo(v)m(ersion)g(of)h (the)f(command)g(is)g(the)h(same)g(as)f Fn(&)g Fo(and)g Fn(s)p Fo(,)g(except)i(that)f(the)f(searc)m(h)h(pattern)390 1440 y(used)35 b(is)h(the)g(last)h(RE)e(used)h(in)f Fp(any)45 b Fo(command,)37 b(not)f(necessarily)h(the)f(one)g(used)f(in)h(the)g (last)390 1550 y Fn(substitute)31 b Fo(command.)390 1792 y(F)-8 b(or)31 b(example,)g(in)g(the)f(sequence)630 1924 y Fi(s/red/blue/)630 2034 y(/green)630 2144 y(~)390 2276 y Fo(the)h(\\)p Fi(~)p Fo(")g(is)f(equiv)-5 b(alen)m(t)32 b(to)f(\\)p Fi(s/green/blue/)p Fo(".)390 2518 y(The)c Fn(substitute)g Fo(command)h(ma)m(y)g(b)s(e)e(in)m(terrupted,)i(using)f (the)g(terminal)h(in)m(terrupt)f(c)m(haracter.)390 2628 y(All)k(substitutions)f(completed)h(b)s(efore)f(the)h(in)m(terrupt)f (are)g(retained.)390 2783 y(Line:)282 b(Set)31 b(to)g(the)f(last)h (line)g(up)s(on)e(whic)m(h)h(a)h(substitution)f(w)m(as)h(made.)390 2938 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(ignorecase)e Fo(and)i Fi(magic)f Fo(option.)3290 3116 y([Command])-3600 b Fh(su[spend][!])3290 3226 y Fo([Command])g Fh(st[op][!])3290 3335 y Fo([Comamnd])g Fh()390 3445 y Fo(Susp)s(end)34 b(the)j(edit)g(session.)60 b(App)s(ending)35 b(a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)g(these)f(commands)f(turns)g(o\013)390 3555 y(the)31 b Fi(autowrite)c Fo(option)k(for)f(the)h(command.)390 3710 y(Line:)282 b(Unc)m(hanged.)390 3865 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)3290 4043 y([Command])-3600 b Fh(ta[g][!])48 b Fg(tagstring)390 4153 y Fo(Edit)28 b(the)h(\014le)f(con)m(taining)i(the)f(sp)s(eci\014ed)f(tag.)41 b(If)28 b(the)h(tag)g(is)g(in)f(a)h(di\013eren)m(t)g(\014le,)g(then)f (the)g(new)390 4262 y(\014le)33 b(is)f(edited.)48 b(If)32 b(the)g(curren)m(t)h(\014le)f(has)g(b)s(een)g(mo)s(di\014ed)f(since)i (the)g(last)g(complete)h(write,)g(the)390 4372 y Fn(tag)c Fo(command)e(will)h(fail.)41 b(This)28 b(c)m(hec)m(k)i(can)f(b)s(e)f(o) m(v)m(erridden)h(b)m(y)f(app)s(ending)f(the)i(\\)p Fi(!)p Fo(")g(c)m(haracter)390 4482 y(to)i(the)g(command)f(name.)390 4724 y(The)41 b Fn(tag)i Fo(command)e(searc)m(hes)h(for)g Fi(tagstring)p Fo(in)d(the)i(tags)i(\014le\(s\))f(sp)s(eci\014ed)f(b)m (y)g(the)h Fi(tags)390 4833 y Fo(option.)f(\(See)31 b Fi(ctags)p Fo(\(1\))f(for)g(more)h(information)g(on)f(tags)h (\014les.\))390 5075 y(Capitalizing)i(the)e(\014rst)f(letter)i(of)f (the)g(command,)g(i.e.)43 b Fn(T)-8 b(ag)p Fo(,)33 b(while)e(in)f Fn(vi)h Fo(mo)s(de,)g(will)g(edit)h(the)390 5185 y(\014le)e(in)h(a)f (new)g(screen.)41 b(In)30 b(this)g(case,)i(an)m(y)e(mo)s(di\014cations) h(to)g(the)g(curren)m(t)f(\014le)g(are)h(ignored.)390 5340 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(indicated)g(b)m(y)f(the)h (tag.)p eop end %%Page: 59 62 TeXDict begin 59 61 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(59)390 299 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)p Fo(,)f Fi(taglength)p Fo(,)f Fi(tags)h Fo(and)h Fi(writeany)e Fo(options.)3290 468 y([Command])-3600 b Fh(tagn[ext][!])390 578 y Fo(Edit)36 b(the)h(\014le)g(con)m(taining)h(the)e(next)h(con)m(text)h(for)f(the)f (curren)m(t)h(tag.)60 b(If)36 b(the)h(con)m(text)h(is)e(in)h(a)390 687 y(di\013eren)m(t)f(\014le,)g(then)f(the)h(new)e(\014le)h(is)h (edited.)55 b(If)35 b(the)g(curren)m(t)g(\014le)g(has)g(b)s(een)g(mo)s (di\014ed)f(since)390 797 y(the)28 b(last)g(complete)h(write,)g(the)e Fn(tagnext)i Fo(command)f(will)g(fail.)40 b(This)27 b(c)m(hec)m(k)i (can)f(b)s(e)f(o)m(v)m(erridden)390 907 y(b)m(y)j(app)s(ending)f(the)i (\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)f(the)f(command)g(name.)390 1146 y(Capitalizing)h(the)f(\014rst)f(letter)i(of)e(the)h(command,)g (i.e.)41 b Fn(T)-8 b(agnext)p Fo(,)32 b(while)d(in)g Fn(vi)h Fo(mo)s(de,)g(will)f(edit)390 1255 y(the)e(\014le)f(in)g(a)h (new)f(screen.)39 b(In)26 b(this)g(case,)j(an)m(y)e(mo)s(di\014cations) f(to)h(the)g(curren)m(t)f(\014le)h(are)g(ignored.)390 1405 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(indicated)g(b)m(y)f(the)h (tag.)390 1554 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)3290 1723 y([Command])-3600 b Fh(tagp[op][!])49 b Fe([)p Fg(\014le)30 b Fh(|)h Fg(n)m(um)m(b)s(er)p Fe(])390 1833 y Fo(P)m(op)j(to)h(the)g (sp)s(eci\014ed)e(tag)j(in)e(the)g(tags)h(stac)m(k.)54 b(If)34 b(neither)g Fi(file)p Fo(or)f Fi(number)p Fo(is)g(sp)s (eci\014ed,)i(the)390 1943 y Fn(tagp)s(op)26 b Fo(command)g(p)s(ops)f (to)i(the)f(most)h(recen)m(t)g(en)m(try)f(on)g(the)h(tags)g(stac)m(k.) 41 b(If)25 b Fi(file)p Fo(or)h Fi(number)p Fo(is)390 2052 y(sp)s(eci\014ed,)37 b(the)g Fn(tagp)s(op)f Fo(command)g(p)s(ops)f (to)i(the)f(most)g(recen)m(t)i(en)m(try)e(in)g(the)g(tags)i(stac)m(k)f (for)390 2162 y(that)26 b(\014le,)g(or)g(n)m(um)m(b)s(ered)e(en)m(try)h (in)g(the)h(tags)g(stac)m(k,)i(resp)s(ectiv)m(ely)-8 b(.)41 b(\(See)25 b(the)h Fn(displa)m(y)f Fo(command)390 2271 y(for)30 b(information)h(on)f(displa)m(ying)h(the)f(tags)i(stac)m (k.\))390 2510 y(If)e(the)i(\014le)f(has)f(b)s(een)h(mo)s(di\014ed)e (since)j(the)f(last)h(complete)g(write,)g(the)f Fn(tagp)s(op)g Fo(command)g(will)390 2620 y(fail.)59 b(This)36 b(c)m(hec)m(k)h(ma)m(y) g(b)s(e)f(o)m(v)m(erridden)g(b)m(y)g(app)s(ending)f(a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)f(the)f(command)390 2730 y(name.)390 2879 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(indicated)g (b)m(y)f(the)h(tag.)390 3029 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)3290 3198 y([Command])-3600 b Fh(tagp[rev][!])390 3307 y Fo(Edit)32 b(the)g(\014le)g(con)m(taining)i(the)e(previous)g (con)m(text)i(for)d(the)i(curren)m(t)e(tag.)47 b(If)32 b(the)g(con)m(text)i(is)e(in)390 3417 y(a)f(di\013eren)m(t)g(\014le,)h (then)e(the)h(new)f(\014le)h(is)g(edited.)42 b(If)30 b(the)h(curren)m(t)g(\014le)f(has)h(b)s(een)f(mo)s(di\014ed)g(since)390 3527 y(the)d(last)i(complete)f(write,)h(the)e Fn(tagprev)h Fo(command)f(will)h(fail.)40 b(This)27 b(c)m(hec)m(k)i(can)e(b)s(e)g(o) m(v)m(erridden)390 3636 y(b)m(y)j(app)s(ending)f(the)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)f(the)f(command)g(name.)390 3875 y(Capitalizing)h(the)e(\014rst)g(letter)i(of)e(the)g(command,)h (i.e.)41 b Fn(T)-8 b(agprev)p Fo(,)31 b(while)e(in)g Fn(vi)h Fo(mo)s(de,)f(will)g(edit)390 3985 y(the)e(\014le)f(in)g(a)h (new)f(screen.)39 b(In)26 b(this)g(case,)j(an)m(y)e(mo)s(di\014cations) f(to)h(the)g(curren)m(t)f(\014le)h(are)g(ignored.)390 4134 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(indicated)g(b)m(y)f(the)h (tag.)390 4284 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)3290 4453 y([Command])-3600 b Fh(tagt[op][!])390 4563 y Fo(P)m(op)31 b(to)g(the)f(least)i(recen)m(t)f(tag)h(on)e(the)h(tags)g(stac)m(k,)h (clearing)g(the)e(tags)i(stac)m(k.)390 4802 y(If)g(the)g(\014le)g(has)g (b)s(een)g(mo)s(di\014ed)f(since)h(the)h(last)g(complete)g(write,)h (the)e Fn(tagtop)i Fo(command)e(will)390 4911 y(fail.)59 b(This)36 b(c)m(hec)m(k)h(ma)m(y)g(b)s(e)f(o)m(v)m(erridden)g(b)m(y)g (app)s(ending)f(a)i(\\)p Fi(!)p Fo(")g(c)m(haracter)h(to)f(the)f (command)390 5021 y(name.)390 5170 y(Line:)282 b(Set)31 b(to)g(the)f(line)h(indicated)g(b)m(y)f(the)h(tag.)390 5320 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(autowrite)e Fo(and)i Fi(writeany)e Fo(options.)p eop end %%Page: 60 63 TeXDict begin 60 62 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(60)3290 299 y([Command])-3600 b Fh(una[bbrev])48 b Fg(lhs)390 408 y Fo(Delete)33 b(an)d (abbreviation.)41 b(Delete)33 b Fi(lhs)p Fo(from)c(the)h(curren)m(t)h (list)g(of)f(abbreviations.)390 581 y(Line:)282 b(Unc)m(hanged.)390 748 y(Options:)141 b(None.)3290 950 y([Command])-3600 b Fh(u[ndo])390 1059 y Fo(Undo)33 b(the)h(last)h(c)m(hange)f(made)g(to) h(the)f(\014le.)50 b(Changes)34 b(made)f(b)m(y)h Fn(global)p Fo(,)i Fn(v)p Fo(,)f Fn(visual)e Fo(and)g(map)390 1169 y(sequences)h(are)g(considered)f(a)h(single)h(command.)50 b(If)33 b(rep)s(eated,)i(the)f Fn(u)f Fo(command)g(alternates)390 1279 y(b)s(et)m(w)m(een)e(these)g(t)m(w)m(o)h(states,)f(and)f(is)h(its) f(o)m(wn)h(in)m(v)m(erse.)390 1451 y(Line:)282 b(Set)31 b(to)g(the)f(last)h(line)g(mo)s(di\014ed)e(b)m(y)i(the)f(command.)390 1619 y(Options:)141 b(None.)3290 1820 y([Command])-3600 b Fh(unm[ap][!])48 b Fg(lhs)390 1929 y Fo(Unmap)38 b(a)g(mapp)s(ed)f (string.)65 b(Delete)41 b(the)d(command)h(mo)s(de)e(map)i(de\014nition) f(for)g Fi(lhs)p Fo(.)64 b(If)38 b(a)390 2039 y(\\)p Fi(!)p Fo(")f(c)m(haracter)g(is)f(app)s(ended)e(to)j(the)f(command)g (name,)h(delete)h(the)e(text)h(input)e(mo)s(de)g(map)390 2149 y(de\014nition)30 b(instead.)390 2321 y(Line:)282 b(Unc)m(hanged.)390 2489 y(Options:)141 b(None.)3290 2690 y([Command])-3600 b Fh(ve[rsion])390 2800 y Fo(Displa)m(y)32 b(the)e(v)m(ersion)h(of)f(the)h Fn(ex/vi)g Fo(editor.)3290 3001 y([Command])-3600 b Fh([line])54 b(vi[sual])48 b Fe([)p Fg(t)m(yp)s(e)p Fe(])30 b([)p Fg(coun)m(t)p Fe(])h([)p Fg(\015ags)p Fe(])390 3110 y Fn(Ex)39 b Fo(mo)s(de)g(only)-8 b(.)68 b(En)m(ter)40 b Fn(vi)p Fo(.)68 b(The)39 b Fi(type)p Fo(is)g(optional,)k(and)38 b(can)i(b)s(e)f(\\)p Fi(-)p Fo(",)k(\\)p Fi(+)p Fo(")d(or)f(\\)p Fi(^)p Fo(",)k(as)c(in)390 3220 y(the)30 b Fn(ex)h(z)f Fo(command,)h(to)g(sp)s(ecify)e(the)i(p)s (osition)f(of)g(the)h(sp)s(eci\014ed)e(line)i(in)f(the)g(screen)g (windo)m(w.)390 3330 y(\(The)j(default)g(is)g(to)h(place)g(the)f(line)h (at)g(the)f(top)g(of)g(the)h(screen)f(windo)m(w.\))48 b(A)34 b Fi(count)p Fo(sp)s(eci\014es)390 3439 y(the)g(n)m(um)m(b)s(er) f(of)h(lines)g(that)g(will)h(initially)g(b)s(e)e(displa)m(y)m(ed.)52 b(\(The)34 b(default)g(is)g(the)g(v)-5 b(alue)35 b(of)f(the)390 3549 y Fi(window)29 b Fo(editor)i(option.\))390 3721 y(Line:)282 b(Unc)m(hanged)31 b(unless)e Fi(line)p Fo(is)h(sp)s (eci\014ed,)g(in)g(whic)m(h)g(case)h(it)g(is)g(set)f(to)i(that)f(line.) 390 3889 y(Options:)141 b(None.)3290 4090 y([Command])-3600 b Fh(vi[sual][!])49 b Fe([)p Fh(+)p Fg(cmd)p Fe(])30 b([)p Fg(\014le)p Fe(])390 4200 y Fn(Vi)e Fo(mo)s(de)f(only)-8 b(.)41 b(Edit)28 b(a)g(new)g(\014le.)40 b(Iden)m(tical)29 b(to)g(the)f(\\)p Fi(edit[!])h([+cmd])f([file])p Fo(")f(command.)390 4452 y(Capitalizing)38 b(the)f(\014rst)f(letter)h(of)g(the)g(command,)h (i.e.)60 b Fn(Visual)p Fo(,)37 b(will)g(edit)g(the)g(\014le)f(in)h(a)f (new)390 4562 y(screen.)41 b(In)29 b(this)i(case,)g(an)m(y)g(mo)s (di\014cations)g(to)g(the)f(curren)m(t)h(\014le)f(are)h(ignored.)3290 4763 y([Command])-3600 b Fh(viu[sage])48 b Fe([)p Fg(command)p Fe(])390 4873 y Fo(Displa)m(y)35 b(usage)g(for)f(a)g Fn(vi)g Fo(command.)52 b(If)34 b Fi(command)p Fo(is)e(sp)s(eci\014ed,)i (a)h(usage)g(statemen)m(t)g(for)f(that)390 4982 y(command)20 b(is)g(displa)m(y)m(ed.)38 b(Otherwise,)23 b(usage)e(statemen)m(ts)h (for)e(all)h Fn(vi)f Fo(commands)g(are)h(displa)m(y)m(ed.)390 5154 y(Line:)282 b(Unc)m(hanged.)390 5322 y(Options:)141 b(None.)p eop end %%Page: 61 64 TeXDict begin 61 63 bop 150 -116 a Fo(Chapter)30 b(17:)41 b(Ex)31 b(Commands)2412 b(61)3290 299 y([Command])-3600 b Fh([range])54 b(w[rite][!])49 b Fe([)p Fh(>>)p Fe(])31 b([)p Fg(\014le)p Fe(])3290 408 y Fo([Command])-3600 b Fh([range])54 b(w[rite])48 b Fe([)p Fg(!)p Fe(])40 b([)p Fg(\014le)p Fe(])3290 518 y Fo([Command])-3600 b Fh([range])54 b(wn[!])47 b Fe([)p Fh(>>)p Fe(])31 b([)p Fg(\014le)p Fe(])3290 628 y Fo([Command])-3600 b Fh([range])54 b(wq[!])47 b Fe([)p Fh(>>)p Fe(])31 b([)p Fg(\014le)p Fe(])390 737 y Fo(W)-8 b(rite)36 b(the)f(\014le.)53 b(The)34 b(sp)s(eci\014ed)g(lines)h(\(the)g(en)m(tire)h(\014le,)f(if)g(no)f (range)h(is)g(giv)m(en\))h(is)f(written)f(to)390 847 y Fi(file)p Fo(.)k(If)25 b Fi(file)p Fo(is)g(not)h(sp)s(eci\014ed,)g (the)g(curren)m(t)f(pathname)h(is)g(used.)38 b(If)25 b Fi(file)p Fo(is)g(sp)s(eci\014ed,)h(and)f(it)390 956 y(exists,)i(or)e(if)g(the)g(curren)m(t)g(pathname)g(w)m(as)h(set)f (using)g(the)g Fn(\014le)g Fo(command,)h(and)f(the)g(\014le)g(already) 390 1066 y(exists,)35 b(these)e(commands)g(will)h(fail.)49 b(App)s(ending)32 b(a)h(\\)p Fi(!)p Fo(")h(c)m(haracter)h(to)f(the)f (command)g(name)390 1176 y(will)e(o)m(v)m(erride)g(this)f(c)m(hec)m(k)i (and)e(the)h(write)f(will)h(b)s(e)f(attempted,)h(regardless.)390 1425 y(Sp)s(ecifying)d(the)h(optional)g(\\)p Fi(>>)p Fo(")g(string)g(will)g(cause)g(the)f(write)h(to)g(b)s(e)f(app)s(ended)f (to)i(the)g(\014le,)g(in)390 1535 y(whic)m(h)h(case)i(no)e(tests)h(are) g(made)f(for)g(the)h(\014le)f(already)h(existing.)390 1784 y(If)d(the)g(\014le)g(is)g(preceded)g(b)m(y)g(a)g(\\)p Fi(!)p Fo(")h(c)m(haracter,)i(the)d(program)g(named)f(b)m(y)h(the)h (shell)f(edit)g(option)390 1894 y(is)44 b(in)m(v)m(ok)m(ed)h(with)e (\014le)h(as)g(its)g(second)g(argumen)m(t,)k(and)43 b(the)h(sp)s (eci\014ed)f(lines)h(are)g(passed)g(as)390 2003 y(standard)c(input)f (to)i(that)g(command.)70 b(The)40 b(\\)p Fi(!)p Fo(")h(in)f(this)h (usage)g(m)m(ust)f(b)s(e)g(separated)g(from)390 2113 y(command)26 b(name)g(b)m(y)g(at)h(least)h(one)e(whitespace)h(c)m (haracter.)41 b(The)26 b(sp)s(ecial)h(meaning)g(of)f(the)g(\\)p Fi(!)p Fo(")390 2222 y(ma)m(y)31 b(b)s(e)f(o)m(v)m(erridden)g(b)m(y)g (escaping)i(it)e(with)h(a)f(bac)m(kslash)h(\\)p Fi(\\e)p Fo(")g(c)m(haracter.)390 2472 y(The)39 b Fn(wq)f Fo(v)m(ersion)i(of)f (the)h(write)f(command)g(will)g(exit)h(the)g(editor)f(after)h(writing)f (the)g(\014le,)j(if)390 2581 y(there)33 b(are)f(no)h(further)e(\014les) h(to)h(edit.)48 b(App)s(ending)30 b(a)j(\\)p Fi(!)p Fo(")g(c)m (haracter)h(to)f(the)g(command)f(name)390 2691 y(or)26 b(en)m(tering)h(t)m(w)m(o)g(\\quit")g(commands)f(\(i.e.)41 b Fn(wq)p Fo(,)26 b Fn(quit)p Fo(,)i Fn(xit)e Fo(or)g Fn(ZZ)p Fo(\))g(in)g(a)g(ro)m(w\))g(will)h(o)m(v)m(erride)g(this)390 2801 y(c)m(hec)m(k)32 b(and)e(the)g(editor)h(will)g(exit,)g(ignoring)g (an)m(y)g(\014les)f(that)h(ha)m(v)m(e)h(not)e(y)m(et)i(b)s(een)e (edited.)390 3050 y(The)d Fn(wn)g Fo(v)m(ersion)i(of)f(the)g(write)g (command)f(will)h(mo)m(v)m(e)i(to)e(the)g(next)g(\014le)g(after)h (writing)f(the)g(\014le,)390 3160 y(unless)i(the)g(write)h(fails.)390 3327 y(Line:)282 b(Unc)m(hanged.)390 3492 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(readonly)f Fo(and)g Fi(writeany)f Fo(options.)3290 3687 y([Command])-3600 b Fh([range])54 b(x[it][!])48 b Fe([)p Fg(\014le)p Fe(])390 3796 y Fo(W)-8 b(rite)34 b(the)g(\014le)f(if)g(it)g(has)g(b)s(een)f(mo) s(di\014ed.)48 b(The)32 b(sp)s(eci\014ed)h(lines)g(are)g(written)g(to)h Fi(file)p Fo(,)f(if)g(the)390 3906 y(\014le)25 b(has)g(b)s(een)f(mo)s (di\014ed)g(since)i(the)f(last)h(complete)g(write)g(to)g(an)m(y)f (\014le.)39 b(If)25 b(no)g Fi(range)p Fo(is)e(sp)s(eci\014ed,)390 4015 y(the)31 b(en)m(tire)g(\014le)f(is)h(written.)390 4265 y(The)26 b Fn(xit)h Fo(command)g(will)g(exit)g(the)g(editor)g (after)g(writing)g(the)g(\014le,)h(if)e(there)h(are)g(no)g(further)e (\014les)390 4374 y(to)39 b(edit.)64 b(App)s(ending)37 b(a)h(\\)p Fi(!)p Fo(")h(c)m(haracter)h(to)f(the)f(command)g(name)g(or) g(en)m(tering)h(t)m(w)m(o)h(\\quit")390 4484 y(commands)30 b(\(i.e.)44 b Fn(wq)p Fo(,)31 b Fn(quit)p Fo(,)g Fn(xit)h Fo(or)e Fn(ZZ)p Fo(\))h(in)f(a)h(ro)m(w\))h(will)f(o)m(v)m(erride)h (this)f(c)m(hec)m(k)h(and)e(the)h(editor)390 4594 y(will)g(exit,)g (ignoring)g(an)m(y)g(\014les)f(that)h(ha)m(v)m(e)h(not)e(y)m(et)i(b)s (een)d(edited.)390 4761 y(Line:)282 b(Unc)m(hanged.)390 4926 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(readonly)f Fo(and)g Fi(writeany)f Fo(options.)3290 5121 y([Command])-3600 b Fh([range])54 b(ya[nk])48 b Fe([)p Fg(bu\013er)p Fe(])29 b([)p Fg(coun)m(t)p Fe(])390 5230 y Fo(Cop)m(y)35 b(the)g(sp)s (eci\014ed)f(lines)h(to)g(a)h(bu\013er.)53 b(If)34 b(no)h(bu\013er)e (is)i(sp)s(eci\014ed,)h(the)f(unnamed)e(bu\013er)h(is)390 5340 y(used.)p eop end %%Page: 62 65 TeXDict begin 62 64 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(62)390 299 y(Line:)282 b(Unc)m(hanged.)390 456 y(Options:)141 b(None.)3290 636 y([Command])-3600 b Fh([line])54 b(z)46 b Fe([)p Fg(t)m(yp)s(e)p Fe(])30 b([)p Fg(coun)m(t)p Fe(])h([)p Fg(\015ags)p Fe(])390 745 y Fo(Adjust)25 b(the)g(windo)m(w.)39 b(If)25 b(no)g Fi(type)p Fo(is)g(sp)s(eci\014ed,)h(then)f Fi(count)p Fo(lines)f(follo)m(wing)j(the)f(sp)s(eci\014ed)f(line)390 855 y(are)e(displa)m(y)m(ed.)38 b(The)22 b(default)g Fi(count)p Fo(is)f(the)i(v)-5 b(alue)22 b(of)h(the)f Fi(window)e Fo(option.)39 b(The)22 b Fi(type)p Fo(argumen)m(t)390 965 y(c)m(hanges)27 b(the)g(p)s(osition)g(at)g(whic)m(h)f Fi(line)p Fo(is)f(displa)m(y)m(ed)i(on)g(the)f(screen)h(b)m(y)f(c)m (hanging)i(the)e(n)m(um)m(b)s(er)390 1074 y(of)31 b(lines)f(displa)m(y) m(ed)h(b)s(efore)f(and)g(after)h Fi(line)p Fo(.)39 b(The)30 b(follo)m(wing)i Fi(type)p Fo(c)m(haracters)f(ma)m(y)g(b)s(e)e(used:) 390 1231 y(-)450 b(Place)32 b(the)e(line)h(at)g(the)g(b)s(ottom)f(of)h (the)f(screen.)390 1388 y Fi(+)432 b Fo(Place)32 b(the)e(line)h(at)g (the)g(top)f(of)h(the)f(screen.)390 1544 y(.)455 b(Place)32 b(the)e(line)h(in)f(the)h(middle)f(of)g(the)h(screen.)390 1701 y Fi(^)432 b Fo(W)-8 b(rite)34 b(out)f(coun)m(t)g(lines)g (starting)h Fi(count)29 b(*)h(2)p Fo(lines)i(b)s(efore)h Fi(line)p Fo(;)g(the)g(net)f(e\013ect)870 1811 y(of)23 b(this)g(is)g(that)g(a)h(\\)p Fi(z^)p Fo(")f(command)g(follo)m(wing)h (a)f Fn(z)h Fo(command)e(writes)h(the)g(previous)870 1920 y(page.)390 2077 y(=)409 b(Cen)m(ter)35 b Fi(line)p Fo(on)e(the)i(screen)f(with)g(a)h(line)g(of)f(h)m(yphens)g(displa)m(y)m (ed)h(immediately)870 2186 y(b)s(efore)d(and)g(after)h(it.)47 b(The)32 b(n)m(um)m(b)s(er)f(of)h(preceding)g(and)g(follo)m(wing)i (lines)e(of)h(text)870 2296 y(displa)m(y)m(ed)e(are)g(reduced)e(to)i (accoun)m(t)h(for)e(those)h(lines.)390 2453 y(Line:)282 b(Set)31 b(to)h(the)g(last)g(line)f(displa)m(y)m(ed,)i(with)e(the)g (exception)h(of)g(the)f(\\)p Fi(=)p Fo(")h Fi(type)p Fo(,)e(where)870 2562 y(the)h(curren)m(t)f(line)g(is)h(set)g(to)g(the)f (line)h(sp)s(eci\014ed)f(b)m(y)g(the)h(command.)390 2719 y(Options:)141 b(A\013ected)32 b(b)m(y)e(the)g Fi(scroll)f Fo(option.)150 2999 y Fl(18)80 b(Set)53 b(Options)150 3226 y Fo(There)42 b(are)g(a)h(large)g(n)m(um)m(b)s(er)d(of)j(options)f (that)h(ma)m(y)f(b)s(e)g(set)h(\(or)f(unset\))g(to)h(c)m(hange)g(the)f (editor's)150 3336 y(b)s(eha)m(vior.)f(This)29 b(section)j(describ)s (es)e(the)g(options,)h(their)f(abbreviations)h(and)f(their)h(default)f (v)-5 b(alues.)275 3469 y(In)27 b(eac)m(h)j(en)m(try)f(b)s(elo)m(w,)g (the)g(\014rst)f(part)g(of)h(the)g(tag)h(line)f(is)f(the)h(full)f(name) h(of)g(the)g(option,)g(follo)m(w)m(ed)150 3578 y(b)m(y)35 b(an)m(y)h(equiv)-5 b(alen)m(t)36 b(abbreviations.)56 b(\(Regardless)36 b(of)g(the)f(abbreviations,)i(it)f(is)f(only)h (necessary)f(to)150 3688 y(use)h(the)h(minim)m(um)e(n)m(um)m(b)s(er)h (of)g(c)m(haracters)i(necessary)f(to)g(distinguish)f(an)g(abbreviation) h(from)f(all)150 3798 y(other)k(commands)g(for)g(it)h(to)g(b)s(e)e (accepted,)45 b(in)40 b Fn(nex)p Fo(/)p Fn(n)m(vi)p Fo(.)70 b(Historically)-8 b(,)46 b(only)40 b(the)g(full)g(name)h(and)150 3907 y(the)e(o\016cial)i(abbreviations)e(w)m(ere)h(accepted)g(b)m(y)f Fn(ex)p Fo(/)p Fn(vi)p Fo(.)68 b(Using)39 b(full)g(names)g(in)f(y)m (our)h(startup)g(\014les)150 4017 y(and)31 b(en)m(vironmen)m(tal)j(v)-5 b(ariables)33 b(will)f(probably)f(mak)m(e)i(them)f(more)h(p)s (ortable.\))46 b(The)31 b(part)h(in)g(square)150 4126 y(brac)m(k)m(ets)j(is)f(the)g(default)g(v)-5 b(alue)34 b(of)g(the)g(option.)52 b(Most)35 b(of)e(the)h(options)h(are)f(b)s(o)s (olean,)h(i.e.)52 b(they)34 b(are)150 4236 y(either)d(on)f(or)g(o\013,) h(and)f(do)h(not)f(ha)m(v)m(e)i(an)e(asso)s(ciated)i(v)-5 b(alue.)275 4369 y(Options)29 b(apply)h(to)i(b)s(oth)d Fn(ex)i Fo(and)f Fn(vi)g Fo(mo)s(des,)g(unless)g(otherwise)h(sp)s (eci\014ed.)275 4502 y(With)j(a)g(few)g(exceptions,)i(all)f(options)f (are)g(settable)i(p)s(er)d(screen,)i(i.e.)52 b(the)34 b Fi(tags)f Fo(option)h(can)h(b)s(e)150 4612 y(set)i(di\013eren)m(tly)h (in)f(eac)m(h)h(screen.)60 b(The)36 b(exceptions)i(are)g(the)f Fi(columns)p Fo(,)f Fi(lines)p Fo(,)i Fi(secure)d Fo(and)h Fi(term)150 4721 y Fo(options.)41 b(Changing)30 b(these)h(options)g(mo) s(di\014es)e(the)i(resp)s(ectiv)m(e)g(information)g(for)f(all)h (screens.)275 4855 y(F)-8 b(or)39 b(information)f(on)h(mo)s(difying)f (the)g(options)h(or)g(to)g(displa)m(y)f(the)h(options)g(and)f(their)g (curren)m(t)150 4964 y(v)-5 b(alues,)31 b(see)g(the)f(\\set")i(command) e(in)h(the)f(section)i(en)m(titled)f(\\)p Fn(Ex)g(Commands)p Fo(")e(.)225 5097 y Fm(\017)60 b Fn(alt)m(w)m(erase)33 b([o\013)10 b(])330 5230 y(Vi)34 b Fo(only)-8 b(.)54 b(Change)35 b(ho)m(w)g Fn(vi)f Fo(do)s(es)h(w)m(ord)f(erase)h(during)e (text)j(input.)53 b(When)34 b(this)g(option)h(is)g(set,)330 5340 y(text)k(is)f(brok)m(en)g(up)f(in)m(to)i(three)g(classes:)57 b(alphab)s(etic,)41 b(n)m(umeric)c(and)h(underscore)f(c)m(haracters,)p eop end %%Page: 63 66 TeXDict begin 63 65 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(63)330 299 y(other)32 b(non)m(blank)f(c)m (haracters,)j(and)d(blank)g(c)m(haracters.)46 b(Changing)32 b(from)f(one)h(class)g(to)h(another)330 408 y(marks)d(the)h(end)f(of)h (a)g(w)m(ord.)42 b(In)30 b(addition,)h(the)g(class)g(of)g(the)g (\014rst)f(c)m(haracter)i(erased)f(is)g(ignored)330 518 y(\(whic)m(h)f(is)h(exactly)h(what)e(y)m(ou)h(w)m(an)m(t)g(when)f (erasing)g(pathname)h(comp)s(onen)m(ts\).)225 664 y Fm(\017)60 b Fn(autoinden)m(t,)31 b(ai)g([o\013)10 b(])330 810 y Fo(If)30 b(this)g(option)g(is)h(set,)g(whenev)m(er)f(y)m(ou)g(create)i (a)e(new)g(line)h(\(using)f(the)g Fn(vi)g(A)p Fo(,)g Fn(a)p Fo(,)h Fn(C)p Fo(,)f Fn(c)p Fo(,)h Fn(I)p Fo(,)f Fn(i)p Fo(,)h Fn(O)p Fo(,)f Fn(o)p Fo(,)330 920 y Fn(R)p Fo(,)25 b Fn(r)p Fo(,)g Fn(S)p Fo(,)f(and)g Fn(s)g Fo(commands,)i(or)e (the)h Fn(ex)g(app)s(end)p Fo(,)e Fn(c)m(hange)p Fo(,)k(and)d Fn(insert)h Fo(commands\))f(the)h(new)f(line)330 1029 y(is)34 b(automatically)j(inden)m(ted)d(to)h(align)g(the)f(cursor)g (with)f(the)i(\014rst)e(non)m(blank)h(c)m(haracter)h(of)g(the)330 1139 y(line)f(from)f(whic)m(h)g(y)m(ou)g(created)i(it.)50 b(Lines)33 b(are)h(inden)m(ted)f(using)g(tab)g(c)m(haracters)i(to)f (the)g(exten)m(t)330 1249 y(p)s(ossible)26 b(\(based)h(on)g(the)g(v)-5 b(alue)27 b(of)g(the)g Fi(tabstop)e Fo(option\))j(and)e(then)h(using)f (space)h(c)m(haracters)i(as)330 1358 y(necessary)-8 b(.)41 b(F)-8 b(or)29 b(commands)f(inserting)g(text)h(in)m(to)g(the)f(middle)g (of)g(a)h(line,)g(an)m(y)g(blank)e(c)m(haracters)330 1468 y(to)34 b(the)g(righ)m(t)g(of)g(the)f(cursor)g(are)h(discarded,)g (and)f(the)h(\014rst)e(non)m(blank)h(c)m(haracter)i(to)g(the)e(righ)m (t)330 1577 y(of)e(the)f(cursor)g(is)g(aligned)h(as)g(describ)s(ed)e (ab)s(o)m(v)m(e.)330 1833 y(The)43 b(inden)m(t)g(c)m(haracters)h(are)g (themselv)m(es)g(somewhat)g(sp)s(ecial.)79 b(If)43 b(y)m(ou)h(do)f(not) g(en)m(ter)h(more)330 1943 y(c)m(haracters)38 b(on)f(the)g(new)f(line)h (b)s(efore)g(mo)m(ving)g(to)h(another)f(line,)i(or)e(en)m(tering)g Fi()p Fo(,)g(the)330 2052 y(inden)m(t)g(c)m(haracter)h(will)f (b)s(e)f(deleted)h(and)f(the)h(line)g(will)g(b)s(e)f(empt)m(y)-8 b(.)60 b(F)-8 b(or)37 b(example,)i(if)e(y)m(ou)g(en-)330 2162 y(ter)h Fi()p Fo(t)m(wice)d(in)i(succession,)j (the)e(line)g(created)h(b)m(y)f(the)g(\014rst)f Fi()p Fo(will)26 b(not)h(ha)m(v)m(e)i(an)m(y)f(c)m (haracters)g(in)g(it,)g(regardless)g(of)g(the)f(inden)m(tation)h(of)g (the)f(previous)330 2381 y(or)j(subsequen)m(t)g(line.)330 2637 y(Inden)m(t)23 b(c)m(haracters)j(also)e(require)g(that)g(y)m(ou)g (en)m(ter)h(additional)f(erase)h(c)m(haracters)g(to)g(delete)g(them.) 330 2746 y(F)-8 b(or)41 b(example,)i(if)d(y)m(ou)h(ha)m(v)m(e)g(an)f (inden)m(ted)g(line,)j(con)m(taining)f(only)e(blanks,)i(the)e(\014rst)g Fi()p Fo(c)m(haracter)25 b(y)m(ou)g(en)m(ter)h (will)f(erase)h(up)e(to)i(end)e(of)h(the)h(inden)m(t)e(c)m(haracters,)k (and)d(the)g(second)330 2966 y(will)38 b(erase)g(bac)m(k)h(to)f(the)g (b)s(eginning)f(of)g(the)h(line.)63 b(\(Historically)-8 b(,)43 b(only)37 b(the)h Fi()p Fo(k)m(ey)330 3075 y(w)m(ould)28 b(erase)i(the)f(inden)m(t)f(c)m(haracters.)42 b(Both)29 b(the)g Fi()p Fo(k)m(ey)e(and)h(the)h(usual)f (erase)h(k)m(eys)330 3185 y(w)m(ork)c(in)g Fn(n)m(vi)p Fo(.\))40 b(In)24 b(addition,)j(if)e(the)g(cursor)g(is)g(p)s(ositioned) g(at)h(the)g(end)e(of)i(the)f(inden)m(t)g(c)m(haracters,)330 3294 y(the)38 b(k)m(eys)g(\\)p Fi(0)p Fo(")d(will)i(erase)i (all)f(of)f(the)h(inden)m(t)f(c)m(haracters)i(for)e(the)h(curren)m(t)f (line,)330 3404 y(resetting)c(the)g(inden)m(tation)g(lev)m(el)h(to)f (0.)47 b(Similarly)-8 b(,)33 b(the)g(k)m(eys)g(\\)p Fi(^)p Fo(")d(will)i(erase)h(all)330 3513 y(of)38 b(the)h(inden)m(t)f(c)m (haracters)i(for)e(the)g(curren)m(t)g(line,)j(lea)m(ving)f(the)f(inden) m(tation)g(lev)m(el)h(for)e(future)330 3623 y(created)31 b(lines)g(una\013ected.)330 3879 y(Finally)-8 b(,)32 b(if)e(the)h Fi(autoindent)c Fo(option)k(is)g(set,)g(the)f Fn(S)g Fo(and)g Fn(cc)h Fo(commands)f(c)m(hange)h(from)f(the)h(\014rst) 330 3988 y(non)m(blank)e(of)g(the)h(line)f(to)h(the)g(end)e(of)i(the)f (line,)h(instead)g(of)f(from)g(the)g(b)s(eginning)g(of)g(the)h(line)f (to)330 4098 y(the)i(end)e(of)i(the)f(line.)225 4244 y Fm(\017)60 b Fn(autoprin)m(t,)31 b(ap)f([o\013)10 b(])330 4390 y(Ex)32 b Fo(only)-8 b(.)46 b(Cause)32 b(the)g(curren)m(t)g(line)g (to)h(b)s(e)e(automatically)k(displa)m(y)m(ed)e(after)g(the)f Fn(ex)g Fo(commands)330 4500 y Fi(<)p Fo(,)45 b Fi(>)p Fo(,)g Fn(cop)m(y)p Fo(,)h Fn(delete)p Fo(,)h Fn(join)p Fo(,)e Fn(mo)m(v)m(e)p Fo(,)i Fn(put)p Fo(,)d Fn(t)p Fo(,)i Fn(Undo)p Fo(,)f(and)c Fn(undo)p Fo(.)75 b(This)42 b(automatic)i(displa)m(y)e(is)330 4609 y(suppressed)27 b(during)h Fn(global)i Fo(and)e Fn(v)h Fo(commands,)g(and)f(for)h(an)m (y)g(command)g(where)g(optional)h(\015ags)330 4719 y(are)h(used)e(to)i (explicitly)h(displa)m(y)f(the)g(line.)225 4865 y Fm(\017)60 b Fn(auto)m(write,)32 b(a)m(w)f([o\013)10 b(])330 5011 y Fo(If)44 b(this)g(option)h(is)f(set,)49 b(the)44 b Fn(vi)h(!)p Fo(,)j Fi(^^)p Fo(,)f Fi(^)p Fn(])d Fo(and)g Fi(<)p Fn(con)m(trol-Z)p Fi(>)i Fo(commands,)h(and)d(the)g Fn(ex)h(edit)p Fo(,)330 5121 y Fn(next)p Fo(,)38 b Fn(rewind)p Fo(,)e Fn(stop)p Fo(,)i Fn(susp)s(end)p Fo(,)d Fn(tag)p Fo(,)k Fn(tagp)s(op)p Fo(,)e(and)e Fn(tagtop)j Fo(commands)d (automatically)k(write)330 5230 y(the)34 b(curren)m(t)g(\014le)g(bac)m (k)h(to)g(the)f(curren)m(t)g(\014le)g(name)h(if)f(it)g(has)g(b)s(een)g (mo)s(di\014ed)f(since)h(it)h(w)m(as)f(last)330 5340 y(written.)41 b(If)30 b(the)g(write)h(fails,)g(the)g(command)f(fails)h (and)e(go)s(es)i(no)g(further.)p eop end %%Page: 64 67 TeXDict begin 64 66 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(64)330 299 y(App)s(ending)20 b(the)j(optional)g(force)g(\015ag)f(c)m(haracter)i(\\)p Fi(!)p Fo(")f(to)f(the)h Fn(ex)f Fo(commands)g Fn(next)p Fo(,)i Fn(rewind)p Fo(,)f Fn(stop)p Fo(,)330 408 y Fn(susp)s(end)p Fo(,)28 b Fn(tag)p Fo(,)k Fn(tagp)s(op)p Fo(,)f(and)e Fn(tagtop)j Fo(stops)f(the)f(automatic)i(write)f(from)f(b)s(eing)g (attempted.)330 664 y(\(Historically)-8 b(,)42 b(the)37 b Fn(next)g Fo(command)g(ignored)g(the)g(optional)h(force)f(\015ag.\)) 61 b(Note,)40 b(the)d Fn(ex)g Fo(com-)330 774 y(mands)29 b Fn(edit)p Fo(,)j Fn(quit)p Fo(,)e Fn(shell)p Fo(,)h(and)f Fn(xit)h Fo(are)g Fp(not)39 b Fo(a\013ected)32 b(b)m(y)f(the)f Fi(autowrite)e Fo(option.)330 1029 y(The)i Fi(autowrite)e Fo(option)j(is)f(ignored)g(if)h(the)f(\014le)h(is)f(considered)g (read-only)h(for)f(an)m(y)h(reason.)225 1176 y Fm(\017)60 b Fn(bac)m(kup)30 b([)p Fi("")p Fn(])330 1322 y Fo(If)g(this)g(option)g (is)g(set,)h(it)g(sp)s(eci\014es)e(a)i(pathname)f(used)f(as)h(a)h(bac)m (kup)e(\014le,)i(and,)f(whenev)m(er)f(a)i(\014le)330 1431 y(is)j(written,)h(the)f(\014le's)g(curren)m(t)g(con)m(ten)m(ts)h (are)g(copied)f(to)h(it.)51 b(The)34 b(pathname)g(is)g(\\)p Fi(#)p Fo(",)h(\\)p Fi(\045)p Fo(")g(and)330 1541 y(\\)p Fi(!)p Fo(")c(expanded.)330 1797 y(If)41 b(the)g(\014rst)f(c)m (haracter)j(of)e(the)g(pathname)g(is)g(\\)p Fi(N)p Fo(",)j(a)e(v)m (ersion)f(n)m(um)m(b)s(er)f(is)h(app)s(ended)e(to)j(the)330 1906 y(pathname)i(\(and)h(the)f(\\)p Fi(N)p Fo(")h(c)m(haracter)i(is)d (then)g(discarded\).)83 b(V)-8 b(ersion)45 b(n)m(um)m(b)s(ers)e(are)i (alw)m(a)m(ys)330 2016 y(incremen)m(ted,)e(and)d(eac)m(h)h(bac)m(kup)f (\014le)h(will)f(ha)m(v)m(e)i(a)e(v)m(ersion)h(n)m(um)m(b)s(er)e(one)h (greater)i(than)e(the)330 2125 y(highest)31 b(v)m(ersion)f(n)m(um)m(b)s (er)g(curren)m(tly)g(found)f(in)h(the)h(directory)-8 b(.)330 2381 y(Bac)m(kup)35 b(\014les)f(m)m(ust)g(b)s(e)g(regular)g (\014les,)i(o)m(wned)e(b)m(y)g(the)g(real)h(user)f(ID)g(of)g(the)h (user)e(running)g(the)330 2491 y(editor,)e(and)f(not)h(accessible)h(b)m (y)e(an)m(y)h(other)f(user.)225 2637 y Fm(\017)60 b Fn(b)s(eautify)-8 b(,)31 b(bf)e([o\013)10 b(])330 2783 y Fo(If)31 b(this)h(option)g(is)f (set,)i(all)f(con)m(trol)h(c)m(haracters)g(that)f(are)g(not)g(curren)m (tly)g(b)s(eing)f(sp)s(ecially)h(in)m(ter-)330 2892 y(preted,)25 b(other)e(than)g Fi()p Fo(,)h Fi()p Fo(,)e(and)g Fi()p Fo(,)g(are)i(discarded)f(from)f(commands)330 3002 y(read)34 b(in)g(b)m(y)h Fn(ex)f Fo(from)g(command)g(\014les,)i (and)e(from)g(input)f(text)j(en)m(tered)f(to)g Fn(vi)f Fo(\(either)h(in)m(to)h(the)330 3112 y(\014le)i(or)f(to)i(the)f(colon)g (command)g(line\).)63 b(T)-8 b(ext)39 b(\014les)e(read)h(b)m(y)f Fn(ex)p Fo(/)p Fn(vi)i Fo(are)f Fp(not)47 b Fo(a\013ected)39 b(b)m(y)f(the)330 3221 y Fi(beautify)28 b Fo(option.)225 3367 y Fm(\017)60 b Fn(cdpath)30 b([en)m(vironmen)m(t)i(v)-5 b(ariable)31 b(CDP)-8 b(A)g(TH,)31 b(or)f(curren)m(t)h(directory])330 3513 y Fo(This)36 b(option)i(is)f(used)f(to)h(sp)s(ecify)g(a)g(colon)h (separated)g(list)f(of)g(directories)h(whic)m(h)f(are)h(used)e(as)330 3623 y(path)28 b(pre\014xes)f(for)g(an)m(y)i(relativ)m(e)h(path)d (names)h(used)f(as)h(argumen)m(ts)g(for)g(the)g Fn(cd)g Fo(command.)39 b(The)330 3733 y(v)-5 b(alue)35 b(of)g(this)g(option)g (defaults)g(to)g(the)g(v)-5 b(alue)35 b(of)g(the)g(en)m(vironmen)m(tal) h(v)-5 b(ariable)36 b Fi(CDPATH)p Fo(if)d(it)i(is)330 3842 y(set,)29 b(otherwise)f(to)g(the)g(curren)m(t)f(directory)-8 b(.)40 b(F)-8 b(or)29 b(compatibilit)m(y)g(with)e(the)h(POSIX)f(1003.2) i(shell,)330 3952 y(the)e Fn(cd)g Fo(command)g(do)s(es)g Fp(not)37 b Fo(c)m(hec)m(k)29 b(the)e(curren)m(t)g(directory)h(as)f(a)h (path)f(pre\014x)f(for)h(relativ)m(e)i(path)330 4061 y(names)39 b(unless)g(it)h(is)g(explicitly)h(sp)s(eci\014ed.)67 b(It)40 b(ma)m(y)g(b)s(e)f(so)h(sp)s(eci\014ed)e(b)m(y)i(en)m(tering)g (an)g(empt)m(y)330 4171 y(string)30 b(or)h(a)f(\\)p Fi(.)p Fo(")h(c)m(haracter)h(in)m(to)g(the)e Fi(CDPATH)p Fo(v)-5 b(ariable)30 b(or)g(the)h(option)g(v)-5 b(alue.)225 4317 y Fm(\017)60 b Fn(cedit)31 b([no)g(default])330 4463 y Fo(This)38 b(option)g(adds)g(the)g(abilit)m(y)i(to)f(edit)g(the)g (colon)g(command-line)g(history)-8 b(.)65 b(This)37 b(option)i(is)330 4573 y(set)i(to)g(a)f(string.)71 b(Whenev)m(er)41 b(the)f(\014rst)g(c)m (haracter)i(of)e(that)h(string)f(is)g(en)m(tered)h(on)f(the)h(colon)330 4682 y(command)26 b(line,)h(y)m(ou)g(will)f(en)m(ter)h(a)f(normal)g (editing)h(windo)m(w)e(on)h(the)g(collected)j(commands)c(that)330 4792 y(y)m(ou'v)m(e)g(en)m(tered)g(on)e(the)i Fn(vi)f Fo(colon)g(command-line.)39 b(Y)-8 b(ou)25 b(ma)m(y)f(then)g(mo)s(dify) f(and/or)h(execute)h(the)330 4902 y(commands.)46 b(All)33 b(normal)g(text)g(editing)g(is)f(a)m(v)-5 b(ailable,)36 b(except)d(that)g(y)m(ou)g(cannot)g(use)f Fi(<)p Fn(con)m(trol-)330 5011 y(W)p Fi(>)39 b Fo(to)g(switc)m(h)h(to)g(an)f(alternate)h(screen.) 67 b(En)m(tering)39 b(a)h Fi(<)p Fn(carriage-return)p Fi(>)g Fo(will)f(execute)i(the)330 5121 y(curren)m(t)30 b(line)g(of)g(the)g(screen)g(windo)m(w)g(as)g(an)g(ex)g(command)g(in)f (the)h(con)m(text)i(of)e(the)g(screen)g(from)330 5230 y(whic)m(h)38 b(y)m(ou)h(created)h(the)e(colon)i(command-line)f (screen,)i(and)d(y)m(ou)h(will)f(then)h(return)e(to)i(that)330 5340 y(screen.)p eop end %%Page: 65 68 TeXDict begin 65 67 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(65)330 299 y(Because)42 b(of)e Fn(vi)p Fo('s)h(parsing)f(rules,)j(it)e(can)f(b)s(e)g(di\016cult)g(to)i (set)f(the)f(colon)i(command-line)e(edit)330 408 y(c)m(haracter)25 b(to)f(the)f Fi()p Fo(c)m(haracter.)38 b(T)-8 b(o)23 b(set)h(it)g(to)g Fi()p Fo(,)e(use)h(\\)p Fi(set)30 b(cedit=)p Fo(".)330 760 y(If)i(the)h Fi(cedit)f Fo(edit)h(option)g(is)g(set)g(to) h(the)f(same)g(c)m(haracter)h(as)f(the)g Fi(filec)e Fo(edit)j(option,)g Fn(vi)f Fo(will)330 870 y(p)s(erform)27 b(colon)i(command-line)g (editing)g(if)g(the)f(c)m(haracter)i(is)f(en)m(tered)g(as)f(the)h (\014rst)f(c)m(haracter)i(of)330 979 y(the)h(line,)g(otherwise,)g Fn(vi)f Fo(will)h(p)s(erform)e(\014le)h(name)h(expansion.)225 1112 y Fm(\017)60 b Fn(columns,)30 b(co)h([80])330 1245 y Fo(The)c(n)m(um)m(b)s(er)f(of)i(columns)f(in)g(the)h(screen.)40 b(Setting)28 b(this)f(option)h(causes)g Fn(ex)p Fo(/)p Fn(vi)h Fo(to)f(set)g(\(or)g(reset\))330 1354 y(the)f(en)m(vironmen)m (tal)i(v)-5 b(ariable)28 b Fi(COLUMNS)p Fo(.)37 b(See)28 b(the)f(section)h(en)m(titled)h(\\)p Fn(Sizing)f(the)f(Screen)p Fo(")h(more)330 1464 y(information.)225 1597 y Fm(\017)60 b Fn(commen)m(t)32 b([o\013)10 b(])330 1729 y(Vi)28 b Fo(only)-8 b(.)41 b(If)27 b(the)i(\014rst)e(non-empt)m(y)h(line)h(of)f (the)g(\014le)h(b)s(egins)e(with)h(the)g(string)g(\\)p Fi(#)p Fo(",)i(\\)p Fi(/*)p Fo(")e(or)g(\\)p Fi(//)p Fo(",)330 1839 y(this)33 b(option)h(causes)g Fn(vi)f Fo(to)h(skip)f(to)h(the)g(end)f(of)g(that)h(shell,)h(C)e(or)g(C)p Fi(++)f Fo(commen)m(t)j(\(probably)e(a)330 1948 y(terribly)d(b)s(oring) g(legal)i(notice\))g(b)s(efore)e(displa)m(ying)h(the)f(\014le.)225 2081 y Fm(\017)60 b Fn(directory)-8 b(,)32 b(dir)e([en)m(vironmen)m(t)i (v)-5 b(ariable)31 b(TMPDIR,)g(or)g(/tmp])330 2214 y Fo(The)d(directory)h(where)f(temp)s(orary)g(\014les)g(are)h(created.)41 b(The)28 b(en)m(vironmen)m(tal)h(v)-5 b(ariable)30 b Fi(TMPDIR)p Fo(is)330 2323 y(used)g(as)g(the)h(default)f(v)-5 b(alue)31 b(if)f(it)h(exists,)h(otherwise)e Fi(/tmp)p Fo(is)g(used.)225 2456 y Fm(\017)60 b Fn(edcompatible,)32 b(ed)e([o\013)10 b(])330 2589 y Fo(Remem)m(b)s(er)23 b(the)g(v)-5 b(alues)23 b(of)g(the)g(\\c")h(and)f(\\g")h(su\016xes)e (to)i(the)f Fn(substitute)g Fo(commands,)i(instead)e(of)330 2698 y(initializing)31 b(them)f(as)f(unset)g(for)g(eac)m(h)i(new)d (command.)41 b(Sp)s(ecifying)28 b(pattern)i(and)e(replacemen)m(t)330 2808 y(strings)i(to)h(the)g Fn(substitute)g Fo(command)f(unsets)f(the)i (\\c")h(and)d(\\g")j(su\016xes)e(as)g(w)m(ell.)225 2941 y Fm(\017)60 b Fn(escap)s(etime)32 b([1])330 3073 y Fo(The)g(10th's)i (of)f(a)h(second)f Fn(ex)p Fo(/)p Fn(vi)h Fo(w)m(aits)f(for)g(a)h (subsequen)m(t)e(k)m(ey)h(to)h(complete)h(an)d Fi()p Fo(k)m(ey)330 3183 y(mapping.)225 3315 y Fm(\017)60 b Fn(errorb)s(ells,)31 b(eb)f([o\013)10 b(])330 3448 y(Ex)40 b Fo(only)-8 b(.)70 b Fn(Ex)40 b Fo(error)f(messages)i(are)g(normally)f (presen)m(ted)g(in)g(in)m(v)m(erse)h(video.)70 b(If)40 b(that)h(is)f(not)330 3558 y(p)s(ossible)27 b(for)g(the)h(terminal,)h (setting)f(this)f(option)h(causes)g(error)f(messages)i(to)f(b)s(e)e (announced)h(b)m(y)330 3667 y(ringing)j(the)h(terminal)g(b)s(ell.)225 3800 y Fm(\017)60 b Fn(exrc,)31 b(ex)g([o\013)10 b(])330 3933 y Fo(If)41 b(this)h(option)g(is)f(turned)g(on)g(in)g(the)h(EXINIT) f(en)m(vironmen)m(t)i(v)-5 b(ariables,)45 b(or)c(the)h(system)g(or)330 4042 y($HOME)33 b(startup)f(\014les,)i(the)e(lo)s(cal)i(startup)e (\014les)h(are)g(read,)g(unless)f(they)h(are)g(the)g(same)g(as)g(the) 330 4152 y(system)c(or)g($HOME)g(startup)f(\014les)h(or)f(fail)i(to)f (pass)g(the)g(standard)f(p)s(ermission)f(c)m(hec)m(ks.)42 b(See)29 b(the)330 4261 y(section)j(en)m(titled)f(\\)p Fn(Startup)g(Information)p Fo(")g(for)f(more)g(information.)225 4394 y Fm(\017)60 b Fn(extended)31 b([o\013)10 b(])330 4527 y Fo(This)39 b(option)g(causes)h(all)g(regular)g(expressions)f(to) h(b)s(e)e(treated)j(as)e(POSIX)g(1003.2)i(Extended)330 4636 y(Regular)31 b(Expressions)e(\(whic)m(h)i(are)g(similar)f(to)h (historic)g Fi(egrep)p Fo(\(1\))g(st)m(yle)g(expressions\).)225 4769 y Fm(\017)60 b Fn(\014lec)31 b([no)g(default])330 4902 y Fo(This)36 b(option)h(adds)f(the)h(abilit)m(y)h(to)g(do)f(shell) f(expansion)h(when)f(en)m(tering)i(input)d(on)i(the)g(colon)330 5011 y(command)23 b(line.)38 b(This)22 b(option)i(is)f(set)g(to)h(a)f (string.)38 b(Whenev)m(er)24 b(the)f(\014rst)f(c)m(haracter)i(of)f (that)h(string)330 5121 y(is)j(en)m(tered)g(on)g(the)f(colon)i(command) f(line,)h(the)f Fi(<)p Fo(blank)p Fi(>)e Fo(delimited)j(string)e (immediately)i(b)s(efore)330 5230 y(the)k(cursor)e(is)i(expanded)e(as)i (if)f(it)h(w)m(ere)g(follo)m(w)m(ed)h(b)m(y)e(a)h Fi(*)p Fo(c)m(haracter,)h(and)e(\014le)h(name)f(expansion)330 5340 y(for)38 b(the)h Fn(ex)f Fo(edit)h(command)f(w)m(as)h(done.)64 b(If)38 b(no)g(matc)m(h)h(is)g(found,)g(the)f(screen)h(is)f(\015ashed)g (and)p eop end %%Page: 66 69 TeXDict begin 66 68 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(66)330 299 y(text)33 b(input)d(resumed.)44 b(If)31 b(a)h(single)h(matc)m(h)f(results,)g(that)h(matc)m(h)f (replaces)h(the)f(expanded)f(text.)330 408 y(In)38 b(addition,)j(if)d (the)h(single)g(matc)m(h)h(is)f(for)f(a)h(directory)-8 b(,)42 b(a)d Fi(/)p Fo(c)m(haracter)g(is)g(app)s(ended)e(and)h(\014le) 330 518 y(completion)33 b(is)g(rep)s(eated.)46 b(If)32 b(more)g(than)g(a)g(single)h(matc)m(h)g(results,)g(an)m(y)f(unique)g (pre\014x)f(shared)330 628 y(b)m(y)g(the)f(matc)m(hes)i(replaces)g(the) e(expanded)g(text,)i(the)f(matc)m(hes)h(are)f(displa)m(y)m(ed,)g(and)f (text)i(input)330 737 y(resumed.)330 979 y(Because)43 b(of)e Fn(vi)p Fo('s)h(parsing)e(rules,)k(it)e(can)g(b)s(e)e (di\016cult)i(to)g(set)f(the)h(path)f(completion)h(c)m(harac-)330 1089 y(ter)f(to)h(t)m(w)m(o)g(command)e(v)-5 b(alues,)44 b Fi()p Fo(and)38 b Fi()p Fo(.)71 b(T)-8 b(o)41 b(set)h(it)f(to)g Fi()p Fo(,)h(use)e(\\)p Fi(set)330 1199 y(filec=)o Fo(".)35 b(T)-8 b(o)31 b(set)g(it)g(to)g Fi()p Fo(,)e(use)h(\\)p Fi(set)g(filec=\\e)p Fo(".)330 1441 y(If)i(the)h Fi(cedit)f Fo(edit)h(option)g(is)g(set)g(to)h(the)f(same)g(c)m (haracter)h(as)f(the)g Fi(filec)e Fo(edit)j(option,)g Fn(vi)f Fo(will)330 1551 y(p)s(erform)27 b(colon)i(command-line)g (editing)g(if)g(the)f(c)m(haracter)i(is)f(en)m(tered)g(as)f(the)h (\014rst)f(c)m(haracter)i(of)330 1660 y(the)h(line,)g(otherwise,)g Fn(vi)f Fo(will)h(p)s(erform)e(\014le)h(name)h(expansion.)225 1793 y Fm(\017)60 b Fn(\015ash)29 b([on])330 1925 y Fo(This)f(option)i (causes)g(the)f(screen)h(to)g(\015ash)e(instead)i(of)f(b)s(eeping)g (the)g(k)m(eyb)s(oard,)h(on)f(error,)h(if)f(the)330 2035 y(terminal)i(has)f(the)h(capabilit)m(y)-8 b(.)225 2168 y Fm(\017)60 b Fn(hardtabs,)30 b(h)m(t)g([8])330 2300 y Fo(This)h(option)h(de\014nes)e(the)i(spacing)f(b)s(et)m(w)m(een)h (hardw)m(are)g(tab)f(settings,)i(i.e.)45 b(the)31 b(tab)h(expansion)330 2410 y(done)43 b(b)m(y)g(the)g(op)s(erating)h(system)f(and/or)g(the)h (terminal)g(itself.)80 b(As)43 b Fn(nex)p Fo(/)p Fn(n)m(vi)g Fo(nev)m(er)h(writes)330 2519 y Fi()p Fo(c)m(haracters)30 b(to)g(the)g(terminal,)g(unlik)m(e)g(historic)g(v)m(ersions)g(of)g Fn(ex)p Fo(/)p Fn(vi)p Fo(,)h(this)e(option)h(do)s(es)g(not)330 2629 y(curren)m(tly)g(ha)m(v)m(e)i(an)m(y)f(a\013ect.)225 2762 y Fm(\017)60 b Fn(iclo)m(w)m(er)33 b([o\013)10 b(])330 2894 y Fo(The)29 b Fi(iclower)f Fo(edit)j(option)f(mak)m(es)h(all)g (Regular)f(Expressions)f(case-insensitiv)m(e,)k(as)d(long)h(as)f(an)330 3004 y(upp)s(er-case)g(letter)h(do)s(es)g(not)f(app)s(ear)g(in)g(the)h (searc)m(h)g(string.)225 3137 y Fm(\017)60 b Fn(ignorecase,)32 b(ic)f([o\013)10 b(])330 3269 y Fo(This)36 b(option)h(causes)g(regular) g(expressions,)i(b)s(oth)d(in)g Fn(ex)h Fo(commands)g(and)f(in)g(searc) m(hes,)k(to)e(b)s(e)330 3379 y(ev)-5 b(aluated)32 b(in)e(a)g (case-insensitiv)m(e)j(manner.)225 3512 y Fm(\017)60 b Fn(k)m(eytime)32 b([6])330 3644 y Fo(The)e(10th's)h(of)g(a)f(second)h Fn(ex)p Fo(/)p Fn(vi)g Fo(w)m(aits)h(for)e(a)g(subsequen)m(t)g(k)m(ey)h (to)g(complete)h(a)f(k)m(ey)g(mapping.)225 3777 y Fm(\017)60 b Fn(leftrigh)m(t)32 b([o\013)10 b(])330 3910 y(Vi)26 b Fo(only)-8 b(.)40 b(This)26 b(option)h(causes)g(the)f(screen)h(to)g (b)s(e)f(scrolled)h(left-righ)m(t)h(to)f(view)g(lines)f(longer)h(than) 330 4019 y(the)36 b(screen,)i(instead)e(of)g(the)g(traditional)h Fn(vi)f Fo(screen)g(in)m(terface)h(whic)m(h)f(folds)g(long)g(lines)g (at)h(the)330 4129 y(righ)m(t-hand)30 b(margin)h(of)f(the)h(terminal.) 225 4261 y Fm(\017)60 b Fn(lines,)31 b(li)g([24])330 4394 y(Vi)g Fo(only)-8 b(.)42 b(The)30 b(n)m(um)m(b)s(er)g(of)g(lines)h (in)g(the)g(screen.)42 b(Setting)31 b(this)g(option)g(causes)g Fn(ex)p Fo(/)p Fn(vi)h Fo(to)f(set)h(\(or)330 4504 y(reset\))i(the)f (en)m(vironmen)m(tal)i(v)-5 b(ariable)34 b Fi(LINES)p Fo(.)47 b(See)34 b(the)f(section)h(en)m(titled)h(\\)p Fn(Sizing)f(the)f(Screen)p Fo(")330 4613 y(for)d(more)h(information.) 225 4746 y Fm(\017)60 b Fn(lisp)30 b([o\013)10 b(])330 4879 y(Vi)35 b Fo(only)-8 b(.)54 b(This)34 b(option)h(c)m(hanges)h(the) f(b)s(eha)m(vior)g(of)g(the)f Fn(vi)h(\()p Fo(,)i Fn(\))p Fo(,)f Fi({)p Fo(,)g Fi(})p Fo(,)g Fn([[)f Fo(and)f Fn(]])i Fo(commands)e(to)330 4988 y(matc)m(h)40 b(the)e(Lisp)h(language.)67 b(Also,)41 b(the)e Fi(autoindent)d Fo(option's)j(b)s(eha)m(vior)g(is)g (c)m(hanged)g(to)h(b)s(e)330 5098 y(appropriate)30 b(for)h(Lisp.)330 5340 y Fp(This)i(option)h(is)f(not)g(yet)g(implemente)-5 b(d.)p eop end %%Page: 67 70 TeXDict begin 67 69 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(67)225 299 y Fm(\017)60 b Fn(list)31 b([o\013)10 b(])330 445 y Fo(This)31 b(option)h(causes)g(lines)g(to)h (b)s(e)e(displa)m(y)m(ed)h(in)g(an)f(unam)m(biguous)g(fashion.)45 b(Sp)s(eci\014cally)-8 b(,)33 b(tabs)330 555 y(are)f(displa)m(y)m(ed)g (as)f(con)m(trol)i(c)m(haracters,)g(i.e.)45 b(\\)p Fi(^I)p Fo(",)32 b(and)f(the)h(ends)e(of)i(lines)f(are)h(mark)m(ed)f(with)h(a) 330 664 y(\\)p Fi($)p Fo(")f(c)m(haracter.)225 810 y Fm(\017)60 b Fn(lo)s(c)m(k)31 b([on])330 956 y Fo(This)40 b(option)h(causes)g(the)f(editor)h(to)h(attempt)f(to)h(get)f(an)g (exclusiv)m(e)h(lo)s(c)m(k)f(on)g(an)m(y)g(\014le)f(b)s(eing)330 1066 y(edited,)h(read)d(or)g(written.)65 b(Reading)39 b(or)f(writing)g(a)h(\014le)f(that)h(cannot)g(b)s(e)f(lo)s(c)m(k)m(ed)i (pro)s(duces)d(a)330 1176 y(w)m(arning)31 b(message,)h(but)e(no)h (other)g(e\013ect.)44 b(Editing)31 b(a)h(\014le)f(that)g(cannot)h(b)s (e)e(lo)s(c)m(k)m(ed)i(results)f(in)g(a)330 1285 y(read)f(only)h(edit)g (session,)f(as)h(if)f(the)h Fi(readonly)d Fo(edit)j(option)g(w)m(ere)f (set.)225 1431 y Fm(\017)60 b Fn(magic)31 b([on])330 1577 y Fo(This)44 b(option)h(is)g(on)f(b)m(y)h(default.)84 b(T)-8 b(urning)43 b(the)i Fi(magic)e Fo(option)j(o\013)f(causes)g(all) g(regular)g(ex-)330 1687 y(pression)35 b(c)m(haracters)h(except)h(for)e (\\)p Fi(^)p Fo(")h(and)e(\\)p Fi($)p Fo(",)k(to)e(b)s(e)e(treated)i (as)g(ordinary)f(c)m(haracters.)56 b(T)-8 b(o)330 1797 y(re-enable)37 b(c)m(haracters)h(individually)-8 b(,)38 b(when)e(the)g Fi(magic)f Fo(option)i(is)g(o\013,)h(precede)f(them)f (with)h(a)330 1906 y(bac)m(kslash)31 b(\\)p Fi(\\e)p Fo(")g(c)m(haracter.)43 b(See)31 b(the)g(section)h(en)m(titled)g(\\)p Fn(Regular)g(Expressions)e(and)f(Replace-)330 2016 y(men)m(t)i(Strings) p Fo(")g(for)f(more)g(information.)225 2162 y Fm(\017)60 b Fn(matc)m(h)m(time)33 b([7])330 2308 y(Vi)50 b Fo(only)-8 b(.)99 b(The)49 b(10th's)h(of)g(a)g(second)g Fn(vi)g Fo(pauses)f(on)g(the)h(matc)m(hing)h(c)m(haracter)g(when)e(the)330 2418 y Fi(showmatch)28 b Fo(option)j(is)f(set.)225 2564 y Fm(\017)60 b Fn(mesg)31 b([on])330 2710 y Fo(This)c(option)i(allo)m (ws)h(other)e(users)f(to)i(con)m(tact)i(y)m(ou)d(using)g(the)h Fi(talk)p Fo(\(1\))f(and)f Fi(write)p Fo(\(1\))h(utilities,)330 2819 y(while)g(y)m(ou)g(are)h(editing.)40 b Fn(Ex)p Fo(/)p Fn(vi)28 b Fo(do)s(es)g(not)g(turn)f(message)i(on,)g(i.e.)40 b(if)28 b(messages)h(w)m(ere)g(turned)e(o\013)330 2929 y(when)32 b(the)h(editor)h(w)m(as)f(in)m(v)m(ok)m(ed,)j(they)d(will)g (sta)m(y)h(turned)e(o\013.)49 b(This)33 b(option)g(only)g(p)s(ermits)g (y)m(ou)330 3039 y(to)d(disallo)m(w)g(messages)g(for)e(the)h(edit)h (session.)40 b(See)29 b(the)g Fi(mesg)p Fo(\(1\))g(utilit)m(y)i(for)d (more)h(information.)225 3294 y Fm(\017)60 b Fn(msgcat)31 b([./])330 3440 y Fo(This)38 b(option)i(selects)g(a)g(message)g (catalog)i(to)d(b)s(e)g(used)f(to)i(displa)m(y)f(error)g(and)f (informational)330 3550 y(messages)44 b(in)f(a)g(sp)s(eci\014ed)g (language.)80 b(If)43 b(the)g(v)-5 b(alue)43 b(of)h(this)f(option)g (ends)g(with)f(a)i('/',)j(it)d(is)330 3660 y(treated)33 b(as)g(the)f(name)g(of)h(a)g(directory)f(that)h(con)m(tains)h(a)e (message)i(catalog)h(\\)p Fi(vi_XXXX)p Fo(",)c(where)330 3769 y(\\)p Fi(XXXX)p Fo(")24 b(is)g(the)h(v)-5 b(alue)25 b(of)f(the)h Fi(LANG)p Fo(en)m(vironmen)m(tal)f(v)-5 b(ariable,)27 b(if)d(it's)h(set,)h(or)f(the)f(v)-5 b(alue)25 b(of)f(the)h Fi(LC_)330 3879 y(MESSAGES)p Fo(en)m(vironmen)m(tal)j(v)-5 b(ariable)31 b(if)e(it's)h(not.)40 b(If)29 b(neither)g(of)h(those)g(en) m(vironmen)m(tal)g(v)-5 b(ariables)330 3988 y(are)28 b(set,)h(or)f(if)f(the)h(option)g(do)s(esn't)g(end)f(in)g(a)h('/',)i (the)e(option)g(is)g(treated)g(as)g(the)g(full)f(path)h(name)330 4098 y(of)j(the)f(message)i(catalog)h(to)e(use.)330 4354 y(If)24 b(an)m(y)i(messages)f(are)h(missing)e(from)h(the)g(catalog,)k (the)c(bac)m(kup)f(text)i(\(English\))f(is)g(used)f(instead.)330 4609 y(See)42 b(the)g(distribution)g(\014le)g Fi(catalog/README)p Fo(for)c(additional)k(information)h(on)e(building)h(and)330 4719 y(installing)31 b(message)h(catalogs.)225 4865 y Fm(\017)60 b Fn(mo)s(delines,)31 b(mo)s(deline)f([o\013)10 b(])330 5011 y Fo(If)25 b(the)g Fi(modelines)d Fo(option)k(is)f(set,)i Fn(ex)p Fo(/)p Fn(vi)f Fo(has)e(historically)j(scanned)e(the)g(\014rst) f(and)h(last)g(\014v)m(e)h(lines)330 5121 y(of)g(eac)m(h)i(\014le)e(as) g(it)h(is)f(read)g(for)g(editing,)i(lo)s(oking)f(for)e(an)m(y)i Fn(ex)f Fo(commands)g(that)h(ha)m(v)m(e)g(b)s(een)e(placed)330 5230 y(in)33 b(those)h(lines.)51 b(After)34 b(the)f(startup)h (information)f(has)h(b)s(een)f(pro)s(cessed,)h(and)f(b)s(efore)g(the)h (user)330 5340 y(starts)d(editing)g(the)f(\014le,)h(an)m(y)g(commands)f (em)m(b)s(edded)f(in)h(the)h(\014le)f(are)h(executed.)p eop end %%Page: 68 71 TeXDict begin 68 70 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(68)330 299 y(Commands)37 b(w)m(ere)i (recognized)g(b)m(y)f(the)h(letters)g(\\e")h(or)e(\\v")h(follo)m(w)m (ed)h(b)m(y)e(\\x")h(or)f(\\i",)k(at)d(the)330 408 y(b)s(eginning)31 b(of)h(a)g(line)g(or)g(follo)m(wing)h(a)g(tab)f(or)g(space)g(c)m (haracter,)i(and)d(follo)m(w)m(ed)j(b)m(y)d(a)h(\\:",)i(an)e Fn(ex)330 518 y Fo(command,)e(and)g(another)h(\\:".)330 762 y(This)41 b(option)h(is)g(a)g(securit)m(y)g(problem)g(of)f(immense) h(prop)s(ortions,)i(and)d(should)g(not)h(b)s(e)f(used)330 871 y(under)29 b(an)m(y)i(circumstances.)330 1115 y Fp(This)i(option)h (wil)5 b(l)33 b(never)g(b)-5 b(e)32 b(implemente)-5 b(d.)225 1249 y Fm(\017)60 b Fn(noprin)m(t)30 b([)p Fi("")p Fn(])330 1383 y Fo(Characters)35 b(that)h(are)f(nev)m(er)h(handled)e(as)h(prin)m (table)g(c)m(haracters.)57 b(By)35 b(default,)h(the)g(C)e(library)330 1492 y(function)f Fi(isprint)p Fo(\(3\))g(is)g(used)f(to)i(determine)g (if)f(a)h(c)m(haracter)h(is)e(prin)m(table)h(or)f(not.)50 b(This)32 b(edit)330 1602 y(option)f(o)m(v)m(errides)g(that)g (decision.)225 1736 y Fm(\017)60 b Fn(n)m(um)m(b)s(er,)30 b(n)m(u)f([o\013)10 b(])330 1870 y Fo(Precede)31 b(eac)m(h)g(line)g (displa)m(y)m(ed)g(with)f(its)h(curren)m(t)f(line)h(n)m(um)m(b)s(er.) 225 2004 y Fm(\017)60 b Fn(o)s(ctal)32 b([o\013)10 b(])330 2138 y Fo(Displa)m(y)35 b(unkno)m(wn)d(c)m(haracters)j(as)g(o)s(ctal)g (n)m(um)m(b)s(ers)d(\\)p Fi("\\e###")p Fo(",)i(instead)g(of)g(the)g (default)g(hex-)330 2247 y(adecimal)e(\\)p Fi("\\ex##")p Fo(".)225 2381 y Fm(\017)60 b Fn(op)s(en)30 b([on])330 2515 y(Ex)g Fo(only)-8 b(.)41 b(If)30 b(this)g(option)h(is)g(not)f (set,)h(the)g Fn(op)s(en)f Fo(and)f Fn(visual)i Fo(commands)f(are)h (disallo)m(w)m(ed.)225 2649 y Fm(\017)60 b Fn(optimize,)32 b(opt)f([on])330 2783 y(Vi)g Fo(only)-8 b(.)45 b(Throughput)29 b(of)j(text)g(is)f(exp)s(edited)h(b)m(y)f(setting)h(the)g(terminal)g (not)g(to)g(do)f(automatic)330 2892 y(carriage)f(returns)c(when)i(prin) m(ting)f(more)i(than)e(one)i(\(logical\))i(line)d(of)h(output,)f (greatly)i(sp)s(eeding)330 3002 y(output)d(on)g(terminals)h(without)f (addressable)g(cursors)g(when)f(text)i(with)f(leading)i(white)e(space)h (is)330 3112 y(prin)m(ted.)330 3355 y Fp(This)33 b(option)h(is)f(not)g (yet)g(implemente)-5 b(d.)225 3489 y Fm(\017)60 b Fn(paragraphs,)30 b(para)g([IPLPPPQPP)h(LIpplpipbp])330 3623 y(Vi)26 b Fo(only)-8 b(.)40 b(De\014ne)27 b(additional)h(paragraph)e(b)s (oundaries)f(for)h(the)h Fi({)f Fn(and)g Fi(})g Fo(commands.)39 b(The)26 b(v)-5 b(alue)330 3733 y(of)31 b(this)f(option)h(m)m(ust)f(b)s (e)g(a)g(c)m(haracter)i(string)f(consisting)g(of)f(zero)i(or)e(more)g (c)m(haracter)i(pairs.)330 3976 y(In)27 b(the)h(text)h(to)g(b)s(e)e (edited,)i(the)f(c)m(haracter)h(string)f Fi(.)p Fo(,)23 b(\(where)28 b Fi()p Fo(is)e(one)i(of)f (the)h(c)m(haracter)h(pairs)e(in)g(the)g(option's)h(v)-5 b(alue\))28 b(de\014nes)f(a)g(paragraph)g(b)s(oundary)-8 b(.)330 4195 y(F)g(or)23 b(example,)h(if)e(the)g(option)h(w)m(ere)f (set)h(to)f Fi(LaA##)p Fo(,)f(then)h(all)g(of)g(the)h(follo)m (wing)g(additional)330 4305 y(paragraph)30 b(b)s(oundaries)f(w)m(ould)h (b)s(e)g(recognized:)570 4524 y Fi(.La)570 4634 y(.A)570 4743 y(.##)225 4877 y Fm(\017)60 b Fn(path)30 b([])330 5011 y Fo(The)c(path)h(option)g(can) g(b)s(e)f(used)f(to)j(sp)s(ecify)e(a)h Fi(<)p Fo(colon)p Fi(>)p Fo(-separated)h(list)f(of)g(paths,)g(similar)g(to)h(the)330 5121 y Fi(PATH)p Fo(en)m(vironmen)m(t)i(v)-5 b(ariable)31 b(in)g(the)g(shells.)41 b(If)30 b(this)h(option)g(is)f(set,)i(the)e (name)h(of)g(the)g(\014le)f(to)i(b)s(e)330 5230 y(edited)h(is)f(not)g (an)h(absolute)g(pathname,)f(the)h(\014rst)e(comp)s(onen)m(t)i(of)f (the)h(\014lename)f(is)h(not)f(\\)p Fi(.)p Fo(")h(or)330 5340 y(\\)p Fi(..)p Fo(",)k(and)e(the)g(\014le)g(to)h(b)s(e)f(edited)g (do)s(esn't)g(exist)h(in)f(the)g(curren)m(t)g(directory)-8 b(,)38 b(the)d(elemen)m(ts)i(of)p eop end %%Page: 69 72 TeXDict begin 69 71 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(69)330 299 y(the)30 b Fi(path)e Fo(option)i(are)g(sequen)m(tially)i(searc)m(hed)e(for)f(a)h(\014le)g (of)g(the)g(sp)s(eci\014ed)f(name.)40 b(If)29 b(suc)m(h)h(a)g(\014le) 330 408 y(is)g(found,)g(it)h(is)f(edited.)225 539 y Fm(\017)60 b Fn(prin)m(t)30 b([)p Fi("")p Fn(])330 669 y Fo(Characters)i(that)g (are)g(alw)m(a)m(ys)h(handled)e(as)h(prin)m(table)g(c)m(haracters.)46 b(By)32 b(default,)g(the)g(C)f(library)330 778 y(function)i Fi(isprint)p Fo(\(3\))g(is)g(used)f(to)i(determine)g(if)f(a)h(c)m (haracter)h(is)e(prin)m(table)h(or)f(not.)50 b(This)32 b(edit)330 888 y(option)f(o)m(v)m(errides)g(that)g(decision.)225 1018 y Fm(\017)60 b Fn(prompt)30 b([on])330 1148 y(Ex)36 b Fo(only)-8 b(.)58 b(This)35 b(option)i(causes)f Fn(ex)h Fo(to)f(prompt)f(for)h(command)g(input)f(with)h(a)g(\\)p Fi(:)p Fo(")h(c)m(haracter;)330 1258 y(when)29 b(it)i(is)g(not)f(set,)h (no)g(prompt)e(is)i(displa)m(y)m(ed.)225 1388 y Fm(\017)60 b Fn(readonly)-8 b(,)31 b(ro)g([o\013)10 b(])330 1518 y Fo(This)29 b(option)h(causes)g(a)g(force)h(\015ag)f(to)g(b)s(e)f (required)g(to)i(attempt)g(to)f(write)g(the)g(\014le.)41 b(Setting)30 b(this)330 1628 y(option)f(is)f(equiv)-5 b(alen)m(t)30 b(to)f(using)f(the)h Fn(-R)g Fo(command)f(line)g(option,) i(or)e(executing)i(the)f Fn(vi)f Fo(program)330 1737 y(using)i(the)g(name)h Fn(view)p Fo(.)330 1977 y(The)j Fi(readonly)e Fo(edit)j(option)g(is)f(not)h(usually)f(p)s(ersisten)m (t,)h(lik)m(e)h(other)e(edit)h(options.)53 b(If)34 b(the)h Fn(-R)330 2087 y Fo(command)41 b(line)g(option)h(is)f(set,)k Fn(vi)c Fo(is)g(executed)h(as)g Fn(view)p Fo(,)i(or)d(the)h Fi(readonly)d Fo(edit)i(option)h(is)330 2196 y(explicitly)34 b(set,)h(all)e(\014les)g(edited)h(in)e(the)h(screen)g(will)g(b)s(e)g (mark)m(ed)g(readonly)-8 b(,)34 b(and)e(the)h(force)h(\015ag)330 2306 y(will)i(b)s(e)e(required)h(to)h(write)f(them.)56 b(Ho)m(w)m(ev)m(er,)39 b(if)c(none)g(of)h(these)f(conditions)h(are)g (true,)g(or)g(the)330 2415 y Fi(readonly)k Fo(edit)i(option)g(is)g (explicitly)h(unset,)i(then)c(the)h Fi(readonly)e Fo(edit)i(option)g (will)h(toggle)330 2525 y(based)27 b(on)h(the)g(write)g(p)s(ermissions) e(of)i(the)g(\014le)f(curren)m(tly)h(b)s(eing)f(edited)h(as)g(of)g (when)f(it)h(is)f(loaded)330 2634 y(in)m(to)i(the)g(edit)f(bu\013er.)39 b(In)28 b(other)g(w)m(ords,)h(the)f Fi(readonly)e Fo(edit)j(option)g (will)f(b)s(e)g(set)h(if)f(the)g(curren)m(t)330 2744 y(\014le)f(lac)m(ks)h(write)g(p)s(ermissions,)e(and)h(will)g(not)g(b)s (e)f(set)i(if)f(the)g(user)f(has)h(write)g(p)s(ermissions)f(for)h(the) 330 2854 y(\014le.)225 2984 y Fm(\017)60 b Fn(recdir)31 b([/v)-5 b(ar/tmp/vi.reco)m(v)m(er])330 3114 y Fo(The)30 b(directory)h(where)f(reco)m(v)m(ery)i(\014les)e(are)h(stored.)330 3354 y(If)e(y)m(ou)h(c)m(hange)h(the)f(v)-5 b(alue)30 b(of)g Fi(recdir)p Fo(,)e(b)s(e)h(careful)h(to)h(c)m(ho)s(ose)f(a)g (directory)h(whose)e(con)m(ten)m(ts)j(are)330 3463 y(not)f(regularly)h (deleted.)43 b(Bad)31 b(c)m(hoices)i(include)d(directories)i(in)f (memory)g(based)f(\014lesystems,)i(or)330 3573 y Fi(/tmp)p Fo(,)d(on)i(most)f(systems,)h(as)g(their)f(con)m(ten)m(ts)i(are)f(remo) m(v)m(ed)g(when)f(the)g(mac)m(hine)h(is)g(reb)s(o)s(oted.)330 3813 y(Public)e(directories)h(lik)m(e)g Fi(/usr/tmp)p Fo(and)d Fi(/var/tmp)p Fo(are)g(usually)i(safe,)h(although)f(some)h (sites)f(p)s(e-)330 3922 y(rio)s(dically)39 b(prune)d(old)h(\014les)h (from)f(them.)63 b(There)37 b(is)h(no)f(requiremen)m(t)h(that)g(y)m(ou) g(use)g(a)g(public)330 4032 y(directory)-8 b(,)32 b(e.g.)41 b(a)31 b(sub-directory)f(of)h(y)m(our)f(home)g(directory)h(will)g(w)m (ork)f(\014ne.)330 4271 y(Finally)-8 b(,)45 b(if)40 b(y)m(ou)h(c)m (hange)h(the)f(v)-5 b(alue)41 b(of)g Fi(recdir)p Fo(,)g(y)m(ou)g(m)m (ust)g(mo)s(dify)f(the)g(reco)m(v)m(ery)j(script)d(to)330 4381 y(op)s(erate)31 b(in)f(y)m(our)g(c)m(hosen)h(reco)m(v)m(ery)h (area.)330 4621 y(See)f(the)f(section)i(en)m(titled)g(\\)p Fn(Reco)m(v)m(ery)p Fo(")h(for)d(further)g(information.)225 4751 y Fm(\017)60 b Fn(redra)m(w,)31 b(re)f([o\013)10 b(])330 4881 y(Vi)30 b Fo(only)-8 b(.)42 b(The)30 b(editor)h(sim)m (ulates)h(\(using)e(great)i(amoun)m(ts)f(of)g(output\),)g(an)f(in)m (telligen)m(t)j(terminal)330 4991 y(on)24 b(a)g(dum)m(b)e(terminal)i (\(e.g.)40 b(during)23 b(insertions)h(in)f Fn(vi)h Fo(the)g(c)m (haracters)h(to)f(the)g(righ)m(t)h(of)f(the)g(cursor)330 5100 y(are)31 b(refreshed)e(as)i(eac)m(h)g(input)f(c)m(haracter)i(is)e (t)m(yp)s(ed\).)330 5340 y Fp(This)j(option)h(is)f(not)g(yet)g (implemente)-5 b(d.)p eop end %%Page: 70 73 TeXDict begin 70 72 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(70)225 299 y Fm(\017)60 b Fn(remap)30 b([on])330 427 y Fo(If)c(this)f(option)i(is)f(set,)i(it)e(is)g(p)s (ossible)g(to)h(de\014ne)e(macros)h(in)g(terms)g(of)g(other)g(macros.) 40 b(Otherwise,)330 536 y(eac)m(h)32 b(k)m(ey)f(is)f(only)h(remapp)s (ed)e(up)g(to)i(one)g(time.)42 b(F)-8 b(or)31 b(example,)g(if)g(\\)p Fi(A)p Fo(")g(is)f(mapp)s(ed)f(to)i(\\)p Fi(B)p Fo(",)h(and)330 646 y(\\)p Fi(B)p Fo(")e(is)f(mapp)s(ed)e(to)j(\\)p Fi(C)p Fo(",)g(The)e(k)m(eystrok)m(e)j(\\)p Fi(A)p Fo(")f(will)f(b)s(e)f(mapp) s(ed)g(to)h(\\)p Fi(C)p Fo(")h(if)f(the)g Fi(remap)e Fo(option)j(is)330 756 y(set,)h(and)f(to)h(\\)p Fi(B)p Fo(")g(if)f(it)h(is)g(not)f(set.)225 883 y Fm(\017)60 b Fn(rep)s(ort)30 b([5])330 1011 y Fo(Set)35 b(the)g(threshold)f(of)h (the)g(n)m(um)m(b)s(er)f(of)h(lines)g(that)h(need)e(to)i(b)s(e)e(c)m (hanged)i(or)e(y)m(ank)m(ed)i(b)s(efore)f(a)330 1121 y(message)26 b(will)f(b)s(e)g(displa)m(y)m(ed)g(to)h(the)f(user.)38 b(F)-8 b(or)26 b(ev)m(erything)g(but)e(the)h(y)m(ank)g(command,)h(the)f (v)-5 b(alue)330 1230 y(is)38 b(the)f(largest)i(v)-5 b(alue)38 b(ab)s(out)f(whic)m(h)g(the)h(editor)g(is)f(silen)m(t,)k (i.e.)63 b(b)m(y)37 b(default,)j(6)e(lines)f(m)m(ust)h(b)s(e)330 1340 y(deleted)e(b)s(efore)f(the)g(user)g(is)g(noti\014ed.)55 b(Ho)m(w)m(ev)m(er,)39 b(if)c(the)g(n)m(um)m(b)s(er)f(of)h(lines)h(y)m (ank)m(ed)f(is)h(greater)330 1450 y(than)30 b Fp(or)j(e)-5 b(qual)33 b(to)k Fo(the)31 b(set)g(v)-5 b(alue,)31 b(it)g(is)f(rep)s (orted)g(to)h(the)f(user.)225 1577 y Fm(\017)60 b Fn(ruler)30 b([o\013)10 b(])330 1705 y(Vi)30 b Fo(only)-8 b(.)42 b(Displa)m(y)31 b(a)g(ro)m(w/column)g(ruler)e(on)i(the)f(colon)i (command)e(line.)225 1833 y Fm(\017)60 b Fn(scroll,)32 b(scr)e([\(en)m(vironmen)m(t)i(v)-5 b(ariable)31 b(LINES)f(-)g(1\))h(/) g(2])330 1961 y Fo(Set)g(the)f(n)m(um)m(b)s(er)f(of)i(lines)f(scrolled) h(b)m(y)g(the)f Fn(ex)h Fi(<)p Fn(con)m(trol-D)p Fi(>)h Fo(and)d Fi(<)p Fn(end-of-\014le)p Fi(>)i Fo(commands.)330 2198 y(Historically)-8 b(,)41 b(the)c Fn(ex)g(z)g Fo(command,)i(when)c (sp)s(eci\014ed)h(without)h(a)g(coun)m(t,)i(used)d(t)m(w)m(o)i(times)g (the)330 2308 y(size)30 b(of)f(the)h(scroll)g(v)-5 b(alue;)30 b(the)f(POSIX)f(1003.2)k(standard)c(sp)s(eci\014ed)h(the)g(windo)m(w)g (size,)h(whic)m(h)f(is)330 2418 y(a)i(b)s(etter)f(c)m(hoice.)225 2545 y Fm(\017)60 b Fn(searc)m(hincr)31 b([o\013)10 b(])330 2673 y Fo(The)27 b Fi(searchincr)e Fo(edit)j(option)g(mak)m(es)h(the)e (searc)m(h)i(commands)e Fn(/)h Fo(and)f Fn(?)39 b Fo(incremen)m(tal,)30 b(i.e.)41 b(the)330 2783 y(screen)f(is)g(up)s(dated)e(and)h(the)h (cursor)f(mo)m(v)m(es)i(to)f(the)g(matc)m(hing)h(text)g(as)f(the)f (searc)m(h)i(pattern)330 2892 y(is)g(en)m(tered.)74 b(If)40 b(the)i(searc)m(h)g(pattern)f(is)g(not)g(found,)i(the)e(screen)h(is)f (b)s(eep)s(ed)f(and)g(the)i(cursor)330 3002 y(remains)29 b(on)g(the)g(colon-command)i(line.)40 b(Erasing)29 b(c)m(haracters)i (from)e(the)g(searc)m(h)h(pattern)f(bac)m(ks)330 3112 y(the)i(cursor)e(up)h(to)h(the)f(previous)g(matc)m(hing)i(text.)225 3240 y Fm(\017)60 b Fn(sections,)32 b(sect)f([NHSHH)g(HUnhsh])330 3367 y(Vi)22 b Fo(only)-8 b(.)38 b(De\014ne)23 b(additional)f(section)i (b)s(oundaries)c(for)i(the)g Fn([[)h Fo(and)e Fn(]])i Fo(commands.)38 b(The)21 b Fi(sections)330 3477 y Fo(option)36 b(should)e(b)s(e)h(set)h(to)g(a)g(c)m(haracter)h(string)f(consisting)g (of)g(zero)g(or)f(more)h(c)m(haracter)h(pairs.)330 3587 y(In)27 b(the)h(text)h(to)g(b)s(e)e(edited,)i(the)f(c)m(haracter)h (string)f Fi(.)p Fo(,)23 b(\(where)28 b Fi()p Fo(is)f(one)j(of)f(the)g(c)m(haracter)h (pairs)e(in)h(the)g(option's)g(v)-5 b(alue\),)30 b(de\014nes)e(a)i (section)f(b)s(oundary)e(in)330 3806 y(the)k(same)f(manner)g(that)h Fi(paragraphs)c Fo(option)k(b)s(oundaries)e(are)i(de\014ned.)225 3934 y Fm(\017)60 b Fn(secure)31 b([o\013)10 b(])330 4061 y Fo(The)29 b Fi(secure)e Fo(edit)j(option)f(turns)f(o\013)i(all)g (access)g(to)g(external)g(programs.)40 b(This)28 b(means)h(that)h(the) 330 4171 y(v)m(ersions)h(of)g(the)g Fn(read)g Fo(and)g Fn(write)g Fo(commands)g(that)g(\014lter)g(text)h(through)f(other)g (programs,)g(the)330 4281 y Fn(vi)36 b(!)56 b Fo(and)35 b Fi(<)p Fn(con)m(trol-Z)p Fi(>)i Fo(commands,)g(the)f Fn(ex)g(!)p Fo(,)h Fn(script)p Fo(,)g Fn(shell)p Fo(,)h Fn(stop)e Fo(and)f Fn(susp)s(end)e Fo(commands)330 4390 y(and)e(\014le)g(name)g(expansion)g(will)h(not)f(b)s(e)g(p)s(ermitted.) 43 b(Once)31 b(set,)h(the)f Fi(secure)f Fo(edit)i(option)f(ma)m(y)330 4500 y(not)g(b)s(e)e(unset.)225 4628 y Fm(\017)60 b Fn(shell,)31 b(sh)f([en)m(vironmen)m(t)h(v)-5 b(ariable)31 b(SHELL,)e(or)i(/bin/sh]) 330 4755 y Fo(Select)39 b(the)f(shell)h(used)e(b)m(y)h(the)g(editor.)64 b(The)37 b(sp)s(eci\014ed)h(path)f(is)h(the)h(pathname)e(of)i(the)f (shell)330 4865 y(in)m(v)m(ok)m(ed)28 b(b)m(y)e(the)h Fn(vi)f(!)39 b Fo(shell)27 b(escap)s(e)g(command)f(and)g(b)m(y)g(the)h Fn(ex)g(shell)f Fo(command.)40 b(This)25 b(program)330 4975 y(is)30 b(also)i(used)d(to)i(resolv)m(e)h(an)m(y)f(shell)f(meta-c) m(haracters)k(in)c Fn(ex)g Fo(commands.)225 5103 y Fm(\017)60 b Fn(shellmeta)31 b([)p Fi(~{)p Fn([*?$`')p Fi("\\)p Fn(])330 5230 y Fo(The)39 b(set)g(of)h(c)m(haracters)g(that)g Fn(ex)g Fo(c)m(hec)m(ks)g(for)f(when)g(doing)g(\014le)g(name)g (expansion.)67 b(If)39 b(an)m(y)h(of)330 5340 y(the)29 b(sp)s(eci\014ed)e(c)m(haracters)j(are)f(found)e(in)h(the)h(\014le)f (name)h(argumen)m(ts)g(to)g(the)f Fn(ex)h Fo(commands,)g(the)p eop end %%Page: 71 74 TeXDict begin 71 73 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(71)330 299 y(argumen)m(ts)32 b(are)g(expanded)e(using)h(the)h(program)f(de\014ned)f(b)m(y)i(the)f Fi(shell)f Fo(option.)45 b(The)31 b(default)330 408 y(set)h(of)g(c)m (haracters)h(is)e(a)h(union)f(of)g(meta)i(c)m(haracters)g(from)e(the)g (V)-8 b(ersion)33 b(7)e(and)g(the)h(Berk)m(eley)h(C)330 518 y(shell.)225 653 y Fm(\017)60 b Fn(shift)m(width,)30 b(sw)g([8])330 787 y Fo(Set)35 b(the)f(autoinden)m(t)i(and)d(shift)i (command)f(inden)m(tation)h(width.)53 b(This)33 b(width)h(is)h(used)e (b)m(y)i(the)330 897 y Fi(autoindent)28 b Fo(option)i(and)g(b)m(y)g (the)h Fi(<)p Fo(,)f Fi(>)p Fo(,)h(and)e Fn(shift)i Fo(commands.)225 1031 y Fm(\017)60 b Fn(sho)m(wmatc)m(h,)31 b(sm)f([o\013)10 b(])330 1166 y(Vi)27 b Fo(only)-8 b(.)40 b(This)26 b(option)h(causes)g Fn(vi)p Fo(,)h(when)e(a)i(\\)p Fi(})p Fo(")f(or)g(\\)p Fi(\))p Fo(")g(is)g(en)m(tered,)i(to)e(brie\015y)f(mo)m(v)m(e)j(the)e (cursor)330 1275 y(the)k(matc)m(hing)g(\\)p Fi({)p Fo(")g(or)f(\\)p Fi(\()p Fo(".)42 b(See)30 b(the)h Fi(matchtime)d Fo(option)i(for)h (more)f(information.)225 1410 y Fm(\017)60 b Fn(sho)m(wmo)s(de,)30 b(smd)g([o\013)10 b(])330 1544 y(Vi)33 b Fo(only)-8 b(.)48 b(This)32 b(option)i(causes)f Fn(vi)g Fo(to)h(displa)m(y)f(a)g(string)g (iden)m(tifying)g(the)g(curren)m(t)g(editor)g(mo)s(de)330 1654 y(on)f(the)f(colon)i(command)e(line.)45 b(The)31 b(string)h(is)g(preceded)f(b)m(y)h(an)f(asterisk)h(\(\\*"\))i(if)e(the) f(\014le)h(has)330 1763 y(b)s(een)e(mo)s(di\014ed)f(since)i(it)f(w)m (as)h(last)g(completely)i(written,)225 1898 y Fm(\017)60 b Fn(sidescroll)31 b([16])330 2032 y(Vi)k Fo(only)-8 b(.)57 b(Sets)36 b(the)g(n)m(um)m(b)s(er)e(of)i(columns)f(that)h(are)g (shifted)g(to)g(the)g(left)g(or)g(righ)m(t,)i(when)c Fn(vi)i Fo(is)330 2142 y(doing)i(left-righ)m(t)i(scrolling)e(and)g(the) g(left)h(or)e(righ)m(t)i(margin)f(is)g(crossed.)63 b(See)38 b(the)g Fi(leftright)330 2252 y Fo(option)31 b(for)f(more)g (information.)225 2386 y Fm(\017)60 b Fn(slo)m(w)m(op)s(en,)31 b(slo)m(w)g([o\013)10 b(])330 2521 y Fo(This)29 b(option)h(a\013ects)i (the)e(displa)m(y)g(algorithm)g(used)f(b)m(y)h Fn(vi)p Fo(,)g(holding)g(o\013)g(displa)m(y)g(up)s(dating)f(dur-)330 2630 y(ing)41 b(input)e(of)h(new)g(text)i(to)f(impro)m(v)m(e)g (throughput)e(when)h(the)g(terminal)h(in)f(use)g(is)h(slo)m(w)g(and)330 2740 y(unin)m(telligen)m(t.)330 2984 y Fp(This)33 b(option)h(is)f(not)g (yet)g(implemente)-5 b(d.)225 3118 y Fm(\017)60 b Fn(sourcean)m(y)31 b([o\013)10 b(])330 3253 y Fo(If)24 b(this)g(option)h(is)f(turned)f (on,)j Fn(vi)f Fo(historically)h(read)e(startup)g(\014les)g(that)h(w)m (ere)g(o)m(wned)f(b)m(y)g(someone)330 3362 y(other)38 b(than)f(the)h(editor)g(user.)62 b(See)38 b(the)g(section)g(en)m (titled)h(\\)p Fn(Startup)f(Information)p Fo(")g(for)g(more)330 3472 y(information.)i(This)25 b(option)i(is)f(a)h(securit)m(y)g (problem)e(of)h(immense)h(prop)s(ortions,)f(and)f(should)h(not)330 3582 y(b)s(e)k(used)f(under)g(an)m(y)i(circumstances.)330 3826 y Fp(This)i(option)h(wil)5 b(l)33 b(never)g(b)-5 b(e)32 b(implemente)-5 b(d.)225 3960 y Fm(\017)60 b Fn(tabstop,)31 b(ts)g([8])330 4095 y Fo(This)f(option)g(sets)h(tab)g(widths)e(for)h (the)h(editor)g(displa)m(y)-8 b(.)225 4229 y Fm(\017)60 b Fn(taglength,)32 b(tl)f([0])330 4364 y Fo(This)24 b(option)h(sets)g (the)g(maxim)m(um)f(n)m(um)m(b)s(er)g(of)h(c)m(haracters)h(that)f(are)g (considered)g(signi\014can)m(t)g(in)g(a)330 4473 y(tag)h(name.)39 b(Setting)25 b(the)g(v)-5 b(alue)25 b(to)h(0)f(mak)m(es)g(all)h(of)f (the)g(c)m(haracters)h(in)e(the)h(tag)h(name)f(signi\014can)m(t.)225 4717 y Fm(\017)60 b Fn(tags,)32 b(tag)f([tags)h(/v)-5 b(ar/db/lib)s(c.tags)32 b(/sys/k)m(ern/tags])330 4852 y Fo(Sets)g(the)h(list)g(of)g(tags)g(\014les,)g(in)f(searc)m(h)h (order,)g(whic)m(h)f(are)h(used)e(when)g(the)i(editor)g(searc)m(hes)g (for)330 4961 y(a)e(tag.)225 5096 y Fm(\017)60 b Fn(term,)31 b(tt)m(yt)m(yp)s(e,)h(tt)m(y)g([en)m(vironmen)m(t)g(v)-5 b(ariable)31 b(TERM])330 5230 y Fo(Set)k(the)h(terminal)g(t)m(yp)s(e.) 55 b(Setting)36 b(this)g(option)f(causes)h Fn(ex)p Fo(/)p Fn(vi)g Fo(to)g(set)g(\(or)g(reset\))g(the)g(en)m(viron-)330 5340 y(men)m(tal)c(v)-5 b(ariable)31 b Fi(TERM)p Fo(.)p eop end %%Page: 72 75 TeXDict begin 72 74 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(72)225 299 y Fm(\017)60 b Fn(terse)31 b([o\013)10 b(])330 430 y Fo(This)30 b(option)g(has)g(historically)i (made)f(editor)g(messages)g(less)g(v)m(erb)s(ose.)40 b(It)31 b(has)f(no)g(e\013ect)i(in)e(this)330 540 y(implemen)m(tation.) 42 b(See)31 b(the)g Fi(verbose)d Fo(option)j(for)f(more)g(information.) 225 671 y Fm(\017)60 b Fn(tildeop)31 b([o\013)10 b(])330 803 y Fo(Mo)s(dify)30 b(the)h Fi(~)f Fo(command)g(to)h(tak)m(e)h(an)e (asso)s(ciated)i(motion.)225 934 y Fm(\017)60 b Fn(timeout,)32 b(to)f([on])330 1066 y Fo(If)g(this)g(option)g(is)g(set,)i Fn(ex)p Fo(/)p Fn(vi)f Fo(w)m(aits)g(for)f(a)g(sp)s(eci\014c)g(p)s (erio)s(d)f(for)h(a)g(subsequen)m(t)g(k)m(ey)h(to)f(complete)330 1176 y(a)d(k)m(ey)h(mapping)e(\(see)h(the)g Fi(keytime)e Fo(option\).)41 b(If)27 b(the)h(option)g(is)g(not)g(set,)h(the)f (editor)g(w)m(aits)h(un)m(til)330 1285 y(enough)h(k)m(eys)h(are)g(en)m (tered)g(to)g(resolv)m(e)h(the)e(am)m(biguit)m(y)-8 b(,)33 b(regardless)d(of)h(ho)m(w)f(long)h(it)g(tak)m(es.)225 1417 y Fm(\017)60 b Fn(tt)m(yw)m(erase)33 b([o\013)10 b(])330 1548 y(Vi)31 b Fo(only)-8 b(.)44 b(This)30 b(option)i(c)m (hanges)g(ho)m(w)f Fn(vi)g Fo(do)s(es)g(w)m(ord)g(erase)h(during)d (text)k(input.)42 b(If)30 b(this)h(option)330 1658 y(is)38 b(set,)i(text)f(is)f(brok)m(en)f(up)g(in)m(to)h(t)m(w)m(o)i(classes,)g (blank)e(c)m(haracters)h(and)e(non)m(blank)g(c)m(haracters.)330 1767 y(Changing)30 b(from)g(one)h(class)g(to)g(another)f(marks)g(the)h (end)f(of)g(a)h(w)m(ord.)225 1899 y Fm(\017)60 b Fn(v)m(erb)s(ose)31 b([o\013)10 b(])330 2030 y(Vi)36 b Fo(only)-8 b(.)60 b Fn(Vi)37 b Fo(historically)h(b)s(ells)e(the)h(terminal)g(for)g(man)m (y)f(ob)m(vious)h(mistak)m(es,)j(e.g.)61 b(trying)36 b(to)330 2140 y(mo)m(v)m(e)i(past)f(the)g(left-hand)g(margin,)i(or)e (past)g(the)g(end)f(of)h(the)g(\014le.)60 b(If)37 b(this)g(option)g(is) g(set,)i(an)330 2250 y(error)30 b(message)h(is)g(displa)m(y)m(ed)g(for) f(all)h(errors.)225 2381 y Fm(\017)60 b Fn(w300)31 b([no)g(default])330 2513 y(Vi)i Fo(only)-8 b(.)48 b(Set)32 b(the)h(windo)m(w)f(size)i(if)e (the)h(baud)f(rate)h(is)g(less)g(than)f(1200)j(baud.)46 b(See)33 b(the)g Fi(window)330 2622 y Fo(option)e(for)f(more)g (information.)225 2754 y Fm(\017)60 b Fn(w1200)32 b([no)e(default])330 2885 y(Vi)k Fo(only)-8 b(.)52 b(Set)34 b(the)g(windo)m(w)g(size)h(if)f (the)g(baud)f(rate)i(is)f(equal)g(to)h(1200)h(baud.)50 b(See)34 b(the)h Fi(window)330 2995 y Fo(option)c(for)f(more)g (information.)225 3126 y Fm(\017)60 b Fn(w9600)32 b([no)e(default])330 3258 y(Vi)24 b Fo(only)-8 b(.)40 b(Set)24 b(the)h(windo)m(w)f(size)h (if)f(the)h(baud)e(rate)i(is)g(greater)g(than)g(1200)h(baud.)37 b(See)25 b(the)g Fi(window)330 3367 y Fo(option)31 b(for)f(more)g (information.)225 3499 y Fm(\017)60 b Fn(w)m(arn)30 b([on])330 3630 y(Ex)39 b Fo(only)-8 b(.)67 b(This)39 b(option)g(causes)h(a)g(w)m (arning)f(message)h(to)g(the)f(terminal)h(if)f(the)g(\014le)h(has)f(b)s (een)330 3740 y(mo)s(di\014ed,)29 b(since)i(it)g(w)m(as)g(last)g (written,)g(b)s(efore)f(a)g Fn(!)41 b Fo(command.)225 3871 y Fm(\017)60 b Fn(windo)m(w,)30 b(w,)g(wi)g([en)m(vironmen)m(t)i (v)-5 b(ariable)31 b(LINES)f(-)g(1])330 4003 y Fo(This)c(option)i (determines)e(the)i(default)f(n)m(um)m(b)s(er)e(of)i(lines)h(in)e(a)h (screenful,)h(as)f(displa)m(y)m(ed)h(b)m(y)e(the)i Fn(z)330 4113 y Fo(command.)38 b(It)23 b(also)h(determines)f(the)g(n)m(um)m(b)s (er)f(of)h(lines)g(scrolled)g(b)m(y)g(the)g Fn(vi)g Fo(commands)g Fi(<)p Fn(con)m(trol-)330 4222 y(B)p Fi(>)42 b Fo(and)h Fi(<)p Fn(con)m(trol-F)p Fi(>)p Fo(,)48 b(and)42 b(the)h(default)g(n)m (um)m(b)s(er)f(of)h(lines)g(scrolled)h(b)m(y)f(the)g Fn(vi)g Fo(commands)330 4332 y Fi(<)p Fn(con)m(trol-D)p Fi(>)28 b Fo(and)f Fi(<)p Fn(con)m(trol-U)p Fi(>)p Fo(.)41 b(The)27 b(v)-5 b(alue)27 b(of)h(windo)m(w)e(can)h(b)s(e)g(unrelated)g (to)h(the)f(real)h(screen)330 4441 y(size,)f(although)e(it)g(starts)g (out)g(as)g(the)g(n)m(um)m(b)s(er)e(of)i(lines)g(on)f(the)h(screen.)39 b(See)25 b(the)g(section)g(en)m(titled)330 4551 y(\\)p Fn(Sizing)37 b(the)f(Screen)p Fo(")h(for)f(more)h(information.)58 b(Setting)37 b(the)f(v)-5 b(alue)37 b(of)f(the)h Fi(window)d Fo(option)j(is)330 4661 y(the)31 b(same)f(as)h(using)f(the)g Fn(-w)h Fo(command)f(line)h(option.)330 4902 y(If)26 b(the)h(v)-5 b(alue)28 b(of)f(the)g Fi(window)e Fo(option)i(\(as)h(set) f(b)m(y)g(the)g Fi(window)p Fo(,)f Fi(w300)p Fo(,)h Fi(w1200)e Fo(or)i Fi(w9600)e Fo(options\))330 5011 y(is)43 b(smaller)g(than)f (the)h(actual)h(size)g(of)f(the)f(screen,)47 b(large)c(screen)g(mo)m(v) m(emen)m(ts)i(will)e(result)f(in)330 5121 y(displa)m(ying)e(only)h (that)f(smaller)h(n)m(um)m(b)s(er)d(of)i(lines)h(on)f(the)g(screen.)69 b(\(F)-8 b(urther)40 b(mo)m(v)m(emen)m(ts)i(in)330 5230 y(that)33 b(same)g(area)h(will)e(result)h(in)f(the)h(screen)g(b)s(eing) f(\014lled.\))47 b(This)32 b(can)h(pro)m(vide)g(a)g(p)s(erformance)330 5340 y(impro)m(v)m(emen)m(t)f(when)d(viewing)i(di\013eren)m(t)g(places) g(in)f(one)h(or)f(more)h(\014les)f(o)m(v)m(er)i(a)e(slo)m(w)h(link.)p eop end %%Page: 73 76 TeXDict begin 73 75 bop 150 -116 a Fo(Chapter)30 b(18:)41 b(Set)31 b(Options)2528 b(73)330 299 y(Resetting)38 b(the)e(windo)m(w)g (size)h(do)s(es)g(not)f(reset)h(the)g(default)f(n)m(um)m(b)s(er)f(of)i (lines)f(scrolled)h(b)m(y)g(the)330 408 y Fi(<)p Fn(con)m(trol-D)p Fi(>)32 b Fo(and)d Fi(<)p Fn(con)m(trol-U)p Fi(>)j Fo(commands.)225 543 y Fm(\017)60 b Fn(windo)m(wname)30 b([o\013)10 b(])330 677 y(Vi)38 b Fo(c)m(hanges)h(the)f(name)g(of)g(the)g(editor's)h (icon/windo)m(w)f(to)h(the)f(curren)m(t)g(\014le)g(name)g(when)f(it's) 330 787 y(p)s(ossible)28 b(and)f(not)h(destructiv)m(e,)i(i.e.,)g(when)d (the)i(editor)f(can)h(restore)f(it)h(to)g(its)f(original)h(v)-5 b(alue)29 b(on)330 897 y(exit)i(or)e(when)g(the)h(icon/windo)m(w)g (will)g(b)s(e)f(discarded)g(as)h(the)g(editor)g(exits.)42 b(If)29 b(the)h Fi(windowname)330 1006 y Fo(edit)42 b(option)h(is)f (set,)j Fn(vi)d Fo(will)g(c)m(hange)h(the)g(icon/windo)m(w)f(name)g(ev) m(en)g(when)f(it's)i(destructiv)m(e)330 1116 y(and)c(the)i(icon/windo)m (w)f(name)g(will)h(remain)f(after)g(the)g(editor)h(exits.)70 b(\(This)40 b(is)g(the)g(case)h(for)330 1225 y Fi(xterm)p Fo(\(1\)\).)225 1360 y Fm(\017)60 b Fn(wraplen,)30 b(wl)g([0])330 1494 y Fo(This)g(option)i(is)f(iden)m(tical)i(to)e(the)h Fi(wrapmargin)c Fo(option,)k(with)f(the)g(exception)h(that)g(it)f(sp)s (eci\014es)330 1604 y(the)26 b(n)m(um)m(b)s(er)e(of)h(columns)g(from)g (the)h Fp(left)34 b Fo(margin)25 b(b)s(efore)g(the)h(line)g(splits,)g (not)g(the)g(righ)m(t)g(margin.)330 1848 y(If)k(b)s(oth)g Fi(wraplen)e Fo(and)i Fi(wrapmargin)d Fo(are)k(set,)g(the)g Fi(wrapmargin)c Fo(v)-5 b(alue)31 b(is)g(used.)225 1983 y Fm(\017)60 b Fn(wrapmargin,)30 b(wm)g([0])330 2117 y(Vi)35 b Fo(only)-8 b(.)55 b(If)35 b(the)g(v)-5 b(alue)36 b(of)f(the)h Fi(wrapmargin)c Fo(option)j(is)h(non-zero,)h Fn(vi)e Fo(will)g(split)h(lines)f(so)g(that)330 2227 y(they)d(end)f(at)i(least)g(that)f(n)m(um)m(b)s(er)f(of)h(columns)f(b)s (efore)h(the)g(righ)m(t-hand)g(margin)f(of)i(the)f(screen.)330 2336 y(\(Note,)39 b(the)e(v)-5 b(alue)36 b(of)h Fi(wrapmargin)c Fo(is)j Fp(not)45 b Fo(a)37 b(text)g(length.)58 b(In)36 b(a)g(screen)g(that)h(is)f(80)h(columns)330 2446 y(wide,)26 b(the)e(command)g(\\)p Fi(:set)30 b(wrapmargin=8)p Fo(")21 b(attempts)26 b(to)f(k)m(eep)g(the)g(lines)f(less)h(than)f(or)g(equal) 330 2555 y(to)31 b(72)g(columns)f(wide.\))330 2800 y(Lines)25 b(are)g(split)g(at)h(the)g(previous)e(whitespace)i(c)m(haracter)g (closest)h(to)f(the)f(n)m(um)m(b)s(er.)38 b(An)m(y)25 b(trailing)330 2909 y(whitespace)34 b(c)m(haracters)g(b)s(efore)e(that) i(c)m(haracter)g(are)f(deleted.)49 b(If)33 b(the)g(line)g(is)g(split)g (b)s(ecause)g(of)330 3019 y(an)d(inserted)g Fi()p Fo(or)e Fi()p Fo(c)m(haracter,)j(and)e(y)m(ou)i(then)f(en)m(ter)h (another)f Fi()p Fo(c)m(haracter,)330 3128 y(it)h(is)f (discarded.)330 3372 y(If)e(wrapmargin)f(is)h(set)h(to)g(0,)g(or)f(if)g (there)g(is)g(no)g(blank)g(c)m(haracter)i(up)s(on)c(whic)m(h)i(to)h (split)f(the)g(line,)330 3482 y(the)j(line)f(is)h(not)f(brok)m(en.)330 3726 y(If)g(b)s(oth)g Fi(wraplen)e Fo(and)i Fi(wrapmargin)d Fo(are)k(set,)g(the)g Fi(wrapmargin)c Fo(v)-5 b(alue)31 b(is)g(used.)225 3861 y Fm(\017)60 b Fn(wrapscan,)30 b(ws)g([on])330 3995 y Fo(This)k(option)g(causes)h(searc)m(hes)g(to)g (wrap)f(around)f(the)i(end)e(or)i(the)f(b)s(eginning)g(of)g(the)h (\014le,)h(and)330 4105 y(bac)m(k)d(to)g(the)g(starting)g(p)s(oin)m(t.) 47 b(Otherwise,)33 b(the)g(end)e(or)i(b)s(eginning)f(of)g(the)h(\014le) f(terminates)i(the)330 4214 y(searc)m(h.)225 4349 y Fm(\017)60 b Fn(writean)m(y)-8 b(,)32 b(w)m(a)e([o\013)10 b(])330 4483 y Fo(If)25 b(this)g(option)h(is)f(set,)i(\014le-o)m(v)m(erwriting) g(c)m(hec)m(ks)g(that)e(w)m(ould)g(usually)g(b)s(e)g(made)g(b)s(efore)g (the)g Fn(write)330 4593 y Fo(and)32 b Fn(xit)h Fo(commands,)h(or)e(b)s (efore)h(an)f(automatic)j(write)e(\(see)g(the)g Fi(autowrite)d Fo(option\),)35 b(are)e(not)330 4702 y(made.)41 b(This)29 b(allo)m(ws)j(a)f(write)f(to)i(an)m(y)e(\014le,)h(pro)m(vided)f(the)g (\014le)h(p)s(ermissions)e(allo)m(w)j(it.)p eop end %%Page: 74 77 TeXDict begin 74 76 bop 150 -116 a Fo(Chapter)30 b(19:)41 b(Index)2776 b(74)150 299 y Fl(19)80 b(Index)150 610 y Fk(!)150 732 y Fd(!)8 b Fc(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fd(22)150 823 y Fb(!)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(47)150 1072 y Fa(")150 1194 y Fb(")17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(46)150 1284 y Fb(")p Fd(!)p Fb(")24 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(47)150 1374 y Fb(")p Fd(#)p Fb(")20 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)45 b Fd(47)150 1465 y Fb(")p Fd(*)p Fb(")14 b Fc(.)g(.)e(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)40 b Fd(48)150 1555 y Fb("<)p Fd(carriage-return)p Fb(>")17 b Fc(.)d(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(13)150 1645 y Fb("<)p Fd(con)n(trol-D)p Fb(>")17 b Fc(.)d(.)e(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)43 b Fd(46)150 1735 y Fb("<)p Fd(con)n(trol-W)p Fb(>")7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)33 b Fd(43)150 1826 y Fb("<)p Fd(con)n(trol-X)p Fb(>")18 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)44 b Fd(43)150 1916 y Fb("<)p Fd(end-of-\014le)p Fb(>")22 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)48 b Fd(45,)26 b(46)150 2006 y Fb("<)p Fd(line)h(erase)p Fb(>")21 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)45 b Fd(43)150 2096 y Fb("<)p Fd(literal-next)p Fb(>")21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(11,)26 b(43)150 2186 y Fb("<)p Fd(w)n(ord)g(erase)p Fb(>")16 b Fc(.)e(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fd(43)150 2277 y Fb(")p Fd(@)p Fb(")22 b Fc(.)12 b(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(48)150 2367 y Fb(")p Fd(alternate)27 b(pathname)p Fb(")14 b Fc(.)e(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)39 b Fd(11)150 2457 y Fb(")p Fd(bigw)n(ord)p Fb(")9 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)35 b Fd(16)150 2547 y Fb(")p Fd(coun)n(t)p Fb(")6 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(15,)26 b(45)150 2638 y Fb(")p Fd(curren)n(t)f(pathname)p Fb(")6 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)32 b Fd(11)150 2728 y Fb(")p Fd(\014le)p Fb(")21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(45)150 2818 y Fb(")p Fd(\015ags)p Fb(")13 b Fc(.)h(.)e(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fd(45)150 2908 y Fb(")p Fd(line)p Fb(")10 b Fc(.)j(.)g(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fd(45)150 2999 y Fb(")p Fd(motion)p Fb(")7 b Fc(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) 33 b Fd(14)150 3089 y Fb(")p Fd(n)n(um)n(b)r(er)p Fb(")16 b Fc(.)11 b(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)41 b Fd(47)150 3179 y Fb(")p Fd(paragraph)p Fb(")8 b Fc(.)13 b(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)34 b Fd(16)150 3269 y Fb(")p Fd(previous)26 b(con)n(text)p Fb(")11 b Fc(.)h(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)37 b Fd(14)150 3360 y Fb(")p Fd(range)p Fb(")14 b Fc(.)g(.)e(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)40 b Fd(45)150 3450 y Fb(")p Fd(section)p Fb(")9 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 34 b Fd(16)150 3540 y Fb(")p Fd(sen)n(tence)p Fb(")21 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) 46 b Fd(16)150 3630 y Fb(")p Fd(unnamed)25 b(bu\013er)p Fb(")6 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)32 b Fd(12)150 3879 y Fk(#)150 4001 y Fd(#)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)48 b Fd(22)150 4092 y Fb(#)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(47)150 4350 y Fk($)150 4473 y Fd($)17 b Fc(.)c(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(23)150 4735 y Fk(\045)150 4858 y Fd(\045)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)48 b Fd(23)150 5106 y Fk(&)150 5229 y Fd(&)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)44 b Fd(24,)26 b(57)2025 610 y Fk(')2025 726 y Fb(')c Fc(.)12 b(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(24)2025 969 y Fk(\()2025 1085 y Fd(\()21 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(24)2025 1347 y Fk(\))2025 1463 y Fd(\))21 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(25)2025 1724 y Fk(*)2025 1840 y Fb(*)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(48)2025 2073 y Fa(+)2025 2189 y Fb(+)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(19)2025 2422 y Fk(,)2025 2538 y Fd(,)8 b Fc(.)k(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(25)2025 2771 y Fk(-)2025 2887 y Fb(-)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(25)2025 3120 y Fk(.)2025 3236 y Fd(.)8 b Fc(.)k(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(26)2025 3479 y Fk(/)2025 3595 y Fd(/RE/)16 b Fc(.)d(.)f(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)42 b Fd(26)2025 3682 y Fb(/RE)7 b Fc(.)17 b(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)33 b Fd(26)2025 3915 y Fk(:)2025 4031 y Fd(:)8 b Fc(.)k(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(27)2025 4264 y Fk(;)2025 4380 y Fd(;)8 b Fc(.)k(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)33 b Fd(28)2025 4613 y Fa(<)2025 4729 y Fb(<)9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)35 b Fd(28,)27 b(48)2025 4817 y Fb(<)f(motion)14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)39 b Fd(28)2025 4904 y Fb(<[<)26 b(...])14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)39 b Fd(48)2025 4991 y Fb(<)p Fd(con)n(trol-])p Fb(>)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)47 b Fd(21)2025 5078 y Fb(<)p Fd(con)n(trol-)p Fb(^>)12 b Fc(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)38 b Fd(21)2025 5166 y Fb(<)p Fd(con)n(trol-A)p Fb(>)21 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)47 b Fd(17)2025 5253 y Fb(<)p Fd(con)n(trol-B)p Fb(>)23 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(17)2025 5340 y Fb(<)p Fd(con)n(trol-D)p Fb(>)13 b Fc(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fd(17,)27 b(42)p eop end %%Page: 75 78 TeXDict begin 75 77 bop 150 -116 a Fo(Chapter)30 b(19:)41 b(Index)2776 b(75)150 299 y Fb()23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)46 b Fd(46)150 386 y Fb(<)p Fd(con)n(trol-E)p Fb(>)25 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(18)150 474 y Fb(<)p Fd(con)n(trol-F)p Fb(>)7 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)32 b Fd(18)150 561 y Fb(<)p Fd(con)n(trol-G)p Fb(>)21 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)45 b Fd(18)150 648 y Fb(<)p Fd(con)n(trol-H)p Fb(>)14 b Fc(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40 b Fd(18,)26 b(43)150 736 y Fb(<)p Fd(con)n(trol-J)p Fb(>)12 b Fc(.)h(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fd(19)150 823 y Fb(<)p Fd(con)n(trol-L)p Fb(>)8 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)33 b Fd(19)150 910 y Fb(<)p Fd(con)n(trol-M)p Fb(>)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)40 b Fd(19)150 998 y Fb(<)p Fd(con)n(trol-N)p Fb(>)21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(19)150 1085 y Fb(<)p Fd(con)n(trol-P)p Fb(>)25 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(19)150 1173 y Fb(<)p Fd(con)n(trol-R)p Fb(>)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)47 b Fd(19)150 1260 y Fb(<)p Fd(con)n(trol-T)p Fb(>)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)41 b Fd(20,)26 b(42)150 1347 y Fb(<)p Fd(con)n(trol-U)p Fb(>)21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)46 b Fd(20)150 1435 y Fb(<)p Fd(con)n(trol-W)p Fb(>)10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fd(20)150 1522 y Fb()23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)46 b Fd(43)150 1609 y Fb([0-9A-Fa-f]+)26 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)47 b Fd(43)150 1697 y Fb(<)p Fd(con)n(trol-Y)p Fb(>)21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(20)150 1784 y Fb(<)p Fd(con)n(trol-Z)p Fb(>)8 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)34 b Fd(20)150 1871 y Fb()23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)46 b Fd(58)150 1959 y Fb()18 b Fc(.)d(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fd(46)150 2046 y Fb(<)p Fd(erase)p Fb(>)24 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)48 b Fd(43)150 2133 y Fb(<)p Fd(escap)r(e)p Fb(>)9 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(21,)26 b(43)150 2221 y Fb(<)p Fd(in)n(terrupt)p Fb(>)14 b Fc(.)d(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fd(11,)27 b(41,)f(43)150 2308 y Fb()8 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)33 b Fd(43)150 2396 y Fb()16 b Fc(.)g(.)c(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)42 b Fd(43)150 2483 y Fb(<)p Fd(newline)p Fb(>)17 b Fc(.)c(.)g(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)42 b Fd(13)150 2570 y Fb(<)p Fd(n)n(ul)p Fb(>)18 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)43 b Fd(42)150 2658 y Fb(<)p Fd(space)p Fb(>)16 b Fc(.)e(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)42 b Fd(21)150 2745 y Fb()8 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)33 b Fd(43)150 2979 y Fk(=)150 3095 y Fd(=)7 b Fc(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)32 b Fd(48)150 3329 y Fa(>)150 3445 y Fb(>)9 b Fc(.)k(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fd(28,)26 b(48)150 3533 y Fb(>[>)g(...])14 b Fc(.)f(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)39 b Fd(48)150 3776 y Fk(?)150 3892 y Fb(?RE)7 b Fc(.)17 b(.)c(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) 33 b Fd(26)150 3979 y(?RE?)19 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)44 b Fd(26)150 4213 y Fk(@)150 4329 y Fd(@)7 b Fc(.)12 b(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)32 b Fd(28)150 4573 y Fk([)150 4689 y Fd([[)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)41 b Fd(34)150 4777 y Fb([count])27 b(\()12 b Fc(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)38 b Fd(24)150 4864 y Fb([count])27 b(C)12 b Fc(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)38 b Fd(29)150 4951 y Fb([range]!)7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) 32 b Fd(47)150 5211 y Fk(])150 5328 y Fb(]])15 b Fc(.)e(.)g(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)41 b Fd(34)2025 299 y Fa(^)2025 416 y Fb(^)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(35)2025 504 y Fb(^)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)45 b Fd(42)p 2034 741 41 6 v 2025 859 a Fb(_)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(35)2025 1106 y Fk(`)2025 1223 y Fb(`)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(24)2025 1460 y Fa({)2025 1577 y Fb({)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(40)2025 1824 y Fa(})2025 1941 y Fb(})17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(40)2025 2187 y Fa(|)2025 2305 y Fb(|)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(40)2025 2541 y Fa(~)2025 2659 y Fb(~)9 b Fc(.)k(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(41,)27 b(57)2025 2907 y Fk(0)2025 3025 y Fb(0)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(27)2025 3113 y Fb(0)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)45 b Fd(42)2025 3349 y Fk(A)2025 3467 y Fb(a)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(35)2025 3555 y Fb(A)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(29)2025 3643 y Fb(a[ppend][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(49)2025 3731 y Fb(ab[brev])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)32 b Fd(48)2025 3819 y(abbrev)13 b Fc(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fd(48)2025 3907 y(alt)n(w)n(erase)10 b Fc(.)k(.)e(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(62)2025 3995 y(app)r(end)22 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)49 b Fd(49)2025 4082 y Fb(ar[gs])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(49)2025 4170 y(args)23 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)48 b Fd(49)2025 4258 y(autoinden)n(t)19 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 45 b Fd(63)2025 4346 y(autoprin)n(t)7 b Fc(.)12 b(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(63)2025 4434 y(auto)n(write)24 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(63)2025 4671 y Fk(B)2025 4788 y Fb(b)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(35)2025 4876 y Fb(B)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(29)2025 4964 y(bac)n(kup)8 b Fc(.)j(.)h(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)34 b Fd(64)2025 5052 y(b)r(eautify)8 b Fc(.)k(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)34 b Fd(64)2025 5140 y Fb(bg)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fd(49)2025 5228 y(bu\013er)12 b Fc(.)f(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(11)2025 5316 y Fb(buffer)10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(48)p eop end %%Page: 76 79 TeXDict begin 76 78 bop 150 -116 a Fo(Chapter)30 b(19:)41 b(Index)2776 b(76)150 299 y Fk(C)150 417 y Fb(c)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(36)150 505 y(C)9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)34 b Fd(29)150 594 y Fb(c[hange][!])23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)46 b Fd(50)150 682 y(cd)16 b Fc(.)c(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)42 b Fd(50)150 770 y Fb(cd[!])11 b Fc(.)j(.)e(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)37 b Fd(50)150 859 y(cdpath)12 b Fc(.)g(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(64)150 947 y(cedit)10 b Fc(.)i(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(64)150 1035 y(c)n(hange)13 b Fc(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fd(50)150 1124 y Fb(chd[ir][!])24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(50)150 1212 y(c)n(hdir)7 b Fc(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)32 b Fd(50)150 1300 y Fb(co[py])10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(50)150 1389 y(columns)9 b Fc(.)k(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)34 b Fd(65)150 1477 y(commen)n(t)11 b Fc(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)37 b Fd(65)150 1565 y(cop)n(y)14 b Fc(.)e(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40 b Fd(50)150 1654 y Fb(cs[cope])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)32 b Fd(50)150 1742 y(cscop)r(e)20 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(50)150 1997 y Fk(D)150 2116 y Fb(d)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(36)150 2204 y Fb(D)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(29)150 2292 y Fb(d[elete])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)32 b Fd(50)150 2381 y(delete)11 b Fc(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)36 b Fd(50)150 2469 y Fb(di[splay])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)49 b Fd(51)150 2557 y(directory)13 b Fc(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)39 b Fd(65)150 2646 y(displa)n(y)10 b Fc(.)i(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(51)150 2734 y(DOUBLEQUOTE)19 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)45 b Fd(46)150 2989 y Fk(E)150 3108 y Fb(e)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(36)150 3196 y Fb(E)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(30)150 3284 y Fb(e[dit][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(51)150 3373 y(edcompatible)14 b Fc(.)f(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)40 b Fd(65)150 3461 y(edit)9 b Fc(.)j(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)34 b Fd(51)150 3549 y(errorb)r(ells)6 b Fc(.)14 b(.)f(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)32 b Fd(65)150 3638 y(escap)r(etime)17 b Fc(.)d(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)43 b Fd(65)150 3726 y Fb(ex[!])11 b Fc(.)j(.)e(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)37 b Fd(51)150 3814 y(exrc)21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)47 b Fd(65)150 3903 y(extended)13 b Fc(.)e(.)i(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fd(65)150 3991 y Fb(exu[sage])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(51)150 4079 y(exusage)16 b Fc(.)d(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)42 b Fd(51)150 4335 y Fk(F)150 4453 y Fb(f)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(36)150 4541 y Fb(F)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(30)150 4630 y Fb(f[ile])10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(51)150 4718 y Fb(fg)15 b Fc(.)e(.)g(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fd(52)150 4806 y(\014le)24 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(51)150 4895 y(\014lec)7 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)32 b Fd(65)150 4983 y(\015ash)14 b Fc(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fd(66)150 5222 y Fk(G)150 5340 y Fb(G)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(30)2025 299 y Fb(g[lobal])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(52)2025 386 y(global)9 b Fc(.)k(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)35 b Fd(52)2025 636 y Fk(H)2025 752 y Fb(h)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(18)2025 839 y Fb(H)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(30)2025 926 y(hardtabs)16 b Fc(.)c(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fd(66)2025 1014 y Fb(he[lp])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(53)2025 1101 y(help)20 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(53)2025 1351 y Fk(I)2025 1467 y Fb(i)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(36)2025 1554 y Fb(I)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(31)2025 1641 y Fb(i[nsert][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(53)2025 1729 y(iclo)n(w)n(er)12 b Fc(.)i(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(66)2025 1816 y(ignorecase)11 b Fc(.)j(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)37 b Fd(66)2025 1903 y(insert)15 b Fc(.)d(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)41 b Fd(53)2025 2136 y Fk(J)2025 2252 y Fb(j)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(19)2025 2340 y Fb(J)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(31)2025 2427 y Fb(j[oin][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(53)2025 2514 y(join)10 b Fc(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)36 b Fd(53)2025 2764 y Fk(K)2025 2880 y Fb(k)9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(19,)27 b(54)2025 2967 y(k)n(eytime)14 b Fc(.)e(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)40 b Fd(66)2025 3217 y Fk(L)2025 3333 y Fb(l)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(21)2025 3420 y Fb(L)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(31)2025 3508 y Fb(l[ist])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(53)2025 3595 y(leftrigh)n(t)11 b Fc(.)i(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)37 b Fd(66)2025 3682 y(lines)16 b Fc(.)d(.)f(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fd(66)2025 3769 y(lisp)15 b Fc(.)e(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)41 b Fd(66)2025 3857 y(list)14 b Fc(.)f(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fd(53,)27 b(66)2025 3944 y(lo)r(c)n(k)d Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(67)2025 4177 y Fk(M)2025 4293 y Fb(m)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(37)2025 4380 y Fb(M)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(31)2025 4468 y Fb(m[ove])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(54)2025 4555 y Fb(ma[rk])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)35 b Fd(54)2025 4642 y(magic)11 b Fc(.)i(.)g(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)37 b Fd(67)2025 4729 y(map)18 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)44 b Fd(53)2025 4816 y Fb(map[!])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(53)2025 4904 y(mark)22 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(54)2025 4991 y(matc)n(h)n(time)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)49 b Fd(67)2025 5078 y(mesg)8 b Fc(.)k(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(67)2025 5165 y(MINUSSIGN)14 b Fc(.)c(.)j(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)40 b Fd(25)2025 5253 y Fb(mk[exrc][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(54)2025 5340 y(mk)n(exrc)7 b Fc(.)k(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(54)p eop end %%Page: 77 80 TeXDict begin 77 79 bop 150 -116 a Fo(Chapter)30 b(19:)41 b(Index)2776 b(77)150 299 y Fd(mo)r(delines)16 b Fc(.)e(.)e(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)42 b Fd(67)150 386 y(mo)n(v)n(e)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)48 b Fd(54)150 473 y(msgcat)10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(67)150 723 y Fk(N)150 839 y Fb(n)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(26)150 927 y Fb(N)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(26)150 1014 y Fb(n[ext][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(54)150 1101 y(next)17 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(54)150 1188 y(noprin)n(t)22 b Fc(.)13 b(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)48 b Fd(68)150 1276 y Fb(nu[mber])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)32 b Fd(47)150 1363 y(n)n(um)n(b)r(er)18 b Fc(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)44 b Fd(68)150 1596 y Fk(O)150 1712 y Fb(o)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(37)150 1799 y Fb(O)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(32)150 1887 y Fb(o[pen])10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(55)150 1974 y(o)r(ctal)9 b Fc(.)k(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)34 b Fd(68)150 2061 y(op)r(en)22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)48 b Fd(55,)26 b(68)150 2148 y(optimize)c Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) 46 b Fd(68)150 2398 y Fk(P)150 2514 y Fb(p)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(37)150 2601 y Fb(P)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(32)150 2689 y Fb(p[rint])8 b Fc(.)14 b(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)34 b Fd(55)150 2776 y(paragraphs)14 b Fc(.)f(.)g(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)39 b Fd(68)150 2863 y(path)14 b Fc(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40 b Fd(68)150 2950 y Fb(pre[serve])24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(55)150 3038 y(preserv)n(e)9 b Fc(.)j(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)34 b Fd(55)150 3125 y Fb(prev[ious][!])18 b Fc(.)d(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fd(55)150 3212 y(previous)24 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(55)150 3299 y(prin)n(t)19 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b Fd(55,)26 b(69)150 3387 y(prompt)21 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)47 b Fd(69)150 3474 y Fb(pu[t])11 b Fc(.)j(.)e(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)37 b Fd(55)150 3561 y(put)15 b Fc(.)d(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)41 b Fd(55)150 3811 y Fk(Q)150 3927 y Fb(Q)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(32)150 4014 y Fb(q[uit][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) 49 b Fd(56)150 4102 y(quit)23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(56)150 4351 y Fk(R)150 4467 y Fb(r)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(37)150 4555 y Fb(R)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(32)150 4642 y Fb(r[ead][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)49 b Fd(56)150 4729 y(read)18 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)44 b Fd(56)150 4816 y(readonly)20 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) 45 b Fd(69)150 4904 y Fb(rec[over])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(56)150 4991 y(recdir)13 b Fc(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)38 b Fd(69)150 5078 y(reco)n(v)n(er)9 b Fc(.)j(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)34 b Fd(56)150 5165 y(redra)n(w)13 b Fc(.)g(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)38 b Fd(69)150 5253 y(remap)23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)48 b Fd(69)150 5340 y(rep)r(ort)24 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)49 b Fd(70)2025 299 y Fb(res[ize])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 32 b Fd(56)2025 386 y(resize)17 b Fc(.)c(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(56)2025 474 y Fb(rew[ind][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)46 b Fd(56)2025 562 y(rewind)14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)40 b Fd(56)2025 649 y(ruler)12 b Fc(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(70)2025 884 y Fk(S)2025 1001 y Fb(s)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(38)2025 1089 y Fb(S)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(32)2025 1176 y Fb(s[ubstitute])22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)45 b Fd(57)2025 1264 y(scroll)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)47 b Fd(70)2025 1352 y Fb(se[t])11 b Fc(.)i(.)g(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)37 b Fd(57)2025 1439 y(searc)n(hincr)14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)40 b Fd(70)2025 1527 y(sections)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)41 b Fd(70)2025 1614 y(secure)6 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)32 b Fd(70)2025 1702 y(set)7 b Fc(.)13 b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)33 b Fd(57)2025 1790 y Fb(sh[ell])8 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)34 b Fd(57)2025 1877 y(shell)9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)34 b Fd(57,)27 b(70)2025 1965 y(shellmeta)e Fc(.)12 b(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(70)2025 2052 y(shift)n(width)13 b Fc(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)39 b Fd(71)2025 2140 y(sho)n(wmatc)n(h)14 b Fc(.)f(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)40 b Fd(71)2025 2228 y(sho)n(wmo)r(de)9 b Fc(.)k(.)f(.)h(.)f(.)g(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)34 b Fd(71)2025 2315 y(sidescroll)12 b Fc(.)i(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fd(71)2025 2403 y(slo)n(w)n(op)r(en)13 b Fc(.)g(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)39 b Fd(71)2025 2490 y Fb(so[urce])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) 32 b Fd(57)2025 2578 y(source)23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)48 b Fd(57)2025 2666 y(sourcean)n(y)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fd(71)2025 2753 y(splitting,)26 b(v)n(ertically)10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)36 b Fd(51)2025 2841 y(SQUOTE)p Fb(<)p Fd(c)n(haracter)p Fb(>)24 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(24)2025 2928 y Fb(st[op][!])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(58)2025 3016 y(stop)20 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)46 b Fd(58)2025 3104 y Fb(su[spend][!])22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(58)2025 3191 y(substitute)15 b Fc(.)d(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)41 b Fd(57)2025 3279 y(susp)r(end)12 b Fc(.)f(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fd(58)2025 3531 y Fk(T)2025 3647 y Fb(t)9 b Fc(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(38,)27 b(50)2025 3735 y Fb(T)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(33)2025 3823 y Fb(ta[g][!])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(58)2025 3910 y(tabstop)19 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)45 b Fd(71)2025 3998 y(tag)20 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)45 b Fd(58)2025 4085 y(taglength)24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)50 b Fd(71)2025 4173 y Fb(tagn[ext][!])22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(59)2025 4261 y(tagnext)18 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)44 b Fd(59)2025 4348 y Fb(tagp[op][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)46 b Fd(59)2025 4436 y Fb(tagp[rev][!])22 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)45 b Fd(59)2025 4523 y(tagp)r(op)11 b Fc(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)37 b Fd(59)2025 4611 y(tagprev)18 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)44 b Fd(59)2025 4699 y(tags)23 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(71)2025 4786 y Fb(tagt[op][!])23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)46 b Fd(59)2025 4874 y(tagtop)19 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)44 b Fd(59)2025 4961 y(term)12 b Fc(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(71)2025 5049 y(terse)12 b Fc(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fd(71)2025 5137 y(tildeop)12 b Fc(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)38 b Fd(72)2025 5224 y(timeout)15 b Fc(.)e(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fd(72)2025 5312 y(tt)n(yw)n(erase)23 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)48 b Fd(72)p eop end %%Page: 78 81 TeXDict begin 78 80 bop 150 -116 a Fo(Chapter)30 b(19:)41 b(Index)2776 b(78)150 299 y Fk(U)150 415 y Fb(u)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(38)150 502 y Fb(U)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(33)150 589 y Fb(u[ndo])10 b Fc(.)j(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(60)150 676 y Fb(una[bbrev])24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)47 b Fd(60)150 764 y(unabbrev)7 b Fc(.)k(.)h(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)32 b Fd(60)150 851 y(undo)8 b Fc(.)j(.)i(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(60)150 938 y Fb(unm[ap][!])24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(60)150 1025 y(unmap)12 b Fc(.)g(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)38 b Fd(60)150 1275 y Fk(V)150 1391 y Fb(v)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(52)150 1478 y Fb(ve[rsion])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(60)150 1565 y(v)n(erb)r(ose)21 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)46 b Fd(72)150 1652 y(v)n(ersion)10 b Fc(.)i(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(60)150 1740 y(v)n(ertical)26 b(split)9 b Fc(.)k(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)34 b Fd(51)150 1827 y Fb(vi[sual])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)32 b Fd(60)150 1914 y Fb(vi[sual][!])23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)46 b Fd(60)150 2001 y(visual)12 b Fc(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)37 b Fd(60)150 2088 y Fb(viu[sage])25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)49 b Fd(60)150 2176 y(viusage)23 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)48 b Fd(60)150 2263 y Fb(vs[plit][!])23 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)46 b Fd(51)150 2515 y Fk(W)150 2631 y Fb(w)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(38)150 2718 y Fb(W)17 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)42 b Fd(33)150 2805 y Fb(w[rite])8 b Fc(.)14 b(.)e(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)34 b Fd(61)150 2892 y Fb(w[rite][!])24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)47 b Fd(61)150 2979 y(w1200)25 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(72)150 3067 y(w300)25 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)49 b Fd(72)150 3154 y(w9600)25 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)48 b Fd(72)2025 299 y(w)n(arn)9 b Fc(.)j(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)34 b Fd(72)2025 387 y(whitespace)18 b Fc(.)c(.)e(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)44 b Fd(13)2025 475 y(windo)n(w)19 b Fc(.)12 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)44 b Fd(72)2025 563 y(windo)n(wname)21 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)45 b Fd(73)2025 651 y(wn)24 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)49 b Fd(61)2025 739 y Fb(wn[!])11 b Fc(.)i(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)37 b Fd(61)2025 827 y(w)n(ord)9 b Fc(.)j(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)34 b Fd(15)2025 914 y(wq)7 b Fc(.)12 b(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(61)2025 1002 y Fb(wq[!])11 b Fc(.)i(.)g(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)37 b Fd(61)2025 1090 y(wraplen)13 b Fc(.)g(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)39 b Fd(73)2025 1178 y(wrapmargin)17 b Fc(.)d(.)e(.)h(.)f(.) g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)43 b Fd(73)2025 1266 y(wrapscan)8 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)33 b Fd(73)2025 1354 y(write)24 b Fc(.)13 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)49 b Fd(61)2025 1442 y(writean)n(y)19 b Fc(.)12 b(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)44 b Fd(73)2025 1695 y Fk(X)2025 1813 y Fb(x)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(39)2025 1901 y Fb(X)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(33)2025 1989 y Fb(x[it][!])7 b Fc(.)14 b(.)e(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)32 b Fd(61)2025 2077 y(xit)9 b Fc(.)j(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)35 b Fd(61)2025 2314 y Fk(Y)2025 2431 y Fb(y)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(39)2025 2519 y Fb(Y)17 b Fc(.)12 b(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)43 b Fd(33)2025 2607 y Fb(ya[nk])10 b Fc(.)j(.)f(.)h(.)f(.)g(.)h(.)f(.)g (.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.) f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)35 b Fd(61)2025 2695 y(y)n(ank)11 b Fc(.)g(.)h(.)h(.)f(.)g(.)h(.)f(.)g(.)h (.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)37 b Fd(61)2025 2948 y Fk(Z)2025 3066 y Fb(z)9 b Fc(.)k(.)f(.)g(.)h(.)f(.) g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)35 b Fd(39,)27 b(62)2025 3154 y Fb(ZZ)15 b Fc(.)e(.)f(.)h(.)f(.)g(.)h(.)f (.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)41 b Fd(34)p eop end %%Trailer userdict /end-hook known{end-hook}if %%EOF nvi-1.81.6/docs/vitut/0040755000076400001440000000000010720065733013562 5ustar skimousersnvi-1.81.6/docs/vitut/Makefile0100644000076400001440000000202610720065506015215 0ustar skimousers# $Id: Makefile,v 8.10 2001/01/28 15:50:08 skimo Exp $ (Berkeley) $Date: 2001/01/28 15:50:08 $ MACROS= -ms ROFF= groff TBL= tbl all: vitut.ps summary.ps viapwh.ps ../html/vitut.html ../html/vi-summary.html \ ../html/viapwh.html vitut.ps: vi.in vi.chars ${TBL} vi.in vi.chars | ${ROFF} ${MACROS} > $@ chmod 444 $@ summary.ps: vi.summary ${TBL} vi.summary | ${ROFF} ${MACROS} > $@ chmod 444 $@ viapwh.ps: vi.apwh.ms ${TBL} vi.apwh.ms | ${ROFF} ${MACROS} > $@ chmod 444 $@ ../html/vitut.html: vi.in vi.chars test -d ../html || mkdir ../html ${TBL} $+ | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f *png chmod 444 $@ ../html/vi-summary.html: vi.summary ${TBL} $< | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ ../html/viapwh.html: vi.apwh.ms ${TBL} $< | ${ROFF} -ms -Thtml | \ sed 's///' > $@ rm -f "$<"*png chmod 444 $@ clean: rm -f vitut.ps summary.ps viapwh.ps ../html/vitut.html \ ../html/vi-summary.html ../html/viapwh.html nvi-1.81.6/docs/vitut/vi.apwh.ms0100644000076400001440000011416310720065506015500 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: vi.apwh.ms,v 8.3 2001/01/28 13:48:01 skimo Exp $ (Berkeley) $Date: 2001/01/28 13:48:01 $ .\" .nr LL 6.5i .nr FL 6.5i .TL Vi Command & Function Reference .AU Alan P.W. Hewett .sp Revised for version 2.12 by Mark Horton .NH 1 Author's Disclaimer .LP This document does not claim to be 100% complete. There are a few commands listed in the original document that I was unable to test either because I do not speak \fBlisp\fR, because they required programs we don't have, or because I wasn't able to make them work. In these cases I left the command out. The commands listed in this document have been tried and are known to work. It is expected that prospective users of this document will read it once to get the flavor of everything that \fBvi\fR can do and then use it as a reference document. Experimentation is recommended. If you don't understand a command, try it and see what happens. .LP [Note: In revising this document, I have attempted to make it completely reflect version 2.12 of .B vi . It does not attempt to document the VAX version (version 3), but with one or two exceptions (wrapmargin, arrow keys) everything said about 2.12 should apply to 3.1. .I "Mark Horton" ] .NH 1 Notation .LP \fB[option]\fR is used to denote optional parts of a command. Many \fBvi\fR commands have an optional count. \fB[cnt]\fR means that an optional number may precede the command to multiply or iterate the command. \fB{variable item}\fR is used to denote parts of the command which must appear, but can take a number of different values. \fB\fR means that the character or one of the characters in the range described between the two angle brackets is to be typed. For example \fB\fR means the \fBescape\fR key is to be typed. \fB\fR means that a lower case letter is to be typed. \fB^\fR means that the character is to be typed as a \fBcontrol\fR character, that is, with the \fB\fR key held down while simultaneously typing the specified character. In this document control characters will be denoted using the \fIupper case\fR character, but ^ and ^ are equivalent. That is, for example, \fB<^D>\fR is equal to \fB<^d>\fR. The most common character abbreviations used in this list are as follows: .IP 8 escape, octal 033 .IP 8 carriage return, ^M, octal 015 .IP 8 linefeed ^J, octal 012 .IP 8 newline, ^J, octal 012 (same as linefeed) .IP 8 backspace, ^H, octal 010 .IP 8 tab, ^I, octal 011 .IP 8 bell, ^G, octal 07 .IP 8 formfeed, ^L, octal 014 .IP 8 space, octal 040 .IP 8 delete, octal 0177 .sp 1 .NH 1 Basics .LP To run \fBvi\fR the shell variable \fBTERM\fR must be defined and exported to your environment. How you do this depends on which shell you are using. You can tell which shell you have by the character it prompts you for commands with. The Bourne shell prompts with `$', and the C shell prompts with `%'. For these examples, we will suppose that you are using an HP 2621 terminal, whose termcap name is ``2621''. .NH 2 Bourne Shell .LP To manually set your terminal type to 2621 you would type: .DS TERM=2621 export TERM .DE .PP There are various ways of having this automatically or semi-automatically done when you log in. Suppose you usually dial in on a 2621. You want to tell this to the machine, but still have it work when you use a hardwired terminal. The recommended way, if you have the .B tset program, is to use the sequence .DS tset \-s \-d 2621 > tset$$ \&. tset$$ rm tset$$ .DE in your .login (for csh) or the same thing using `.' instead of `source' in your .profile (for sh). The above line says that if you are dialing in you are on a 2621, but if you are on a hardwired terminal it figures out your terminal type from an on-line list. .NH 2 The C Shell .LP To manually set your terminal type to 2621 you would type: .DS setenv TERM 2621 .DE .PP There are various ways of having this automatically or semi-automatically done when you log in. Suppose you usually dial in on a 2621. You want to tell this to the machine, but still have it work when you use a hardwired terminal. The recommended way, if you have the .B tset program, is to use the sequence .DS tset \-s \-d 2621 > tset$$ source tset$$ rm tset$$ .DE in your .login.* .FS * On a version 6 system without environments, the invocation of tset is simpler, just add the line ``tset \-d 2621'' to your .login or .profile. .FE The above line says that if you are dialing in you are on a 2621, but if you are on a hardwired terminal it figures out your terminal type from an on-line list. .NH 1 Normal Commands .LP \fBVi\fR is a visual editor with a window on the file. What you see on the screen is \fBvi\fR's current notion of what your file will contain, (at this point in the file), when it is written out. Most commands do not cause any change in the screen until the complete command is typed. Should you get confused while typing a command, you can abort the command by typing an character. You will know you are back to command level when you hear a . Usually typing an will produce the same result. When \fBvi\fR gets an improperly formatted command it rings the . Following are the \fBvi\fR commands broken down by function. .NH 2 Entry and Exit .LP To enter .B vi on a particular .I file , type .DS \fBvi\fP \fIfile\fP .DE The file will be read in and the cursor will be placed at the beginning of the first line. The first screenfull of the file will be displayed on the terminal. .PP To get out of the editor, type .DS ZZ .DE If you are in some special mode, such as input mode or the middle of a multi-keystroke command, it may be necessary to type first. .NH 2 Cursor and Page Motion .LP .B NOTE: The arrow keys (see the next four commands) on certain kinds of terminals will not work with the PDP-11 version of vi. The control versions or the hjkl versions will work on any terminal. Experienced users prefer the hjkl keys because they are always right under their fingers. Beginners often prefer the arrow keys, since they do not require memorization of which hjkl key is which. The mnemonic value of hjkl is clear from looking at the keyboard of an adm3a. .sp .IP "[cnt] or [cnt]h or [cnt]\(<-" 16 .br Move the cursor to the left one character. Cursor stops at the left margin of the page. If cnt is given, these commands move that many spaces. .IP "[cnt]^N or [cnt]j or [cnt]\(da or [cnt]" 16 .br Move down one line. Moving off the screen scrolls the window to force a new line onto the screen. Mnemonic: \fBN\fRext .IP "[cnt]^P or [cnt]k or [cnt]\(ua" 16 .br Move up one line. Moving off the top of the screen forces new text onto the screen. Mnemonic: \fBP\fRrevious .IP "[cnt] or [cnt]l or [cnt]\(->" 16 .br Move to the right one character. Cursor will not go beyond the end of the line. .IP [cnt]- 16 Move the cursor up the screen to the beginning of the next line. Scroll if necessary. .IP "[cnt]+ or [cnt]" 16 .sp 1 Move the cursor down the screen to the beginning of the next line. Scroll up if necessary. .IP "[cnt]$" 16 Move the cursor to the end of the line. If there is a count, move to the end of the line "cnt" lines forward in the file. .IP "^" 16 Move the cursor to the beginning of the first word on the line. .IP "0" 16 Move the cursor to the left margin of the current line. .IP "[cnt]|" 16 Move the cursor to the column specified by the count. The default is column zero. .IP "[cnt]w" 16 Move the cursor to the beginning of the next word. If there is a count, then move forward that many words and position the cursor at the beginning of the word. Mnemonic: next-\fBw\fRord .IP "[cnt]W" 16 Move the cursor to the beginning of the next word which follows a "white space" (,, or ). Ignore other punctuation. .IP "[cnt]b" 16 Move the cursor to the preceding word. Mnemonic: \fBb\fRackup-word .IP "[cnt]B" 16 Move the cursor to the preceding word that is separated from the current word by a "white space" (,, or ). .IP "[cnt]e" 16 Move the cursor to the end of the current word or the end of the "cnt"'th word hence. Mnemonic: \fBe\fRnd-of-word .IP "[cnt]E" 16 Move the cursor to the end of the current word which is delimited by "white space" (,, or ). .IP "[line number]G" 16 .br Move the cursor to the line specified. Of particular use are the sequences "1G" and "G", which move the cursor to the beginning and the end of the file respectively. Mnemonic: \fBG\fRo-to .LP .B NOTE: The next four commands (^D, ^U, ^F, ^B) are not true motion commands, in that they cannot be used as the object of commands such as delete or change. .IP "[cnt]^D" 16 Move the cursor down in the file by "cnt" lines (or the last "cnt" if a new count isn't given. The initial default is half a page.) The screen is simultaneously scrolled up. Mnemonic: \fBD\fRown .IP "[cnt]^U" 16 Move the cursor up in the file by "cnt" lines. The screen is simultaneously scrolled down. Mnemonic: \fBU\fRp .IP "[cnt]^F" 16 Move the cursor to the next page. A count moves that many pages. Two lines of the previous page are kept on the screen for continuity if possible. Mnemonic: \fBF\fRorward-a-page .IP "[cnt]^B" 16 Move the cursor to the previous page. Two lines of the current page are kept if possible. Mnemonic: \fBB\fRackup-a-page .IP "[cnt](" 16 Move the cursor to the beginning of the next sentence. A sentence is defined as ending with a ".", "!", or "?" followed by two spaces or a . .IP "[cnt])" 16 Move the cursor backwards to the beginning of a sentence. .IP "[cnt]}" 16 Move the cursor to the beginning of the next paragraph. This command works best inside \fBnroff\fR documents. It understands two sets of \fBnroff\fR macros, \fB\-ms\fR and \fB\-mm\fR, for which the commands ".IP", ".LP", ".PP", ".QP", "P", as well as the nroff command ".bp" are considered to be paragraph delimiters. A blank line also delimits a paragraph. The \fBnroff\fR macros that it accepts as paragraph delimiters is adjustable. See \fBparagraphs\fR under the \fBSet Commands\fR section. .IP "[cnt]{" 16 Move the cursor backwards to the beginning of a paragraph. .IP "]]" 16 Move the cursor to the next "section", where a section is defined by two sets of \fBnroff\fR macros, \fB\-ms\fR and \fB\-mm\fR, in which ".NH", ".SH", and ".H" delimit a section. A line beginning with a sequence, or a line beginning with a "{" are also considered to be section delimiters. The last option makes it useful for finding the beginnings of C functions. The \fBnroff\fR macros that are used for section delimiters can be adjusted. See \fBsections\fR under the \fBSet Commands\fR section. .IP "[[" 16 Move the cursor backwards to the beginning of a section. .IP "%" 16 Move the cursor to the matching parenthesis or brace. This is very useful in C or lisp code. If the cursor is sitting on a \fB( ) {\fR or \fB}\fR the cursor is moved to the matching character at the other end of the section. If the cursor is not sitting on a brace or a parenthesis, \fBvi\fR searches forward until it finds one and then jumps to the match mate. .IP "[cnt]H" 16 If there is no count move the cursor to the top left position on the screen. If there is a count, then move the cursor to the beginning of the line "cnt" lines from the top of the screen. Mnemonic: \fBH\fRome .IP "[cnt]L" 16 If there is no count move the cursor to the beginning of the last line on the screen. If there is a count, then move the cursor to the beginning of the line "cnt" lines from the bottom of the screen. Mnemonic: \fBL\fRast .IP "M" 16 Move the cursor to the beginning of the middle line on the screen. Mnemonic: \fBM\fRiddle .IP "m" 16 This command does not move the cursor, but it \fBmarks\fR the place in the file and the character "" becomes the label for referring to this location in the file. See the next two commands. Mnemonic: \fBm\fRark .B NOTE: The mark command is not a motion, and cannot be used as the target of commands such as delete. .IP "\(aa" 16 Move the cursor to the beginning of the line that is marked with the label "". .IP "\(ga" 16 Move the cursor to the exact position on the line that was marked with with the label "". .IP "\(aa\(aa" 16 Move the cursor back to the beginning of the line where it was before the last "non-relative" move. A "non-relative" move is something such as a search or a jump to a specific line in the file, rather than moving the cursor or scrolling the screen. .IP "\(ga\(ga" 16 Move the cursor back to the exact spot on the line where it was located before the last "non-relative" move. .NH 2 Searches .LP The following commands allow you to search for items in a file. .IP [cnt]f{chr} 16 .sp 1 Search forward on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed \fBat\fR the character of interest. Mnemonic: \fBf\fRind character .IP [cnt]F{chr} 16 .sp 1 Search backwards on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed \fBat\fR the character of interest. .IP [cnt]t{chr} 16 .sp 1 Search forward on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed \fBjust preceding\fR the character of interest. Mnemonic: move cursor up \fBt\fRo character .IP [cnt]T{chr} 16 .sp 1 Search backwards on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed \fBjust preceding\fR the character of interest. .IP "[cnt];" 16 Repeat the last "f", "F", "t" or "T" command. .IP "[cnt]," 16 Repeat the last "f", "F", "t" or "T" command, but in the opposite search direction. This is useful if you overshoot. .IP "[cnt]/[string]/" 16 .br Search forward for the next occurrence of "string". Wrap around at the end of the file does occur. The final \fB\fR is not required. .IP "[cnt]?[string]?" 16 .br Search backwards for the next occurrence of "string". If a count is specified, the count becomes the new window size. Wrap around at the beginning of the file does occur. The final \fB\fR is not required. .IP n 16 Repeat the last /[string]/ or ?[string]? search. Mnemonic: \fBn\fRext occurrence. .IP N 16 Repeat the last /[string]/ or ?[string]? search, but in the reverse direction. .IP ":g/[string]/[editor command]" 16 .sp 1 Using the \fB:\fR syntax it is possible to do global searches ala the standard UNIX "ed" editor. .NH 2 Text Insertion .LP The following commands allow for the insertion of text. All multicharacter text insertions are terminated with an character. The last change can always be \fBundone\fR by typing a \fBu\fR. The text insert in insertion mode can contain newlines. .IP a{text} 16 Insert text immediately following the cursor position. Mnemonic: \fBa\fRppend .IP A{text} 16 Insert text at the end of the current line. Mnemonic: \fBA\fRppend .IP i{text} 16 Insert text immediately preceding the cursor position. Mnemonic: \fBi\fRnsert .IP I{text} 16 Insert text at the beginning of the current line. .IP o{text} 16 Insert a new line after the line on which the cursor appears and insert text there. Mnemonic: \fBo\fRpen new line .IP O{text} 16 Insert a new line preceding the line on which the cursor appears and insert text there. .NH 2 Text Deletion .LP The following commands allow the user to delete text in various ways. All changes can always be \fBundone\fR by typing the \fBu\fR command. .IP "[cnt]x" 16 Delete the character or characters starting at the cursor position. .IP "[cnt]X" 16 Delete the character or characters starting at the character preceding the cursor position. .IP "D" 16 Deletes the remainder of the line starting at the cursor. Mnemonic: \fBD\fRelete the rest of line .IP "[cnt]d{motion}" 16 .br Deletes one or more occurrences of the specified motion. Any motion from sections 4.1 and 4.2 can be used here. The d can be stuttered (e.g. [cnt]dd) to delete cnt lines. .NH 2 Text Replacement .LP The following commands allow the user to simultaneously delete and insert new text. All such actions can be \fBundone\fR by typing \fBu\fR following the command. .IP "r" 16 Replaces the character at the current cursor position with . This is a one character replacement. No is required for termination. Mnemonic: \fBr\fReplace character .IP "R{text}" 16 Starts overlaying the characters on the screen with whatever you type. It does not stop until an is typed. .IP "[cnt]s{text}" 16 Substitute for "cnt" characters beginning at the current cursor position. A "$" will appear at the position in the text where the "cnt"'th character appears so you will know how much you are erasing. Mnemonic: \fBs\fRubstitute .IP "[cnt]S{text}" 16 Substitute for the entire current line (or lines). If no count is given, a "$" appears at the end of the current line. If a count of more than 1 is given, all the lines to be replaced are deleted before the insertion begins. .IP "[cnt]c{motion}{text}" 16 .br Change the specified "motion" by replacing it with the insertion text. A "$" will appear at the end of the last item that is being deleted unless the deletion involves whole lines. Motion's can be any motion from sections 4.1 or 4.2. Stuttering the c (e.g. [cnt]cc) changes cnt lines. .NH 2 Moving Text .LP \fBVi\fR provides a number of ways of moving chunks of text around. There are nine buffers into which each piece of text which is deleted or "yanked" is put in addition to the "undo" buffer. The most recent deletion or yank is in the "undo" buffer and also usually in buffer 1, the next most recent in buffer 2, and so forth. Each new deletion pushes down all the older deletions. Deletions older than 9 disappear. There is also a set of named registers, a-z, into which text can optionally be placed. If any delete or replacement type command is preceded by \fB"\fR, that named buffer will contain the text deleted after the command is executed. For example, \fB"a3dd\fR will delete three lines starting at the current line and put them in buffer \fB"a\fR.* .FS * Referring to an upper case letter as a buffer name (A-Z) is the same as referring to the lower case letter, except that text placed in such a buffer is appended to it instead of replacing it. .FE There are two more basic commands and some variations useful in getting and putting text into a file. .IP ["][cnt]y{motion} 16 .sp 1 Yank the specified item or "cnt" items and put in the "undo" buffer or the specified buffer. The variety of "items" that can be yanked is the same as those that can be deleted with the "d" command or changed with the "c" command. In the same way that "dd" means delete the current line and "cc" means replace the current line, "yy" means yank the current line. .IP ["][cnt]Y 16 Yank the current line or the "cnt" lines starting from the current line. If no buffer is specified, they will go into the "undo" buffer, like any delete would. It is equivalent to "yy". Mnemonic: \fBY\fRank .IP ["]p 16 Put "undo" buffer or the specified buffer down \fBafter\fR the cursor. If whole lines were yanked or deleted into the buffer, then they will be put down on the line following the line the cursor is on. If something else was deleted, like a word or sentence, then it will be inserted immediately following the cursor. Mnemonic: \fBp\fRut buffer .IP It should be noted that text in the named buffers remains there when you start editing a new file with the \fB:e file\fR command. Since this is so, it is possible to copy or delete text from one file and carry it over to another file in the buffers. However, the undo buffer and the ability to undo are lost when changing files. .IP ["]P 16 Put "undo" buffer or the specified buffer down \fBbefore\fR the cursor. If whole lines where yanked or deleted into the buffer, then they will be put down on the line preceding the line the cursor is on. If something else was deleted, like a word or sentence, then it will be inserted immediately preceding the cursor. .IP [cnt]>{motion} 16 The shift operator will right shift all the text from the line on which the cursor is located to the line where the \fBmotion\fR is located. The text is shifted by one \fBshiftwidth\fR. (See section 6.) \fB>>\fR means right shift the current line or lines. .IP [cnt]<{motion} 16 The shift operator will left shift all the text from the line on which the cursor is located to the line where the \fBitem\fR is located. The text is shifted by one \fBshiftwidth\fR. (See section 6.) \fB<<\fR means left shift the current line or lines. Once the line has reached the left margin it is not further affected. .IP [cnt]={motion} 16 Prettyprints the indicated area according to .B lisp conventions. The area should be a lisp s-expression. .NH 2 Miscellaneous Commands .LP \fBVi\fR has a number of miscellaneous commands that are very useful. They are: .IP ZZ 16 This is the normal way to exit from vi. If any changes have been made, the file is written out. Then you are returned to the shell. .IP ^L 16 Redraw the current screen. This is useful if someone "write"s you while you are in "vi" or if for any reason garbage gets onto the screen. .IP ^R 16 On dumb terminals, those not having the "delete line" function (the vt100 is such a terminal), \fBvi\fR saves redrawing the screen when you delete a line by just marking the line with an "@" at the beginning and blanking the line. If you want to actually get rid of the lines marked with "@" and see what the page looks like, typing a ^R will do this. .IP \s+4.\s0 16 "Dot" is a particularly useful command. It repeats the last text modifying command. Therefore you can type a command once and then to another place and repeat it by just typing ".". .IP u 16 Perhaps the most important command in the editor, u undoes the last command that changed the buffer. Mnemonic: \fBu\fRndo .IP U 16 Undo all the text modifying commands performed on the current line since the last time you moved onto it. .IP [cnt]J 16 Join the current line and the following line. The is deleted and the two lines joined, usually with a space between the end of the first line and the beginning of what was the second line. If the first line ended with a "period", then two spaces are inserted. A count joins the next cnt lines. Mnemonic: \fBJ\fRoin lines .IP Q 16 Switch to \fBex\fR editing mode. In this mode \fBvi\fR will behave very much like \fBed\fR. The editor in this mode will operate on single lines normally and will not attempt to keep the "window" up to date. Once in this mode it is also possible to switch to the \fBopen\fR mode of editing. By entering the command \fB[line number]open\fR you enter this mode. It is similar to the normal visual mode except the window is only \fBone\fR line long. Mnemonic: \fBQ\fRuit visual mode .IP ^] 16 An abbreviation for a tag command. The cursor should be positioned at the beginning of a word. That word is taken as a tag name, and the tag with that name is found as if it had been typed in a :tag command. .IP [cnt]!{motion}{UNIX\ cmd} 16 .br Any UNIX filter (e.g. command that reads the standard input and outputs something to the standard output) can be sent a section of the current file and have the output of the command replace the original text. Useful examples are programs like \fBcb\fR, \fBsort\fR, and \fBnroff\fR. For instance, using \fBsort\fR it would be possible to sort a section of the current file into a new list. Using \fB!!\fR means take a line or lines starting at the line the cursor is currently on and pass them to the UNIX command. .B NOTE: To just escape to the shell for one command, use :!{cmd}, see section 5. .IP z{cnt} 16 This resets the current window size to "cnt" lines and redraws the screen. .NH 2 Special Insert Characters .LP There are some characters that have special meanings during insert modes. They are: .IP ^V 16 During inserts, typing a ^V allows you to quote control characters into the file. Any character typed after the ^V will be inserted into the file. .IP [^]^D\ or\ [0]^D 16 <^D> without any argument backs up one \fBshiftwidth\fR. This is necessary to remove indentation that was inserted by the \fBautoindent\fR feature. ^<^D> temporarily removes all the autoindentation, thus placing the cursor at the left margin. On the next line, the previous indent level will be restored. This is useful for putting "labels" at the left margin. 0<^D> says remove all autoindents and stay that way. Thus the cursor moves to the left margin and stays there on successive lines until 's are typed. As with the , the <^D> is only effective before any other "non-autoindent" controlling characters are typed. Mnemonic: \fBD\fRelete a shiftwidth .IP ^W 16 If the cursor is sitting on a word, <^W> moves the cursor back to the beginning of the word, thus erasing the word from the insert. Mnemonic: erase \fBW\fRord .IP 16 The backspace always serves as an erase during insert modes in addition to your normal "erase" character. To insert a into your file, use the <^V> to quote it. .NH 1 \fB:\fR Commands .LP Typing a ":" during command mode causes \fBvi\fR to put the cursor at the bottom on the screen in preparation for a command. In the ":" mode, \fBvi\fR can be given most \fBed\fR commands. It is also from this mode that you exit from \fBvi\fR or switch to different files. All commands of this variety are terminated by a , , or . .IP ":w[!] [file]" 16 Causes \fBvi\fR to write out the current text to the disk. It is written to the file you are editing unless "file" is supplied. If "file" is supplied, the write is directed to that file instead. If that file already exists, \fBvi\fR will not perform the write unless the "!" is supplied indicating you .I really want to destroy the older copy of the file. .IP :q[!] 16 Causes \fBvi\fR to exit. If you have modified the file you are looking at currently and haven't written it out, \fBvi\fR will refuse to exit unless the "!" is supplied. .IP ":e[!] [+[cmd]] [file]" 16 .sp 1 Start editing a new file called "file" or start editing the current file over again. The command ":e!" says "ignore the changes I've made to this file and start over from the beginning". It is useful if you really mess up the file. The optional "+" says instead of starting at the beginning, start at the "end", or, if "cmd" is supplied, execute "cmd" first. Useful cases of this are where cmd is "n" (any integer) which starts at line number n, and "/text", which searches for "text" and starts at the line where it is found. .IP "^^" 16 Switch back to the place you were before your last tag command. If your last tag command stayed within the file, ^^ returns to that tag. If you have no recent tag command, it will return to the same place in the previous file that it was showing when you switched to the current file. .IP ":n[!]" 16 Start editing the next file in the argument list. Since \fBvi\fR can be called with multiple file names, the ":n" command tells it to stop work on the current file and switch to the next file. If the current file was modifies, it has to be written out before the ":n" will work or else the "!" must be supplied, which says discard the changes I made to the current file. .IP ":n[!] file [file file ...]" 16 .sp Replace the current argument list with a new list of files and start editing the first file in this new list. .IP ":r file" 16 Read in a copy of "file" on the line after the cursor. .IP ":r !cmd" 16 Execute the "cmd" and take its output and put it into the file after the current line. .IP ":!cmd" 16 Execute any UNIX shell command. .IP ":ta[!] tag" 16 .B Vi looks in the file named .B tags in the current directory. .B Tags is a file of lines in the format: .sp 1 .ti +8 tag filename \fBvi\fR-search-command .sp 1 If \fBvi\fR finds the tag you specified in the \fB:ta\fR command, it stops editing the current file if necessary and if the current file is up to date on the disk and switches to the file specified and uses the search pattern specified to find the "tagged" item of interest. This is particularly useful when editing multi-file C programs such as the operating system. There is a program called \fBctags\fR which will generate an appropriate \fBtags\fR file for C and f77 programs so that by saying \fB:ta function\fR you will be switched to that function. It could also be useful when editing multi-file documents, though the \fBtags\fR file would have to be generated manually. .NH 1 Special Arrangements for Startup .PP \fBVi\fR takes the value of \fB$TERM\fR and looks up the characteristics of that terminal in the file \fB/etc/termcap\fR. If you don't know \fBvi\fR's name for the terminal you are working on, look in \fB/etc/termcap\fR. .PP When \fBvi\fR starts, it attempts to read the variable EXINIT from your environment.* If that exists, it takes the values in it as the default values for certain of its internal constants. See the section on "Set Values" for further details. If EXINIT doesn't exist you will get all the normal defaults. .FS * On version 6 systems Instead of EXINIT, put the startup commands in the file .exrc in your home directory. .FE .PP Should you inadvertently hang up the phone while inside .B vi , or should the computer crash, all may not be lost. Upon returning to the system, type: .DS vi \-r file .DE This will normally recover the file. If there is more than one temporary file for a specific file name, \fBvi\fR recovers the newest one. You can get an older version by recovering the file more than once. The command "vi -r" without a file name gives you the list of files that were saved in the last system crash (but .I not the file just saved when the phone was hung up). .NH 1 Set Commands .LP \fBVi\fR has a number of internal variables and switches which can be set to achieve special affects. These options come in three forms, those that are switches, which toggle from off to on and back, those that require a numeric value, and those that require an alphanumeric string value. The toggle options are set by a command of the form: .DS :set option .DE and turned off with the command: .DS :set nooption .DE Commands requiring a value are set with a command of the form: .DS :set option=value .DE To display the value of a specific option type: .DS :set option? .DE To display only those that you have changed type: .DS :set .DE and to display the long table of all the settable parameters and their current values type: .DS :set all .DE .PP Most of the options have a long form and an abbreviation. Both are listed in the following table as well as the normal default value. .PP To arrange to have values other than the default used every time you enter .B vi , place the appropriate .B set command in EXINIT in your environment, e.g. .DS EXINIT='set ai aw terse sh=/bin/csh' export EXINIT .DE or .DS setenv EXINIT 'set ai aw terse sh=/bin/csh' .DE for .B sh and .B csh , respectively. These are usually placed in your .profile or .login. If you are running a system without environments (such as version 6) you can place the set command in the file .exrc in your home directory. .IP autoindent\ ai 16 Default: noai Type: toggle .br When in autoindent mode, vi helps you indent code by starting each line in the same column as the preceding line. Tabbing to the right with or <^T> will move this boundary to the right, and it can be moved to the left with <^D>. .IP autoprint\ ap 16 Default: ap Type: toggle .br Causes the current line to be printed after each ex text modifying command. This is not of much interest in the normal \fBvi\fR visual mode. .IP autowrite\ aw 16 Default: noaw type: toggle .br Autowrite causes an automatic write to be done if there are unsaved changes before certain commands which change files or otherwise interact with the outside world. These commands are :!, :tag, :next, :rewind, ^^, and ^]. .IP beautify\ bf 16 Default: nobf Type: toggle .br Causes all control characters except , , and to be discarded. .IP directory\ dir 16 Default: dir=/tmp Type: string .br This is the directory in which \fBvi\fR puts its temporary file. .IP errorbells\ eb 16 Default: noeb Type: toggle .br Error messages are preceded by a . .IP hardtabs\ ht 16 Default: hardtabs=8 Type: numeric .br This option contains the value of hardware tabs in your terminal, or of software tabs expanded by the Unix system. .IP ignorecase\ ic 16 Default: noic Type: toggle .br All upper case characters are mapped to lower case in regular expression matching. .IP lisp 16 Default: nolisp Type: toggle .br Autoindent for \fBlisp\fR code. The commands \fB( ) [[\fR and \fB]]\fR are modified appropriately to affect s-expressions and functions. .IP list 16 Default: nolist Type: toggle .br All printed lines have the and characters displayed visually. .IP magic 16 Default: magic Type: toggle .br Enable the metacharacters for matching. These include \fB. * < > [string] [^string]\fR and \fB[-]\fR. .IP number\ nu 16 Default: nonu Type: toggle .br Each line is displayed with its line number. .IP open 16 Default: open Type: toggle .br When set, prevents entering open or visual modes from ex or edit. Not of interest from vi. .IP optimize\ opt 16 Default: opt Type: toggle .br Basically of use only when using the \fBex\fR capabilities. This option prevents automatic s from taking place, and speeds up output of indented lines, at the expense of losing typeahead on some versions of UNIX. .IP paragraphs\ para 16 Default: para=IPLPPPQPP\ bp Type: string .br Each pair of characters in the string indicate \fBnroff\fR macros which are to be treated as the beginning of a paragraph for the \fB{\fR and \fB}\fR commands. The default string is for the \fB-ms\fR and \fB-mm\fR macros. To indicate one letter \fBnroff\fR macros, such as \fB.P\fR or \fB.H\fR, quote a space in for the second character position. For example: .sp 1 .ti +8 :set paragraphs=P\e bp .sp 1 would cause \fBvi\fR to consider \fB.P\fR and \fB.bp\fR as paragraph delimiters. .IP prompt 16 Default: prompt Type: toggle .br In .B ex command mode the prompt character \fB:\fR will be printed when \fBex\fR is waiting for a command. This is not of interest from vi. .IP redraw 16 Default: noredraw Type: toggle .br On dumb terminals, force the screen to always be up to date, by sending great amounts of output. Useful only at high speeds. .IP report 16 Default: report=5 Type: numeric .br This sets the threshold for the number of lines modified. When more than this number of lines are modified, removed, or yanked, \fBvi\fR will report the number of lines changed at the bottom of the screen. .IP scroll 16 Default: scroll={1/2 window} Type: numeric .br This is the number of lines that the screen scrolls up or down when using the <^U> and <^D> commands. .IP sections 16 Default: sections=SHNHH HU Type: string .br Each two character pair of this string specify \fBnroff\fR macro names which are to be treated as the beginning of a section by the \fB]]\fR and \fB[[\fR commands. The default string is for the \fB-ms\fR and \fB-mm\fR macros. To enter one letter \fBnroff\fR macros, use a quoted space as the second character. See \fBparagraphs\fR for a fuller explanation. .IP shell\ sh 16 Default: sh=from environment SHELL or /bin/sh Type: string .br This is the name of the \fBsh\fR to be used for "escaped" commands. .IP shiftwidth\ sw 16 Default: sw=8 Type: numeric .br This is the number of spaces that a <^T> or <^D> will move over for indenting, and the amount < and > shift by. .IP showmatch\ sm 16 Default: nosm Type: toggle .br When a \fB)\fR or \fB}\fR is typed, show the matching \fB(\fR or \fB{\fR by moving the cursor to it for one second if it is on the current screen. .IP slowopen\ slow 16 Default: terminal dependent Type: toggle .br On terminals that are slow and unintelligent, this option prevents the updating of the screen some of the time to improve speed. .IP tabstop\ ts 16 Default: ts=8 Type: numeric .br s are expanded to boundaries that are multiples of this value. .IP taglength\ tl 16 Default: tl=0 Type: numeric .br If nonzero, tag names are only significant to this many characters. .IP term 16 Default: (from environment \fBTERM\fP, else dumb) Type: string .br This is the terminal and controls the visual displays. It cannot be changed when in "visual" mode, you have to Q to command mode, type a set term command, and do ``vi.'' to get back into visual. Or exit vi, fix $TERM, and reenter. The definitions that drive a particular terminal type are found in the file \fB/etc/termcap\fR. .IP terse 16 Default: terse Type: toggle .br When set, the error diagnostics are short. .IP warn 16 Default: warn Type: toggle .br The user is warned if she/he tries to escape to the shell without writing out the current changes. .IP window 16 Default: window={8 at 600 baud or less, 16 at 1200 baud, and screen size \- 1 at 2400 baud or more} Type: numeric .br This is the number of lines in the window whenever \fBvi\fR must redraw an entire screen. It is useful to make this size smaller if you are on a slow line. .IP w300,\ w1200,\ w9600 .br These set window, but only within the corresponding speed ranges. They are useful in an EXINIT to fine tune window sizes. For example, .DS set w300=4 w1200=12 .DE causes a 4 lines window at speed up to 600 baud, a 12 line window at 1200 baud, and a full screen (the default) at over 1200 baud. .IP wrapscan\ ws 16 Default: ws Type: toggle .br Searches will wrap around the end of the file when is option is set. When it is off, the search will terminate when it reaches the end or the beginning of the file. .IP wrapmargin\ wm 16 Default: wm=0 Type: numeric .br \fBVi\fR will automatically insert a when it finds a natural break point (usually a between words) that occurs within "wm" spaces of the right margin. Therefore with "wm=0" the option is off. Setting it to 10 would mean that any time you are within 10 spaces of the right margin \fBvi\fR would be looking for a or which it could replace with a . This is convenient for people who forget to look at the screen while they type. (In version 3, wrapmargin behaves more like nroff, in that the boundary specified by the distance from the right edge of the screen is taken as the rightmost edge of the area where a break is allowed, instead of the leftmost edge.) .IP writeany\ wa 16 Default: nowa Type: toggle .br \fBVi\fR normally makes a number of checks before it writes out a file. This prevents the user from inadvertently destroying a file. When the "writeany" option is enabled, \fBvi\fR no longer makes these checks. nvi-1.81.6/docs/vitut/vi.chars0100644000076400001440000006126610720065506015230 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: vi.chars,v 8.3 1996/06/27 19:53:17 bostic Exp $ (Berkeley) $Date: 1996/06/27 19:53:17 $ .\" .bd S 3 .pn 21 .de iP .IP "\fB\\$1\fR" \\$2 .. .SH Appendix: character functions .PP This appendix gives the uses the editor makes of each character. The characters are presented in their order in the \s-2ASCII\s0 character set: Control characters come first, then most special characters, then the digits, upper and then lower case characters. .PP For each character we tell a meaning it has as a command and any meaning it has during an insert. If it has only meaning as a command, then only this is discussed. Section numbers in parentheses indicate where the character is discussed; a `f' after the section number means that the character is mentioned in a footnote. .iP "^@" 15 Not a command character. If typed as the first character of an insertion it is replaced with the last text inserted, and the insert terminates. Only 128 characters are saved from the last insert; if more characters were inserted the mechanism is not available. A \fB^@\fR cannot be part of the file due to the editor implementation (7.5f). .iP "^A" 15 Unused. .iP "^B" 15 Backward window. A count specifies repetition. Two lines of continuity are kept if possible (2.1, 6.1, 7.2). .iP "^C" 15 Unused. .iP "^D" 15 As a command, scrolls down a half-window of text. A count gives the number of (logical) lines to scroll, and is remembered for future \fB^D\fR and \fB^U\fR commands (2.1, 7.2). During an insert, backtabs over \fIautoindent\fR white space at the beginning of a line (6.6, 7.5); this white space cannot be backspaced over. .iP "^E" 15 Exposes one more line below the current screen in the file, leaving the cursor where it is if possible. (Version 3 only.) .iP "^F" 15 Forward window. A count specifies repetition. Two lines of continuity are kept if possible (2.1, 6.1, 7.2). .iP "^G" 15 Equivalent to \fB:f\fR\s-2CR\s0, printing the current file, whether it has been modified, the current line number and the number of lines in the file, and the percentage of the way through the file that you are. .iP "^H (\fR\s-2BS\s0\fP)" 15 Same as .B "left arrow" . (See .B h ). During an insert, eliminates the last input character, backing over it but not erasing it; it remains so you can see what you typed if you wish to type something only slightly different (3.1, 7.5). .iP "^I\ (\fR\s-2TAB\s0\fP)" 15 Not a command character. When inserted it prints as some number of spaces. When the cursor is at a tab character it rests at the last of the spaces which represent the tab. The spacing of tabstops is controlled by the \fItabstop\fR option (4.1, 6.6). .iP "^J\ (\fR\s-2LF\s0\fP)" 15 Same as .B "down arrow" (see .B j ). .iP "^K" 15 Unused. .iP "^L" 15 The \s-2ASCII\s0 formfeed character, this causes the screen to be cleared and redrawn. This is useful after a transmission error, if characters typed by a program other than the editor scramble the screen, or after output is stopped by an interrupt (5.4, 7.2f). .ne 1i .iP "^M\ (\fR\s-2CR\s0\fP)" 15 A carriage return advances to the next line, at the first non-white position in the line. Given a count, it advances that many lines (2.3). During an insert, a \s-2CR\s0 causes the insert to continue onto another line (3.1). .iP "^N" 15 Same as .B "down arrow" (see .B j ). .iP "^O" 15 Unused. .iP "^P" 15 Same as .B "up arrow" (see .B k ). .iP "^Q" 15 Not a command character. In input mode, .B ^Q quotes the next character, the same as .B ^V , except that some teletype drivers will eat the .B ^Q so that the editor never sees it. .iP "^R" 15 Redraws the current screen, eliminating logical lines not corresponding to physical lines (lines with only a single @ character on them). On hardcopy terminals in \fIopen\fR mode, retypes the current line (5.4, 7.2, 7.8). .iP "^S" 15 Unused. Some teletype drivers use .B ^S to suspend output until .B ^Q is pressed. .iP "^T" 15 Not a command character. During an insert, with \fIautoindent\fR set and at the beginning of the line, inserts \fIshiftwidth\fR white space. .iP "^U" 15 Scrolls the screen up, inverting \fB^D\fR which scrolls down. Counts work as they do for \fB^D\fR, and the previous scroll amount is common to both. On a dumb terminal, \fB^U\fR will often necessitate clearing and redrawing the screen further back in the file (2.1, 7.2). .iP "^V" 15 Not a command character. In input mode, quotes the next character so that it is possible to insert non-printing and special characters into the file (4.2, 7.5). .iP "^W" 15 Not a command character. During an insert, backs up as \fBb\fR would in command mode; the deleted characters remain on the display (see \fB^H\fR) (7.5). .iP "^X" 15 Unused. .iP "^Y" 15 Exposes one more line above the current screen, leaving the cursor where it is if possible. (No mnemonic value for this key; however, it is next to \fB^U\fR which scrolls up a bunch.) (Version 3 only.) .iP "^Z" 15 If supported by the Unix system, stops the editor, exiting to the top level shell. Same as \fB:stop\fP\s-2CR\s0. Otherwise, unused. .iP "^[\ (\fR\s-2ESC\s0\fP)" 15 Cancels a partially formed command, such as a \fBz\fR when no following character has yet been given; terminates inputs on the last line (read by commands such as \fB: /\fR and \fB?\fR); ends insertions of new text into the buffer. If an \s-2ESC\s0 is given when quiescent in command state, the editor rings the bell or flashes the screen. You can thus hit \s-2ESC\s0 if you don't know what is happening till the editor rings the bell. If you don't know if you are in insert mode you can type \s-2ESC\s0\fBa\fR, and then material to be input; the material will be inserted correctly whether or not you were in insert mode when you started (1.5, 3.1, 7.5). .iP "^\e" 15 Unused. .iP "^]" 15 Searches for the word which is after the cursor as a tag. Equivalent to typing \fB:ta\fR, this word, and then a \s-2CR\s0. Mnemonically, this command is ``go right to'' (7.3). .iP "^\(ua" 15 Equivalent to \fB:e #\fR\s-2CR\s0, returning to the previous position in the last edited file, or editing a file which you specified if you got a `No write since last change diagnostic' and do not want to have to type the file name again (7.3). (You have to do a \fB:w\fR before \fB^\(ua\fR will work in this case. If you do not wish to write the file you should do \fB:e!\ #\fR\s-2CR\s0 instead.) .iP "^_" 15 Unused. Reserved as the command character for the Tektronix 4025 and 4027 terminal. .iP "\fR\s-2SPACE\s0\fP" 15 Same as .B "right arrow" (see .B l ). .iP "!" 15 An operator, which processes lines from the buffer with reformatting commands. Follow \fB!\fR with the object to be processed, and then the command name terminated by \s-2CR\s0. Doubling \fB!\fR and preceding it by a count causes count lines to be filtered; otherwise the count is passed on to the object after the \fB!\fR. Thus \fB2!}\fR\fIfmt\fR\s-2CR\s0 reformats the next two paragraphs by running them through the program \fIfmt\fR. If you are working on \s-2LISP\s0, the command \fB!%\fR\fIgrind\fR\s-2CR\s0,* .FS *Both .I fmt and .I grind are Berkeley programs and may not be present at all installations. .FE given at the beginning of a function, will run the text of the function through the \s-2LISP\s0 grinder (6.7, 7.3). To read a file or the output of a command into the buffer use \fB:r\fR (7.3). To simply execute a command use \fB:!\fR (7.3). .tr " .iP  15 Precedes a named buffer specification. There are named buffers \fB1\-9\fR used for saving deleted text and named buffers \fBa\-z\fR into which you can place text (4.3, 6.3) .tr  .iP "#" 15 The macro character which, when followed by a number, will substitute for a function key on terminals without function keys (6.9). In input mode, if this is your erase character, it will delete the last character you typed in input mode, and must be preceded with a \fB\e\fR to insert it, since it normally backs over the last input character you gave. .iP "$" 15 Moves to the end of the current line. If you \fB:se list\fR\s-2CR\s0, then the end of each line will be shown by printing a \fB$\fR after the end of the displayed text in the line. Given a count, advances to the count'th following end of line; thus \fB2$\fR advances to the end of the following line. .iP "%" 15 Moves to the parenthesis or brace \fB{ }\fR which balances the parenthesis or brace at the current cursor position. .iP "&" 15 A synonym for \fB:&\fR\s-2CR\s0, by analogy with the .I ex .B & command. .iP "\(aa" 15 When followed by a \fB\(aa\fR returns to the previous context at the beginning of a line. The previous context is set whenever the current line is moved in a non-relative way. When followed by a letter \fBa\fR\-\fBz\fR, returns to the line which was marked with this letter with a \fBm\fR command, at the first non-white character in the line. (2.2, 5.3). When used with an operator such as \fBd\fR, the operation takes place over complete lines; if you use \fB\(ga\fR, the operation takes place from the exact marked place to the current cursor position within the line. .iP "(" 15 Retreats to the beginning of a sentence, or to the beginning of a \s-2LISP\s0 s-expression if the \fIlisp\fR option is set. A sentence ends at a \fB. !\fR or \fB?\fR which is followed by either the end of a line or by two spaces. Any number of closing \fB) ] "\fR and \fB\(aa\fR characters may appear after the \fB. !\fR or \fB?\fR, and before the spaces or end of line. Sentences also begin at paragraph and section boundaries (see \fB{\fR and \fB[[\fR below). A count advances that many sentences (4.2, 6.8). .iP ")" 15 Advances to the beginning of a sentence. A count repeats the effect. See \fB(\fR above for the definition of a sentence (4.2, 6.8). .iP "*" 15 Unused. .iP "+" 15 Same as \s-2CR\s0 when used as a command. .iP "," 15 Reverse of the last \fBf F t\fR or \fBT\fR command, looking the other way in the current line. Especially useful after hitting too many \fB;\fR characters. A count repeats the search. .iP "\-" 15 Retreats to the previous line at the first non-white character. This is the inverse of \fB+\fR and \s-2RETURN\s0. If the line moved to is not on the screen, the screen is scrolled, or cleared and redrawn if this is not possible. If a large amount of scrolling would be required the screen is also cleared and redrawn, with the current line at the center (2.3). .iP "\&." 15 Repeats the last command which changed the buffer. Especially useful when deleting words or lines; you can delete some words/lines and then hit \fB.\fR to delete more and more words/lines. Given a count, it passes it on to the command being repeated. Thus after a \fB2dw\fR, \fB3.\fR deletes three words (3.3, 6.3, 7.2, 7.4). .iP "/" 15 Reads a string from the last line on the screen, and scans forward for the next occurrence of this string. The normal input editing sequences may be used during the input on the bottom line; an returns to command state without ever searching. The search begins when you hit \s-2CR\s0 to terminate the pattern; the cursor moves to the beginning of the last line to indicate that the search is in progress; the search may then be terminated with a \s-2DEL\s0 or \s-2RUB\s0, or by backspacing when at the beginning of the bottom line, returning the cursor to its initial position. Searches normally wrap end-around to find a string anywhere in the buffer. .IP When used with an operator the enclosed region is normally affected. By mentioning an offset from the line matched by the pattern you can force whole lines to be affected. To do this give a pattern with a closing a closing \fB/\fR and then an offset \fB+\fR\fIn\fR or \fB\-\fR\fIn\fR. .IP To include the character \fB/\fR in the search string, you must escape it with a preceding \fB\e\fR. A \fB\(ua\fR at the beginning of the pattern forces the match to occur at the beginning of a line only; this speeds the search. A \fB$\fR at the end of the pattern forces the match to occur at the end of a line only. More extended pattern matching is available, see section 7.4; unless you set \fBnomagic\fR in your \fI\&.exrc\fR file you will have to preceed the characters \fB. [ *\fR and \fB~\fR in the search pattern with a \fB\e\fR to get them to work as you would naively expect (1.5, 2,2, 6.1, 7.2, 7.4). .iP "0" 15 Moves to the first character on the current line. Also used, in forming numbers, after an initial \fB1\fR\-\fB9\fR. .iP "1\-9" 15 Used to form numeric arguments to commands (2.3, 7.2). .iP ":" 15 A prefix to a set of commands for file and option manipulation and escapes to the system. Input is given on the bottom line and terminated with an \s-2CR\s0, and the command then executed. You can return to where you were by hitting \s-2DEL\s0 or \s-2RUB\s0 if you hit \fB:\fR accidentally (see primarily 6.2 and 7.3). .iP ";" 15 Repeats the last single character find which used \fBf F t\fR or \fBT\fR. A count iterates the basic scan (4.1). .iP "<" 15 An operator which shifts lines left one \fIshiftwidth\fR, normally 8 spaces. Like all operators, affects lines when repeated, as in \fB<<\fR. Counts are passed through to the basic object, thus \fB3<<\fR shifts three lines (6.6, 7.2). .iP "=" 15 Reindents line for \s-2LISP\s0, as though they were typed in with \fIlisp\fR and \fIautoindent\fR set (6.8). .iP ">" 15 An operator which shifts lines right one \fIshiftwidth\fR, normally 8 spaces. Affects lines when repeated as in \fB>>\fR. Counts repeat the basic object (6.6, 7.2). .iP "?" 15 Scans backwards, the opposite of \fB/\fR. See the \fB/\fR description above for details on scanning (2.2, 6.1, 7.4). .iP "@" 15 A macro character (6.9). If this is your kill character, you must escape it with a \e to type it in during input mode, as it normally backs over the input you have given on the current line (3.1, 3.4, 7.5). .iP "A" 15 Appends at the end of line, a synonym for \fB$a\fR (7.2). .iP "B" 15 Backs up a word, where words are composed of non-blank sequences, placing the cursor at the beginning of the word. A count repeats the effect (2.4). .iP "C" 15 Changes the rest of the text on the current line; a synonym for \fBc$\fR. .iP "D" 15 Deletes the rest of the text on the current line; a synonym for \fBd$\fR. .iP "E" 15 Moves forward to the end of a word, defined as blanks and non-blanks, like \fBB\fR and \fBW\fR. A count repeats the effect. .iP "F" 15 Finds a single following character, backwards in the current line. A count repeats this search that many times (4.1). .iP "G" 15 Goes to the line number given as preceding argument, or the end of the file if no preceding count is given. The screen is redrawn with the new current line in the center if necessary (7.2). .iP "H" 15 .B "Home arrow" . Homes the cursor to the top line on the screen. If a count is given, then the cursor is moved to the count'th line on the screen. In any case the cursor is moved to the first non-white character on the line. If used as the target of an operator, full lines are affected (2.3, 3.2). .iP "I" 15 Inserts at the beginning of a line; a synonym for \fB\(uai\fR. .iP "J" 15 Joins together lines, supplying appropriate white space: one space between words, two spaces after a \fB.\fR, and no spaces at all if the first character of the joined on line is \fB)\fR. A count causes that many lines to be joined rather than the default two (6.5, 7.1f). .iP "K" 15 Unused. .iP "L" 15 Moves the cursor to the first non-white character of the last line on the screen. With a count, to the first non-white of the count'th line from the bottom. Operators affect whole lines when used with \fBL\fR (2.3). .iP "M" 15 Moves the cursor to the middle line on the screen, at the first non-white position on the line (2.3). .iP "N" 15 Scans for the next match of the last pattern given to \fB/\fR or \fB?\fR, but in the reverse direction; this is the reverse of \fBn\fR. .iP "O" 15 Opens a new line above the current line and inputs text there up to an \s-2ESC\s0. A count can be used on dumb terminals to specify a number of lines to be opened; this is generally obsolete, as the \fIslowopen\fR option works better (3.1). .iP "P" 15 Puts the last deleted text back before/above the cursor. The text goes back as whole lines above the cursor if it was deleted as whole lines. Otherwise the text is inserted between the characters before and at the cursor. May be preceded by a named buffer specification \fB"\fR\fIx\fR to retrieve the contents of the buffer; buffers \fB1\fR\-\fB9\fR contain deleted material, buffers \fBa\fR\-\fBz\fR are available for general use (6.3). .iP "Q" 15 Quits from \fIvi\fR to \fIex\fR command mode. In this mode, whole lines form commands, ending with a \s-2RETURN\s0. You can give all the \fB:\fR commands; the editor supplies the \fB:\fR as a prompt (7.7). .iP "R" 15 Replaces characters on the screen with characters you type (overlay fashion). Terminates with an \s-2ESC\s0. .iP "S" 15 Changes whole lines, a synonym for \fBcc\fR. A count substitutes for that many lines. The lines are saved in the numeric buffers, and erased on the screen before the substitution begins. .iP "T" 15 Takes a single following character, locates the character before the cursor in the current line, and places the cursor just after that character. A count repeats the effect. Most useful with operators such as \fBd\fR (4.1). .iP "U" 15 Restores the current line to its state before you started changing it (3.5). .iP "V" 15 Unused. .iP "W" 15 Moves forward to the beginning of a word in the current line, where words are defined as sequences of blank/non-blank characters. A count repeats the effect (2.4). .iP "X" 15 Deletes the character before the cursor. A count repeats the effect, but only characters on the current line are deleted. .iP "Y" 15 Yanks a copy of the current line into the unnamed buffer, to be put back by a later \fBp\fR or \fBP\fR; a very useful synonym for \fByy\fR. A count yanks that many lines. May be preceded by a buffer name to put lines in that buffer (7.4). .iP "ZZ" 15 Exits the editor. (Same as \fB:x\fP\s-2CR\s0.) If any changes have been made, the buffer is written out to the current file. Then the editor quits. .iP "[[" 15 Backs up to the previous section boundary. A section begins at each macro in the \fIsections\fR option, normally a `.NH' or `.SH' and also at lines which which start with a formfeed \fB^L\fR. Lines beginning with \fB{\fR also stop \fB[[\fR; this makes it useful for looking backwards, a function at a time, in C programs. If the option \fIlisp\fR is set, stops at each \fB(\fR at the beginning of a line, and is thus useful for moving backwards at the top level \s-2LISP\s0 objects. (4.2, 6.1, 6.6, 7.2). .iP "\e" 15 Unused. .iP "]]" 15 Forward to a section boundary, see \fB[[\fR for a definition (4.2, 6.1, 6.6, 7.2). .iP "\(ua" 15 Moves to the first non-white position on the current line (4.4). .iP "_" 15 Unused. .iP "\(ga" 15 When followed by a \fB\(ga\fR returns to the previous context. The previous context is set whenever the current line is moved in a non-relative way. When followed by a letter \fBa\fR\-\fBz\fR, returns to the position which was marked with this letter with a \fBm\fR command. When used with an operator such as \fBd\fR, the operation takes place from the exact marked place to the current position within the line; if you use \fB\(aa\fR, the operation takes place over complete lines (2.2, 5.3). .iP "a" 15 Appends arbitrary text after the current cursor position; the insert can continue onto multiple lines by using \s-2RETURN\s0 within the insert. A count causes the inserted text to be replicated, but only if the inserted text is all on one line. The insertion terminates with an \s-2ESC\s0 (3.1, 7.2). .iP "b" 15 Backs up to the beginning of a word in the current line. A word is a sequence of alphanumerics, or a sequence of special characters. A count repeats the effect (2.4). .iP "c" 15 An operator which changes the following object, replacing it with the following input text up to an \s-2ESC\s0. If more than part of a single line is affected, the text which is changed away is saved in the numeric named buffers. If only part of the current line is affected, then the last character to be changed away is marked with a \fB$\fR. A count causes that many objects to be affected, thus both \fB3c)\fR and \fBc3)\fR change the following three sentences (7.4). .iP "d" 15 An operator which deletes the following object. If more than part of a line is affected, the text is saved in the numeric buffers. A count causes that many objects to be affected; thus \fB3dw\fR is the same as \fBd3w\fR (3.3, 3.4, 4.1, 7.4). .iP "e" 15 Advances to the end of the next word, defined as for \fBb\fR and \fBw\fR. A count repeats the effect (2.4, 3.1). .iP "f" 15 Finds the first instance of the next character following the cursor on the current line. A count repeats the find (4.1). .iP "g" 15 Unused. .sp Arrow keys .B h , .B j , .B k , .B l , and .B H . .iP "h" 15 .B "Left arrow" . Moves the cursor one character to the left. Like the other arrow keys, either .B h , the .B "left arrow" key, or one of the synonyms (\fB^H\fP) has the same effect. On v2 editors, arrow keys on certain kinds of terminals (those which send escape sequences, such as vt52, c100, or hp) cannot be used. A count repeats the effect (3.1, 7.5). .iP "i" 15 Inserts text before the cursor, otherwise like \fBa\fR (7.2). .iP "j" 15 .B "Down arrow" . Moves the cursor one line down in the same column. If the position does not exist, .I vi comes as close as possible to the same column. Synonyms include .B ^J (linefeed) and .B ^N . .iP "k" 15 .B "Up arrow" . Moves the cursor one line up. .B ^P is a synonym. .iP "l" 15 .B "Right arrow" . Moves the cursor one character to the right. \s-2SPACE\s0 is a synonym. .iP "m" 15 Marks the current position of the cursor in the mark register which is specified by the next character \fBa\fR\-\fBz\fR. Return to this position or use with an operator using \fB\(ga\fR or \fB\(aa\fR (5.3). .iP "n" 15 Repeats the last \fB/\fR or \fB?\fR scanning commands (2.2). .iP "o" 15 Opens new lines below the current line; otherwise like \fBO\fR (3.1). .iP "p" 15 Puts text after/below the cursor; otherwise like \fBP\fR (6.3). .iP "q" 15 Unused. .iP "r" 15 Replaces the single character at the cursor with a single character you type. The new character may be a \s-2RETURN\s0; this is the easiest way to split lines. A count replaces each of the following count characters with the single character given; see \fBR\fR above which is the more usually useful iteration of \fBr\fR (3.2). .iP "s" 15 Changes the single character under the cursor to the text which follows up to an \s-2ESC\s0; given a count, that many characters from the current line are changed. The last character to be changed is marked with \fB$\fR as in \fBc\fR (3.2). .iP "t" 15 Advances the cursor upto the character before the next character typed. Most useful with operators such as \fBd\fR and \fBc\fR to delete the characters up to a following character. You can use \fB.\fR to delete more if this doesn't delete enough the first time (4.1). .iP "u" 15 Undoes the last change made to the current buffer. If repeated, will alternate between these two states, thus is its own inverse. When used after an insert which inserted text on more than one line, the lines are saved in the numeric named buffers (3.5). .iP "v" 15 Unused. .iP "w" 15 Advances to the beginning of the next word, as defined by \fBb\fR (2.4). .iP "x" 15 Deletes the single character under the cursor. With a count deletes deletes that many characters forward from the cursor position, but only on the current line (6.5). .iP "y" 15 An operator, yanks the following object into the unnamed temporary buffer. If preceded by a named buffer specification, \fB"\fR\fIx\fR, the text is placed in that buffer also. Text can be recovered by a later \fBp\fR or \fBP\fR (7.4). .iP "z" 15 Redraws the screen with the current line placed as specified by the following character: \s-2RETURN\s0 specifies the top of the screen, \fB.\fR the center of the screen, and \fB\-\fR at the bottom of the screen. A count may be given after the \fBz\fR and before the following character to specify the new screen size for the redraw. A count before the \fBz\fR gives the number of the line to place in the center of the screen instead of the default current line. (5.4) .iP "{" 15 Retreats to the beginning of the beginning of the preceding paragraph. A paragraph begins at each macro in the \fIparagraphs\fR option, normally `.IP', `.LP', `.PP', `.QP' and `.bp'. A paragraph also begins after a completely empty line, and at each section boundary (see \fB[[\fR above) (4.2, 6.8, 7.6). .iP "|" 15 Places the cursor on the character in the column specified by the count (7.1, 7.2). .iP "}" 15 Advances to the beginning of the next paragraph. See \fB{\fR for the definition of paragraph (4.2, 6.8, 7.6). .iP "~" 15 Unused. .iP "^?\ (\s-2\fRDEL\fP\s0)" 15 Interrupts the editor, returning it to command accepting state (1.5, 7.5) .bp \&. nvi-1.81.6/docs/vitut/vi.in0100644000076400001440000022773510720065506014543 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: vi.in,v 8.5 1996/08/18 11:35:55 bostic Exp $ (Berkeley) $Date: 1996/08/18 11:35:55 $ .\" .nr LL 6.5i .nr FL 6.5i .EH 'USD:11-%''An Introduction to Display Editing with Vi' .OH 'An Introduction to Display Editing with Vi''USD:11-%' .bd S 3 .if t .ds dg \(dg .if n .ds dg + .if t .ds dd \(dd .if n .ds dd ++ .\".RP .TL An Introduction to Display Editing with Vi .AU William Joy .AU Mark Horton .AI Computer Science Division Department of Electrical Engineering and Computer Science University of California, Berkeley Berkeley, Ca. 94720 .AB .PP .I Vi (visual) is a display oriented interactive text editor. When using .I vi the screen of your terminal acts as a window into the file which you are editing. Changes which you make to the file are reflected in what you see. .PP Using .I vi you can insert new text any place in the file quite easily. Most of the commands to .I vi move the cursor around in the file. There are commands to move the cursor forward and backward in units of characters, words, sentences and paragraphs. A small set of operators, like .B d for delete and .B c for change, are combined with the motion commands to form operations such as delete word or change paragraph, in a simple and natural way. This regularity and the mnemonic assignment of commands to keys makes the editor command set easy to remember and to use. .PP .I Vi will work on a large number of display terminals, and new terminals are easily driven after editing a terminal description file. While it is advantageous to have an intelligent terminal which can locally insert and delete lines and characters from the display, the editor will function quite well on dumb terminals over slow phone lines. The editor makes allowance for the low bandwidth in these situations and uses smaller window sizes and different display updating algorithms to make best use of the limited speed available. .PP It is also possible to use the command set of .I vi on hardcopy terminals, storage tubes and ``glass tty's'' using a one line editing window; thus .I vi's command set is available on all terminals. The full command set of the more traditional, line oriented editor .I ex is available within .I vi; it is quite simple to switch between the two modes of editing. .AE .NH 1 Getting started .PP .FS The financial support of an \s-2IBM\s0 Graduate Fellowship and the National Science Foundation under grants MCS74-07644-A03 and MCS78-07291 is gratefully acknowledged. .FE This document provides a quick introduction to .I vi. (Pronounced \fIvee-eye\fP.) You should be running .I vi on a file you are familiar with while you are reading this. The first part of this document (sections 1 through 5) describes the basics of using .I vi. Some topics of special interest are presented in section 6, and some nitty-gritty details of how the editor functions are saved for section 7 to avoid cluttering the presentation here. .PP There is also a short appendix here, which gives for each character the special meanings which this character has in \fIvi\fR. Attached to this document should be a quick reference card. This card summarizes the commands of .I vi in a very compact format. You should have the card handy while you are learning .I vi. .NH 2 Specifying terminal type .PP Before you can start .I vi you must tell the system what kind of terminal you are using. Here is a (necessarily incomplete) list of terminal type codes. If your terminal does not appear here, you should consult with one of the staff members on your system to find out the code for your terminal. If your terminal does not have a code, one can be assigned and a description for the terminal can be created. .LP .TS center; ab ab ab a a a. Code Full name Type _ 2621 Hewlett-Packard 2621A/P Intelligent 2645 Hewlett-Packard 264x Intelligent act4 Microterm ACT-IV Dumb act5 Microterm ACT-V Dumb adm3a Lear Siegler ADM-3a Dumb adm31 Lear Siegler ADM-31 Intelligent c100 Human Design Concept 100 Intelligent dm1520 Datamedia 1520 Dumb dm2500 Datamedia 2500 Intelligent dm3025 Datamedia 3025 Intelligent fox Perkin-Elmer Fox Dumb h1500 Hazeltine 1500 Intelligent h19 Heathkit h19 Intelligent i100 Infoton 100 Intelligent mime Imitating a smart act4 Intelligent t1061 Teleray 1061 Intelligent vt52 Dec VT-52 Dumb .TE .PP Suppose for example that you have a Hewlett-Packard HP2621A terminal. The code used by the system for this terminal is `2621'. In this case you can use one of the following commands to tell the system the type of your terminal: .DS % \fBsetenv TERM\fP 2621 .DE This command works with the .I csh shell. If you are using the standard Bourne shell .I sh then you should give the commands .DS $ \fBTERM=\fP2621 $ \fBexport TERM\fP .DE .PP If you want to arrange to have your terminal type set up automatically when you log in, you can use the .I tset program. If you dial in on a .I mime , but often use hardwired ports, a typical line for your .I .login file (if you use csh) would be .DS \fBsetenv TERM \(gatset\fP \- \-d mime\(ga .DE or for your .I .profile file (if you use sh) .DS \fBTERM=\(gatse\fPt \- \-d mime\(ga .DE .I Tset knows which terminals are hardwired to each port and needs only to be told that when you dial in you are probably on a .I mime . .I Tset is usually used to change the erase and kill characters, too. .NH 2 Editing a file .PP After telling the system which kind of terminal you have, you should make a copy of a file you are familiar with, and run .I vi on this file, giving the command .DS % \fBvi\fR \fIname\fR .DE replacing \fIname\fR with the name of the copy file you just created. The screen should clear and the text of your file should appear on the screen. If something else happens refer to the footnote.\*(dd .FS \*(dd If you gave the system an incorrect terminal type code then the editor may have just made a mess out of your screen. This happens when it sends control codes for one kind of terminal to some other kind of terminal. In this case hit the keys \fB:q\fR (colon and the q key) and then hit the \s-2RETURN\s0 key. This should get you back to the command level interpreter. Figure out what you did wrong (ask someone else if necessary) and try again. Another thing which can go wrong is that you typed the wrong file name and the editor just printed an error diagnostic. In this case you should follow the above procedure for getting out of the editor, and try again this time spelling the file name correctly. If the editor doesn't seem to respond to the commands which you type here, try sending an interrupt to it by hitting the \s-2DEL\s0 or \s-2RUB\s0 key on your terminal, and then hitting the \fB:q\fR command again followed by a carriage return. .sp .FE .NH 2 The editor's copy: the buffer .PP The editor does not directly modify the file which you are editing. Rather, the editor makes a copy of this file, in a place called the .I buffer, and remembers the file's name. You do not affect the contents of the file unless and until you write the changes you make back into the original file. .NH 2 Notational conventions .PP In our examples, input which must be typed as is will be presented in \fBbold face\fR. Text which should be replaced with appropriate input will be given in \fIitalics\fR. We will represent special characters in \s-2SMALL CAPITALS\s0. .NH 2 Arrow keys .PP The editor command set is independent of the terminal you are using. On most terminals with cursor positioning keys, these keys will also work within the editor. If you don't have cursor positioning keys, or even if you do, you can use the \fBh j k\fR and \fBl\fR keys as cursor positioning keys (these are labelled with arrows on an .I adm3a).* .PP (Particular note for the HP2621: on this terminal the function keys must be \fIshifted\fR (ick) to send to the machine, otherwise they only act locally. Unshifted use will leave the cursor positioned incorrectly.) .FS * As we will see later, .I h moves back to the left (like control-h which is a backspace), .I j moves down (in the same column), .I k moves up (in the same column), and .I l moves to the right. .FE .NH 2 Special characters: \s-2ESC\s0, \s-2CR\s0 and \s-2DEL\s0 .PP Several of these special characters are very important, so be sure to find them right now. Look on your keyboard for a key labelled \s-2ESC\s0 or \s-2ALT\s0. It should be near the upper left corner of your terminal. Try hitting this key a few times. The editor will ring the bell to indicate that it is in a quiescent state.\*(dd .FS \*(dd On smart terminals where it is possible, the editor will quietly flash the screen rather than ringing the bell. .FE Partially formed commands are cancelled by \s-2ESC\s0, and when you insert text in the file you end the text insertion with \s-2ESC\s0. This key is a fairly harmless one to hit, so you can just hit it if you don't know what is going on until the editor rings the bell. .PP The \s-2CR\s0 or \s-2RETURN\s0 key is important because it is used to terminate certain commands. It is usually at the right side of the keyboard, and is the same command used at the end of each shell command. .PP Another very useful key is the \s-2DEL\s0 or \s-2RUB\s0 key, which generates an interrupt, telling the editor to stop what it is doing. It is a forceful way of making the editor listen to you, or to return it to the quiescent state if you don't know or don't like what is going on. Try hitting the `/' key on your terminal. This key is used when you want to specify a string to be searched for. The cursor should now be positioned at the bottom line of the terminal after a `/' printed as a prompt. You can get the cursor back to the current position by hitting the \s-2DEL\s0 or \s-2RUB\s0 key; try this now.* .FS * Backspacing over the `/' will also cancel the search. .FE From now on we will simply refer to hitting the \s-2DEL\s0 or \s-2RUB\s0 key as ``sending an interrupt.''** .FS ** On some systems, this interruptibility comes at a price: you cannot type ahead when the editor is computing with the cursor on the bottom line. .FE .PP The editor often echoes your commands on the last line of the terminal. If the cursor is on the first position of this last line, then the editor is performing a computation, such as computing a new position in the file after a search or running a command to reformat part of the buffer. When this is happening you can stop the editor by sending an interrupt. .NH 2 Getting out of the editor .PP After you have worked with this introduction for a while, and you wish to do something else, you can give the command \fBZZ\fP to the editor. This will write the contents of the editor's buffer back into the file you are editing, if you made any changes, and then quit from the editor. You can also end an editor session by giving the command \fB:q!\fR\s-2CR\s0;\*(dg .FS \*(dg All commands which read from the last display line can also be terminated with a \s-2ESC\s0 as well as an \s-2CR\s0. .FE this is a dangerous but occasionally essential command which ends the editor session and discards all your changes. You need to know about this command in case you change the editor's copy of a file you wish only to look at. Be very careful not to give this command when you really want to save the changes you have made. .NH 1 Moving around in the file .NH 2 Scrolling and paging .PP The editor has a number of commands for moving around in the file. The most useful of these is generated by hitting the control and D keys at the same time, a control-D or `^D'. We will use this two character notation for referring to these control keys from now on. You may have a key labelled `^' on your terminal. This key will be represented as `\(ua' in this document; `^' is exclusively used as part of the `^x' notation for control characters.\*(dd .FS \*(dd If you don't have a `^' key on your terminal then there is probably a key labelled `\(ua'; in any case these characters are one and the same. .FE .PP As you know now if you tried hitting \fB^D\fR, this command scrolls down in the file. The \fBD\fR thus stands for down. Many editor commands are mnemonic and this makes them much easier to remember. For instance the command to scroll up is \fB^U\fR. Many dumb terminals can't scroll up at all, in which case hitting \fB^U\fR clears the screen and refreshes it with a line which is farther back in the file at the top. .PP If you want to see more of the file below where you are, you can hit \fB^E\fR to expose one more line at the bottom of the screen, leaving the cursor where it is. The command \fB^Y\fR (which is hopelessly non-mnemonic, but next to \fB^U\fR on the keyboard) exposes one more line at the top of the screen. .PP There are other ways to move around in the file; the keys \fB^F\fR and \fB^B\fR move forward and backward a page, keeping a couple of lines of continuity between screens so that it is possible to read through a file using these rather than \fB^D\fR and \fB^U\fR if you wish. .PP Notice the difference between scrolling and paging. If you are trying to read the text in a file, hitting \fB^F\fR to move forward a page will leave you only a little context to look back at. Scrolling on the other hand leaves more context, and happens more smoothly. You can continue to read the text as scrolling is taking place. .NH 2 Searching, goto, and previous context .PP Another way to position yourself in the file is by giving the editor a string to search for. Type the character \fB/\fR followed by a string of characters terminated by \s-2CR\s0. The editor will position the cursor at the next occurrence of this string. Try hitting \fBn\fR to then go to the next occurrence of this string. The character \fB?\fR will search backwards from where you are, and is otherwise like \fB/\fR.\*(dg .FS \*(dg These searches will normally wrap around the end of the file, and thus find the string even if it is not on a line in the direction you search provided it is anywhere else in the file. You can disable this wraparound in scans by giving the command \fB:se nowrapscan\fR\s-2CR\s0, or more briefly \fB:se nows\fR\s-2CR\s0. .FE .PP If the search string you give the editor is not present in the file the editor will print a diagnostic on the last line of the screen, and the cursor will be returned to its initial position. .PP If you wish the search to match only at the beginning of a line, begin the search string with an \fB\(ua\fR. To match only at the end of a line, end the search string with a \fB$\fR. Thus \fB/\(uasearch\fR\s-2CR\s0 will search for the word `search' at the beginning of a line, and \fB/last$\fR\s-2CR\s0 searches for the word `last' at the end of a line.* .FS *Actually, the string you give to search for here can be a .I "regular expression" in the sense of the editors .I ex (1) and .I ed (1). If you don't wish to learn about this yet, you can disable this more general facility by doing \fB:se\ nomagic\fR\s-2CR\s0; by putting this command in EXINIT in your environment, you can have this always be in effect (more about .I EXINIT later.) .FE .PP The command \fBG\fR, when preceded by a number will position the cursor at that line in the file. Thus \fB1G\fR will move the cursor to the first line of the file. If you give \fBG\fR no count, then it moves to the end of the file. .PP If you are near the end of the file, and the last line is not at the bottom of the screen, the editor will place only the character `~' on each remaining line. This indicates that the last line in the file is on the screen; that is, the `~' lines are past the end of the file. .PP You can find out the state of the file you are editing by typing a \fB^G\fR. The editor will show you the name of the file you are editing, the number of the current line, the number of lines in the buffer, and the percentage of the way through the buffer which you are. Try doing this now, and remember the number of the line you are on. Give a \fBG\fR command to get to the end and then another \fBG\fR command to get back where you were. .PP You can also get back to a previous position by using the command \fB\(ga\(ga\fR (two back quotes). This is often more convenient than \fBG\fR because it requires no advance preparation. Try giving a \fBG\fR or a search with \fB/\fR or \fB?\fR and then a \fB\(ga\(ga\fR to get back to where you were. If you accidentally hit \fBn\fR or any command which moves you far away from a context of interest, you can quickly get back by hitting \fB\(ga\(ga\fR. .NH 2 Moving around on the screen .PP Now try just moving the cursor around on the screen. If your terminal has arrow keys (4 or 5 keys with arrows going in each direction) try them and convince yourself that they work. If you don't have working arrow keys, you can always use .B h , .B j , .B k , and .B l . Experienced users of .I vi prefer these keys to arrow keys, because they are usually right underneath their fingers. .PP Hit the \fB+\fR key. Each time you do, notice that the cursor advances to the next line in the file, at the first non-white position on the line. The \fB\-\fR key is like \fB+\fR but goes the other way. .PP These are very common keys for moving up and down lines in the file. Notice that if you go off the bottom or top with these keys then the screen will scroll down (and up if possible) to bring a line at a time into view. The \s-2RETURN\s0 key has the same effect as the \fB+\fR key. .PP .I Vi also has commands to take you to the top, middle and bottom of the screen. \fBH\fR will take you to the top (home) line on the screen. Try preceding it with a number as in \fB3H\fR. This will take you to the third line on the screen. Many .I vi commands take preceding numbers and do interesting things with them. Try \fBM\fR, which takes you to the middle line on the screen, and \fBL\fR, which takes you to the last line on the screen. \fBL\fR also takes counts, thus \fB5L\fR will take you to the fifth line from the bottom. .NH 2 Moving within a line .PP Now try picking a word on some line on the screen, not the first word on the line. move the cursor using \s-2RETURN\s0 and \fB\-\fR to be on the line where the word is. Try hitting the \fBw\fR key. This will advance the cursor to the next word on the line. Try hitting the \fBb\fR key to back up words in the line. Also try the \fBe\fR key which advances you to the end of the current word rather than to the beginning of the next word. Also try \s-2SPACE\s0 (the space bar) which moves right one character and the \s-2BS\s0 (backspace or \fB^H\fR) key which moves left one character. The key \fBh\fR works as \fB^H\fR does and is useful if you don't have a \s-2BS\s0 key. (Also, as noted just above, \fBl\fR will move to the right.) .PP If the line had punctuation in it you may have noticed that that the \fBw\fR and \fBb\fR keys stopped at each group of punctuation. You can also go back and forwards words without stopping at punctuation by using \fBW\fR and \fBB\fR rather than the lower case equivalents. Think of these as bigger words. Try these on a few lines with punctuation to see how they differ from the lower case \fBw\fR and \fBb\fR. .PP The word keys wrap around the end of line, rather than stopping at the end. Try moving to a word on a line below where you are by repeatedly hitting \fBw\fR. .NH 2 Summary .IP .TS lw(.50i)b a. \fR\s-2SPACE\s0\fP advance the cursor one position ^B backwards to previous page ^D scrolls down in the file ^E exposes another line at the bottom ^F forward to next page ^G tell what is going on ^H backspace the cursor ^N next line, same column ^P previous line, same column ^U scrolls up in the file ^Y exposes another line at the top + next line, at the beginning \- previous line, at the beginning / scan for a following string forwards ? scan backwards B back a word, ignoring punctuation G go to specified line, last default H home screen line M middle screen line L last screen line W forward a word, ignoring punctuation b back a word e end of current word n scan for next instance of \fB/\fR or \fB?\fR pattern w word after this word .TE .NH 2 View .PP If you want to use the editor to look at a file, rather than to make changes, invoke it as .I view instead of .I vi . This will set the .I readonly option which will prevent you from accidently overwriting the file. .sp .NH 1 Making simple changes .NH 2 Inserting .PP One of the most useful commands is the \fBi\fR (insert) command. After you type \fBi\fR, everything you type until you hit \s-2ESC\s0 is inserted into the file. Try this now; position yourself to some word in the file and try inserting text before this word. If you are on an dumb terminal it will seem, for a minute, that some of the characters in your line have been overwritten, but they will reappear when you hit \s-2ESC\s0. .PP Now try finding a word which can, but does not, end in an `s'. Position yourself at this word and type \fBe\fR (move to end of word), then \fBa\fR for append and then `s\s-2ESC\s0' to terminate the textual insert. This sequence of commands can be used to easily pluralize a word. .PP Try inserting and appending a few times to make sure you understand how this works; \fBi\fR placing text to the left of the cursor, \fBa\fR to the right. .PP It is often the case that you want to add new lines to the file you are editing, before or after some specific line in the file. Find a line where this makes sense and then give the command \fBo\fR to create a new line after the line you are on, or the command \fBO\fR to create a new line before the line you are on. After you create a new line in this way, text you type up to an \s-2ESC\s0 is inserted on the new line. .PP Many related editor commands are invoked by the same letter key and differ only in that one is given by a lower case key and the other is given by an upper case key. In these cases, the upper case key often differs from the lower case key in its sense of direction, with the upper case key working backward and/or up, while the lower case key moves forward and/or down. .PP Whenever you are typing in text, you can give many lines of input or just a few characters. To type in more than one line of text, hit a \s-2RETURN\s0 at the middle of your input. A new line will be created for text, and you can continue to type. If you are on a slow and dumb terminal the editor may choose to wait to redraw the tail of the screen, and will let you type over the existing screen lines. This avoids the lengthy delay which would occur if the editor attempted to keep the tail of the screen always up to date. The tail of the screen will be fixed up, and the missing lines will reappear, when you hit \s-2ESC\s0. .PP While you are inserting new text, you can use the characters you normally use at the system command level (usually \fB^H\fR or \fB#\fR) to backspace over the last character which you typed, and the character which you use to kill input lines (usually \fB@\fR, \fB^X\fR, or \fB^U\fR) to erase the input you have typed on the current line.\*(dg .FS \*(dg In fact, the character \fB^H\fR (backspace) always works to erase the last input character here, regardless of what your erase character is. .FE The character \fB^W\fR will erase a whole word and leave you after the space after the previous word; it is useful for quickly backing up in an insert. .PP Notice that when you backspace during an insertion the characters you backspace over are not erased; the cursor moves backwards, and the characters remain on the display. This is often useful if you are planning to type in something similar. In any case the characters disappear when when you hit \s-2ESC\s0; if you want to get rid of them immediately, hit an \s-2ESC\s0 and then \fBa\fR again. .PP Notice also that you can't erase characters which you didn't insert, and that you can't backspace around the end of a line. If you need to back up to the previous line to make a correction, just hit \s-2ESC\s0 and move the cursor back to the previous line. After making the correction you can return to where you were and use the insert or append command again. .sp .5 .NH 2 Making small corrections .PP You can make small corrections in existing text quite easily. Find a single character which is wrong or just pick any character. Use the arrow keys to find the character, or get near the character with the word motion keys and then either backspace (hit the \s-2BS\s0 key or \fB^H\fR or even just \fBh\fR) or \s-2SPACE\s0 (using the space bar) until the cursor is on the character which is wrong. If the character is not needed then hit the \fBx\fP key; this deletes the character from the file. It is analogous to the way you \fBx\fP out characters when you make mistakes on a typewriter (except it's not as messy). .PP If the character is incorrect, you can replace it with the correct character by giving the command \fBr\fR\fIc\fR, where \fIc\fR is replaced by the correct character. Finally if the character which is incorrect should be replaced by more than one character, give the command \fBs\fR which substitutes a string of characters, ending with \s-2ESC\s0, for it. If there are a small number of characters which are wrong you can precede \fBs\fR with a count of the number of characters to be replaced. Counts are also useful with \fBx\fR to specify the number of characters to be deleted. .NH 2 More corrections: operators .PP You already know almost enough to make changes at a higher level. All you need to know now is that the .B d key acts as a delete operator. Try the command .B dw to delete a word. Try hitting \fB.\fR a few times. Notice that this repeats the effect of the \fBdw\fR. The command \fB.\fR repeats the last command which made a change. You can remember it by analogy with an ellipsis `\fB...\fR'. .PP Now try \fBdb\fR. This deletes a word backwards, namely the preceding word. Try \fBd\fR\s-2SPACE\s0. This deletes a single character, and is equivalent to the \fBx\fR command. .PP Another very useful operator is .B c or change. The command .B cw thus changes the text of a single word. You follow it by the replacement text ending with an \s-2ESC\s0. Find a word which you can change to another, and try this now. Notice that the end of the text to be changed was marked with the character `$' so that you can see this as you are typing in the new material. .sp .5 .NH 2 Operating on lines .PP It is often the case that you want to operate on lines. Find a line which you want to delete, and type \fBdd\fR, the .B d operator twice. This will delete the line. If you are on a dumb terminal, the editor may just erase the line on the screen, replacing it with a line with only an @ on it. This line does not correspond to any line in your file, but only acts as a place holder. It helps to avoid a lengthy redraw of the rest of the screen which would be necessary to close up the hole created by the deletion on a terminal without a delete line capability. .PP Try repeating the .B c operator twice; this will change a whole line, erasing its previous contents and replacing them with text you type up to an \s-2ESC\s0.\*(dg .FS \*(dg The command \fBS\fR is a convenient synonym for for \fBcc\fR, by analogy with \fBs\fR. Think of \fBS\fR as a substitute on lines, while \fBs\fR is a substitute on characters. .FE .PP You can delete or change more than one line by preceding the .B dd or .B cc with a count, i.e. \fB5dd\fR deletes 5 lines. You can also give a command like \fBdL\fR to delete all the lines up to and including the last line on the screen, or \fBd3L\fR to delete through the third from the bottom line. Try some commands like this now.* .FS * One subtle point here involves using the \fB/\fR search after a \fBd\fR. This will normally delete characters from the current position to the point of the match. If what is desired is to delete whole lines including the two points, give the pattern as \fB/pat/+0\fR, a line address. .FE Notice that the editor lets you know when you change a large number of lines so that you can see the extent of the change. The editor will also always tell you when a change you make affects text which you cannot see. .NH 2 Undoing .PP Now suppose that the last change which you made was incorrect; you could use the insert, delete and append commands to put the correct material back. However, since it is often the case that we regret a change or make a change incorrectly, the editor provides a .B u (undo) command to reverse the last change which you made. Try this a few times, and give it twice in a row to notice that an .B u also undoes a .B u. .PP The undo command lets you reverse only a single change. After you make a number of changes to a line, you may decide that you would rather have the original state of the line back. The .B U command restores the current line to the state before you started changing it. .PP You can recover text which you delete, even if undo will not bring it back; see the section on recovering lost text below. .NH 2 Summary .IP .TS lw(.50i)b a. \fR\s-2SPACE\s0\fP advance the cursor one position ^H backspace the cursor ^W erase a word during an insert \fRerase\fP your erase (usually ^H or #), erases a character during an insert \fRkill\fP your kill (usually @, ^X, or ^U), kills the insert on this line \&\fB.\fP repeats the changing command O opens and inputs new lines, above the current U undoes the changes you made to the current line a appends text after the cursor c changes the object you specify to the following text d deletes the object you specify i inserts text before the cursor o opens and inputs new lines, below the current u undoes the last change .TE .NH 1 Moving about; rearranging and duplicating text .NH 2 Low level character motions .PP Now move the cursor to a line where there is a punctuation or a bracketing character such as a parenthesis or a comma or period. Try the command \fBf\fR\fIx\fR where \fIx\fR is this character. This command finds the next \fIx\fR character to the right of the cursor in the current line. Try then hitting a \fB;\fR, which finds the next instance of the same character. By using the \fBf\fR command and then a sequence of \fB;\fR's you can often get to a particular place in a line much faster than with a sequence of word motions or \s-2SPACE\s0s. There is also a \fBF\fR command, which is like \fBf\fR, but searches backward. The \fB;\fR command repeats \fBF\fR also. .PP When you are operating on the text in a line it is often desirable to deal with the characters up to, but not including, the first instance of a character. Try \fBdf\fR\fIx\fR for some \fIx\fR now and notice that the \fIx\fR character is deleted. Undo this with \fBu\fR and then try \fBdt\fR\fIx\fR; the \fBt\fR here stands for to, i.e. delete up to the next \fIx\fR, but not the \fIx\fR. The command \fBT\fR is the reverse of \fBt\fR. .PP When working with the text of a single line, an \fB\(ua\fR moves the cursor to the first non-white position on the line, and a \fB$\fR moves it to the end of the line. Thus \fB$a\fR will append new text at the end of the current line. .PP Your file may have tab (\fB^I\fR) characters in it. These characters are represented as a number of spaces expanding to a tab stop, where tab stops are every 8 positions.* .FS * This is settable by a command of the form \fB:se ts=\fR\fIx\fR\s-2CR\s0, where \fIx\fR is 4 to set tabstops every four columns. This has effect on the screen representation within the editor. .FE When the cursor is at a tab, it sits on the last of the several spaces which represent that tab. Try moving the cursor back and forth over tabs so you understand how this works. .PP On rare occasions, your file may have nonprinting characters in it. These characters are displayed in the same way they are represented in this document, that is with a two character code, the first character of which is `^'. On the screen non-printing characters resemble a `^' character adjacent to another, but spacing or backspacing over the character will reveal that the two characters are, like the spaces representing a tab character, a single character. .PP The editor sometimes discards control characters, depending on the character and the setting of the .I beautify option, if you attempt to insert them in your file. You can get a control character in the file by beginning an insert and then typing a \fB^V\fR before the control character. The \fB^V\fR quotes the following character, causing it to be inserted directly into the file. .PP .NH 2 Higher level text objects .PP In working with a document it is often advantageous to work in terms of sentences, paragraphs, and sections. The operations \fB(\fR and \fB)\fR move to the beginning of the previous and next sentences respectively. Thus the command \fBd)\fR will delete the rest of the current sentence; likewise \fBd(\fR will delete the previous sentence if you are at the beginning of the current sentence, or the current sentence up to where you are if you are not at the beginning of the current sentence. .PP A sentence is defined to end at a `.', `!' or `?' which is followed by either the end of a line, or by two spaces. Any number of closing `)', `]', `"' and `\(aa' characters may appear after the `.', `!' or `?' before the spaces or end of line. .PP The operations \fB{\fR and \fB}\fR move over paragraphs and the operations \fB[[\fR and \fB]]\fR move over sections.\*(dg .FS \*(dg The \fB[[\fR and \fB]]\fR operations require the operation character to be doubled because they can move the cursor far from where it currently is. While it is easy to get back with the command \fB\(ga\(ga\fP, these commands would still be frustrating if they were easy to hit accidentally. .FE .PP A paragraph begins after each empty line, and also at each of a set of paragraph macros, specified by the pairs of characters in the definition of the string valued option \fIparagraphs\fR. The default setting for this option defines the paragraph macros of the \fI\-ms\fR and \fI\-mm\fR macro packages, i.e. the `.IP', `.LP', `.PP' and `.QP', `.P' and `.LI' macros.\*(dd .FS \*(dd You can easily change or extend this set of macros by assigning a different string to the \fIparagraphs\fR option in your EXINIT. See section 6.2 for details. The `.bp' directive is also considered to start a paragraph. .FE Each paragraph boundary is also a sentence boundary. The sentence and paragraph commands can be given counts to operate over groups of sentences and paragraphs. .PP Sections in the editor begin after each macro in the \fIsections\fR option, normally `.NH', `.SH', `.H' and `.HU', and each line with a formfeed \fB^L\fR in the first column. Section boundaries are always line and paragraph boundaries also. .PP Try experimenting with the sentence and paragraph commands until you are sure how they work. If you have a large document, try looking through it using the section commands. The section commands interpret a preceding count as a different window size in which to redraw the screen at the new location, and this window size is the base size for newly drawn windows until another size is specified. This is very useful if you are on a slow terminal and are looking for a particular section. You can give the first section command a small count to then see each successive section heading in a small window. .NH 2 Rearranging and duplicating text .PP The editor has a single unnamed buffer where the last deleted or changed away text is saved, and a set of named buffers \fBa\fR\-\fBz\fR which you can use to save copies of text and to move text around in your file and between files. .PP The operator .B y yanks a copy of the object which follows into the unnamed buffer. If preceded by a buffer name, \fB"\fR\fIx\fR\|\fBy\fR, where \fIx\fR here is replaced by a letter \fBa\-z\fR, it places the text in the named buffer. The text can then be put back in the file with the commands .B p and .B P; \fBp\fR puts the text after or below the cursor, while \fBP\fR puts the text before or above the cursor. .PP If the text which you yank forms a part of a line, or is an object such as a sentence which partially spans more than one line, then when you put the text back, it will be placed after the cursor (or before if you use \fBP\fR). If the yanked text forms whole lines, they will be put back as whole lines, without changing the current line. In this case, the put acts much like a \fBo\fR or \fBO\fR command. .PP Try the command \fBYP\fR. This makes a copy of the current line and leaves you on this copy, which is placed before the current line. The command \fBY\fR is a convenient abbreviation for \fByy\fR. The command \fBYp\fR will also make a copy of the current line, and place it after the current line. You can give \fBY\fR a count of lines to yank, and thus duplicate several lines; try \fB3YP\fR. .PP To move text within the buffer, you need to delete it in one place, and put it back in another. You can precede a delete operation by the name of a buffer in which the text is to be stored as in \fB"a5dd\fR deleting 5 lines into the named buffer \fIa\fR. You can then move the cursor to the eventual resting place of the these lines and do a \fB"ap\fR or \fB"aP\fR to put them back. In fact, you can switch and edit another file before you put the lines back, by giving a command of the form \fB:e \fR\fIname\fR\s-2CR\s0 where \fIname\fR is the name of the other file you want to edit. You will have to write back the contents of the current editor buffer (or discard them) if you have made changes before the editor will let you switch to the other file. An ordinary delete command saves the text in the unnamed buffer, so that an ordinary put can move it elsewhere. However, the unnamed buffer is lost when you change files, so to move text from one file to another you should use an unnamed buffer. .NH 2 Summary. .IP .TS lw(.50i)b a. \(ua first non-white on line $ end of line ) forward sentence } forward paragraph ]] forward section ( backward sentence { backward paragraph [[ backward section f\fIx\fR find \fIx\fR forward in line p put text back, after cursor or below current line y yank operator, for copies and moves t\fIx\fR up to \fIx\fR forward, for operators F\fIx\fR f backward in line P put text back, before cursor or above current line T\fIx\fR t backward in line .TE .ne 1i .NH 1 High level commands .NH 2 Writing, quitting, editing new files .PP So far we have seen how to enter .I vi and to write out our file using either \fBZZ\fR or \fB:w\fR\s-2CR\s0. The first exits from the editor, (writing if changes were made), the second writes and stays in the editor. .PP If you have changed the editor's copy of the file but do not wish to save your changes, either because you messed up the file or decided that the changes are not an improvement to the file, then you can give the command \fB:q!\fR\s-2CR\s0 to quit from the editor without writing the changes. You can also reedit the same file (starting over) by giving the command \fB:e!\fR\s-2CR\s0. These commands should be used only rarely, and with caution, as it is not possible to recover the changes you have made after you discard them in this manner. .PP You can edit a different file without leaving the editor by giving the command \fB:e\fR\ \fIname\fR\s-2CR\s0. If you have not written out your file before you try to do this, then the editor will tell you this, and delay editing the other file. You can then give the command \fB:w\fR\s-2CR\s0 to save your work and then the \fB:e\fR\ \fIname\fR\s-2CR\s0 command again, or carefully give the command \fB:e!\fR\ \fIname\fR\s-2CR\s0, which edits the other file discarding the changes you have made to the current file. To have the editor automatically save changes, include .I "set autowrite" in your EXINIT, and use \fB:n\fP instead of \fB:e\fP. .NH 2 Escaping to a shell .PP You can get to a shell to execute a single command by giving a .I vi command of the form \fB:!\fIcmd\fR\s-2CR\s0. The system will run the single command .I cmd and when the command finishes, the editor will ask you to hit a \s-2RETURN\s0 to continue. When you have finished looking at the output on the screen, you should hit \s-2RETURN\s0 and the editor will clear the screen and redraw it. You can then continue editing. You can also give another \fB:\fR command when it asks you for a \s-2RETURN\s0; in this case the screen will not be redrawn. .PP If you wish to execute more than one command in the shell, then you can give the command \fB:sh\fR\s-2CR\s0. This will give you a new shell, and when you finish with the shell, ending it by typing a \fB^D\fR, the editor will clear the screen and continue. .PP On systems which support it, \fB^Z\fP will suspend the editor and return to the (top level) shell. When the editor is resumed, the screen will be redrawn. .NH 2 Marking and returning .PP The command \fB\(ga\(ga\fR returned to the previous place after a motion of the cursor by a command such as \fB/\fR, \fB?\fR or \fBG\fR. You can also mark lines in the file with single letter tags and return to these marks later by naming the tags. Try marking the current line with the command \fBm\fR\fIx\fR, where you should pick some letter for \fIx\fR, say `a'. Then move the cursor to a different line (any way you like) and hit \fB\(gaa\fR. The cursor will return to the place which you marked. Marks last only until you edit another file. .PP When using operators such as .B d and referring to marked lines, it is often desirable to delete whole lines rather than deleting to the exact position in the line marked by \fBm\fR. In this case you can use the form \fB\(aa\fR\fIx\fR rather than \fB\(ga\fR\fIx\fR. Used without an operator, \fB\(aa\fR\fIx\fR will move to the first non-white character of the marked line; similarly \fB\(aa\(aa\fR moves to the first non-white character of the line containing the previous context mark \fB\(ga\(ga\fR. .NH 2 Adjusting the screen .PP If the screen image is messed up because of a transmission error to your terminal, or because some program other than the editor wrote output to your terminal, you can hit a \fB^L\fR, the \s-2ASCII\s0 form-feed character, to cause the screen to be refreshed. .PP On a dumb terminal, if there are @ lines in the middle of the screen as a result of line deletion, you may get rid of these lines by typing \fB^R\fR to cause the editor to retype the screen, closing up these holes. .PP Finally, if you wish to place a certain line on the screen at the top middle or bottom of the screen, you can position the cursor to that line, and then give a \fBz\fR command. You should follow the \fBz\fR command with a \s-2RETURN\s0 if you want the line to appear at the top of the window, a \fB.\fR if you want it at the center, or a \fB\-\fR if you want it at the bottom. .NH 1 Special topics .NH 2 Editing on slow terminals .PP When you are on a slow terminal, it is important to limit the amount of output which is generated to your screen so that you will not suffer long delays, waiting for the screen to be refreshed. We have already pointed out how the editor optimizes the updating of the screen during insertions on dumb terminals to limit the delays, and how the editor erases lines to @ when they are deleted on dumb terminals. .PP The use of the slow terminal insertion mode is controlled by the .I slowopen option. You can force the editor to use this mode even on faster terminals by giving the command \fB:se slow\fR\s-2CR\s0. If your system is sluggish this helps lessen the amount of output coming to your terminal. You can disable this option by \fB:se noslow\fR\s-2CR\s0. .PP The editor can simulate an intelligent terminal on a dumb one. Try giving the command \fB:se redraw\fR\s-2CR\s0. This simulation generates a great deal of output and is generally tolerable only on lightly loaded systems and fast terminals. You can disable this by giving the command \fB:se noredraw\fR\s-2CR\s0. .PP The editor also makes editing more pleasant at low speed by starting editing in a small window, and letting the window expand as you edit. This works particularly well on intelligent terminals. The editor can expand the window easily when you insert in the middle of the screen on these terminals. If possible, try the editor on an intelligent terminal to see how this works. .PP You can control the size of the window which is redrawn each time the screen is cleared by giving window sizes as argument to the commands which cause large screen motions: .DS .B ": / ? [[ ]] \(ga \(aa" .DE Thus if you are searching for a particular instance of a common string in a file you can precede the first search command by a small number, say 3, and the editor will draw three line windows around each instance of the string which it locates. .PP You can easily expand or contract the window, placing the current line as you choose, by giving a number on a \fBz\fR command, after the \fBz\fR and before the following \s-2RETURN\s0, \fB.\fR or \fB\-\fR. Thus the command \fBz5.\fR redraws the screen with the current line in the center of a five line window.\*(dg .FS \*(dg Note that the command \fB5z.\fR has an entirely different effect, placing line 5 in the center of a new window. .FE .PP If the editor is redrawing or otherwise updating large portions of the display, you can interrupt this updating by hitting a \s-2DEL\s0 or \s-2RUB\s0 as usual. If you do this you may partially confuse the editor about what is displayed on the screen. You can still edit the text on the screen if you wish; clear up the confusion by hitting a \fB^L\fR; or move or search again, ignoring the current state of the display. .PP See section 7.8 on \fIopen\fR mode for another way to use the .I vi command set on slow terminals. .NH 2 Options, set, and editor startup files .PP The editor has a set of options, some of which have been mentioned above. The most useful options are given in the following table. .PP The options are of three kinds: numeric options, string options, and toggle options. You can set numeric and string options by a statement of the form .DS \fBset\fR \fIopt\fR\fB=\fR\fIval\fR .DE and toggle options can be set or unset by statements of one of the forms .DS \fBset\fR \fIopt\fR \fBset\fR \fBno\fR\fIopt\fR .DE .KF .TS lb lb lb lb l l l a. Name Default Description _ autoindent noai Supply indentation automatically autowrite noaw Automatic write before \fB:n\fR, \fB:ta\fR, \fB^\(ua\fR, \fB!\fR ignorecase noic Ignore case in searching lisp nolisp \fB( { ) }\fR commands deal with S-expressions list nolist Tabs print as ^I; end of lines marked with $ magic nomagic The characters . [ and * are special in scans number nonu Lines are displayed prefixed with line numbers paragraphs para=IPLPPPQPbpP LI Macro names which start paragraphs redraw nore Simulate a smart terminal on a dumb one sections sect=NHSHH HU Macro names which start new sections shiftwidth sw=8 Shift distance for <, > and input \fB^D\fP and \fB^T\fR showmatch nosm Show matching \fB(\fP or \fB{\fP as \fB)\fP or \fB}\fR is typed slowopen slow Postpone display updates during inserts term dumb The kind of terminal you are using. .TE .KE These statements can be placed in your EXINIT in your environment, or given while you are running .I vi by preceding them with a \fB:\fR and following them with a \s-2CR\s0. .PP You can get a list of all options which you have changed by the command \fB:set\fR\s-2CR\s0, or the value of a single option by the command \fB:set\fR \fIopt\fR\fB?\fR\s-2CR\s0. A list of all possible options and their values is generated by \fB:set all\fP\s-2CR\s0. Set can be abbreviated \fBse\fP. Multiple options can be placed on one line, e.g. \fB:se ai aw nu\fP\s-2CR\s0. .PP Options set by the \fBset\fP command only last while you stay in the editor. It is common to want to have certain options set whenever you use the editor. This can be accomplished by creating a list of \fIex\fP commands\*(dg .FS \*(dg All commands which start with .B : are \fIex\fP commands. .FE which are to be run every time you start up \fIex\fP, \fIedit\fP, or \fIvi\fP. A typical list includes a \fBset\fP command, and possibly a few \fBmap\fP commands. Since it is advisable to get these commands on one line, they can be separated with the | character, for example: .DS \fBset\fP ai aw terse|\fBmap\fP @ dd|\fBmap\fP # x .DE which sets the options \fIautoindent\fP, \fIautowrite\fP, \fIterse\fP, (the .B set command), makes @ delete a line, (the first .B map ), and makes # delete a character, (the second .B map ). (See section 6.9 for a description of the \fBmap\fP command) This string should be placed in the variable EXINIT in your environment. If you use the shell \fIcsh\fP, put this line in the file .I .login in your home directory: .DS setenv EXINIT \(aa\fBset\fP ai aw terse|\fBmap\fP @ dd|\fBmap\fP # x\(aa .DE If you use the standard shell \fIsh\fP, put these lines in the file .I .profile in your home directory: .DS EXINIT=\(aa\fBset\fP ai aw terse|\fBmap\fP @ dd|\fBmap\fP # x\(aa export EXINIT .DE Of course, the particulars of the line would depend on which options you wanted to set. .NH 2 Recovering lost lines .PP You might have a serious problem if you delete a number of lines and then regret that they were deleted. Despair not, the editor saves the last 9 deleted blocks of text in a set of numbered registers 1\-9. You can get the \fIn\fR'th previous deleted text back in your file by the command "\fR\fIn\fR\|\fBp\fR. The "\fR here says that a buffer name is to follow, \fIn\fR is the number of the buffer you wish to try (use the number 1 for now), and .B p is the put command, which puts text in the buffer after the cursor. If this doesn't bring back the text you wanted, hit .B u to undo this and then \fB\&.\fR (period) to repeat the put command. In general the \fB\&.\fR command will repeat the last change you made. As a special case, when the last command refers to a numbered text buffer, the \fB.\fR command increments the number of the buffer before repeating the command. Thus a sequence of the form .DS \fB"1pu.u.u.\fR .DE will, if repeated long enough, show you all the deleted text which has been saved for you. You can omit the .B u commands here to gather up all this text in the buffer, or stop after any \fB\&.\fR command to keep just the then recovered text. The command .B P can also be used rather than .B p to put the recovered text before rather than after the cursor. .NH 2 Recovering lost files .PP If the system crashes, you can recover the work you were doing to within a few changes. You will normally receive mail when you next login giving you the name of the file which has been saved for you. You should then change to the directory where you were when the system crashed and give a command of the form: .DS % \fBvi \-r\fR \fIname\fR .DE replacing \fIname\fR with the name of the file which you were editing. This will recover your work to a point near where you left off.\*(dg .FS \*(dg In rare cases, some of the lines of the file may be lost. The editor will give you the numbers of these lines and the text of the lines will be replaced by the string `LOST'. These lines will almost always be among the last few which you changed. You can either choose to discard the changes which you made (if they are easy to remake) or to replace the few lost lines by hand. .FE .PP You can get a listing of the files which are saved for you by giving the command: .DS % \fBvi \-r\fR .DE If there is more than one instance of a particular file saved, the editor gives you the newest instance each time you recover it. You can thus get an older saved copy back by first recovering the newer copies. .PP For this feature to work, .I vi must be correctly installed by a super user on your system, and the .I mail program must exist to receive mail. The invocation ``\fIvi -r\fP'' will not always list all saved files, but they can be recovered even if they are not listed. .NH 2 Continuous text input .PP When you are typing in large amounts of text it is convenient to have lines broken near the right margin automatically. You can cause this to happen by giving the command \fB:se wm=10\fR\s-2CR\s0. This causes all lines to be broken at a space at least 10 columns from the right hand edge of the screen. .PP If the editor breaks an input line and you wish to put it back together you can tell it to join the lines with \fBJ\fR. You can give \fBJ\fR a count of the number of lines to be joined as in \fB3J\fR to join 3 lines. The editor supplies white space, if appropriate, at the juncture of the joined lines, and leaves the cursor at this white space. You can kill the white space with \fBx\fR if you don't want it. .NH 2 Features for editing programs .PP The editor has a number of commands for editing programs. The thing that most distinguishes editing of programs from editing of text is the desirability of maintaining an indented structure to the body of the program. The editor has a .I autoindent facility for helping you generate correctly indented programs. .PP To enable this facility you can give the command \fB:se ai\fR\s-2CR\s0. Now try opening a new line with \fBo\fR and type some characters on the line after a few tabs. If you now start another line, notice that the editor supplies white space at the beginning of the line to line it up with the previous line. You cannot backspace over this indentation, but you can use \fB^D\fR key to backtab over the supplied indentation. .PP Each time you type \fB^D\fR you back up one position, normally to an 8 column boundary. This amount is settable; the editor has an option called .I shiftwidth which you can set to change this value. Try giving the command \fB:se sw=4\fR\s-2CR\s0 and then experimenting with autoindent again. .PP For shifting lines in the program left and right, there are operators .B < and .B >. These shift the lines you specify right or left by one .I shiftwidth. Try .B << and .B >> which shift one line left or right, and .B L shifting the rest of the display left and right. .PP If you have a complicated expression and wish to see how the parentheses match, put the cursor at a left or right parenthesis and hit \fB%\fR. This will show you the matching parenthesis. This works also for braces { and }, and brackets [ and ]. .PP If you are editing C programs, you can use the \fB[[\fR and \fB]]\fR keys to advance or retreat to a line starting with a \fB{\fR, i.e. a function declaration at a time. When \fB]]\fR is used with an operator it stops after a line which starts with \fB}\fR; this is sometimes useful with \fBy]]\fR. .NH 2 Filtering portions of the buffer .PP You can run system commands over portions of the buffer using the operator \fB!\fR. You can use this to sort lines in the buffer, or to reformat portions of the buffer with a pretty-printer. Try typing in a list of random words, one per line and ending them with a blank line. Back up to the beginning of the list, and then give the command \fB!}sort\fR\s-2CR\s0. This says to sort the next paragraph of material, and the blank line ends a paragraph. .NH 2 Commands for editing \s-2LISP\s0 .PP If you are editing a \s-2LISP\s0 program you should set the option .I lisp by doing \fB:se\ lisp\fR\s-2CR\s0. This changes the \fB(\fR and \fB)\fR commands to move backward and forward over s-expressions. The \fB{\fR and \fB}\fR commands are like \fB(\fR and \fB)\fR but don't stop at atoms. These can be used to skip to the next list, or through a comment quickly. .PP The .I autoindent option works differently for \s-2LISP\s0, supplying indent to align at the first argument to the last open list. If there is no such argument then the indent is two spaces more than the last level. .PP There is another option which is useful for typing in \s-2LISP\s0, the .I showmatch option. Try setting it with \fB:se sm\fR\s-2CR\s0 and then try typing a `(' some words and then a `)'. Notice that the cursor shows the position of the `(' which matches the `)' briefly. This happens only if the matching `(' is on the screen, and the cursor stays there for at most one second. .PP The editor also has an operator to realign existing lines as though they had been typed in with .I lisp and .I autoindent set. This is the \fB=\fR operator. Try the command \fB=%\fR at the beginning of a function. This will realign all the lines of the function declaration. .PP When you are editing \s-2LISP\s0,, the \fB[[\fR and \fR]]\fR advance and retreat to lines beginning with a \fB(\fR, and are useful for dealing with entire function definitions. .NH 2 Macros .PP .I Vi has a parameterless macro facility, which lets you set it up so that when you hit a single keystroke, the editor will act as though you had hit some longer sequence of keys. You can set this up if you find yourself typing the same sequence of commands repeatedly. .PP Briefly, there are two flavors of macros: .IP a) Ones where you put the macro body in a buffer register, say \fIx\fR. You can then type \fB@x\fR to invoke the macro. The \fB@\fR may be followed by another \fB@\fR to repeat the last macro. .IP b) You can use the .I map command from .I vi (typically in your .I EXINIT ) with a command of the form: .DS :map \fIlhs\fR \fIrhs\fR\s-2CR .DE mapping .I lhs into .I rhs. There are restrictions: .I lhs should be one keystroke (either 1 character or one function key) since it must be entered within one second (unless .I notimeout is set, in which case you can type it as slowly as you wish, and .I vi will wait for you to finish it before it echoes anything). The .I lhs can be no longer than 10 characters, the .I rhs no longer than 100. To get a space, tab or newline into .I lhs or .I rhs you should escape them with a \fB^V\fR. (It may be necessary to double the \fB^V\fR if the map command is given inside .I vi, rather than in .I ex.) Spaces and tabs inside the .I rhs need not be escaped. .PP Thus to make the \fBq\fR key write and exit the editor, you can give the command .DS :map q :wq\fB^V^V\fP\s-2CR CR\s0 .DE which means that whenever you type \fBq\fR, it will be as though you had typed the four characters \fB:wq\fR\s-2CR\s0. A \fB^V\fR's is needed because without it the \s-2CR\s0 would end the \fB:\fR command, rather than becoming part of the .I map definition. There are two .B ^V 's because from within .I vi , two .B ^V 's must be typed to get one. The first \s-2CR\s0 is part of the .I rhs , the second terminates the : command. .PP Macros can be deleted with .DS unmap lhs .DE .PP If the .I lhs of a macro is ``#0'' through ``#9'', this maps the particular function key instead of the 2 character ``#'' sequence. So that terminals without function keys can access such definitions, the form ``#x'' will mean function key .I x on all terminals (and need not be typed within one second.) The character ``#'' can be changed by using a macro in the usual way: .DS :map \fB^V^V^I\fP # .DE to use tab, for example. (This won't affect the .I map command, which still uses .B #, but just the invocation from visual mode. .PP The undo command reverses an entire macro call as a unit, if it made any changes. .PP Placing a `!' after the word .B map causes the mapping to apply to input mode, rather than command mode. Thus, to arrange for \fB^T\fP to be the same as 4 spaces in input mode, you can type: .DS :map \fB^T\fP \fB^V\fP\o'b/'\o'b/'\o'b/'\o'b/' .DE where .B \o'b/' is a blank. The \fB^V\fP is necessary to prevent the blanks from being taken as white space between the .I lhs and .I rhs . .NH Word Abbreviations .PP A feature similar to macros in input mode is word abbreviation. This allows you to type a short word and have it expanded into a longer word or words. The commands are .B :abbreviate and .B :unabbreviate (\fB:ab\fP and .B :una ) and have the same syntax as .B :map . For example: .DS :ab eecs Electrical Engineering and Computer Sciences .DE causes the word `eecs' to always be changed into the phrase `Electrical Engineering and Computer Sciences'. Word abbreviation is different from macros in that only whole words are affected. If `eecs' were typed as part of a larger word, it would be left alone. Also, the partial word is echoed as it is typed. There is no need for an abbreviation to be a single keystroke, as it should be with a macro. .NH 2 Abbreviations .PP The editor has a number of short commands which abbreviate longer commands which we have introduced here. You can find these commands easily on the quick reference card. They often save a bit of typing and you can learn them as convenient. .NH 1 Nitty-gritty details .NH 2 Line representation in the display .PP The editor folds long logical lines onto many physical lines in the display. Commands which advance lines advance logical lines and will skip over all the segments of a line in one motion. The command \fB|\fR moves the cursor to a specific column, and may be useful for getting near the middle of a long line to split it in half. Try \fB80|\fR on a line which is more than 80 columns long.\*(dg .FS \*(dg You can make long lines very easily by using \fBJ\fR to join together short lines. .FE .PP The editor only puts full lines on the display; if there is not enough room on the display to fit a logical line, the editor leaves the physical line empty, placing only an @ on the line as a place holder. When you delete lines on a dumb terminal, the editor will often just clear the lines to @ to save time (rather than rewriting the rest of the screen.) You can always maximize the information on the screen by giving the \fB^R\fR command. .PP If you wish, you can have the editor place line numbers before each line on the display. Give the command \fB:se nu\fR\s-2CR\s0 to enable this, and the command \fB:se nonu\fR\s-2CR\s0 to turn it off. You can have tabs represented as \fB^I\fR and the ends of lines indicated with `$' by giving the command \fB:se list\fR\s-2CR\s0; \fB:se nolist\fR\s-2CR\s0 turns this off. .PP Finally, lines consisting of only the character `~' are displayed when the last line in the file is in the middle of the screen. These represent physical lines which are past the logical end of file. .NH 2 Counts .PP Most .I vi commands will use a preceding count to affect their behavior in some way. The following table gives the common ways in which the counts are used: .DS .TS l lb. new window size : / ? [[ ]] \` \' scroll amount ^D ^U line/column number z G | repeat effect \fRmost of the rest\fP .TE .DE .PP The editor maintains a notion of the current default window size. On terminals which run at speeds greater than 1200 baud the editor uses the full terminal screen. On terminals which are slower than 1200 baud (most dialup lines are in this group) the editor uses 8 lines as the default window size. At 1200 baud the default is 16 lines. .PP This size is the size used when the editor clears and refills the screen after a search or other motion moves far from the edge of the current window. The commands which take a new window size as count all often cause the screen to be redrawn. If you anticipate this, but do not need as large a window as you are currently using, you may wish to change the screen size by specifying the new size before these commands. In any case, the number of lines used on the screen will expand if you move off the top with a \fB\-\fR or similar command or off the bottom with a command such as \s-2RETURN\s0 or \fB^D\fR. The window will revert to the last specified size the next time it is cleared and refilled.\*(dg .FS \*(dg But not by a \fB^L\fR which just redraws the screen as it is. .FE .PP The scroll commands \fB^D\fR and \fB^U\fR likewise remember the amount of scroll last specified, using half the basic window size initially. The simple insert commands use a count to specify a repetition of the inserted text. Thus \fB10a+\-\-\-\-\fR\s-2ESC\s0 will insert a grid-like string of text. A few commands also use a preceding count as a line or column number. .PP Except for a few commands which ignore any counts (such as \fB^R\fR), the rest of the editor commands use a count to indicate a simple repetition of their effect. Thus \fB5w\fR advances five words on the current line, while \fB5\fR\s-2RETURN\s0 advances five lines. A very useful instance of a count as a repetition is a count given to the \fB.\fR command, which repeats the last changing command. If you do \fBdw\fR and then \fB3.\fR, you will delete first one and then three words. You can then delete two more words with \fB2.\fR. .NH 2 More file manipulation commands .PP The following table lists the file manipulation commands which you can use when you are in .I vi. .KF .DS .TS lb l. :w write back changes :wq write and quit :x write (if necessary) and quit (same as ZZ). :e \fIname\fP edit file \fIname\fR :e! reedit, discarding changes :e + \fIname\fP edit, starting at end :e +\fIn\fP edit, starting at line \fIn\fP :e # edit alternate file :w \fIname\fP write file \fIname\fP :w! \fIname\fP overwrite file \fIname\fP :\fIx,y\fPw \fIname\fP write lines \fIx\fP through \fIy\fP to \fIname\fP :r \fIname\fP read file \fIname\fP into buffer :r !\fIcmd\fP read output of \fIcmd\fP into buffer :n edit next file in argument list :n! edit next file, discarding changes to current :n \fIargs\fP specify new argument list :ta \fItag\fP edit file containing tag \fItag\fP, at \fItag\fP .TE .DE .KE All of these commands are followed by a \s-2CR\s0 or \s-2ESC\s0. The most basic commands are \fB:w\fR and \fB:e\fR. A normal editing session on a single file will end with a \fBZZ\fR command. If you are editing for a long period of time you can give \fB:w\fR commands occasionally after major amounts of editing, and then finish with a \fBZZ\fR. When you edit more than one file, you can finish with one with a \fB:w\fR and start editing a new file by giving a \fB:e\fR command, or set .I autowrite and use \fB:n\fP . .PP If you make changes to the editor's copy of a file, but do not wish to write them back, then you must give an \fB!\fR after the command you would otherwise use; this forces the editor to discard any changes you have made. Use this carefully. .ne 1i .PP The \fB:e\fR command can be given a \fB+\fR argument to start at the end of the file, or a \fB+\fR\fIn\fR argument to start at line \fIn\fR\^. In actuality, \fIn\fR may be any editor command not containing a space, usefully a scan like \fB+/\fIpat\fR or \fB+?\fIpat\fR. In forming new names to the \fBe\fR command, you can use the character \fB%\fR which is replaced by the current file name, or the character \fB#\fR which is replaced by the alternate file name. The alternate file name is generally the last name you typed other than the current file. Thus if you try to do a \fB:e\fR and get a diagnostic that you haven't written the file, you can give a \fB:w\fR command and then a \fB:e #\fR command to redo the previous \fB:e\fR. .PP You can write part of the buffer to a file by finding out the lines that bound the range to be written using \fB^G\fR, and giving these numbers after the \fB:\fR and before the \fBw\fP, separated by \fB,\fR's. You can also mark these lines with \fBm\fR and then use an address of the form \fB\(aa\fR\fIx\fR\fB,\fB\(aa\fR\fIy\fR on the \fBw\fR command here. .PP You can read another file into the buffer after the current line by using the \fB:r\fR command. You can similarly read in the output from a command, just use \fB!\fR\fIcmd\fR instead of a file name. .PP If you wish to edit a set of files in succession, you can give all the names on the command line, and then edit each one in turn using the command \fB:n\fR. It is also possible to respecify the list of files to be edited by giving the \fB:n\fR command a list of file names, or a pattern to be expanded as you would have given it on the initial .I vi command. .PP If you are editing large programs, you will find the \fB:ta\fR command very useful. It utilizes a data base of function names and their locations, which can be created by programs such as .I ctags, to quickly find a function whose name you give. If the \fB:ta\fR command will require the editor to switch files, then you must \fB:w\fR or abandon any changes before switching. You can repeat the \fB:ta\fR command without any arguments to look for the same tag again. .NH 2 More about searching for strings .PP When you are searching for strings in the file with \fB/\fR and \fB?\fR, the editor normally places you at the next or previous occurrence of the string. If you are using an operator such as \fBd\fR, \fBc\fR or \fBy\fR, then you may well wish to affect lines up to the line before the line containing the pattern. You can give a search of the form \fB/\fR\fIpat\fR\fB/\-\fR\fIn\fR to refer to the \fIn\fR'th line before the next line containing \fIpat\fR, or you can use \fB+\fR instead of \fB\-\fR to refer to the lines after the one containing \fIpat\fR. If you don't give a line offset, then the editor will affect characters up to the match place, rather than whole lines; thus use ``+0'' to affect to the line which matches. .PP You can have the editor ignore the case of words in the searches it does by giving the command \fB:se ic\fR\s-2CR\s0. The command \fB:se noic\fR\s-2CR\s0 turns this off. .ne 1i .PP Strings given to searches may actually be regular expressions. If you do not want or need this facility, you should .DS set nomagic .DE in your EXINIT. In this case, only the characters \fB\(ua\fR and \fB$\fR are special in patterns. The character \fB\e\fR is also then special (as it is most everywhere in the system), and may be used to get at the an extended pattern matching facility. It is also necessary to use a \e before a \fB/\fR in a forward scan or a \fB?\fR in a backward scan, in any case. The following table gives the extended forms when \fBmagic\fR is set. .DS .TS lb l. \(ua at beginning of pattern, matches beginning of line $ at end of pattern, matches end of line \fB\&.\fR matches any character \e< matches the beginning of a word \e> matches the end of a word [\fIstr\fP] matches any single character in \fIstr\fP [\(ua\fIstr\fP] matches any single character not in \fIstr\fP [\fIx\fP\-\fIy\fP] matches any character between \fIx\fP and \fIy\fP * matches any number of the preceding pattern .TE .DE If you use \fBnomagic\fR mode, then the \fB. [\fR and \fB*\fR primitives are given with a preceding \e. .NH 2 More about input mode .PP There are a number of characters which you can use to make corrections during input mode. These are summarized in the following table. .sp .5 .DS .TS lb l. ^H deletes the last input character ^W deletes the last input word, defined as by \fBb\fR erase your erase character, same as \fB^H\fP kill your kill character, deletes the input on this line \e escapes a following \fB^H\fP and your erase and kill \s-2ESC\s0 ends an insertion \s-2DEL\s0 interrupts an insertion, terminating it abnormally \s-2CR\s0 starts a new line ^D backtabs over \fIautoindent\fP 0^D kills all the \fIautoindent\fP \(ua^D same as \fB0^D\fP, but restores indent next line ^V quotes the next non-printing character into the file .TE .DE .sp .5 .PP The most usual way of making corrections to input is by typing \fB^H\fR to correct a single character, or by typing one or more \fB^W\fR's to back over incorrect words. If you use \fB#\fR as your erase character in the normal system, it will work like \fB^H\fR. .PP Your system kill character, normally \fB@\fR, \fB^X\fP or \fB^U\fR, will erase all the input you have given on the current line. In general, you can neither erase input back around a line boundary nor can you erase characters which you did not insert with this insertion command. To make corrections on the previous line after a new line has been started you can hit \s-2ESC\s0 to end the insertion, move over and make the correction, and then return to where you were to continue. The command \fBA\fR which appends at the end of the current line is often useful for continuing. .PP If you wish to type in your erase or kill character (say # or @) then you must precede it with a \fB\e\fR, just as you would do at the normal system command level. A more general way of typing non-printing characters into the file is to precede them with a \fB^V\fR. The \fB^V\fR echoes as a \fB\(ua\fR character on which the cursor rests. This indicates that the editor expects you to type a control character. In fact you may type any character and it will be inserted into the file at that point.* .FS * This is not quite true. The implementation of the editor does not allow the \s-2NULL\s0 (\fB^@\fR) character to appear in files. Also the \s-2LF\s0 (linefeed or \fB^J\fR) character is used by the editor to separate lines in the file, so it cannot appear in the middle of a line. You can insert any other character, however, if you wait for the editor to echo the \fB\(ua\fR before you type the character. In fact, the editor will treat a following letter as a request for the corresponding control character. This is the only way to type \fB^S\fR or \fB^Q\fP, since the system normally uses them to suspend and resume output and never gives them to the editor to process. .FE .PP If you are using \fIautoindent\fR you can backtab over the indent which it supplies by typing a \fB^D\fR. This backs up to a \fIshiftwidth\fR boundary. This only works immediately after the supplied \fIautoindent\fR. .PP When you are using \fIautoindent\fR you may wish to place a label at the left margin of a line. The way to do this easily is to type \fB\(ua\fR and then \fB^D\fR. The editor will move the cursor to the left margin for one line, and restore the previous indent on the next. You can also type a \fB0\fR followed immediately by a \fB^D\fR if you wish to kill all the indent and not have it come back on the next line. .NH 2 Upper case only terminals .PP If your terminal has only upper case, you can still use .I vi by using the normal system convention for typing on such a terminal. Characters which you normally type are converted to lower case, and you can type upper case letters by preceding them with a \e. The characters { ~ } | \(ga are not available on such terminals, but you can escape them as \e( \e\(ua \e) \e! \e\(aa. These characters are represented on the display in the same way they are typed.\*(dd .FS \*(dd The \e character you give will not echo until you type another key. .FE .NH 2 Vi and ex .PP .I Vi is actually one mode of editing within the editor .I ex. When you are running .I vi you can escape to the line oriented editor of .I ex by giving the command \fBQ\fR. All of the .B : commands which were introduced above are available in .I ex. Likewise, most .I ex commands can be invoked from .I vi using :. Just give them without the \fB:\fR and follow them with a \s-2CR\s0. .PP In rare instances, an internal error may occur in .I vi. In this case you will get a diagnostic and be left in the command mode of .I ex. You can then save your work and quit if you wish by giving a command \fBx\fR after the \fB:\fR which \fIex\fR prompts you with, or you can reenter \fIvi\fR by giving .I ex a .I vi command. .PP There are a number of things which you can do more easily in .I ex than in .I vi. Systematic changes in line oriented material are particularly easy. You can read the advanced editing documents for the editor .I ed to find out a lot more about this style of editing. Experienced users often mix their use of .I ex command mode and .I vi command mode to speed the work they are doing. .NH 2 Open mode: vi on hardcopy terminals and ``glass tty's'' \(dd .PP If you are on a hardcopy terminal or a terminal which does not have a cursor which can move off the bottom line, you can still use the command set of .I vi, but in a different mode. When you give a .I vi command, the editor will tell you that it is using .I open mode. This name comes from the .I open command in .I ex, which is used to get into the same mode. .PP The only difference between .I visual mode and .I open mode is the way in which the text is displayed. .PP In .I open mode the editor uses a single line window into the file, and moving backward and forward in the file causes new lines to be displayed, always below the current line. Two commands of .I vi work differently in .I open: .B z and \fB^R\fR. The .B z command does not take parameters, but rather draws a window of context around the current line and then returns you to the current line. .PP If you are on a hardcopy terminal, the .B ^R command will retype the current line. On such terminals, the editor normally uses two lines to represent the current line. The first line is a copy of the line as you started to edit it, and you work on the line below this line. When you delete characters, the editor types a number of \e's to show you the characters which are deleted. The editor also reprints the current line soon after such changes so that you can see what the line looks like again. .PP It is sometimes useful to use this mode on very slow terminals which can support .I vi in the full screen mode. You can do this by entering .I ex and using an .I open command. .LP .SH Acknowledgements .PP Bruce Englar encouraged the early development of this display editor. Peter Kessler helped bring sanity to version 2's command layout. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made the editor work on a large number of terminals and Unix systems. nvi-1.81.6/docs/vitut/vi.summary0100644000076400001440000002344310720065506015620 0ustar skimousers.\" Copyright (c) 1980, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" %sccs.include.redist.roff% .\" .\" $Id: vi.summary,v 8.3 1996/08/18 11:35:55 bostic Exp $ (Berkeley) $Date: 1996/08/18 11:35:55 $ .\" .ds CH .ds CF .de TS .br .if !\\n(1T .RT .ul 0 .ti \\n(.iu .if t .sp 0.25 .if n .sp .if \\$1H .TQ .nr IX 1 .. .nr PS 9 .ps 9 .nr VS 11 .vs 11 .nr HM .50i .nr FM .25i .nr PO 1.0i .po 1.0i .nr LL 4.5i .ll 4.5i .de nc .bp .. .de h .LG .B \\$1 .R .NL .. .LG .LG .B .ce Ex Quick Reference .R .NL .LP .LP .h "Entering/leaving ex" .TS aw(1.4i)b aw(1.8i). % ex \fIname\fP edit \fIname\fP, start at end % ex +\fIn\fP \fIname\fP ... at line \fIn\fP % ex \-t \fItag\fP start at \fItag\fP % ex \-r list saved files % ex \-r \fIname\fP recover file \fIname\fP % ex \fIname\fP ... edit first; rest via \fB:n\fP % ex \-R \fIname\fP read only mode : x exit, saving changes : q! exit, discarding changes .TE .h "Ex states" .TS lw(1i) lw(2.0i). Command T{ Normal and initial state. Input prompted for by \fB:\fP. Your kill character cancels partial command. T} Insert T{ Entered by \fBa\fP \fBi\fP and \fBc\fP. Arbitrary text then terminates with line having only \fB.\fP character on it or abnormally with interrupt. T} Open/visual T{ Entered by \fBopen\fP or \fBvi\fP, terminates with \fBQ\fP or ^\e. T} .TE .h "Ex commands" .TS lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b. abbrev ab next n unabbrev una append a number nu undo u args ar open o unmap unm change c preserve pre version ve copy co print p visual vi delete d put pu write w edit e quit q xit x file f read re yank ya global g recover rec \fIwindow\fP z insert i rewind rew \fIescape\fP ! join j set se \fIlshift\fP < list l shell sh \fIprint next\fP \fRCR\fP map source so \fIresubst\fP & mark ma stop st \fIrshift\fP > move m substitute s \fIscroll\fP ^D .TE .h "Ex command addresses" .TS lw(.3i)b lw(0.8i) lw(.3i)b lw(0.8i). \fIn\fP line \fIn\fP /\fIpat\fP next with \fIpat\fP \&. current ?\fIpat\fP previous with \fIpat\fP $ last \fIx\fP-\fIn\fP \fIn\fP before \fIx\fP + next \fIx\fP,\fIy\fP \fIx\fP through \fIy\fP \- previous \(aa\fIx\fP marked with \fIx\fP +\fIn\fP \fIn\fP forward \(aa\(aa previous context % 1,$ .TE .nc .h "Specifying terminal type" .TS aw(1.7i)b aw(1.5i). % setenv TERM \fItype\fP \fIcsh\fP and all version 6 $ TERM=\fItype\fP; export TERM \fIsh\fP in Version 7 See also \fItset\fR(1) .TE .h "Some terminal types" .TS lw(.4i) lw(.4i) lw(.4i) lw(.4i) lw(.4i). 2621 43 adm31 dw1 h19 2645 733 adm3a dw2 i100 300s 745 c100 gt40 mime 33 act4 dm1520 gt42 owl 37 act5 dm2500 h1500 t1061 4014 adm3 dm3025 h1510 vt52 .TE .h "Initializing options" .TS lw(.9i)b aw(1.5i). EXINIT place \fBset\fP's here in environment var. set \fIx\fP enable option set no\fIx\fP disable option set \fIx\fP=\fIval\fP give value \fIval\fP set show changed options set all show all options set \fIx\fP? show value of option \fIx\fP .TE .h "Useful options" .TS lw(.9i)b lw(.3i) lw(1.0i). autoindent ai supply indent autowrite aw write before changing files ignorecase ic in scanning lisp \fB( ) { }\fP are s-exp's list print ^I for tab, $ at end magic \fB. [ *\fP special in patterns number nu number lines paragraphs para macro names which start ... redraw simulate smart terminal scroll command mode lines sections sect macro names ... shiftwidth sw for \fB< >\fP, and input \fB^D\fP showmatch sm to \fB)\fP and \fB}\fP as typed slowopen slow choke updates during insert window visual mode lines wrapscan ws around end of buffer? wrapmargin wm automatic line splitting .TE .LP .h "Scanning pattern formation" .TS aw(.9i)b aw(1.0i). \(ua beginning of line $ end of line \fB.\fR any character \e< beginning of word \e> end of word [\fIstr\fP] any char in \fIstr\fP [\(ua\fIstr\fP] ... not in \fIstr\fP [\fIx\-y\fP] ... between \fIx\fP and \fIy\fP * any number of preceding .TE .nc .LP .LG .LG .B .ce Vi Quick Reference .NL .R .LP .LP .h "Entering/leaving vi" .TS aw(1.4i)b aw(1.8i). % vi \fIname\fP edit \fIname\fP at top % vi +\fIn\fP \fIname\fP ... at line \fIn\fP % vi + \fIname\fP ... at end % vi \-r list saved files % vi \-r \fIname\fP recover file \fIname\fP % vi \fIname\fP ... edit first; rest via \fB:n\fP % vi \-t \fItag\fP start at \fItag\fP % vi +/\fIpat\fP \fIname\fP search for \fIpat\fP % view \fIname\fP read only mode ZZ exit from vi, saving changes ^Z stop vi for later resumption .TE .h "The display" .TS lw(.75i) lw(2.2i). Last line T{ Error messages, echoing input to \fB: / ?\fP and \fB!\fR, feedback about i/o and large changes. T} @ lines On screen only, not in file. ~ lines Lines past end of file. ^\fIx\fP Control characters, ^? is delete. tabs Expand to spaces, cursor at last. .TE .LP .h "Vi states" .TS lw(.75i) lw(2.2i). Command T{ Normal and initial state. Others return here. ESC (escape) cancels partial command. T} Insert T{ Entered by \fBa i A I o O c C s S\fP \fBR\fP. Arbitrary text then terminates with ESC character, or abnormally with interrupt. T} Last line T{ Reading input for \fB: / ?\fP or \fB!\fP; terminate with ESC or CR to execute, interrupt to cancel. T} .TE .h "Counts before vi commands" .TS lw(1.5i) lw(1.7i)b. line/column number z G | scroll amount ^D ^U replicate insert a i A I repeat effect \fRmost rest\fP .TE .h "Simple commands" .TS lw(1.5i)b lw(1.7i). dw delete a word de ... leaving punctuation dd delete a line 3dd ... 3 lines i\fItext\fP\fRESC\fP insert text \fIabc\fP cw\fInew\fP\fRESC\fP change word to \fInew\fP ea\fIs\fP\fRESC\fP pluralize word xp transpose characters .TE .nc .h "Interrupting, cancelling" .TS aw(0.75i)b aw(1.6i). ESC end insert or incomplete cmd ^? (delete or rubout) interrupts ^L reprint screen if \fB^?\fR scrambles it .TE .h "File manipulation" .TS aw(0.75i)b aw(1.6i). :w write back changes :wq write and quit :q quit :q! quit, discard changes :e \fIname\fP edit file \fIname\fP :e! reedit, discard changes :e + \fIname\fP edit, starting at end :e +\fIn\fR edit starting at line \fIn\fR :e # edit alternate file ^\(ua synonym for \fB:e #\fP :w \fIname\fP write file \fIname\fP :w! \fIname\fP overwrite file \fIname\fP :sh run shell, then return :!\fIcmd\fP run \fIcmd\fR, then return :n edit next file in arglist :n \fIargs\fP specify new arglist :f show current file and line ^G synonym for \fB:f\fP :ta \fItag\fP to tag file entry \fItag\fP ^] \fB:ta\fP, following word is \fItag\fP .TE .h "Positioning within file" .TS aw(0.75i)b aw(1.6i). ^F forward screenfull ^B backward screenfull ^D scroll down half screen ^U scroll up half screen G goto line (end default) /\fIpat\fR next line matching \fIpat\fR ?\fIpat\fR prev line matching \fIpat\fR n repeat last \fB/\fR or \fB?\fR N reverse last \fB/\fR or \fB?\fR /\fIpat\fP/+\fIn\fP n'th line after \fIpat\fR ?\fIpat\fP?\-\fIn\fP n'th line before \fIpat\fR ]] next section/function [[ previous section/function % find matching \fB( ) {\fP or \fB}\fP .TE .h "Adjusting the screen" .TS aw(0.75i)b aw(1.6i). ^L clear and redraw ^R retype, eliminate @ lines z\fRCR\fP redraw, current at window top z\- ... at bottom z\|. ... at center /\fIpat\fP/z\- \fIpat\fP line at bottom z\fIn\fP\|. use \fIn\fP line window ^E scroll window down 1 line ^Y scroll window up 1 line .TE .nc .h "Marking and returning .TS aw(0.5i)b aw(2.0i). \(ga\(ga previous context \(aa\(aa ... at first non-white in line m\fIx\fP mark position with letter \fIx\fP \(ga\fIx\fP to mark \fIx\fP \(aa\fIx\fP ... at first non-white in line .TE .h "Line positioning" .TS aw(0.5i)b aw(2.0i). H home window line L last window line M middle window line + next line, at first non-white \- previous line, at first non-white \fRCR\fP return, same as + \(da \fRor\fP j next line, same column \(ua \fRor\fP k previous line, same column .TE .h "Character positioning" .TS aw(0.5i)b aw(2.0i). \(ua first non white 0 beginning of line $ end of line h \fRor\fP \(-> forward l \fRor\fP \(<- backwards ^H same as \fB\(<-\fP \fRspace\fP same as \fB\(->\fP f\fIx\fP find \fIx\fP forward F\fIx\fP \fBf\fR backward t\fIx\fP upto \fIx\fP forward T\fIx\fP back upto \fIx\fP ; repeat last \fBf F t\fP or \fBT\fP , inverse of \fB;\fP | to specified column % find matching \fB( { )\fP or \fB}\fR .TE .h "Words, sentences, paragraphs" .TS aw(0.5i)b aw(2.0i). w word forward b back word e end of word ) to next sentence } to next paragraph ( back sentence { back paragraph W blank delimited word B back \fBW\fP E to end of \fBW\fP .TE .h "Commands for \s-2LISP\s0" .TS aw(0.5i)b aw(2.0i). ) Forward s-expression } ... but don't stop at atoms ( Back s-expression { ... but don't stop at atoms .TE .nc .h "Corrections during insert" .TS aw(.5i)b aw(2.0i). ^H erase last character ^W erases last word \fRerase\fP your erase, same as \fB^H\fP \fRkill\fP your kill, erase input this line \e escapes \fB^H\fR, your erase and kill \fRESC\fP ends insertion, back to command ^? interrupt, terminates insert ^D backtab over \fIautoindent\fP \(ua^D kill \fIautoindent\fP, save for next 0^D ... but at margin next also ^V quote non-printing character .TE .h "Insert and replace" .TS aw(.5i)b aw(2.0i). a append after cursor i insert before A append at end of line I insert before first non-blank o open line below O open above r\fIx\fP replace single char with \fIx\fP R replace characters .TE .h "Operators (double to affect lines)" .TS aw(0.5i)b aw(2.0i). d delete c change < left shift > right shift ! filter through command \&= indent for \s-2LISP\s0 y yank lines to buffer .TE .h "Miscellaneous operations" .TS aw(0.5i)b aw(2.0i). C change rest of line D delete rest of line s substitute chars S substitute lines J join lines x delete characters X ... before cursor Y yank lines .TE .h "Yank and put" .TS aw(0.5i)b aw(2.0i). p put back lines P put before "\fIx\fPp put from buffer \fIx\fP "\fIx\fPy yank to buffer \fIx\fP "\fIx\fPd delete into buffer \fIx\fP .TE .h "Undo, redo, retrieve" .TS aw(0.5i)b aw(2.0i). u undo last change U restore current line \fB.\fP repeat last change "\fId\fP\|p retrieve \fId\fP'th last delete .TE nvi-1.81.6/docs/vitut/vitut.ps0100444000076400001440000060575410720065724015315 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:44:04 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 27 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(An Intr)196.314 123 Q (oduction to Display Editing with V)-.216 E(i)-.444 E/F1 10 /Times-Italic@0 SF -.55(Wi)282.375 147 S(lliam J).55 E(oy)-.25 E (Mark Horton)279.475 165 Q/F2 10/Times-Roman@0 SF(Computer Science Di) 250.85 183 Q(vision)-.25 E (Department of Electrical Engineering and Computer Science)184.36 195 Q (Uni)237.725 207 Q -.15(ve)-.25 G(rsity of California, Berk).15 E(ele) -.1 E(y)-.15 E(Berk)264.095 219 Q(ele)-.1 E 1.3 -.65(y, C)-.15 H 2.5 (a. 94720).65 F F1(ABSTRA)282.535 255 Q(CT)-.3 E -.74(Vi)136 279 S F2 .96(\(visual\) is a display oriented interacti)4.2 F 1.26 -.15(ve t)-.25 H -.15(ex).15 G 3.46(te).15 G(ditor)-3.46 E 5.96(.W)-.55 G .96 (hen using)-5.96 F F1(vi)3.46 E F2 .96(the screen of your)3.46 F .791 (terminal acts as a windo)111 291 R 3.291(wi)-.25 G .791 (nto the \214le which you are editing.)-3.291 F .791 (Changes which you mak)5.791 F 3.292(et)-.1 G 3.292(ot)-3.292 G(he) -3.292 E(\214le are re\215ected in what you see.)111 303 Q(Using)136 318.6 Q F1(vi)3.015 E F2 .514(you can insert ne)3.015 F 3.014(wt)-.25 G -.15(ex)-3.014 G 3.014(ta).15 G .814 -.15(ny p)-3.014 H .514 (lace in the \214le quite easily).15 F 5.514(.M)-.65 G .514 (ost of the commands)-5.514 F(to)111 330.6 Q F1(vi)3.444 E F2(mo)3.444 E 1.244 -.15(ve t)-.15 H .945(he cursor around in the \214le.).15 F .945 (There are commands to mo)5.945 F 1.245 -.15(ve t)-.15 H .945 (he cursor forw).15 F .945(ard and)-.1 F(backw)111 342.6 Q .445 (ard in units of characters, w)-.1 F .445 (ords, sentences and paragraphs.)-.1 F 2.945(As)5.445 G .445 (mall set of operators, lik)-2.945 F(e)-.1 E/F3 10/Times-Bold@0 SF(d)111 354.6 Q F2 .438(for delete and)2.938 F F3(c)2.938 E F2 .438(for change,\ are combined with the motion commands to form operations such)2.938 F 2.369(as delete w)111 366.6 R 2.369 (ord or change paragraph, in a simple and natural w)-.1 F(ay)-.1 E 7.368 (.T)-.65 G 2.368(his re)-7.368 F 2.368(gularity and the)-.15 F 1.163 (mnemonic assignment of commands to k)111 378.6 R -.15(ey)-.1 G 3.663 (sm).15 G(ak)-3.663 E 1.163(es the editor command set easy to remember) -.1 F(and to use.)111 390.6 Q F1 -.74(Vi)136 406.2 S F2 .856(will w) 4.096 F .856(ork on a lar)-.1 F .856 (ge number of display terminals, and ne)-.18 F 3.356(wt)-.25 G .856 (erminals are easily dri)-3.356 F -.15(ve)-.25 G(n).15 E .601 (after editing a terminal description \214le.)111 418.2 R .601 (While it is adv)5.601 F .602(antageous to ha)-.25 F .902 -.15(ve a)-.2 H 3.102(ni).15 G .602(ntelligent terminal)-3.102 F .381(which can local\ ly insert and delete lines and characters from the display)111 430.2 R 2.881(,t)-.65 G .381(he editor will function)-2.881 F 1.179 (quite well on dumb terminals o)111 442.2 R -.15(ve)-.15 G 3.679(rs).15 G(lo)-3.679 E 3.679(wp)-.25 G 1.179(hone lines.)-3.679 F 1.179 (The editor mak)6.179 F 1.18(es allo)-.1 F -.1(wa)-.25 G 1.18 (nce for the lo).1 F(w)-.25 E .234 (bandwidth in these situations and uses smaller windo)111 454.2 R 2.734 (ws)-.25 G .234(izes and dif)-2.734 F .233 (ferent display updating algo-)-.25 F(rithms to mak)111 466.2 Q 2.5(eb) -.1 G(est use of the limited speed a)-2.5 E -.25(va)-.2 G(ilable.).25 E .79(It is also possible to use the command set of)136 481.8 R F1(vi)3.29 E F2 .79(on hardcop)3.29 F 3.29(yt)-.1 G .79 (erminals, storage tubes and)-3.29 F -.74(``)111 493.8 S .927 (glass tty').74 F(s')-.55 E 3.427('u)-.74 G .927 (sing a one line editing windo)-3.427 F .927(w; thus)-.25 F F1(vi')3.427 E(s)-.4 E F2 .927(command set is a)3.427 F -.25(va)-.2 G .926 (ilable on all termi-).25 F 2.873(nals. The)111 505.8 R .374 (full command set of the more traditional, line oriented editor)2.873 F F1 -.2(ex)2.874 G F2 .374(is a)3.074 F -.25(va)-.2 G .374(ilable within) .25 F F1(vi;)2.874 E F2(it is quite simple to switch between the tw)111 517.8 Q 2.5(om)-.1 G(odes of editing.)-2.5 E F3 2.5(1. Getting)72 553.8 R(started)2.5 E F2 .385(This document pro)97 569.4 R .386 (vides a quick introduction to)-.15 F F1(vi.)2.886 E F2(\(Pronounced) 5.386 E F1(vee-e)2.886 E(ye)-.3 E F2 2.886(.\) Y)B .386 (ou should be running)-1.1 F F1(vi)2.886 E F2 .386(on a \214le)2.886 F .214(you are f)72 581.4 R .214(amiliar with while you are reading this.) -.1 F .214(The \214rst part of this document \(sections 1 through 5\) d\ escribes the)5.214 F .123(basics of using)72 593.4 R F1(vi.)2.623 E F2 .124(Some topics of special interest are presented in section 6, and so\ me nitty-gritty details of ho)5.123 F 2.624(wt)-.25 G(he)-2.624 E (editor functions are sa)72 605.4 Q -.15(ve)-.2 G 2.5(df).15 G (or section 7 to a)-2.5 E -.2(vo)-.2 G (id cluttering the presentation here.).2 E .469 (There is also a short appendix here, which gi)97 621 R -.15(ve)-.25 G 2.969(sf).15 G .469 (or each character the special meanings which this character)-2.969 F .154(has in)72 633 R F1(vi)2.654 E F2 5.154(.A)C .154 (ttached to this document should be a quick reference card.)-5.154 F .155(This card summarizes the commands of)5.155 F F1(vi)2.655 E F2(in) 2.655 E 2.5(av)72 645 S(ery compact format.)-2.65 E -1.1(Yo)5 G 2.5(us) 1.1 G(hould ha)-2.5 E .3 -.15(ve t)-.2 H (he card handy while you are learning).15 E F1(vi.)2.5 E F3 2.5 (1.1. Specifying)72 669 R(terminal type)2.5 E F2 .709 (Before you can start)97 684.6 R F1(vi)3.209 E F2 .709 (you must tell the system what kind of terminal you are using.)3.209 F .709(Here is a \(necessarily)5.709 F .775 (incomplete\) list of terminal type codes.)72 696.6 R .775(If your term\ inal does not appear here, you should consult with one of the)5.775 F .32 LW 144 704.6 72 704.6 DL/F4 8/Times-Roman@0 SF .082 (The \214nancial support of an)72 714.6 R/F5 6/Times-Roman@0 SF(IBM) 2.082 E F4 .082(Graduate Fello)2.082 F .082 (wship and the National Science F)-.2 F .082 (oundation under grants MCS74-07644-A03 and MCS78-07291 is)-.12 F (gratefully ackno)72 724.6 Q(wledged.)-.2 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 252.21(USD:11-2 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E(staf)72 84 Q 2.731 (fm)-.25 G .231 (embers on your system to \214nd out the code for your terminal.)-2.731 F .23(If your terminal does not ha)5.23 F .53 -.15(ve a c)-.2 H .23 (ode, one can).15 F (be assigned and a description for the terminal can be created.)72 96 Q /F1 10/Times-Bold@0 SF 33.06(Code Full)187.255 117.6 R 93.04(name T)2.5 F(ype)-.74 E .4 LW 429.745 122.1 182.255 122.1 DL F0 35.28(2621 He) 187.255 131.6 R(wlett-P)-.25 E(ackard 2621A/P)-.15 E(Intelligent)33.74 E 35.28(2645 He)187.255 143.6 R(wlett-P)-.25 E(ackard 264x)-.15 E (Intelligent)49.3 E 38.62(act4 Microterm)187.255 155.6 R -.4(AC)2.5 G -.92(T-).4 G 58.27(IV Dumb).92 F 38.62(act5 Microterm)187.255 167.6 R -.4(AC)2.5 G -.92(T-).4 G 64.1(VD).92 G(umb)-64.1 E 28.62(adm3a Lear) 187.255 179.6 R(Sie)2.5 E(gler ADM-3a)-.15 E(Dumb)51 E 28.06(adm31 Lear) 187.255 191.6 R(Sie)2.5 E(gler ADM-31)-.15 E(Intelligent)50.44 E 35.84 (c100 Human)187.255 203.6 R(Design Concept 100)2.5 E(Intelligent)25 E 22.5(dm1520 Datamedia)187.255 215.6 R 70.28(1520 Dumb)2.5 F 22.5 (dm2500 Datamedia)187.255 227.6 R 70.28(2500 Intelligent)2.5 F 22.5 (dm3025 Datamedia)187.255 239.6 R 70.28(3025 Intelligent)2.5 F 41.95 (fox Perkin-Elmer)187.255 251.6 R -.15(Fo)2.5 G 66.81(xD).15 G(umb) -66.81 E 30.28(h1500 Hazeltine)187.255 263.6 R 75.28(1500 Intelligent) 2.5 F 40.28(h19 Heathkit)187.255 275.6 R 84.16(h19 Intelligent)2.5 F 37.5(i100 Infoton)187.255 287.6 R 89.16(100 Intelligent)2.5 F 32.5 (mime Imitating)187.255 299.6 R 2.5(as)2.5 G(mart act4)-2.5 E (Intelligent)51.11 E 32.5(t1061 T)187.255 311.6 R(eleray 1061)-.7 E (Intelligent)86.26 E 37.5(vt52 Dec)187.255 323.6 R(VT)2.5 E 91.76 (-52 Dumb)-.92 F .7(Suppose for e)97 345.2 R .7(xample that you ha)-.15 F 1 -.15(ve a H)-.2 H -.25(ew).15 G(lett-P).25 E .7 (ackard HP2621A terminal.)-.15 F .7(The code used by the system for)5.7 F .504(this terminal is `2621'.)72 357.2 R .503 (In this case you can use one of the follo)5.504 F .503 (wing commands to tell the system the type of your)-.25 F(terminal:)72 369.2 Q(%)108 387.2 Q F1(seten)2.5 E 2.5(vT)-.4 G(ERM)-2.5 E F0(2621)2.5 E 1.121(This command w)72 405.2 R 1.121(orks with the)-.1 F/F2 10 /Times-Italic@0 SF(csh)3.621 E F0 3.621(shell. If)3.621 F 1.122 (you are using the standard Bourne shell)3.621 F F2(sh)3.622 E F0 1.122 (then you should gi)3.622 F 1.422 -.15(ve t)-.25 H(he).15 E(commands)72 417.2 Q($)108 435.2 Q F1(TERM=)2.5 E F0(2621)A($)108 447.2 Q F1 (export TERM)2.5 E F0 .618(If you w)97 468.8 R .617 (ant to arrange to ha)-.1 F .917 -.15(ve y)-.2 H .617(our terminal type\ set up automatically when you log in, you can use the).15 F F2(tset) 3.117 E F0 3.033(program. If)72 480.8 R .533(you dial in on a)3.033 F F2 (mime)3.033 E F0 3.033(,b)C .533 (ut often use hardwired ports, a typical line for your)-3.233 F F2(.lo) 3.033 E(gin)-.1 E F0 .533(\214le \(if you use csh\))3.033 F -.1(wo)72 492.8 S(uld be).1 E F1(seten)108 510.8 Q 2.5(vT)-.4 G(ERM \222tset)-2.5 E F0 2.52.5 G 2.5(dm)-2.5 G(ime\222)-2.5 E(or for your)72 528.8 Q F2(.pr)2.5 E(o\214le)-.45 E F0(\214le \(if you use sh\))2.5 E F1 (TERM=\222tse)108 546.8 Q F0 2.5<74adad>C 2.5(dm)-2.5 G(ime\222)-2.5 E F2(Tset)72 564.8 Q F0(kno)2.626 E .126(ws which terminals are hardwired\ to each port and needs only to be told that when you dial in you are p\ rob-)-.25 F(ably on a)72 576.8 Q F2(mime)2.5 E F0(.)A F2(Tset)5 E F0 (is usually used to change the erase and kill characters, too.)2.5 E F1 2.5(1.2. Editing)72 600.8 R 2.5<618c>2.5 G(le)-2.5 E F0 .755 (After telling the system which kind of terminal you ha)97 616.4 R -.15 (ve)-.2 G 3.255(,y).15 G .755(ou should mak)-3.255 F 3.255(eac)-.1 G(op) -3.255 E 3.255(yo)-.1 G 3.255(fa\214)-3.255 G .755(le you are f)-3.255 F (amiliar)-.1 E(with, and run)72 628.4 Q F2(vi)2.5 E F0 (on this \214le, gi)2.5 E(ving the command)-.25 E(%)108 646.4 Q F1(vi) 2.5 E F2(name)2.5 E F0(replacing)72 664.4 Q F2(name)3.493 E F0 .993 (with the name of the cop)3.493 F 3.493<798c>-.1 G .992 (le you just created.)-3.493 F .992(The screen should clear and the te) 5.992 F .992(xt of your \214le)-.15 F(should appear on the screen.)72 676.4 Q(If something else happens refer to the footnote.\210)5 E .32 LW 144 684.4 72 684.4 DL/F3 8/Times-Roman@0 SF 2.626<8849>72 694.4 S 2.626 (fy)-2.626 G .626(ou g)-2.626 F -1.8 -.16(av e)-.04 H .626 (the system an incorrect terminal type code then the editor may ha)2.786 F .866 -.12(ve j)-.16 H .626(ust made a mess out of your screen.).12 F .627(This happens when it)4.626 F .575(sends control codes for one kind\ of terminal to some other kind of terminal.)72 704.4 R .575 (In this case hit the k)4.575 F -.12(ey)-.08 G(s).12 E/F4 8/Times-Bold@0 SF(:q)2.575 E F3 .575(\(colon and the q k)2.575 F -.12(ey)-.08 G 2.575 (\)a).12 G .575(nd then hit the)-2.575 F/F5 6/Times-Roman@0 SF(RETURN)72 714.4 Q F3 -.08(ke)2.268 G 3.308 -.52(y. T)-.04 H .268 (his should get you back to the command le).52 F -.12(ve)-.2 G 2.268(li) .12 G(nterpreter)-2.268 E 4.268(.F)-.44 G .269 (igure out what you did wrong \(ask someone else if necessary\) and try) -4.268 F(ag)72 724.4 Q(ain.)-.04 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 254.71(iU)-.6 G(SD:11-3)-254.71 E/F1 10/Times-Bold@0 SF 2.5(1.3. The) 72 84 R(editor')2.5 E 2.5(sc)-.37 G(opy: the b)-2.5 E(uffer)-.2 E F0 .127 (The editor does not directly modify the \214le which you are editing.) 97 99.6 R(Rather)5.127 E 2.627(,t)-.4 G .127(he editor mak)-2.627 F .127 (es a cop)-.1 F 2.627(yo)-.1 G 2.627(ft)-2.627 G .127(his \214le,)-2.627 F .155(in a place called the)72 111.6 R/F2 10/Times-Italic@0 SF -.2(bu) 2.655 G -.18(ff).2 G(er).18 E(,)-1.11 E F0 .155 (and remembers the \214le')2.655 F 2.655(sn)-.55 G 2.655(ame. Y)-2.655 F .155(ou do not af)-1.1 F .155 (fect the contents of the \214le unless and until)-.25 F (you write the changes you mak)72 123.6 Q 2.5(eb)-.1 G (ack into the original \214le.)-2.5 E F1 2.5(1.4. Notational)72 147.6 R (con)2.5 E -.1(ve)-.4 G(ntions).1 E F0 1.836(In our e)97 163.2 R 1.835 (xamples, input which must be typed as is will be presented in)-.15 F F1 1.835(bold face)4.335 F F0 4.335(.T)C -.15(ex)-5.035 G 4.335(tw).15 G 1.835(hich should be)-4.335 F (replaced with appropriate input will be gi)72 175.2 Q -.15(ve)-.25 G 2.5(ni).15 G(n)-2.5 E F2(italics)2.5 E F0 5(.W)C 2.5(ew)-5.8 G (ill represent special characters in)-2.5 E/F3 8/Times-Roman@0 SF (SMALL CAPIT)2.5 E(ALS)-.744 E F0(.)A F1 2.5(1.5. Arr)72 199.2 R .2 -.1 (ow ke)-.18 H(ys).1 E F0 .032 (The editor command set is independent of the terminal you are using.)97 214.8 R .032(On most terminals with cursor position-)5.032 F .653(ing k) 72 226.8 R -.15(ey)-.1 G .653(s, these k).15 F -.15(ey)-.1 G 3.153(sw) .15 G .653(ill also w)-3.153 F .653(ork within the editor)-.1 F 5.653 (.I)-.55 G 3.153(fy)-5.653 G .653(ou don')-3.153 F 3.153(th)-.18 G -2.25 -.2(av e)-3.153 H .653(cursor positioning k)3.353 F -.15(ey)-.1 G .653 (s, or e).15 F -.15(ve)-.25 G 3.152(ni).15 G 3.152(fy)-3.152 G .652 (ou do,)-3.152 F(you can use the)72 238.8 Q F1 2.5(hjk)2.5 G F0(and)A F1 (l)2.5 E F0 -.1(ke)2.5 G(ys as cursor positioning k)-.05 E -.15(ey)-.1 G 2.5(s\().15 G(these are labelled with arro)-2.5 E(ws on an)-.25 E F2 (adm3a\).*)2.5 E F0(\(P)97 254.4 Q 2.073 (articular note for the HP2621: on this terminal the function k)-.15 F -.15(ey)-.1 G 4.573(sm).15 G 2.073(ust be)-4.573 F F2(shifted)4.574 E F0 2.074(\(ick\) to send to the)4.574 F(machine, otherwise the)72 266.4 Q 2.5(yo)-.15 G(nly act locally)-2.5 E 5(.U)-.65 G(nshifted use will lea) -5 E .3 -.15(ve t)-.2 H(he cursor positioned incorrectly).15 E(.\))-.65 E F1 2.5(1.6. Special)72 290.4 R(characters:)2.5 E/F4 8/Times-Bold@0 SF (ESC)2.5 E F1(,)A F4(CR)2.5 E F1(and)2.5 E F4(DEL)2.5 E F0(Se)97 306 Q -.15(ve)-.25 G 1.779(ral of these special characters are v).15 F 1.78 (ery important, so be sure to \214nd them right no)-.15 F 5.58 -.65 (w. L)-.25 H 1.78(ook on your).65 F -.1(ke)72 318 S .189(yboard for a k) -.05 F .489 -.15(ey l)-.1 H(abelled).15 E F3(ESC)2.689 E F0(or)2.689 E F3(AL)2.688 E(T)-.736 E F0 5.188(.I)C 2.688(ts)-5.188 G .188 (hould be near the upper left corner of your terminal.)-2.688 F -.35(Tr) 5.188 G 2.688(yh).35 G .188(itting this k)-2.688 F -.15(ey)-.1 G 3.034 (af)72 330 S 1.034 -.25(ew t)-3.034 H 3.034(imes. The).25 F .535(editor\ will ring the bell to indicate that it is in a quiescent state.\210 P) 3.034 F .535(artially formed commands are)-.15 F .311(cancelled by)72 342 R F3(ESC)2.811 E F0 2.811(,a)C .311(nd when you insert te)-2.811 F .31(xt in the \214le you end the te)-.15 F .31(xt insertion with)-.15 F F3(ESC)2.81 E F0 5.31(.T)C .31(his k)-5.31 F .61 -.15(ey i)-.1 H 2.81 (saf).15 G .31(airly harm-)-2.91 F (less one to hit, so you can just hit it if you don')72 354 Q 2.5(tk) -.18 G(no)-2.5 E 2.5(ww)-.25 G (hat is going on until the editor rings the bell.)-2.5 E(The)97 369.6 Q F3(CR)2.669 E F0(or)2.669 E F3(RETURN)2.67 E F0 -.1(ke)2.67 G 2.67(yi) -.05 G 2.67(si)-2.67 G .17 (mportant because it is used to terminate certain commands.)-2.67 F .17 (It is usually at the right)5.17 F(side of the k)72 381.6 Q -.15(ey)-.1 G(board, and is the same command used at the end of each shell command.) .15 E .035(Another v)97 397.2 R .035(ery useful k)-.15 F .335 -.15(ey i) -.1 H 2.535(st).15 G(he)-2.535 E F3(DEL)2.535 E F0(or)2.535 E F3 -.32 (RU)2.535 G(B).32 E F0 -.1(ke)2.535 G 1.335 -.65(y, w)-.05 H .035 (hich generates an interrupt, telling the editor to stop what it is).65 F 2.845(doing. It)72 409.2 R .345(is a forceful w)2.845 F .346(ay of ma\ king the editor listen to you, or to return it to the quiescent state i\ f you don')-.1 F 2.846(tk)-.18 G(no)-2.846 E(w)-.25 E .132(or don')72 421.2 R 2.632(tl)-.18 G(ik)-2.632 E 2.632(ew)-.1 G .132 (hat is going on.)-2.632 F -.35(Tr)5.132 G 2.632(yh).35 G .132 (itting the `/' k)-2.632 F .432 -.15(ey o)-.1 H 2.632(ny).15 G .132 (our terminal.)-2.632 F .132(This k)5.132 F .431 -.15(ey i)-.1 H 2.631 (su).15 G .131(sed when you w)-2.631 F .131(ant to specify a)-.1 F .05 (string to be searched for)72 433.2 R 5.05(.T)-.55 G .05 (he cursor should no)-5.05 F 2.55(wb)-.25 G 2.55(ep)-2.55 G .05 (ositioned at the bottom line of the terminal after a `/' printed as) -2.55 F 3.27(ap)72 445.2 S 3.27(rompt. Y)-3.27 F .77 (ou can get the cursor back to the current position by hitting the)-1.1 F F3(DEL)3.27 E F0(or)3.27 E F3 -.32(RU)3.27 G(B).32 E F0 -.1(ke)3.27 G .77(y; try this no)-.05 F -.65(w.)-.25 G 5.77(*F).65 G(rom)-5.77 E(no)72 457.2 Q 2.5(wo)-.25 G 2.5(nw)-2.5 G 2.5(ew)-2.5 G (ill simply refer to hitting the)-2.5 E F3(DEL)2.5 E F0(or)2.5 E F3 -.32 (RU)2.5 G(B).32 E F0 -.1(ke)2.5 G 2.5(ya)-.05 G 2.5(s`)-2.5 G (`sending an interrupt.)-3.24 E -.74('')-.7 G(**).74 E .159(The editor \ often echoes your commands on the last line of the terminal.)97 472.8 R .158(If the cursor is on the \214rst position of)5.158 F .223(this last\ line, then the editor is performing a computation, such as computing a\ ne)72 484.8 R 2.724(wp)-.25 G .224 (osition in the \214le after a search)-2.724 F .34 (or running a command to reformat part of the b)72 496.8 R(uf)-.2 E(fer) -.25 E 5.34(.W)-.55 G .339 (hen this is happening you can stop the editor by sending an)-5.34 F (interrupt.)72 508.8 Q F1 2.5(1.7. Getting)72 532.8 R(out of the editor) 2.5 E F0 .144(After you ha)97 548.4 R .444 -.15(ve w)-.2 H(ork).05 E .145(ed with this introduction for a while, and you wish to do somethin\ g else, you can gi)-.1 F .445 -.15(ve t)-.25 H(he).15 E(command)72 560.4 Q F1(ZZ)2.52 E F0 .02(to the editor)2.52 F 5.02(.T)-.55 G .02 (his will write the contents of the editor')-5.02 F 2.519(sb)-.55 G(uf) -2.719 E .019(fer back into the \214le you are editing, if you)-.25 F .041(made an)72 572.4 R 2.541(yc)-.15 G .041 (hanges, and then quit from the editor)-2.541 F 5.041(.Y)-.55 G .042 (ou can also end an editor session by gi)-6.141 F .042(ving the command) -.25 F F1(:q!)2.542 E F3(CR)A F0<3b87>A .29(this is a dangerous b)72 584.4 R .29(ut occasionally essential command which ends the editor ses\ sion and discards all your changes.)-.2 F -1.1(Yo)72 596.4 S 3.093(un) 1.1 G .593(eed to kno)-3.093 F 3.094(wa)-.25 G .594 (bout this command in case you change the editor')-3.094 F 3.094(sc)-.55 G(op)-3.094 E 3.094(yo)-.1 G 3.094(fa\214)-3.094 G .594 (le you wish only to look at.)-3.094 F(Be)5.594 E .32 LW 144 604.4 72 604.4 DL F3 .927(Another thing which can go wrong is that you typed the\ wrong \214le name and the editor just printed an error diagnostic.)82 614.4 R .926(In this case you)4.926 F(should follo)72 624.4 Q 2(wt)-.2 G (he abo)-2 E .24 -.12(ve p)-.12 H (rocedure for getting out of the editor).12 E 2(,a)-.32 G(nd try ag)-2 E (ain this time spelling the \214le name correctly)-.04 E(.)-.52 E .086 (If the editor doesn')82 634.4 R 2.086(ts)-.144 G .086(eem to respond t\ o the commands which you type here, try sending an interrupt to it by h\ itting the)-2.086 F/F5 6/Times-Roman@0 SF(DEL)2.086 E F3(or)2.086 E F5 -.24(RU)2.086 G(B).24 E F3 -.08(ke)2.086 G 2.086(yo)-.04 G 2.086(ny) -2.086 G(our)-2.086 E(terminal, and then hitting the)72 644.4 Q F4(:q)2 E F3(command ag)2 E(ain follo)-.04 E(wed by a carriage return.)-.2 E 2.616(*A)72 666.2 S 2.616(sw)-2.616 G 2.616(ew)-2.616 G .616 (ill see later)-2.616 F(,)-.32 E/F6 8/Times-Italic@0 SF(h)2.615 E F3(mo) 2.615 E -.12(ve)-.12 G 2.615(sb).12 G .615(ack to the left \(lik)-2.615 F 2.615(ec)-.08 G .615(ontrol-h which is a backspace\),)-2.615 F F6(j) 2.615 E F3(mo)2.615 E -.12(ve)-.12 G 2.615(sd).12 G -.2(ow)-2.615 G 2.615(n\().2 G .615(in the same column\),)-2.615 F F6(k)2.615 E F3(mo) 2.615 E -.12(ve)-.12 G 2.615(su).12 G 2.615(p\()-2.615 G .615(in the) -2.615 F(same column\), and)72 676.2 Q F6(l)2 E F3(mo)2 E -.12(ve)-.12 G 2(st).12 G 2(ot)-2 G(he right.)-2 E 2<884f>72 688 S 2(ns)-2 G(mart term\ inals where it is possible, the editor will quietly \215ash the screen \ rather than ringing the bell.)-2 E 2(*B)72 699.8 S(ackspacing o)-2 E -.12(ve)-.12 G 2(rt).12 G(he `/' will also cancel the search.)-2 E .01(\ ** On some systems, this interruptibility comes at a price: you cannot \ type ahead when the editor is computing with the cursor on the bottom l\ ine.)72 711.6 R 2<8741>72 723.4 S(ll commands which read from the last \ display line can also be terminated with a)-2 E F5(ESC)2 E F3 (as well as an)2 E F5(CR)2 E F3(.)A EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 252.21(USD:11-4 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E -.15(ve)72 84 S (ry careful not to gi).15 E .3 -.15(ve t)-.25 H (his command when you really w).15 E(ant to sa)-.1 E .3 -.15(ve t)-.2 H (he changes you ha).15 E .3 -.15(ve m)-.2 H(ade.).15 E/F1 10 /Times-Bold@0 SF 2.5(2. Mo)72 108 R(ving ar)-.1 E(ound in the \214le) -.18 E 2.5(2.1. Scr)72 132 R(olling and paging)-.18 E F0 .133 (The editor has a number of commands for mo)97 147.6 R .133 (ving around in the \214le.)-.15 F .133 (The most useful of these is generated by)5.133 F 1.074 (hitting the control and D k)72 159.6 R -.15(ey)-.1 G 3.574(sa).15 G 3.574(tt)-3.574 G 1.074(he same time, a control-D or `^D'.)-3.574 F 2.674 -.8(We w)6.074 H 1.075(ill use this tw).8 F 3.575(oc)-.1 G 1.075 (haracter notation for)-3.575 F .886(referring to these control k)72 171.6 R -.15(ey)-.1 G 3.386(sf).15 G .885(rom no)-3.386 F 3.385(wo)-.25 G 3.385(n. Y)-3.385 F .885(ou may ha)-1.1 F 1.185 -.15(ve a k)-.2 H 1.185 -.15(ey l).05 H .885(abelled `^' on your terminal.).15 F .885 (This k)5.885 F 1.185 -.15(ey w)-.1 H .885(ill be).15 F (represented as `)72 183.6 Q/F2 10/Symbol SFA F0 2.5('i)C 2.5(nt) -2.5 G(his document; `^' is e)-2.5 E(xclusi)-.15 E -.15(ve)-.25 G (ly used as part of the `^x' notation for control characters.\210).15 E .31(As you kno)97 199.2 R 2.81(wn)-.25 G .81 -.25(ow i)-2.81 H 2.81(fy) .25 G .31(ou tried hitting)-2.81 F F1(^D)2.81 E F0 2.81(,t)C .31 (his command scrolls do)-2.81 F .311(wn in the \214le.)-.25 F(The)5.311 E F1(D)2.811 E F0 .311(thus stands for do)2.811 F(wn.)-.25 E(Man)72 211.2 Q 2.655(ye)-.15 G .155(ditor commands are mnemonic and this mak) -2.655 F .155(es them much easier to remember)-.1 F 5.154(.F)-.55 G .154 (or instance the command to)-5.304 F .016(scroll up is)72 223.2 R F1(^U) 2.516 E F0 5.016(.M)C(an)-5.016 E 2.516(yd)-.15 G .016 (umb terminals can')-2.516 F 2.516(ts)-.18 G .016 (croll up at all, in which case hitting)-2.516 F F1(^U)2.517 E F0 .017 (clears the screen and refreshes it)2.517 F(with a line which is f)72 235.2 Q(arther back in the \214le at the top.)-.1 E .277(If you w)97 250.8 R .277(ant to see more of the \214le belo)-.1 F 2.776(ww)-.25 G .276(here you are, you can hit)-2.776 F F1(^E)2.776 E F0 .276(to e)2.776 F .276(xpose one more line at the bottom)-.15 F .556(of the screen, lea) 72 262.8 R .556(ving the cursor where it is.)-.2 F .556(The command) 5.556 F F1(^Y)3.056 E F0 .557(\(which is hopelessly non-mnemonic, b) 3.056 F .557(ut ne)-.2 F .557(xt to)-.15 F F1(^U)3.057 E F0(on the k)72 274.8 Q -.15(ey)-.1 G(board\) e).15 E (xposes one more line at the top of the screen.)-.15 E .103 (There are other w)97 290.4 R .103(ays to mo)-.1 F .403 -.15(ve a)-.15 H .102(round in the \214le; the k).15 F -.15(ey)-.1 G(s).15 E F1(^F)2.602 E F0(and)2.602 E F1(^B)2.602 E F0(mo)2.602 E .402 -.15(ve f)-.15 H(orw) .15 E .102(ard and backw)-.1 F .102(ard a page, k)-.1 F(eep-)-.1 E .24(\ ing a couple of lines of continuity between screens so that it is possi\ ble to read through a \214le using these rather than)72 302.4 R F1(^D)72 314.4 Q F0(and)2.5 E F1(^U)2.5 E F0(if you wish.)2.5 E .91 (Notice the dif)97 330 R .91(ference between scrolling and paging.)-.25 F .91(If you are trying to read the te)5.91 F .91 (xt in a \214le, hitting)-.15 F F1(^F)3.41 E F0(to)3.41 E(mo)72 342 Q 1.1 -.15(ve f)-.15 H(orw).15 E .801(ard a page will lea)-.1 F 1.101 -.15 (ve y)-.2 H .801(ou only a little conte).15 F .801(xt to look back at.) -.15 F .801(Scrolling on the other hand lea)5.801 F -.15(ve)-.2 G 3.301 (sm).15 G(ore)-3.301 E(conte)72 354 Q(xt, and happens more smoothly)-.15 E 5(.Y)-.65 G(ou can continue to read the te)-6.1 E (xt as scrolling is taking place.)-.15 E F1 2.5(2.2. Sear)72 378 R (ching, goto, and pr)-.18 E -.15(ev)-.18 G(ious context).15 E F0 .479 (Another w)97 393.6 R .478 (ay to position yourself in the \214le is by gi)-.1 F .478 (ving the editor a string to search for)-.25 F 5.478(.T)-.55 G .478 (ype the character)-6.278 F F1(/)2.978 E F0(follo)72 405.6 Q .057 (wed by a string of characters terminated by)-.25 F/F3 8/Times-Roman@0 SF(CR)2.557 E F0 5.057(.T)C .058 (he editor will position the cursor at the ne)-5.057 F .058 (xt occurrence of this)-.15 F 3.379(string. T)72 417.6 R .879 (ry hitting)-.35 F F1(n)3.379 E F0 .879(to then go to the ne)3.379 F .878(xt occurrence of this string.)-.15 F .878(The character)5.878 F F1 (?)3.378 E F0 .878(will search backw)3.378 F .878(ards from)-.1 F (where you are, and is otherwise lik)72 429.6 Q(e)-.1 E F1(/)2.5 E F0 <2e87>A .137(If the search string you gi)97 445.2 R .437 -.15(ve t)-.25 H .138(he editor is not present in the \214le the editor will print a d\ iagnostic on the last line).15 F(of the screen, and the cursor will be \ returned to its initial position.)72 457.2 Q .66 (If you wish the search to match only at the be)97 472.8 R .66 (ginning of a line, be)-.15 F .66(gin the search string with an)-.15 F F23.16 E F0 5.66(.T)C 3.16(om)-6.46 G(atch)-3.16 E .749 (only at the end of a line, end the search string with a)72 484.8 R F1 ($)3.249 E F0 5.749(.T)C(hus)-5.749 E F1(/)3.249 E F2A F1(sear)A(ch) -.18 E F3(CR)A F0 .749(will search for the w)3.249 F .749 (ord `search' at the)-.1 F(be)72 496.8 Q(ginning of a line, and)-.15 E F1(/last$)2.5 E F3(CR)A F0(searches for the w)2.5 E (ord `last' at the end of a line.*)-.1 E .833(The command)97 512.4 R F1 (G)3.333 E F0 3.333(,w)C .833(hen preceded by a number will position th\ e cursor at that line in the \214le.)-3.333 F(Thus)5.832 E F1(1G)3.332 E F0(will)3.332 E(mo)72 524.4 Q .3 -.15(ve t)-.15 H (he cursor to the \214rst line of the \214le.).15 E(If you gi)5 E -.15 (ve)-.25 G F1(G)2.65 E F0(no count, then it mo)2.5 E -.15(ve)-.15 G 2.5 (st).15 G 2.5(ot)-2.5 G(he end of the \214le.)-2.5 E .223(If you are ne\ ar the end of the \214le, and the last line is not at the bottom of the\ screen, the editor will place only)97 540 R .738 (the character `~' on each remaining line.)72 552 R .738(This indicates\ that the last line in the \214le is on the screen; that is, the `~') 5.738 F(lines are past the end of the \214le.)72 564 Q -1.1(Yo)97 579.6 S 2.706(uc)1.1 G .206 (an \214nd out the state of the \214le you are editing by typing a) -2.706 F F1(^G)2.706 E F0 5.206(.T)C .206(he editor will sho)-5.206 F 2.707(wy)-.25 G .207(ou the name of the)-2.707 F .475(\214le you are ed\ iting, the number of the current line, the number of lines in the b)72 591.6 R(uf)-.2 E(fer)-.25 E 2.974(,a)-.4 G .474 (nd the percentage of the w)-2.974 F(ay)-.1 E .551(through the b)72 603.6 R(uf)-.2 E .551(fer which you are.)-.25 F -.35(Tr)5.551 G 3.051 (yd).35 G .551(oing this no)-3.051 F 1.851 -.65(w, a)-.25 H .552 (nd remember the number of the line you are on.).65 F(Gi)5.552 E .852 -.15(ve a)-.25 H F1(G)3.202 E F0 (command to get to the end and then another)72 615.6 Q F1(G)2.5 E F0 (command to get back where you were.)2.5 E -1.1(Yo)97 631.2 S 3.003(uc) 1.1 G .503(an also get back to a pre)-3.003 F .503 (vious position by using the command)-.25 F F1<9292>3.003 E F0(\(tw) 3.003 E 3.003(ob)-.1 G .503(ack quotes\).)-3.003 F .503 (This is often more)5.503 F(con)72 643.2 Q -.15(ve)-.4 G .118 (nient than).15 F F1(G)2.618 E F0 .118(because it requires no adv)2.618 F .118(ance preparation.)-.25 F -.35(Tr)5.118 G 2.618(yg).35 G -.25(iv) -2.618 G .118(ing a).25 F F1(G)2.618 E F0 .118(or a search with)2.618 F F1(/)2.619 E F0(or)2.619 E F1(?)2.619 E F0 .119(and then a)2.619 F F1 <9292>2.619 E F0(to)2.619 E .32 LW 144 651.2 72 651.2 DL F3 2<8849>72 661.2 S 2(fy)-2 G(ou don')-2 E 2(th)-.144 G -1.8 -.16(av e)-2 H 2(a`) 2.16 G(^' k)-2 E .24 -.12(ey o)-.08 H 2(ny).12 G (our terminal then there is probably a k)-2 E .24 -.12(ey l)-.08 H (abelled `).12 E/F4 8/Symbol SFA F3('; in an)A 2(yc)-.12 G (ase these characters are one and the same.)-2 E 2.316<8754>72 673 S .316(hese searches will normally wrap around the end of the \214le, and\ thus \214nd the string e)-2.316 F -.12(ve)-.2 G 2.317(ni).12 G 2.317 (fi)-2.317 G 2.317(ti)-2.317 G 2.317(sn)-2.317 G .317 (ot on a line in the direction you search pro-)-2.317 F .639 (vided it is an)72 683 R .639(ywhere else in the \214le.)-.12 F -.88(Yo) 4.639 G 2.639(uc).88 G .639(an disable this wraparound in scans by gi) -2.639 F .639(ving the command)-.2 F/F5 8/Times-Bold@0 SF .639(:se no) 2.639 F(wrapscan)-.08 E/F6 6/Times-Roman@0 SF(CR)A F3 2.638(,o)C 2.638 (rm)-2.638 G .638(ore brie\215y)-2.638 F F5(:se)2.638 E(no)72 693 Q(ws) -.08 E F6(CR)A F3(.)A(*Actually)72 704.8 Q 2.17(,t)-.52 G .17 (he string you gi)-2.17 F .41 -.12(ve t)-.2 H 2.17(os).12 G .17 (earch for here can be a)-2.17 F/F7 8/Times-Italic@0 SF -.296(re)2.17 G .17(gular e)-.024 F(xpr)-.16 E(ession)-.296 E F3 .17 (in the sense of the editors)2.17 F F7 -.16(ex)2.17 G F3 .17(\(1\) and) .16 F F7(ed)2.17 E F3 2.17(\(1\). If)B .17(you don')2.17 F 2.17(tw)-.144 G .17(ish to learn)-2.17 F .211 (about this yet, you can disable this more general f)72 714.8 R .211 (acility by doing)-.08 F F5(:se nomagic)2.211 E F6(CR)A F3 2.212(;b)C 2.212(yp)-2.212 G .212(utting this command in EXINIT in your en)-2.212 F .212(vironment, you)-.32 F(can ha)72 724.8 Q .24 -.12(ve t)-.16 H (his al).12 E -.08(wa)-.08 G(ys be in ef).08 E(fect \(more about)-.2 E F7(EXINIT)2 E F3(later)2 E(.\))-.44 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 254.71(iU)-.6 G(SD:11-5)-254.71 E .159(get back to where you were.)72 84 R .159(If you accidentally hit)5.159 F/F1 10/Times-Bold@0 SF(n)2.659 E F0 .159(or an)2.659 F 2.659(yc)-.15 G .159(ommand which mo)-2.659 F -.15(ve)-.15 G 2.659(sy).15 G .159(ou f)-2.659 F .159(ar a)-.1 F -.1(wa) -.15 G 2.659(yf).1 G .159(rom a conte)-2.659 F .159(xt of)-.15 F (interest, you can quickly get back by hitting)72 96 Q F1<9292>2.5 E F0 (.)A F1 2.5(2.3. Mo)72 120 R(ving ar)-.1 E(ound on the scr)-.18 E(een) -.18 E F0(No)97 135.6 Q 2.515(wt)-.25 G .015(ry just mo)-2.515 F .015 (ving the cursor around on the screen.)-.15 F .015 (If your terminal has arro)5.015 F 2.515(wk)-.25 G -.15(ey)-2.615 G 2.515(s\().15 G 2.516(4o)-2.515 G 2.516(r5k)-2.516 G -.15(ey)-2.616 G 2.516(sw).15 G .016(ith arro)-2.516 F(ws)-.25 E .432 (going in each direction\) try them and con)72 147.6 R .432 (vince yourself that the)-.4 F 2.932(yw)-.15 G 2.931(ork. If)-3.032 F .431(you don')2.931 F 2.931(th)-.18 G -2.25 -.2(av e)-2.931 H -.1(wo) 3.131 G .431(rking arro).1 F 2.931(wk)-.25 G -.15(ey)-3.031 G .431 (s, you).15 F .242(can al)72 159.6 R -.1(wa)-.1 G .242(ys use).1 F F1(h) 2.742 E F0(,)A F1(j)2.742 E F0(,)A F1(k)2.742 E F0 2.742(,a)C(nd)-2.742 E F1(l)2.742 E F0 5.242(.E)C .242(xperienced users of)-5.242 F/F2 10 /Times-Italic@0 SF(vi)2.742 E F0 .242(prefer these k)2.742 F -.15(ey)-.1 G 2.742(st).15 G 2.742(oa)-2.742 G(rro)-2.742 E 2.743(wk)-.25 G -.15(ey) -2.843 G .243(s, because the).15 F 2.743(ya)-.15 G .243 (re usually right)-2.743 F(underneath their \214ngers.)72 171.6 Q .751 (Hit the)97 187.2 R F1(+)3.251 E F0 -.1(ke)3.251 G 4.551 -.65(y. E)-.05 H .751(ach time you do, notice that the cursor adv).65 F .75 (ances to the ne)-.25 F .75(xt line in the \214le, at the \214rst non-) -.15 F(white position on the line.)72 199.2 Q(The)5 E F12.5 E F0 -.1 (ke)2.5 G 2.5(yi)-.05 G 2.5(sl)-2.5 G(ik)-2.5 E(e)-.1 E F1(+)2.5 E F0 -.2(bu)2.5 G 2.5(tg).2 G(oes the other w)-2.5 E(ay)-.1 E(.)-.65 E .135 (These are v)97 214.8 R .136(ery common k)-.15 F -.15(ey)-.1 G 2.636(sf) .15 G .136(or mo)-2.636 F .136(ving up and do)-.15 F .136 (wn lines in the \214le.)-.25 F .136(Notice that if you go of)5.136 F 2.636(ft)-.25 G .136(he bottom or)-2.636 F 1.051(top with these k)72 226.8 R -.15(ey)-.1 G 3.551(st).15 G 1.051 (hen the screen will scroll do)-3.551 F 1.051 (wn \(and up if possible\) to bring a line at a time into vie)-.25 F 4.85 -.65(w. T)-.25 H(he).65 E/F3 8/Times-Roman@0 SF(RETURN)72 238.8 Q F0 -.1(ke)2.5 G 2.5(yh)-.05 G(as the same ef)-2.5 E(fect as the)-.25 E F1(+)2.5 E F0 -.1(ke)2.5 G -.65(y.)-.05 G F2 -.74(Vi)97 254.4 S F0 1.051 (also has commands to tak)4.291 F 3.551(ey)-.1 G 1.051 (ou to the top, middle and bottom of the screen.)-3.551 F F1(H)6.052 E F0 1.052(will tak)3.552 F 3.552(ey)-.1 G 1.052(ou to the top)-3.552 F 1.179(\(home\) line on the screen.)72 266.4 R -.35(Tr)6.179 G 3.679(yp) .35 G 1.179(receding it with a number as in)-3.679 F F1(3H)3.679 E F0 6.179(.T)C 1.179(his will tak)-6.179 F 3.678(ey)-.1 G 1.178 (ou to the third line on the)-3.678 F 2.539(screen. Man)72 278.4 R(y) -.15 E F2(vi)2.539 E F0 .039(commands tak)2.539 F 2.539(ep)-.1 G .039 (receding numbers and do interesting things with them.)-2.539 F -.35(Tr) 5.04 G(y).35 E F1(M)2.54 E F0 2.54(,w)C .04(hich tak)-2.54 F .04 (es you to)-.1 F .077(the middle line on the screen, and)72 290.4 R F1 (L)2.577 E F0 2.577(,w)C .077(hich tak)-2.577 F .077 (es you to the last line on the screen.)-.1 F F1(L)5.077 E F0 .077 (also tak)2.577 F .077(es counts, thus)-.1 F F1(5L)2.577 E F0(will)2.577 E(tak)72 302.4 Q 2.5(ey)-.1 G(ou to the \214fth line from the bottom.) -2.5 E F1 2.5(2.4. Mo)72 326.4 R(ving within a line)-.1 E F0(No)97 342 Q 3.686(wt)-.25 G 1.186(ry picking a w)-3.686 F 1.186 (ord on some line on the screen, not the \214rst w)-.1 F 1.186 (ord on the line.)-.1 F(mo)6.187 E 1.487 -.15(ve t)-.15 H 1.187 (he cursor using).15 F F3(RETURN)72 354 Q F0(and)3.098 E F13.098 E F0 .597(to be on the line where the w)3.097 F .597(ord is.)-.1 F -.35 (Tr)5.597 G 3.097(yh).35 G .597(itting the)-3.097 F F1(w)3.097 E F0 -.1 (ke)3.097 G 4.397 -.65(y. T)-.05 H .597(his will adv).65 F .597 (ance the cursor to the ne)-.25 F(xt)-.15 E -.1(wo)72 366 S .518 (rd on the line.).1 F -.35(Tr)5.518 G 3.018(yh).35 G .518(itting the) -3.018 F F1(b)3.018 E F0 -.1(ke)3.018 G 3.018(yt)-.05 G 3.018(ob)-3.018 G .518(ack up w)-3.018 F .518(ords in the line.)-.1 F .519(Also try the) 5.519 F F1(e)3.019 E F0 -.1(ke)3.019 G 3.019(yw)-.05 G .519(hich adv) -3.019 F .519(ances you to the)-.25 F .492(end of the current w)72 378 R .492(ord rather than to the be)-.1 F .492(ginning of the ne)-.15 F .492 (xt w)-.15 F 2.992(ord. Also)-.1 F(try)2.992 E F3(SP)2.992 E -.32(AC) -.736 G(E).32 E F0 .492(\(the space bar\) which mo)2.992 F -.15(ve)-.15 G(s).15 E .532(right one character and the)72 390 R F3(BS)3.032 E F0 .532(\(backspace or)3.032 F F1(^H)3.033 E F0 3.033(\)k)C .833 -.15(ey w) -3.133 H .533(hich mo).15 F -.15(ve)-.15 G 3.033(sl).15 G .533 (eft one character)-3.033 F 5.533(.T)-.55 G .533(he k)-5.533 F -.15(ey) -.1 G F1(h)3.183 E F0 -.1(wo)3.033 G .533(rks as).1 F F1(^H)3.033 E F0 (does)3.033 E(and is useful if you don')72 402 Q 2.5(th)-.18 G -2.25 -.2 (av e)-2.5 H(a)2.7 E F3(BS)2.5 E F0 -.1(ke)2.5 G 3.8 -.65(y. \()-.05 H (Also, as noted just abo).65 E -.15(ve)-.15 G(,).15 E F1(l)2.5 E F0 (will mo)2.5 E .3 -.15(ve t)-.15 H 2.5(ot).15 G(he right.\))-2.5 E 1.05 (If the line had punctuation in it you may ha)97 417.6 R 1.35 -.15(ve n) -.2 H 1.05(oticed that that the).15 F F1(w)3.55 E F0(and)3.55 E F1(b) 3.55 E F0 -.1(ke)3.55 G 1.05(ys stopped at each group of)-.05 F 3.39 (punctuation. Y)72 429.6 R .89(ou can also go back and forw)-1.1 F .89 (ards w)-.1 F .89(ords without stopping at punctuation by using)-.1 F F1 (W)3.39 E F0(and)3.39 E F1(B)3.39 E F0(rather)3.39 E .727(than the lo)72 441.6 R .727(wer case equi)-.25 F -.25(va)-.25 G 3.227(lents. Think).25 F .727(of these as bigger w)3.227 F 3.226(ords. T)-.1 F .726 (ry these on a fe)-.35 F 3.226(wl)-.25 G .726 (ines with punctuation to see)-3.226 F(ho)72 453.6 Q 2.5(wt)-.25 G(he) -2.5 E 2.5(yd)-.15 G(if)-2.5 E(fer from the lo)-.25 E(wer case)-.25 E F1 (w)2.5 E F0(and)2.5 E F1(b)2.5 E F0(.)A .599(The w)97 469.2 R .599 (ord k)-.1 F -.15(ey)-.1 G 3.099(sw).15 G .599 (rap around the end of line, rather than stopping at the end.)-3.099 F -.35(Tr)5.6 G 3.1(ym).35 G -.15(ov)-3.1 G .6(ing to a w).15 F .6 (ord on a line)-.1 F(belo)72 481.2 Q 2.5(ww)-.25 G (here you are by repeatedly hitting)-2.5 E F1(w)2.5 E F0(.)A F1 2.5 (2.5. Summary)72 505.2 R F3(SP)97 526.8 Q -.32(AC)-.736 G(E).32 E F0 (adv)32.16 E(ance the cursor one position)-.25 E F1(^B)97 538.8 Q F0 (backw)46 E(ards to pre)-.1 E(vious page)-.25 E F1(^D)97 550.8 Q F0 (scrolls do)45.45 E(wn in the \214le)-.25 E F1(^E)97 562.8 Q F0 -.15(ex) 46 G(poses another line at the bottom).15 E F1(^F)97 574.8 Q F0(forw) 46.56 E(ard to ne)-.1 E(xt page)-.15 E F1(^G)97 586.8 Q F0 (tell what is going on)44.89 E F1(^H)97 598.8 Q F0(backspace the cursor) 44.89 E F1(^N)97 610.8 Q F0(ne)45.45 E(xt line, same column)-.15 E F1 (^P)97 622.8 Q F0(pre)46.56 E(vious line, same column)-.25 E F1(^U)97 634.8 Q F0(scrolls up in the \214le)45.45 E F1(^Y)97 646.8 Q F0 -.15(ex) 45.45 G(poses another line at the top).15 E F1(+)97 658.8 Q F0(ne)50.3 E (xt line, at the be)-.15 E(ginning)-.15 E F197 670.8 Q F0(pre)50.3 E (vious line, at the be)-.25 E(ginning)-.15 E F1(/)97 682.8 Q F0 (scan for a follo)53.22 E(wing string forw)-.25 E(ards)-.1 E F1(?)97 694.8 Q F0(scan backw)51 E(ards)-.1 E F1(B)97 706.8 Q F0(back a w)49.33 E(ord, ignoring punctuation)-.1 E F1(G)97 718.8 Q F0 (go to speci\214ed line, last def)48.22 E(ault)-.1 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 252.21(USD:11-6 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF(H)97 84 Q F0(home screen line)48.22 E F1(M)97 96 Q F0 (middle screen line)46.56 E F1(L)97 108 Q F0(last screen line)49.33 E F1 (W)97 120 Q F0(forw)46 E(ard a w)-.1 E(ord, ignoring punctuation)-.1 E F1(b)97 132 Q F0(back a w)50.44 E(ord)-.1 E F1(e)97 144 Q F0 (end of current w)51.56 E(ord)-.1 E F1(n)97 156 Q F0(scan for ne)50.44 E (xt instance of)-.15 E F1(/)2.5 E F0(or)2.5 E F1(?)2.5 E F0(pattern)2.5 E F1(w)97 168 Q F0 -.1(wo)48.78 G(rd after this w).1 E(ord)-.1 E F1 2.5 (2.6. V)72 198 R(iew)-.37 E F0 .125(If you w)97 213.6 R .125 (ant to use the editor to look at a \214le, rather than to mak)-.1 F 2.625(ec)-.1 G .125(hanges, in)-2.625 F -.2(vo)-.4 G .325 -.1(ke i).2 H 2.625(ta).1 G(s)-2.625 E/F2 10/Times-Italic@0 SF(vie)2.625 E(w)-.15 E F0 .125(instead of)2.625 F F2(vi)2.625 E F0 5.125(.T)C(his)-5.125 E (will set the)72 225.6 Q F2 -.37(re)2.5 G(adonly).37 E F0 (option which will pre)2.5 E -.15(ve)-.25 G(nt you from accidently o).15 E -.15(ve)-.15 G(rwriting the \214le.).15 E F1 2.5(3. Making)72 261.6 R (simple changes)2.5 E 2.5(3.1. Inserting)72 285.6 R F0 .502 (One of the most useful commands is the)97 301.2 R F1(i)3.003 E F0 .503 (\(insert\) command.)3.003 F .503(After you type)5.503 F F1(i)3.003 E F0 3.003(,e)C -.15(ve)-3.253 G .503(rything you type until you).15 F(hit)72 313.2 Q/F3 8/Times-Roman@0 SF(ESC)2.843 E F0 .343 (is inserted into the \214le.)2.843 F -.35(Tr)5.342 G 2.842(yt).35 G .342(his no)-2.842 F .342(w; position yourself to some w)-.25 F .342 (ord in the \214le and try inserting te)-.1 F .342(xt before)-.15 F .6 (this w)72 325.2 R 3.1(ord. If)-.1 F .6(you are on an dumb terminal it \ will seem, for a minute, that some of the characters in your line ha)3.1 F -.15(ve)-.2 G(been o)72 337.2 Q -.15(ve)-.15 G(rwritten, b).15 E (ut the)-.2 E 2.5(yw)-.15 G(ill reappear when you hit)-2.5 E F3(ESC)2.5 E F0(.)A(No)97 352.8 Q 2.556(wt)-.25 G .056(ry \214nding a w)-2.556 F .056(ord which can, b)-.1 F .056(ut does not, end in an `s'.)-.2 F .055 (Position yourself at this w)5.055 F .055(ord and type)-.1 F F1(e)2.555 E F0(\(mo)2.555 E -.15(ve)-.15 G .474(to end of w)72 364.8 R .475 (ord\), then)-.1 F F1(a)2.975 E F0 .475(for append and then `s)2.975 F F3(ESC)A F0 2.975('t)C 2.975(ot)-2.975 G .475(erminate the te)-2.975 F .475(xtual insert.)-.15 F .475(This sequence of commands can)5.475 F (be used to easily pluralize a w)72 376.8 Q(ord.)-.1 E -.35(Tr)97 392.4 S 2.657(yi).35 G .157(nserting and appending a fe)-2.657 F 2.657(wt)-.25 G .157(imes to mak)-2.657 F 2.657(es)-.1 G .157(ure you understand ho) -2.657 F 2.657(wt)-.25 G .157(his w)-2.657 F(orks;)-.1 E F1(i)2.657 E F0 .157(placing te)2.657 F .157(xt to the left)-.15 F(of the cursor)72 404.4 Q(,)-.4 E F1(a)2.5 E F0(to the right.)2.5 E .294 (It is often the case that you w)97 420 R .294(ant to add ne)-.1 F 2.794 (wl)-.25 G .294(ines to the \214le you are editing, before or after som\ e speci\214c line)-2.794 F .553(in the \214le.)72 432 R .553 (Find a line where this mak)5.553 F .553(es sense and then gi)-.1 F .853 -.15(ve t)-.25 H .553(he command).15 F F1(o)3.053 E F0 .553 (to create a ne)3.053 F 3.053(wl)-.25 G .553(ine after the line you) -3.053 F .563(are on, or the command)72 444 R F1(O)3.063 E F0 .563 (to create a ne)3.063 F 3.063(wl)-.25 G .564 (ine before the line you are on.)-3.063 F .564(After you create a ne) 5.564 F 3.064(wl)-.25 G .564(ine in this w)-3.064 F(ay)-.1 E(,)-.65 E (te)72 456 Q(xt you type up to an)-.15 E F3(ESC)2.5 E F0 (is inserted on the ne)2.5 E 2.5(wl)-.25 G(ine.)-2.5 E(Man)97 471.6 Q 3.519(yr)-.15 G 1.019(elated editor commands are in)-3.519 F -.2(vo)-.4 G -.1(ke).2 G 3.519(db).1 G 3.519(yt)-3.519 G 1.019(he same letter k) -3.519 F 1.319 -.15(ey a)-.1 H 1.019(nd dif).15 F 1.019 (fer only in that one is gi)-.25 F -.15(ve)-.25 G 3.519(nb).15 G 3.519 (ya)-3.519 G(lo)72 483.6 Q .26(wer case k)-.25 F .56 -.15(ey a)-.1 H .26 (nd the other is gi).15 F -.15(ve)-.25 G 2.76(nb).15 G 2.76(ya)-2.76 G 2.76(nu)-2.76 G .26(pper case k)-2.76 F -.15(ey)-.1 G 5.26(.I)-.5 G 2.761(nt)-5.26 G .261(hese cases, the upper case k)-2.761 F .561 -.15 (ey o)-.1 H .261(ften dif).15 F .261(fers from the)-.25 F(lo)72 495.6 Q .521(wer case k)-.25 F .821 -.15(ey i)-.1 H 3.021(ni).15 G .521 (ts sense of direction, with the upper case k)-3.021 F .821 -.15(ey w) -.1 H .521(orking backw).05 F .521(ard and/or up, while the lo)-.1 F .521(wer case)-.25 F -.1(ke)72 507.6 S 2.5(ym)-.05 G -.15(ove)-2.5 G 2.5 (sf).15 G(orw)-2.5 E(ard and/or do)-.1 E(wn.)-.25 E(Whene)97 523.2 Q -.15(ve)-.25 G 3.119(ry).15 G .619(ou are typing in te)-3.119 F .619 (xt, you can gi)-.15 F .919 -.15(ve m)-.25 H(an).15 E 3.119(yl)-.15 G .62(ines of input or just a fe)-3.119 F 3.12(wc)-.25 G 3.12 (haracters. T)-3.12 F 3.12(ot)-.8 G .62(ype in more)-3.12 F .165 (than one line of te)72 535.2 R .165(xt, hit a)-.15 F F3(RETURN)2.665 E F0 .165(at the middle of your input.)2.665 F 2.665(An)5.165 G .665 -.25 (ew l)-2.665 H .165(ine will be created for te).25 F .164 (xt, and you can con-)-.15 F .253(tinue to type.)72 547.2 R .253 (If you are on a slo)5.253 F 2.753(wa)-.25 G .253 (nd dumb terminal the editor may choose to w)-2.753 F .254(ait to redra) -.1 F 2.754(wt)-.15 G .254(he tail of the screen,)-2.754 F .731 (and will let you type o)72 559.2 R -.15(ve)-.15 G 3.231(rt).15 G .731 (he e)-3.231 F .731(xisting screen lines.)-.15 F .73(This a)5.731 F -.2 (vo)-.2 G .73(ids the length).2 F 3.23(yd)-.05 G .73(elay which w)-3.23 F .73(ould occur if the editor)-.1 F .732(attempted to k)72 571.2 R .732 (eep the tail of the screen al)-.1 F -.1(wa)-.1 G .733(ys up to date.).1 F .733(The tail of the screen will be \214x)5.733 F .733 (ed up, and the missing)-.15 F(lines will reappear)72 583.2 Q 2.5(,w)-.4 G(hen you hit)-2.5 E F3(ESC)2.5 E F0(.)A .694 (While you are inserting ne)97 598.8 R 3.194(wt)-.25 G -.15(ex)-3.194 G .694(t, you can use the characters you normally use at the system comma\ nd le).15 F -.15(ve)-.25 G(l).15 E(\(usually)72 610.8 Q F1(^H)2.714 E F0 (or)2.714 E F1(#)2.714 E F0 2.714(\)t)C 2.714(ob)-2.714 G .215 (ackspace o)-2.714 F -.15(ve)-.15 G 2.715(rt).15 G .215(he last charact\ er which you typed, and the character which you use to kill input)-2.715 F .745(lines \(usually)72 622.8 R F1(@)3.245 E F0(,)A F1(^X)3.245 E F0 3.245(,o)C(r)-3.245 E F1(^U)3.245 E F0 3.245(\)t)C 3.245(oe)-3.245 G .745(rase the input you ha)-3.245 F 1.045 -.15(ve t)-.2 H .744 (yped on the current line.\207).15 F .744(The character)5.744 F F1(^W) 3.244 E F0 .744(will erase a)3.244 F(whole w)72 634.8 Q(ord and lea)-.1 E .3 -.15(ve y)-.2 H(ou after the space after the pre).15 E(vious w)-.25 E(ord; it is useful for quickly backing up in an insert.)-.1 E .165(Not\ ice that when you backspace during an insertion the characters you back\ space o)97 650.4 R -.15(ve)-.15 G 2.665(ra).15 G .165 (re not erased; the cur)-2.665 F(-)-.2 E .693(sor mo)72 662.4 R -.15(ve) -.15 G 3.193(sb).15 G(ackw)-3.193 E .693 (ards, and the characters remain on the display)-.1 F 5.693(.T)-.65 G .692(his is often useful if you are planning to type in)-5.693 F 1.348 (something similar)72 674.4 R 6.348(.I)-.55 G 3.849(na)-6.348 G 1.649 -.15(ny c)-3.849 H 1.349(ase the characters disappear when when you hit) .15 F F3(ESC)3.849 E F0 3.849(;i)C 3.849(fy)-3.849 G 1.349(ou w)-3.849 F 1.349(ant to get rid of them)-.1 F(immediately)72 686.4 Q 2.5(,h)-.65 G (it an)-2.5 E F3(ESC)2.5 E F0(and then)2.5 E F1(a)2.5 E F0(ag)2.5 E (ain.)-.05 E .32 LW 144 710 72 710 DL F3 2<8749>72 720 S 2(nf)-2 G (act, the character)-2.08 E/F4 8/Times-Bold@0 SF(^H)2 E F3 (\(backspace\) al)2 E -.08(wa)-.08 G(ys w).08 E (orks to erase the last input character here, re)-.08 E -.04(ga)-.12 G (rdless of what your erase character is.).04 E EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 254.71(iU)-.6 G(SD:11-7)-254.71 E .803(Notice also that you can')97 84 R 3.303(te)-.18 G .803(rase characters which you didn')-3.303 F 3.303 (ti)-.18 G .803(nsert, and that you can')-3.303 F 3.303(tb)-.18 G .803 (ackspace around the)-3.303 F .117(end of a line.)72 96 R .118 (If you need to back up to the pre)5.118 F .118(vious line to mak)-.25 F 2.618(eac)-.1 G .118(orrection, just hit)-2.618 F/F1 8/Times-Roman@0 SF (ESC)2.618 E F0 .118(and mo)2.618 F .418 -.15(ve t)-.15 H .118 (he cursor back).15 F 1.057(to the pre)72 108 R 1.057(vious line.)-.25 F 1.056(After making the correction you can return to where you were and \ use the insert or append)6.057 F(command ag)72 120 Q(ain.)-.05 E/F2 10 /Times-Bold@0 SF 2.5(3.2. Making)72 150 R(small corr)2.5 E(ections)-.18 E F0 -1.1(Yo)97 165.6 S 3.375(uc)1.1 G .875(an mak)-3.375 F 3.375(es)-.1 G .875(mall corrections in e)-3.375 F .875(xisting te)-.15 F .875 (xt quite easily)-.15 F 5.876(.F)-.65 G .876 (ind a single character which is wrong or just)-5.876 F .084(pick an)72 177.6 R 2.584(yc)-.15 G(haracter)-2.584 E 5.084(.U)-.55 G .084 (se the arro)-5.084 F 2.584(wk)-.25 G -.15(ey)-2.684 G 2.584(st).15 G 2.583<6f8c>-2.584 G .083(nd the character)-2.583 F 2.583(,o)-.4 G 2.583 (rg)-2.583 G .083(et near the character with the w)-2.583 F .083 (ord motion k)-.1 F -.15(ey)-.1 G 2.583(sa).15 G(nd)-2.583 E .629 (then either backspace \(hit the)72 189.6 R F1(BS)3.129 E F0 -.1(ke) 3.129 G 3.129(yo)-.05 G(r)-3.129 E F2(^H)3.129 E F0 .629(or e)3.129 F -.15(ve)-.25 G 3.129(nj).15 G(ust)-3.129 E F2(h)3.129 E F0 3.129(\)o)C (r)-3.129 E F1(SP)3.129 E -.32(AC)-.736 G(E).32 E F0 .63 (\(using the space bar\) until the cursor is on the)3.13 F .128 (character which is wrong.)72 201.6 R .128 (If the character is not needed then hit the)5.128 F F2(x)2.628 E F0 -.1 (ke)2.628 G .127(y; this deletes the character from the \214le.)-.05 F (It)5.127 E(is analogous to the w)72 213.6 Q(ay you)-.1 E F2(x)2.5 E F0 (out characters when you mak)2.5 E 2.5(em)-.1 G(istak)-2.5 E (es on a type)-.1 E(writer \(e)-.25 E(xcept it')-.15 E 2.5(sn)-.55 G (ot as messy\).)-2.5 E .058(If the character is incorrect, you can repl\ ace it with the correct character by gi)97 229.2 R .059 (ving the command)-.25 F F2(r)2.559 E/F3 10/Times-Italic@0 SF(c)A F0 2.559(,w)C(here)-2.559 E F3(c)2.559 E F0(is)2.559 E .884 (replaced by the correct character)72 241.2 R 5.884(.F)-.55 G .884(inal\ ly if the character which is incorrect should be replaced by more than \ one)-5.884 F(character)72 253.2 Q 3.113(,g)-.4 G -2.15 -.25(iv e)-3.113 H .614(the command)3.363 F F2(s)3.114 E F0 .614 (which substitutes a string of characters, ending with)3.114 F F1(ESC) 3.114 E F0 3.114(,f)C .614(or it.)-3.114 F .614(If there are a small) 5.614 F .727(number of characters which are wrong you can precede)72 265.2 R F2(s)3.227 E F0 .727 (with a count of the number of characters to be replaced.)3.227 F (Counts are also useful with)72 277.2 Q F2(x)2.5 E F0 (to specify the number of characters to be deleted.)2.5 E F2 2.5 (3.3. Mor)72 301.2 R 2.5(ec)-.18 G(orr)-2.5 E(ections: operators)-.18 E F0 -1.1(Yo)97 316.8 S 3.035(ua)1.1 G .535(lready kno)-3.035 F 3.035(wa) -.25 G .535(lmost enough to mak)-3.035 F 3.035(ec)-.1 G .535 (hanges at a higher le)-3.035 F -.15(ve)-.25 G 3.035(l. All).15 F .535 (you need to kno)3.035 F 3.036(wn)-.25 G 1.036 -.25(ow i)-3.036 H 3.036 (st).25 G .536(hat the)-3.036 F F2(d)3.036 E F0 -.1(ke)72 328.8 S 3.602 (ya)-.05 G 1.102(cts as a delete operator)-3.602 F 6.102(.T)-.55 G 1.102 (ry the command)-6.452 F F2 -.15(dw)3.602 G F0 1.102(to delete a w)3.752 F 3.602(ord. T)-.1 F 1.102(ry hitting)-.35 F F2(.)3.602 E F0 3.602(af) 3.602 G 1.601 -.25(ew t)-3.602 H 3.601(imes. Notice).25 F 1.101 (that this)3.601 F .272(repeats the ef)72 340.8 R .272(fect of the)-.25 F F2 -.15(dw)2.772 G F0 5.272(.T).15 G .272(he command)-5.272 F F2(.) 2.772 E F0 .273(repeats the last command which made a change.)2.772 F -1.1(Yo)5.273 G 2.773(uc)1.1 G .273(an remember it)-2.773 F (by analogy with an ellipsis `)72 352.8 Q F2(...)A F0('.)A(No)97 368.4 Q 3.063(wt)-.25 G(ry)-3.063 E F2(db)3.063 E F0 5.563(.T)C .563 (his deletes a w)-5.563 F .563(ord backw)-.1 F .563 (ards, namely the preceding w)-.1 F 3.063(ord. T)-.1 F(ry)-.35 E F2(d) 3.063 E F1(SP)A -.32(AC)-.736 G(E).32 E F0 5.563(.T)C .563 (his deletes a single)-5.563 F(character)72 380.4 Q 2.5(,a)-.4 G (nd is equi)-2.5 E -.25(va)-.25 G(lent to the).25 E F2(x)2.5 E F0 (command.)2.5 E .724(Another v)97 396 R .724(ery useful operator is)-.15 F F2(c)3.224 E F0 .724(or change.)3.224 F .724(The command)5.724 F F2 (cw)3.224 E F0 .724(thus changes the te)3.224 F .725(xt of a single w) -.15 F 3.225(ord. Y)-.1 F(ou)-1.1 E(follo)72 408 Q 3.419(wi)-.25 G 3.419 (tb)-3.419 G 3.419(yt)-3.419 G .919(he replacement te)-3.419 F .919 (xt ending with an)-.15 F F1(ESC)3.419 E F0 5.919(.F)C .918(ind a w) -5.919 F .918(ord which you can change to another)-.1 F 3.418(,a)-.4 G .918(nd try this)-3.418 F(no)72 420 Q 4.027 -.65(w. N)-.25 H .227 (otice that the end of the te).65 F .227(xt to be changed w)-.15 F .227 (as mark)-.1 F .228 (ed with the character `$' so that you can see this as you)-.1 F (are typing in the ne)72 432 Q 2.5(wm)-.25 G(aterial.)-2.5 E F2 2.5 (3.4. Operating)72 462 R(on lines)2.5 E F0 .251 (It is often the case that you w)97 477.6 R .251 (ant to operate on lines.)-.1 F .251(Find a line which you w)5.251 F .251(ant to delete, and type)-.1 F F2(dd)2.75 E F0 2.75(,t)C(he)-2.75 E F2(d)2.75 E F0 .884(operator twice.)72 489.6 R .884 (This will delete the line.)5.884 F .885(If you are on a dumb terminal,\ the editor may just erase the line on the)5.884 F .336 (screen, replacing it with a line with only an @ on it.)72 501.6 R .336 (This line does not correspond to an)5.336 F 2.836(yl)-.15 G .335 (ine in your \214le, b)-2.836 F .335(ut only)-.2 F .226 (acts as a place holder)72 513.6 R 5.226(.I)-.55 G 2.726(th)-5.226 G .226(elps to a)-2.726 F -.2(vo)-.2 G .226(id a length).2 F 2.726(yr)-.05 G(edra)-2.726 E 2.726(wo)-.15 G 2.726(ft)-2.726 G .226 (he rest of the screen which w)-2.726 F .226(ould be necessary to close) -.1 F(up the hole created by the deletion on a terminal without a delet\ e line capability)72 525.6 Q(.)-.65 E -.35(Tr)97 541.2 S 3.24(yr).35 G .74(epeating the)-3.24 F F2(c)3.24 E F0 .739 (operator twice; this will change a whole line, erasing its pre)3.24 F .739(vious contents and replacing)-.25 F(them with te)72 553.2 Q (xt you type up to an)-.15 E F1(ESC)2.5 E F0<2e87>A -1.1(Yo)97 568.8 S 2.993(uc)1.1 G .493 (an delete or change more than one line by preceding the)-2.993 F F2(dd) 2.993 E F0(or)2.993 E F2(cc)2.993 E F0 .492(with a count, i.e.)2.993 F F2(5dd)2.992 E F0 .492(deletes 5 lines.)2.992 F -1.1(Yo)72 580.8 S 2.663 (uc)1.1 G .163(an also gi)-2.663 F .463 -.15(ve a c)-.25 H .163 (ommand lik).15 F(e)-.1 E F2(dL)2.663 E F0 .163(to delete all the lines\ up to and including the last line on the screen, or)2.663 F F2(d3L) 2.664 E F0(to)2.664 E .742 (delete through the third from the bottom line.)72 592.8 R -.35(Tr)5.742 G 3.242(ys).35 G .742(ome commands lik)-3.242 F 3.242(et)-.1 G .742 (his no)-3.242 F -.65(w.)-.25 G 5.742(*N).65 G .742 (otice that the editor lets you)-5.742 F(kno)72 604.8 Q 3.299(ww)-.25 G .799(hen you change a lar)-3.299 F .798 (ge number of lines so that you can see the e)-.18 F .798 (xtent of the change.)-.15 F .798(The editor will also)5.798 F(al)72 616.8 Q -.1(wa)-.1 G(ys tell you when a change you mak).1 E 2.5(ea)-.1 G -.25(ff)-2.5 G(ects te).25 E(xt which you cannot see.)-.15 E F2 2.5 (3.5. Undoing)72 640.8 R F0(No)97 656.4 Q 2.922(ws)-.25 G .422 (uppose that the last change which you made w)-2.922 F .422 (as incorrect; you could use the insert, delete and append)-.1 F .819 (commands to put the correct material back.)72 668.4 R(Ho)5.819 E(we) -.25 E -.15(ve)-.25 G 1.619 -.4(r, s).15 H .819 (ince it is often the case that we re).4 F .819(gret a change or mak) -.15 F 3.319(ea)-.1 G .595(change incorrectly)72 680.4 R 3.095(,t)-.65 G .595(he editor pro)-3.095 F .595(vides a)-.15 F F2(u)3.095 E F0 .595 (\(undo\) command to re)3.095 F -.15(ve)-.25 G .595 (rse the last change which you made.).15 F -.35(Tr)5.596 G 3.096(yt).35 G .596(his a)-3.096 F .32 LW 144 688.4 72 688.4 DL F1 2.112<8754>72 698.4 S .112(he command)-2.112 F/F4 8/Times-Bold@0 SF(S)2.112 E F1 .112 (is a con)2.112 F -.12(ve)-.32 G .113(nient synon).12 F .113(ym for for) -.12 F F4(cc)2.113 E F1 2.113(,b)C 2.113(ya)-2.113 G .113(nalogy with) -2.113 F F4(s)2.113 E F1 4.113(.T)C .113(hink of)-4.113 F F4(S)2.113 E F1 .113(as a substitute on lines, while)2.113 F F4(s)2.113 E F1 .113 (is a substitute on characters.)2.113 F 2.641(*O)72 710.2 S .641 (ne subtle point here in)-2.641 F -.16(vo)-.32 G(lv).16 E .641 (es using the)-.12 F F4(/)2.641 E F1 .641(search after a)2.641 F F4(d) 2.641 E F1 4.641(.T)C .641(his will normally delete characters from the\ current position to the point of the)-4.641 F 2(match. If)72 720.2 R (what is desired is to delete whole lines including the tw)2 E 2(op)-.08 G(oints, gi)-2 E .24 -.12(ve t)-.2 H(he pattern as).12 E F4(/pat/+0)2 E F1 2(,al)C(ine address.)-2 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 252.21(USD:11-8 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E(fe)72 84 Q 2.5(wt) -.25 G(imes, and gi)-2.5 E .3 -.15(ve i)-.25 H 2.5(tt).15 G (wice in a ro)-2.5 E 2.5(wt)-.25 G 2.5(on)-2.5 G(otice that an)-2.5 E/F1 10/Times-Bold@0 SF(u)2.5 E F0(also undoes a)2.5 E F1(u.)2.5 E F0 .166 (The undo command lets you re)97 99.6 R -.15(ve)-.25 G .166 (rse only a single change.).15 F .165(After you mak)5.166 F 2.665(ean) -.1 G .165(umber of changes to a line, you)-2.665 F .399 (may decide that you w)72 111.6 R .399(ould rather ha)-.1 F .699 -.15 (ve t)-.2 H .399(he original state of the line back.).15 F(The)5.4 E F1 (U)2.9 E F0 .4(command restores the current line)2.9 F (to the state before you started changing it.)72 123.6 Q -1.1(Yo)97 139.2 S 3.058(uc)1.1 G .558(an reco)-3.058 F -.15(ve)-.15 G 3.058(rt).15 G -.15(ex)-3.058 G 3.058(tw).15 G .558(hich you delete, e)-3.058 F -.15 (ve)-.25 G 3.058(ni).15 G 3.058(fu)-3.058 G .558 (ndo will not bring it back; see the section on reco)-3.058 F -.15(ve) -.15 G .558(ring lost).15 F(te)72 151.2 Q(xt belo)-.15 E -.65(w.)-.25 G F1 2.5(3.6. Summary)72 175.2 R/F2 8/Times-Roman@0 SF(SP)97 196.8 Q -.32 (AC)-.736 G(E).32 E F0(adv)32.16 E(ance the cursor one position)-.25 E F1(^H)97 208.8 Q F0(backspace the cursor)44.89 E F1(^W)97 220.8 Q F0 (erase a w)42.67 E(ord during an insert)-.1 E 32.96(erase your)97 232.8 R(erase \(usually ^H or #\), erases a character during an insert)2.5 E 40.16(kill your)97 244.8 R (kill \(usually @, ^X, or ^U\), kills the insert on this line)2.5 E F1 (.)97 256.8 Q F0(repeats the changing command)53.5 E F1(O)97 268.8 Q F0 (opens and inputs ne)48.22 E 2.5(wl)-.25 G(ines, abo)-2.5 E .3 -.15 (ve t)-.15 H(he current).15 E F1(U)97 280.8 Q F0 (undoes the changes you made to the current line)48.78 E F1(a)97 292.8 Q F0(appends te)51 E(xt after the cursor)-.15 E F1(c)97 304.8 Q F0 (changes the object you specify to the follo)51.56 E(wing te)-.25 E(xt) -.15 E F1(d)97 316.8 Q F0(deletes the object you specify)50.44 E F1(i)97 328.8 Q F0(inserts te)53.22 E(xt before the cursor)-.15 E F1(o)97 340.8 Q F0(opens and inputs ne)51 E 2.5(wl)-.25 G(ines, belo)-2.5 E 2.5(wt) -.25 G(he current)-2.5 E F1(u)97 352.8 Q F0(undoes the last change)50.44 E F1 2.5(4. Mo)72 382.8 R(ving about; r)-.1 E (earranging and duplicating text)-.18 E 2.5(4.1. Lo)72 406.8 R 2.5(wl) -.1 G -2.3 -.15(ev e)-2.5 H 2.5(lc).15 G(haracter motions)-2.5 E F0(No) 97 422.4 Q 2.587(wm)-.25 G .387 -.15(ove t)-2.587 H .087 (he cursor to a line where there is a punctuation or a brack).15 F .087 (eting character such as a parenthesis or a)-.1 F .902(comma or period.) 72 434.4 R -.35(Tr)5.902 G 3.402(yt).35 G .902(he command)-3.402 F F1(f) 3.402 E/F3 10/Times-Italic@0 SF(x)A F0(where)3.402 E F3(x)3.402 E F0 .902(is this character)3.402 F 5.902(.T)-.55 G .902 (his command \214nds the ne)-5.902 F(xt)-.15 E F3(x)3.402 E F0 .902 (character to the)3.402 F .579(right of the cursor in the current line.) 72 446.4 R -.35(Tr)5.579 G 3.079(yt).35 G .579(hen hitting a)-3.079 F F1 (;)3.079 E F0 3.079(,w)C .579(hich \214nds the ne)-3.079 F .579 (xt instance of the same character)-.15 F 5.58(.B)-.55 G(y)-5.58 E .018 (using the)72 458.4 R F1(f)2.518 E F0 .018 (command and then a sequence of)2.518 F F1(;)2.518 E F0 1.118 -.55('s y) D .017(ou can often get to a particular place in a line much f).55 F .017(aster than with)-.1 F 3.11(as)72 470.4 S .61(equence of w)-3.11 F .61(ord motions or)-.1 F F2(SP)3.11 E -.32(AC)-.736 G(E).32 E F0 3.11 (s. There)B .61(is also a)3.11 F F1(F)3.11 E F0 .61 (command, which is lik)3.11 F(e)-.1 E F1(f)3.11 E F0 3.11(,b)C .61 (ut searches backw)-3.31 F 3.11(ard. The)-.1 F F1(;)3.11 E F0 (command repeats)72 482.4 Q F1(F)2.5 E F0(also.)2.5 E 1.153 (When you are operating on the te)97 498 R 1.153(xt in a line it is oft\ en desirable to deal with the characters up to, b)-.15 F 1.152(ut not) -.2 F .441(including, the \214rst instance of a character)72 510 R 5.441 (.T)-.55 G(ry)-5.791 E F1(df)2.941 E F3(x)A F0 .441(for some)2.941 F F3 (x)2.941 E F0(no)2.941 E 2.941(wa)-.25 G .441(nd notice that the)-2.941 F F3(x)2.941 E F0 .441(character is deleted.)2.941 F(Undo)5.441 E .507 (this with)72 522 R F1(u)3.007 E F0 .507(and then try)3.007 F F1(dt) 3.007 E F3(x)A F0 5.507(;t)C(he)-5.507 E F1(t)3.007 E F0 .506 (here stands for to, i.e.)3.006 F .506(delete up to the ne)5.506 F(xt) -.15 E F3(x)3.006 E F0 3.006(,b)C .506(ut not the)-3.206 F F3(x)3.006 E F0 5.506(.T)C .506(he command)-5.506 F F1(T)3.006 E F0(is)3.006 E (the re)72 534 Q -.15(ve)-.25 G(rse of).15 E F1(t)2.5 E F0(.)A .372 (When w)97 549.6 R .372(orking with the te)-.1 F .373 (xt of a single line, an)-.15 F/F4 10/Symbol SF2.873 E F0(mo)2.873 E -.15(ve)-.15 G 2.873(st).15 G .373 (he cursor to the \214rst non-white position on the line,)-2.873 F (and a)72 561.6 Q F1($)2.5 E F0(mo)2.5 E -.15(ve)-.15 G 2.5(si).15 G 2.5 (tt)-2.5 G 2.5(ot)-2.5 G(he end of the line.)-2.5 E(Thus)5 E F1($a)2.5 E F0(will append ne)2.5 E 2.5(wt)-.25 G -.15(ex)-2.5 G 2.5(ta).15 G 2.5 (tt)-2.5 G(he end of the current line.)-2.5 E -1.1(Yo)97 577.2 S .172 (ur \214le may ha)1.1 F .471 -.15(ve t)-.2 H .171(ab \().15 F F1(^I)A F0 2.671(\)c)C .171(haracters in it.)-2.671 F .171 (These characters are represented as a number of spaces e)5.171 F (xpanding)-.15 E .877(to a tab stop, where tab stops are e)72 589.2 R -.15(ve)-.25 G .877(ry 8 positions.*).15 F .877 (When the cursor is at a tab, it sits on the last of the se)5.877 F -.15 (ve)-.25 G(ral).15 E(spaces which represent that tab)72 601.2 Q 5(.T)-.4 G(ry mo)-5.35 E(ving the cursor back and forth o)-.15 E -.15(ve)-.15 G 2.5(rt).15 G(abs so you understand ho)-2.5 E 2.5(wt)-.25 G(his w)-2.5 E (orks.)-.1 E .203(On rare occasions, your \214le may ha)97 616.8 R .503 -.15(ve n)-.2 H .204(onprinting characters in it.).15 F .204 (These characters are displayed in the same)5.204 F -.1(wa)72 628.8 S 3.049(yt).1 G(he)-3.049 E 3.049(ya)-.15 G .549 (re represented in this document, that is with a tw)-3.049 F 3.049(oc) -.1 G .548(haracter code, the \214rst character of which is `^'.)-3.049 F(On)5.548 E .548(the screen non-printing characters resemble a `^' cha\ racter adjacent to another)72 640.8 R 3.048(,b)-.4 G .548 (ut spacing or backspacing o)-3.248 F -.15(ve)-.15 G 3.049(rt).15 G(he) -3.049 E(character will re)72 652.8 Q -.15(ve)-.25 G(al that the tw).15 E 2.5(oc)-.1 G(haracters are, lik)-2.5 E 2.5(et)-.1 G (he spaces representing a tab character)-2.5 E 2.5(,as)-.4 G (ingle character)-2.5 E(.)-.55 E .873(The editor sometimes discards con\ trol characters, depending on the character and the setting of the)97 668.4 R F3(beautify)3.372 E F0 .637 (option, if you attempt to insert them in your \214le.)72 680.4 R -1.1 (Yo)5.637 G 3.137(uc)1.1 G .637 (an get a control character in the \214le by be)-3.137 F .638 (ginning an insert)-.15 F .754(and then typing a)72 692.4 R F1(^V)3.253 E F0 .753(before the control character)3.253 F 5.753(.T)-.55 G(he)-5.753 E F1(^V)3.253 E F0 .753(quotes the follo)3.253 F .753(wing character) -.25 F 3.253(,c)-.4 G .753(ausing it to be inserted)-3.253 F .32 LW 144 700.4 72 700.4 DL F2 2.121(*T)72 710.4 S .121 (his is settable by a command of the form)-2.121 F/F5 8/Times-Bold@0 SF .121(:se ts=)2.121 F/F6 8/Times-Italic@0 SF(x)A/F7 6/Times-Roman@0 SF (CR)A F2 2.121(,w)C(here)-2.121 E F6(x)2.121 E F2 .121 (is 4 to set tabstops e)2.121 F -.12(ve)-.2 G .121(ry four columns.).12 F .121(This has ef)4.121 F .121(fect on the screen representa-)-.2 F (tion within the editor)72 720.4 Q(.)-.44 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 254.71(iU)-.6 G(SD:11-9)-254.71 E(directly into the \214le.)72 84 Q/F1 10/Times-Bold@0 SF 2.5(4.2. Higher)72 111.6 R(le)2.5 E -.1(ve)-.15 G 2.5 (lt).1 G(ext objects)-2.5 E F0 .435(In w)97 127.2 R .436 (orking with a document it is often adv)-.1 F .436(antageous to w)-.25 F .436(ork in terms of sentences, paragraphs, and sections.)-.1 F .16 (The operations)72 139.2 R F1(\()2.66 E F0(and)2.66 E F1(\))2.66 E F0 (mo)2.66 E .46 -.15(ve t)-.15 H 2.66(ot).15 G .16(he be)-2.66 F .159 (ginning of the pre)-.15 F .159(vious and ne)-.25 F .159 (xt sentences respecti)-.15 F -.15(ve)-.25 G(ly).15 E 5.159(.T)-.65 G .159(hus the command)-5.159 F F1(d\))2.659 E F0 .011 (will delete the rest of the current sentence; lik)72 151.2 R -.25(ew) -.1 G(ise).25 E F1(d\()2.511 E F0 .011(will delete the pre)2.511 F .011 (vious sentence if you are at the be)-.25 F .011(ginning of)-.15 F .541 (the current sentence, or the current sentence up to where you are if y\ ou are not at the be)72 163.2 R .54(ginning of the current sen-)-.15 F (tence.)72 175.2 Q 2.921(As)97 190.8 S .421 (entence is de\214ned to end at a `.)-2.921 F .422 (', `!' or `?' which is follo)-.7 F .422 (wed by either the end of a line, or by tw)-.25 F 2.922(os)-.1 G(paces.) -2.922 E(An)72 202.8 Q 3.163(yn)-.15 G .662(umber of closing `\)', `]',\ `"' and `\264' characters may appear after the `.)-3.163 F .662 (', `!' or `?' before the spaces or end of)-.7 F(line.)72 214.8 Q (The operations)97 230.4 Q F1({)2.5 E F0(and)2.5 E F1(})2.5 E F0(mo)2.5 E .3 -.15(ve ove)-.15 H 2.5(rp).15 G(aragraphs and the operations)-2.5 E F1([[)2.5 E F0(and)2.5 E F1(]])2.5 E F0(mo)2.5 E .3 -.15(ve ove)-.15 H 2.5(rs).15 G(ections.\207)-2.5 E 2.692(Ap)97 246 S .192(aragraph be) -2.692 F .191(gins after each empty line, and also at each of a set of \ paragraph macros, speci\214ed by the pairs)-.15 F .395 (of characters in the de\214nition of the string v)72 258 R .396 (alued option)-.25 F/F2 10/Times-Italic@0 SF(par)2.896 E -.1(ag)-.15 G -.15(ra).1 G(phs).15 E F0 5.396(.T)C .396(he def)-5.396 F .396 (ault setting for this option de\214nes the)-.1 F .096 (paragraph macros of the)72 270 R F2(\255ms)2.597 E F0(and)2.597 E F2 (\255mm)2.597 E F0 .097(macro packages, i.e. the `.IP', `.LP', `.PP' an\ d `.QP', `.P' and `.LI' macros.\210)2.597 F .47 (Each paragraph boundary is also a sentence boundary)72 282 R 5.469(.T) -.65 G .469(he sentence and paragraph commands can be gi)-5.469 F -.15 (ve)-.25 G 2.969(nc).15 G(ounts)-2.969 E(to operate o)72 294 Q -.15(ve) -.15 G 2.5(rg).15 G(roups of sentences and paragraphs.)-2.5 E .925 (Sections in the editor be)97 309.6 R .925(gin after each macro in the) -.15 F F2(sections)3.425 E F0 .926 (option, normally `.NH', `.SH', `.H' and `.HU',)3.425 F .492 (and each line with a formfeed)72 321.6 R F1(^L)2.992 E F0 .492 (in the \214rst column.)2.992 F .491(Section boundaries are al)5.492 F -.1(wa)-.1 G .491(ys line and paragraph boundaries).1 F(also.)72 333.6 Q -.35(Tr)97 349.2 S 2.777(ye).35 G .278(xperimenting with the sentence a\ nd paragraph commands until you are sure ho)-2.927 F 2.778(wt)-.25 G(he) -2.778 E 2.778(yw)-.15 G 2.778(ork. If)-2.878 F .278(you ha)2.778 F -.15 (ve)-.2 G 2.998(al)72 361.2 S(ar)-2.998 E .498 (ge document, try looking through it using the section commands.)-.18 F .497(The section commands interpret a preceding)5.497 F .331 (count as a dif)72 373.2 R .331(ferent windo)-.25 F 2.832(ws)-.25 G .332 (ize in which to redra)-2.832 F 2.832(wt)-.15 G .332 (he screen at the ne)-2.832 F 2.832(wl)-.25 G .332 (ocation, and this windo)-2.832 F 2.832(ws)-.25 G .332(ize is the base) -2.832 F .554(size for ne)72 385.2 R .554(wly dra)-.25 F .554(wn windo) -.15 F .554(ws until another size is speci\214ed.)-.25 F .553(This is v) 5.553 F .553(ery useful if you are on a slo)-.15 F 3.053(wt)-.25 G .553 (erminal and)-3.053 F .563(are looking for a particular section.)72 397.2 R -1.1(Yo)5.563 G 3.063(uc)1.1 G .563(an gi)-3.063 F .863 -.15 (ve t)-.25 H .563 (he \214rst section command a small count to then see each succes-).15 F (si)72 409.2 Q .3 -.15(ve s)-.25 H(ection heading in a small windo).15 E -.65(w.)-.25 G F1 2.5(4.3. Rearranging)72 433.2 R(and duplicating text) 2.5 E F0 1.257(The editor has a single unnamed b)97 448.8 R(uf)-.2 E 1.257(fer where the last deleted or changed a)-.25 F -.1(wa)-.15 G 3.757 (yt).1 G -.15(ex)-3.757 G 3.757(ti).15 G 3.757(ss)-3.757 G -2.25 -.2 (av e)-3.757 H 1.257(d, and a set of).2 F(named b)72 460.8 Q(uf)-.2 E (fers)-.25 E F1(a)2.5 E F0A F1(z)A F0(which you can use to sa)2.5 E .3 -.15(ve c)-.2 H(opies of te).15 E(xt and to mo)-.15 E .3 -.15(ve t) -.15 H -.15(ex).15 G 2.5(ta).15 G (round in your \214le and between \214les.)-2.5 E 1.121(The operator)97 476.4 R F1(y)3.621 E F0 1.121(yanks a cop)3.621 F 3.621(yo)-.1 G 3.621 (ft)-3.621 G 1.121(he object which follo)-3.621 F 1.121 (ws into the unnamed b)-.25 F(uf)-.2 E(fer)-.25 E 6.121(.I)-.55 G 3.621 (fp)-6.121 G 1.121(receded by a b)-3.621 F(uf)-.2 E(fer)-.25 E(name,)72 488.4 Q F1(")2.876 E F2(x)A F1(y)1.666 E F0 2.876(,w)C(here)-2.876 E F2 (x)2.876 E F0 .375(here is replaced by a letter)2.876 F F1(a\255z)2.875 E F0 2.875(,i)C 2.875(tp)-2.875 G .375(laces the te)-2.875 F .375 (xt in the named b)-.15 F(uf)-.2 E(fer)-.25 E 5.375(.T)-.55 G .375 (he te)-5.375 F .375(xt can then be put)-.15 F .227 (back in the \214le with the commands)72 500.4 R F1(p)2.727 E F0(and) 2.727 E F1 .227(P; p)2.727 F F0 .227(puts the te)2.727 F .227 (xt after or belo)-.15 F 2.727(wt)-.25 G .227(he cursor)-2.727 F 2.727 (,w)-.4 G(hile)-2.727 E F1(P)2.727 E F0 .228(puts the te)2.728 F .228 (xt before or)-.15 F(abo)72 512.4 Q .3 -.15(ve t)-.15 H(he cursor).15 E (.)-.55 E .19(If the te)97 528 R .189(xt which you yank forms a part of\ a line, or is an object such as a sentence which partially spans more) -.15 F 1.107(than one line, then when you put the te)72 540 R 1.108 (xt back, it will be placed after the cursor \(or before if you use)-.15 F F1(P)3.608 E F0 3.608(\). If)B(the)3.608 E(yank)72 552 Q .354(ed te) -.1 F .354(xt forms whole lines, the)-.15 F 2.854(yw)-.15 G .353 (ill be put back as whole lines, without changing the current line.) -2.854 F .353(In this case,)5.353 F(the put acts much lik)72 564 Q 2.5 (ea)-.1 G F1(o)A F0(or)2.5 E F1(O)2.5 E F0(command.)2.5 E -.35(Tr)97 579.6 S 3.555(yt).35 G 1.055(he command)-3.555 F F1(YP)3.555 E F0 6.055 (.T)C 1.055(his mak)-6.055 F 1.055(es a cop)-.1 F 3.555(yo)-.1 G 3.555 (ft)-3.555 G 1.056(he current line and lea)-3.555 F -.15(ve)-.2 G 3.556 (sy).15 G 1.056(ou on this cop)-3.556 F 2.356 -.65(y, w)-.1 H 1.056 (hich is placed).65 F .839(before the current line.)72 591.6 R .839 (The command)5.839 F F1(Y)3.339 E F0 .839(is a con)3.339 F -.15(ve)-.4 G .838(nient abbre).15 F .838(viation for)-.25 F F1(yy)3.338 E F0 5.838 (.T)C .838(he command)-5.838 F F1(Yp)3.338 E F0 .838(will also mak)3.338 F 3.338(ea)-.1 G(cop)72 603.6 Q 2.903(yo)-.1 G 2.903(ft)-2.903 G .404 (he current line, and place it after the current line.)-2.903 F -1.1(Yo) 5.404 G 2.904(uc)1.1 G .404(an gi)-2.904 F -.15(ve)-.25 G F1(Y)3.054 E F0 2.904(ac)2.904 G .404(ount of lines to yank, and thus dupli-)-2.904 F (cate se)72 615.6 Q -.15(ve)-.25 G(ral lines; try).15 E F1(3YP)2.5 E F0 (.)A 1.835 -.8(To m)97 631.2 T .535 -.15(ove t).8 H -.15(ex).15 G 2.735 (tw).15 G .235(ithin the b)-2.735 F(uf)-.2 E(fer)-.25 E 2.735(,y)-.4 G .235(ou need to delete it in one place, and put it back in another) -2.735 F 5.235(.Y)-.55 G .235(ou can precede)-6.335 F 3.624(ad)72 643.2 S 1.124(elete operation by the name of a b)-3.624 F(uf)-.2 E 1.124 (fer in which the te)-.25 F 1.125(xt is to be stored as in)-.15 F F1 ("a5dd)3.625 E F0 1.125(deleting 5 lines into the)3.625 F .061(named b) 72 655.2 R(uf)-.2 E(fer)-.25 E F2(a)2.561 E F0 5.061(.Y)C .061 (ou can then mo)-6.161 F .361 -.15(ve t)-.15 H .061(he cursor to the e) .15 F -.15(ve)-.25 G .061 (ntual resting place of the these lines and do a).15 F F1("ap)2.56 E F0 (or)2.56 E F1("aP)2.56 E F0(to)2.56 E .458(put them back.)72 667.2 R .458(In f)5.458 F .459(act, you can switch and edit another \214le befo\ re you put the lines back, by gi)-.1 F .459(ving a command of)-.25 F 1.151(the form)72 679.2 R F1(:e)3.651 E F2(name)3.651 E/F3 8 /Times-Roman@0 SF(CR)A F0(where)3.651 E F2(name)3.651 E F0 1.15 (is the name of the other \214le you w)3.651 F 1.15(ant to edit.)-.1 F -1.1(Yo)6.15 G 3.65(uw)1.1 G 1.15(ill ha)-3.65 F 1.45 -.15(ve t)-.2 H 3.65(ow).15 G 1.15(rite back the)-3.65 F .32 LW 144 687.2 72 687.2 DL F3 2.175<8754>72 697.2 S(he)-2.175 E/F4 8/Times-Bold@0 SF([[)2.175 E F3 (and)2.175 E F4(]])2.175 E F3 .176 (operations require the operation character to be doubled because the) 2.175 F 2.176(yc)-.12 G .176(an mo)-2.176 F .416 -.12(ve t)-.12 H .176 (he cursor f).12 F .176(ar from where it currently is.)-.08 F .176 (While it)4.176 F(is easy to get back with the command)72 707.2 Q F4 <9292>2 E F3 2(,t)C(hese commands w)-2 E (ould still be frustrating if the)-.08 E 2(yw)-.12 G (ere easy to hit accidentally)-2 E(.)-.52 E 2.127<8859>72 719 S .127 (ou can easily change or e)-3.007 F .127 (xtend this set of macros by assigning a dif)-.12 F .126 (ferent string to the)-.2 F/F5 8/Times-Italic@0 SF(par)2.126 E -.08(ag) -.12 G -.12(ra).08 G(phs).12 E F3 .126(option in your EXINIT)2.126 F 4.126(.S)-.592 G .126(ee section 6.2 for)-4.126 F 2(details. The)72 729 R(`.bp' directi)2 E .24 -.12(ve i)-.2 H 2(sa).12 G (lso considered to start a paragraph.)-2 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-10 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E .167 (contents of the current editor b)72 84 R(uf)-.2 E .167 (fer \(or discard them\) if you ha)-.25 F .468 -.15(ve m)-.2 H .168 (ade changes before the editor will let you switch).15 F .04 (to the other \214le.)72 96 R .04(An ordinary delete command sa)5.04 F -.15(ve)-.2 G 2.54(st).15 G .04(he te)-2.54 F .04(xt in the unnamed b) -.15 F(uf)-.2 E(fer)-.25 E 2.54(,s)-.4 G 2.54(ot)-2.54 G .04 (hat an ordinary put can mo)-2.54 F -.15(ve)-.15 G .68(it else)72 108 R 3.18(where. Ho)-.25 F(we)-.25 E -.15(ve)-.25 G 1.48 -.4(r, t).15 H .68 (he unnamed b).4 F(uf)-.2 E .68 (fer is lost when you change \214les, so to mo)-.25 F .981 -.15(ve t) -.15 H -.15(ex).15 G 3.181(tf).15 G .681(rom one \214le to another) -3.181 F(you should use an unnamed b)72 120 Q(uf)-.2 E(fer)-.25 E(.)-.55 E/F1 10/Times-Bold@0 SF 2.5(4.4. Summary)72 144 R(.)-.7 E/F2 10/Symbol SF97 165.6 Q F0(\214rst non-white on line)49.97 E F1($)97 177.6 Q F0 (end of line)51 E F1(\))97 189.6 Q F0(forw)52.67 E(ard sentence)-.1 E F1 (})97 201.6 Q F0(forw)52.06 E(ard paragraph)-.1 E F1(]])97 213.6 Q F0 (forw)49.34 E(ard section)-.1 E F1(\()97 225.6 Q F0(backw)52.67 E (ard sentence)-.1 E F1({)97 237.6 Q F0(backw)52.06 E(ard paragraph)-.1 E F1([[)97 249.6 Q F0(backw)49.34 E(ard section)-.1 E F1(f)97 261.6 Q/F3 10/Times-Italic@0 SF(x)A F0(\214nd)48.23 E F3(x)2.5 E F0(forw)2.5 E (ard in line)-.1 E F1(p)97 273.6 Q F0(put te)50.44 E (xt back, after cursor or belo)-.15 E 2.5(wc)-.25 G(urrent line)-2.5 E F1(y)97 285.6 Q F0(yank operator)51 E 2.5(,f)-.4 G(or copies and mo)-2.5 E -.15(ve)-.15 G(s).15 E F1(t)97 297.6 Q F3(x)A F0(up to)48.23 E F3(x) 2.5 E F0(forw)2.5 E(ard, for operators)-.1 E F1(F)97 309.6 Q F3(x)A F0 2.5(fb)45.45 G(ackw)-2.5 E(ard in line)-.1 E F1(P)97 321.6 Q F0(put te) 49.89 E(xt back, before cursor or abo)-.15 E .3 -.15(ve c)-.15 H (urrent line).15 E F1(T)97 333.6 Q F3(x)A F0 2.5(tb)44.89 G(ackw)-2.5 E (ard in line)-.1 E F1 2.5(5. High)72 363.6 R(le)2.5 E -.1(ve)-.15 G 2.5 (lc).1 G(ommands)-2.5 E 2.5(5.1. Writing,)72 387.6 R (quitting, editing new \214les)2.5 E F0 .355(So f)97 403.2 R .355 (ar we ha)-.1 F .655 -.15(ve s)-.2 H .355(een ho).15 F 2.855(wt)-.25 G 2.855(oe)-2.855 G(nter)-2.855 E F3(vi)2.855 E F0 .355 (and to write out our \214le using either)2.855 F F1(ZZ)2.855 E F0(or) 2.855 E F1(:w)2.855 E/F4 8/Times-Roman@0 SF(CR)A F0 2.855(.T)C .355 (he \214rst e)-2.855 F .354(xits from the)-.15 F(editor)72 415.2 Q 2.5 (,\()-.4 G(writing if changes were made\), the second writes and stays \ in the editor)-2.5 E(.)-.55 E 1.134(If you ha)97 430.8 R 1.434 -.15 (ve c)-.2 H 1.134(hanged the editor').15 F 3.634(sc)-.55 G(op)-3.634 E 3.634(yo)-.1 G 3.634(ft)-3.634 G 1.134(he \214le b)-3.634 F 1.135 (ut do not wish to sa)-.2 F 1.435 -.15(ve y)-.2 H 1.135 (our changes, either because you).15 F .709 (messed up the \214le or decided that the changes are not an impro)72 442.8 R -.15(ve)-.15 G .708(ment to the \214le, then you can gi).15 F 1.008 -.15(ve t)-.25 H .708(he command).15 F F1(:q!)72 454.8 Q F4(CR)A F0 .201(to quit from the editor without writing the changes.)2.701 F -1.1(Yo)5.201 G 2.701(uc)1.1 G .202 (an also reedit the same \214le \(starting o)-2.701 F -.15(ve)-.15 G .202(r\) by gi).15 F(ving)-.25 E .512(the command)72 466.8 R F1(:e!) 3.012 E F4(CR)A F0 5.512(.T)C .512 (hese commands should be used only rarely)-5.512 F 3.012(,a)-.65 G .512 (nd with caution, as it is not possible to reco)-3.012 F -.15(ve)-.15 G (r).15 E(the changes you ha)72 478.8 Q .3 -.15(ve m)-.2 H (ade after you discard them in this manner).15 E(.)-.55 E -1.1(Yo)97 494.4 S 3.539(uc)1.1 G 1.039(an edit a dif)-3.539 F 1.039 (ferent \214le without lea)-.25 F 1.039(ving the editor by gi)-.2 F 1.039(ving the command)-.25 F F1(:e)3.54 E F3(name)2.5 E F4(CR)A F0 6.04 (.I)C 3.54(fy)-6.04 G 1.04(ou ha)-3.54 F 1.34 -.15(ve n)-.2 H(ot).15 E .36(written out your \214le before you try to do this, then the editor \ will tell you this, and delay editing the other \214le.)72 506.4 R -1.1 (Yo)5.36 G(u)1.1 E .672(can then gi)72 518.4 R .972 -.15(ve t)-.25 H .672(he command).15 F F1(:w)3.172 E F4(CR)A F0 .672(to sa)3.172 F .972 -.15(ve y)-.2 H .672(our w).15 F .672(ork and then the)-.1 F F1(:e)3.173 E F3(name)2.5 E F4(CR)A F0 .673(command ag)3.173 F .673 (ain, or carefully gi)-.05 F .973 -.15(ve t)-.25 H(he).15 E(command)72 530.4 Q F1(:e!)3.058 E F3(name)2.5 E F4(CR)A F0 3.058(,w)C .557 (hich edits the other \214le discarding the changes you ha)-3.058 F .857 -.15(ve m)-.2 H .557(ade to the current \214le.).15 F 2.157 -.8(To h) 5.557 H -2.25 -.2(av e).8 H(the editor automatically sa)72 542.4 Q .3 -.15(ve c)-.2 H(hanges, include).15 E F3(set autowrite)2.5 E F0 (in your EXINIT)2.5 E 2.5(,a)-.74 G(nd use)-2.5 E F1(:n)2.5 E F0 (instead of)2.5 E F1(:e)2.5 E F0(.)A F1 2.5(5.2. Escaping)72 566.4 R (to a shell)2.5 E F0 -1.1(Yo)97 582 S 2.626(uc)1.1 G .126 (an get to a shell to e)-2.626 F -.15(xe)-.15 G .127 (cute a single command by gi).15 F .127(ving a)-.25 F F3(vi)2.627 E F0 .127(command of the form)2.627 F F1(:!)2.627 E F3(cmd)A F4(CR)A F0 5.127 (.T)C .127(he system)-5.127 F .658(will run the single command)72 594 R F3(cmd)3.158 E F0 .658 (and when the command \214nishes, the editor will ask you to hit a)3.158 F F4(RETURN)3.157 E F0 .657(to con-)3.157 F 2.944(tinue. When)72 606 R .444(you ha)2.944 F .744 -.15(ve \214)-.2 H .444 (nished looking at the output on the screen, you should hit).15 F F4 (RETURN)2.945 E F0 .445(and the editor will clear)2.945 F .186 (the screen and redra)72 618 R 2.686(wi)-.15 G 2.686(t. Y)-2.686 F .186 (ou can then continue editing.)-1.1 F -1.1(Yo)5.186 G 2.686(uc)1.1 G .186(an also gi)-2.686 F .486 -.15(ve a)-.25 H(nother).15 E F1(:)2.686 E F0 .185(command when it asks you for)2.685 F(a)72 630 Q F4(RETURN)2.5 E F0 2.5(;i)C 2.5(nt)-2.5 G(his case the screen will not be redra)-2.5 E (wn.)-.15 E .25(If you wish to e)97 645.6 R -.15(xe)-.15 G .251 (cute more than one command in the shell, then you can gi).15 F .551 -.15(ve t)-.25 H .251(he command).15 F F1(:sh)2.751 E F4(CR)A F0 5.251 (.T)C .251(his will)-5.251 F(gi)72 657.6 Q .328 -.15(ve y)-.25 H .028 (ou a ne).15 F 2.527(ws)-.25 G .027 (hell, and when you \214nish with the shell, ending it by typing a) -2.527 F F1(^D)2.527 E F0 2.527(,t)C .027 (he editor will clear the screen and)-2.527 F(continue.)72 669.6 Q .324 (On systems which support it,)97 685.2 R F1(^Z)2.824 E F0 .325 (will suspend the editor and return to the \(top le)2.824 F -.15(ve)-.25 G .325(l\) shell.).15 F .325(When the editor is)5.325 F (resumed, the screen will be redra)72 697.2 Q(wn.)-.15 E EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-11)-249.71 E/F1 10/Times-Bold@0 SF 2.5 (5.3. Marking)72 84 R(and r)2.5 E(etur)-.18 E(ning)-.15 E F0 .531 (The command)97 99.6 R F1<9292>3.031 E F0 .531(returned to the pre)3.031 F .53(vious place after a motion of the cursor by a command such as)-.25 F F1(/)3.03 E F0(,)A F1(?)3.03 E F0(or)3.03 E F1(G)3.03 E F0(.)A -1.1 (Yo)72 111.6 S 3.411(uc)1.1 G .912(an also mark lines in the \214le wit\ h single letter tags and return to these marks later by naming the tags\ .)-3.411 F -.35(Tr)5.912 G(y).35 E .836 (marking the current line with the command)72 123.6 R F1(m)3.336 E/F2 10 /Times-Italic@0 SF(x)A F0 3.336(,w)C .836 (here you should pick some letter for)-3.336 F F2(x)3.336 E F0 3.336(,s) C .836(ay `a'.)-3.336 F .836(Then mo)5.836 F 1.136 -.15(ve t)-.15 H(he) .15 E 1.45(cursor to a dif)72 135.6 R 1.45(ferent line \(an)-.25 F 3.95 (yw)-.15 G 1.45(ay you lik)-4.05 F 1.45(e\) and hit)-.1 F F1<9261>3.95 E F0 6.451(.T)C 1.451(he cursor will return to the place which you mark) -6.451 F(ed.)-.1 E(Marks last only until you edit another \214le.)72 147.6 Q .256(When using operators such as)97 163.2 R F1(d)2.756 E F0 .255(and referring to mark)2.755 F .255 (ed lines, it is often desirable to delete whole lines rather)-.1 F .069 (than deleting to the e)72 175.2 R .069(xact position in the line mark) -.15 F .069(ed by)-.1 F F1(m)2.57 E F0 5.07(.I)C 2.57(nt)-5.07 G .07 (his case you can use the form)-2.57 F F12.57 E F2(x)A F0 .07 (rather than)2.57 F F1<92>2.57 E F2(x)A F0 5.07(.U)C(sed)-5.07 E .639 (without an operator)72 187.2 R(,)-.4 E F13.139 E F2(x)A F0 .639 (will mo)3.139 F .939 -.15(ve t)-.15 H 3.139(ot).15 G .639 (he \214rst non-white character of the mark)-3.139 F .638 (ed line; similarly)-.1 F F13.138 E F0(mo)3.138 E -.15(ve)-.15 G 3.138(st).15 G 3.138(ot)-3.138 G .638(he \214rst)-3.138 F (non-white character of the line containing the pre)72 199.2 Q (vious conte)-.25 E(xt mark)-.15 E F1<9292>2.5 E F0(.)A F1 2.5 (5.4. Adjusting)72 223.2 R(the scr)2.5 E(een)-.18 E F0 .651(If the scre\ en image is messed up because of a transmission error to your terminal,\ or because some program)97 238.8 R 1.2 (other than the editor wrote output to your terminal, you can hit a)72 250.8 R F1(^L)3.699 E F0 3.699(,t)C(he)-3.699 E/F3 8/Times-Roman@0 SF (ASCII)3.699 E F0 1.199(form-feed character)3.699 F 3.699(,t)-.4 G 3.699 (oc)-3.699 G 1.199(ause the)-3.699 F(screen to be refreshed.)72 262.8 Q .542(On a dumb terminal, if there are @ lines in the middle of the scre\ en as a result of line deletion, you may get)97 278.4 R (rid of these lines by typing)72 290.4 Q F1(^R)2.5 E F0 (to cause the editor to retype the screen, closing up these holes.)2.5 E (Finally)97 306 Q 3.427(,i)-.65 G 3.427(fy)-3.427 G .926(ou wish to pla\ ce a certain line on the screen at the top middle or bottom of the scre\ en, you can)-3.427 F .063(position the cursor to that line, and then gi) 72 318 R .364 -.15(ve a)-.25 H F1(z)2.714 E F0 2.564(command. Y)2.564 F .064(ou should follo)-1.1 F 2.564(wt)-.25 G(he)-2.564 E F1(z)2.564 E F0 .064(command with a)2.564 F F3(RETURN)2.564 E F0 .064(if you)2.564 F -.1 (wa)72 330 S(nt the line to appear at the top of the windo).1 E 1.3 -.65 (w, a)-.25 H F1(.)3.15 E F0(if you w)2.5 E(ant it at the center)-.1 E 2.5(,o)-.4 G 2.5(ra)-2.5 G F1A F0(if you w)2.5 E (ant it at the bottom.)-.1 E F1 2.5(6. Special)72 354 R(topics)2.5 E 2.5 (6.1. Editing)72 378 R(on slo)2.5 E 2.5(wt)-.1 G(erminals)-2.5 E F0 1.15 (When you are on a slo)97 393.6 R 3.65(wt)-.25 G 1.15(erminal, it is im\ portant to limit the amount of output which is generated to your)-3.65 F .688(screen so that you will not suf)72 405.6 R .688(fer long delays, w) -.25 F .689(aiting for the screen to be refreshed.)-.1 F 2.289 -.8(We h) 5.689 H -2.25 -.2(av e).8 H .689(already pointed out)3.389 F(ho)72 417.6 Q 2.628(wt)-.25 G .127(he editor optimizes the updating of the screen d\ uring insertions on dumb terminals to limit the delays, and ho)-2.628 F (w)-.25 E(the editor erases lines to @ when the)72 429.6 Q 2.5(ya)-.15 G (re deleted on dumb terminals.)-2.5 E .275(The use of the slo)97 445.2 R 2.775(wt)-.25 G .275(erminal insertion mode is controlled by the)-2.775 F F2(slowopen)2.775 E F0 2.775(option. Y)2.775 F .276 (ou can force the editor to)-1.1 F 1.119(use this mode e)72 457.2 R -.15 (ve)-.25 G 3.619(no).15 G 3.619(nf)-3.619 G 1.119(aster terminals by gi) -3.719 F 1.119(ving the command)-.25 F F1 1.119(:se slo)3.619 F(w)-.1 E F3(CR)A F0 6.119(.I)C 3.619(fy)-6.119 G 1.118 (our system is sluggish this helps)-3.619 F (lessen the amount of output coming to your terminal.)72 469.2 Q -1.1 (Yo)5 G 2.5(uc)1.1 G(an disable this option by)-2.5 E F1(:se noslo)2.5 E (w)-.1 E F3(CR)A F0(.)A .398 (The editor can simulate an intelligent terminal on a dumb one.)97 484.8 R -.35(Tr)5.398 G 2.898(yg).35 G -.25(iv)-2.898 G .398(ing the command) .25 F F1 .399(:se r)2.898 F(edraw)-.18 E F3(CR)A F0 5.399(.T)C(his) -5.399 E .515(simulation generates a great deal of output and is genera\ lly tolerable only on lightly loaded systems and f)72 496.8 R .515 (ast termi-)-.1 F 2.5(nals. Y)72 508.8 R(ou can disable this by gi)-1.1 E(ving the command)-.25 E F1(:se nor)74.5 520.8 Q(edraw)-.18 E F3(CR)A F0(.)A .079(The editor also mak)97 536.4 R .079 (es editing more pleasant at lo)-.1 F 2.579(ws)-.25 G .08 (peed by starting editing in a small windo)-2.579 F 1.38 -.65(w, a)-.25 H .08(nd letting the).65 F(windo)72 548.4 Q 3.16(we)-.25 G .66 (xpand as you edit.)-3.31 F .66(This w)5.66 F .659 (orks particularly well on intelligent terminals.)-.1 F .659 (The editor can e)5.659 F .659(xpand the win-)-.15 F(do)72 560.4 Q 2.551 (we)-.25 G .051 (asily when you insert in the middle of the screen on these terminals.) -2.551 F .052(If possible, try the editor on an intelligent)5.052 F (terminal to see ho)72 572.4 Q 2.5(wt)-.25 G(his w)-2.5 E(orks.)-.1 E -1.1(Yo)97 588 S 3.368(uc)1.1 G .868(an control the size of the windo) -3.368 F 3.367(ww)-.25 G .867(hich is redra)-3.367 F .867 (wn each time the screen is cleared by gi)-.15 F .867(ving windo)-.25 F (w)-.25 E(sizes as ar)72 600 Q(gument to the commands which cause lar) -.18 E(ge screen motions:)-.18 E F1 5(:/?[)108 618 S 5([])-5 G 5<5d92b4> -5 G F0 .217(Thus if you are searching for a particular instance of a c\ ommon string in a \214le you can precede the \214rst search com-)72 636 R .039(mand by a small number)72 648 R 2.539(,s)-.4 G .039 (ay 3, and the editor will dra)-2.539 F 2.539(wt)-.15 G .039 (hree line windo)-2.539 F .039 (ws around each instance of the string which)-.25 F(it locates.)72 660 Q -1.1(Yo)97 675.6 S 2.552(uc)1.1 G .052(an easily e)-2.552 F .052 (xpand or contract the windo)-.15 F 1.352 -.65(w, p)-.25 H .052 (lacing the current line as you choose, by gi).65 F .052 (ving a number on a)-.25 F F1(z)72 687.6 Q F0 .21(command, after the) 2.71 F F1(z)2.71 E F0 .21(and before the follo)2.71 F(wing)-.25 E F3 (RETURN)2.71 E F0(,)A F1(.)2.71 E F0(or)2.71 E F12.71 E F0 5.21(.T)C .21(hus the command)-5.21 F F1(z5.)2.71 E F0(redra)2.71 E .21 (ws the screen with the)-.15 F(current line in the center of a \214v)72 699.6 Q 2.5(el)-.15 G(ine windo)-2.5 E -.65(w.)-.25 G<87>.65 E .32 LW 144 710 72 710 DL F3 2<874e>72 720 S(ote that the command)-2 E/F4 8 /Times-Bold@0 SF(5z.)2 E F3(has an entirely dif)2 E(ferent ef)-.2 E (fect, placing line 5 in the center of a ne)-.2 E 2(ww)-.2 G(indo)-2 E -.52(w.)-.2 G EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-12 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E .727 (If the editor is redra)97 84 R .727(wing or otherwise updating lar)-.15 F .728(ge portions of the display)-.18 F 3.228(,y)-.65 G .728 (ou can interrupt this updating)-3.228 F .361(by hitting a)72 96 R/F1 8 /Times-Roman@0 SF(DEL)2.861 E F0(or)2.861 E F1 -.32(RU)2.861 G(B).32 E F0 .361(as usual.)2.861 F .361(If you do this you may partially confuse\ the editor about what is displayed on the)5.361 F 2.553(screen. Y)72 108 R .053(ou can still edit the te)-1.1 F .054 (xt on the screen if you wish; clear up the confusion by hitting a)-.15 F/F2 10/Times-Bold@0 SF(^L)2.554 E F0 2.554(;o)C 2.554(rm)-2.554 G .354 -.15(ove o)-2.554 H 2.554(rs).15 G(earch)-2.554 E(ag)72 120 Q (ain, ignoring the current state of the display)-.05 E(.)-.65 E (See section 7.8 on)97 135.6 Q/F3 10/Times-Italic@0 SF(open)2.5 E F0 (mode for another w)2.5 E(ay to use the)-.1 E F3(vi)2.5 E F0 (command set on slo)2.5 E 2.5(wt)-.25 G(erminals.)-2.5 E F2 2.5 (6.2. Options,)72 159.6 R(set, and editor startup \214les)2.5 E F0 .129 (The editor has a set of options, some of which ha)97 175.2 R .429 -.15 (ve b)-.2 H .129(een mentioned abo).15 F -.15(ve)-.15 G 5.129(.T).15 G .129(he most useful options are gi)-5.129 F -.15(ve)-.25 G(n).15 E (in the follo)72 187.2 Q(wing table.)-.25 E .374 (The options are of three kinds:)97 202.8 R .374 (numeric options, string options, and toggle options.)5.374 F -1.1(Yo) 5.374 G 2.874(uc)1.1 G .375(an set numeric and)-2.874 F (string options by a statement of the form)72 214.8 Q F2(set)108 232.8 Q F3(opt)2.5 E F2(=)A F3(val)A F0(and toggle options can be set or unset \ by statements of one of the forms)72 250.8 Q F2(set)108 268.8 Q F3(opt) 2.5 E F2(set no)108 280.8 Q F3(opt)A F2 32.81(Name Default)72 304.8 R (Description)78.15 E .4 LW 444.711 309.3 72 309.3 DL F0 15.58 (autoindent noai)72 318.8 R(Supply indentation automatically)92.59 E (auto)72 330.8 Q 20.28(write noa)-.25 F 88.3(wA)-.15 G (utomatic write before)-88.3 E F2(:n)2.5 E F0(,)A F2(:ta)2.5 E F0(,)A F2 (^)2.5 E/F4 10/Symbol SFA F0(,)A F2(!)2.5 E F0 15.04 (ignorecase noic)72 342.8 R(Ignore case in searching)92.59 E 43.35 (lisp nolisp)72 354.8 R F2 2.5(\({\)})85.36 G F0(commands deal with S-e) A(xpressions)-.15 E 45.57(list nolist)72 366.8 R -.8(Ta)87.58 G (bs print as ^I; end of lines mark).8 E(ed with $)-.1 E 33.36 (magic nomagic)72 378.8 R(The characters . [ and * are special in scans) 75.37 E 27.25(number nonu)72 390.8 R(Lines are displayed pre\214x)89.81 E(ed with line numbers)-.15 E 13.93(paragraphs para=IPLPPPQPbpP)72 402.8 R 12.5(LI Macro)2.5 F(names which start paragraphs)2.5 E(redra)72 414.8 Q 32.69(wn)-.15 G 89.54(ore Simulate)-32.69 F 2.5(as)2.5 G (mart terminal on a dumb one)-2.5 E 25.58(sections sect=NHSHH)72 426.8 R 34.74(HU Macro)2.5 F(names which start ne)2.5 E 2.5(ws)-.25 G(ections) -2.5 E 17.24(shiftwidth sw=8)72 438.8 R (Shift distance for <, > and input)88.06 E F2(^D)2.5 E F0(and)2.5 E F2 (^T)2.5 E F0(sho)72 450.8 Q 12.5(wmatch nosm)-.25 F(Sho)88.14 E 2.5(wm) -.25 G(atching)-2.5 E F2(\()2.5 E F0(or)2.5 E F2({)2.5 E F0(as)2.5 E F2 (\))2.5 E F0(or)2.5 E F2(})2.5 E F0(is typed)2.5 E(slo)72 462.8 Q -.1 (wo)-.25 G 19.82(pen slo).1 F 91.17(wP)-.25 G (ostpone display updates during inserts)-91.17 E 39.47(term dumb)72 474.8 R(The kind of terminal you are using.)87.03 E .469 (These statements can be placed in your EXINIT in your en)72 492.8 R .468(vironment, or gi)-.4 F -.15(ve)-.25 G 2.968(nw).15 G .468 (hile you are running)-2.968 F F3(vi)2.968 E F0 .468(by preced-)2.968 F (ing them with a)72 504.8 Q F2(:)2.5 E F0(and follo)2.5 E (wing them with a)-.25 E F1(CR)2.5 E F0(.)A -1.1(Yo)97 520.4 S 3.647(uc) 1.1 G 1.147(an get a list of all options which you ha)-3.647 F 1.448 -.15(ve c)-.2 H 1.148(hanged by the command).15 F F2(:set)3.648 E F1(CR) A F0 3.648(,o)C 3.648(rt)-3.648 G 1.148(he v)-3.648 F 1.148 (alue of a single)-.25 F .736(option by the command)72 532.4 R F2(:set) 3.236 E F3(opt)3.236 E F2(?)A F1(CR)A F0 5.736(.A)C .736 (list of all possible options and their v)-2.5 F .736 (alues is generated by)-.25 F F2 .735(:set all)3.235 F F1(CR)A F0 5.735 (.S)C(et)-5.735 E(can be abbre)72 544.4 Q(viated)-.25 E F2(se)2.5 E F0 5 (.M)C(ultiple options can be placed on one line, e.g.)-5 E F2 (:se ai aw nu)5 E F1(CR)A F0(.)A .628(Options set by the)97 560 R F2 (set)3.128 E F0 .628(command only last while you stay in the editor) 3.128 F 5.629(.I)-.55 G 3.129(ti)-5.629 G 3.129(sc)-3.129 G .629 (ommon to w)-3.129 F .629(ant to ha)-.1 F .929 -.15(ve c)-.2 H(ertain) .15 E .295(options set whene)72 572 R -.15(ve)-.25 G 2.795(ry).15 G .295 (ou use the editor)-2.795 F 5.295(.T)-.55 G .295 (his can be accomplished by creating a list of)-5.295 F F3 -.2(ex)2.795 G F0 .295(commands\207 which are to)2.995 F .532(be run e)72 584 R -.15 (ve)-.25 G .532(ry time you start up).15 F F3 -.2(ex)3.032 G F0(,).2 E F3(edit)3.032 E F0 3.032(,o)C(r)-3.032 E F3(vi)3.033 E F0 5.533(.A)C .533(typical list includes a)-2.5 F F2(set)3.033 E F0 .533 (command, and possibly a fe)3.033 F(w)-.25 E F2(map)3.033 E F0(com-) 3.033 E 2.546(mands. Since)72 596 R .046 (it is advisable to get these commands on one line, the)2.546 F 2.546 (yc)-.15 G .045(an be separated with the | character)-2.546 F 2.545(,f) -.4 G .045(or e)-2.545 F(xam-)-.15 E(ple:)72 608 Q F2(set)108 626 Q F0 (ai a)2.5 E 2.5(wt)-.15 G(erse|)-2.5 E F2(map)A F0 2.5(@d)2.5 G(d|)-2.5 E F2(map)A F0 2.5(#x)2.5 G .594(which sets the options)72 644 R F3 (autoindent)3.094 E F0(,)A F3(autowrite)3.094 E F0(,)A F3(ter)3.094 E (se)-.1 E F0 3.094(,\()C(the)-3.094 E F2(set)3.094 E F0 .594 (command\), mak)3.094 F .595(es @ delete a line, \(the \214rst)-.1 F F2 (map)3.095 E F0 .595(\), and)B(mak)72 656 Q .555 (es # delete a character)-.1 F 3.055(,\()-.4 G .555(the second)-3.055 F F2(map)3.055 E F0 3.055(\). \(See)B .555 (section 6.9 for a description of the)3.055 F F2(map)3.054 E F0 .554 (command\) This string)3.054 F .197(should be placed in the v)72 668 R .198(ariable EXINIT in your en)-.25 F 2.698(vironment. If)-.4 F .198 (you use the shell)2.698 F F3(csh)2.698 E F0 2.698(,p)C .198 (ut this line in the \214le)-2.698 F F3(.lo)2.698 E(gin)-.1 E F0 (in your home directory:)72 680 Q(seten)108 698 Q 2.5(vE)-.4 G (XINIT \264)-2.5 E F2(set)A F0(ai a)2.5 E 2.5(wt)-.15 G(erse|)-2.5 E F2 (map)A F0 2.5(@d)2.5 G(d|)-2.5 E F2(map)A F0 2.5(#x)2.5 G-2.5 E .32 LW 144 710 72 710 DL F1 2<8741>72 720 S(ll commands which start with)-2 E/F5 8/Times-Bold@0 SF(:)2 E F1(are)2 E/F6 8/Times-Italic@0 SF -.16(ex)2 G F1(commands.)2.16 E EP %%Page: 13 13 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-13)-249.71 E(If you use the standard shell)72 84 Q/F1 10/Times-Italic@0 SF(sh)2.5 E F0 2.5(,p)C (ut these lines in the \214le)-2.5 E F1(.pr)2.5 E(o\214le)-.45 E F0 (in your home directory:)2.5 E(EXINIT=\264)108 102 Q/F2 10/Times-Bold@0 SF(set)A F0(ai a)2.5 E 2.5(wt)-.15 G(erse|)-2.5 E F2(map)A F0 2.5(@d)2.5 G(d|)-2.5 E F2(map)A F0 2.5(#x)2.5 G-2.5 E -.15(ex)108 114 S (port EXINIT).15 E(Of course, the particulars of the line w)72 132 Q (ould depend on which options you w)-.1 E(anted to set.)-.1 E F2 2.5 (6.3. Reco)72 156 R -.1(ve)-.1 G(ring lost lines).1 E F0 -1.1(Yo)97 171.6 S 3.895(um)1.1 G 1.395(ight ha)-3.895 F 1.695 -.15(ve a s)-.2 H 1.395(erious problem if you delete a number of lines and then re).15 F 1.394(gret that the)-.15 F 3.894(yw)-.15 G 1.394(ere deleted.)-3.894 F .069(Despair not, the editor sa)72 183.6 R -.15(ve)-.2 G 2.569(st).15 G .069(he last 9 deleted blocks of te)-2.569 F .069 (xt in a set of numbered re)-.15 F .069(gisters 1\2559.)-.15 F -1.1(Yo) 5.069 G 2.569(uc)1.1 G .07(an get the)-2.569 F F1(n)2.57 E F0 -.18('t)C (h).18 E(pre)72 195.6 Q .174(vious deleted te)-.25 F .173 (xt back in your \214le by the command ")-.15 F F1(n)A F2(p)1.666 E F0 5.173(.T)C .173(he " here says that a b)-5.173 F(uf)-.2 E .173 (fer name is to follo)-.25 F -.65(w,)-.25 G F1(n)3.323 E F0 .173(is the) 2.673 F .486(number of the b)72 207.6 R(uf)-.2 E .486 (fer you wish to try \(use the number 1 for no)-.25 F .487(w\), and)-.25 F F2(p)2.987 E F0 .487(is the put command, which puts te)2.987 F .487 (xt in the)-.15 F -.2(bu)72 219.6 S -.25(ff).2 G .148 (er after the cursor).25 F 5.148(.I)-.55 G 2.648(ft)-5.148 G .148 (his doesn')-2.648 F 2.648(tb)-.18 G .148(ring back the te)-2.648 F .148 (xt you w)-.15 F .148(anted, hit)-.1 F F2(u)2.648 E F0 .148 (to undo this and then)2.648 F F2(.)2.647 E F0 .147 (\(period\) to repeat)5.147 F .226(the put command.)72 231.6 R .226 (In general the)5.226 F F2(.)2.726 E F0 .227 (command will repeat the last change you made.)5.226 F .227 (As a special case, when the last)5.227 F .409 (command refers to a numbered te)72 243.6 R .409(xt b)-.15 F(uf)-.2 E (fer)-.25 E 2.908(,t)-.4 G(he)-2.908 E F2(.)2.908 E F0 .408 (command increments the number of the b)2.908 F(uf)-.2 E .408 (fer before repeating the)-.25 F 2.5(command. Thus)72 255.6 R 2.5(as)2.5 G(equence of the form)-2.5 E F2("1pu.u.u.)108 273.6 Q F0 .274 (will, if repeated long enough, sho)72 291.6 R 2.774(wy)-.25 G .274 (ou all the deleted te)-2.774 F .274(xt which has been sa)-.15 F -.15 (ve)-.2 G 2.774(df).15 G .274(or you.)-2.774 F -1.1(Yo)5.274 G 2.774(uc) 1.1 G .274(an omit the)-2.774 F F2(u)2.775 E F0(com-)2.775 E .549 (mands here to g)72 303.6 R .549(ather up all this te)-.05 F .548 (xt in the b)-.15 F(uf)-.2 E(fer)-.25 E 3.048(,o)-.4 G 3.048(rs)-3.048 G .548(top after an)-3.048 F(y)-.15 E F2(.)3.048 E F0 .548(command to k) 3.048 F .548(eep just the then reco)-.1 F -.15(ve)-.15 G .548(red te).15 F(xt.)-.15 E(The command)72 315.6 Q F2(P)2.5 E F0 (can also be used rather than)2.5 E F2(p)2.5 E F0(to put the reco)2.5 E -.15(ve)-.15 G(red te).15 E(xt before rather than after the cursor)-.15 E(.)-.55 E F2 2.5(6.4. Reco)72 339.6 R -.1(ve)-.1 G(ring lost \214les).1 E F0 .576(If the system crashes, you can reco)97 355.2 R -.15(ve)-.15 G 3.076(rt).15 G .576(he w)-3.076 F .576 (ork you were doing to within a fe)-.1 F 3.077(wc)-.25 G 3.077 (hanges. Y)-3.077 F .577(ou will normally)-1.1 F(recei)72 367.2 Q 1.096 -.15(ve m)-.25 H .796(ail when you ne).15 F .796(xt login gi)-.15 F .795 (ving you the name of the \214le which has been sa)-.25 F -.15(ve)-.2 G 3.295(df).15 G .795(or you.)-3.295 F -1.1(Yo)5.795 G 3.295(us)1.1 G .795 (hould then)-3.295 F (change to the directory where you were when the system crashed and gi) 72 379.2 Q .3 -.15(ve a c)-.25 H(ommand of the form:).15 E(%)108 397.2 Q F2(vi \255r)2.5 E F1(name)2.5 E F0(replacing)72 415.2 Q F1(name)2.679 E F0 .179(with the name of the \214le which you were editing.)2.679 F .18 (This will reco)5.18 F -.15(ve)-.15 G 2.68(ry).15 G .18(our w)-2.68 F .18(ork to a point near where)-.1 F(you left of)72 427.2 Q(f.\207)-.25 E -1.1(Yo)97 442.8 S 2.5(uc)1.1 G (an get a listing of the \214les which are sa)-2.5 E -.15(ve)-.2 G 2.5 (df).15 G(or you by gi)-2.5 E(ving the command:)-.25 E(%)108 460.8 Q F2 (vi \255r)2.5 E F0 .645 (If there is more than one instance of a particular \214le sa)72 478.8 R -.15(ve)-.2 G .645(d, the editor gi).15 F -.15(ve)-.25 G 3.145(sy).15 G .645(ou the ne)-3.145 F .644(west instance each time you)-.25 F(reco)72 490.8 Q -.15(ve)-.15 G 2.5(ri).15 G 2.5(t. Y)-2.5 F (ou can thus get an older sa)-1.1 E -.15(ve)-.2 G 2.5(dc).15 G(op)-2.5 E 2.5(yb)-.1 G(ack by \214rst reco)-2.5 E -.15(ve)-.15 G(ring the ne).15 E (wer copies.)-.25 E -.15(Fo)97 506.4 S 3.054(rt).15 G .554 (his feature to w)-3.054 F(ork,)-.1 E F1(vi)3.054 E F0 .555 (must be correctly installed by a super user on your system, and the) 3.054 F F1(mail)3.055 E F0(program)3.055 E .216(must e)72 518.4 R .216 (xist to recei)-.15 F .516 -.15(ve m)-.25 H 2.716(ail. The).15 F(in) 2.716 E -.2(vo)-.4 G .216(cation `).2 F(`)-.74 E F1 .216(vi -r)B F0 1.696 -.74('' w)D .216(ill not al).74 F -.1(wa)-.1 G .216 (ys list all sa).1 F -.15(ve)-.2 G 2.716<648c>.15 G .215(les, b)-2.716 F .215(ut the)-.2 F 2.715(yc)-.15 G .215(an be reco)-2.715 F -.15(ve)-.15 G .215(red e).15 F -.15(ve)-.25 G(n).15 E(if the)72 530.4 Q 2.5(ya)-.15 G(re not listed.)-2.5 E F2 2.5(6.5. Continuous)72 554.4 R(text input)2.5 E F0 .312(When you are typing in lar)97 570 R .312(ge amounts of te)-.18 F .312(xt it is con)-.15 F -.15(ve)-.4 G .312(nient to ha).15 F .612 -.15(ve l)-.2 H .312(ines brok).15 F .312(en near the right mar)-.1 F .312(gin auto-)-.18 F(matically)72 582 Q 5.134(.Y)-.65 G .134 (ou can cause this to happen by gi)-6.234 F .134(ving the command)-.25 F F2 .134(:se wm=10)2.634 F/F3 8/Times-Roman@0 SF(CR)A F0 5.134(.T)C .134 (his causes all lines to be brok)-5.134 F .133(en at)-.1 F 2.5(as)72 594 S(pace at least 10 columns from the right hand edge of the screen.)-2.5 E .693(If the editor breaks an input line and you wish to put it back t\ ogether you can tell it to join the lines with)97 609.6 R F2(J)3.194 E F0(.)A -1.1(Yo)72 621.6 S 2.537(uc)1.1 G .037(an gi)-2.537 F -.15(ve) -.25 G F2(J)2.687 E F0 2.536(ac)2.537 G .036 (ount of the number of lines to be joined as in)-2.536 F F2(3J)2.536 E F0 .036(to join 3 lines.)2.536 F .036 (The editor supplies white space, if)5.036 F .044 (appropriate, at the juncture of the joined lines, and lea)72 633.6 R -.15(ve)-.2 G 2.544(st).15 G .044(he cursor at this white space.)-2.544 F -1.1(Yo)5.045 G 2.545(uc)1.1 G .045(an kill the white space)-2.545 F (with)72 645.6 Q F2(x)2.5 E F0(if you don')2.5 E 2.5(tw)-.18 G(ant it.) -2.6 E .32 LW 144 690 72 690 DL F3 2.733<8749>72 700 S 2.733(nr)-2.733 G .733(are cases, some of the lines of the \214le may be lost.)-2.733 F .733(The editor will gi)4.733 F .973 -.12(ve y)-.2 H .733 (ou the numbers of these lines and the te).12 F .732 (xt of the lines will be)-.12 F .407(replaced by the string `LOST'.)72 710 R .407(These lines will almost al)4.407 F -.08(wa)-.08 G .407 (ys be among the last fe).08 F 2.407(ww)-.2 G .407(hich you changed.) -2.407 F -.88(Yo)4.407 G 2.407(uc).88 G .407 (an either choose to discard the)-2.407 F (changes which you made \(if the)72 720 Q 2(ya)-.12 G(re easy to remak) -2 E(e\) or to replace the fe)-.08 E 2(wl)-.2 G(ost lines by hand.)-2 E EP %%Page: 14 14 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-14 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF 2.5(6.6. F)72 84 R(eatur)-.25 E(es f)-.18 E(or editing pr)-.25 E (ograms)-.18 E F0 .228 (The editor has a number of commands for editing programs.)97 99.6 R .227(The thing that most distinguishes editing of pro-)5.228 F .621 (grams from editing of te)72 111.6 R .622(xt is the desirability of mai\ ntaining an indented structure to the body of the program.)-.15 F(The) 5.622 E(editor has a)72 123.6 Q/F2 10/Times-Italic@0 SF(autoindent)2.5 E F0 -.1(fa)2.5 G (cility for helping you generate correctly indented programs.).1 E 1.839 -.8(To e)97 139.2 T .239(nable this f).8 F .239(acility you can gi)-.1 F .539 -.15(ve t)-.25 H .239(he command).15 F F1 .239(:se ai)2.739 F/F3 8 /Times-Roman@0 SF(CR)A F0 5.239(.N)C .739 -.25(ow t)-5.239 H .239 (ry opening a ne).25 F 2.739(wl)-.25 G .239(ine with)-2.739 F F1(o)2.739 E F0 .239(and type some)2.739 F .075(characters on the line after a fe) 72 151.2 R 2.575(wt)-.25 G 2.575(abs. If)-2.575 F .075(you no)2.575 F 2.575(ws)-.25 G .076 (tart another line, notice that the editor supplies white space at the) -2.575 F(be)72 163.2 Q .766 (ginning of the line to line it up with the pre)-.15 F .766(vious line.) -.25 F -1.1(Yo)5.766 G 3.266(uc)1.1 G .766(annot backspace o)-3.266 F -.15(ve)-.15 G 3.266(rt).15 G .766(his indentation, b)-3.266 F .766 (ut you can)-.2 F(use)72 175.2 Q F1(^D)2.5 E F0 -.1(ke)2.5 G 2.5(yt)-.05 G 2.5(ob)-2.5 G(acktab o)-2.5 E -.15(ve)-.15 G 2.5(rt).15 G (he supplied indentation.)-2.5 E .193(Each time you type)97 190.8 R F1 (^D)2.693 E F0 .194 (you back up one position, normally to an 8 column boundary)2.693 F 5.194(.T)-.65 G .194(his amount is settable;)-5.194 F 1.536 (the editor has an option called)72 202.8 R F2(shiftwidth)4.035 E F0 1.535(which you can set to change this v)4.035 F 4.035(alue. T)-.25 F 1.535(ry gi)-.35 F 1.535(ving the command)-.25 F F1(:se)4.035 E(sw=4)72 214.8 Q F3(CR)A F0(and then e)2.5 E(xperimenting with autoindent ag)-.15 E(ain.)-.05 E -.15(Fo)97 230.4 S 2.993(rs).15 G .493 (hifting lines in the program left and right, there are operators)-2.993 F F1(<)2.994 E F0(and)2.994 E F1(>.)2.994 E F0 .494 (These shift the lines you specify)5.494 F .556(right or left by one)72 242.4 R F2(shiftwidth.)3.056 E F0 -.35(Tr)5.556 G(y).35 E F1(<<)3.056 E F0(and)3.056 E F1(>>)3.056 E F0 .556 (which shift one line left or right, and)3.056 F F1(L)3.056 E F0 .555(shifting the rest of)3.055 F (the display left and right.)72 254.4 Q .845(If you ha)97 270 R 1.145 -.15(ve a c)-.2 H .845(omplicated e).15 F .845 (xpression and wish to see ho)-.15 F 3.345(wt)-.25 G .845 (he parentheses match, put the cursor at a left or)-3.345 F .454 (right parenthesis and hit)72 282 R F1(%)2.954 E F0 5.454(.T)C .454 (his will sho)-5.454 F 2.954(wy)-.25 G .454 (ou the matching parenthesis.)-2.954 F .454(This w)5.454 F .454 (orks also for braces { and }, and)-.1 F(brack)72 294 Q(ets [ and ].)-.1 E .587(If you are editing C programs, you can use the)97 309.6 R F1([[) 3.087 E F0(and)3.087 E F1(]])3.087 E F0 -.1(ke)3.088 G .588(ys to adv) -.05 F .588(ance or retreat to a line starting with a)-.25 F F1({)3.088 E F0(,)A .334(i.e. a function declaration at a time.)72 321.6 R(When) 5.334 E F1(]])2.834 E F0 .334 (is used with an operator it stops after a line which starts with)2.834 F F1(})2.833 E F0 2.833(;t)C .333(his is)-2.833 F(sometimes useful with) 72 333.6 Q F1(y]])2.5 E F0(.)A F1 2.5(6.7. Filtering)72 357.6 R (portions of the b)2.5 E(uffer)-.2 E F0 -1.1(Yo)97 373.2 S 2.939(uc)1.1 G .439(an run system commands o)-2.939 F -.15(ve)-.15 G 2.939(rp).15 G .439(ortions of the b)-2.939 F(uf)-.2 E .44(fer using the operator)-.25 F F1(!)2.94 E F0 5.44(.Y)C .44(ou can use this to sort lines)-6.54 F .094(in the b)72 385.2 R(uf)-.2 E(fer)-.25 E 2.594(,o)-.4 G 2.594(rt) -2.594 G 2.593(or)-2.594 G .093(eformat portions of the b)-2.593 F(uf) -.2 E .093(fer with a pretty-printer)-.25 F 5.093(.T)-.55 G .093 (ry typing in a list of random w)-5.443 F .093(ords, one per)-.1 F .546 (line and ending them with a blank line.)72 397.2 R .547 (Back up to the be)5.546 F .547(ginning of the list, and then gi)-.15 F .847 -.15(ve t)-.25 H .547(he command).15 F F1(!}sort)3.047 E F3(CR)A F0 (.)A(This says to sort the ne)72 409.2 Q (xt paragraph of material, and the blank line ends a paragraph.)-.15 E F1 2.5(6.8. Commands)72 433.2 R -.25(fo)2.5 G 2.5(re).25 G(diting)-2.5 E /F4 8/Times-Bold@0 SF(LISP)2.5 E F0 .388(If you are editing a)97 448.8 R F3(LISP)2.888 E F0 .388(program you should set the option)2.888 F F2 (lisp)2.888 E F0 .387(by doing)2.888 F F1(:se lisp)2.887 E F3(CR)A F0 5.387(.T)C .387(his changes the)-5.387 F F1(\()2.887 E F0(and)2.887 E F1 (\))2.887 E F0 .221(commands to mo)72 460.8 R .521 -.15(ve b)-.15 H (ackw).15 E .221(ard and forw)-.1 F .221(ard o)-.1 F -.15(ve)-.15 G 2.721(rs).15 G(-e)-2.721 E 2.721(xpressions. The)-.15 F F1({)2.721 E F0 (and)2.721 E F1(})2.721 E F0 .221(commands are lik)2.721 F(e)-.1 E F1 (\()2.721 E F0(and)2.721 E F1(\))2.721 E F0 -.2(bu)2.721 G 2.721(td).2 G (on')-2.721 E 2.721(ts)-.18 G(top)-2.721 E(at atoms.)72 472.8 Q (These can be used to skip to the ne)5 E (xt list, or through a comment quickly)-.15 E(.)-.65 E(The)97 488.4 Q F2 (autoindent)3.735 E F0 1.235(option w)3.735 F 1.235(orks dif)-.1 F 1.235 (ferently for)-.25 F F3(LISP)3.735 E F0 3.735(,s)C 1.235 (upplying indent to align at the \214rst ar)-3.735 F 1.234 (gument to the last)-.18 F(open list.)72 500.4 Q(If there is no such ar) 5 E(gument then the indent is tw)-.18 E 2.5(os)-.1 G (paces more than the last le)-2.5 E -.15(ve)-.25 G(l.).15 E .22 (There is another option which is useful for typing in)97 516 R F3(LISP) 2.72 E F0 2.72(,t)C(he)-2.72 E F2(showmatc)2.72 E(h)-.15 E F0 2.72 (option. T)2.72 F .22(ry setting it with)-.35 F F1 .22(:se sm)2.72 F F3 (CR)A F0 1.394(and then try typing a `\(' some w)72 528 R 1.393 (ords and then a `\)'.)-.1 F 1.393(Notice that the cursor sho)6.393 F 1.393(ws the position of the `\(' which)-.25 F .308 (matches the `\)' brie\215y)72 540 R 5.308(.T)-.65 G .309(his happens o\ nly if the matching `\(' is on the screen, and the cursor stays there f\ or at most)-5.308 F(one second.)72 552 Q .195 (The editor also has an operator to realign e)97 567.6 R .195 (xisting lines as though the)-.15 F 2.695(yh)-.15 G .195 (ad been typed in with)-2.695 F F2(lisp)2.695 E F0(and)2.695 E F2 (autoin-)2.695 E(dent)72 579.6 Q F0 2.748(set. This)2.748 F .248(is the) 2.748 F F1(=)2.748 E F0(operator)2.748 E 5.248(.T)-.55 G .248 (ry the command)-5.598 F F1(=%)2.749 E F0 .249(at the be)2.749 F .249 (ginning of a function.)-.15 F .249(This will realign all the lines) 5.249 F(of the function declaration.)72 591.6 Q .971 (When you are editing)97 607.2 R F3(LISP)3.471 E F0 .971(,, the)B F1([[) 3.471 E F0 .971(and ]] adv)3.471 F .971(ance and retreat to lines be) -.25 F .971(ginning with a)-.15 F F1(\()3.471 E F0 3.471(,a)C .971 (nd are useful for)-3.471 F(dealing with entire function de\214nitions.) 72 619.2 Q F1 2.5(6.9. Macr)72 643.2 R(os)-.18 E F2 -.74(Vi)97 658.8 S F0 .299(has a parameterless macro f)3.539 F(acility)-.1 E 2.799(,w)-.65 G .3(hich lets you set it up so that when you hit a single k)-2.799 F -.15(ey)-.1 G(strok).15 E .3(e, the edi-)-.1 F .372 (tor will act as though you had hit some longer sequence of k)72 670.8 R -.15(ey)-.1 G 2.872(s. Y).15 F .372 (ou can set this up if you \214nd yourself typing the)-1.1 F (same sequence of commands repeatedly)72 682.8 Q(.)-.65 E(Brie\215y)97 698.4 Q 2.5(,t)-.65 G(here are tw)-2.5 E 2.5<6f8d>-.1 G -.2(avo)-2.5 G (rs of macros:).2 E 14.73(a\) Ones)72 714 R .803 (where you put the macro body in a b)3.303 F(uf)-.2 E .803(fer re)-.25 F (gister)-.15 E 3.303(,s)-.4 G(ay)-3.303 E F2(x)3.303 E F0 5.803(.Y)C .804(ou can then type)-6.903 F F1(@x)3.304 E F0 .804(to in)3.304 F -.2 (vo)-.4 G 1.004 -.1(ke t).2 H .804(he macro.).1 F(The)97 726 Q F1(@)2.5 E F0(may be follo)2.5 E(wed by another)-.25 E F1(@)2.5 E F0 (to repeat the last macro.)2.5 E EP %%Page: 15 15 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-15)-249.71 E 14.17(b\) Y)72 84 R(ou can use the) -1.1 E/F1 10/Times-Italic@0 SF(map)2.5 E F0(command from)2.5 E F1(vi)2.5 E F0(\(typically in your)2.5 E F1(EXINIT)2.5 E F0 2.5(\)w)C (ith a command of the form:)-2.5 E(:map)133 102 Q F1(lhs rhs)2.5 E/F2 8 /Times-Roman@0 SF(CR)A F0(mapping)97 120 Q F1(lhs)3.274 E F0(into)3.274 E F1(rhs.)3.274 E F0 .774(There are restrictions:)5.774 F F1(lhs)3.274 E F0 .773(should be one k)3.274 F -.15(ey)-.1 G(strok).15 E 3.273(e\()-.1 G .773(either 1 character or one function)-3.273 F -.1(ke)97 132 S 1.262 (y\) since it must be entered within one second \(unless)-.05 F F1 (notimeout)3.762 E F0 1.263(is set, in which case you can type it as) 3.763 F(slo)97 144 Q .578(wly as you wish, and)-.25 F F1(vi)3.078 E F0 .578(will w)3.078 F .578(ait for you to \214nish it before it echoes an) -.1 F 3.077(ything\). The)-.15 F F1(lhs)3.077 E F0 .577 (can be no longer)3.077 F 1.372(than 10 characters, the)97 156 R F1(rhs) 3.873 E F0 1.373(no longer than 100.)3.873 F 2.973 -.8(To g)6.373 H 1.373(et a space, tab or ne).8 F 1.373(wline into)-.25 F F1(lhs)3.873 E F0(or)3.873 E F1(rhs)3.873 E F0 1.373(you should)3.873 F .616 (escape them with a)97 168 R/F3 10/Times-Bold@0 SF(^V)3.116 E F0 5.616 (.\()C .616(It may be necessary to double the)-5.616 F F3(^V)3.116 E F0 .615(if the map command is gi)3.116 F -.15(ve)-.25 G 3.115(ni).15 G (nside)-3.115 E F1(vi,)3.115 E F0(rather)3.115 E(than in)97 180 Q F1 -.2 (ex)2.5 G(.\)).2 E F0(Spaces and tabs inside the)5 E F1(rhs)2.5 E F0 (need not be escaped.)2.5 E(Thus to mak)97 195.6 Q 2.5(et)-.1 G(he)-2.5 E F3(q)2.5 E F0 -.1(ke)2.5 G 2.5(yw)-.05 G(rite and e)-2.5 E (xit the editor)-.15 E 2.5(,y)-.4 G(ou can gi)-2.5 E .3 -.15(ve t)-.25 H (he command).15 E(:map q :wq)108 213.6 Q F3(^V^V)A F2(CR CR)A F0 1.006 (which means that whene)72 231.6 R -.15(ve)-.25 G 3.506(ry).15 G 1.006 (ou type)-3.506 F F3(q)3.506 E F0 3.506(,i)C 3.506(tw)-3.506 G 1.006 (ill be as though you had typed the four characters)-3.506 F F3(:wq) 3.506 E F2(CR)A F0 6.006(.A)C F3(^V)-2.499 E F0 2.107 -.55('s i)D(s).55 E .249(needed because without it the)72 243.6 R F2(CR)2.749 E F0 -.1(wo) 2.749 G .249(uld end the).1 F F3(:)2.749 E F0 .249 (command, rather than becoming part of the)2.749 F F1(map)2.748 E F0 2.748(de\214nition. There)2.748 F .617(are tw)72 255.6 R(o)-.1 E F3(^V) 3.117 E F0 1.717 -.55('s b)D .617(ecause from within).55 F F1(vi)3.117 E F0 3.117(,t)C -.1(wo)-3.117 G F3(^V)3.217 E F0 1.717 -.55('s m)D .617 (ust be typed to get one.).55 F .617(The \214rst)5.617 F F2(CR)3.117 E F0 .617(is part of the)3.117 F F1(rhs)3.117 E F0 3.117(,t)C .617 (he second)-3.117 F(terminates the : command.)72 267.6 Q (Macros can be deleted with)97 283.2 Q(unmap lhs)108 301.2 Q .83(If the) 97 322.8 R F1(lhs)3.33 E F0 .83(of a macro is `)3.33 F(`#0')-.74 E 3.33 ('t)-.74 G .83(hrough `)-3.33 F(`#9')-.74 E .829 (', this maps the particular function k)-.74 F 1.129 -.15(ey i)-.1 H .829(nstead of the 2 character).15 F -.74(``)72 334.8 S(#').74 E 2.968 ('s)-.74 G 2.968(equence. So)-2.968 F .468 (that terminals without function k)2.968 F -.15(ey)-.1 G 2.968(sc).15 G .468(an access such de\214nitions, the form `)-2.968 F(`#x')-.74 E 2.969 ('w)-.74 G .469(ill mean func-)-2.969 F .12(tion k)72 346.8 R -.15(ey) -.1 G F1(x)2.77 E F0 .119 (on all terminals \(and need not be typed within one second.\))2.619 F .119(The character `)5.119 F(`#')-.74 E 2.619('c)-.74 G .119 (an be changed by using a)-2.619 F(macro in the usual w)72 358.8 Q(ay:) -.1 E(:map)108 376.8 Q F3(^V^V^I)2.5 E F0(#)2.5 E .268 (to use tab, for e)72 394.8 R 2.768(xample. \(This)-.15 F -.1(wo)2.768 G (n').1 E 2.768(ta)-.18 G -.25(ff)-2.768 G .268(ect the).25 F F1(map) 2.768 E F0 .268(command, which still uses)2.768 F F3(#,)2.768 E F0 -.2 (bu)2.768 G 2.768(tj).2 G .268(ust the in)-2.768 F -.2(vo)-.4 G .268 (cation from visual).2 F(mode.)72 406.8 Q(The undo command re)97 422.4 Q -.15(ve)-.25 G(rses an entire macro call as a unit, if it made an).15 E 2.5(yc)-.15 G(hanges.)-2.5 E 1.256(Placing a `!' after the w)97 438 R (ord)-.1 E F3(map)3.756 E F0 1.256 (causes the mapping to apply to input mode, rather than command mode.) 3.756 F(Thus, to arrange for)72 450 Q F3(^T)2.5 E F0 (to be the same as 4 spaces in input mode, you can type:)2.5 E(:map)108 468 Q F3(^T ^V)2.5 E F0 6.39 -3.89(b/ b/ b/ b/)D(where)72 486 Q F3 -4.17 (b/)2.941 G F0 .441(is a blank.)8.501 F(The)5.441 E F3(^V)2.941 E F0 .441(is necessary to pre)2.941 F -.15(ve)-.25 G .441 (nt the blanks from being tak).15 F .442(en as white space between the) -.1 F F1(lhs)2.942 E F0(and)2.942 E F1(rhs)72 498 Q F0(.)A F3 2.5(7. W) 72 522 R(ord Ab)-.75 E(br)-.1 E -.15(ev)-.18 G(iations).15 E F0 3.589 (Af)97 537.6 S 1.089(eature similar to macros in input mode is w)-3.589 F 1.089(ord abbre)-.1 F 3.589(viation. This)-.25 F(allo)3.589 E 1.089 (ws you to type a short w)-.25 F 1.088(ord and)-.1 F(ha)72 549.6 Q .981 -.15(ve i)-.2 H 3.181(te).15 G .681(xpanded into a longer w)-3.331 F .681(ord or w)-.1 F 3.181(ords. The)-.1 F .681(commands are)3.181 F F3 (:ab)3.181 E(br)-.1 E -.15(ev)-.18 G(iate).15 E F0(and)3.181 E F3(:unab) 3.181 E(br)-.1 E -.15(ev)-.18 G(iate).15 E F0(\()3.182 E F3(:ab)A F0 (and)3.182 E F3(:una)3.182 E F0(\))A(and ha)72 561.6 Q .3 -.15(ve t)-.2 H(he same syntax as).15 E F3(:map)2.5 E F0 5(.F)C(or e)-5.15 E(xample:) -.15 E(:ab eecs Electrical Engineering and Computer Sciences)108 579.6 Q .195(causes the w)72 597.6 R .195(ord `eecs' to al)-.1 F -.1(wa)-.1 G .194(ys be changed into the phrase `Electrical Engineering and Computer\ Sciences'.).1 F -.8(Wo)5.194 G(rd).8 E(abbre)72 609.6 Q .431 (viation is dif)-.25 F .431(ferent from macros in that only whole w)-.25 F .431(ords are af)-.1 F 2.931(fected. If)-.25 F .431 (`eecs' were typed as part of a lar)2.931 F(ger)-.18 E -.1(wo)72 621.6 S .339(rd, it w).1 F .339(ould be left alone.)-.1 F .339 (Also, the partial w)5.339 F .339(ord is echoed as it is typed.)-.1 F .338(There is no need for an abbre)5.339 F .338(viation to)-.25 F (be a single k)72 633.6 Q -.15(ey)-.1 G(strok).15 E (e, as it should be with a macro.)-.1 E F3 2.5(7.1. Ab)72 657.6 R(br)-.1 E -.15(ev)-.18 G(iations).15 E F0 .968 (The editor has a number of short commands which abbre)97 673.2 R .968 (viate longer commands which we ha)-.25 F 1.268 -.15(ve i)-.2 H (ntroduced).15 E 2.791(here. Y)72 685.2 R .291 (ou can \214nd these commands easily on the quick reference card.)-1.1 F (The)5.29 E 2.79(yo)-.15 G .29(ften sa)-2.79 F .59 -.15(ve a b)-.2 H .29 (it of typing and you can).15 F(learn them as con)72 697.2 Q -.15(ve)-.4 G(nient.).15 E EP %%Page: 16 16 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-16 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF 2.5(8. Nitty-gritty)72 84 R(details)2.5 E 2.5(8.1. Line)72 108 R -.18 (re)2.5 G(pr).18 E(esentation in the display)-.18 E F0 .848 (The editor folds long logical lines onto man)97 123.6 R 3.348(yp)-.15 G -.05(hy)-3.348 G .848(sical lines in the display).05 F 5.848(.C)-.65 G .848(ommands which adv)-5.848 F .849(ance lines)-.25 F(adv)72 135.6 Q .472(ance logical lines and will skip o)-.25 F -.15(ve)-.15 G 2.972(ra) .15 G .472(ll the se)-2.972 F .472(gments of a line in one motion.)-.15 F .472(The command)5.472 F F1(|)2.972 E F0(mo)2.972 E -.15(ve)-.15 G 2.971(st).15 G .471(he cursor)-2.971 F .206(to a speci\214c column, and\ may be useful for getting near the middle of a long line to split it i\ n half.)72 147.6 R -.35(Tr)5.206 G(y).35 E F1(80|)2.707 E F0 .207 (on a line)2.707 F(which is more than 80 columns long.\207)72 159.6 Q .034(The editor only puts full lines on the display; if there is not en\ ough room on the display to \214t a logical line, the)97 175.2 R .665 (editor lea)72 187.2 R -.15(ve)-.2 G 3.165(st).15 G .665(he ph)-3.165 F .665(ysical line empty)-.05 F 3.165(,p)-.65 G .665 (lacing only an @ on the line as a place holder)-3.165 F 5.665(.W)-.55 G .665(hen you delete lines on a)-5.665 F 1.561 (dumb terminal, the editor will often just clear the lines to @ to sa)72 199.2 R 1.861 -.15(ve t)-.2 H 1.561(ime \(rather than re).15 F 1.561 (writing the rest of the)-.25 F 2.5(screen.\) Y)72 211.2 R(ou can al) -1.1 E -.1(wa)-.1 G(ys maximize the information on the screen by gi).1 E (ving the)-.25 E F1(^R)2.5 E F0(command.)2.5 E .733 (If you wish, you can ha)97 226.8 R 1.033 -.15(ve t)-.2 H .733 (he editor place line numbers before each line on the display).15 F 5.734(.G)-.65 G -2.15 -.25(iv e)-5.734 H .734(the command)3.484 F F1 .901(:se nu)72 238.8 R/F2 8/Times-Roman@0 SF(CR)A F0 .901 (to enable this, and the command)3.401 F F1 .9(:se nonu)3.4 F F2(CR)A F0 .9(to turn it of)3.4 F 3.4(f. Y)-.25 F .9(ou can ha)-1.1 F 1.2 -.15 (ve t)-.2 H .9(abs represented as).15 F F1(^I)3.4 E F0 .9(and the)3.4 F (ends of lines indicated with `$' by gi)72 250.8 Q(ving the command)-.25 E F1(:se list)2.5 E F2(CR)A F0(;)A F1(:se nolist)2.5 E F2(CR)A F0 (turns this of)2.5 E(f.)-.25 E(Finally)97 266.4 Q 2.834(,l)-.65 G .335(\ ines consisting of only the character `~' are displayed when the last l\ ine in the \214le is in the middle of)-2.834 F(the screen.)72 278.4 Q (These represent ph)5 E (ysical lines which are past the logical end of \214le.)-.05 E F1 2.5 (8.2. Counts)72 302.4 R F0(Most)97 318 Q/F3 10/Times-Italic@0 SF(vi) 2.743 E F0 .242(commands will use a preceding count to af)2.743 F .242 (fect their beha)-.25 F .242(vior in some w)-.2 F(ay)-.1 E 5.242(.T)-.65 G .242(he follo)-5.242 F .242(wing table gi)-.25 F -.15(ve)-.25 G(s).15 E(the common w)72 330 Q(ays in which the counts are used:)-.1 E(ne)108 354 Q 2.5(ww)-.25 G(indo)-2.5 E 2.5(ws)-.25 G(ize)-2.5 E F1 5(:/?[)26.9 G 5([])-5 G 5<5d92b4>-5 G F0(scroll amount)108 366 Q F1 2.5(^D ^U)41.11 F F0(line/column number)108 378 Q F1 5(zG|)15 G F0(repeat ef)108 390 Q 43.89(fect most)-.25 F(of the rest)2.5 E .871 (The editor maintains a notion of the current def)97 417.6 R .872 (ault windo)-.1 F 3.372(ws)-.25 G 3.372(ize. On)-3.372 F .872 (terminals which run at speeds greater)3.372 F .219 (than 1200 baud the editor uses the full terminal screen.)72 429.6 R .218(On terminals which are slo)5.218 F .218 (wer than 1200 baud \(most dialup)-.25 F (lines are in this group\) the editor uses 8 lines as the def)72 441.6 Q (ault windo)-.1 E 2.5(ws)-.25 G 2.5(ize. At)-2.5 F(1200 baud the def)2.5 E(ault is 16 lines.)-.1 E .312(This size is the size used when the edit\ or clears and re\214lls the screen after a search or other motion mo)97 457.2 R -.15(ve)-.15 G 2.813(sf).15 G(ar)-2.913 E .925 (from the edge of the current windo)72 469.2 R 4.725 -.65(w. T)-.25 H .925(he commands which tak).65 F 3.424(ean)-.1 G 1.424 -.25(ew w)-3.424 H(indo).25 E 3.424(ws)-.25 G .924(ize as count all often cause the) -3.424 F .378(screen to be redra)72 481.2 R 2.878(wn. If)-.15 F .378 (you anticipate this, b)2.878 F .378(ut do not need as lar)-.2 F .378 (ge a windo)-.18 F 2.878(wa)-.25 G 2.878(sy)-2.878 G .379 (ou are currently using, you may)-2.878 F .356 (wish to change the screen size by specifying the ne)72 493.2 R 2.856 (ws)-.25 G .356(ize before these commands.)-2.856 F .356(In an)5.356 F 2.856(yc)-.15 G .356(ase, the number of lines)-2.856 F .485 (used on the screen will e)72 505.2 R .485(xpand if you mo)-.15 F .785 -.15(ve o)-.15 H .985 -.25(ff t).15 H .485(he top with a).25 F F1 2.985 E F0 .485(or similar command or of)2.985 F 2.985(ft)-.25 G .485 (he bottom with a com-)-2.985 F 1.769(mand such as)72 517.2 R F2(RETURN) 4.269 E F0(or)4.269 E F1(^D)4.269 E F0 6.769(.T)C 1.769(he windo)-6.769 F 4.269(ww)-.25 G 1.769(ill re)-4.269 F -.15(ve)-.25 G 1.768 (rt to the last speci\214ed size the ne).15 F 1.768 (xt time it is cleared and)-.15 F(re\214lled.\207)72 529.2 Q .92 (The scroll commands)97 544.8 R F1(^D)3.42 E F0(and)3.42 E F1(^U)3.42 E F0(lik)3.42 E -.25(ew)-.1 G .92(ise remember the amount of scroll last \ speci\214ed, using half the basic).25 F(windo)72 556.8 Q 3.654(ws)-.25 G 1.154(ize initially)-3.654 F 6.154(.T)-.65 G 1.153(he simple insert com\ mands use a count to specify a repetition of the inserted te)-6.154 F 3.653(xt. Thus)-.15 F F1<3130612badadadad>72 568.8 Q F2(ESC)A F0 .269 (will insert a grid-lik)2.769 F 2.769(es)-.1 G .269(tring of te)-2.769 F 2.769(xt. A)-.15 F(fe)2.769 E 2.769(wc)-.25 G .27 (ommands also use a preceding count as a line or column)-2.769 F(number) 72 580.8 Q(.)-.55 E .022(Except for a fe)97 596.4 R 2.522(wc)-.25 G .022 (ommands which ignore an)-2.522 F 2.522(yc)-.15 G .022(ounts \(such as) -2.522 F F1(^R)2.522 E F0 .022 (\), the rest of the editor commands use a count)B 1.382 (to indicate a simple repetition of their ef)72 608.4 R 3.882 (fect. Thus)-.25 F F1(5w)3.882 E F0(adv)3.882 E 1.382(ances \214v)-.25 F 3.882(ew)-.15 G 1.383(ords on the current line, while)-3.982 F F1(5) 3.883 E F2(RETURN)A F0(adv)72 620.4 Q 1.343(ances \214v)-.25 F 3.843(el) -.15 G 3.843(ines. A)-3.843 F -.15(ve)3.843 G 1.342 (ry useful instance of a count as a repetition is a count gi).15 F -.15 (ve)-.25 G 3.842(nt).15 G 3.842(ot)-3.842 G(he)-3.842 E F1(.)3.842 E F0 1.342(command, which)3.842 F .593(repeats the last changing command.)72 632.4 R .594(If you do)5.594 F F1 -.15(dw)3.094 G F0 .594(and then)3.244 F F1(3.)3.094 E F0 3.094(,y)C .594 (ou will delete \214rst one and then three w)-3.094 F 3.094(ords. Y)-.1 F(ou)-1.1 E(can then delete tw)72 644.4 Q 2.5(om)-.1 G(ore w)-2.5 E (ords with)-.1 E F1(2.)2.5 E F0(.)A F1 2.5(8.3. Mor)72 668.4 R 2.5<658c> -.18 G(le manipulation commands)-2.5 E F0 .393(The follo)97 684 R .393(\ wing table lists the \214le manipulation commands which you can use whe\ n you are in)-.25 F F3(vi.)2.892 E F0 .392(All of these)5.392 F .763 (commands are follo)72 696 R .763(wed by a)-.25 F F2(CR)3.263 E F0(or) 3.263 E F2(ESC)3.263 E F0 5.763(.T)C .764(he most basic commands are) -5.763 F F1(:w)3.264 E F0(and)3.264 E F1(:e)3.264 E F0 5.764(.A)C .764 (normal editing session on a)-2.5 F .32 LW 144 704 72 704 DL F2 2<8759> 72 714 S(ou can mak)-2.88 E 2(el)-.08 G(ong lines v)-2 E (ery easily by using)-.12 E/F4 8/Times-Bold@0 SF(J)2 E F2 (to join together short lines.)2 E 2<8742>72 725.8 S(ut not by a)-2 E F4 (^L)2 E F2(which just redra)2 E(ws the screen as it is.)-.12 E EP %%Page: 17 17 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-17)-249.71 E/F1 10/Times-Bold@0 SF(:w)108 96 Q F0(write back changes)50.54 E F1(:wq)108 108 Q F0(write and quit)44.98 E F1(:x)108 120 Q F0(write \(if necessary\) and quit \(same as ZZ\).)52.76 E F1(:e)108 132 Q/F2 10/Times-Italic@0 SF(name)2.5 E F0(edit \214le) 29.16 E F2(name)2.5 E F1(:e!)108 144 Q F0(reedit, discarding changes) 49.99 E F1(:e +)108 156 Q F2(name)2.5 E F0(edit, starting at end)20.96 E F1(:e +)108 168 Q F2(n)A F0(edit, starting at line)40.12 E F2(n)2.5 E F1 (:e #)108 180 Q F0(edit alternate \214le)45.82 E F1(:w)108 192 Q F2 (name)2.5 E F0(write \214le)26.38 E F2(name)2.5 E F1(:w!)108 204 Q F2 (name)2.5 E F0 -.15(ove)23.05 G(rwrite \214le).15 E F2(name)2.5 E F1(:) 108 216 Q F2(x,y)A F1(w)A F2(name)2.5 E F0(write lines)15 E F2(x)2.5 E F0(through)2.5 E F2(y)2.5 E F0(to)2.5 E F2(name)2.5 E F1(:r)108 228 Q F2 (name)2.5 E F0(read \214le)29.16 E F2(name)2.5 E F0(into b)2.5 E(uf)-.2 E(fer)-.25 E F1(:r !)108 240 Q F2(cmd)A F0(read output of)30.83 E F2 (cmd)2.5 E F0(into b)2.5 E(uf)-.2 E(fer)-.25 E F1(:n)108 252 Q F0 (edit ne)52.2 E(xt \214le in ar)-.15 E(gument list)-.18 E F1(:n!)108 264 Q F0(edit ne)48.87 E(xt \214le, discarding changes to current)-.15 E F1 (:n)108 276 Q F2(ar)2.5 E(gs)-.37 E F0(specify ne)32.29 E 2.5(wa)-.25 G -.18(rg)-2.5 G(ument list).18 E F1(:ta)108 288 Q F2(ta)2.5 E(g)-.1 E F0 (edit \214le containing tag)34.25 E F2(ta)2.5 E(g)-.1 E F0 2.5(,a)C(t) -2.5 E F2(ta)2.5 E(g)-.1 E F0 .889(single \214le will end with a)72 312 R F1(ZZ)3.389 E F0 3.389(command. If)3.389 F .889 (you are editing for a long period of time you can gi)3.389 F -.15(ve) -.25 G F1(:w)3.539 E F0(commands)3.389 E .333 (occasionally after major amounts of editing, and then \214nish with a) 72 324 R F1(ZZ)2.833 E F0 7.833(.W)C .333 (hen you edit more than one \214le, you can)-7.833 F (\214nish with one with a)72 336 Q F1(:w)2.5 E F0 (and start editing a ne)2.5 E 2.5<778c>-.25 G(le by gi)-2.5 E(ving a) -.25 E F1(:e)2.5 E F0(command, or set)2.5 E F2(autowrite)2.5 E F0 (and use)2.5 E F1(:n)2.5 E F0(<\214le>.)2.5 E .207(If you mak)97 351.6 R 2.707(ec)-.1 G .207(hanges to the editor')-2.707 F 2.707(sc)-.55 G(op) -2.707 E 2.707(yo)-.1 G 2.707(fa\214)-2.707 G .207(le, b)-2.707 F .206 (ut do not wish to write them back, then you must gi)-.2 F .506 -.15 (ve a)-.25 H(n).15 E F1(!)2.706 E F0 .413(after the command you w)72 363.6 R .413(ould otherwise use; this forces the editor to discard an) -.1 F 2.913(yc)-.15 G .413(hanges you ha)-2.913 F .714 -.15(ve m)-.2 H 2.914(ade. Use).15 F(this)2.914 E(carefully)72 375.6 Q(.)-.65 E(The)97 391.2 Q F1(:e)2.509 E F0 .009(command can be gi)2.509 F -.15(ve)-.25 G 2.509(na).15 G F1(+)A F0(ar)2.509 E .008 (gument to start at the end of the \214le, or a)-.18 F F1(+)2.508 E F2 (n)A F0(ar)2.508 E .008(gument to start at line)-.18 F F2(n)2.508 E F0 5.008(.I).833 G(n)-5.008 E(actuality)72 403.2 Q(,)-.65 E F2(n)2.724 E F0 .224(may be an)2.724 F 2.724(ye)-.15 G .224 (ditor command not containing a space, usefully a scan lik)-2.724 F(e) -.1 E F1(+/)2.724 E F2(pat)A F0(or)2.724 E F1(+?)2.724 E F2(pat)A F0 5.224(.I)C 2.724(nf)-5.224 G .224(orming ne)-2.724 F(w)-.25 E .244 (names to the)72 415.2 R F1(e)2.744 E F0 .243 (command, you can use the character)2.744 F F1(%)2.743 E F0 .243 (which is replaced by the current \214le name, or the character)2.743 F F1(#)2.743 E F0 .293(which is replaced by the alternate \214le name.)72 427.2 R .294(The alternate \214le name is generally the last name you t\ yped other than)5.293 F .672(the current \214le.)72 439.2 R .671 (Thus if you try to do a)5.672 F F1(:e)3.171 E F0 .671 (and get a diagnostic that you ha)3.171 F -.15(ve)-.2 G(n').15 E 3.171 (tw)-.18 G .671(ritten the \214le, you can gi)-3.171 F .971 -.15(ve a) -.25 H F1(:w)3.321 E F0(command and then a)72 451.2 Q F1(:e #)2.5 E F0 (command to redo the pre)2.5 E(vious)-.25 E F1(:e)2.5 E F0(.)A -1.1(Yo) 97 466.8 S 3.038(uc)1.1 G .538(an write part of the b)-3.038 F(uf)-.2 E .538(fer to a \214le by \214nding out the lines that bound the range to\ be written using)-.25 F F1(^G)3.039 E F0(,)A .632(and gi)72 478.8 R .632(ving these numbers after the)-.25 F F1(:)3.132 E F0 .632 (and before the)3.132 F F1(w)3.131 E F0 3.131(,s)C .631(eparated by) -3.131 F F1(,)3.131 E F0 -.55('s)C 5.631(.Y).55 G .631 (ou can also mark these lines with)-6.731 F F1(m)3.131 E F0(and)3.131 E (then use an address of the form)72 490.8 Q F12.5 E F2(x)A F1<2cb4>A F2(y)A F0(on the)2.5 E F1(w)2.5 E F0(command here.)2.5 E -1.1(Yo)97 506.4 S 3.46(uc)1.1 G .96(an read another \214le into the b)-3.46 F(uf) -.2 E .96(fer after the current line by using the)-.25 F F1(:r)3.46 E F0 3.46(command. Y)3.46 F .96(ou can similarly)-1.1 F (read in the output from a command, just use)72 518.4 Q F1(!)2.5 E F2 (cmd)A F0(instead of a \214le name.)2.5 E .404 (If you wish to edit a set of \214les in succession, you can gi)97 534 R .703 -.15(ve a)-.25 H .403 (ll the names on the command line, and then edit).15 F .437 (each one in turn using the command)72 546 R F1(:n)2.937 E F0 5.437(.I)C 2.937(ti)-5.437 G 2.937(sa)-2.937 G .438 (lso possible to respecify the list of \214les to be edited by gi)-2.937 F .438(ving the)-.25 F F1(:n)2.938 E F0 (command a list of \214le names, or a pattern to be e)72 558 Q (xpanded as you w)-.15 E(ould ha)-.1 E .3 -.15(ve g)-.2 H -2.15 -.25 (iv e).15 H 2.5(ni).25 G 2.5(to)-2.5 G 2.5(nt)-2.5 G(he initial)-2.5 E F2(vi)2.5 E F0(command.)2.5 E .574(If you are editing lar)97 573.6 R .574(ge programs, you will \214nd the)-.18 F F1(:ta)3.074 E F0 .573 (command v)3.073 F .573(ery useful.)-.15 F .573 (It utilizes a data base of func-)5.573 F .883(tion names and their loc\ ations, which can be created by programs such as)72 585.6 R F2(cta)3.383 E(gs,)-.1 E F0 .884(to quickly \214nd a function whose)3.383 F .173 (name you gi)72 597.6 R -.15(ve)-.25 G 5.173(.I).15 G 2.673(ft)-5.173 G (he)-2.673 E F1(:ta)2.673 E F0 .172 (command will require the editor to switch \214les, then you must)2.673 F F1(:w)2.672 E F0 .172(or abandon an)2.672 F 2.672(yc)-.15 G(hanges) -2.672 E(before switching.)72 609.6 Q -1.1(Yo)5 G 2.5(uc)1.1 G (an repeat the)-2.5 E F1(:ta)2.5 E F0(command without an)2.5 E 2.5(ya) -.15 G -.18(rg)-2.5 G(uments to look for the same tag ag).18 E(ain.)-.05 E F1 2.5(8.4. Mor)72 633.6 R 2.5(ea)-.18 G(bout sear)-2.5 E(ching f)-.18 E(or strings)-.25 E F0 .221 (When you are searching for strings in the \214le with)97 649.2 R F1(/) 2.721 E F0(and)2.721 E F1(?)2.721 E F0 2.721(,t)C .221 (he editor normally places you at the ne)-2.721 F .221(xt or pre)-.15 F (vi-)-.25 E .056(ous occurrence of the string.)72 661.2 R .056 (If you are using an operator such as)5.056 F F1(d)2.556 E F0(,)A F1(c) 2.556 E F0(or)2.556 E F1(y)2.556 E F0 2.556(,t)C .056 (hen you may well wish to af)-2.556 F .056(fect lines up)-.25 F .527 (to the line before the line containing the pattern.)72 673.2 R -1.1(Yo) 5.527 G 3.027(uc)1.1 G .527(an gi)-3.027 F .827 -.15(ve a s)-.25 H .527 (earch of the form).15 F F1(/)3.027 E F2(pat)A F1<2fad>A F2(n)A F0 .527 (to refer to the)3.027 F F2(n)3.027 E F0 -.18('t)C 3.027(hl).18 G(ine) -3.027 E .204(before the ne)72 685.2 R .204(xt line containing)-.15 F F2 (pat)2.704 E F0 2.704(,o)C 2.704(ry)-2.704 G .204(ou can use)-2.704 F F1 (+)2.704 E F0 .204(instead of)2.704 F F12.704 E F0 .204 (to refer to the lines after the one containing)2.704 F F2(pat)2.703 E F0 5.203(.I)C(f)-5.203 E .264(you don')72 697.2 R 2.764(tg)-.18 G -2.15 -.25(iv e)-2.764 H 2.764(al)3.014 G .264(ine of)-2.764 F .265 (fset, then the editor will af)-.25 F .265 (fect characters up to the match place, rather than whole lines; thus) -.25 F(use `)72 709.2 Q(`+0')-.74 E 2.5('t)-.74 G 2.5(oa)-2.5 G -.25(ff) -2.5 G(ect to the line which matches.).25 E EP %%Page: 18 18 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-18 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E -1.1(Yo)97 84 S 2.688(uc)1.1 G .188(an ha)-2.688 F .488 -.15(ve t)-.2 H .188 (he editor ignore the case of w).15 F .187 (ords in the searches it does by gi)-.1 F .187(ving the command)-.25 F /F1 10/Times-Bold@0 SF .187(:se ic)2.687 F/F2 8/Times-Roman@0 SF(CR)A F0 5.187(.T)C(he)-5.187 E(command)72 96 Q F1(:se noic)2.5 E F2(CR)A F0 (turns this of)2.5 E(f.)-.25 E .981(Strings gi)97 111.6 R -.15(ve)-.25 G 3.481(nt).15 G 3.481(os)-3.481 G .981(earches may actually be re)-3.481 F .982(gular e)-.15 F 3.482(xpressions. If)-.15 F .982(you do not w) 3.482 F .982(ant or need this f)-.1 F(acility)-.1 E 3.482(,y)-.65 G(ou) -3.482 E(should)72 123.6 Q(set nomagic)108 141.6 Q .167(in your EXINIT) 72 159.6 R 5.167(.I)-.74 G 2.667(nt)-5.167 G .167 (his case, only the characters)-2.667 F/F3 10/Symbol SF2.666 E F0 (and)2.666 E F1($)2.666 E F0 .166(are special in patterns.)2.666 F .166 (The character)5.166 F F1(\\)2.666 E F0 .166(is also then special)2.666 F .69(\(as it is most e)72 171.6 R -.15(ve)-.25 G .691 (rywhere in the system\), and may be used to get at the an e).15 F .691 (xtended pattern matching f)-.15 F(acility)-.1 E 5.691(.I)-.65 G 3.191 (ti)-5.691 G(s)-3.191 E .838(also necessary to use a \\ before a)72 183.6 R F1(/)3.338 E F0 .838(in a forw)3.338 F .838(ard scan or a)-.1 F F1(?)3.338 E F0 .838(in a backw)3.338 F .838(ard scan, in an)-.1 F 3.338 (yc)-.15 G 3.338(ase. The)-3.338 F(follo)3.338 E .838(wing table)-.25 F (gi)72 195.6 Q -.15(ve)-.25 G 2.5(st).15 G(he e)-2.5 E (xtended forms when)-.15 E F1(magic)2.5 E F0(is set.)2.5 E F3108 219.6 Q F0(at be)32.22 E(ginning of pattern, matches be)-.15 E (ginning of line)-.15 E F1($)108 231.6 Q F0 (at end of pattern, matches end of line)33.25 E F1(.)108 243.6 Q F0 (matches an)35.75 E 2.5(yc)-.15 G(haracter)-2.5 E F1(\\<)108 255.6 Q F0 (matches the be)29.77 E(ginning of a w)-.15 E(ord)-.1 E F1(\\>)108 267.6 Q F0(matches the end of a w)29.77 E(ord)-.1 E F1([)108 279.6 Q/F4 10 /Times-Italic@0 SF(str)A F1(])A F0(matches an)21.03 E 2.5(ys)-.15 G (ingle character in)-2.5 E F4(str)2.5 E F1([)108 291.6 Q F3A F4(str) A F1(])A F0(matches an)15 E 2.5(ys)-.15 G(ingle character not in)-2.5 E F4(str)2.5 E F1([)108 303.6 Q F4(x)A F1A F4(y)A F1(])A F0 (matches an)17.01 E 2.5(yc)-.15 G(haracter between)-2.5 E F4(x)2.5 E F0 (and)2.5 E F4(y)2.5 E F1(*)108 315.6 Q F0(matches an)33.25 E 2.5(yn)-.15 G(umber of the preceding pattern)-2.5 E(If you use)72 339.6 Q F1 (nomagic)2.5 E F0(mode, then the)2.5 E F1 2.5(.[)2.5 G F0(and)A F1(*)2.5 E F0(primiti)2.5 E -.15(ve)-.25 G 2.5(sa).15 G(re gi)-2.5 E -.15(ve)-.25 G 2.5(nw).15 G(ith a preceding \\.)-2.5 E F1 2.5(8.5. Mor)72 363.6 R 2.5 (ea)-.18 G(bout input mode)-2.5 E F0 .456 (There are a number of characters which you can use to mak)97 379.2 R 2.957(ec)-.1 G .457(orrections during input mode.)-2.957 F .457 (These are sum-)5.457 F(marized in the follo)72 391.2 Q(wing table.)-.25 E F1(^H)108 421.2 Q F0(deletes the last input character)26.1 E F1(^W)108 433.2 Q F0(deletes the last input w)23.88 E(ord, de\214ned as by)-.1 E F1(b)2.5 E(erase)108 445.2 Q F0(your erase character)15 E 2.5(,s)-.4 G (ame as)-2.5 E F1(^H)2.5 E(kill)108 457.2 Q F0(your kill character)23.31 E 2.5(,d)-.4 G(eletes the input on this line)-2.5 E F1(\\)108 469.2 Q F0 (escapes a follo)34.43 E(wing)-.25 E F1(^H)2.5 E F0 (and your erase and kill)2.5 E/F5 8/Times-Bold@0 SF(ESC)108 481.2 Q F0 (ends an insertion)21.65 E F5(DEL)108 493.2 Q F0 (interrupts an insertion, terminating it abnormally)20.762 E F5(CR)108 505.2 Q F0(starts a ne)25.658 E 2.5(wl)-.25 G(ine)-2.5 E F1(^D)108 517.2 Q F0(backtabs o)26.66 E -.15(ve)-.15 G(r).15 E F4(autoindent)2.5 E F1 (0^D)108 529.2 Q F0(kills all the)21.66 E F4(autoindent)2.5 E F3108 541.2 Q F1(^D)A F0(same as)20.63 E F1(0^D)2.5 E F0 2.5(,b)C (ut restores indent ne)-2.7 E(xt line)-.15 E F1(^V)108 553.2 Q F0 (quotes the ne)26.66 E(xt non-printing character into the \214le)-.15 E .47(The most usual w)97 586.8 R .47 (ay of making corrections to input is by typing)-.1 F F1(^H)2.969 E F0 .469(to correct a single character)2.969 F 2.969(,o)-.4 G 2.969(rb) -2.969 G 2.969(yt)-2.969 G(yping)-2.969 E .777(one or more)72 598.8 R F1 (^W)3.277 E F0 1.877 -.55('s t)D 3.277(ob).55 G .777(ack o)-3.277 F -.15 (ve)-.15 G 3.278(ri).15 G .778(ncorrect w)-3.278 F 3.278(ords. If)-.1 F .778(you use)3.278 F F1(#)3.278 E F0 .778 (as your erase character in the normal system, it will)3.278 F -.1(wo)72 610.8 S(rk lik).1 E(e)-.1 E F1(^H)2.5 E F0(.)A -1.1(Yo)97 626.4 S .579 (ur system kill character)1.1 F 3.079(,n)-.4 G(ormally)-3.079 E F1(@) 3.079 E F0(,)A F1(^X)3.079 E F0(or)3.079 E F1(^U)3.079 E F0 3.079(,w)C .579(ill erase all the input you ha)-3.079 F .879 -.15(ve g)-.2 H -2.15 -.25(iv e).15 H 3.079(no).25 G 3.079(nt)-3.079 G .579(he current line.) -3.079 F .392(In general, you can neither erase input back around a lin\ e boundary nor can you erase characters which you did not)72 638.4 R .572(insert with this insertion command.)72 650.4 R 2.172 -.8(To m)5.572 H(ak).8 E 3.072(ec)-.1 G .572(orrections on the pre)-3.072 F .571 (vious line after a ne)-.25 F 3.071(wl)-.25 G .571 (ine has been started you)-3.071 F .328(can hit)72 662.4 R F2(ESC)2.828 E F0 .328(to end the insertion, mo)2.828 F .628 -.15(ve ove)-.15 H 2.828 (ra).15 G .328(nd mak)-2.828 F 2.828(et)-.1 G .329 (he correction, and then return to where you were to continue.)-2.828 F (The command)72 674.4 Q F1(A)2.5 E F0(which appends at the end of the c\ urrent line is often useful for continuing.)2.5 E .554(If you wish to t\ ype in your erase or kill character \(say # or @\) then you must preced\ e it with a)97 690 R F1(\\)3.054 E F0 3.054(,j)C .554(ust as you)-3.054 F -.1(wo)72 702 S .061(uld do at the normal system command le).1 F -.15 (ve)-.25 G 2.561(l. A).15 F .061(more general w)2.561 F .061 (ay of typing non-printing characters into the \214le is)-.1 F .398 (to precede them with a)72 714 R F1(^V)2.898 E F0 5.398(.T)C(he)-5.398 E F1(^V)2.898 E F0 .398(echoes as a)2.898 F F32.898 E F0 .398 (character on which the cursor rests.)2.898 F .397 (This indicates that the editor)5.397 F -.15(ex)72 726 S .164 (pects you to type a control character).15 F 5.164(.I)-.55 G 2.664(nf) -5.164 G .164(act you may type an)-2.764 F 2.664(yc)-.15 G .164 (haracter and it will be inserted into the \214le at that)-2.664 F EP %%Page: 19 19 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-19)-249.71 E(point.*)72 84 Q .041 (If you are using)97 99.6 R/F1 10/Times-Italic@0 SF(autoindent)2.541 E F0 .041(you can backtab o)2.541 F -.15(ve)-.15 G 2.541(rt).15 G .04 (he indent which it supplies by typing a)-2.541 F/F2 10/Times-Bold@0 SF (^D)2.54 E F0 5.04(.T)C .04(his backs up to)-5.04 F(a)72 111.6 Q F1 (shiftwidth)2.5 E F0(boundary)2.5 E 5(.T)-.65 G(his only w)-5 E (orks immediately after the supplied)-.1 E F1(autoindent)2.5 E F0(.)A .35(When you are using)97 127.2 R F1(autoindent)2.85 E F0 .35 (you may wish to place a label at the left mar)2.85 F .351 (gin of a line.)-.18 F .351(The w)5.351 F .351(ay to do this)-.1 F .151 (easily is to type)72 139.2 R/F3 10/Symbol SF2.651 E F0 .151 (and then)2.651 F F2(^D)2.651 E F0 5.151(.T)C .151(he editor will mo) -5.151 F .45 -.15(ve t)-.15 H .15(he cursor to the left mar).15 F .15 (gin for one line, and restore the pre)-.18 F(vi-)-.25 E .148 (ous indent on the ne)72 151.2 R 2.648(xt. Y)-.15 F .148 (ou can also type a)-1.1 F F2(0)2.648 E F0(follo)2.648 E .148 (wed immediately by a)-.25 F F2(^D)2.648 E F0 .148 (if you wish to kill all the indent and not)2.648 F(ha)72 163.2 Q .3 -.15(ve i)-.2 H 2.5(tc).15 G(ome back on the ne)-2.5 E(xt line.)-.15 E F2 2.5(8.6. Upper)72 187.2 R(case only terminals)2.5 E F0 .277 (If your terminal has only upper case, you can still use)97 202.8 R F1 (vi)2.777 E F0 .277(by using the normal system con)2.777 F -.15(ve)-.4 G .277(ntion for typing on).15 F .469(such a terminal.)72 214.8 R .469 (Characters which you normally type are con)5.469 F -.15(ve)-.4 G .469 (rted to lo).15 F .47(wer case, and you can type upper case let-)-.25 F .125(ters by preceding them with a \\.)72 226.8 R .125 (The characters { ~ } | \222 are not a)5.125 F -.25(va)-.2 G .124 (ilable on such terminals, b).25 F .124(ut you can escape them)-.2 F (as \\\( \\)72 238.8 Q F3A F0(\\\) \\! \\\264.)2.5 E (These characters are represented on the display in the same w)5 E (ay the)-.1 E 2.5(ya)-.15 G(re typed.\210)-2.5 E F2 2.5(8.7. V)72 262.8 R 2.5(ia)-.37 G(nd ex)-2.5 E F1 -.74(Vi)97 278.4 S F0 .786 (is actually one mode of editing within the editor)4.026 F F1 -.2(ex) 3.286 G(.).2 E F0 .786(When you are running)5.786 F F1(vi)3.286 E F0 .787(you can escape to the line)3.286 F .504(oriented editor of)72 290.4 R F1 -.2(ex)3.004 G F0 .504(by gi)3.204 F .504(ving the command)-.25 F F2(Q)3.004 E F0 5.504(.A)C .504(ll of the)-5.504 F F2(:)3.004 E F0 .503 (commands which were introduced abo)3.004 F .803 -.15(ve a)-.15 H .503 (re a).15 F -.25(va)-.2 G(ilable).25 E(in)72 302.4 Q F1 -.2(ex)3.168 G (.).2 E F0(Lik)5.668 E -.25(ew)-.1 G .668(ise, most).25 F F1 -.2(ex) 3.168 G F0 .668(commands can be in)3.368 F -.2(vo)-.4 G -.1(ke).2 G 3.168(df).1 G(rom)-3.168 E F1(vi)3.168 E F0 .668(using :.)3.168 F .668 (Just gi)5.668 F .968 -.15(ve t)-.25 H .668(hem without the).15 F F2(:) 3.168 E F0 .669(and follo)3.168 F 3.169(wt)-.25 G(hem)-3.169 E(with a)72 314.4 Q/F4 8/Times-Roman@0 SF(CR)2.5 E F0(.)A .936 (In rare instances, an internal error may occur in)97 330 R F1(vi.)3.436 E F0 .936(In this case you will get a diagnostic and be left in the) 5.936 F .474(command mode of)72 342 R F1 -.2(ex)2.974 G(.).2 E F0 -1.1 (Yo)5.474 G 2.974(uc)1.1 G .474(an then sa)-2.974 F .774 -.15(ve y)-.2 H .474(our w).15 F .474(ork and quit if you wish by gi)-.1 F .475 (ving a command)-.25 F F2(x)2.975 E F0 .475(after the)2.975 F F2(:)2.975 E F0(which)2.975 E F1 -.2(ex)72 354 S F0 (prompts you with, or you can reenter)2.7 E F1(vi)2.5 E F0(by gi)2.5 E (ving)-.25 E F1 -.2(ex)2.5 G F0(a)2.7 E F1(vi)2.5 E F0(command.)2.5 E .619(There are a number of things which you can do more easily in)97 369.6 R F1 -.2(ex)3.119 G F0 .619(than in)3.319 F F1(vi.)3.119 E F0 .619 (Systematic changes in line ori-)5.619 F .366 (ented material are particularly easy)72 381.6 R 5.366(.Y)-.65 G .366 (ou can read the adv)-6.466 F .366 (anced editing documents for the editor)-.25 F F1(ed)2.866 E F0 .366 (to \214nd out a lot)2.866 F .158(more about this style of editing.)72 393.6 R .157(Experienced users often mix their use of)5.158 F F1 -.2(ex) 2.657 G F0 .157(command mode and)2.857 F F1(vi)2.657 E F0 .157 (command mode)2.657 F(to speed the w)72 405.6 Q(ork the)-.1 E 2.5(ya) -.15 G(re doing.)-2.5 E F2 2.5(8.8. Open)72 429.6 R (mode: vi on hardcopy terminals and `)2.5 E(`glass tty')-.63 E(s')-.37 E 2.5<2788>-.63 G F0 .472(If you are on a hardcop)97 445.2 R 2.973(yt)-.1 G .473(erminal or a terminal which does not ha)-2.973 F .773 -.15 (ve a c)-.2 H .473(ursor which can mo).15 F .773 -.15(ve o)-.15 H .973 -.25(ff t).15 H .473(he bottom).25 F .363 (line, you can still use the command set of)72 457.2 R F1(vi,)2.863 E F0 -.2(bu)2.863 G 2.863(ti).2 G 2.863(nad)-2.863 G(if)-2.863 E .363 (ferent mode.)-.25 F .363(When you gi)5.363 F .663 -.15(ve a)-.25 H F1 (vi)3.013 E F0 .363(command, the editor will)2.863 F .671 (tell you that it is using)72 469.2 R F1(open)3.171 E F0 3.172 (mode. This)3.172 F .672(name comes from the)3.172 F F1(open)3.172 E F0 .672(command in)3.172 F F1 -.2(ex)3.172 G(,).2 E F0 .672 (which is used to get into the)3.172 F(same mode.)72 481.2 Q (The only dif)97 496.8 Q(ference between)-.25 E F1(visual)2.5 E F0 (mode and)2.5 E F1(open)2.5 E F0(mode is the w)2.5 E(ay in which the te) -.1 E(xt is displayed.)-.15 E(In)97 512.4 Q F1(open)2.975 E F0 .475 (mode the editor uses a single line windo)2.975 F 2.975(wi)-.25 G .474 (nto the \214le, and mo)-2.975 F .474(ving backw)-.15 F .474 (ard and forw)-.1 F .474(ard in the \214le)-.1 F .791(causes ne)72 524.4 R 3.291(wl)-.25 G .791(ines to be displayed, al)-3.291 F -.1(wa)-.1 G .791(ys belo).1 F 3.291(wt)-.25 G .792(he current line.)-3.291 F -1 -.8 (Tw o)5.792 H .792(commands of)4.092 F F1(vi)3.292 E F0 -.1(wo)3.292 G .792(rk dif).1 F .792(ferently in)-.25 F F1(open:)3.292 E F2(z)3.292 E F0(and)72 536.4 Q F2(^R)2.657 E F0 5.157(.T)C(he)-5.157 E F2(z)2.657 E F0 .157(command does not tak)2.657 F 2.657(ep)-.1 G .157(arameters, b) -2.657 F .157(ut rather dra)-.2 F .156(ws a windo)-.15 F 2.656(wo)-.25 G 2.656(fc)-2.656 G(onte)-2.656 E .156(xt around the current line and)-.15 F(then returns you to the current line.)72 548.4 Q .27 (If you are on a hardcop)97 564 R 2.77(yt)-.1 G .27(erminal, the)-2.77 F F2(^R)2.77 E F0 .27(command will retype the current line.)2.77 F .27 (On such terminals, the editor)5.27 F .356(normally uses tw)72 576 R 2.856(ol)-.1 G .356(ines to represent the current line.)-2.856 F .355 (The \214rst line is a cop)5.356 F 2.855(yo)-.1 G 2.855(ft)-2.855 G .355 (he line as you started to edit it, and)-2.855 F .482(you w)72 588 R .482(ork on the line belo)-.1 F 2.982(wt)-.25 G .482(his line.)-2.982 F .482(When you delete characters, the editor types a number of \\')5.482 F 2.983(st)-.55 G 2.983(os)-2.983 G(ho)-2.983 E 2.983(wy)-.25 G .483 (ou the)-2.983 F .794(characters which are deleted.)72 600 R .793(The e\ ditor also reprints the current line soon after such changes so that yo\ u can see)5.793 F(what the line looks lik)72 612 Q 2.5(ea)-.1 G -.05(ga) -2.5 G(in.).05 E .602(It is sometimes useful to use this mode on v)97 627.6 R .602(ery slo)-.15 F 3.103(wt)-.25 G .603 (erminals which can support)-3.103 F F1(vi)3.103 E F0 .603 (in the full screen mode.)3.103 F -1.1(Yo)72 639.6 S 2.5(uc)1.1 G (an do this by entering)-2.5 E F1 -.2(ex)2.5 G F0(and using an)2.7 E F1 (open)2.5 E F0(command.)2.5 E .32 LW 144 658.2 72 658.2 DL F4 2.356(*T) 72 668.2 S .356(his is not quite true.)-2.356 F .356 (The implementation of the editor does not allo)4.356 F 2.356(wt)-.2 G (he)-2.356 E/F5 6/Times-Roman@0 SF(NULL)2.356 E F4(\()2.356 E/F6 8 /Times-Bold@0 SF(^@)A F4 2.356(\)c)C .356 (haracter to appear in \214les.)-2.356 F .356(Also the)4.356 F F5(LF) 2.356 E F4 .355(\(linefeed or)2.356 F F6(^J)2.355 E F4(\))A .089(charac\ ter is used by the editor to separate lines in the \214le, so it cannot\ appear in the middle of a line.)72 678.2 R -.88(Yo)4.089 G 2.089(uc).88 G .089(an insert an)-2.089 F 2.089(yo)-.12 G .089(ther character)-2.089 F 2.089(,h)-.32 G -.2(ow)-2.089 G -1.72 -.2(ev e).2 H -.32(r,).2 G .647 (if you w)72 688.2 R .647(ait for the editor to echo the)-.08 F/F7 8 /Symbol SF2.647 E F4 .647(before you type the character)2.647 F 4.647(.I)-.44 G 2.647(nf)-4.647 G .647 (act, the editor will treat a follo)-2.727 F .647 (wing letter as a request for the corre-)-.2 F .337 (sponding control character)72 698.2 R 4.338(.T)-.44 G .338 (his is the only w)-4.338 F .338(ay to type)-.08 F F6(^S)2.338 E F4(or) 2.338 E F6(^Q)2.338 E F4 2.338(,s)C .338 (ince the system normally uses them to suspend and resume output and ne) -2.338 F -.12(ve)-.2 G(r).12 E(gi)72 708.2 Q -.12(ve)-.2 G 2(st).12 G (hem to the editor to process.)-2 E 2<8854>72 720 S (he \\ character you gi)-2 E .24 -.12(ve w)-.2 H (ill not echo until you type another k).12 E -.12(ey)-.08 G(.)-.4 E EP %%Page: 20 20 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-20 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF(Ackno)72 84 Q(wledgements)-.1 E F0 1.082 (Bruce Englar encouraged the early de)97 99.6 R -.15(ve)-.25 G 1.081 (lopment of this display editor).15 F 6.081(.P)-.55 G 1.081(eter K) -6.081 F 1.081(essler helped bring sanity to)-.25 F -.15(ve)72 111.6 S .844(rsion 2').15 F 3.344(sc)-.55 G .844(ommand layout.)-3.344 F .844 (Bill Jo)5.844 F 3.344(yw)-.1 G .844(rote v)-3.344 F .845 (ersions 1 and 2.0 through 2.7, and created the frame)-.15 F -.1(wo)-.25 G .845(rk that users).1 F .114(see in the present editor)72 123.6 R 5.114(.M)-.55 G .114 (ark Horton added macros and other features and made the editor w)-5.114 F .114(ork on a lar)-.1 F .114(ge number)-.18 F (of terminals and Unix systems.)72 135.6 Q F1 -.25(Ap)72 159.6 S (pendix: character functions).25 E F0 .17(This appendix gi)97 175.2 R -.15(ve)-.25 G 2.67(st).15 G .17(he uses the editor mak)-2.67 F .171 (es of each character)-.1 F 5.171(.T)-.55 G .171 (he characters are presented in their order in)-5.171 F(the)72 187.2 Q /F2 8/Times-Roman@0 SF(ASCII)3.235 E F0 .735(character set:)3.235 F .734 (Control characters come \214rst, then most special characters, then th\ e digits, upper and then)5.735 F(lo)72 199.2 Q(wer case characters.)-.25 E -.15(Fo)97 214.8 S 3.159(re).15 G .659 (ach character we tell a meaning it has as a command and an)-3.159 F 3.159(ym)-.15 G .659(eaning it has during an insert.)-3.159 F .66 (If it has)5.659 F .148 (only meaning as a command, then only this is discussed.)72 226.8 R .148 (Section numbers in parentheses indicate where the charac-)5.148 F (ter is discussed; a `f)72 238.8 Q 2.5('a).55 G(fter the section number\ means that the character is mentioned in a footnote.)-2.5 E F1(^@)72 254.4 Q F0 .202(Not a command character)62.37 F 5.202(.I)-.55 G 2.702 (ft)-5.202 G .202(yped as the \214rst character of an insertion it is r\ eplaced with the last)-2.702 F(te)147 266.4 Q .068 (xt inserted, and the insert terminates.)-.15 F .068 (Only 128 characters are sa)5.068 F -.15(ve)-.2 G 2.567(df).15 G .067 (rom the last insert; if more)-2.567 F .821 (characters were inserted the mechanism is not a)147 278.4 R -.25(va)-.2 G 3.321(ilable. A).25 F F1(^@)3.321 E F0 .821 (cannot be part of the \214le due to)3.321 F (the editor implementation \(7.5f\).)147 290.4 Q F1(^A)72 306 Q F0 (Unused.)64.45 E F1(^B)72 321.6 Q F0(Backw)65 E .163(ard windo)-.1 F 3.963 -.65(w. A)-.25 H .162(count speci\214es repetition.)3.312 F -1 -.8 (Tw o)5.162 H .162(lines of continuity are k)3.462 F .162 (ept if possible \(2.1,)-.1 F(6.1, 7.2\).)147 333.6 Q F1(^C)72 349.2 Q F0(Unused.)64.45 E F1(^D)72 364.8 Q F0 .621(As a command, scrolls do) 64.45 F .621(wn a half-windo)-.25 F 3.121(wo)-.25 G 3.121(ft)-3.121 G -.15(ex)-3.121 G 3.121(t. A).15 F .621(count gi)3.121 F -.15(ve)-.25 G 3.121(st).15 G .622(he number of \(logical\) lines)-3.121 F .697 (to scroll, and is remembered for future)147 376.8 R F1(^D)3.196 E F0 (and)3.196 E F1(^U)3.196 E F0 .696(commands \(2.1, 7.2\).)3.196 F .696 (During an insert, back-)5.696 F .631(tabs o)147 388.8 R -.15(ve)-.15 G (r).15 E/F3 10/Times-Italic@0 SF(autoindent)3.131 E F0 .631 (white space at the be)3.131 F .631 (ginning of a line \(6.6, 7.5\); this white space cannot be)-.15 F (backspaced o)147 400.8 Q -.15(ve)-.15 G -.55(r.).15 G F1(^E)72 416.4 Q F0 .335(Exposes one more line belo)65 F 2.835(wt)-.25 G .335 (he current screen in the \214le, lea)-2.835 F .334 (ving the cursor where it is if possi-)-.2 F 2.5(ble. \(V)147 428.4 R (ersion 3 only)-1.11 E(.\))-.65 E F1(^F)72 444 Q F0 -.15(Fo)65.56 G(rw) .15 E .648(ard windo)-.1 F 4.448 -.65(w. A)-.25 H .648 (count speci\214es repetition.)3.798 F -1 -.8(Tw o)5.648 H .649 (lines of continuity are k)3.949 F .649(ept if possible \(2.1,)-.1 F (6.1, 7.2\).)147 456 Q F1(^G)72 471.6 Q F0(Equi)63.89 E -.25(va)-.25 G .23(lent to).25 F F1(:f)2.73 E F2(CR)A F0 2.73(,p)C .229(rinting the cu\ rrent \214le, whether it has been modi\214ed, the current line number) -2.73 F (and the number of lines in the \214le, and the percentage of the w)147 483.6 Q(ay through the \214le that you are.)-.1 E F1(^H \()72 499.2 Q F2 (BS)A F1(\))A F0 .149(Same as)44.946 F F1 .149(left arr)2.649 F -.1(ow) -.18 G F0 5.149(.\().1 G(See)-5.149 E F1(h)2.649 E F0 2.649(\). During)B .149(an insert, eliminates the last input character)2.649 F 2.65(,b)-.4 G .15(acking o)-2.65 F -.15(ve)-.15 G 2.65(ri).15 G(t)-2.65 E -.2(bu)147 511.2 S 3.24(tn).2 G .739(ot erasing it; it remains so you can see what\ you typed if you wish to type something only)-3.24 F(slightly dif)147 523.2 Q(ferent \(3.1, 7.5\).)-.25 E F1(^I \()72 538.8 Q F2 -.744(TA)C(B) .744 E F1(\))A F0 .123(Not a command character)43.364 F 5.123(.W)-.55 G .123(hen inserted it prints as some number of spaces.)-5.123 F .124 (When the cursor is)5.123 F .199(at a tab character it rests at the las\ t of the spaces which represent the tab)147 550.8 R 5.198(.T)-.4 G .198 (he spacing of tabstops)-5.198 F(is controlled by the)147 562.8 Q F3 (tabstop)2.5 E F0(option \(4.1, 6.6\).)2.5 E F1(^J \()72 578.4 Q F2(LF)A F1(\))A F0(Same as)48.174 E F1(do)2.5 E(wn arr)-.1 E -.1(ow)-.18 G F0 (\(see)2.6 E F1(j)2.5 E F0(\).)A F1(^K)72 594 Q F0(Unused.)63.89 E F1 (^L)72 609.6 Q F0(The)65 E F2(ASCII)3.722 E F0 1.222(formfeed character) 3.722 F 3.722(,t)-.4 G 1.222 (his causes the screen to be cleared and redra)-3.722 F 3.722(wn. This) -.15 F 1.223(is useful)3.723 F 1.456(after a transmission error)147 621.6 R 3.956(,i)-.4 G 3.956(fc)-3.956 G 1.455 (haracters typed by a program other than the editor scramble the)-3.956 F(screen, or after output is stopped by an interrupt \(5.4, 7.2f\).)147 633.6 Q F1(^M \()72 649.2 Q F2(CR)A F1(\))A F0 3.674(Ac)42.398 G 1.174 (arriage return adv)-3.674 F 1.174(ances to the ne)-.25 F 1.175 (xt line, at the \214rst non-white position in the line.)-.15 F(Gi)6.175 E -.15(ve)-.25 G 3.675(na).15 G .327(count, it adv)147 661.2 R .327 (ances that man)-.25 F 2.827(yl)-.15 G .327(ines \(2.3\).)-2.827 F .327 (During an insert, a)5.327 F F2(CR)2.827 E F0 .327 (causes the insert to continue onto)2.827 F(another line \(3.1\).)147 673.2 Q F1(^N)72 688.8 Q F0(Same as)64.45 E F1(do)2.5 E(wn arr)-.1 E -.1 (ow)-.18 G F0(\(see)2.6 E F1(j)2.5 E F0(\).)A F1(^O)72 704.4 Q F0 (Unused.)63.89 E EP %%Page: 21 21 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-21)-249.71 E/F1 10/Times-Bold@0 SF(^P)72 84 Q F0 (Same as)65.56 E F1(up arr)2.5 E -.1(ow)-.18 G F0(\(see)2.6 E F1(k)2.5 E F0(\).)A F1(^Q)72 99.6 Q F0 .879(Not a command character)63.89 F 5.879 (.I)-.55 G 3.379(ni)-5.879 G .879(nput mode,)-3.379 F F1(^Q)3.379 E F0 .879(quotes the ne)3.379 F .88(xt character)-.15 F 3.38(,t)-.4 G .88 (he same as)-3.38 F F1(^V)3.38 E F0 3.38(,e)C(xcept)-3.53 E (that some teletype dri)147 111.6 Q -.15(ve)-.25 G(rs will eat the).15 E F1(^Q)2.5 E F0(so that the editor ne)2.5 E -.15(ve)-.25 G 2.5(rs).15 G (ees it.)-2.5 E F1(^R)72 127.2 Q F0(Redra)64.45 E 1.313(ws the current \ screen, eliminating logical lines not corresponding to ph)-.15 F 1.312 (ysical lines \(lines)-.05 F .59 (with only a single @ character on them\).)147 139.2 R .59(On hardcop) 5.59 F 3.09(yt)-.1 G .59(erminals in)-3.09 F/F2 10/Times-Italic@0 SF (open)3.09 E F0 .59(mode, retypes the cur)3.09 F(-)-.2 E (rent line \(5.4, 7.2, 7.8\).)147 151.2 Q F1(^S)72 166.8 Q F0 2.5 (Unused. Some)66.11 F(teletype dri)2.5 E -.15(ve)-.25 G(rs use).15 E F1 (^S)2.5 E F0(to suspend output until pressed.)2.5 E F1(^Q)A F0(is)A F1 (^T)72 182.4 Q F0 .444(Not a command character)65 F 5.443(.D)-.55 G .443 (uring an insert, with)-5.443 F F2(autoindent)2.943 E F0 .443 (set and at the be)2.943 F .443(ginning of the line,)-.15 F(inserts)147 194.4 Q F2(shiftwidth)2.5 E F0(white space.)2.5 E F1(^U)72 210 Q F0 .78 (Scrolls the screen up, in)64.45 F -.15(ve)-.4 G(rting).15 E F1(^D)3.28 E F0 .78(which scrolls do)3.28 F 3.281(wn. Counts)-.25 F -.1(wo)3.281 G .781(rk as the).1 F 3.281(yd)-.15 G 3.281(of)-3.281 G(or)-3.281 E F1(^D) 3.281 E F0 3.281(,a)C .781(nd the)-3.281 F(pre)147 222 Q .604 (vious scroll amount is common to both.)-.25 F .603(On a dumb terminal,) 5.603 F F1(^U)3.103 E F0 .603(will often necessitate clear)3.103 F(-)-.2 E(ing and redra)147 234 Q (wing the screen further back in the \214le \(2.1, 7.2\).)-.15 E F1(^V) 72 249.6 Q F0 .351(Not a command character)64.45 F 5.351(.I)-.55 G 2.852 (ni)-5.351 G .352(nput mode, quotes the ne)-2.852 F .352 (xt character so that it is possible to insert)-.15 F (non-printing and special characters into the \214le \(4.2, 7.5\).)147 261.6 Q F1(^W)72 277.2 Q F0 .354(Not a command character)61.67 F 5.354 (.D)-.55 G .354(uring an insert, backs up as)-5.354 F F1(b)2.854 E F0 -.1(wo)2.854 G .353(uld in command mode; the deleted).1 F (characters remain on the display \(see)147 289.2 Q F1(^H)2.5 E F0 2.5 (\)\()C(7.5\).)-2.5 E F1(^X)72 304.8 Q F0(Unused.)64.45 E F1(^Y)72 320.4 Q F0 .935(Exposes one more line abo)64.45 F 1.235 -.15(ve t)-.15 H .936 (he current screen, lea).15 F .936 (ving the cursor where it is if possible.)-.2 F(\(No)5.936 E 1.403 (mnemonic v)147 332.4 R 1.403(alue for this k)-.25 F -.15(ey)-.1 G 3.903 (;h).15 G -.25(ow)-3.903 G -2.15 -.25(ev e).25 H 2.203 -.4(r, i).25 H 3.902(ti).4 G 3.902(sn)-3.902 G -.15(ex)-3.902 G 3.902(tt).15 G(o)-3.902 E F1(^U)3.902 E F0 1.402(which scrolls up a b)3.902 F 3.902(unch.\) \(V) -.2 F 1.402(ersion 3)-1.11 F(only)147 344.4 Q(.\))-.65 E F1(^Z)72 360 Q F0 .324(If supported by the Unix system, stops the editor)65 F 2.825(,e) -.4 G .325(xiting to the top le)-2.975 F -.15(ve)-.25 G 2.825(ls).15 G 2.825(hell. Same)-2.825 F(as)2.825 E F1(:stop)2.825 E/F3 8/Times-Roman@0 SF(CR)A F0(.)A(Otherwise, unused.)147 372 Q F1(^[ \()72 387.6 Q F3(ESC)A F1(\))A F0 .078(Cancels a partially formed command, such as a)44.508 F F1(z)2.578 E F0 .077(when no follo)2.577 F .077 (wing character has yet been gi)-.25 F -.15(ve)-.25 G(n;).15 E .924 (terminates inputs on the last line \(read by commands such as)147 399.6 R F1 3.424(:/)3.424 G F0(and)A F1(?)3.424 E F0 .924 (\); ends insertions of ne)B(w)-.25 E(te)147 411.6 Q .413(xt into the b) -.15 F(uf)-.2 E(fer)-.25 E 5.413(.I)-.55 G 2.913(fa)-5.413 G(n)-2.913 E F3(ESC)2.913 E F0 .413(is gi)2.913 F -.15(ve)-.25 G 2.913(nw).15 G .412 (hen quiescent in command state, the editor rings the bell)-2.913 F 1.074(or \215ashes the screen.)147 423.6 R -1.1(Yo)6.074 G 3.574(uc)1.1 G 1.074(an thus hit)-3.574 F F3(ESC)3.574 E F0 1.074(if you don')3.574 F 3.574(tk)-.18 G(no)-3.574 E 3.575(ww)-.25 G 1.075 (hat is happening till the editor)-3.575 F .01(rings the bell.)147 435.6 R .01(If you don')5.01 F 2.51(tk)-.18 G(no)-2.51 E 2.51(wi)-.25 G 2.51 (fy)-2.51 G .01(ou are in insert mode you can type)-2.51 F F3(ESC)2.51 E F1(a)A F0 2.51(,a)C .009(nd then material to)-2.51 F .229(be input; the\ material will be inserted correctly whether or not you were in insert \ mode when you)147 447.6 R(started \(1.5, 3.1, 7.5\).)147 459.6 Q F1(^\\) 72 475.2 Q F0(Unused.)68.89 E F1(^])72 490.8 Q F0 .519 (Searches for the w)68.34 F .518 (ord which is after the cursor as a tag.)-.1 F(Equi)5.518 E -.25(va)-.25 G .518(lent to typing).25 F F1(:ta)3.018 E F0 3.018(,t)C .518(his w) -3.018 F .518(ord, and)-.1 F(then a)147 502.8 Q F3(CR)2.5 E F0 5(.M)C (nemonically)-5 E 2.5(,t)-.65 G(his command is `)-2.5 E(`go right to') -.74 E 2.5('\()-.74 G(7.3\).)-2.5 E F1(^)72 518.4 Q/F4 10/Symbol SFA F0(Equi)65.64 E -.25(va)-.25 G 1.407(lent to).25 F F1 1.407(:e #)3.907 F F3(CR)A F0 3.907(,r)C 1.407(eturning to the pre)-3.907 F 1.408 (vious position in the last edited \214le, or editing a \214le)-.25 F .473(which you speci\214ed if you got a `No write since last change dia\ gnostic' and do not w)147 530.4 R .472(ant to ha)-.1 F -.15(ve)-.2 G .127(to type the \214le name ag)147 542.4 R .127(ain \(7.3\).)-.05 F (\(Y)5.128 E .128(ou ha)-1.1 F .428 -.15(ve t)-.2 H 2.628(od).15 G 2.628 (oa)-2.628 G F1(:w)A F0(before)2.628 E F1(^)2.628 E F4A F0 .128 (will w)2.628 F .128(ork in this case.)-.1 F .128(If you do)5.128 F (not wish to write the \214le you should do)147 554.4 Q F1(:e! #)2.5 E F3(CR)A F0(instead.\))2.5 E F1(^_)72 570 Q F0 2.5(Unused. Reserv)66.67 F (ed as the command character for the T)-.15 E (ektronix 4025 and 4027 terminal.)-.7 E F3(SP)72 585.6 Q -.32(AC)-.736 G (E).32 E F0(Same as)51.16 E F1(right arr)2.5 E -.1(ow)-.18 G F0(\(see) 2.6 E F1(l)2.5 E F0(\).)A F1(!)72 601.2 Q F0 .802(An operator)71.67 F 3.302(,w)-.4 G .802(hich processes lines from the b)-3.302 F(uf)-.2 E .801(fer with reformatting commands.)-.25 F -.15(Fo)5.801 G(llo).15 E(w) -.25 E F1(!)3.301 E F0(with)3.301 E .757 (the object to be processed, and then the command name terminated by)147 613.2 R F3(CR)3.258 E F0 5.758(.D)C(oubling)-5.758 E F1(!)3.258 E F0 .758(and pre-)3.258 F 1.496(ceding it by a count causes count lines to \ be \214ltered; otherwise the count is passed on to the)147 625.2 R .376 (object after the)147 637.2 R F1(!)2.876 E F0 5.376(.T)C(hus)-5.376 E F1 (2!})2.876 E F2(fmt)A F3(CR)A F0 .376(reformats the ne)2.876 F .377 (xt tw)-.15 F 2.877(op)-.1 G .377(aragraphs by running them through the) -2.877 F(program)147 649.2 Q F2(fmt)2.912 E F0 5.412(.I)C 2.912(fy) -5.412 G .412(ou are w)-2.912 F .411(orking on)-.1 F F3(LISP)2.911 E F0 2.911(,t)C .411(he command)-2.911 F F1(!%)2.911 E F2(grind)A F3(CR)A F0 .411(,* gi)B -.15(ve)-.25 G 2.911(na).15 G 2.911(tt)-2.911 G .411(he be) -2.911 F .411(ginning of a)-.15 F .353(function, will run the te)147 661.2 R .354(xt of the function through the)-.15 F F3(LISP)2.854 E F0 .354(grinder \(6.7, 7.3\).)2.854 F 1.954 -.8(To r)5.354 H .354 (ead a \214le or the).8 F(output of a command into the b)147 673.2 Q(uf) -.2 E(fer use)-.25 E F1(:r)2.5 E F0 2.5(\(7.3\). T)2.5 F 2.5(os)-.8 G (imply e)-2.5 E -.15(xe)-.15 G(cute a command use).15 E F1(:!)2.5 E F0 (\(7.3\).)2.5 E F1(")72 688.8 Q F0 .46(Precedes a named b)69.45 F(uf)-.2 E .46(fer speci\214cation.)-.25 F .46(There are named b)5.46 F(uf)-.2 E (fers)-.25 E F1(1\2559)2.96 E F0 .46(used for sa)2.96 F .46 (ving deleted te)-.2 F(xt)-.15 E(and named b)147 700.8 Q(uf)-.2 E(fers) -.25 E F1(a\255z)2.5 E F0(into which you can place te)2.5 E (xt \(4.3, 6.3\))-.15 E .32 LW 144 710 72 710 DL F3(*Both)72 720 Q/F5 8 /Times-Italic@0 SF(fmt)2 E F3(and)2 E F5(grind)2 E F3(are Berk)2 E(ele) -.08 E 2(yp)-.12 G(rograms and may not be present at all installations.) -2 E EP %%Page: 22 22 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-22 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF(#)72 84 Q F0 .227(The macro character which, when follo)70 F .227 (wed by a number)-.25 F 2.727(,w)-.4 G .227 (ill substitute for a function k)-2.727 F .527 -.15(ey o)-.1 H 2.727(nt) .15 G(er)-2.727 E(-)-.2 E .12(minals without function k)147 96 R -.15 (ey)-.1 G 2.62(s\().15 G 2.62(6.9\). In)-2.62 F .119 (input mode, if this is your erase character)2.62 F 2.619(,i)-.4 G 2.619 (tw)-2.619 G .119(ill delete the)-2.619 F 1.033 (last character you typed in input mode, and must be preceded with a)147 108 R F1(\\)3.534 E F0 1.034(to insert it, since it nor)3.534 F(-)-.2 E (mally backs o)147 120 Q -.15(ve)-.15 G 2.5(rt).15 G (he last input character you g)-2.5 E -2.25 -.2(av e)-.05 H(.).2 E F1($) 72 135.6 Q F0(Mo)70 E -.15(ve)-.15 G 2.72(st).15 G 2.72(ot)-2.72 G .22 (he end of the current line.)-2.72 F .22(If you)5.22 F F1 .219(:se list) 2.719 F/F2 8/Times-Roman@0 SF(CR)A F0 2.719(,t)C .219 (hen the end of each line will be sho)-2.719 F .219(wn by)-.25 F .154 (printing a)147 147.6 R F1($)2.654 E F0 .154 (after the end of the displayed te)2.654 F .154(xt in the line.)-.15 F (Gi)5.154 E -.15(ve)-.25 G 2.654(nac).15 G .155(ount, adv)-2.654 F .155 (ances to the count')-.25 F(th)-.18 E(follo)147 159.6 Q (wing end of line; thus)-.25 E F1(2$)2.5 E F0(adv)2.5 E (ances to the end of the follo)-.25 E(wing line.)-.25 E F1(%)72 175.2 Q F0(Mo)65 E -.15(ve)-.15 G 2.613(st).15 G 2.613(ot)-2.613 G .113 (he parenthesis or brace)-2.613 F F1 2.613({})2.613 G F0 .113 (which balances the parenthesis or brace at the current cursor)B (position.)147 187.2 Q F1(&)72 202.8 Q F0 2.5(As)66.67 G(ynon)-2.5 E (ym for)-.15 E F1(:&)2.5 E F2(CR)A F0 2.5(,b)C 2.5(ya)-2.5 G (nalogy with the)-2.5 E/F3 10/Times-Italic@0 SF -.2(ex)2.5 G F1(&)2.7 E F0(command.)2.5 E F172 218.4 Q F0 .012(When follo)71.67 F .012 (wed by a)-.25 F F12.512 E F0 .013(returns to the pre)2.513 F .013 (vious conte)-.25 F .013(xt at the be)-.15 F .013(ginning of a line.) -.15 F .013(The pre)5.013 F .013(vious con-)-.25 F(te)147 230.4 Q .886 (xt is set whene)-.15 F -.15(ve)-.25 G 3.386(rt).15 G .885 (he current line is mo)-3.386 F -.15(ve)-.15 G 3.385(di).15 G 3.385(nan) -3.385 G(on-relati)-3.385 E 1.185 -.15(ve w)-.25 H(ay).05 E 5.885(.W) -.65 G .885(hen follo)-5.885 F .885(wed by a letter)-.25 F F1(a)147 242.4 Q F0A F1(z)A F0 3.57(,r)C 1.07(eturns to the line which w) -3.57 F 1.07(as mark)-.1 F 1.071(ed with this letter with a)-.1 F F1(m) 3.571 E F0 1.071(command, at the \214rst non-)3.571 F .416 (white character in the line. \(2.2, 5.3\).)147 254.4 R .416 (When used with an operator such as)5.416 F F1(d)2.916 E F0 2.916(,t)C .415(he operation tak)-2.916 F(es)-.1 E .612(place o)147 266.4 R -.15 (ve)-.15 G 3.112(rc).15 G .612(omplete lines; if you use)-3.112 F F1<92> 3.112 E F0 3.112(,t)C .612(he operation tak)-3.112 F .613 (es place from the e)-.1 F .613(xact mark)-.15 F .613(ed place to)-.1 F (the current cursor position within the line.)147 278.4 Q F1(\()72 294 Q F0 .006(Retreats to the be)71.67 F .006 (ginning of a sentence, or to the be)-.15 F .006(ginning of a)-.15 F F2 (LISP)2.505 E F0(s-e)2.505 E .005(xpression if the)-.15 F F3(lisp)2.505 E F0(option)2.505 E .165(is set.)147 306 R 2.665(As)5.165 G .166 (entence ends at a)-2.665 F F1 2.666(.!)2.666 G F0(or)A F1(?)2.666 E F0 .166(which is follo)2.666 F .166 (wed by either the end of a line or by tw)-.25 F 2.666(os)-.1 G(paces.) -2.666 E(An)147 318 Q 3.014(yn)-.15 G .514(umber of closing)-3.014 F F1 3.014(\)]")3.014 G F0(and)A F13.013 E F0 .513 (characters may appear after the)3.013 F F1 3.013(.!)3.013 G F0(or)A F1 (?)3.013 E F0 3.013(,a)C .513(nd before the spaces)-3.013 F .382 (or end of line.)147 330 R .382(Sentences also be)5.382 F .382 (gin at paragraph and section boundaries \(see)-.15 F F1({)2.883 E F0 (and)2.883 E F1([[)2.883 E F0(belo)2.883 E 2.883(w\). A)-.25 F (count adv)147 342 Q(ances that man)-.25 E 2.5(ys)-.15 G (entences \(4.2, 6.8\).)-2.5 E F1(\))72 357.6 Q F0(Adv)71.67 E .615 (ances to the be)-.25 F .614(ginning of a sentence.)-.15 F 3.114(Ac) 5.614 G .614(ount repeats the ef)-3.114 F 3.114(fect. See)-.25 F F1(\() 3.114 E F0(abo)3.114 E .914 -.15(ve f)-.15 H .614(or the de\214ni-).15 F (tion of a sentence \(4.2, 6.8\).)147 369.6 Q F1(*)72 385.2 Q F0 (Unused.)70 E F1(+)72 400.8 Q F0(Same as)69.3 E F2(CR)2.5 E F0 (when used as a command.)2.5 E F1(,)72 416.4 Q F0(Re)72.5 E -.15(ve)-.25 G .158(rse of the last).15 F F1 2.658(fFt)2.658 G F0(or)A F1(T)2.658 E F0 .158(command, looking the other w)2.658 F .159 (ay in the current line.)-.1 F .159(Especially use-)5.159 F (ful after hitting too man)147 428.4 Q(y)-.15 E F1(;)2.5 E F0 2.5 (characters. A)2.5 F(count repeats the search.)2.5 E F172 444 Q F0 .232(Retreats to the pre)69.3 F .231 (vious line at the \214rst non-white character)-.25 F 5.231(.T)-.55 G .231(his is the in)-5.231 F -.15(ve)-.4 G .231(rse of).15 F F1(+)2.731 E F0(and)2.731 E F2(RETURN)2.731 E F0(.)A .732(If the line mo)147 456 R -.15(ve)-.15 G 3.232(dt).15 G 3.232(oi)-3.232 G 3.232(sn)-3.232 G .732 (ot on the screen, the screen is scrolled, or cleared and redra)-3.232 F .732(wn if this is)-.15 F 1.669(not possible.)147 468 R 1.668(If a lar) 6.669 F 1.668(ge amount of scrolling w)-.18 F 1.668 (ould be required the screen is also cleared and)-.1 F(redra)147 480 Q (wn, with the current line at the center \(2.3\).)-.15 E F1(.)72 495.6 Q F0 .941(Repeats the last command which changed the b)72.5 F(uf)-.2 E (fer)-.25 E 5.941(.E)-.55 G .941(specially useful when deleting w)-5.941 F .941(ords or)-.1 F .28(lines; you can delete some w)147 507.6 R .28 (ords/lines and then hit)-.1 F F1(.)2.78 E F0 .28 (to delete more and more w)2.78 F 2.78(ords/lines. Gi)-.1 F -.15(ve)-.25 G(n).15 E 3.008(ac)147 519.6 S .508 (ount, it passes it on to the command being repeated.)-3.008 F .508 (Thus after a)5.508 F F1(2d)3.009 E(w)-.15 E F0(,)A F1(3.)3.009 E F0 .509(deletes three w)3.009 F(ords)-.1 E(\(3.3, 6.3, 7.2, 7.4\).)147 531.6 Q F1(/)72 547.2 Q F0 .572 (Reads a string from the last line on the screen, and scans forw)72.22 F .571(ard for the ne)-.1 F .571(xt occurrence of this)-.15 F 3.175 (string. The)147 559.2 R .675(normal input editing sequences may be use\ d during the input on the bottom line; an)3.175 F .067 (returns to command state without e)147 571.2 R -.15(ve)-.25 G 2.567(rs) .15 G 2.567(earching. The)-2.567 F .066(search be)2.567 F .066 (gins when you hit)-.15 F F2(CR)2.566 E F0 .066(to terminate)2.566 F 1.459(the pattern; the cursor mo)147 583.2 R -.15(ve)-.15 G 3.959(st).15 G 3.959(ot)-3.959 G 1.459(he be)-3.959 F 1.46 (ginning of the last line to indicate that the search is in)-.15 F .932 (progress; the search may then be terminated with a)147 595.2 R F2(DEL) 3.432 E F0(or)3.432 E F2 -.32(RU)3.432 G(B).32 E F0 3.432(,o)C 3.432(rb) -3.432 G 3.431(yb)-3.432 G .931(ackspacing when at the)-3.431 F(be)147 607.2 Q .603(ginning of the bottom line, returning the cursor to its in\ itial position.)-.15 F .604(Searches normally wrap)5.604 F (end-around to \214nd a string an)147 619.2 Q(ywhere in the b)-.15 E(uf) -.2 E(fer)-.25 E(.)-.55 E .98 (When used with an operator the enclosed re)147 634.8 R .98 (gion is normally af)-.15 F 3.48(fected. By)-.25 F .98(mentioning an of) 3.48 F(fset)-.25 E .633(from the line matched by the pattern you can fo\ rce whole lines to be af)147 646.8 R 3.133(fected. T)-.25 F 3.133(od)-.8 G 3.134(ot)-3.133 G .634(his gi)-3.134 F .934 -.15(ve a)-.25 H (pattern with a closing a closing)147 658.8 Q F1(/)2.5 E F0 (and then an of)2.5 E(fset)-.25 E F1(+)2.5 E F3(n)A F0(or)2.5 E F1 2.5 E F3(n)A F0(.)A 2.201 -.8(To i)147 674.4 T .601 (nclude the character).8 F F1(/)3.101 E F0 .601 (in the search string, you must escape it with a preceding)3.101 F F1 (\\)3.1 E F0 5.6(.A)C/F4 10/Symbol SF-2.5 E F0 .6(at the)3.1 F(be) 147 686.4 Q .433 (ginning of the pattern forces the match to occur at the be)-.15 F .434 (ginning of a line only; this speeds the)-.15 F 3.406(search. A)147 698.4 R F1($)3.406 E F0 .906(at the end of the pattern forces the match\ to occur at the end of a line only)3.406 F 5.905(.M)-.65 G(ore)-5.905 E -.15(ex)147 710.4 S .54(tended pattern matching is a).15 F -.25(va)-.2 G .541(ilable, see section 7.4; unless you set).25 F F1(nomagic)3.041 E F0 .541(in your)3.041 F F3(.e)3.041 E(xr)-.2 E(c)-.37 E F0(\214le)3.041 E 1.028(you will ha)147 722.4 R 1.328 -.15(ve t)-.2 H 3.528(op).15 G 1.028 (receed the characters)-3.528 F F1 3.527(.[*)3.527 G F0(and)A F1(~)3.527 E F0 1.027(in the search pattern with a)3.527 F F1(\\)3.527 E F0 1.027 (to get them to)3.527 F EP %%Page: 23 23 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-23)-249.71 E -.1(wo)147 84 S(rk as you w).1 E (ould nai)-.1 E -.15(ve)-.25 G(ly e).15 E (xpect \(1.5, 2,2, 6.1, 7.2, 7.4\).)-.15 E/F1 10/Times-Bold@0 SF(0)72 99.6 Q F0(Mo)70 E -.15(ve)-.15 G 3.473(st).15 G 3.473(ot)-3.473 G .974 (he \214rst character on the current line.)-3.473 F .974 (Also used, in forming numbers, after an initial)5.974 F F1(1)147 111.6 Q F0A F1(9)A F0(.)A F1(1\2559)72 127.2 Q F0(Used to form numeric ar) 59.3 E(guments to commands \(2.3, 7.2\).)-.18 E F1(:)72 142.8 Q F0 3.022 (Ap)71.67 G .522(re\214x to a set of commands for \214le and option man\ ipulation and escapes to the system.)-3.022 F(Input)5.521 E .311(is gi) 147 154.8 R -.15(ve)-.25 G 2.811(no).15 G 2.811(nt)-2.811 G .311 (he bottom line and terminated with an)-2.811 F/F2 8/Times-Roman@0 SF (CR)2.811 E F0 2.811(,a)C .311(nd the command then e)-2.811 F -.15(xe) -.15 G 2.811(cuted. Y).15 F .312(ou can)-1.1 F .988 (return to where you were by hitting)147 166.8 R F2(DEL)3.487 E F0(or) 3.487 E F2 -.32(RU)3.487 G(B).32 E F0 .987(if you hit)3.487 F F1(:)3.487 E F0 .987(accidentally \(see primarily 6.2 and)3.487 F(7.3\).)147 178.8 Q F1(;)72 194.4 Q F0 (Repeats the last single character \214nd which used)71.67 E F1 2.5(fFt) 2.5 G F0(or)A F1(T)2.5 E F0 5(.A)C (count iterates the basic scan \(4.1\).)-2.5 E F1(<)72 210 Q F0 .798 (An operator which shifts lines left one)69.3 F/F3 10/Times-Italic@0 SF (shiftwidth)3.299 E F0 3.299(,n)C .799(ormally 8 spaces.)-3.299 F(Lik) 5.799 E 3.299(ea)-.1 G .799(ll operators, af)-3.299 F(fects)-.25 E .032 (lines when repeated, as in)147 222 R F1(<<)2.531 E F0 5.031(.C)C .031 (ounts are passed through to the basic object, thus)-5.031 F F1(3<<) 2.531 E F0 .031(shifts three)2.531 F(lines \(6.6, 7.2\).)147 234 Q F1(=) 72 249.6 Q F0(Reindents line for)69.3 E F2(LISP)2.5 E F0 2.5(,a)C 2.5 (st)-2.5 G(hough the)-2.5 E 2.5(yw)-.15 G(ere typed in with)-2.5 E F3 (lisp)2.5 E F0(and)2.5 E F3(autoindent)2.5 E F0(set \(6.8\).)2.5 E F1(>) 72 265.2 Q F0 2.517(An operator which shifts lines right one)69.3 F F3 (shiftwidth)5.018 E F0 5.018(,n)C 2.518(ormally 8 spaces.)-5.018 F(Af) 7.518 E 2.518(fects lines when)-.25 F(repeated as in)147 277.2 Q F1(>>) 2.5 E F0 5(.C)C(ounts repeat the basic object \(6.6, 7.2\).)-5 E F1(?)72 292.8 Q F0 .512(Scans backw)70 F .512(ards, the opposite of)-.1 F F1(/) 3.011 E F0 5.511(.S)C .511(ee the)-5.511 F F1(/)3.011 E F0 .511 (description abo)3.011 F .811 -.15(ve f)-.15 H .511 (or details on scanning \(2.2, 6.1,).15 F(7.4\).)147 304.8 Q F1(@)72 320.4 Q F0 2.635(Am)65.7 G .135(acro character \(6.9\).)-2.635 F .135 (If this is your kill character)5.135 F 2.635(,y)-.4 G .135 (ou must escape it with a \\ to type it in dur)-2.635 F(-)-.2 E .706 (ing input mode, as it normally backs o)147 332.4 R -.15(ve)-.15 G 3.206 (rt).15 G .706(he input you ha)-3.206 F 1.005 -.15(ve g)-.2 H -2.15 -.25 (iv e).15 H 3.205(no).25 G 3.205(nt)-3.205 G .705 (he current line \(3.1, 3.4,)-3.205 F(7.5\).)147 344.4 Q F1(A)72 360 Q F0(Appends at the end of line, a synon)67.78 E(ym for)-.15 E F1($a)2.5 E F0(\(7.2\).)2.5 E F1(B)72 375.6 Q F0 .942(Backs up a w)68.33 F .942 (ord, where w)-.1 F .942 (ords are composed of non-blank sequences, placing the cursor at the)-.1 F(be)147 387.6 Q(ginning of the w)-.15 E 2.5(ord. A)-.1 F (count repeats the ef)2.5 E(fect \(2.4\).)-.25 E F1(C)72 403.2 Q F0 (Changes the rest of the te)67.78 E(xt on the current line; a synon)-.15 E(ym for)-.15 E F1(c$)2.5 E F0(.)A F1(D)72 418.8 Q F0 (Deletes the rest of the te)67.78 E(xt on the current line; a synon)-.15 E(ym for)-.15 E F1(d$)2.5 E F0(.)A F1(E)72 434.4 Q F0(Mo)68.33 E -.15 (ve)-.15 G 3.259(sf).15 G(orw)-3.259 E .759(ard to the end of a w)-.1 F .759(ord, de\214ned as blanks and non-blanks, lik)-.1 F(e)-.1 E F1(B) 3.259 E F0(and)3.259 E F1(W)3.259 E F0 5.758(.A)C(count)-2.5 E (repeats the ef)147 446.4 Q(fect.)-.25 E F1(F)72 462 Q F0 .255 (Finds a single follo)68.89 F .255(wing character)-.25 F 2.755(,b)-.4 G (ackw)-2.755 E .255(ards in the current line.)-.1 F 2.756(Ac)5.255 G .256(ount repeats this search that)-2.756 F(man)147 474 Q 2.5(yt)-.15 G (imes \(4.1\).)-2.5 E F1(G)72 489.6 Q F0 .342 (Goes to the line number gi)67.22 F -.15(ve)-.25 G 2.842(na).15 G 2.842 (sp)-2.842 G .342(receding ar)-2.842 F .341 (gument, or the end of the \214le if no preceding count)-.18 F(is gi)147 501.6 Q -.15(ve)-.25 G 2.5(n. The).15 F(screen is redra)2.5 E (wn with the ne)-.15 E 2.5(wc)-.25 G (urrent line in the center if necessary \(7.2\).)-2.5 E F1 67.22(HH)72 517.2 S .226(ome arr)-67.22 F -.1(ow)-.18 G F0 5.226(.H).1 G .227 (omes the cursor to the top line on the screen.)-5.226 F .227 (If a count is gi)5.227 F -.15(ve)-.25 G .227(n, then the cursor).15 F .225(is mo)147 529.2 R -.15(ve)-.15 G 2.725(dt).15 G 2.725(ot)-2.725 G .225(he count')-2.725 F .224(th line on the screen.)-.18 F .224(In an) 5.224 F 2.724(yc)-.15 G .224(ase the cursor is mo)-2.724 F -.15(ve)-.15 G 2.724(dt).15 G 2.724(ot)-2.724 G .224(he \214rst non-white)-2.724 F (character on the line.)147 541.2 Q(If used as the tar)5 E (get of an operator)-.18 E 2.5(,f)-.4 G(ull lines are af)-2.5 E (fected \(2.3, 3.2\).)-.25 E F1(I)72 556.8 Q F0(Inserts at the be)71.11 E(ginning of a line; a synon)-.15 E(ym for)-.15 E/F4 10/Symbol SF2.5 E F1(i)A F0(.)A F1(J)72 572.4 Q F0 1.522(Joins together lines, supplyin\ g appropriate white space: one space between w)70 F 1.523(ords, tw)-.1 F 4.023(os)-.1 G(paces)-4.023 E .721(after a)147 584.4 R F1(.)3.221 E F0 3.221(,a)C .721 (nd no spaces at all if the \214rst character of the joined on line is) -3.221 F F1(\))3.221 E F0 5.721(.A)C .72(count causes that)-2.5 F(man) 147 596.4 Q 2.5(yl)-.15 G(ines to be joined rather than the def)-2.5 E (ault tw)-.1 E 2.5(o\()-.1 G(6.5, 7.1f\).)-2.5 E F1(K)72 612 Q F0 (Unused.)67.22 E F1(L)72 627.6 Q F0(Mo)68.33 E -.15(ve)-.15 G 3.187(st) .15 G .688(he cursor to the \214rst non-white character of the last lin\ e on the screen.)-3.187 F -.4(Wi)5.688 G .688(th a count, to).4 F .548 (the \214rst non-white of the count')147 639.6 R .547 (th line from the bottom.)-.18 F .547(Operators af)5.547 F .547 (fect whole lines when used)-.25 F(with)147 651.6 Q F1(L)2.5 E F0 (\(2.3\).)2.5 E F1(M)72 667.2 Q F0(Mo)65.56 E -.15(ve)-.15 G 2.731(st) .15 G .232(he cursor to the middle line on the screen, at the \214rst n\ on-white position on the line \(2.3\).)-2.731 F F1(N)72 682.8 Q F0 .412 (Scans for the ne)67.78 F .412(xt match of the last pattern gi)-.15 F -.15(ve)-.25 G 2.911(nt).15 G(o)-2.911 E F1(/)2.911 E F0(or)2.911 E F1 (?)2.911 E F0 2.911(,b)C .411(ut in the re)-3.111 F -.15(ve)-.25 G .411 (rse direction; this is the).15 F(re)147 694.8 Q -.15(ve)-.25 G(rse of) .15 E F1(n)2.5 E F0(.)A F1(O)72 710.4 Q F0 .538(Opens a ne)67.22 F 3.038 (wl)-.25 G .538(ine abo)-3.038 F .838 -.15(ve t)-.15 H .538 (he current line and inputs te).15 F .538(xt there up to an)-.15 F F2 (ESC)3.039 E F0 5.539(.A)C .539(count can be used)-2.5 F 1.061(on dumb \ terminals to specify a number of lines to be opened; this is generally \ obsolete, as the)147 722.4 R EP %%Page: 24 24 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-24 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10 /Times-Italic@0 SF(slowopen)147 84 Q F0(option w)2.5 E (orks better \(3.1\).)-.1 E/F2 10/Times-Bold@0 SF(P)72 99.6 Q F0 .665 (Puts the last deleted te)68.89 F .665(xt back before/abo)-.15 F .965 -.15(ve t)-.15 H .665(he cursor).15 F 5.665(.T)-.55 G .665(he te)-5.665 F .665(xt goes back as whole lines abo)-.15 F -.15(ve)-.15 G .66 (the cursor if it w)147 111.6 R .66(as deleted as whole lines.)-.1 F .66 (Otherwise the te)5.66 F .66(xt is inserted between the characters)-.15 F .25(before and at the cursor)147 123.6 R 5.25(.M)-.55 G .25 (ay be preceded by a named b)-5.25 F(uf)-.2 E .25(fer speci\214cation) -.25 F F2(")2.75 E F1(x)A F0 .25(to retrie)2.75 F .55 -.15(ve t)-.25 H .25(he con-).15 F .465(tents of the b)147 135.6 R(uf)-.2 E .465(fer; b) -.25 F(uf)-.2 E(fers)-.25 E F2(1)2.965 E F0A F2(9)A F0 .465 (contain deleted material, b)2.965 F(uf)-.2 E(fers)-.25 E F2(a)2.965 E F0A F2(z)A F0 .464(are a)2.964 F -.25(va)-.2 G .464 (ilable for general use).25 F(\(6.3\).)147 147.6 Q F2(Q)72 163.2 Q F0 1 (Quits from)67.22 F F1(vi)3.5 E F0(to)3.5 E F1 -.2(ex)3.5 G F0 1 (command mode.)3.7 F 1.001 (In this mode, whole lines form commands, ending with a)6.001 F/F3 8 /Times-Roman@0 SF(RETURN)147 175.2 Q F0 5(.Y)C(ou can gi)-6.1 E .3 -.15 (ve a)-.25 H(ll the).15 E F2(:)2.5 E F0 (commands; the editor supplies the)2.5 E F2(:)2.5 E F0 (as a prompt \(7.7\).)2.5 E F2(R)72 190.8 Q F0 .26 (Replaces characters on the screen with characters you type \(o)67.78 F -.15(ve)-.15 G .26(rlay f).15 F 2.76(ashion\). T)-.1 F .26 (erminates with an)-.7 F F3(ESC)147 202.8 Q F0(.)A F2(S)72 218.4 Q F0 .955(Changes whole lines, a synon)69.44 F .955(ym for)-.15 F F2(cc)3.455 E F0 5.956(.A)C .956(count substitutes for that man)-2.5 F 3.456(yl)-.15 G 3.456(ines. The)-3.456 F .956(lines are)3.456 F(sa)147 230.4 Q -.15 (ve)-.2 G 2.5(di).15 G 2.5(nt)-2.5 G(he numeric b)-2.5 E(uf)-.2 E (fers, and erased on the screen before the substitution be)-.25 E(gins.) -.15 E F2(T)72 246 Q F0 -.8(Ta)68.33 G -.1(ke).8 G 2.978(sas).1 G .478 (ingle follo)-2.978 F .478(wing character)-.25 F 2.978(,l)-.4 G .478 (ocates the character before the cursor in the current line, and)-2.978 F .464(places the cursor just after that character)147 258 R 5.464(.A) -.55 G .464(count repeats the ef)-2.5 F 2.964(fect. Most)-.25 F .464 (useful with operators)2.964 F(such as)147 270 Q F2(d)2.5 E F0(\(4.1\).) 2.5 E F2(U)72 285.6 Q F0(Restores the current line to its state before \ you started changing it \(3.5\).)67.78 E F2(V)72 301.2 Q F0(Unused.) 67.78 E F2(W)72 316.8 Q F0(Mo)65 E -.15(ve)-.15 G 4.806(sf).15 G(orw) -4.806 E 2.306(ard to the be)-.1 F 2.306(ginning of a w)-.15 F 2.306 (ord in the current line, where w)-.1 F 2.305(ords are de\214ned as)-.1 F(sequences of blank/non-blank characters.)147 328.8 Q 2.5(Ac)5 G (ount repeats the ef)-2.5 E(fect \(2.4\).)-.25 E F2(X)72 344.4 Q F0 .184 (Deletes the character before the cursor)67.78 F 5.184(.A)-.55 G .184 (count repeats the ef)-2.5 F .185(fect, b)-.25 F .185 (ut only characters on the cur)-.2 F(-)-.2 E(rent line are deleted.)147 356.4 Q F2(Y)72 372 Q F0 -1(Ya)67.78 G .425(nks a cop)1 F 2.925(yo)-.1 G 2.925(ft)-2.925 G .425(he current line into the unnamed b)-2.925 F(uf) -.2 E(fer)-.25 E 2.925(,t)-.4 G 2.925(ob)-2.925 G 2.925(ep)-2.925 G .425 (ut back by a later)-2.925 F F2(p)2.925 E F0(or)2.925 E F2(P)2.925 E F0 2.925(;av)C(ery)-3.075 E .119(useful synon)147 384 R .119(ym for)-.15 F F2(yy)2.619 E F0 5.119(.A)C .119(count yanks that man)-2.5 F 2.619(yl) -.15 G 2.619(ines. May)-2.619 F .12(be preceded by a b)2.62 F(uf)-.2 E .12(fer name to put)-.25 F(lines in that b)147 396 Q(uf)-.2 E (fer \(7.4\).)-.25 E F2(ZZ)72 411.6 Q F0 .418(Exits the editor)61.66 F 5.418(.\()-.55 G .418(Same as)-5.418 F F2(:x)2.918 E F3(CR)A F0 2.918 (.\) If)B(an)2.918 E 2.918(yc)-.15 G .418(hanges ha)-2.918 F .718 -.15 (ve b)-.2 H .418(een made, the b).15 F(uf)-.2 E .417 (fer is written out to the)-.25 F(current \214le.)147 423.6 Q (Then the editor quits.)5 E F2([[)72 439.2 Q F0 .1(Backs up to the pre) 68.34 F .1(vious section boundary)-.25 F 5.1(.A)-.65 G .1(section be) -2.5 F .1(gins at each macro in the)-.15 F F1(sections)2.6 E F0(option,) 2.6 E .696(normally a `.NH' or `.SH' and also at lines which which star\ t with a formfeed)147 451.2 R F2(^L)3.196 E F0 5.695(.L)C .695(ines be) -5.695 F(gin-)-.15 E .159(ning with)147 463.2 R F2({)2.659 E F0 .159 (also stop)2.659 F F2([[)2.659 E F0 2.659(;t)C .159(his mak)-2.659 F .159(es it useful for looking backw)-.1 F .159 (ards, a function at a time, in C pro-)-.1 F 3.406(grams. If)147 475.2 R .906(the option)3.406 F F1(lisp)3.406 E F0 .906(is set, stops at each) 3.406 F F2(\()3.406 E F0 .906(at the be)3.406 F .905 (ginning of a line, and is thus useful for)-.15 F(mo)147 487.2 Q (ving backw)-.15 E(ards at the top le)-.1 E -.15(ve)-.25 G(l).15 E F3 (LISP)2.5 E F0(objects. \(4.2, 6.1, 6.6, 7.2\).)2.5 E F2(\\)72 502.8 Q F0(Unused.)72.22 E F2(]])72 518.4 Q F0 -.15(Fo)68.34 G(rw).15 E (ard to a section boundary)-.1 E 2.5(,s)-.65 G(ee)-2.5 E F2([[)2.5 E F0 (for a de\214nition \(4.2, 6.1, 6.6, 7.2\).)2.5 E/F4 10/Symbol SF72 534 Q F0(Mo)68.97 E -.15(ve)-.15 G 2.5(st).15 G 2.5(ot)-2.5 G (he \214rst non-white position on the current line \(4.4\).)-2.5 E F2(_) 72 549.6 Q F0(Unused.)70 E F2<92>72 565.2 Q F0 .768(When follo)71.67 F .768(wed by a)-.25 F F2<92>3.268 E F0 .769(returns to the pre)3.269 F .769(vious conte)-.25 F 3.269(xt. The)-.15 F(pre)3.269 E .769 (vious conte)-.25 F .769(xt is set whene)-.15 F -.15(ve)-.25 G 3.269(rt) .15 G(he)-3.269 E .047(current line is mo)147 577.2 R -.15(ve)-.15 G 2.547(di).15 G 2.547(nan)-2.547 G(on-relati)-2.547 E .347 -.15(ve w)-.25 H(ay).05 E 5.047(.W)-.65 G .046(hen follo)-5.047 F .046(wed by a letter) -.25 F F2(a)2.546 E F0A F2(z)A F0 2.546(,r)C .046 (eturns to the position)-2.546 F .042(which w)147 589.2 R .042(as mark) -.1 F .042(ed with this letter with a)-.1 F F2(m)2.542 E F0 2.542 (command. When)2.542 F .042(used with an operator such as)2.542 F F2(d) 2.543 E F0 2.543(,t)C(he)-2.543 E .804(operation tak)147 601.2 R .804 (es place from the e)-.1 F .804(xact mark)-.15 F .804 (ed place to the current position within the line; if you)-.1 F(use)147 613.2 Q F22.5 E F0 2.5(,t)C(he operation tak)-2.5 E(es place o)-.1 E -.15(ve)-.15 G 2.5(rc).15 G(omplete lines \(2.2, 5.3\).)-2.5 E F2(a)72 628.8 Q F0 .11(Appends arbitrary te)70 F .11(xt after the current curso\ r position; the insert can continue onto multiple lines)-.15 F .703 (by using)147 640.8 R F3(RETURN)3.203 E F0 .703(within the insert.)3.203 F 3.202(Ac)5.703 G .702(ount causes the inserted te)-3.202 F .702 (xt to be replicated, b)-.15 F .702(ut only if)-.2 F(the inserted te)147 652.8 Q(xt is all on one line.)-.15 E(The insertion terminates with an)5 E F3(ESC)2.5 E F0(\(3.1, 7.2\).)2.5 E F2(b)72 668.4 Q F0 .421 (Backs up to the be)69.44 F .421(ginning of a w)-.15 F .422 (ord in the current line.)-.1 F 2.922(Aw)5.422 G .422 (ord is a sequence of alphanumerics,)-3.022 F (or a sequence of special characters.)147 680.4 Q 2.5(Ac)5 G (ount repeats the ef)-2.5 E(fect \(2.4\).)-.25 E F2(c)72 696 Q F0 .728 (An operator which changes the follo)70.56 F .727 (wing object, replacing it with the follo)-.25 F .727(wing input te)-.25 F .727(xt up to)-.15 F(an)147 708 Q F3(ESC)3.095 E F0 5.595(.I)C 3.095 (fm)-5.595 G .595(ore than part of a single line is af)-3.095 F .595 (fected, the te)-.25 F .596(xt which is changed a)-.15 F -.1(wa)-.15 G 3.096(yi).1 G 3.096(ss)-3.096 G -2.25 -.2(av e)-3.096 H 3.096(di).2 G(n) -3.096 E .073(the numeric named b)147 720 R(uf)-.2 E 2.573(fers. If)-.25 F .073(only part of the current line is af)2.573 F .072 (fected, then the last character to be)-.25 F EP %%Page: 25 25 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-25)-249.71 E .29(changed a)147 84 R -.1(wa)-.15 G 2.79(yi).1 G 2.79(sm)-2.79 G(ark)-2.79 E .29(ed with a)-.1 F/F1 10 /Times-Bold@0 SF($)2.79 E F0 5.29(.A)C .29(count causes that man)-2.5 F 2.79(yo)-.15 G .29(bjects to be af)-2.79 F .29(fected, thus both)-.25 F F1(3c\))2.79 E F0(and)147 96 Q F1(c3\))2.5 E F0(change the follo)2.5 E (wing three sentences \(7.4\).)-.25 E F1(d)72 111.6 Q F0 .408 (An operator which deletes the follo)69.44 F .408(wing object.)-.25 F .408(If more than part of a line is af)5.408 F .407(fected, the te)-.25 F .407(xt is)-.15 F(sa)147 123.6 Q -.15(ve)-.2 G 3.462(di).15 G 3.462 (nt)-3.462 G .962(he numeric b)-3.462 F(uf)-.2 E 3.462(fers. A)-.25 F .962(count causes that man)3.462 F 3.462(yo)-.15 G .963(bjects to be af) -3.462 F .963(fected; thus)-.25 F F1(3d)3.463 E(w)-.15 E F0 .963(is the) 3.463 F(same as)147 135.6 Q F1(d3w)2.5 E F0(\(3.3, 3.4, 4.1, 7.4\).)2.5 E F1(e)72 151.2 Q F0(Adv)70.56 E .992(ances to the end of the ne)-.25 F .992(xt w)-.15 F .992(ord, de\214ned as for)-.1 F F1(b)3.492 E F0(and) 3.491 E F1(w)3.491 E F0 5.991(.A)C .991(count repeats the ef)-2.5 F .991 (fect \(2.4,)-.25 F(3.1\).)147 163.2 Q F1(f)72 178.8 Q F0 1.258 (Finds the \214rst instance of the ne)71.67 F 1.258(xt character follo) -.15 F 1.258(wing the cursor on the current line.)-.25 F 3.759(Ac)6.259 G(ount)-3.759 E(repeats the \214nd \(4.1\).)147 190.8 Q F1(g)72 206.4 Q F0(Unused.)70 E(Arro)147 230.4 Q 2.5(wk)-.25 G -.15(ey)-2.6 G(s).15 E F1 (h)2.5 E F0(,)A F1(j)2.5 E F0(,)A F1(k)2.5 E F0(,)A F1(l)2.5 E F0 2.5 (,a)C(nd)-2.5 E F1(H)2.5 E F0(.)A F1 69.44(hL)72 246 S .628(eft arr) -69.44 F -.1(ow)-.18 G F0 5.628(.M).1 G -.15(ove)-5.628 G 3.128(st).15 G .628(he cursor one character to the left.)-3.128 F(Lik)5.628 E 3.128(et) -.1 G .627(he other arro)-3.128 F 3.127(wk)-.25 G -.15(ey)-3.227 G .627 (s, either).15 F F1(h)3.127 E F0 3.127(,t)C(he)-3.127 E F1 .781 (left arr)147 258 R -.1(ow)-.18 G F0 -.1(ke)3.381 G 2.081 -.65(y, o)-.05 H 3.281(ro).65 G .781(ne of the synon)-3.281 F .781(yms \()-.15 F F1(^H) A F0 3.281(\)h)C .781(as the same ef)-3.281 F 3.281(fect. On)-.25 F .781 (v2 editors, arro)3.281 F 3.282(wk)-.25 G -.15(ey)-3.382 G 3.282(so).15 G(n)-3.282 E .465(certain kinds of terminals \(those which send escape \ sequences, such as vt52, c100, or hp\) cannot)147 270 R(be used.)147 282 Q 2.5(Ac)5 G(ount repeats the ef)-2.5 E(fect \(3.1, 7.5\).)-.25 E F1(i) 72 297.6 Q F0(Inserts te)72.22 E(xt before the cursor)-.15 E 2.5(,o)-.4 G(therwise lik)-2.5 E(e)-.1 E F1(a)2.5 E F0(\(7.2\).)2.5 E F1 71.67(jD) 72 313.2 S -.1(ow)-71.67 G 2.513(na).1 G(rr)-2.513 E -.1(ow)-.18 G F0 5.013(.M).1 G -.15(ove)-5.013 G 2.513(st).15 G .013 (he cursor one line do)-2.513 F .014(wn in the same column.)-.25 F .014 (If the position does not e)5.014 F(xist,)-.15 E/F2 10/Times-Italic@0 SF (vi)147 325.2 Q F0(comes as close as possible to the same column.)2.5 E (Synon)5 E(yms include)-.15 E F1(^J)2.5 E F0(\(linefeed\) and)2.5 E F1 (^N)2.5 E F0(.)A F1 69.44(kU)72 340.8 S 2.5(pa)-69.44 G(rr)-2.5 E -.1 (ow)-.18 G F0 5(.M).1 G -.15(ove)-5 G 2.5(st).15 G (he cursor one line up.)-2.5 E F1(^P)5 E F0(is a synon)2.5 E(ym.)-.15 E F1 72.22(lR)72 356.4 S(ight arr)-72.22 E -.1(ow)-.18 G F0 5(.M).1 G -.15 (ove)-5 G 2.5(st).15 G(he cursor one character to the right.)-2.5 E/F3 8 /Times-Roman@0 SF(SP)5 E -.32(AC)-.736 G(E).32 E F0(is a synon)2.5 E (ym.)-.15 E F1(m)72 372 Q F0 .052 (Marks the current position of the cursor in the mark re)66.67 F .052 (gister which is speci\214ed by the ne)-.15 F .051(xt charac-)-.15 F (ter)147 384 Q F1(a)2.5 E F0A F1(z)A F0 5(.R)C (eturn to this position or use with an operator using)-5 E F1<92>2.5 E F0(or)2.5 E F12.5 E F0(\(5.3\).)2.5 E F1(n)72 399.6 Q F0 (Repeats the last)69.44 E F1(/)2.5 E F0(or)2.5 E F1(?)2.5 E F0 (scanning commands \(2.2\).)2.5 E F1(o)72 415.2 Q F0(Opens ne)70 E 2.5 (wl)-.25 G(ines belo)-2.5 E 2.5(wt)-.25 G (he current line; otherwise lik)-2.5 E(e)-.1 E F1(O)2.5 E F0(\(3.1\).) 2.5 E F1(p)72 430.8 Q F0(Puts te)69.44 E(xt after/belo)-.15 E 2.5(wt) -.25 G(he cursor; otherwise lik)-2.5 E(e)-.1 E F1(P)2.5 E F0(\(6.3\).) 2.5 E F1(q)72 446.4 Q F0(Unused.)69.44 E F1(r)72 462 Q F0 .91(Replaces \ the single character at the cursor with a single character you type.) 70.56 F .91(The ne)5.91 F 3.41(wc)-.25 G(haracter)-3.41 E .942(may be a) 147 474 R F3(RETURN)3.442 E F0 3.442(;t)C .942(his is the easiest w) -3.442 F .942(ay to split lines.)-.1 F 3.441(Ac)5.942 G .941 (ount replaces each of the follo)-3.441 F(wing)-.25 E 1.122 (count characters with the single character gi)147 486 R -.15(ve)-.25 G 1.123(n; see).15 F F1(R)3.623 E F0(abo)3.623 E 1.423 -.15(ve w)-.15 H 1.123(hich is the more usually useful).15 F(iteration of)147 498 Q F1(r) 2.5 E F0(\(3.2\).)2.5 E F1(s)72 513.6 Q F0 1.374 (Changes the single character under the cursor to the te)71.11 F 1.374 (xt which follo)-.15 F 1.374(ws up to an)-.25 F F3(ESC)3.874 E F0 3.874 (;g)C -2.15 -.25(iv e)-3.874 H 3.874(na).25 G .117(count, that man)147 525.6 R 2.617(yc)-.15 G .117 (haracters from the current line are changed.)-2.617 F .118 (The last character to be changed is)5.118 F(mark)147 537.6 Q(ed with) -.1 E F1($)2.5 E F0(as in)2.5 E F1(c)2.5 E F0(\(3.2\).)2.5 E F1(t)72 553.2 Q F0(Adv)71.67 E .569 (ances the cursor upto the character before the ne)-.25 F .568 (xt character typed.)-.15 F .568(Most useful with opera-)5.568 F .652 (tors such as)147 565.2 R F1(d)3.152 E F0(and)3.152 E F1(c)3.152 E F0 .652(to delete the characters up to a follo)3.152 F .653(wing character) -.25 F 5.653(.Y)-.55 G .653(ou can use)-6.753 F F1(.)3.153 E F0 .653 (to delete)3.153 F(more if this doesn')147 577.2 Q 2.5(td)-.18 G (elete enough the \214rst time \(4.1\).)-2.5 E F1(u)72 592.8 Q F0 .688 (Undoes the last change made to the current b)69.44 F(uf)-.2 E(fer)-.25 E 5.688(.I)-.55 G 3.188(fr)-5.688 G .688 (epeated, will alternate between these tw)-3.188 F(o)-.1 E 1.167 (states, thus is its o)147 604.8 R 1.167(wn in)-.25 F -.15(ve)-.4 G 1.167(rse. When used after an insert which inserted te).15 F 1.167 (xt on more than one)-.15 F(line, the lines are sa)147 616.8 Q -.15(ve) -.2 G 2.5(di).15 G 2.5(nt)-2.5 G(he numeric named b)-2.5 E(uf)-.2 E (fers \(3.5\).)-.25 E F1(v)72 632.4 Q F0(Unused.)70 E F1(w)72 648 Q F0 (Adv)67.78 E(ances to the be)-.25 E(ginning of the ne)-.15 E(xt w)-.15 E (ord, as de\214ned by)-.1 E F1(b)2.5 E F0(\(2.4\).)2.5 E F1(x)72 663.6 Q F0 .817(Deletes the single character under the cursor)70 F 5.816(.W)-.55 G .816(ith a count deletes deletes that man)-6.216 F 3.316(yc)-.15 G (haracters)-3.316 E(forw)147 675.6 Q(ard from the cursor position, b)-.1 E(ut only on the current line \(6.5\).)-.2 E F1(y)72 691.2 Q F0 1.469 (An operator)70 F 3.969(,y)-.4 G 1.469(anks the follo)-3.969 F 1.469 (wing object into the unnamed temporary b)-.25 F(uf)-.2 E(fer)-.25 E 6.47(.I)-.55 G 3.97(fp)-6.47 G 1.47(receded by a)-3.97 F .721(named b) 147 703.2 R(uf)-.2 E .721(fer speci\214cation,)-.25 F F1(")3.221 E F2(x) A F0 3.221(,t)C .721(he te)-3.221 F .721(xt is placed in that b)-.15 F (uf)-.2 E .72(fer also.)-.25 F -1.25 -.7(Te x)5.72 H 3.22(tc).7 G .72 (an be reco)-3.22 F -.15(ve)-.15 G .72(red by a).15 F(later)147 715.2 Q F1(p)2.5 E F0(or)2.5 E F1(P)2.5 E F0(\(7.4\).)2.5 E EP %%Page: 26 26 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF 247.21(USD:11-26 An)72 48 R (Introduction to Display Editing with V)2.5 E(i)-.6 E/F1 10/Times-Bold@0 SF(z)72 84 Q F0(Redra)70.56 E .701 (ws the screen with the current line placed as speci\214ed by the follo) -.15 F .702(wing character:)-.25 F/F2 8/Times-Roman@0 SF(RETURN)3.202 E F0 1.05(speci\214es the top of the screen,)147 96 R F1(.)3.55 E F0 1.05 (the center of the screen, and)3.55 F F13.55 E F0 1.05 (at the bottom of the screen.)3.55 F(A)6.05 E .644(count may be gi)147 108 R -.15(ve)-.25 G 3.144(na).15 G .644(fter the)-3.144 F F1(z)3.145 E F0 .645(and before the follo)3.145 F .645 (wing character to specify the ne)-.25 F 3.145(ws)-.25 G .645 (creen size)-3.145 F 1.132(for the redra)147 120 R 4.932 -.65(w. A)-.15 H 1.132(count before the)4.282 F F1(z)3.632 E F0(gi)3.632 E -.15(ve)-.25 G 3.632(st).15 G 1.131 (he number of the line to place in the center of the)-3.632 F (screen instead of the def)147 132 Q(ault current line. \(5.4\))-.1 E F1 ({)72 147.6 Q F0 1.402(Retreats to the be)71.06 F 1.403 (ginning of the be)-.15 F 1.403(ginning of the preceding paragraph.)-.15 F 3.903(Ap)6.403 G 1.403(aragraph be)-3.903 F 1.403(gins at)-.15 F .704 (each macro in the)147 159.6 R/F3 10/Times-Italic@0 SF(par)3.204 E -.1 (ag)-.15 G -.15(ra).1 G(phs).15 E F0 .703 (option, normally `.IP', `.LP', `.PP', `.QP' and `.bp'.)3.204 F 3.203 (Ap)5.703 G(aragraph)-3.203 E .759(also be)147 171.6 R .759 (gins after a completely empty line, and at each section boundary \(see) -.15 F F1([[)3.26 E F0(abo)3.26 E -.15(ve)-.15 G 3.26(\)\().15 G .76 (4.2, 6.8,)-3.26 F(7.6\).)147 183.6 Q F1(|)72 199.2 Q F0(Places the cur\ sor on the character in the column speci\214ed by the count \(7.1, 7.2\ \).)72.8 E F1(})72 214.8 Q F0(Adv)71.06 E .571(ances to the be)-.25 F .571(ginning of the ne)-.15 F .571(xt paragraph.)-.15 F(See)5.571 E F1 ({)3.071 E F0 .57(for the de\214nition of paragraph \(4.2, 6.8,)3.071 F (7.6\).)147 226.8 Q F1(~)72 242.4 Q F0(Unused.)71.67 E F1(^? \()72 258 Q F2(DEL)A F1(\))A F0(Interrupts the editor)41.958 E 2.5(,r)-.4 G (eturning it to command accepting state \(1.5, 7.5\))-2.5 E EP %%Page: 27 27 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(An Introduction to Display Editing with V)72 48 Q 249.71(iU)-.6 G(SD:11-27)-249.71 E(.)147 84 Q EP %%Trailer end %%EOF nvi-1.81.6/docs/vitut/summary.ps0100444000076400001440000006464010720065724015630 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:44:04 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 6 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 13/Times-Bold@0 SF(Ex Quick Refer)178.516 47 Q(ence)-.234 E/F1 11 /Times-Bold@0 SF(Entering/lea)72 64.6 Q(ving ex)-.275 E/F2 9 /Times-Bold@0 SF 2.25(%e)93.591 81.1 S(x)-2.25 E/F3 9/Times-Italic@0 SF (name)2.25 E/F4 9/Times-Roman@0 SF(edit)72.72 E F3(name)2.25 E F4 2.25 (,s)C(tart at end)-2.25 E F2 2.25(%e)93.591 92.1 S 2.25(x+)-2.25 G F3 2.25(nn)-2.25 G(ame)-2.25 E F4(... at line)60.84 E F3(n)2.25 E F2 2.25 (%e)93.591 103.1 S 2.25<78ad>-2.25 G(t)-2.25 E F3(ta)2.25 E(g)-.09 E F4 (start at)70.425 E F3(ta)2.25 E(g)-.09 E F2 2.25(%e)93.591 114.1 S 2.25 <78ad>-2.25 G(r)-2.25 E F4(list sa)83.088 E -.135(ve)-.18 G 2.25<648c> .135 G(les)-2.25 E F2 2.25(%e)93.591 125.1 S 2.25<78ad>-2.25 G(r)-2.25 E F3(name)2.25 E F4(reco)61.344 E -.135(ve)-.135 G 2.25<728c>.135 G(le) -2.25 E F3(name)2.25 E F2 2.25(%e)93.591 136.1 S(x)-2.25 E F3(name)2.25 E F2(...)2.25 E F4(edit \214rst; rest via)63.72 E F2(:n)2.25 E 2.25(%e) 93.591 147.1 S 2.25<78ad>-2.25 G(R)-2.25 E F3(name)2.25 E F4 (read only mode)58.842 E F2 2.25(:x)93.591 158.1 S F4 -.135(ex)102.213 G (it, sa).135 E(ving changes)-.18 E F2 2.25(:q)93.591 169.1 S(!)-2.25 E F4 -.135(ex)100.962 G(it, discarding changes).135 E F1(Ex states)72 185.6 Q F4(Command)72 202.1 Q 8.377(Normal and initial state.)157.5 202.1 R(Input)12.876 E 1.087(prompted for by)157.5 213.1 R F2(:)3.337 E F4 5.588(.Y)C 1.088(our kill character)-6.578 F (cancels partial command.)157.5 224.1 Q(Insert)72 235.1 Q 2.274 (Entered by)157.5 235.1 R F2 4.523(ai)4.523 G F4(and)A F2(c)4.523 E F4 6.773(.A)C 2.273(rbitrary te)-6.773 F(xt)-.135 E .906 (then terminates with line ha)157.5 246.1 R .906(ving only)-.18 F F2(.) 3.156 E F4 4.255(character on it or abnormally with)157.5 257.1 R (interrupt.)157.5 268.1 Q(Open/visual)72 279.1 Q .793(Entered by)157.5 279.1 R F2(open)3.043 E F4(or)3.043 E F2(vi)3.044 E F4 3.044(,t)C .794 (erminates with)-3.044 F F2(Q)157.5 290.1 Q F4(or ^\\.)2.25 E F1 (Ex commands)72 306.6 Q F4(abbre)72 323.1 Q(v)-.225 E F2(ab)21.636 E F4 (ne)15.993 E(xt)-.135 E F2(n)32.643 E F4(unabbre)22.824 E(v)-.225 E F2 (una)14.805 E F4(append)72 334.1 Q F2(a)19.908 E F4(number)20.997 E F2 (nu)20.511 E F4(undo)17.82 E F2(u)30.069 E F4(ar)72 345.1 Q(gs)-.162 E F2(ar)31.068 E F4(open)17.001 E F2(o)30.51 E F4(unmap)23.328 E F2(unm) 23.571 E F4(change)72 356.1 Q F2(c)20.412 E F4(preserv)21.501 E(e)-.135 E F2(pr)17.658 E(e)-.162 E F4 -.135(ve)14.994 G(rsion).135 E F2 -.09(ve) 21.708 G F4(cop)72 367.1 Q(y)-.09 E F2(co)28.494 E F4(print)17.001 E F2 (p)31.005 E F4(visual)22.824 E F2(vi)26.568 E F4(delete)72 378.1 Q F2(d) 24.408 E F4(put)20.493 E F2(pu)36.504 E F4(write)17.82 E F2(w)29.574 E F4(edit)72 389.1 Q F2(e)32.4 E F4(quit)21.501 E F2(q)34.002 E F4(xit) 22.824 E F2(x)38.565 E F4(\214le)72 400.1 Q F2(f)34.398 E F4(read)22.5 E F2 -.162(re)32.517 G F4(yank)20.16 E F2(ya)30.573 E F4(global)72 411.1 Q F2(g)23.4 E F4(reco)20.997 E -.135(ve)-.135 G(r).135 E F2 -.162(re) 21.294 G(c).162 E F3(window)16.002 E F2(z)20.061 E F4(insert)72 422.1 Q F2(i)25.902 E F4(re)22.995 E(wind)-.225 E F2 -.162(re)23.238 G(w).162 E F3(escape)13.5 E F2(!)23.58 E F4(join)72 433.1 Q F2(j)31.896 E F4(set) 22.5 E F2(se)38.007 E F3(lshift)20.331 E F2(<)30.06 E F4(list)72 444.1 Q F2(l)34.893 E F4(shell)22.995 E F2(sh)31.005 E F3(print ne)19.323 E(xt) -.18 E F4(CR)13.5 E 53.649(map source)72 455.1 R F2(so)24.516 E F3 -.333 (re)19.827 G(subst).333 E F2(&)22.401 E F4(mark)72 466.1 Q F2(ma)27.405 E F4(stop)13.5 E F2(st)33.003 E F3 -.09(rs)21.33 G(hift).09 E F2(>) 29.151 E F4(mo)72 477.1 Q -.135(ve)-.135 G F2(m)26.307 E F4(substitute) 18 E F2(s)13.5 E F3(scr)24.327 E(oll)-.405 E F2(^D)27.972 E F1 (Ex command addr)72 493.6 Q(esses)-.198 E F3(n)72 510.1 Q F4(line)30.6 E F3(n)2.25 E F2(/)50.85 E F3(pat)A F4(ne)21.096 E(xt with)-.135 E F3(pat) 2.25 E F2(.)72 521.1 Q F4(current)32.85 E F2(?)45.612 E F3(pat)A F4(pre) 19.098 E(vious with)-.225 E F3(pat)2.25 E F2($)72 532.1 Q F4(last)30.6 E F3(x)58.599 E F2(-)A F3 23.607(nn)C F4(before)-21.357 E F3(x)2.25 E F2 (+)72 543.1 Q F4(ne)29.97 E(xt)-.135 E F3(x)55.737 E F2(,)A F3 24.858 (yx)C F4(through)-22.608 E F3(y)2.25 E F272 554.1 Q F4(pre)29.97 E (vious)-.225 E F240.329 E F3(x)A F4(mark)28.107 E(ed with)-.09 E F3 (x)2.25 E F2(+)72 565.1 Q F3 25.47(nn)C F4(forw)-23.22 E(ard)-.09 E F2 35.955 E F4(pre)29.106 E(vious conte)-.225 E(xt)-.135 E F2(%)72 576.1 Q F4(1,$)26.1 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 11/Times-Bold@0 SF(Specifying terminal type)72 47 Q/F1 9 /Times-Bold@0 SF 2.25(%s)76.518 63.5 S(eten)-2.25 E 2.25(vT)-.36 G(ERM) -2.25 E/F2 9/Times-Italic@0 SF 64.827(type csh)2.25 F/F3 9/Times-Roman@0 SF(and all v)2.25 E(ersion 6)-.135 E F1 2.25($T)76.518 74.5 S(ERM=)-2.25 E F2(type)A F1 2.25(;e)C(xport TERM)-2.25 E F2(sh)35.091 E F3(in V)2.25 E(ersion 7)-.999 E F1(See also)76.518 85.5 Q F2(tset)2.25 E F3(\(1\))A F0(Some terminal types)72 102 Q F3 22.05(2621 43)72 118.5 R 16.254 (adm31 dw1)33.3 F(h19)26.802 E 22.05(2645 733)72 129.5 R 16.758 (adm3a dw2)28.8 F(i100)26.802 E 23.049(300s 745)72 140.5 R 23.256 (c100 gt40)28.8 F(mime)26.298 E 31.05(33 act4)72 151.5 R 11.25 (dm1520 gt42)27.306 F -.225(ow)26.298 G(l).225 E 31.05(37 act5)72 162.5 R 11.25(dm2500 h1500)27.306 F(t1061)19.8 E 22.05(4014 adm3)72 173.5 R 11.25(dm3025 h1510)22.302 F(vt52)19.8 E F0(Initializing options)72 190 Q F1(EXINIT)72 206.5 Q F3(place)50.796 E F1(set)2.25 E F3 .99 -.495('s h)D (ere in en).495 E(vironment v)-.36 E(ar)-.225 E(.)-.495 E F1(set)72 217.5 Q F2(x)2.25 E F3(enable option)66.06 E F1(set no)72 228.5 Q F2(x)A F3(disable option)56.556 E F1(set)72 239.5 Q F2(x)2.25 E F1(=)A F2(val)A F3(gi)49.932 E .27 -.135(ve v)-.225 H(alue)-.09 E F2(val)2.25 E F1(set) 72 250.5 Q F3(sho)72.306 E 2.25(wc)-.225 G(hanged options)-2.25 E F1 (set all)72 261.5 Q F3(sho)60.552 E 2.25(wa)-.225 G(ll options)-2.25 E F1(set)72 272.5 Q F2(x)2.25 E F1(?)A F3(sho)61.56 E 2.25(wv)-.225 G (alue of option)-2.475 E F2(x)2.25 E F0(Useful options)72 289 Q F1 (autoindent)72 305.5 Q F3 26.352(ai supply)36.792 F(indent)2.25 E F1 (auto)72 316.5 Q(write)-.09 E F3 22.761 -.135(aw w)41.4 H (rite before changing \214les).135 E F1(ignor)72 327.5 Q(ecase)-.162 E F3 26.352(ic in)37.971 F(scanning)2.25 E F1 97.641(lisp \()72 338.5 R 2.25(\){})2.25 G F3(are s-e)A(xp')-.135 E(s)-.495 E F1(list)72 349.5 Q F3(print ^I for tab, $ at end)101.898 E F1 88.155(magic .)72 360.5 R 2.25([*)2.25 G F3(special in patterns)A F1(number)72 371.5 Q F3 23.85 (nu number)47.799 F(lines)2.25 E F1(paragraphs)72 382.5 Q F3 17.361 (para macro)33.795 F(names which start ...)2.25 E F1 -.162(re)72 393.5 S (draw).162 E F3(simulate smart terminal)85.572 E F1(scr)72 404.5 Q(oll) -.162 E F3(command mode lines)92.565 E F1(sections)72 415.5 Q F3 18.855 (sect macro)48.303 F(names ...)2.25 E F1(shiftwidth)72 426.5 Q F3 22.851 (sw for)39.294 F F1 2.25(<>)2.25 G F3 2.25(,a)-2.25 G(nd input)-2.25 E F1(^D)2.25 E(sho)72 437.5 Q(wmatch)-.09 E F3 22.347(sm to)34.893 F F1 (\))2.25 E F3(and)2.25 E F1(})2.25 E F3(as typed)2.25 E F1(slo)72 448.5 Q -.09(wo)-.09 G(pen).09 E F3(slo)42.975 E 18.324(wc)-.225 G(hok)-18.324 E 2.25(eu)-.09 G(pdates during insert)-2.25 E F1(windo)72 459.5 Q(w)-.09 E F3(visual mode lines)83.484 E F1(wrapscan)72 470.5 Q F3 22.851 (ws around)41.301 F(end of b)2.25 E(uf)-.18 E(fer?)-.225 E F1(wrapmar)72 481.5 Q(gin)-.09 E F3 19.35(wm automatic)30.393 F(line splitting)2.25 E F0(Scanning patter)72 501.3 Q 2.75(nf)-.165 G(ormation)-3.025 E/F4 9 /Symbol SF93.937 517.8 Q F3(be)55.436 E(ginning of line)-.135 E F1 ($)93.937 528.8 Q F3(end of line)56.363 E F1(.)93.937 539.8 Q F3(an) 58.613 E 2.25(yc)-.135 G(haracter)-2.25 E F1(\\<)93.937 550.8 Q F3(be) 53.231 E(ginning of w)-.135 E(ord)-.09 E F1(\\>)93.937 561.8 Q F3 (end of w)53.231 E(ord)-.09 E F1([)93.937 572.8 Q F2(str)A F1(])A F3(an) 45.365 E 2.25(yc)-.135 G(har in)-2.25 E F2(str)2.25 E F1([)93.937 583.8 Q F4A F2(str)A F1(])A F3(... not in)39.938 E F2(str)2.25 E F1([) 93.937 594.8 Q F2(x\255y)A F1(])A F3(... between)40.802 E F2(x)2.25 E F3 (and)2.25 E F2(y)2.25 E F1(*)93.937 605.8 Q F3(an)56.363 E 2.25(yn)-.135 G(umber of preceding)-2.25 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 13/Times-Bold@0 SF .962 -.481(Vi Q)179.842 47 T(uick Refer).481 E (ence)-.234 E/F1 11/Times-Bold@0 SF(Entering/lea)72 64.6 Q(ving vi)-.275 E/F2 9/Times-Bold@0 SF 2.25(%v)91.71 81.1 S(i)-2.25 E/F3 9 /Times-Italic@0 SF(name)2.25 E/F4 9/Times-Roman@0 SF(edit)68.683 E F3 (name)2.25 E F4(at top)2.25 E F2 2.25(%v)91.71 92.1 S 2.25(i+)-2.25 G F3 2.25(nn)-2.25 G(ame)-2.25 E F4(... at line)56.803 E F3(n)2.25 E F2 2.25 (%v)91.71 103.1 S 2.25(i+)-2.25 G F3(name)A F4(... at end)61.303 E F2 2.25(%v)91.71 114.1 S 2.25<69ad>-2.25 G(r)-2.25 E F4(list sa)79.051 E -.135(ve)-.18 G 2.25<648c>.135 G(les)-2.25 E F2 2.25(%v)91.71 125.1 S 2.25<69ad>-2.25 G(r)-2.25 E F3(name)2.25 E F4(reco)57.307 E -.135(ve) -.135 G 2.25<728c>.135 G(le)-2.25 E F3(name)2.25 E F2 2.25(%v)91.71 136.1 S(i)-2.25 E F3(name)2.25 E F2(...)2.25 E F4 (edit \214rst; rest via)59.683 E F2(:n)2.25 E 2.25(%v)91.71 147.1 S 2.25 <69ad>-2.25 G(t)-2.25 E F3(ta)2.25 E(g)-.09 E F4(start at)66.388 E F3 (ta)2.25 E(g)-.09 E F2 2.25(%v)91.71 158.1 S 2.25(i+)-2.25 G(/)-2.25 E F3(pat name)A F4(search for)47.299 E F3(pat)2.25 E F2 2.25(%v)91.71 169.1 S(iew)-2.25 E F3(name)2.25 E F4(read only mode)58.189 E F2(ZZ) 91.71 180.1 Q F4 -.135(ex)96.673 G(it from vi, sa).135 E(ving changes) -.18 E F2(^Z)91.71 191.1 Q F4(stop vi for later resumption)99.679 E F1 (The display)72 207.6 Q F4(Last line)72 224.1 Q .075 (Error messages, echoing input to)139.5 224.1 R F2 2.325(:/?)2.325 G F4 (and)A F2(!)2.325 E F4(,)A(feedback about i/o and lar)139.5 235.1 Q (ge changes.)-.162 E 2.25(@l)72 246.1 S 37.71(ines On)-2.25 F (screen only)2.25 E 2.25(,n)-.585 G(ot in \214le.)-2.25 E 2.25(~l)72 257.1 S 43.002(ines Lines)-2.25 F(past end of \214le.)2.25 E(^)72 268.1 Q F3(x)A F4(Control characters, ^? is delete.)60.507 E 50.751 (tabs Expand)72 279.1 R(to spaces, cursor at last.)2.25 E F1 .814 -.407 (Vi s)72 298.9 T(tates).407 E F4(Command)72 315.4 Q 3.834 (Normal and initial state.)139.5 315.4 R 3.834(Others return)8.334 F 4.79(here. ESC)139.5 326.4 R 2.54(\(escape\) cancels partial com-)4.79 F (mand.)139.5 337.4 Q(Insert)72 348.4 Q .013(Entered by)139.5 348.4 R F2 -4.512 2.263(aiAIoOcCsS R)2.263 H F4 4.514(.A)-2.263 G(rbitrary)-4.514 E (te)139.5 359.4 Q .612(xt then terminates with ESC character)-.135 F 2.862(,o)-.36 G(r)-2.862 E(abnormally with interrupt.)139.5 370.4 Q (Last line)72 381.4 Q .685(Reading input for)139.5 381.4 R F2 2.935(:/?) 2.935 G F4(or)A F2(!)2.935 E F4 2.935(;t)C .685(erminate with)-2.935 F (ESC or CR to e)139.5 392.4 Q -.135(xe)-.135 G (cute, interrupt to cancel.).135 E F1(Counts bef)72 408.9 Q(or)-.275 E 2.75(ev)-.198 G 2.75(ic)-2.75 G(ommands)-2.75 E F4(line/column number)72 425.4 Q F2 4.5(zG|)48.753 G F4(scroll amount)72 436.4 Q F2 2.25(^D ^U) 72.252 F F4(replicate insert)72 447.4 Q F2 4.5(aiAI)68.265 G F4 (repeat ef)72 458.4 Q 74.754(fect most)-.225 F(rest)2.25 E F1 (Simple commands)72 474.9 Q F2 -.135(dw)72 491.4 S F4(delete a w)110.268 E(ord)-.09 E F2(de)72 502.4 Q F4(... lea)112.5 E(ving punctuation)-.18 E F2(dd)72 513.4 Q F4(delete a line)111.492 E F2(3dd)72 524.4 Q F4 (... 3 lines)106.992 E F2(i)72 535.4 Q F3(te)A(xt)-.18 E F4 87.426 (ESC insert)B(te)2.25 E(xt)-.135 E F3(abc)2.25 E F2(cw)72 546.4 Q F3(ne) A(w)-.135 E F4 77.886(ESC change)B -.09(wo)2.25 G(rd to).09 E F3(ne)2.25 E(w)-.135 E F2(ea)72 557.4 Q F3(s)A F4 90.747(ESC pluralize)B -.09(wo) 2.25 G(rd).09 E F2(xp)72 568.4 Q F4(transpose characters)111.996 E EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 11/Times-Bold@0 SF(Interrupting, cancelling)72 47 Q/F1 9 /Times-Bold@0 SF(ESC)90.247 63.5 Q/F2 9/Times-Roman@0 SF (end insert or incomplete cmd)36.248 E F1(^?)90.247 74.5 Q F2 (\(delete or rubout\) interrupts)46.256 E F1(^L)90.247 85.5 Q F2 (reprint screen if)44.753 E F1(^?)2.25 E F2(scrambles it)2.25 E F0 (File manipulation)72 102 Q F1(:w)80.941 118.5 Q F2(write back changes) 60.494 E F1(:wq)80.941 129.5 Q F2(write and quit)55.49 E F1(:q)80.941 140.5 Q F2(quit)61.988 E F1(:q!)80.941 151.5 Q F2(quit, discard changes) 58.991 E F1(:e)80.941 162.5 Q/F3 9/Times-Italic@0 SF(name)2.25 E F2 (edit \214le)41.252 E F3(name)2.25 E F1(:e!)80.941 173.5 Q F2 (reedit, discard changes)59.999 E F1(:e +)80.941 184.5 Q F3(name)2.25 E F2(edit, starting at end)33.872 E F1(:e +)80.941 195.5 Q F3(n)A F2 (edit starting at line)51.116 E F3(n)2.25 E F1(:e #)80.941 206.5 Q F2 (edit alternate \214le)56.246 E F1(^)80.941 217.5 Q/F4 9/Symbol SFA F2(synon)61.565 E(ym for)-.135 E F1(:e #)2.25 E(:w)80.941 228.5 Q F3 (name)2.25 E F2(write \214le)38.75 E F3(name)2.25 E F1(:w!)80.941 239.5 Q F3(name)2.25 E F2 -.135(ove)35.753 G(rwrite \214le).135 E F3(name)2.25 E F1(:sh)80.941 250.5 Q F2(run shell, then return)58.487 E F1(:!)80.941 261.5 Q F3(cmd)A F2(run)49.001 E F3(cmd)2.25 E F2 2.25(,t)C(hen return) -2.25 E F1(:n)80.941 272.5 Q F2(edit ne)61.988 E(xt \214le in ar)-.135 E (glist)-.162 E F1(:n)80.941 283.5 Q F3(ar)2.25 E(gs)-.333 E F2 (specify ne)44.069 E 2.25(wa)-.225 G -.162(rg)-2.25 G(list).162 E F1(:f) 80.941 294.5 Q F2(sho)63.995 E 2.25(wc)-.225 G(urrent \214le and line) -2.25 E F1(^G)80.941 305.5 Q F2(synon)59.99 E(ym for)-.135 E F1(:f)2.25 E(:ta)80.941 316.5 Q F3(ta)2.25 E(g)-.09 E F2(to tag \214le entry)45.833 E F3(ta)2.25 E(g)-.09 E F1 61.745(^] :ta)80.941 327.5 R F2 2.25(,f)C (ollo)-2.25 E(wing w)-.225 E(ord is)-.09 E F3(ta)2.25 E(g)-.09 E F0 -.22 (Po)72 344 S(sitioning within \214le).22 E F1(^F)83.934 360.5 Q F2(forw) 59.161 E(ard screenfull)-.09 E F1(^B)83.934 371.5 Q F2(backw)58.657 E (ard screenfull)-.09 E F1(^D)83.934 382.5 Q F2(scroll do)58.162 E (wn half screen)-.225 E F1(^U)83.934 393.5 Q F2(scroll up half screen) 58.162 E F1(G)83.934 404.5 Q F2(goto line \(end def)60.655 E(ault\))-.09 E F1(/)83.934 415.5 Q F3(pat)A F2(ne)53.653 E(xt line matching)-.135 E F3(pat)2.25 E F1(?)83.934 426.5 Q F3(pat)A F2(pre)51.655 E 2.25(vl)-.225 G(ine matching)-2.25 E F3(pat)2.25 E F1(n)83.934 437.5 Q F2(repeat last) 62.653 E F1(/)2.25 E F2(or)2.25 E F1(?)2.25 E(N)83.934 448.5 Q F2(re) 61.159 E -.135(ve)-.225 G(rse last).135 E F1(/)2.25 E F2(or)2.25 E F1(?) 2.25 E(/)83.934 459.5 Q F3(pat)A F1(/+)A F3(n)A F2(n')41.521 E (th line after)-.162 E F3(pat)2.25 E F1(?)83.934 470.5 Q F3(pat)A F1 <3fad>A F3(n)A F2(n')37.525 E(th line before)-.162 E F3(pat)2.25 E F1 (]])83.934 481.5 Q F2(ne)61.663 E(xt section/function)-.135 E F1([[) 83.934 492.5 Q F2(pre)61.663 E(vious section/function)-.225 E F1(%) 83.934 503.5 Q F2(\214nd matching)58.657 E F1 2.25(\(\){)2.25 G F2(or)A F1(})2.25 E F0(Adjusting the scr)72 520 Q(een)-.198 E F1(^L)86.184 536.5 Q F2(clear and redra)48.816 E(w)-.135 E F1(^R)86.184 547.5 Q F2 (retype, eliminate @ lines)48.321 E F1(z)86.184 558.5 Q F2 39.564 (CR redra)B 1.17 -.585(w, c)-.135 H(urrent at windo).585 E 2.25(wt)-.225 G(op)-2.25 E F1<7aad>86.184 569.5 Q F2(... at bottom)48.69 E F1 1.5(z.) 86.184 580.5 S F2(... at center)48.57 E F1(/)86.184 591.5 Q F3(pat)A F1 (/z\255)A F3(pat)32.184 E F2(line at bottom)2.25 E F1(z)86.184 602.5 Q F3(n)A F1(.)1.5 E F2(use)45.57 E F3(n)2.25 E F2(line windo)2.25 E(w) -.225 E F1(^E)86.184 613.5 Q F2(scroll windo)48.816 E 2.25(wd)-.225 G -.225(ow)-2.25 G 2.25(n1l).225 G(ine)-2.25 E F1(^Y)86.184 624.5 Q F2 (scroll windo)48.321 E 2.25(wu)-.225 G 2.25(p1l)-2.25 G(ine)-2.25 E EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 11/Times-Bold@0 SF(Marking and r)72 47 Q(etur)-.198 E(ning)-.165 E /F1 9/Times-Bold@0 SF<9292>84.253 63.5 Q/F2 9/Times-Roman@0 SF(pre) 55.503 E(vious conte)-.225 E(xt)-.135 E F184.253 74.5 Q F2 (... at \214rst non-white in line)55.503 E F1(m)84.253 85.5 Q/F3 9 /Times-Italic@0 SF(x)A F2(mark position with letter)50.004 E F3(x)2.25 E F1<92>84.253 96.5 Q F3(x)A F2(to mark)54.504 E F3(x)2.25 E F184.253 107.5 Q F3(x)A F2(... at \214rst non-white in line)54.504 E F0 (Line positioning)72 124 Q F1(H)78.786 140.5 Q F2(home windo)51.453 E 2.25(wl)-.225 G(ine)-2.25 E F1(L)78.786 151.5 Q F2(last windo)52.452 E 2.25(wl)-.225 G(ine)-2.25 E F1(M)78.786 162.5 Q F2(middle windo)49.959 E 2.25(wl)-.225 G(ine)-2.25 E F1(+)78.786 173.5 Q F2(ne)53.325 E (xt line, at \214rst non-white)-.135 E F178.786 184.5 Q F2(pre) 53.325 E(vious line, at \214rst non-white)-.225 E 44.199(CR return,) 78.786 195.5 R(same as +)2.25 E/F4 9/Symbol SF78.786 206.5 Q F2(or) 2.25 E F1(j)2.25 E F2(ne)38.034 E(xt line, same column)-.135 E F4 78.786 217.5 Q F2(or)2.25 E F1(k)2.25 E F2(pre)36.027 E (vious line, same column)-.225 E F0(Character positioning)72 234 Q F4 77.058 250.5 Q F2(\214rst non white)70.222 E F1(0)77.058 261.5 Q F2 (be)71.149 E(ginning of line)-.135 E F1($)77.058 272.5 Q F2(end of line) 71.149 E F1(h)77.058 283.5 Q F2(or)2.25 E F42.25 E F2(forw)49.765 E (ard)-.09 E F1(l)77.058 294.5 Q F2(or)2.25 E F42.25 E F2(backw) 52.267 E(ards)-.09 E F1(^H)77.058 305.5 Q F2(same as)65.65 E F42.25 E F2 53.41(space same)77.058 316.5 R(as)2.25 E F42.25 E F1(f)77.058 327.5 Q F3(x)A F2(\214nd)68.656 E F3(x)2.25 E F2(forw)2.25 E(ard)-.09 E F1(F)77.058 338.5 Q F3(x)A F1(f)66.154 E F2(backw)2.25 E(ard)-.09 E F1 (t)77.058 349.5 Q F3(x)A F2(upto)68.656 E F3(x)2.25 E F2(forw)2.25 E (ard)-.09 E F1(T)77.058 360.5 Q F3(x)A F2(back upto)65.65 E F3(x)2.25 E F1(;)77.058 371.5 Q F2(repeat last)72.652 E F1 2.25(fFt)2.25 G F2(or)A F1(T)2.25 E(,)77.058 382.5 Q F2(in)73.399 E -.135(ve)-.36 G(rse of).135 E F1(;)2.25 E(|)77.058 393.5 Q F2(to speci\214ed column)73.669 E F1(%) 77.058 404.5 Q F2(\214nd matching)66.649 E F1 2.25(\({\))2.25 G F2(or)A F1(})2.25 E F0 -.825(Wo)72 421 S(rds, sentences, paragraphs).825 E F1(w) 85.5 437.5 Q F2 -.09(wo)63.049 G(rd forw).09 E(ard)-.09 E F1(b)85.5 448.5 Q F2(back w)64.543 E(ord)-.09 E F1(e)85.5 459.5 Q F2(end of w) 65.551 E(ord)-.09 E F1(\))85.5 470.5 Q F2(to ne)66.55 E(xt sentence) -.135 E F1(})85.5 481.5 Q F2(to ne)66.001 E(xt paragraph)-.135 E F1(\() 85.5 492.5 Q F2(back sentence)66.55 E F1({)85.5 503.5 Q F2 (back paragraph)66.001 E F1(W)85.5 514.5 Q F2(blank delimited w)60.547 E (ord)-.09 E F1(B)85.5 525.5 Q F2(back)63.544 E F1(W)2.25 E(E)85.5 536.5 Q F2(to end of)63.544 E F1(W)2.25 E F0(Commands f)72 553 Q(or)-.275 E F1 (LISP)2.75 E(\))88.227 569.5 Q F2 -.135(Fo)56.695 G(rw).135 E(ard s-e) -.09 E(xpression)-.135 E F1(})88.227 580.5 Q F2(... b)56.146 E(ut don') -.18 E 2.25(ts)-.162 G(top at atoms)-2.25 E F1(\()88.227 591.5 Q F2 (Back s-e)56.695 E(xpression)-.135 E F1({)88.227 602.5 Q F2(... b)56.146 E(ut don')-.18 E 2.25(ts)-.162 G(top at atoms)-2.25 E EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 11/Times-Bold@0 SF(Corr)72 47 Q(ections during insert)-.198 E/F1 9 /Times-Bold@0 SF(^H)80.757 63.5 Q/F2 9/Times-Roman@0 SF (erase last character)43.375 E F1(^W)80.757 74.5 Q F2(erases last w) 41.377 E(ord)-.09 E 32.638(erase your)80.757 85.5 R(erase, same as)2.25 E F1(^H)2.25 E F2 39.118(kill your)80.757 96.5 R (kill, erase input this line)2.25 E F1(\\)80.757 107.5 Q F2(escapes) 50.872 E F1(^H)2.25 E F2 2.25(,y)C(our erase and kill)-2.25 E 34.618 (ESC ends)80.757 118.5 R(insertion, back to command)2.25 E F1(^?)80.757 129.5 Q F2(interrupt, terminates insert)45.877 E F1(^D)80.757 140.5 Q F2 (backtab o)43.879 E -.135(ve)-.135 G(r).135 E/F3 9/Times-Italic@0 SF (autoindent)2.25 E/F4 9/Symbol SF80.757 151.5 Q F1(^D)A F2(kill) 38.452 E F3(autoindent)2.25 E F2 2.25(,s)C -2.025 -.18(av e)-2.25 H (for ne)2.43 E(xt)-.135 E F1(0^D)80.757 162.5 Q F2(... b)39.379 E (ut at mar)-.18 E(gin ne)-.162 E(xt also)-.135 E F1(^V)80.757 173.5 Q F2 (quote non-printing character)43.879 E F0(Insert and r)72 190 Q(eplace) -.198 E F1(a)86.004 206.5 Q F2(append after cursor)52.879 E F1(i)86.004 217.5 Q F2(insert before)54.877 E F1(A)86.004 228.5 Q F2 (append at end of line)50.881 E F1(I)86.004 239.5 Q F2 (insert before \214rst non-blank)53.878 E F1(o)86.004 250.5 Q F2 (open line belo)52.879 E(w)-.225 E F1(O)86.004 261.5 Q F2(open abo) 50.377 E -.135(ve)-.135 G F1(r)86.004 272.5 Q F3(x)A F2 (replace single char with)49.387 E F3(x)2.25 E F1(R)86.004 283.5 Q F2 (replace characters)50.881 E F0(Operators \(double to affect lines\))72 300 Q F1(d)87.435 316.5 Q F2(delete)58.563 E F1(c)87.435 327.5 Q F2 (change)59.571 E F1(<)87.435 338.5 Q F2(left shift)58.437 E F1(>)87.435 349.5 Q F2(right shift)58.437 E F1(!)87.435 360.5 Q F2 (\214lter through command)60.57 E F1(=)87.435 371.5 Q F2(indent for) 58.437 E/F5 7/Times-Roman@0 SF(LISP)2.25 E F1(y)87.435 382.5 Q F2 (yank lines to b)59.067 E(uf)-.18 E(fer)-.225 E F0 (Miscellaneous operations)72 399 Q F1(C)86.751 415.5 Q F2 (change rest of line)67.135 E F1(D)86.751 426.5 Q F2 (delete rest of line)67.135 E F1(s)86.751 437.5 Q F2(substitute chars) 70.132 E F1(S)86.751 448.5 Q F2(substitute lines)68.629 E F1(J)86.751 459.5 Q F2(join lines)69.133 E F1(x)86.751 470.5 Q F2(delete characters) 69.133 E F1(X)86.751 481.5 Q F2(... before cursor)67.135 E F1(Y)86.751 492.5 Q F2(yank lines)67.135 E F0 -.935(Ya)72 509 S(nk and put).935 E F1 (p)83.002 525.5 Q F2(put back lines)71.582 E F1(P)83.002 536.5 Q F2 (put before)71.087 E F1(")83.002 547.5 Q F3(x)A F1(p)A F2(put from b) 62.591 E(uf)-.18 E(fer)-.225 E F3(x)2.25 E F1(")83.002 558.5 Q F3(x)A F1 (y)A F2(yank to b)63.095 E(uf)-.18 E(fer)-.225 E F3(x)2.25 E F1(")83.002 569.5 Q F3(x)A F1(d)A F2(delete into b)62.591 E(uf)-.18 E(fer)-.225 E F3 (x)2.25 E F0(Undo, r)72 586 Q(edo, r)-.198 E(etrie)-.198 E -.11(ve)-.165 G F1(u)82 602.5 Q F2(undo last change)65.393 E F1(U)82 613.5 Q F2 (restore current line)63.899 E F1(.)82 624.5 Q F2(repeat last change) 68.147 E F1(")82 635.5 Q F3(d)A F1(p)1.5 E F2(retrie)54.398 E -.135(ve) -.225 G F3(d)2.385 E F2 -.162('t)C 2.25(hl).162 G(ast delete)-2.25 E EP %%Trailer end %%EOF nvi-1.81.6/docs/vitut/viapwh.ps0100444000076400001440000021753110720065724015430 0ustar skimousers%!PS-Adobe-3.0 %%Creator: groff version 1.17.2 %%CreationDate: Sun Nov 18 17:44:04 2007 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%+ font Symbol %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 12 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.17 2 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /MANUAL{ statusdict begin/manualfeed true store end }bind def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman %%IncludeResource: font Symbol grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF .888 -.444(Vi C)213.678 123 T (ommand & Function Refer).444 E(ence)-.216 E/F1 10/Times-Italic@0 SF (Alan P)271.38 147 Q(.W)-1.35 E 2.5(.H)-.92 G -.15(ew)-2.5 G(ett).15 E (Re)223.775 171 Q(vised for ver)-.15 E(sion 2.12 by Mark Horton)-.1 E/F2 10/Times-Bold@0 SF 2.5(1. A)72 207 R(uthor')-.5 E 2.5(sD)-.37 G (isclaimer)-2.5 E/F3 10/Times-Roman@0 SF .131 (This document does not claim to be 100% complete.)72 222.6 R .13 (There are a fe)5.131 F 2.63(wc)-.25 G .13 (ommands listed in the original document that)-2.63 F 3.016(Iw)72 234.6 S .516(as unable to test either because I do not speak)-3.116 F F2(lisp) 3.016 E F3 3.016(,b)C .516(ecause the)-3.016 F 3.016(yr)-.15 G .516 (equired programs we don')-3.016 F 3.017(th)-.18 G -2.25 -.2(av e)-3.017 H 3.017(,o).2 G 3.017(rb)-3.017 G .517(ecause I)-3.017 F -.1(wa)72 246.6 S(sn').1 E 2.667(ta)-.18 G .167(ble to mak)-2.667 F 2.667(et)-.1 G .167 (hem w)-2.667 F 2.667(ork. In)-.1 F .167 (these cases I left the command out.)2.667 F .167 (The commands listed in this document ha)5.167 F -.15(ve)-.2 G .357 (been tried and are kno)72 258.6 R .357(wn to w)-.25 F 2.858(ork. It)-.1 F .358(is e)2.858 F .358(xpected that prospecti)-.15 F .658 -.15(ve u) -.25 H .358(sers of this document will read it once to get the).15 F <8d61>72 270.6 Q -.2(vo)-.2 G 3.396(ro).2 G 3.396(fe)-3.396 G -.15(ve) -3.646 G .896(rything that).15 F F2(vi)3.396 E F3 .896 (can do and then use it as a reference document.)3.396 F .895 (Experimentation is recommended.)5.895 F(If)5.895 E(you don')72 282.6 Q 2.5(tu)-.18 G(nderstand a command, try it and see what happens.)-2.5 E 1.447([Note: In re)72 298.2 R 1.448(vising this document, I ha)-.25 F 1.748 -.15(ve a)-.2 H 1.448(ttempted to mak).15 F 3.948(ei)-.1 G 3.948 (tc)-3.948 G 1.448(ompletely re\215ect v)-3.948 F 1.448(ersion 2.12 of) -.15 F F2(vi)3.948 E F3 6.448(.I)C 3.948(td)-6.448 G 1.448(oes not) -3.948 F .516(attempt to document the V)72 310.2 R .516(AX v)-1.35 F .516(ersion \(v)-.15 F .516(ersion 3\), b)-.15 F .516(ut with one or tw) -.2 F 3.016(oe)-.1 G .516(xceptions \(wrapmar)-3.166 F .516(gin, arro) -.18 F 3.015(wk)-.25 G -.15(ey)-3.115 G .515(s\) e).15 F -.15(ve)-.25 G (ry-).15 E(thing said about 2.12 should apply to 3.1.)72 322.2 Q F1 (Mark Horton)5 E F3(])A F2 2.5(2. Notation)72 346.2 R([option])72 361.8 Q F3 .691(is used to denote optional parts of a command.)3.191 F(Man) 5.691 E(y)-.15 E F2(vi)3.191 E F3 .691(commands ha)3.191 F .991 -.15 (ve a)-.2 H 3.191(no).15 G .691(ptional count.)-3.191 F F2([cnt])5.692 E F3(means)3.192 E .509(that an optional number may precede the command t\ o multiply or iterate the command.)72 373.8 R F2({v)5.509 E .509 (ariable item})-.1 F F3 .508(is used to)3.009 F .605 (denote parts of the command which must appear)72 385.8 R 3.105(,b)-.4 G .605(ut can tak)-3.305 F 3.105(ean)-.1 G .606(umber of dif)-3.105 F .606 (ferent v)-.25 F(alues.)-.25 E F2 .606()72 397.8 Q F3 .06(means that the character or one of the charact\ ers in the range described between the tw)2.56 F 2.56(oa)-.1 G .06 (ngle brack)-2.56 F .06(ets is to be)-.1 F 2.738(typed. F)72 409.8 R .238(or e)-.15 F(xample)-.15 E F2()2.738 E F3 .238(means the)2.738 F F2(escape)2.738 E F3 -.1(ke)2.738 G 2.738(yi)-.05 G 2.739(st)-2.738 G 2.739(ob)-2.739 G 2.739(et)-2.739 G(yped.)-2.739 E F2()5.239 E F3 .239(means that a lo)2.739 F .239(wer case letter is to be typed.)-.25 F F2(^)72 421.8 Q F3 .486 (means that the character is to be typed as a)2.986 F F2(contr)2.986 E (ol)-.18 E F3(character)2.986 E 2.986(,t)-.4 G .486(hat is, with the) -2.986 F F2()2.986 E F3 -.1(ke)2.986 G 2.986(yh)-.05 G .486 (eld do)-2.986 F(wn)-.25 E .778 (while simultaneously typing the speci\214ed character)72 433.8 R 5.778 (.I)-.55 G 3.278(nt)-5.778 G .778 (his document control characters will be denoted using the)-3.278 F F1 .008(upper case)72 445.8 R F3(character)2.508 E 2.508(,b)-.4 G .008 (ut ^ and ^ are equi)-.25 F -.25(va)-.25 G 2.508(lent. That).25 F .007(is, for e)2.507 F(xample,) -.15 E F2(<^D>)2.507 E F3 .007(is equal)2.507 F(to)72 457.8 Q F2(<^d>) 2.5 E F3 5(.T)C(he most common character abbre)-5 E (viations used in this list are as follo)-.25 E(ws:)-.25 E 13.45 ( escape,)72 473.4 R(octal 033)2.5 E 18.45( carriage)72 489 R (return, ^M, octal 015)2.5 E 20.11( linefeed)72 504.6 R (^J, octal 012)2.5 E 18.44( ne)72 520.2 R (wline, ^J, octal 012 \(same as linefeed\))-.25 E 17.33( backspace,) 72 535.8 R(^H, octal 010)2.5 E 14( tab,)72 551.4 R(^I, octal 011) 2.5 E 11.22( bell,)72 567 R(^G, octal 07)2.5 E( formfeed,)-.25 F(^L, octal 014)2.5 E 17.33( space,)72 598.2 R (octal 040)2.5 E 14( delete,)72 613.8 R(octal 0177)2.5 E F2 2.5 (3. Basics)72 649.8 R F3 1.761 -.8(To r)72 665.4 T(un).8 E F2(vi)2.661 E F3 .161(the shell v)2.661 F(ariable)-.25 E F2(TERM)2.661 E F3 .161 (must be de\214ned and e)2.661 F .162(xported to your en)-.15 F 2.662 (vironment. Ho)-.4 F 2.662(wy)-.25 G .162(ou do this depends on)-2.662 F .684(which shell you are using.)72 677.4 R -1.1(Yo)5.684 G 3.184(uc)1.1 G .684(an tell which shell you ha)-3.184 F .984 -.15(ve b)-.2 H 3.184 (yt).15 G .684(he character it prompts you for commands with.)-3.184 F .139 (The Bourne shell prompts with `$', and the C shell prompts with `%'.)72 689.4 R -.15(Fo)5.139 G 2.639(rt).15 G .139(hese e)-2.639 F .139 (xamples, we will suppose that you)-.15 F (are using an HP 2621 terminal, whose termcap name is `)72 701.4 Q (`2621')-.74 E('.)-.74 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-2-)300.17 48 Q/F1 10/Times-Bold@0 SF 2.5 (3.1. Bour)72 84 R(ne Shell)-.15 E F0 1.6 -.8(To m)72 99.6 T (anually set your terminal type to 2621 you w).8 E(ould type:)-.1 E (TERM=2621)108 117.6 Q -.15(ex)108 129.6 S(port TERM).15 E 1.037 (There are v)97 151.2 R 1.037(arious w)-.25 F 1.037(ays of ha)-.1 F 1.037 (ving this automatically or semi-automatically done when you log in.)-.2 F(Suppose)6.036 E .33(you usually dial in on a 2621.)72 163.2 R -1.1(Yo) 5.331 G 2.831(uw)1.1 G .331(ant to tell this to the machine, b)-2.931 F .331(ut still ha)-.2 F .631 -.15(ve i)-.2 H 2.831(tw).15 G .331 (ork when you use a hardwired)-2.931 F 2.5(terminal. The)72 175.2 R (recommended w)2.5 E(ay)-.1 E 2.5(,i)-.65 G 2.5(fy)-2.5 G(ou ha)-2.5 E .3 -.15(ve t)-.2 H(he).15 E F1(tset)2.5 E F0 (program, is to use the sequence)2.5 E(tset \255s \255d 2621 > tset$$) 108 193.2 Q 2.5(.t)108 205.2 S(set$$)-2.5 E(rm tset$$)108 217.2 Q .577 (in your .login \(for csh\) or the same thing using `.)72 235.2 R 3.077 ('i)-.7 G .577(nstead of `source' in your .pro\214le \(for sh\).)-3.077 F .576(The abo)5.576 F .876 -.15(ve l)-.15 H .576(ine says).15 F .471 (that if you are dialing in you are on a 2621, b)72 247.2 R .472(ut if \ you are on a hardwired terminal it \214gures out your terminal type)-.2 F(from an on-line list.)72 259.2 Q F1 2.5(3.2. The)72 283.2 R 2.5(CS)2.5 G(hell)-2.5 E F0 1.6 -.8(To m)72 298.8 T (anually set your terminal type to 2621 you w).8 E(ould type:)-.1 E (seten)108 316.8 Q 2.5(vT)-.4 G(ERM 2621)-2.5 E 1.037(There are v)97 338.4 R 1.037(arious w)-.25 F 1.037(ays of ha)-.1 F 1.037 (ving this automatically or semi-automatically done when you log in.)-.2 F(Suppose)6.036 E .33(you usually dial in on a 2621.)72 350.4 R -1.1(Yo) 5.331 G 2.831(uw)1.1 G .331(ant to tell this to the machine, b)-2.931 F .331(ut still ha)-.2 F .631 -.15(ve i)-.2 H 2.831(tw).15 G .331 (ork when you use a hardwired)-2.931 F 2.5(terminal. The)72 362.4 R (recommended w)2.5 E(ay)-.1 E 2.5(,i)-.65 G 2.5(fy)-2.5 G(ou ha)-2.5 E .3 -.15(ve t)-.2 H(he).15 E F1(tset)2.5 E F0 (program, is to use the sequence)2.5 E(tset \255s \255d 2621 > tset$$) 108 380.4 Q(source tset$$)108 392.4 Q(rm tset$$)108 404.4 Q .066 (in your .login.*)72 422.4 R .066(The abo)5.066 F .366 -.15(ve l)-.15 H .065(ine says that if you are dialing in you are on a 2621, b).15 F .065 (ut if you are on a hardwired termi-)-.2 F (nal it \214gures out your terminal type from an on-line list.)72 434.4 Q F1 2.5(4. Normal)72 458.4 R(Commands)2.5 E -.37(Vi)72 474 S F0 .615 (is a visual editor with a windo)3.485 F 3.116(wo)-.25 G 3.116(nt)-3.116 G .616(he \214le.)-3.116 F .616(What you see on the screen is)5.616 F F1 (vi)3.116 E F0 1.716 -.55('s c)D .616(urrent notion of what your \214le) .55 F .196 (will contain, \(at this point in the \214le\), when it is written out.) 72 486 R .195(Most commands do not cause an)5.195 F 2.695(yc)-.15 G .195 (hange in the screen)-2.695 F .801(until the complete command is typed.) 72 498 R .802 (Should you get confused while typing a command, you can abort the com-) 5.801 F .558(mand by typing an character)72 510 R 5.558(.Y)-.55 G .558(ou will kno)-6.658 F 3.058(wy)-.25 G .558 (ou are back to command le)-3.058 F -.15(ve)-.25 G 3.058(lw).15 G .558 (hen you hear a .)-3.058 F(Usu-)5.558 E 1.302 (ally typing an will produce the same result.)72 522 R(When)6.302 E F1(vi)3.802 E F0 1.303 (gets an improperly formatted command it rings the)3.802 F 2.5 (. F)72 534 R(ollo)-.15 E(wing are the)-.25 E F1(vi)2.5 E F0 (commands brok)2.5 E(en do)-.1 E(wn by function.)-.25 E F1 2.5 (4.1. Entry)72 558 R(and Exit)2.5 E F0 1.6 -.8(To e)72 573.6 T(nter).8 E F1(vi)2.5 E F0(on a particular)2.5 E/F2 10/Times-Italic@0 SF(\214le)2.5 E F0 2.5(,t)C(ype)-2.5 E F1(vi)108 591.6 Q F2(\214le)2.5 E F0 .319 (The \214le will be read in and the cursor will be placed at the be)72 609.6 R .319(ginning of the \214rst line.)-.15 F .319 (The \214rst screenfull of the \214le)5.319 F (will be displayed on the terminal.)72 621.6 Q 1.6 -.8(To g)97 637.2 T (et out of the editor).8 E 2.5(,t)-.4 G(ype)-2.5 E(ZZ)108 655.2 Q .335(\ If you are in some special mode, such as input mode or the middle of a \ multi-k)72 673.2 R -.15(ey)-.1 G(strok).15 E 2.835(ec)-.1 G .335 (ommand, it may be neces-)-2.835 F(sary to type \214rst.)72 685.2 Q .32 LW 144 710 72 710 DL/F3 8/Times-Roman@0 SF 2(*O)72 720 S 2(nav)-2 G(ersion 6 system without en)-2.12 E(vironments, the in)-.32 E -.16(vo) -.32 G(cation of tset is simpler).16 E 2(,j)-.32 G(ust add the line `)-2 E(`tset \255d 2621')-.592 E 2('t)-.592 G 2(oy)-2 G (our .login or .pro\214le.)-2 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-3-)300.17 48 Q/F1 10/Times-Bold@0 SF 2.5 (4.2. Cursor)72 84 R(and P)2.5 E(age Motion)-.1 E(NO)72 99.6 Q(TE:)-.4 E F0 .47(The arro)2.97 F 2.97(wk)-.25 G -.15(ey)-3.07 G 2.97(s\().15 G .47 (see the ne)-2.97 F .47 (xt four commands\) on certain kinds of terminals will not w)-.15 F .47 (ork with the PDP-11)-.1 F -.15(ve)72 111.6 S .154(rsion of vi.).15 F .154(The control v)5.154 F .155(ersions or the hjkl v)-.15 F .155 (ersions will w)-.15 F .155(ork on an)-.1 F 2.655(yt)-.15 G 2.655 (erminal. Experienced)-2.655 F .155(users prefer the hjkl)2.655 F -.1 (ke)72 123.6 S 1.285(ys because the)-.05 F 3.785(ya)-.15 G 1.285(re al) -3.785 F -.1(wa)-.1 G 1.285(ys right under their \214ngers.).1 F(Be) 6.284 E 1.284(ginners often prefer the arro)-.15 F 3.784(wk)-.25 G -.15 (ey)-3.884 G 1.284(s, since the).15 F 3.784(yd)-.15 G 3.784(on)-3.784 G (ot)-3.784 E .128(require memorization of which hjkl k)72 135.6 R .428 -.15(ey i)-.1 H 2.628(sw).15 G 2.628(hich. The)-2.628 F .128(mnemonic v) 2.628 F .128(alue of hjkl is clear from looking at the k)-.25 F -.15(ey) -.1 G(board).15 E(of an adm3a.)72 147.6 Q([cnt] or [cnt]h or [cnt]) 72 175.2 Q/F2 10/Symbol SFA F0(Mo)152 187.2 Q .97 -.15(ve t)-.15 H .67(he cursor to the left one character).15 F 5.67(.C)-.55 G .669 (ursor stops at the left mar)-5.67 F .669(gin of the page.)-.18 F .669 (If cnt is)5.669 F(gi)152 199.2 Q -.15(ve)-.25 G(n, these commands mo) .15 E .3 -.15(ve t)-.15 H(hat man).15 E 2.5(ys)-.15 G(paces.)-2.5 E ([cnt]^N or [cnt]j or [cnt])72 214.8 Q F2A F0(or [cnt])2.5 E(Mo) 152 226.8 Q 1.529 -.15(ve d)-.15 H -.25(ow).15 G 3.729(no).25 G 1.229 (ne line.)-3.729 F(Mo)6.229 E 1.229(ving of)-.15 F 3.729(ft)-.25 G 1.229 (he screen scrolls the windo)-3.729 F 3.73(wt)-.25 G 3.73(of)-3.73 G 1.23(orce a ne)-3.73 F 3.73(wl)-.25 G 1.23(ine onto the)-3.73 F 2.5 (screen. Mnemonic:)152 238.8 R F1(N)2.5 E F0 -.15(ex)C(t).15 E ([cnt]^P or [cnt]k or [cnt])72 254.4 Q F2A F0(Mo)152 266.4 Q .399 -.15(ve u)-.15 H 2.599(po).15 G .099(ne line.)-2.599 F(Mo)5.099 E .098 (ving of)-.15 F 2.598(ft)-.25 G .098(he top of the screen forces ne) -2.598 F 2.598(wt)-.25 G -.15(ex)-2.598 G 2.598(to).15 G .098 (nto the screen.)-2.598 F(Mnemonic:)5.098 E F1(P)152 278.4 Q F0(re)A (vious)-.25 E([cnt] or [cnt]l or [cnt])72 294 Q F2A F0(Mo)152 306 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he right one character)-2.5 E 5 (.C)-.55 G(ursor will not go be)-5 E(yond the end of the line.)-.15 E 55.29([cnt]- Mo)72 321.6 R .3 -.15(ve t)-.15 H (he cursor up the screen to the be).15 E(ginning of the ne)-.15 E (xt line.)-.15 E(Scroll if necessary)5 E(.)-.65 E([cnt]+ or [cnt])72 337.2 Q(Mo)152 361.2 Q .3 -.15(ve t)-.15 H(he cursor do).15 E (wn the screen to the be)-.25 E(ginning of the ne)-.15 E(xt line.)-.15 E (Scroll up if necessary)5 E(.)-.65 E 53.62([cnt]$ Mo)72 376.8 R .486 -.15(ve t)-.15 H .187(he cursor to the end of the line.).15 F .187 (If there is a count, mo)5.187 F .487 -.15(ve t)-.15 H 2.687(ot).15 G .187(he end of the line "cnt" lines)-2.687 F(forw)152 388.8 Q (ard in the \214le.)-.1 E 76.67(^M)72 404.4 S .3 -.15(ove t)-76.67 H (he cursor to the be).15 E(ginning of the \214rst w)-.15 E (ord on the line.)-.1 E 75(0M)72 420 S .3 -.15(ove t)-75 H (he cursor to the left mar).15 E(gin of the current line.)-.18 E 56.62 ([cnt]| Mo)72 435.6 R .3 -.15(ve t)-.15 H (he cursor to the column speci\214ed by the count.).15 E(The def)5 E (ault is column zero.)-.1 E 51.4([cnt]w Mo)72 451.2 R 1.088 -.15(ve t) -.15 H .788(he cursor to the be).15 F .787(ginning of the ne)-.15 F .787 (xt w)-.15 F .787(ord. If there is a count, then mo)-.1 F 1.087 -.15 (ve f)-.15 H(orw).15 E .787(ard that)-.1 F(man)152 463.2 Q 2.5(yw)-.15 G (ords and position the cursor at the be)-2.6 E(ginning of the w)-.15 E 2.5(ord. Mnemonic:)-.1 F(ne)2.5 E(xt-)-.15 E F1(w)A F0(ord)A 49.18 ([cnt]W Mo)72 478.8 R .908 -.15(ve t)-.15 H .608(he cursor to the be).15 F .608(ginning of the ne)-.15 F .608(xt w)-.15 F .608(ord which follo) -.1 F .608(ws a "white space" \(,,)-.25 F(or \).)152 490.8 Q(Ignore other punctuation.)5 E 53.62([cnt]b Mo)72 506.4 R .3 -.15(ve t) -.15 H(he cursor to the preceding w).15 E 2.5(ord. Mnemonic:)-.1 F F1(b) 2.5 E F0(ackup-w)A(ord)-.1 E 51.95([cnt]B Mo)72 522 R 2.005 -.15(ve t) -.15 H 1.705(he cursor to the preceding w).15 F 1.705 (ord that is separated from the current w)-.1 F 1.705(ord by a "white) -.1 F(space" \(,, or \).)152 534 Q 54.18([cnt]e Mo)72 549.6 R 3.145 -.15(ve t)-.15 H 2.846(he cursor to the end of the current w).15 F 2.846(ord or the end of the "cnt"')-.1 F 2.846(th w)-.18 F 2.846 (ord hence.)-.1 F(Mnemonic:)152 561.6 Q F1(e)2.5 E F0(nd-of-w)A(ord)-.1 E 52.51([cnt]E Mo)72 577.2 R .333 -.15(ve t)-.15 H .033 (he cursor to the end of the current w).15 F .032 (ord which is delimited by "white space" \(,,)-.1 F(or \).) 152 589.2 Q([line number]G)72 604.8 Q(Mo)152 616.8 Q .793 -.15(ve t)-.15 H .493(he cursor to the line speci\214ed.).15 F .494 (Of particular use are the sequences "1G" and "G", which)5.494 F(mo)152 628.8 Q .3 -.15(ve t)-.15 H(he cursor to the be).15 E (ginning and the end of the \214le respecti)-.15 E -.15(ve)-.25 G(ly).15 E 5(.M)-.65 G(nemonic:)-5 E F1(G)2.5 E F0(o-to)A F1(NO)72 644.4 Q(TE:) -.4 E F0 .416(The ne)2.916 F .416(xt four commands \(^D, ^U, ^F)-.15 F 2.916(,^)-.8 G .416(B\) are not true motion commands, in that the)-2.916 F 2.915(yc)-.15 G .415(annot be used as the)-2.915 F (object of commands such as delete or change.)72 656.4 Q 48.07 ([cnt]^D Mo)72 672 R .622 -.15(ve t)-.15 H .322(he cursor do).15 F .322 (wn in the \214le by "cnt" lines \(or the last "cnt" if a ne)-.25 F 2.822(wc)-.25 G .322(ount isn')-2.822 F 2.822(tg)-.18 G -2.15 -.25(iv e) -2.822 H 2.822(n. The).25 F(initial def)152 684 Q (ault is half a page.\))-.1 E(The screen is simultaneously scrolled up.) 5 E(Mnemonic:)5 E F1(D)2.5 E F0 -.25(ow)C(n).25 E 48.07([cnt]^U Mo)72 699.6 R 2.218 -.15(ve t)-.15 H 1.918 (he cursor up in the \214le by "cnt" lines.).15 F 1.917 (The screen is simultaneously scrolled do)6.917 F(wn.)-.25 E(Mnemonic:) 152 711.6 Q F1(U)2.5 E F0(p)A EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-4-)300.17 48 Q 49.73([cnt]^F Mo)72 84 R 1.074 -.15(ve t)-.15 H .774(he cursor to the ne).15 F .774(xt page.)-.15 F 3.274(Ac)5.774 G .774(ount mo)-3.274 F -.15(ve)-.15 G 3.274(st).15 G .774(hat man)-3.274 F 3.274(yp)-.15 G 3.274(ages. T)-3.274 F .974 -.1 (wo l)-.8 H .775(ines of the pre).1 F(vious)-.25 E(page are k)152 96 Q (ept on the screen for continuity if possible.)-.1 E(Mnemonic:)5 E/F1 10 /Times-Bold@0 SF(F)2.5 E F0(orw)A(ard-a-page)-.1 E 48.62([cnt]^B Mo)72 111.6 R 2.482 -.15(ve t)-.15 H 2.182(he cursor to the pre).15 F 2.181 (vious page.)-.25 F -1 -.8(Tw o)7.181 H 2.181 (lines of the current page are k)5.481 F 2.181(ept if possible.)-.1 F (Mnemonic:)152 123.6 Q F1(B)2.5 E F0(ackup-a-page)A 55.29([cnt]\( Mo)72 139.2 R 1.054 -.15(ve t)-.15 H .754(he cursor to the be).15 F .755 (ginning of the ne)-.15 F .755(xt sentence.)-.15 F 3.255(As)5.755 G .755 (entence is de\214ned as ending with a)-3.255 F(".", "!", or "?")152 151.2 Q(follo)5 E(wed by tw)-.25 E 2.5(os)-.1 G(paces or a .)-2.5 E 55.29([cnt]\) Mo)72 166.8 R .3 -.15(ve t)-.15 H(he cursor backw).15 E (ards to the be)-.1 E(ginning of a sentence.)-.15 E 53.82([cnt]} Mo)72 182.4 R .618 -.15(ve t)-.15 H .318(he cursor to the be).15 F .318 (ginning of the ne)-.15 F .318(xt paragraph.)-.15 F .318(This command w) 5.318 F .318(orks best inside)-.1 F F1(nr)2.818 E(off)-.18 E F0 3.273 (documents. It)152 194.4 R .773(understands tw)3.273 F 3.273(os)-.1 G .773(ets of)-3.273 F F1(nr)3.273 E(off)-.18 E F0(macros,)3.274 E F1 (\255ms)3.274 E F0(and)3.274 E F1(\255mm)3.274 E F0 3.274(,f)C .774 (or which the commands)-3.274 F .966 (".IP", ".LP", ".PP", ".QP", "P", as well as the nrof)152 206.4 R 3.466 (fc)-.25 G .965(ommand ".bp" are considered to be para-)-3.466 F 1.086 (graph delimiters.)152 218.4 R 3.586(Ab)6.086 G 1.087 (lank line also delimits a paragraph.)-3.586 F(The)6.087 E F1(nr)3.587 E (off)-.18 E F0 1.087(macros that it accepts as)3.587 F (paragraph delimiters is adjustable.)152 230.4 Q(See)5 E F1(paragraphs) 2.5 E F0(under the)2.5 E F1(Set Commands)2.5 E F0(section.)2.5 E 53.82 ([cnt]{ Mo)72 246 R .3 -.15(ve t)-.15 H(he cursor backw).15 E (ards to the be)-.1 E(ginning of a paragraph.)-.15 E 70.84(]] Mo)72 261.6 R 1.171 -.15(ve t)-.15 H .871(he cursor to the ne).15 F .871 (xt "section", where a section is de\214ned by tw)-.15 F 3.37(os)-.1 G .87(ets of)-3.37 F F1(nr)3.37 E(off)-.18 E F0(macros,)3.37 E F1(\255ms) 152 273.6 Q F0(and)3.893 E F1(\255mm)3.893 E F0 3.893(,i)C 3.893(nw) -3.893 G 1.394(hich ".NH", ".SH", and ".H" delimit a section.)-3.893 F 3.894(Al)6.394 G 1.394(ine be)-3.894 F 1.394(ginning with a)-.15 F( sequence, or a line be)-.25 F .807 (ginning with a "{" are also considered to be section delimiters.)-.15 F .216(The last option mak)152 297.6 R .216 (es it useful for \214nding the be)-.1 F .216(ginnings of C functions.) -.15 F(The)5.217 E F1(nr)2.717 E(off)-.18 E F0 .217(macros that)2.717 F (are used for section delimiters can be adjusted.)152 309.6 Q(See)5 E F1 (sections)2.5 E F0(under the)2.5 E F1(Set Commands)2.5 E F0(section.)2.5 E 70.84([[ Mo)72 325.2 R .3 -.15(ve t)-.15 H(he cursor backw).15 E (ards to the be)-.1 E(ginning of a section.)-.15 E 71.67(%M)72 340.8 S .928 -.15(ove t)-71.67 H .627 (he cursor to the matching parenthesis or brace.).15 F .627(This is v) 5.627 F .627(ery useful in C or lisp code.)-.15 F(If)5.627 E .35 (the cursor is sitting on a)152 352.8 R F1 2.85(\(\){)2.85 G F0(or)A F1 (})2.85 E F0 .351(the cursor is mo)2.85 F -.15(ve)-.15 G 2.851(dt).15 G 2.851(ot)-2.851 G .351(he matching character at the other end)-2.851 F .255(of the section.)152 364.8 R .255 (If the cursor is not sitting on a brace or a parenthesis,)5.255 F F1 (vi)2.754 E F0 .254(searches forw)2.754 F .254(ard until it)-.1 F (\214nds one and then jumps to the match mate.)152 376.8 Q 51.4 ([cnt]H If)72 392.4 R .001(there is no count mo)2.501 F .301 -.15(ve t) -.15 H .001(he cursor to the top left position on the screen.).15 F .002 (If there is a count, then)5.002 F(mo)152 404.4 Q .892 -.15(ve t)-.15 H .592(he cursor to the be).15 F .592 (ginning of the line "cnt" lines from the top of the screen.)-.15 F (Mnemonic:)5.591 E F1(H)152 416.4 Q F0(ome)A 52.51([cnt]L If)72 432 R .524(there is no count mo)3.024 F .825 -.15(ve t)-.15 H .525 (he cursor to the be).15 F .525(ginning of the last line on the screen.) -.15 F .525(If there is a)5.525 F 1.719(count, then mo)152 444 R 2.019 -.15(ve t)-.15 H 1.718(he cursor to the be).15 F 1.718 (ginning of the line "cnt" lines from the bottom of the)-.15 F 2.5 (screen. Mnemonic:)152 456 R F1(L)2.5 E F0(ast)A 71.11(MM)72 471.6 S .3 -.15(ove t)-71.11 H(he cursor to the be).15 E (ginning of the middle line on the screen.)-.15 E(Mnemonic:)5 E F1(M)2.5 E F0(iddle)A 46.23(m This)72 487.2 R .066(command does not mo)2.566 F .366 -.15(ve t)-.15 H .066(he cursor).15 F 2.566(,b)-.4 G .066(ut it) -2.766 F F1(marks)2.566 E F0 .066 (the place in the \214le and the character "" becomes the label for referring to this location in the \214le.)152 499.2 R 1.491(See the ne)6.491 F 1.491(xt tw)-.15 F 3.991(oc)-.1 G (ommands.)-3.991 E(Mnemonic:)152 511.2 Q F1(m)2.952 E F0(ark)A F1(NO) 2.952 E(TE:)-.4 E F0 .453 (The mark command is not a motion, and cannot be used as the tar)2.952 F (get)-.18 E(of commands such as delete.)152 523.2 Q 50.68(\264 Mo) 72 538.8 R .3 -.15(ve t)-.15 H(he cursor to the be).15 E (ginning of the line that is mark)-.15 E(ed with the label "".)-.1 E 50.68(\222 Mo)72 554.4 R .3 -.15(ve t)-.15 H(he cursor to the e) .15 E(xact position on the line that w)-.15 E(as mark)-.1 E (ed with with the label "".)-.1 E 70.8472 570 R 1.57 -.15(ve t)-.15 H 1.27(he cursor back to the be).15 F 1.269 (ginning of the line where it w)-.15 F 1.269 (as before the last "non-relati)-.1 F -.15(ve)-.25 G(").15 E(mo)152 582 Q -.15(ve)-.15 G 5.821(.A).15 G("non-relati)-2.5 E -.15(ve)-.25 G 3.321 ("m).15 G 1.121 -.15(ove i)-3.321 H 3.321(ss).15 G .821 (omething such as a search or a jump to a speci\214c line in the)-3.321 F(\214le, rather than mo)152 594 Q (ving the cursor or scrolling the screen.)-.15 E 70.84<9292204d6f>72 609.6 R .43 -.15(ve t)-.15 H .13(he cursor back to the e).15 F .13 (xact spot on the line where it w)-.15 F .13 (as located before the last "non-rela-)-.1 F(ti)152 621.6 Q -.15(ve)-.25 G 2.5("m).15 G -.15(ove)-2.5 G(.).15 E F1 2.5(4.3. Sear)72 645.6 R(ches) -.18 E F0(The follo)72 661.2 Q(wing commands allo)-.25 E 2.5(wy)-.25 G (ou to search for items in a \214le.)-2.5 E([cnt]f{chr})72 676.8 Q .244 (Search forw)152 700.8 R .244(ard on the line for the ne)-.1 F .244 (xt or "cnt"')-.15 F .245(th occurrence of the character "chr".)-.18 F .245(The cursor)5.245 F(is placed)152 712.8 Q F1(at)2.5 E F0 (the character of interest.)2.5 E(Mnemonic:)5 E F1(f)2.5 E F0 (ind character)A EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-5-)300.17 48 Q([cnt]F{chr})72 84 Q .119 (Search backw)152 108 R .118(ards on the line for the ne)-.1 F .118 (xt or "cnt"')-.15 F .118(th occurrence of the character "chr".)-.18 F .118(The cur)5.118 F(-)-.2 E(sor is placed)152 120 Q/F1 10/Times-Bold@0 SF(at)2.5 E F0(the character of interest.)2.5 E([cnt]t{chr})72 135.6 Q .244(Search forw)152 159.6 R .244(ard on the line for the ne)-.1 F .244 (xt or "cnt"')-.15 F .245(th occurrence of the character "chr".)-.18 F .245(The cursor)5.245 F(is placed)152 171.6 Q F1(just pr)2.5 E(eceding) -.18 E F0(the character of interest.)2.5 E(Mnemonic: mo)5 E .3 -.15 (ve c)-.15 H(ursor up).15 E F1(t)2.5 E F0 2.5(oc)C(haracter)-2.5 E ([cnt]T{chr})72 187.2 Q .119(Search backw)152 211.2 R .118 (ards on the line for the ne)-.1 F .118(xt or "cnt"')-.15 F .118 (th occurrence of the character "chr".)-.18 F .118(The cur)5.118 F(-)-.2 E(sor is placed)152 223.2 Q F1(just pr)2.5 E(eceding)-.18 E F0 (the character of interest.)2.5 E 55.84([cnt]; Repeat)72 238.8 R (the last "f", "F", "t" or "T" command.)2.5 E 56.12([cnt], Repeat)72 254.4 R .263(the last "f", "F", "t" or "T" command, b)2.763 F .264 (ut in the opposite search direction.)-.2 F .264(This is useful)5.264 F (if you o)152 266.4 Q -.15(ve)-.15 G(rshoot.).15 E([cnt]/[string]/) 72 282 Q 1.54(Search forw)152 294 R 1.54(ard for the ne)-.1 F 1.54 (xt occurrence of "string".)-.15 F 1.54 (Wrap around at the end of the \214le does)6.54 F(occur)152 306 Q 5(.T) -.55 G(he \214nal)-5 E F1()2.5 E F0(is not required.)2.5 E ([cnt]?[string]?)72 321.6 Q .272(Search backw)152 333.6 R .272 (ards for the ne)-.1 F .272(xt occurrence of "string".)-.15 F .272 (If a count is speci\214ed, the count becomes)5.272 F .283(the ne)152 345.6 R 2.783(ww)-.25 G(indo)-2.783 E 2.783(ws)-.25 G 2.783(ize. Wrap) -2.783 F .282(around at the be)2.782 F .282 (ginning of the \214le does occur)-.15 F 5.282(.T)-.55 G .282 (he \214nal)-5.282 F F1()2.782 E F0 .282(is not)2.782 F(required.)152 357.6 Q 75(nR)72 373.2 S (epeat the last /[string]/ or ?[string]? search.)-75 E(Mnemonic:)5 E F1 (n)2.5 E F0 -.15(ex)C 2.5(to).15 G(ccurrence.)-2.5 E 72.78(NR)72 388.8 S (epeat the last /[string]/ or ?[string]? search, b)-72.78 E (ut in the re)-.2 E -.15(ve)-.25 G(rse direction.).15 E (:g/[string]/[editor command])72 404.4 Q(Using the)152 428.4 Q F1(:) 2.5 E F0(syntax it is possible to do global searches ala the standard U\ NIX "ed" editor)2.5 E(.)-.55 E F1 2.5(4.4. T)72 452.4 R(ext Insertion) -.92 E F0 .935(The follo)72 468 R .935(wing commands allo)-.25 F 3.435 (wf)-.25 G .935(or the insertion of te)-3.435 F 3.436(xt. All)-.15 F .936(multicharacter te)3.436 F .936 (xt insertions are terminated with an)-.15 F .052( character)72 480 R 5.052(.T)-.55 G .052(he last change can al)-5.052 F -.1(wa)-.1 G .052 (ys be).1 F F1(undone)2.552 E F0 .052(by typing a)2.552 F F1(u)2.551 E F0 5.051(.T)C .051(he te)-5.051 F .051 (xt insert in insertion mode can contain)-.15 F(ne)72 492 Q(wlines.)-.25 E(a{te)72 507.6 Q 24.56(xt} Insert)-.15 F(te)2.5 E (xt immediately follo)-.15 E(wing the cursor position.)-.25 E(Mnemonic:) 5 E F1(a)2.5 E F0(ppend)A(A{te)72 523.2 Q 21.78(xt} Insert)-.15 F (te)2.5 E(xt at the end of the current line.)-.15 E(Mnemonic:)5 E F1(A) 2.5 E F0(ppend)A(i{te)72 538.8 Q 26.22(xt} Insert)-.15 F(te)2.5 E (xt immediately preceding the cursor position.)-.15 E(Mnemonic:)5 E F1 (i)2.5 E F0(nsert)A(I{te)72 554.4 Q 25.67(xt} Insert)-.15 F(te)2.5 E(xt at the be)-.15 E(ginning of the current line.)-.15 E(o{te)72 570 Q 24(xt} Insert)-.15 F 3.69(an)3.69 G 1.69 -.25(ew l)-3.69 H 1.19 (ine after the line on which the cursor appears and insert te).25 F 1.19 (xt there.)-.15 F(Mnemonic:)6.19 E F1(o)152 582 Q F0(pen ne)A 2.5(wl) -.25 G(ine)-2.5 E(O{te)72 597.6 Q 21.78(xt} Insert)-.15 F 2.5(an) 2.5 G .5 -.25(ew l)-2.5 H (ine preceding the line on which the cursor appears and insert te).25 E (xt there.)-.15 E F1 2.5(4.5. T)72 621.6 R(ext Deletion)-.92 E F0 .005 (The follo)72 637.2 R .005(wing commands allo)-.25 F 2.505(wt)-.25 G .004(he user to delete te)-2.505 F .004(xt in v)-.15 F .004(arious w) -.25 F 2.504(ays. All)-.1 F .004(changes can al)2.504 F -.1(wa)-.1 G .004(ys be).1 F F1(undone)2.504 E F0 .004(by typing)2.504 F(the)72 649.2 Q F1(u)2.5 E F0(command.)2.5 E 53.62([cnt]x Delete)72 664.8 R (the character or characters starting at the cursor position.)2.5 E 51.4 ([cnt]X Delete)72 680.4 R(the character or characters starting at the c\ haracter preceding the cursor position.)2.5 E 72.78(DD)72 696 S (eletes the remainder of the line starting at the cursor)-72.78 E 5(.M) -.55 G(nemonic:)-5 E F1(D)2.5 E F0(elete the rest of line)A ([cnt]d{motion})72 711.6 Q .232 (Deletes one or more occurrences of the speci\214ed motion.)152 723.6 R (An)5.233 E 2.733(ym)-.15 G .233(otion from sections 4.1 and 4.2)-2.733 F EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-6-)300.17 48 Q(can be used here.)152 84 Q (The d can be stuttered \(e.g. [cnt]dd\) to delete cnt lines.)5 E/F1 10 /Times-Bold@0 SF 2.5(4.6. T)72 108 R(ext Replacement)-.92 E F0 1.72 (The follo)72 123.6 R 1.72(wing commands allo)-.25 F 4.22(wt)-.25 G 1.719(he user to simultaneously delete and insert ne)-4.22 F 4.219(wt) -.25 G -.15(ex)-4.219 G 4.219(t. All).15 F 1.719(such actions can be) 4.219 F F1(undone)72 135.6 Q F0(by typing)2.5 E F1(u)2.5 E F0(follo)2.5 E(wing the command.)-.25 E 50.12(r Replaces)72 151.2 R .104 (the character at the current cursor position with .)2.604 F .104 (This is a one character replace-)5.104 F 2.5(ment. No)152 163.2 R ( is required for termination.)2.5 E(Mnemonic:)5 E F1(r)5 E F0 (eplace character)A(R{te)72 178.8 Q 22.33(xt} Starts)-.15 F -.15 (ove)3.083 G .583(rlaying the characters on the screen with whate).15 F -.15(ve)-.25 G 3.082(ry).15 G .582(ou type.)-3.082 F .582 (It does not stop until an)5.582 F( is typed.)152 190.8 Q ([cnt]s{te)72 206.4 Q 6.23(xt} Substitute)-.15 F .404 (for "cnt" characters be)2.904 F .404 (ginning at the current cursor position.)-.15 F 2.904(A")5.404 G .404 ($" will appear at the)-2.904 F 1.123(position in the te)152 218.4 R 1.123(xt where the "cnt"')-.15 F 1.122 (th character appears so you will kno)-.18 F 3.622(wh)-.25 G 1.622 -.25 (ow m)-3.622 H 1.122(uch you are).25 F 2.5(erasing. Mnemonic:)152 230.4 R F1(s)2.5 E F0(ubstitute)A([cnt]S{te)72 246 Q 4.56(xt} Substitute) -.15 F .601(for the entire current line \(or lines\).)3.101 F .601 (If no count is gi)5.601 F -.15(ve)-.25 G .601 (n, a "$" appears at the end of).15 F .161(the current line.)152 258 R .161(If a count of more than 1 is gi)5.161 F -.15(ve)-.25 G .161 (n, all the lines to be replaced are deleted before).15 F (the insertion be)152 270 Q(gins.)-.15 E([cnt]c{motion}{te)72 285.6 Q (xt})-.15 E .845 (Change the speci\214ed "motion" by replacing it with the insertion te) 152 297.6 R 3.346(xt. A)-.15 F .846("$" will appear at the)3.346 F .479 (end of the last item that is being deleted unless the deletion in)152 309.6 R -.2(vo)-.4 G(lv).2 E .478(es whole lines.)-.15 F(Motion')5.478 E 2.978(sc)-.55 G(an)-2.978 E(be an)152 321.6 Q 2.5(ym)-.15 G (otion from sections 4.1 or 4.2.)-2.5 E (Stuttering the c \(e.g. [cnt]cc\) changes cnt lines.)5 E F1 2.5 (4.7. Mo)72 345.6 R(ving T)-.1 E(ext)-.92 E -.37(Vi)72 361.2 S F0(pro) 2.944 E .074(vides a number of w)-.15 F .075(ays of mo)-.1 F .075 (ving chunks of te)-.15 F .075(xt around.)-.15 F .075(There are nine b) 5.075 F(uf)-.2 E .075(fers into which each piece of te)-.25 F(xt)-.15 E 1.312(which is deleted or "yank)72 373.2 R 1.312 (ed" is put in addition to the "undo" b)-.1 F(uf)-.2 E(fer)-.25 E 6.312 (.T)-.55 G 1.312(he most recent deletion or yank is in the)-6.312 F .41 ("undo" b)72 385.2 R(uf)-.2 E .41(fer and also usually in b)-.25 F(uf) -.2 E .41(fer 1, the ne)-.25 F .41(xt most recent in b)-.15 F(uf)-.2 E .411(fer 2, and so forth.)-.25 F .411(Each ne)5.411 F 2.911(wd)-.25 G .411(eletion pushes)-2.911 F(do)72 397.2 Q .035 (wn all the older deletions.)-.25 F .035 (Deletions older than 9 disappear)5.035 F 5.035(.T)-.55 G .035 (here is also a set of named re)-5.035 F .035(gisters, a-z, into which) -.15 F(te)72 409.2 Q .214(xt can optionally be placed.)-.15 F .214 (If an)5.214 F 2.714(yd)-.15 G .215 (elete or replacement type command is preceded by)-2.714 F F1(") 2.715 E F0 2.715(,t)C .215(hat named b)-2.715 F(uf)-.2 E(fer)-.25 E .722 (will contain the te)72 421.2 R .721(xt deleted after the command is e) -.15 F -.15(xe)-.15 G 3.221(cuted. F).15 F .721(or e)-.15 F(xample,)-.15 E F1("a3dd)3.221 E F0 .721(will delete three lines starting at)3.221 F .278(the current line and put them in b)72 433.2 R(uf)-.2 E(fer)-.25 E F1("a)2.778 E F0 2.778(.* There)B .278(are tw)2.778 F 2.778(om)-.1 G .278(ore basic commands and some v)-2.778 F .278 (ariations useful in get-)-.25 F(ting and putting te)72 445.2 Q (xt into a \214le.)-.15 E(["][cnt]y{motion})72 460.8 Q -1(Ya)152 484.8 S .557 (nk the speci\214ed item or "cnt" items and put in the "undo" b)1 F(uf) -.2 E .557(fer or the speci\214ed b)-.25 F(uf)-.2 E(fer)-.25 E 5.558(.T) -.55 G(he)-5.558 E -.25(va)152 496.8 S .418 (riety of "items" that can be yank).25 F .417 (ed is the same as those that can be deleted with the "d" com-)-.1 F 1.018(mand or changed with the "c" command.)152 508.8 R 1.019 (In the same w)6.019 F 1.019(ay that "dd" means delete the current)-.1 F (line and "cc" means replace the current line, "yy" means yank the curr\ ent line.)152 520.8 Q 17.17(["][cnt]Y Y)72 536.4 R .832(ank the cu\ rrent line or the "cnt" lines starting from the current line.)-1 F .831 (If no b)5.832 F(uf)-.2 E .831(fer is speci\214ed,)-.25 F(the)152 548.4 Q 3.086(yw)-.15 G .587(ill go into the "undo" b)-3.086 F(uf)-.2 E(fer) -.25 E 3.087(,l)-.4 G(ik)-3.087 E 3.087(ea)-.1 G .887 -.15(ny d)-3.087 H .587(elete w).15 F 3.087(ould. It)-.1 F .587(is equi)3.087 F -.25(va) -.25 G .587(lent to "yy".).25 F(Mnemonic:)5.587 E F1(Y)152 560.4 Q F0 (ank)A 38.27(["]p Put)72 576 R .734("undo" b)3.234 F(uf)-.2 E .734 (fer or the speci\214ed b)-.25 F(uf)-.2 E .734(fer do)-.25 F(wn)-.25 E F1(after)3.234 E F0 .734(the cursor)3.234 F 5.734(.I)-.55 G 3.234(fw) -5.734 G .733(hole lines were yank)-3.234 F .733(ed or)-.1 F .224 (deleted into the b)152 588 R(uf)-.2 E(fer)-.25 E 2.724(,t)-.4 G .224 (hen the)-2.724 F 2.724(yw)-.15 G .224(ill be put do)-2.724 F .224 (wn on the line follo)-.25 F .225(wing the line the cursor is on.)-.25 F .523(If something else w)152 600 R .523(as deleted, lik)-.1 F 3.023(eaw) -.1 G .522(ord or sentence, then it will be inserted immediately fol-) -3.123 F(lo)152 612 Q(wing the cursor)-.25 E 5(.M)-.55 G(nemonic:)-5 E F1(p)5 E F0(ut b)A(uf)-.2 E(fer)-.25 E .402(It should be noted that te) 152 627.6 R .402(xt in the named b)-.15 F(uf)-.2 E .402 (fers remains there when you start editing a ne)-.25 F 2.903<778c>-.25 G (le)-2.903 E .04(with the)152 639.6 R F1 .04(:e \214le)2.54 F F0 2.54(command. Since)2.54 F .04(this is so, it is possible to cop)2.54 F 2.54(yo)-.1 G 2.54(rd)-2.54 G .04(elete te)-2.54 F .04 (xt from one \214le)-.15 F .403(and carry it o)152 651.6 R -.15(ve)-.15 G 2.904(rt).15 G 2.904(oa)-2.904 G .404(nother \214le in the b)-2.904 F (uf)-.2 E 2.904(fers. Ho)-.25 F(we)-.25 E -.15(ve)-.25 G 1.204 -.4(r, t) .15 H .404(he undo b).4 F(uf)-.2 E .404(fer and the ability to undo)-.25 F(are lost when changing \214les.)152 663.6 Q 37.71(["]P Put)72 679.2 R .032("undo" b)2.532 F(uf)-.2 E .032(fer or the speci\214ed b) -.25 F(uf)-.2 E .031(fer do)-.25 F(wn)-.25 E F1(bef)2.531 E(or)-.25 E(e) -.18 E F0 .031(the cursor)2.531 F 5.031(.I)-.55 G 2.531(fw)-5.031 G .031 (hole lines where yank)-2.531 F .031(ed or)-.1 F .182 (deleted into the b)152 691.2 R(uf)-.2 E(fer)-.25 E 2.682(,t)-.4 G .182 (hen the)-2.682 F 2.682(yw)-.15 G .183(ill be put do)-2.682 F .183 (wn on the line preceding the line the cursor is on.)-.25 F 1.687 (If something else w)152 703.2 R 1.687(as deleted, lik)-.1 F 4.187(eaw) -.1 G 1.686(ord or sentence, then it will be inserted immediately)-4.287 F .32 LW 144 711.2 72 711.2 DL/F2 8/Times-Roman@0 SF 2.224(*R)72 721.2 S .224(eferring to an upper case letter as a b)-2.224 F(uf)-.16 E .225 (fer name \(A-Z\) is the same as referring to the lo)-.2 F .225 (wer case letter)-.2 F 2.225(,e)-.32 G .225(xcept that te)-2.345 F .225 (xt placed in such a b)-.12 F(uf)-.16 E(fer)-.2 E (is appended to it instead of replacing it.)72 731.2 Q EP %%Page: 7 7 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-7-)300.17 48 Q(preceding the cursor)152 84 Q(.) -.55 E 15.04([cnt]>{motion} The)72 99.6 R .562 (shift operator will right shift all the te)3.062 F .563 (xt from the line on which the cursor is located to the)-.15 F 1.119 (line where the)152 111.6 R/F1 10/Times-Bold@0 SF(motion)3.619 E F0 1.119(is located.)3.619 F 1.119(The te)6.119 F 1.119 (xt is shifted by one)-.15 F F1(shiftwidth)3.619 E F0 6.118(.\()C 1.118 (See section 6.\))-6.118 F F1(>>)6.118 E F0 (means right shift the current line or lines.)152 123.6 Q 15.04 ([cnt]<{motion} The)72 139.2 R .855 (shift operator will left shift all the te)3.355 F .855 (xt from the line on which the cursor is located to the)-.15 F .058 (line where the)152 151.2 R F1(item)2.557 E F0 .057(is located.)2.557 F .057(The te)5.057 F .057(xt is shifted by one)-.15 F F1(shiftwidth)2.557 E F0 5.057(.\()C .057(See section 6.\))-5.057 F F1(<<)5.057 E F0(means) 2.557 E 1.415(left shift the current line or lines.)152 163.2 R 1.415 (Once the line has reached the left mar)6.415 F 1.415 (gin it is not further)-.18 F(af)152 175.2 Q(fected.)-.25 E 15.04 ([cnt]={motion} Prettyprints)72 190.8 R .15 (the indicated area according to)2.65 F F1(lisp)2.65 E F0(con)2.65 E -.15(ve)-.4 G 2.65(ntions. The).15 F .15(area should be a lisp s-e)2.65 F(xpres-)-.15 E(sion.)152 202.8 Q F1 2.5(4.8. Miscellaneous)72 226.8 R (Commands)2.5 E -.37(Vi)72 242.4 S F0 (has a number of miscellaneous commands that are v)2.87 E(ery useful.) -.15 E(The)5 E 2.5(ya)-.15 G(re:)-2.5 E 65.28(ZZ This)72 258 R .741 (is the normal w)3.241 F .741(ay to e)-.1 F .741(xit from vi.)-.15 F .741(If an)5.741 F 3.241(yc)-.15 G .741(hanges ha)-3.241 F 1.041 -.15 (ve b)-.2 H .741(een made, the \214le is written out.).15 F (Then you are returned to the shell.)152 270 Q 68.06(^L Redra)72 285.6 R 2.699(wt)-.15 G .199(he current screen.)-2.699 F .198 (This is useful if someone "write"s you while you are in "vi" or if for) 5.199 F(an)152 297.6 Q 2.5(yr)-.15 G(eason g)-2.5 E (arbage gets onto the screen.)-.05 E 67.5(^R On)72 313.2 R .317 (dumb terminals, those not ha)2.816 F .317 (ving the "delete line" function \(the vt100 is such a terminal\),)-.2 F F1(vi)2.817 E F0(sa)152 325.2 Q -.15(ve)-.2 G 3.308(sr).15 G(edra)-3.308 E .807(wing the screen when you delete a line by just marking the line \ with an "@" at the)-.15 F(be)152 337.2 Q .925 (ginning and blanking the line.)-.15 F .926(If you w)5.926 F .926 (ant to actually get rid of the lines mark)-.1 F .926(ed with "@")-.1 F (and see what the page looks lik)152 349.2 Q (e, typing a ^R will do this.)-.1 E/F2 14/Times-Roman@0 SF(.)72 364.8 Q F0 .41("Dot" is a particularly useful command.)76.5 F .41 (It repeats the last te)5.41 F .41(xt modifying command.)-.15 F (Therefore)5.41 E(you can type a command once and then to another place\ and repeat it by just typing ".".)152 376.8 Q 75(uP)72 392.4 S .266 (erhaps the most important command in the editor)-75 F 2.766(,uu)-.4 G .266(ndoes the last command that changed the)-2.766 F -.2(bu)152 404.4 S -.25(ff).2 G(er).25 E 5(.M)-.55 G(nemonic:)-5 E F1(u)5 E F0(ndo)A 72.78 (UU)72 420 S 1.306(ndo all the te)-72.78 F 1.305(xt modifying commands \ performed on the current line since the last time you)-.15 F(mo)152 432 Q -.15(ve)-.15 G 2.5(do).15 G(nto it.)-2.5 E 54.73([cnt]J Join)72 447.6 R .058(the current line and the follo)2.558 F .058(wing line.)-.25 F .058(The is deleted and the tw)5.058 F 2.559(ol)-.1 G .059 (ines joined, usually)-2.559 F .453 (with a space between the end of the \214rst line and the be)152 459.6 R .452(ginning of what w)-.15 F .452(as the second line.)-.1 F(If)5.452 E 1.348(the \214rst line ended with a "period", then tw)152 471.6 R 3.848 (os)-.1 G 1.348(paces are inserted.)-3.848 F 3.848(Ac)6.348 G 1.349 (ount joins the ne)-3.848 F 1.349(xt cnt)-.15 F 2.5(lines. Mnemonic:)152 483.6 R F1(J)2.5 E F0(oin lines)A 72.78(QS)72 499.2 S .88(witch to) -72.78 F F1(ex)3.38 E F0 .88(editing mode.)3.38 F .88(In this mode)5.88 F F1(vi)3.38 E F0 .88(will beha)3.38 F 1.18 -.15(ve ve)-.2 H .88 (ry much lik).15 F(e)-.1 E F1(ed)3.38 E F0 5.88(.T)C .88 (he editor in this)-5.88 F .045 (mode will operate on single lines normally and will not attempt to k) 152 511.2 R .046(eep the "windo)-.1 F .046(w" up to date.)-.25 F 1.216 (Once in this mode it is also possible to switch to the)152 523.2 R F1 (open)3.716 E F0 1.216(mode of editing.)3.716 F 1.216(By entering the) 6.216 F(command)152 535.2 Q F1 .392([line number]open)2.892 F F0 .392(you enter this mode.)2.892 F .392 (It is similar to the normal visual mode)5.392 F -.15(ex)152 547.2 S (cept the windo).15 E 2.5(wi)-.25 G 2.5(so)-2.5 G(nly)-2.5 E F1(one)2.5 E F0(line long.)2.5 E(Mnemonic:)5 E F1(Q)2.5 E F0(uit visual mode)A 70.84(^] An)72 562.8 R(abbre)4.194 E 1.694(viation for a tag command.) -.25 F 1.693(The cursor should be positioned at the be)6.693 F 1.693 (ginning of a)-.15 F -.1(wo)152 574.8 S 3.321(rd. That).1 F -.1(wo)3.321 G .821(rd is tak).1 F .822(en as a tag name, and the tag with that name\ is found as if it had been)-.1 F(typed in a :tag command.)152 586.8 Q ([cnt]!{motion}{UNIX cmd})72 602.4 Q(An)152 614.4 Q 2.806(yU)-.15 G .305(NIX \214lter \(e.g. command that reads the standard input and outp\ uts something to the stan-)-2.806 F .16 (dard output\) can be sent a section of the current \214le and ha)152 626.4 R .46 -.15(ve t)-.2 H .16(he output of the command replace).15 F 1.243(the original te)152 638.4 R 3.743(xt. Useful)-.15 F -.15(ex)3.743 G 1.243(amples are programs lik).15 F(e)-.1 E F1(cb)3.743 E F0(,)A F1 (sort)3.743 E F0 3.743(,a)C(nd)-3.743 E F1(nr)3.743 E(off)-.18 E F0 6.243(.F)C 1.242(or instance, using)-6.393 F F1(sort)152 650.4 Q F0 .258 (it w)2.758 F .258 (ould be possible to sort a section of the current \214le into a ne)-.1 F 2.758(wl)-.25 G 2.758(ist. Using)-2.758 F F1(!!)2.758 E F0 .258 (means tak)2.758 F(e)-.1 E 2.544(al)152 662.4 S .044(ine or lines start\ ing at the line the cursor is currently on and pass them to the UNIX co\ mmand.)-2.544 F F1(NO)152 674.4 Q(TE:)-.4 E F0 1.6 -.8(To j)2.5 H(ust e\ scape to the shell for one command, use :!{cmd}, see section 5.).8 E 32.18(z{cnt} This)72 690 R(resets the current windo)2.5 E 2.5(ws) -.25 G(ize to "cnt" lines and redra)-2.5 E(ws the screen.)-.15 E EP %%Page: 8 8 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-8-)300.17 48 Q/F1 10/Times-Bold@0 SF 2.5 (4.9. Special)72 84 R(Insert Characters)2.5 E F0 (There are some characters that ha)72 99.6 Q .3 -.15(ve s)-.2 H (pecial meanings during insert modes.).15 E(The)5 E 2.5(ya)-.15 G(re:) -2.5 E 66.95(^V During)72 115.2 R .934(inserts, typing a ^V allo)3.434 F .935(ws you to quote control characters into the \214le.)-.25 F(An)5.935 E 3.435(yc)-.15 G(haracter)-3.435 E (typed after the ^V will be inserted into the \214le.)152 127.2 Q ([^]^D or [0]^D)72 142.8 Q .761(<^D> without an)23.92 F 3.261(ya)-.15 G -.18(rg)-3.261 G .761(ument backs up one).18 F F1(shiftwidth)3.261 E F0 5.761(.T)C .761(his is necessary to remo)-5.761 F 1.06 -.15(ve i)-.15 H (ndentation).15 E .204(that w)152 154.8 R .204(as inserted by the)-.1 F F1(autoindent)2.704 E F0 2.704(feature. ^<^D>)2.704 F .204 (temporarily remo)2.704 F -.15(ve)-.15 G 2.704(sa).15 G .205 (ll the autoindentation,)-2.704 F 1.283 (thus placing the cursor at the left mar)152 166.8 R 3.782(gin. On)-.18 F 1.282(the ne)3.782 F 1.282(xt line, the pre)-.15 F 1.282 (vious indent le)-.25 F -.15(ve)-.25 G 3.782(lw).15 G 1.282(ill be) -3.782 F 3.494(restored. This)152 178.8 R .995 (is useful for putting "labels" at the left mar)3.494 F 3.495 (gin. 0<^D>)-.18 F .995(says remo)3.495 F 1.295 -.15(ve a)-.15 H .995 (ll autoin-).15 F .423(dents and stay that w)152 190.8 R(ay)-.1 E 5.423 (.T)-.65 G .423(hus the cursor mo)-5.423 F -.15(ve)-.15 G 2.923(st).15 G 2.923(ot)-2.923 G .423(he left mar)-2.923 F .423 (gin and stays there on successi)-.18 F -.15(ve)-.25 G 1.303 (lines until ')152 202.8 R 3.803(sa)-.55 G 1.303(re typed.)-3.803 F 1.303(As with the , the <^D> is only ef)6.303 F(fecti)-.25 E 1.603 -.15(ve b)-.25 H 1.304(efore an).15 F 3.804(yo)-.15 G(ther)-3.804 E ("non-autoindent" controlling characters are typed.)152 214.8 Q (Mnemonic:)5 E F1(D)2.5 E F0(elete a shiftwidth)A 64.73(^W If)72 230.4 R .084(the cursor is sitting on a w)2.584 F .084(ord, <^W> mo)-.1 F -.15 (ve)-.15 G 2.584(st).15 G .084(he cursor back to the be)-2.584 F .083 (ginning of the w)-.15 F .083(ord, thus)-.1 F(erasing the w)152 242.4 Q (ord from the insert.)-.1 E(Mnemonic: erase)5 E F1(W)2.5 E F0(ord)A 57.33( The)72 258 R .333(backspace al)2.833 F -.1(wa)-.1 G .333 (ys serv).1 F .333 (es as an erase during insert modes in addition to your normal "erase") -.15 F(character)152 270 Q 5(.T)-.55 G 2.5(oi)-5.8 G (nsert a into your \214le, use the <^V> to quote it.)-2.5 E F1 2.5 (5. :)72 294 R F0(Commands)2.5 E -.8(Ty)72 309.6 S .209 (ping a ":" during command mode causes).8 F F1(vi)2.709 E F0 .209(to pu\ t the cursor at the bottom on the screen in preparation for a com-)2.709 F 2.598(mand. In)72 321.6 R .098(the ":" mode,)2.598 F F1(vi)2.598 E F0 .098(can be gi)2.598 F -.15(ve)-.25 G 2.598(nm).15 G(ost)-2.598 E F1(ed) 2.598 E F0 2.598(commands. It)2.598 F .099 (is also from this mode that you e)2.598 F .099(xit from)-.15 F F1(vi) 2.599 E F0 .099(or switch)2.599 F(to dif)72 333.6 Q(ferent \214les.)-.25 E(All commands of this v)5 E (ariety are terminated by a , , or .)-.25 E(:w[!] [\214le]) 72 349.2 Q(Causes)38.07 E F1(vi)2.992 E F0 .492 (to write out the current te)2.992 F .492(xt to the disk.)-.15 F .492 (It is written to the \214le you are editing unless)5.492 F .079 ("\214le" is supplied.)152 361.2 R .079 (If "\214le" is supplied, the write is directed to that \214le instead.) 5.079 F .08(If that \214le already)5.08 F -.15(ex)152 373.2 S(ists,).15 E F1(vi)4.214 E F0 1.714 (will not perform the write unless the "!" is supplied indicating you) 4.214 F/F2 10/Times-Italic@0 SF -.37(re)4.213 G(ally).37 E F0 -.1(wa) 4.213 G 1.713(nt to).1 F(destro)152 385.2 Q 2.5(yt)-.1 G(he older cop) -2.5 E 2.5(yo)-.1 G 2.5(ft)-2.5 G(he \214le.)-2.5 E 59.73(:q[!] Causes) 72 400.8 R F1(vi)2.952 E F0 .452(to e)2.952 F 2.952(xit. If)-.15 F .452 (you ha)2.952 F .752 -.15(ve m)-.2 H .453 (odi\214ed the \214le you are looking at currently and ha).15 F -.15(ve) -.2 G(n').15 E 2.953(tw)-.18 G(ritten)-2.953 E(it out,)152 412.8 Q F1 (vi)2.5 E F0(will refuse to e)2.5 E(xit unless the "!" is supplied.)-.15 E(:e[!] [+[cmd]] [\214le])72 428.4 Q 1.073(Start editing a ne)152 452.4 R 3.573<778c>-.25 G 1.072 (le called "\214le" or start editing the current \214le o)-3.573 F -.15 (ve)-.15 G 3.572(ra).15 G -.05(ga)-3.572 G 3.572(in. The).05 F(command) 3.572 E .096(":e!" says "ignore the changes I')152 464.4 R .396 -.15 (ve m)-.5 H .096(ade to this \214le and start o).15 F -.15(ve)-.15 G 2.596(rf).15 G .096(rom the be)-2.596 F 2.596(ginning". It)-.15 F .097 (is use-)2.597 F .166(ful if you really mess up the \214le.)152 476.4 R .166(The optional "+" says instead of starting at the be)5.166 F .166 (ginning, start)-.15 F .346(at the "end", or)152 488.4 R 2.846(,i)-.4 G 2.846(f")-2.846 G .346(cmd" is supplied, e)-2.846 F -.15(xe)-.15 G .346 (cute "cmd" \214rst.).15 F .346(Useful cases of this are where cmd is) 5.346 F .575("n" \(an)152 500.4 R 3.075(yi)-.15 G(nte)-3.075 E .575 (ger\) which starts at line number n, and "/te)-.15 F .574 (xt", which searches for "te)-.15 F .574(xt" and starts)-.15 F (at the line where it is found.)152 512.4 Q 70.84(^^ Switch)72 528 R 1.303(back to the place you were before your last tag command.)3.803 F 1.303(If your last tag command)6.303 F .311 (stayed within the \214le, ^^ returns to that tag.)152 540 R .311 (If you ha)5.311 F .61 -.15(ve n)-.2 H 2.81(or).15 G .31 (ecent tag command, it will return to)-2.81 F(the same place in the pre) 152 552 Q(vious \214le that it w)-.25 E(as sho)-.1 E (wing when you switched to the current \214le.)-.25 E 59.73(:n[!] Start) 72 567.6 R .752(editing the ne)3.252 F .752(xt \214le in the ar)-.15 F .752(gument list.)-.18 F(Since)5.752 E F1(vi)3.252 E F0 .753 (can be called with multiple \214le names,)3.252 F .489 (the ":n" command tells it to stop w)152 579.6 R .488 (ork on the current \214le and switch to the ne)-.1 F .488(xt \214le.) -.15 F .488(If the cur)5.488 F(-)-.2 E .693(rent \214le w)152 591.6 R .693(as modi\214es, it has to be written out before the ":n" will w)-.1 F .693(ork or else the "!" must be)-.1 F (supplied, which says discard the changes I made to the current \214le.) 152 603.6 Q(:n[!] \214le [\214le \214le ...])72 619.2 Q .181 (Replace the current ar)152 643.2 R .181(gument list with a ne)-.18 F 2.681(wl)-.25 G .18 (ist of \214les and start editing the \214rst \214le in this ne)-2.681 F (w)-.25 E(list.)152 655.2 Q(:r \214le)72 670.8 Q(Read in a cop)58.61 E 2.5(yo)-.1 G 2.5(f")-2.5 G(\214le" on the line after the cursor)-2.5 E (.)-.55 E(:r !cmd)72 686.4 Q(Ex)50.84 E(ecute the "cmd" and tak)-.15 E 2.5(ei)-.1 G (ts output and put it into the \214le after the current line.)-2.5 E 54.17(:!cmd Ex)72 702 R(ecute an)-.15 E 2.5(yU)-.15 G (NIX shell command.)-2.5 E(:ta[!] tag)72 717.6 Q F1 -.37(Vi)45.29 G F0 (looks in the \214le named)2.87 E F1(tags)2.5 E F0 (in the current directory)2.5 E(.)-.65 E F1 -.92(Ta)5 G(gs).92 E F0 (is a \214le of lines in the format:)2.5 E EP %%Page: 9 9 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-9-)300.17 48 Q(tag \214lename)232 84 Q/F1 10 /Times-Bold@0 SF(vi)2.5 E F0(-search-command)A(If)152 108 Q F1(vi)2.962 E F0 .462(\214nds the tag you speci\214ed in the)2.962 F F1(:ta)2.962 E F0 .462(command, it stops editing the current \214le if necessary)2.962 F 1.152(and if the current \214le is up to date on the disk and switche\ s to the \214le speci\214ed and uses the)152 120 R 1.183 (search pattern speci\214ed to \214nd the "tagged" item of interest.)152 132 R 1.183(This is particularly useful when)6.183 F 1.448 (editing multi-\214le C programs such as the operating system.)152 144 R 1.448(There is a program called)6.448 F F1(ctags)3.947 E F0 .523 (which will generate an appropriate)152 156 R F1(tags)3.023 E F0 .524 (\214le for C and f77 programs so that by saying)3.023 F F1 .524 (:ta func-)3.024 F(tion)152 168 Q F0 .83 (you will be switched to that function.)3.33 F .829 (It could also be useful when editing multi-\214le)5.829 F (documents, though the)152 180 Q F1(tags)2.5 E F0(\214le w)2.5 E (ould ha)-.1 E .3 -.15(ve t)-.2 H 2.5(ob).15 G 2.5(eg)-2.5 G (enerated manually)-2.5 E(.)-.65 E F1 2.5(6. Special)72 204 R (Arrangements f)2.5 E(or Startup)-.25 E -.37(Vi)97 219.6 S F0(tak)3.055 E .185(es the v)-.1 F .185(alue of)-.25 F F1($TERM)2.685 E F0 .185 (and looks up the characteristics of that terminal in the \214le)2.685 F F1(/etc/termcap)2.686 E F0 5.186(.I)C 2.686(fy)-5.186 G(ou)-2.686 E (don')72 231.6 Q 2.5(tk)-.18 G(no)-2.5 E(w)-.25 E F1(vi)2.5 E F0 1.1 -.55('s n)D(ame for the terminal you are w).55 E(orking on, look in)-.1 E F1(/etc/termcap)2.5 E F0(.)A(When)97 247.2 Q F1(vi)2.503 E F0 .003 (starts, it attempts to read the v)2.503 F .003 (ariable EXINIT from your en)-.25 F 2.502(vironment.* If)-.4 F .002 (that e)2.502 F .002(xists, it tak)-.15 F .002(es the v)-.1 F(al-)-.25 E .277(ues in it as the def)72 259.2 R .277(ault v)-.1 F .277 (alues for certain of its internal constants.)-.25 F .277 (See the section on "Set V)5.277 F .278(alues" for further details.) -1.11 F(If EXINIT doesn')72 271.2 Q 2.5(te)-.18 G (xist you will get all the normal def)-2.65 E(aults.)-.1 E .109 (Should you inadv)97 286.8 R .109 (ertently hang up the phone while inside)-.15 F F1(vi)2.609 E F0 2.609 (,o)C 2.609(rs)-2.609 G .109 (hould the computer crash, all may not be lost.)-2.609 F (Upon returning to the system, type:)72 298.8 Q(vi \255r \214le)108 316.8 Q .466(This will normally reco)72 334.8 R -.15(ve)-.15 G 2.966(rt) .15 G .466(he \214le.)-2.966 F .467(If there is more than one temporary\ \214le for a speci\214c \214le name,)5.466 F F1(vi)2.967 E F0(reco) 2.967 E -.15(ve)-.15 G .467(rs the).15 F(ne)72 346.8 Q .122(west one.) -.25 F -1.1(Yo)5.122 G 2.622(uc)1.1 G .122(an get an older v)-2.622 F .122(ersion by reco)-.15 F -.15(ve)-.15 G .122 (ring the \214le more than once.).15 F .122 (The command "vi -r" without a \214le)5.122 F .66(name gi)72 358.8 R -.15(ve)-.25 G 3.16(sy).15 G .66(ou the list of \214les that were sa) -3.16 F -.15(ve)-.2 G 3.16(di).15 G 3.16(nt)-3.16 G .66 (he last system crash \(b)-3.16 F(ut)-.2 E/F2 10/Times-Italic@0 SF(not) 3.16 E F0 .66(the \214le just sa)3.16 F -.15(ve)-.2 G 3.16(dw).15 G .66 (hen the phone)-3.16 F -.1(wa)72 370.8 S 2.5(sh).1 G(ung up\).)-2.5 E F1 2.5(7. Set)72 394.8 R(Commands)2.5 E -.37(Vi)72 410.4 S F0 .421 (has a number of internal v)3.291 F .421 (ariables and switches which can be set to achie)-.25 F .72 -.15(ve s) -.25 H .42(pecial af).15 F 2.92(fects. These)-.25 F .42(options come) 2.92 F .131 (in three forms, those that are switches, which toggle from of)72 422.4 R 2.631(ft)-.25 G 2.631(oo)-2.631 G 2.632(na)-2.631 G .132 (nd back, those that require a numeric v)-2.632 F .132(alue, and)-.25 F (those that require an alphanumeric string v)72 434.4 Q 2.5(alue. The) -.25 F(toggle options are set by a command of the form:)2.5 E (:set option)108 452.4 Q(and turned of)72 470.4 Q 2.5(fw)-.25 G (ith the command:)-2.5 E(:set nooption)108 488.4 Q (Commands requiring a v)72 506.4 Q (alue are set with a command of the form:)-.25 E(:set option=v)108 524.4 Q(alue)-.25 E 1.6 -.8(To d)72 542.4 T(isplay the v).8 E (alue of a speci\214c option type:)-.25 E(:set option?)108 560.4 Q 1.6 -.8(To d)72 578.4 T(isplay only those that you ha).8 E .3 -.15(ve c) -.2 H(hanged type:).15 E(:set)108 596.4 Q(and to display the long t\ able of all the settable parameters and their current v)72 614.4 Q (alues type:)-.25 E(:set all)108 632.4 Q .173 (Most of the options ha)97 654 R .473 -.15(ve a l)-.2 H .173 (ong form and an abbre).15 F 2.672(viation. Both)-.25 F .172 (are listed in the follo)2.672 F .172(wing table as well as the)-.25 F (normal def)72 666 Q(ault v)-.1 E(alue.)-.25 E 2.214 -.8(To a)97 681.6 T .614(rrange to ha).8 F .914 -.15(ve v)-.2 H .615 (alues other than the def)-.1 F .615(ault used e)-.1 F -.15(ve)-.25 G .615(ry time you enter).15 F F1(vi)3.115 E F0 3.115(,p)C .615 (lace the appropriate)-3.115 F F1(set)3.115 E F0(com-)3.115 E (mand in EXINIT in your en)72 693.6 Q(vironment, e.g.)-.4 E .32 LW 144 710 72 710 DL/F3 8/Times-Roman@0 SF 2(*O)72 720 S 2(nv)-2 G (ersion 6 systems Instead of EXINIT)-2.12 E 2(,p)-.592 G (ut the startup commands in the \214le .e)-2 E (xrc in your home directory)-.12 E(.)-.52 E EP %%Page: 10 10 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-10-)297.67 48 Q(EXINIT=')108 84 Q(set ai a)-.55 E 2.5(wt)-.15 G(erse sh=/bin/csh')-2.5 E -.15(ex)108 96 S(port EXINIT) .15 E(or)72 114 Q(seten)108 132 Q 2.5(vE)-.4 G(XINIT ')-2.5 E(set ai a) -.55 E 2.5(wt)-.15 G(erse sh=/bin/csh')-2.5 E(for)72 150 Q/F1 10 /Times-Bold@0 SF(sh)2.692 E F0(and)2.692 E F1(csh)2.692 E F0 2.692(,r)C (especti)-2.692 E -.15(ve)-.25 G(ly).15 E 5.192(.T)-.65 G .192 (hese are usually placed in your .pro\214le or .login.)-5.192 F .192 (If you are running a system without)5.192 F(en)72 162 Q (vironments \(such as v)-.4 E (ersion 6\) you can place the set command in the \214le .e)-.15 E (xrc in your home directory)-.15 E(.)-.65 E(autoindent ai)72 177.6 Q (Def)28.06 E(ault: noai T)-.1 E(ype: toggle)-.8 E .408(When in autoinde\ nt mode, vi helps you indent code by starting each line in the same col\ umn as)152 189.6 R .06(the preceding line.)152 201.6 R -.8(Ta)5.06 G .059(bbing to the right with or <^T> will mo).8 F .359 -.15(ve t) -.15 H .059(his boundary to the right,).15 F(and it can be mo)152 213.6 Q -.15(ve)-.15 G 2.5(dt).15 G 2.5(ot)-2.5 G(he left with <^D>.)-2.5 E (autoprint ap)72 229.2 Q(Def)31.95 E(ault: ap T)-.1 E(ype: toggle)-.8 E .083(Causes the current line to be printed after each e)152 241.2 R 2.583(xt)-.15 G -.15(ex)-2.583 G 2.583(tm).15 G .083(odifying command.) -2.583 F .083(This is not of much)5.083 F(interest in the normal)152 253.2 Q F1(vi)2.5 E F0(visual mode.)2.5 E(auto)72 268.8 Q(write a)-.25 E 28.47(wD)-.15 G(ef)-28.47 E(ault: noa)-.1 E 2.5(wt)-.15 G(ype: toggle) -2.5 E(Auto)152 280.8 Q .118 (write causes an automatic write to be done if there are unsa)-.25 F -.15(ve)-.2 G 2.618(dc).15 G .118(hanges before certain com-)-2.618 F .365 (mands which change \214les or otherwise interact with the outside w)152 292.8 R 2.865(orld. These)-.1 F .365(commands are :!,)2.865 F(:tag, :ne) 152 304.8 Q(xt, :re)-.15 E(wind, ^^, and ^].)-.25 E(beautify bf)72 320.4 Q(Def)36.4 E(ault: nobf T)-.1 E(ype: toggle)-.8 E (Causes all control characters e)152 332.4 Q(xcept , , and to be discarded.)-.25 E(directory dir)72 348 Q(Def)30.29 E (ault: dir=/tmp T)-.1 E(ype: string)-.8 E (This is the directory in which)152 360 Q F1(vi)2.5 E F0 (puts its temporary \214le.)2.5 E(errorbells eb)72 375.6 Q(Def)29.74 E (ault: noeb T)-.1 E(ype: toggle)-.8 E (Error messages are preceded by a .)152 387.6 Q(hardtabs ht)72 403.2 Q(Def)35.84 E(ault: hardtabs=8 T)-.1 E(ype: numeric)-.8 E .764 (This option contains the v)152 415.2 R .764(alue of hardw)-.25 F .763 (are tabs in your terminal, or of softw)-.1 F .763(are tabs e)-.1 F (xpanded)-.15 E(by the Unix system.)152 427.2 Q(ignorecase ic)72 442.8 Q (Def)27.52 E(ault: noic T)-.1 E(ype: toggle)-.8 E (All upper case characters are mapped to lo)152 454.8 Q(wer case in re) -.25 E(gular e)-.15 E(xpression matching.)-.15 E 63.05(lisp Def)72 470.4 R(ault: nolisp T)-.1 E(ype: toggle)-.8 E 1.284(Autoindent for)152 482.4 R F1(lisp)3.784 E F0 3.784(code. The)3.784 F(commands)3.784 E F1 3.784 (\(\)[)3.784 G([)-3.784 E F0(and)3.784 E F1(]])3.784 E F0 1.285 (are modi\214ed appropriately to af)3.785 F 1.285(fect s-)-.25 F -.15 (ex)152 494.4 S(pressions and functions.).15 E 65.27(list Def)72 510 R (ault: nolist T)-.1 E(ype: toggle)-.8 E(All printed lines ha)152 522 Q .3 -.15(ve t)-.2 H(he and characters displayed visually).15 E (.)-.65 E 53.06(magic Def)72 537.6 R(ault: magic T)-.1 E(ype: toggle)-.8 E 3.72(Enable the metacharacters for matching.)152 549.6 R 3.719 (These include)8.719 F F1 6.219(.*<>[)6.219 G 3.719(string] [^string]) -6.219 F F0(and)6.219 E F1([-])152 561.6 Q F0(.)A(number nu)72 577.2 Q(Def)36.95 E(ault: nonu T)-.1 E(ype: toggle)-.8 E (Each line is displayed with its line number)152 589.2 Q(.)-.55 E 58.06 (open Def)72 604.8 R(ault: open T)-.1 E(ype: toggle)-.8 E(When set, pre) 152 616.8 Q -.15(ve)-.25 G(nts entering open or visual modes from e).15 E 2.5(xo)-.15 G 2.5(re)-2.5 G 2.5(dit. Not)-2.5 F(of interest from vi.) 2.5 E(optimize opt)72 632.4 Q(Def)29.72 E(ault: opt T)-.1 E(ype: toggle) -.8 E .154(Basically of use only when using the)152 644.4 R F1(ex)2.654 E F0 2.654(capabilities. This)2.654 F .155(option pre)2.654 F -.15(ve) -.25 G .155(nts automatic s from).15 F .166 (taking place, and speeds up output of indented lines, at the e)152 656.4 R .165(xpense of losing typeahead on some)-.15 F -.15(ve)152 668.4 S(rsions of UNIX.).15 E(paragraphs para)72 684 Q(Def)16.42 E (ault: para=IPLPPPQPP bp T)-.1 E(ype: string)-.8 E .545 (Each pair of characters in the string indicate)152 696 R F1(nr)3.045 E (off)-.18 E F0 .546(macros which are to be treated as the be)3.045 F (gin-)-.15 E 1.745(ning of a paragraph for the)152 708 R F1({)4.245 E F0 (and)4.245 E F1(})4.245 E F0 4.245(commands. The)4.245 F(def)4.245 E 1.745(ault string is for the)-.1 F F1(-ms)4.245 E F0(and)4.245 E F1(-mm) 4.245 E F0 3.312(macros. T)152 720 R 3.312(oi)-.8 G .812 (ndicate one letter)-3.312 F F1(nr)3.312 E(off)-.18 E F0 .812 (macros, such as)3.312 F F1(.P)3.312 E F0(or)3.312 E F1(.H)3.312 E F0 3.312(,q)C .813(uote a space in for the second)-3.312 F EP %%Page: 11 11 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-11-)297.67 48 Q(character position.)152 84 Q -.15(Fo)5 G 2.5(re).15 G(xample:)-2.65 E(:set paragraphs=P\\ bp)232 108 Q -.1(wo)152 132 S(uld cause).1 E/F1 10/Times-Bold@0 SF(vi)2.5 E F0 (to consider)2.5 E F1(.P)2.5 E F0(and)2.5 E F1(.bp)2.5 E F0 (as paragraph delimiters.)2.5 E 48.61(prompt Def)72 147.6 R (ault: prompt T)-.1 E(ype: toggle)-.8 E(In)152 159.6 Q F1(ex)2.85 E F0 .35(command mode the prompt character)2.85 F F1(:)2.85 E F0 .35 (will be printed when)2.85 F F1(ex)2.85 E F0 .35(is w)2.85 F .35 (aiting for a command.)-.1 F(This is not of interest from vi.)152 171.6 Q(redra)72 187.2 Q 52.39(wD)-.15 G(ef)-52.39 E(ault: noredra)-.1 E 2.5 (wT)-.15 G(ype: toggle)-3.3 E .666 (On dumb terminals, force the screen to al)152 199.2 R -.1(wa)-.1 G .666 (ys be up to date, by sending great amounts of out-).1 F 2.5 (put. Useful)152 211.2 R(only at high speeds.)2.5 E 53.62(report Def)72 226.8 R(ault: report=5 T)-.1 E(ype: numeric)-.8 E .606 (This sets the threshold for the number of lines modi\214ed.)152 238.8 R .606(When more than this number of lines)5.606 F .893 (are modi\214ed, remo)152 250.8 R -.15(ve)-.15 G .893(d, or yank).15 F (ed,)-.1 E F1(vi)3.393 E F0 .893 (will report the number of lines changed at the bottom of)3.393 F (the screen.)152 262.8 Q 55.28(scroll Def)72 278.4 R (ault: scroll={1/2 windo)-.1 E(w} T)-.25 E(ype: numeric)-.8 E .875 (This is the number of lines that the screen scrolls up or do)152 290.4 R .874(wn when using the <^U> and <^D>)-.25 F(commands.)152 302.4 Q 45.28(sections Def)72 318 R(ault: sections=SHNHH HU T)-.1 E(ype: string) -.8 E .607(Each tw)152 330 R 3.107(oc)-.1 G .607 (haracter pair of this string specify)-3.107 F F1(nr)3.108 E(off)-.18 E F0 .608(macro names which are to be treated as the)3.108 F(be)152 342 Q .956(ginning of a section by the)-.15 F F1(]])3.456 E F0(and)3.456 E F1 ([[)3.456 E F0 3.456(commands. The)3.456 F(def)3.456 E .956 (ault string is for the)-.1 F F1(-ms)3.456 E F0(and)3.456 E F1(-mm)3.456 E F0 2.599(macros. T)152 354 R 2.599(oe)-.8 G .099(nter one letter) -2.599 F F1(nr)2.599 E(off)-.18 E F0 .099 (macros, use a quoted space as the second character)2.599 F 5.1(.S)-.55 G(ee)-5.1 E F1(para-)2.6 E(graphs)152 366 Q F0(for a fuller e)2.5 E (xplanation.)-.15 E(shell sh)72 381.6 Q(Def)49.72 E(ault: sh=from en)-.1 E(vironment SHELL or /bin/sh)-.4 E -.8(Ty)7.5 G(pe: string).8 E (This is the name of the)152 393.6 Q F1(sh)2.5 E F0 (to be used for "escaped" commands.)2.5 E(shiftwidth sw)72 409.2 Q(Def) 25.83 E(ault: sw=8 T)-.1 E(ype: numeric)-.8 E .416 (This is the number of spaces that a <^T> or <^D> will mo)152 421.2 R .715 -.15(ve ove)-.15 H 2.915(rf).15 G .415 (or indenting, and the amount)-2.915 F 2.5( shift by) -2.5 E(.)-.65 E(sho)72 448.8 Q(wmatch sm)-.25 E(Def)20.53 E (ault: nosm T)-.1 E(ype: toggle)-.8 E .15(When a)152 460.8 R F1(\))2.65 E F0(or)2.65 E F1(})2.65 E F0 .151(is typed, sho)2.651 F 2.651(wt)-.25 G .151(he matching)-2.651 F F1(\()2.651 E F0(or)2.651 E F1({)2.651 E F0 .151(by mo)2.651 F .151(ving the cursor to it for one second if it is) -.15 F(on the current screen.)152 472.8 Q(slo)72 488.4 Q -.1(wo)-.25 G (pen slo).1 E 20.88(wD)-.25 G(ef)-20.88 E(ault: terminal dependent T)-.1 E(ype: toggle)-.8 E 1.673(On terminals that are slo)152 500.4 R 4.172 (wa)-.25 G 1.672(nd unintelligent, this option pre)-4.172 F -.15(ve)-.25 G 1.672(nts the updating of the screen).15 F(some of the time to impro) 152 512.4 Q .3 -.15(ve s)-.15 H(peed.).15 E(tabstop ts)72 528 Q(Def) 41.94 E(ault: ts=8 T)-.1 E(ype: numeric)-.8 E(s are e)152 540 Q (xpanded to boundaries that are multiples of this v)-.15 E(alue.)-.25 E (taglength tl)72 555.6 Q(Def)34.72 E(ault: tl=0 T)-.1 E(ype: numeric)-.8 E(If nonzero, tag names are only signi\214cant to this man)152 567.6 Q 2.5(yc)-.15 G(haracters.)-2.5 E 59.17(term Def)72 583.2 R (ault: \(from en)-.1 E(vironment)-.4 E F1(TERM)2.5 E F0 2.5(,e)C (lse dumb\) T)-2.5 E(ype: string)-.8 E 1.528 (This is the terminal and controls the visual displays.)152 595.2 R 1.529(It cannot be changed when in "visual")6.529 F .104(mode, you ha) 152 607.2 R .404 -.15(ve t)-.2 H 2.604(oQt).15 G 2.604(oc)-2.604 G .104 (ommand mode, type a set term command, and do `)-2.604 F(`vi.)-.74 E 1.583 -.74('' t)-.7 H 2.603(og).74 G .103(et back into)-2.603 F 2.98 (visual. Or)152 619.2 R -.15(ex)2.98 G .48 (it vi, \214x $TERM, and reenter).15 F 5.48(.T)-.55 G .48 (he de\214nitions that dri)-5.48 F .78 -.15(ve a p)-.25 H .48 (articular terminal type).15 F(are found in the \214le)152 631.2 Q F1 (/etc/termcap)2.5 E F0(.)A 58.62(terse Def)72 646.8 R(ault: terse T)-.1 E(ype: toggle)-.8 E(When set, the error diagnostics are short.)152 658.8 Q -.1(wa)72 674.4 S 57.61(rn Def).1 F(ault: w)-.1 E(arn T)-.1 E (ype: toggle)-.8 E(The user is w)152 686.4 Q(arned if she/he tries to e\ scape to the shell without writing out the current changes.)-.1 E(windo) 72 702 Q 48.03(wD)-.25 G(ef)-48.03 E .664(ault: windo)-.1 F .664(w={8 a\ t 600 baud or less, 16 at 1200 baud, and screen size \255 1 at 2400 bau\ d or)-.25 F(more} T)152 714 Q(ype: numeric)-.8 E .184 (This is the number of lines in the windo)152 726 R 2.684(ww)-.25 G (hene)-2.684 E -.15(ve)-.25 G(r).15 E F1(vi)2.684 E F0 .184(must redra) 2.684 F 2.684(wa)-.15 G 2.684(ne)-2.684 G .184(ntire screen.)-2.684 F .184(It is useful)5.184 F EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-12-)297.67 48 Q(to mak)152 84 Q 2.5(et)-.1 G (his size smaller if you are on a slo)-2.5 E 2.5(wl)-.25 G(ine.)-2.5 E (w300, w1200, w9600)72 99.6 Q 2.193(These set windo)152 111.6 R 3.493 -.65(w, b)-.25 H 2.193(ut only within the corresponding speed ranges.) .45 F(The)7.193 E 4.693(ya)-.15 G 2.192(re useful in an)-4.693 F (EXINIT to \214ne tune windo)152 123.6 Q 2.5(ws)-.25 G 2.5(izes. F)-2.5 F(or e)-.15 E(xample,)-.15 E(set w300=4 w1200=12)188 141.6 Q 1.177 (causes a 4 lines windo)152 159.6 R 3.677(wa)-.25 G 3.677(ts)-3.677 G 1.177(peed up to 600 baud, a 12 line windo)-3.677 F 3.678(wa)-.25 G 3.678(t1)-3.678 G 1.178(200 baud, and a full)-3.678 F(screen \(the def) 152 171.6 Q(ault\) at o)-.1 E -.15(ve)-.15 G 2.5(r1).15 G(200 baud.)-2.5 E(wrapscan ws)72 187.2 Q(Def)28.63 E(ault: ws T)-.1 E(ype: toggle)-.8 E .905 (Searches will wrap around the end of the \214le when is option is set.) 152 199.2 R .905(When it is of)5.905 F .905(f, the search)-.25 F (will terminate when it reaches the end or the be)152 211.2 Q (ginning of the \214le.)-.15 E(wrapmar)72 226.8 Q(gin wm)-.18 E(Def) 14.36 E(ault: wm=0 T)-.1 E(ype: numeric)-.8 E/F1 10/Times-Bold@0 SF -.37 (Vi)152 238.8 S F0 .678(will automatically insert a when it \214nd\ s a natural break point \(usually a between)3.548 F -.1(wo)152 250.8 S .574(rds\) that occurs within "wm" spaces of the right mar).1 F 3.074(gin. Therefore)-.18 F .574(with "wm=0" the option)3.074 F .268 (is of)152 262.8 R 2.768(f. Setting)-.25 F .268(it to 10 w)2.768 F .268 (ould mean that an)-.1 F 2.768(yt)-.15 G .269 (ime you are within 10 spaces of the right mar)-2.768 F(gin)-.18 E F1 (vi)2.769 E F0 -.1(wo)152 274.8 S .177 (uld be looking for a or which it could replace with a .) .1 F .177(This is con)5.177 F -.15(ve)-.4 G .177(nient for).15 F 1.494 (people who for)152 286.8 R 1.495(get to look at the screen while the) -.18 F 3.995(yt)-.15 G 3.995(ype. \(In)-3.995 F -.15(ve)3.995 G 1.495 (rsion 3, wrapmar).15 F 1.495(gin beha)-.18 F -.15(ve)-.2 G(s).15 E .529 (more lik)152 298.8 R 3.029(en)-.1 G(rof)-3.029 E .528(f, in that the b\ oundary speci\214ed by the distance from the right edge of the screen) -.25 F .098(is tak)152 310.8 R .098 (en as the rightmost edge of the area where a break is allo)-.1 F .099 (wed, instead of the leftmost edge.\))-.25 F(writean)72 326.4 Q 2.5(yw) -.15 G 31.1(aD)-2.6 G(ef)-31.1 E(ault: no)-.1 E .2 -.1(wa T)-.25 H (ype: toggle)-.7 E F1 -.37(Vi)152 338.4 S F0 .804(normally mak)3.674 F .804(es a number of checks before it writes out a \214le.)-.1 F .803 (This pre)5.803 F -.15(ve)-.25 G .803(nts the user from).15 F(inadv)152 350.4 Q .127(ertently destro)-.15 F .127(ying a \214le.)-.1 F .127 (When the "writean)5.127 F .127(y" option is enabled,)-.15 F F1(vi)2.627 E F0 .127(no longer mak)2.627 F .128(es these)-.1 F(checks.)152 362.4 Q EP %%Trailer end %%EOF nvi-1.81.6/docs/vitut/grohtml-8264-1.png0100644000076400001440000000132610720065731016500 0ustar skimousers‰PNG  IHDRáv«É,tRNS”ý®bKGDÝŠ¤IDATxœcxðœÒ §°ÈîƒËÞüóòŸ<šì6¸ìËäÿu:çÃd&w\Jg›ïáò,ûcGysï’x˜ìÂòýmüj—¦ƒe¿Z>þ_·2 nêºôÔóÛÊC¶îË~©ñüg»$Ã&kØñŽŸ…ï’I?X‹“á`àdÑÃùß}P8üÿ ‘Eç¿ïÿûÿÿ=T/0œQeoßÉþþ× çK‚–Ù“›Yî¥ø;É݆†óÉ-K²l·oûý;ð>zþmh8_ÕÍGȖݾöïnþì¸ÛÐpÞÒ«üºî Î&§˜êäšqù÷>‘¡A;Y`8ÿãGú÷ÿ¬‡È‚¹UöBθeAé™ÿ’ 1Lr2ÇcË{Ò!² ôì~rK7Lvá±ïaë×;CdAé9ýªnýÄ% N硲÷ýÑd©íþç¿àˆÊÊ£JNšü‘Kâx“áD°ÉûQe9o>ukzmÑRflz o]sëxnÖÆRì=4{›: x›Ü;&6`÷oýÿÿ»ÿÿ‡ÝG ÐþÿÿCܲP@SÙßhB÷ÿÝÿDŸ±ËþþJÓ`a`Xu£ÉÞë}þ@ÙlTÉI“L˜1±¿£Íp"Ðd4YÎÛß.ýÙvU¿êÙRfL½…·¿]¹µíjÖµ¥˜öcAÀ€¥¿‰ebÐä÷辬å xÊžÇ  àÅÃ`-ùi'ûý/ù²N=õ¸eÓfnÆ#û|&#“Ó$íðèM™¹lGYœ–ŽÊŽÊŽÊŽÊŽÊ‚d?pŸ(ÙäëIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-2.png0100644000076400001440000000140710720065731016501 0ustar skimousers‰PNG  IHDRvp£tRNS”ý®bKGDÝŠ¤²IDATxœíÓ_Hqð¥G5¸ÈŒd£ð„F =TF=8A ¾ö?"ܨØÁB*rüè%]1S¾&k„0a W06$eE´Å,OÐ2P dA16,’¡ß¼p•ßoÅË^ äJ ';hZïI÷/£¢Íúš†·….³èeý˜~õ:ôÕ—C˜~Â]|”(춉À;ïèY#^ Î,æE(-ÝnLïOÃ@wÔ·kìü3­bRÒ>Hã`ãR­€Ê‘¸‚ à»®v´)V°™>v+ƒKÊ€×6 íe”*iÿߘ( upB¾˜óÛñ‡Í’}DnÏEPøÃ“Ý›©e×8/üö"¨›bà ) ð\ôj##õ÷ ;§¢‘a®ÕsèÈ!ÚÔéÄsá¼÷žøL@÷õsÇ’ÜæYnôxoPÂ\¯ž¾' Ç68>ÓÊ5Îr+èi×v¼ÏETwÿýV Ÿb“aOméÂÌÎìA—ån-Õ*Ì’<8¦¿Ôò2‡´¸Q¼´‚´“ʧ7ôÁOe0ß•Á Ó'¤jRãað)‚²o^ æÕ@¥ø_Àœ‘$i9 ‘dM8VM퓺/ðÍ‘Ñ[ܬ\…Û™ðÅäÀy¸-9ð0ÁùK̽ej:©¡Úän²òvTATAüCàm©çcô/áKIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-3.png0100644000076400001440000000301510720065731016477 0ustar skimousers‰PNG  IHDRí¾ñ,µ{tRNS”ý®bKGDÝŠ¤¸IDATxœí—olEÀ/å¢ôƒi‹$Ÿ Z#Ä–øÐ‡ø´*è‡ TSš4-ÒP„¤T¿°T›´J± \Q¸/ëÑðç¨ ‰ÛFrµS"B#…l?¹ Àõ¸ØÛëÞîøÞÛ½Û½m9Œ‰é$·óv~óæÍ¼yónÖÅÒE4%‰ùá©1Ù•™À2:dâX1j#–‚ˆ/îøǹeZþ“HT01™·ñÀ-Ðäý(c=&|qpCµ7 §Îo@| ÛçcǼª­®.´(ÀÔ$>_½V3—øšuY² û QXV±ºåŸã( ž²6ki,Iü]JsÉŠÇÍ6ù5ìMâ/€;ÛÇÐALË#3jœz±Å«€7­Ð1Û,™xÙE7|+ '— Þìž=`Øö¬¡5ÔB—ºÕ(þaY·@O»ÏmØîsÓË*¹ú\“Ì—l °b6¦¥DbÇIš#/ö¡ËÙmøÍ!I{ÐNxð#¤µ«£'uí(àÔq¨½+¥`O>·ýàSÂû,ë6V#ZÖ…½Sàa–UrõùªcøÐÒíÃÿ@õŸ6åø Õ7M,¯1ñ^/8ÕnÑRJêAd÷(þ*‚vǵÃvLÞn@1ÚgZ8nª" £¥.7¢x´Ý†míÃBmbn!÷ß-v^·Ê§ïŒãzåÏÙ©¹á¤šÊnN¨«ª–™‰oO÷†Àq;à=+™¾¡åž£Ïê>Mþ¼às‰±^ÀKšOxcbÑVÀÄò…C›$Œ Ðnþ–éÑÒ4RÙ ø+À‡ßùIÄ3é¾sƒ-Ùæ¹¡ Ÿ˜Rùz… Û¦ý¤Äå¸nÚO<‚ÎØ¹ý!a‘jJ&šåtâ™Dí3sM6 ELmùÍç3qÙ¼vC»|]È ^ÛßËRmå–ö¸öÕË ­¶³}[vsüîr7-$|ÄÏ#•5vÏÆqðlû®°l‡D+š?hÎÜ©(Ó»%>=f9aspQÄ:aÉHU›°È±’0SO†6I2ä,%zŽz>Qf`­ÜKmO@nyv Š˜°9®%í¥Â~ >NX)†·Í×QŒàànŽ‹üd{œ¸ ë¹m}ºÛº%sæŽØË±À¦)¹nÉrÓv„ît‡ÒsG¸¦F“¤XW…ŒIC¹Þ'»úlXþß“8yðÑbke‡+ÕÐå¥Ê;û&vÉ®Ó\[k~ q þI•ÊçnU>q^Ãq°™kOŒTÿ˜tJv¹Ìtïîð¢íYˆN^ººH`áyÎë6CËG¦ÇìßÅI|„§Ä´'÷0þÍsð/â&àV/ZÙb ~¥ºøÖ½â Àó7¾1upuõûL¿üz8>8%êÚ“©÷ epÉlèVÔ ©œâ|¢ôíÏ åN-} s\÷ßàøôxº’‹ÏuìͦñËi,mFI s‡Ë8–ñ{&qC`zòhÍ?ÒÄ7L[8±R]æÒU)B[âG|ŽÁlKÁàÉí„Ú’^Ä8W¸¶lâÚ%³žilÓæP†Ã×Ä’ÅŒeÝ[2«™4±ßÛÓÓCÝ1I/<ú+–vrQàÑ#rÆÞâèNþ]BX‘Àç{0=LˆL{ºcïÜa²g7ÇæG Ü|b´ª¾ë&åFï¨0pðähÕYÒNM†ÈØ.ùÏܘŸi…/æ­¢/èñeKQ{\øO’Çÿyu)Æbƒ8.êR®Nx»¼rõ§à总(ôT— oÏ+¹u¨®ûޝ¾*Øj×þ8Þ]rëH]wÒW¿ñ믯Gì«ëûê"Ãvüe ðÞºî!_}K°×>øØ ­œÿ²Ë½¢¿ßUÚ¶ À†§pÈ žÁ3xÏ`üë2ÝÍè IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-4.png0100644000076400001440000000064710720065731016510 0ustar skimousers‰PNG  IHDRä]é÷tRNS”ý®bKGDÝŠ¤RIDATxœcø÷¡t=˜üùÿßóÿÿ`øþA¨¿ÿ÷ÿÏG’½¢(û.ûÓJP"~ˆÿpøòÙf$¿ʲƒÄ²¤Î­„ȾéÌ‹iÝ+›ýfrÖ›s« ²çA²¹±–{æf?‡É Ë66@\»äbI¹œ—a²õÿ±bdÿá׋'kÿÿÿw0#LþC‘ñÀ²ÿî#tîÿýá>Š,üƒÉÞ›dø$k³¹Ãå~¨\8²ø‘¡Qð¶x _ïnƳípÙ¿+Âv-¿{u¡5Pï~ ?înÊ5$ÙÕËv­¾yuPö.PöߤҖf¸ìŸ7ÆG*"±ú÷/ºIý‰Wö?±²AÔ~y²SA”Ýz²›AÔ¾ý8dOÔã3ù#X—ɯ@²ûpɾQR¸LS¿q¹ «ð¨ì¨ì¨ì¨ì¨ì¨ì¨ìÿ8T1u´]e£IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-5.png0100644000076400001440000000021210720065731016475 0ustar skimousers‰PNG  IHDRø,`HŸtRNS”ý®bKGDÝŠ¤5IDATxœcàpá±qdpa¨)gcüÌïö˜ÒÈòýäçÉã—Ç FåGåGåG凫<\@ñ^6ÚIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-6.png0100644000076400001440000000074610720065732016513 0ustar skimousers‰PNG  IHDRÔPI„f{tRNS”ý®bKGDÝŠ¤‘IDATxœíпKað7;¢!Pi4ðÇ*4E˜C4ØâÐ`Ð xÃQ7‰Ñp%ÍaŽ  ‘& þW)8–zv‹qÞûö<ï=ï—H)†§‹QU¥ëkŒ= 7­dX«œcT…`úÙu€tL+¦Ë`šŒ&g ¤†FAÌ@ðl‚½Ë¹icÙ „~[FÀ¹/‹˜Vún‹Ì¸3ÙçN`O Ö—bÂFeìö*Öq}–…¬v¥&ôyÒÄ¥wòp‘7ŒGk <ôy÷ß-Y!—¥mÃ:hº(BŸÏhmm`Ô™®aŸ+búlƒéö¤BâEüßñU;«ìkЙa¼¨é¢,2°½O£<{Æ`Ž ûÌHáAŸ´ÑgÿÅ4qàWáSË™J©QöÆqáçšr¤³?ç|[QïÍÒùÎýá&?l‚ٴа­ûÏZmØæ}Q/µº³áÞ œÍšs:Žì–o×ê}‹·ÿn½P/5ʬÎÄ&6±‰ýÉ>*óã 3PIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-7.png0100644000076400001440000000102210720065732016500 0ustar skimousers‰PNG  IHDRê^´µ€tRNS”ý®bKGDÝŠ¤½IDATxœíÒ±KQðƒ /[tñ ¤¶@‚– Û‚¶†(j*u Œ §)" ýª#h̜ҡôjŠ‘ˆ‚h!»1=_ïÎÞ{jç‘åãÁñ»ïñû}yhZ¬²PE?®(Àæ•-€4a3ÓÆœž ;ÈiÑ¿ºî›†LÄA…Љp6wäÎ-½rˆ„‹¡ã|x~LæbšÃünóˆV£]gº6êpçmKJ“¹T¸Æj²Ü¢6ƒnøW,£@jeþW<1y3›-­œoaÇe0ó•˜o®p0OÃÌ+1Ï) \agŸ†™eŽ41½Oy¿ ˜y¦Ï¿Œª™·ÏÝW´tÉ"®Xåî(51_ÄÌ+ñäéËï\úÆ1ÂŽÄ*`æúEÑb±çùMÄ0óbrö-þxþPBìL`†™W n™³ˆéƒIÄ0ó*M‹û¶í^cn<ׯ8«ÍàOp&Pg q¸®³œßù)Ž6¶꜌º]·»3kê|Óß`VŸ¦œR罄Öååá+£7|ƒª¬|jªcý”Ë^Mî´zÜã÷ø¿ñ'(‡dr¢ðPIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-8.png0100644000076400001440000000345010720065732016510 0ustar skimousers‰PNG  IHDRíØ/Y<tRNS”ý®bKGDÝŠ¤ÓIDATxœíØLWð+vX6Ç/—¬þZùQqÆh@ÇD!ÅP²8Ý–)je°a4œŒ‰‰ød° “»9ç°*.q(¶¢rÅÁæÁFÄe™.QŠ‚ZÙÜ4Xg'ÅÐÞÛûÑÂÝõ‡˜™è2_èëõ}ú½{ï{wï^afCqáa&€Ž´i‡L³]ê·*¡Ëqp„DI”‡„!e¶^¤îèXa¸Z4p-㺠±µ@l³ÁÊò~½gã‰âÑ”ïéï•·Â̈ͫc7§m½S´îÚžÜ(Ä~㢥’ÔAfwh†ËQ‹}tÔƒ`ìê„ødÀ>ʆ1@Ê;ð1;½DÂÑ‹ïh·DÔÕÞV"Þ9LævA^ïôç^+eÝsA^¹ìf9#îœwAÅ)&rl‡º:àžr’èAHûN6 êtJد8qU”e|CÒÆñ¥BvI‚a–W¥œD[mÖÞ±èÅO®2œ]¸ ø/¯ÀÌš ôYÂè½b>^¯ÏŠg>k£Û|.jtÕ†—dqšû1³Æî;ꇙóc´B0ÀDÆ+åÙ5À”›¬+.êYÎ3FTÉ;’gf6åvÆ*[g¿¤·’èµß!nVåw§îß¼mMwº 1k½ÐK£aq b«)߯ZN¾¾º[§Clc‰rÒõèdœó„"£Ú¨ZÎìPŒM_Æpм÷¨_ÿÐÀTðì ÎÃÛ|hPþ5;Å-ïí…²~–ÜÀÒ»Üæø›hêiKùFíeác-¿±u/ ûuÇ)¹ú÷Õ²ÚRÄ-U ¹¯øRû™æÏ`-˜·ô°G_ÜsÆfµÜ;Ú1+Û »…Ѳ8¦½Í¹~Œ1Nû$\ç¡øG¿Vtõ€]>¾픕cJr7åÕ­ BáG…Ål¯2¬95K…y—˜=—uº¥æ²lÛ×Ìk$¼W§[‚8ßf)À¬˜8O´ó„Ü\ùhumâ–Ï¢RÀ\Hö ³ß%?ÀŒ«MaBð{zËq@¶ùYc‡¦•–&ºÍM=ÀÇE•CÑ–Þ¡©‡ó±ÂÃx9fÜÐÔ3éÈÐÀB”ÇËΠБ!hÑàÊÁA(#<ØÃ9,ÃJW\èJ¾m!¬ŒyÁ®r‰v8æµÁb'’ŠvéΩpó1ÛSd‹)›t%^þ5ð-Nv–²l©/ºÅÇÇ»Ýp æÛäØŒlw‡š›*÷Xv[>Zn˜ÒlÜxöçB§å¬ ÍpdL¦sáÊ­Ýñž)ã7×ðʆGB)å|¬Ìù")!YÀv—̵g­D’ÑNÝ—R¶ŸÐ¾"¿NÙ47Ò–ÚO¸ –oµ§–^YÌ6ê¼Ñ鋺XÊ,á+lé÷yß7Qf´+£cãËëQ¥½¤}"Ûd˜dÜþó®/0À½”iÑ„føHXð„%'欓œ¼ï”x 91Ô08è]~^`&ŒsL{ û0ßZtTO”u@ÓýøÅ/'ÄuËÉèX­dvÿ1£ÑËå§Ñ|~óÏOͦ¯¦X›ß>yþÝ7ãhe¶ñ¡›­fÓòŸ­ÍK3»V^`d“> é‡|X*ª"bµ5YÊøÃc3¢ãNãqs’Ñzhm÷¦EÝš Y»/ÈZˆ”Ž„xu辶a–®î]¾,æójÞ"ÄÜëcV_f0_óÚ‹è{nœŠrµ¾l¿ ˜oºµ =`{ßÐP>§/k9µ$=`{ó (Ûd5åB.Œ…°¹Q#÷“ÅrNî.Pgׇ8¡œ+kŠ¢A vœ¯¿¸[Gyzs'M6l<•¡Ýšµ‡puEOÁÊ p5½«a]WëVÿ¼äü£‹ûz)OFo¼¹«aÃÌå¤ç¶ä Þgìa Úydr\šq¢ÖÀlµÓžÛC{ûC¦å³GÔÈÃÙþâ Ì]ÉšDš¡7çS¢«F ¹"êcÑ̈sÞcÓ™ñWá ô%÷³EaòÎkj§ÆÍy÷Ê9¸ž–¯û’c³÷šÙƒ€ä¼ÇÖ»pªù†|ÝÒf6ßlfšóXCŽ}xÚy|Bn´V–X“eT_Î7øMùÞœGâ÷U!Ú3¦ú„ù›I ¡ðÁtÞLMìÕj‰ýÀ±M‹sõN^}œ¬³8ç1ï¿Ôè ¡Êòorÿ'³#,âeæ‘Ìb5ÏÌ£6àí5‘c3úö]ÜìÛY°[BMîd0ç9í°ôzÝ™~`—šh„ mITê-'ÉÒs§~2e–Î/ •ø¸T¼ìÇOrÖ*J`ŽÎ@n]óìT›ÌËÀÎéad~æ0Ÿâ&A±wú|nQ[*3Oä"’°(NcÊŒ8'è НŒ”$#1ó=ï¢Nàzs·é~Òt›gÎfŒLÖ%¯H¼iKÀ‡ƒ;7'ÆDž·/¯é ]ã^ÙñxQ¶ôf™Íš ùèÃÿŽ#dÉä¨7dz…ü§³WÀœ»RÅÕ+µ]CÞR°[ÍÆ.¶<ë˜ÓŽ·„¾> sL“ªé¨j­ TsDnø—ï Na¾ü8%ûåð +¬°Â ÿ‚ß=ff¹Ô¬½IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-10.png0100644000076400001440000000175210720065732016564 0ustar skimousers‰PNG  IHDRë34tRNS”ý®bKGDÝŠ¤•IDATxœíÕoHað# ‘Ä_ôWŠ&E/"Va‰­‰…(A½(üƒë¯-‘½(£ <¢è©+t$”¡EšB” Ôv)b%KÅØbÙòÒጵæ¿Ý¶Üîzn»»Ýsz×ÿôÂçÅv{>{îžß÷yö Á)%hã({…#]ÓÙÅcK`¹…ÙÉc›Bø“¾IÉtØ:wèÚ úâ·3ìmÕ,õ%ßÇQ˜–9÷~|}›a÷WàOm{;G“å¬3Ï´%ŸáÉ’÷^¢¬†}œ1#õê;Ùë»Q § µ…eaæo|ô+ɲ0sƒ‡Â¨)n4Èb=A3I=1ȼfC§ÃIxÛNmBï }ˆAæZõ ŽÛôÄg¬:Õl'B 2¯ËÆ8¶ê Ö˜3ü… 2W¯^Î- ¾DUZ!þõX´n¯n±DæƒgØç|™x$…¹øLïó ˜•<¦÷9±’ëèˆÙuðè½0ÓûÜÝÄq÷'ƒ&'?Ìô>wË967¼ÕZf¹ß¦å¸=ºòT–2ÌÁ7'T9 à0¯°X›…ÌI¨ËO)yÜ%d’÷1˜¹•² ˜DY™[¯mÍÜÇ|£3ýØîŒ éÜh:óWš}¡ã¶ï†æ©dŽAæýg4‡›°P‡©ë«¡™xÊ1ȼUlßfÛ¼jßX)T7*(—ÛèA&…l‡X¼Í÷Ï£gб<í¸Ç(>[1?Qq¶)ÔEç®`¿a»¾û¸ÏØÎ²·õ´j¼h3Ë#'[ê )Õ,»÷üœtïÏaoíxÐRÖ‘ÒÈòdIG±S–ɲ1rmæÎ‘ñuÿãèé‘fjÖ¸íª`^¾àaï nùü f’›w'ì0žÐh?`%ŽØ{ µÕ èõ§_—ÅÝ9¡B\·Ÿ'¬9fÿ¸¾v ÷yŽ|zñ7š‡…É/û³_ä©+p)OTƒY¿r#TeƒiIªõ3× ø›¢¦0ñXÀiäEç8óJaŸë‘¹\‡BFŸ;h ô‹&§±‹e `?|玛ŠX™""ÅvK•–ùG0w¿Õä]îZ3’XXTpG|Äæbà:‡£!Ä£ðÌÛcJ:7\ˆN0FFËíôºÃsÍË?ØÇ]õ,ôÉ4·¼Š’b5!Áþø¸mr¥(_¬´”ëP ¾¨•`ŸNWž(Á•–Ò*ñ©]BV®gz…Ii“âQñ\þïõ^äE^äEžwþ ¼É±(EÎT†IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-11.png0100644000076400001440000000071510720065732016563 0ustar skimousers‰PNG  IHDRüRXÆ„TtRNS”ý®bKGDÝŠ¤xIDATxœcØÿ ~ÔÿÿWob½øý¿&ú!Æü^ÿûýþÿÿþÿ¿\ÿ¿î\Lþÿûÿ0ÿ«‘|…+x,”\Ñ‘p¦ÿ‘MÚ™ù0¿á îFÝ-_—×:ÿ߯j§6~˜‚Ïp7”­ÍÚ¹þÿ¯Ý1»Êa ^Â}‘äñÈBÁ#ɱõß 7^ GÂÁ_d6ÿ鯠Ê|Äõp‰çpûa‚ßëAa ¿ÿÃPðí?vŠ‚0æ0öË8HÌøãÍfÜøÁ¦`g2Ì„s7WW½y;ó÷kßëO¿ùÁlM…¹Áïêꪷ¹aE¿³C¯_ýSÐ(󅘢‚¥Œ’D‡M‚“zË'{Œp;ëýÿÿûÑÂCÁ\ þ€ˆóx`£ F G=óÿ"•XôRpV^ GYŸ‚y7—åÜÇ£àñ¼Êg¸í*˜?³Í>ßçÝTËÃgÅw9 &|ŽÄ)5ª`TÁ¨‚A­¸ƒÐN+ z®IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-12.png0100644000076400001440000000155210720065732016564 0ustar skimousers‰PNG  IHDRüj°ï”tRNS”ý®bKGDÝŠ¤IDATxœíÔ_HSQð›:Rš åÛ9æKâ6{ÅÙ ,1}衘MÂHQ+Yh7+aæ0(qú.ͦaê-uXô‹¦Mæƒè½ûã¦ÛîNçl¶¿W‡/õÐ>8Üù?îùÎǹBB‡fui¦}Û·Dc·NÐJ#œŒ9+š´ÄÜ0cŽŸ ˜Kn+ç{Ò¹â—"Ú fO'®ZTA`Ïj}vñ½Þ ï¿Ó©u¸ÀdÓ {ÎÆHlηjž~•dÃSçµÎ|B[wM» ¬‡ øé ÝEE*üÒƒ¥âö· RqŠElÁ„&ÉxÔ€’{¯0$š»ƒu’Ø,gÌUIõŠŽGÕ5—‹ØÀvíøÚM½½þEt½ž lBPûà œ,§Ña)®Y‡÷.3‡-IŒÿA±…-؉ÅXìàÀêŸ.†DW^ ¼_)Q"4FzÝ~àðÁHï&Bå@Àä"ü3/ÃøÁ(Mð¶æ,+¢LüxBŸ¨q[Ô¹Âdiù#®Oì3Ùƒ•šZcɸ7Hb@1Ô”øatt}6ú¶ip¦Ü +†êòu`¼ëi¾/˜x<ÎÉ(ºÝI£êJÛÁÄ5®*¬^*pSþ;¼P^Å$J)À¶(ƒl¶%%5¿Òò¤ú‚D”ËïÏëâ*k¾à ê£íU).õ £“·<šé°ò …ó»íu§AFi‡Ðkäa§(nïØJ¦[ŽfrŽR•¥övqùU•ìupîŒ= ¬Æà?^8‚®/L`Û à`‹6º-!•þŽ'áÑÓg»Em÷ñ`>÷8ÛZ/(1ž0÷ðu'ubc4Ȳž”âÏW!(Љ‰hg-”%B]®:"É9´E£  ôš àGmá¾I=@/qâßèi^–t7"ɘ…Šƒ8ˆƒ8ˆƒ ~Á6Ùcœ¹IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-13.png0100644000076400001440000000033710720065732016565 0ustar skimousers‰PNG  IHDR¬9ƒáý…tRNS”ý®bKGDÝŠ¤ŠIDATxœcø |` ¥ðÿÿê!œ~$áïþÿÿA…Ï# w*±¹?äTò8ÎÄSþyf²Qô™”É*—'œFþç3ÙˆùPøó„“H†¼ç™l$><á’êç@áøc@áÉ(†¼àhdq~ÈÑ À(À€$ $ì±û»ð?yìª1Á¨ð¨ð¨ð ¹g®ÎÁ]kIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-14.png0100644000076400001440000000103610720065732016563 0ustar skimousers‰PNG  IHDRàj}`òtRNS”ý®bKGDÝŠ¤ÉIDATxœcØÿ¿™Oþ?¨ÿÀ$ÃþÿwsïÿGï÷ÿ†(a0þ]"U’üf2l×:<Yî_’1¿Zð!A°ä–m·_£èÌJÌo¶Þv,¹õÙ·¨’ëòçZ/]–d h”Cví?ô¦È É`ÉÿxÀ@I~HlGy&ëa’¿×–#I~“µ`É®øÿ¿óþ£Hþ„KfG¥f!K ò$ÛmI©ì÷YûŸ¡ÂR$»Iîß׳^rÝ«kË•zÿ3ÔZ퉞[$yumÒ;o dx÷†Þ²Þ ÊÈ®eáT–ñ°é»¸«?ï"ûÆ'ùŸ’? ¢ˆ|þÿ HþƒHþ½vEò7Â$güݾMò\Réˆ%Šä?®‰cU7N€%9îîCÕ™=ë•yXÒìí¹ûh’QwoB%8Q]+È$àf[1¡«?ë‘ýIŠä?¼:ÿS&ùŸƒ€Á{(¹ dï~T¹ IŒ‚ó%Zx$þg¸‹&ù?/+ç1߯§§/\ÆÔù?7kÍÓ²[WW‡‡þgPA·“ÃY _ˆ‘Çc†¿˜þxc0üÀ'‰)÷ÿ<>Éÿ£’£’£’£’£’£’CH œ;v!¶IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-15.png0100644000076400001440000000020210720065732016556 0ustar skimousers‰PNG  IHDR¹-Ú!÷¤tRNS”ý®bKGDÝŠ¤-IDATxœc°h`qlfhd”ÿ @äüÿ€€?. ,`TbTbTbHU?}mËIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-16.png0100644000076400001440000000333410720065732016570 0ustar skimousers‰PNG  IHDR¶ý9°tRNS”ý®bKGDÝŠ¤‡IDATxœí× LWðŠhùÊ ›Žò%Í’9Ö©Ñ…j4€QÐè›D@Ãüª 5¶¨SÞ4,Ȃ†8 ĈZ%Zn‚xn32­J+‚dŽmØÁ@Vàè½½{ïz½–’¨¸¹,6оûåßÿ½÷ï»wï$PxYè&¡=*¹ù²ÈÛlNU‹¼õaÖ ÒVÈ][b—vóÞן„›¬UÚZÈûõÁå ÄMTuíÛ:š÷Û¦àÅ$ÄWÝ:/oLįÁ;„ ÍÈŒŽu3!Ão9ÅÅ#Wrõ‚¯o¦Œku‰]ÅzÛêìÆï+.‹;†¤(íûo! í|\Cà©›…F§ä´ãü ƒSìmŒàFðÞÊ<ÌŠœ+ä]®¾~÷"ê•xþtö§½Ê9š?Ý›Œ«‡¿]‹ã¯3ƒË¹p4zÞ1¾;Xû9öÛŒ)8ç—øÜ“^‰½Wì%sè?÷K™óqõM¼ã¹õÕ¡yŒ£é ¥—¸¸> L°˜ˆ·2×yWÈ}|üþ–;p}~äGåA…®+¼o*ß p}nñn¢Ö5èMÚRŠÏ#ñâæ“u%Dã¤ÿµãŒ+{âuxD¶¶-4×d7ó>(¸Ù Í.ìm‚SØ)â­B¼B>msëžyÄû¬ñ¨nÍKTÇ"¿¬KV7Q•ëUkÛÏÓØo yPÝ‚b}€§:^vνž¶%þC~ÎŽQV–v’Ÿ…L„ÌÞÙy¹ó#¢÷%9ijjíYÝåv–cüE­vþåš‘LÇø™!ËR‹—2þÄmçD[‹Ø»á(tæöã€w@¹SgX³Í É‚Ù[67&åç”âö:߈}•ć¢âÊÈW¢ þ7"NÄÒÄÛ£Îl#ß 5ü¡o_­çó´(Û‚¿ +rf¹„Ç^×ÄÜ,:4ÃãNÝXÝ òA˜fucB«÷[¸ýò¬ÊÀ’üœ\ŸNsÌþîqJí™6=ît®ÃýœtìÔêŒ4ÍÀžqáH0ÎóJÎÍ”£SŽ”m•=Óú(mG-ý TpÚæ½LfzÇþS¶s¿i]n¡»pøþú?7¦rëó°àª¤m33oÌÿ5- ØÅ«’Îödêõ=•د¹ñ̦ÄOõò÷ iJªÓÿŽ'ïSrŠV œ;ð6›?ãùá|ÝeÞ/å¸+pž}q¼«’ž`VUÔªq¼æŒà¦5LBØ9Þg|LÕmŽûžX¹â£Ô±ýO<Þ'w ŽKÍxGà°_b™Ôè5s¿;œBžŒâçpn\!Ï=Ö÷Þ/ S·È¹úXÝ×Êã™U]Þº=CîkÚ£L‚¦nûvÊ.¿Ä7dÆŽ)E+ù:í?C;w‡úgêv=ÆñÅB|^[ÿ!Ä—N?ݸ'š,'l@QpüÜĬú 쌦9¸ÆJ:sÿ‹¯Iüî;Ä«5TÉ9¹¾^KòïŠh î}xò¥O«^¤$ýa€Ð®‹µÖþ Žg¶ã¸º»brÈîDu¢G%#öÕuhù©ãÖ%G¯Bÿ4wÝñ/VñÉ]÷7w.|­¯>RQ,¶Ÿ¬zWdÏîùuåûõuºi¢xÝÎH­Z_§­A¾Û–Ÿ•É ØR$Ý‘ï'Í}vëö8Þ$³%”¯,3Z‹’‰3ÐÞG”Îï—>¼[óðû%Èû0mu²_bxUZì—¬ùmç|fû%mn«zˆ«ƒüíÍ«<¥àÝ:äx²£y¶<²³1ùy/”*æÆÿ Ãyò“I|ø0Ýô©¤jǧ¯‘ñnÈÓiîS%_)ñ~Þu·+y’^•H®§©¼#¹ÕÇ%‰"%õa@±è¸>aè7M$û…²úÑ–¶Þñoƒ~«OðÈ ‹0ûî¼ëï¹á†>}»»‚¨òMõ_Þ ýú÷‚‡vÍhóºÒ?H+µÎâ‡FñÄC¡|Â*?S,ÛopuuXÇÐÑÌQû  )p„÷‡äNòG½YãÆÎí}òtÎI/¥ðÈÖÌêYÚzDås–ê©ê(vñþA}[Yzæ’ƒRæMNWåÁþ•¥K/`Aˆ÷¤ÎÀcµÈ»SîQض8¿Œ-¼Ãž}·$jcyÿ{äÑGL åQ‹àb¿ŠüÚ¸ÿ·ƒ ö"ìÁ'NiG÷0íìƒÝïZz #1ÄîãW°$v*æ|%A#Oœ¶z.púã…³ç·ÔÜËÇŸöp¾¸rmjsß^ö9Þ‰ò&—èÖïE>ç½ÖÔÔÀùìÒ'éësC¼+ûRTÈGÙ—‚ë¬C*ï·…9ªÄîó‚£ú4v;—»ßÿ!Ø$óôQV³¤Ï4˜3^$%Žº1“ÑÿLáËp ܧ*Úð ßðÿ»ÿE—n…÷“‰IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-18.png0100644000076400001440000000105210720065732016565 0ustar skimousers‰PNG  IHDR¹v¼htRNS”ý®bKGDÝŠ¤ÕIDATxœíÒÍKÂ`ðÑ%ú êHÔ­Sˆ "HxéåÑ!:uèŠÀh•‘ Ý:„—]†Z˜t™dXQôž,Š<Ì’´Ôö´íy·ƒ "‚yúâ‡Ïóûî!@åß¡däÕàуŽ·3ÝM*8Áñݵ´9ª‚$ޝ.[8¤ Óå½cµ§â­t¯û{ÀƒÊV Z] ò\RBŒYV ×í´œvk)sôy¹eC²5\-¥–ñ¿ä&ƒ 5%§ˆ• >©aku@N^áÛ÷úš0àâSˇãoãøòæß±¬T¾HS@yW€ÕLÐ=׆Î(sº.náÃÎcGŒÿ19'ÜÀ.ú¯˜à}"rŠÁí‚md ßëB•íGü.D8Ǥ½„,)ÍaHKM‰P*ÊER4Q”'Þx;GĦš§ãÛ³…A‡jb=I‹MävVf‹Ã& Ðt-6µ—Ûé!ƒnµXß&6eÉ8{íc5¦¿îJ7pŽÁÇÃ[!8 iøÜN8%R8ÁBÐß¨Ä 7O™5€J,$yƯT¢AͨÄ7ç>᫸GJoA]ØÐ`€`À?OÇ‚\ 'IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-19.png0100644000076400001440000000046110720065732016571 0ustar skimousers‰PNG  IHDR°CʲDtRNS”ý®bKGDÝŠ¤ÜIDATxœcxÿžƒˆÏ÷ÿý7ÿÏp.úýþ_ ùû÷ÿÿûÿ3 ¿ ¾ýïÿöÿ ¿`¢ÿØ›?öÔfL¶9¾Ì˜á/\õô[g¿–¦JÝ’»¾m!ÃO¸pø­«_KkfÝzw}Û:†/PÁ¿y žtÚmâ”f˜ˆd%2nÂõ@âÙyHfìgæqàQp°GöÜ>#9å䤔ÉhÂì3Ÿ`¶Ÿ‘R=£Ux?ÄÙ¨Vr´7s¸ð(14 ªþÿ>˜ñ}?qÂü`ÆtC°QáQáQazþ{°^ öšIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-20.png0100644000076400001440000000117010720065732016557 0ustar skimousers‰PNG  IHDR¿jÅb½7tRNS”ý®bKGDÝŠ¤#IDATxœcøßÿÿ¹ÿÿÿó_õ?†ÿHàWÿÊþ¯¯c@Öñ(V]’¨FH4¥µ©ÊÍ8¨ÀcžaÿZ¡4†f¨Ä­C[¯ÚÝjÿ\yoÝšÅÑNp·îš^»µûuuÔ½uë'GÇÀ%Ž˜ü w šÄL‰ù¸$þ-ñ@‡ÄÝ|¬¶ÿcØ&q.5ê̤œ™*ÜþÖ¨[>GØù³Ã$î§CX·gÝú›y7®ã1„5ÇC(†ÉÃÂ.ädw‘ãóïdHü†²îSç1$öB¨÷˜ûQ%ŽUƒYÇRm çw8œïI:p,±uDÇã½[ùç…µW¯ºv,q*qõòÞ­åkÃvgÃ$žHLRÁÒÝ äÞã $ õùg¸ãÃYhÿQ%H ’ø$¶Âí€äA xþ5H y¬"ñ«ÆÿwYâX%˜̓GÒ&$ƒ$výK@óàymç½W³³Á£ yðÚêØ­P‰#ÀБüÙ&‡!apžóÉÏŸmi ‰vdËUÎy<J€Ú$!ÈÀÆ¢$ðàÅá;†B¨jâ%>@(L£0À¨Ä¨Ä¨Äê"9ÙÏߥÀIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-21.png0100644000076400001440000000212010720065732016554 0ustar skimousers‰PNG  IHDR°ÂÁ&u9tRNS”ý®bKGDÝŠ¤ûIDATxœíÖ_LSWðK1´ÆÆR÷¢†³’u{0*l38ä2bP3ÝËâ¦âŸ`ÜŸ˜ˆ’ƒ0ƒÐ¸PµéƒQ(KÀØm½¢d(Q,A¦×-[| ¡’ºÝÛÝ?g÷Ï9çž¶·d>pŸŸ|óË?0Ðöcòp„ øB1O±@sÒŽVà¼\ûÖÅe~ÄÆ[Y”H=y0N+=ƒÁ}ˆ¿ $I‘²Ä¢‚ÿî{>ùªÇ–û8[–2ýň,±Íý¤ä¤Óh©frøŸ{£õ8ý„t"”}æÁµóôýÒ²‚¸Ý@b¬‰Š8ñæ¯#¤öŒëõï;ÁóLg8¡d0O!Я“;ìÙÚ>éšÍãÞSÃÆá öлÉþhåNƒ'hŽ÷_yÛä²ßyÁ»qÏ{Ù &­á8žw–³±µOŒçóÅ‚9s…<\Y{ŽÆ }bޤRSI€˜%Ü38Õ8ø÷ˆU¤ì·¯²v}û騳š' Ÿ‰YxÂUg'9¡ª“™ÛGg߯ò4ËÛ<_bÕbœ§‹(Kœk~hŠ=ê5¶~@åð†ïz/ÇÔ,N·¯”Tt@†Ú’5¤;¡™j/•w–sgã‚Û§9ût,‡Ó+·˜ñå¦?þªû\$bñ®+}ý1Íâöá¶Ï}ˆù¬Vs™Šo6hû½Îìd9‹õ5 Pm8‘ËiߪîÖ[-uß±»júˆ3ñes41ÄeòБÄͲÙçmo½Zµ©¦3’Ù·u¢çÂíÎÊÈP¹aÀcI˜bÆk/7´}ݬ]+ô­Éé îH’ư˜µ—ÛQôZƒO’~ifDޤ{ù'§w RTaþbiÞÑwPKG%æ) E\K·,s-ÖxDÊé[MäpiZïûÙ&ÿòpPYHŽ©öÉ@çÃf²qs2þZ×:uÃ[èn——×¹5gÞ\á_­ ßé:tZÛ»5ôaùû:¿ªÈ‚«ºŽzä;ûo†Rå[õ"Ý¡ŠJºŽ¥äûÝ•×Ë?ÐÓáPÅêðåàú®“U×ömOÍ"?_[^pf­·Øë.¬*v0k/ªh:¼ÙÚOÚåfüï‡5Ý’ÅèYµôÅ­à/ðÿü/\y .r5›IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-22.png0100644000076400001440000000121110720065732016555 0ustar skimousers‰PNG  IHDR£€O/äµtRNS”ý®bKGDÝŠ¤4IDATxœc˜ÿ üùÿÿÃ}ïïÿÿÿ@ô?,¢ÿêQEö÷LyÀÃq‚É(ú®¶|…ß·³‡îEíG1¡|uß·µ+þéW+ää˜á2Y¾ÿÿ^dÛ|TÑÿÁ¢(>xÄó1D¡—(’ßžcýþÿÿ~¨è~ü¢œEKœGS»éó3Ñ…áíh¢«®¾zº.l7º ,Y&xGu¾ \t>ÜepøóÓÇ4. Nháð€Câ@“=H´®vÓço§'ݹµ=¾­Ž¸…& ‡LŽÌGýOhéšÐüM$†Ãd{˜ËÎÿù¿/ÿ/Èà ³aÞøûþßÿýõÿ÷ƒE'¢ˆæÿ…ˆ^…‰þÉp›gìé.·%MáÜÇëÂjææ6Ýë^»€á \tmØÞu¹¹sîyEßÂÃÁA`Ž£BŒÍbžQv¸{ÿ?ÿ”Ýýþ9›è'}˜h;L˜J~­ÇT»éóù˜¢«®þ„‹²#L`ù»Ÿz~#E”‰÷ý_Q:º{¢!!ñ€a;Š($$ÂágÿŒã@V[ε½Èæ–m/ý9Í ú›˜;þî§–ß·è?û‡ØÔÚ?þÿ#‘Ã!ê)©,!¡|H öÛÛûQ•9“}&K?9Yûí/ªè™ÉüONþý.c"Ê3Ù$ Ï`ÑI`þ^Cuáh`è`>$ðƒA‚ê>¥²(_õÍ;ÍôIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-23.png0100644000076400001440000000015410720065732016563 0ustar skimousers‰PNG  IHDR¨9Š ]ÿtRNS”ý®bKGDÝŠ¤IDATxœcø 0ŒŠŽŠŽŠŽŠQóG¨¦V¼IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-24.png0100644000076400001440000000203110720065732016560 0ustar skimousers‰PNG  IHDRÀ„©étRNS”ý®bKGDÝŠ¤ÄIDATxœíÖhWðWºT*Ø:¤Òb5Õ:Q˜¶`•fmQPcÔ…jwœí×9©¢‚ÎWmEÿZØÐVE¶A 42²æú‹Ù£ÐíZhÌÒ*m” ‰­6I/Éy¹wÉåòC­ŠÿØ#Ç{yî½÷}÷ò ™Èå|…îW2 ¦Map=c€]F€ºø²òKòÊñ²š4Op†¦Žu»{Æ0 .ž ê*i âØÃ§8…9ðÊšjrù±d¤3ïTJ`@dä{›…‰ˆÁ—¢ÅÀ¼+4¦—¢dAÆ„hD`#HØ¥`;s’ëQ&ò £ çš“nK‹®[“Û›·ý¾®º:u-°:8pëÕÃ-^eÍ-1×µ·ÀC'žU»‡õWðªá+{M„ž¨¸Nåp³ò.‘œ–fÉU½ò[tÊ4iCLúC’ÏúD£Ù›DÐ.̇ö°eèU‡JäÛY L.(Ø&¯—ö¦_žúÛ…Nâå:ãÐW¹íßÝÁ¸“x5hÔßn7Dƒ[)ÍšXÖ<Ù²ŒÂ˜'“„I ˜ b–$)t¢h¦­Í/Г<¸øI…¶‹ÀÇ‚#¼Mû7–¬Ü0Š-lþçkÑG½íA¶uÏàŽÕ·ðc”lÎÖóm?i9pC¾+園¢}»¾ÿ-[ýžgždГ î¦påädߪö#˜2p%M³€6!Éí>àqA¬}ƒ¤/¦³U<úµPõb®:ãZA¹>ë‘ÁË?«VM>8k0ß(ÁsnŒiëáßÿh¯Â^Ý4̺8˜_ê~ÜüïÁy÷3Í•ñÉáÛ—ä#Âs ª íZkt8 ‰Ž`ýbÀÐÿÑp),_¯ž“™¯¨-?“%ʬÅ~1vl*+‚ØÂСÅ*ÖuàÅÔn\hȽkZj·¦.i•W6ÈâsìIúKß!ùÌÁr=ú+t1~ÚH¾ íUZMt^‰j}aðC®Ù{1ÿ„f±¬f»æï¥’ÔC¡£Áõß7x%AÔ©ÌÖ¿,ÎÄ)вáU,hŒwPC¸» 6ÈÕ™i)y½ ›2W9‚üœ[LÀôÄdÄGÙ'Ù‰Øl/¸OðÅý`@zìXg×ȹE9kÅ ª[=½¯uâŽEiƒ²KÜ×:)µXFİS­ð² °¤9bºÒ*&Xø«o«øHeÕ9¥e£Mó¥kô'øfðÂ$wÍÂ,ÌÂg ¯ë³<_:õëIEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-25.png0100644000076400001440000000114410720065732016565 0ustar skimousers‰PNG  IHDR°j4iæºtRNS”ý®bKGDÝŠ¤IDATxœcøîÿß?Êf@ÿûÿÿ}˜ðq„ð}$áÝPF‡ºÜŒó=7®¡ —6ÇÝj߈.<7îÖîÍÓ=ÑÌîIòarïáxæ’¿ÿ‘!áŸØ…ÿ%üÁþŽ$|»ð=üÂê2†½üÂ¥Íñf¥ìfÃd[™5†K€abØü8 hÊïÿö€¶0¼ÿ¿ÿc¾ÿS埪detÁ×k«³Ø± ¾†æ#´;p2BåÁZMp>6ÁÿD þþ 5Eð÷÷ÿ÷ÿÿ¯ .Ç&Ø|l•V㢢äÇÿá>\𖄉õu}y¶ùÈ*o½¼z;lÝl«õÔႌlx”YÚÉsSP@¹A‰½Í"05›° òcü?*8*8*HmAÈ›Óñ[Ô”IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-28.png0100644000076400001440000000046710720065732016577 0ustar skimousers‰PNG  IHDR¢C7‘ã‘tRNS”ý®bKGDÝŠ¤âIDATxœcØþó? ÔÕÿßÿÿýŸùÿ0lÿ ­¯â÷¿ëA¢‘E÷CEÿÍ… þIO9¯”ü(@­êÃÿX˜èog§öÕ±o£þÕ"DccvƒDc~`ø«ý¡¤äΩü˜Aá Ð,`؈öÿÿÿÏþÿÿ÷ŸQDÏ) Q6û& ƒ J–ÊQ•“óO]V«×öÙt3EôŒ°Z½ÏYGTÑÏjõÆg>üñG|¿õ™OÞ#D•XŒÛ$ÎI8$É=Dˆã HÕÁE¿éû”„èè¨è¨(%¢Œ"l  Ù‹IEND®B`‚nvi-1.81.6/docs/vitut/grohtml-8264-29.png0100644000076400001440000000015510720065732016572 0ustar skimousers‰PNG  IHDRª9ŽÿÂtRNS”ý®bKGDÝŠ¤IDATxœcø `áÂÈäÓP Å·ýIEND®B`‚nvi-1.81.6/docs/html/0040755000076400001440000000000010720065732013352 5ustar skimousersnvi-1.81.6/docs/html/edittut.html0100444000076400001440000021701210720065714015720 0ustar skimousers Introduction
Session 1
Making contact with UNIX
Directly-linked terminals
Dial-up terminals
Logging in
Asking for e ed di it t
The ``Command not found'' message
A summary
Entering text
Messages from e ed di it t
Text input mode
Making corrections
Writing text to disk
Signing off
Adding more text to the file
Interrupt
Making corrections
Listing what's in the buffer (p)
Finding things in the buffer
The current line
Numbering lines (nu)
Substitute command (s)
Another way to list what's in the buffer (z)
Saving the modified text
Bringing text into the buffer (e)
Moving text in the buffer (m)
Copying lines (copy)
Deleting lines (d)
A word or two of caution
Undo (u) to the rescue
More about the dot (.) and buffer end ($)
Moving around in the buffer (+ and -)
Changing lines (c)
Session 4
Making commands global (g)
More about searching and substituting
Special characters
Issuing UNIX commands from the editor
Filenames and file manipulation
The file (f) command
Reading additional files (r)
Writing parts of the buffer
Recovering files
Other recovery techniques
Further reading and other information
Using e ex x
Index

Edit: A Tutorial

Ricki Blau

James Joyce

Computing Services
University of California
Berkeley, California 94720

ABSTRACT

This narrative introduction to the use of the text editor edit assumes no prior familiarity with computers or with text editing. Its aim is to lead the beginning UNIX user through the

fundamental steps of writing and revising a file of text. Edit, a version of the text editor ex, was designed to provide an informative environment for new and casual users.

We welcome comments and suggestions about this tutorial and the UNIX documentation in general.

September 1981

USD:11-2 Edit: A Tutorial

Contents

Introduction   3

Session 1  4

     Making contact with UNIX   4
     Logging in  4
     Asking for edit   4
     The ``Command not found'' message   5
     A summary  5
     Entering text   5
     Messages from edit   5
     Text input mode   6
     Making corrections   6
     Writing text to disk   7
     Signing off  7


Session 2   8

     Adding more text to the file   8
     Interrupt   8
     Making corrections   8
     Listing what's in the buffer (p)   9
     Finding things in the buffer   9
     The current line   10
     Numbering lines (nu)   10
     Substitute command (s)   10
     Another way to list what's in the buffer (z)   11
     Saving the modified text   12


Session 3   13

     Bringing text into the buffer (e)   13
     Moving text in the buffer (m)   13
     Copying lines (copy)   14
     Deleting lines (d)   14
     A word or two of caution   15
     Undo (u) to the rescue   15
     More about the dot (.) and buffer end ($)   16
     Moving around in the buffer (+ and -)   16
     Changing lines (c)   17


Session 4   18

     Making commands global (g)   18
     More about searching and substituting   19
     Special characters   19
     Issuing UNIX commands from the editor   20
     Filenames and file manipulation   20
     The file (f) command   20
     Reading additional files (r)   21
     Writing parts of the buffer   21
     Recovering files   21
     Other recovery techniques   21
     Further reading and other information   22
     Using ex   22


Index   23

Edit: A Tutorial USD:11-3

Introduction

Text editing using a terminal connected to a computer allows you to create, modify, and print text easily. A text editor is a program that assists you as you create and modify text. The text editor you will learn here is named edit. Creating text using edit is as easy as typing it on an electric typewriter. Modifying text involves telling the text editor what you want to add, change, or delete. You can review your text by typing a command to print the file contents as they are currently. Another program (which we do not discuss in this document), a text formatter, rearranges your text for you into ``finished form.''

These lessons assume no prior familiarity with computers or with text editing. They consist of a series of text editing sessions which lead you through the fundamental steps of creating and revising text. After scanning each lesson and before beginning the next, you should try the examples at a terminal to get a feeling for the actual process of text editing. If you set aside some time for experimentation, you will soon become familiar with using the computer to write and modify text. In addition to the actual use of the text editor, other features of UNIX will be very important to your work. You can begin to learn about these other features by reading one of the other tutorials that provide a general introduction to the system. You will be ready to proceed with this lesson as soon as you are familiar with (1) your terminal and its special keys, (2) how to login, (3) and the ways of correcting typing errors. Let's first define some terms:

program A set of instructions, given to the computer, describing the sequence of steps the computer performs in order to accomplish a specific task. The task must be specific, such as balancing your checkbook or editing your text. A general task, such as working for world peace, is something we can all do, but not something we can currently write programs to do.
UNIX UNIX is a special type of program, called an operating system, that supervises the machinery and all other programs comprising the total computer system.
edit edit is the name of the UNIX text editor you will be learning to use, and is a program that aids you in writing or revising text. Edit was designed for beginning users, and is a simplified version of an editor named ex.
file Each UNIX account is allotted space for the permanent storage of information, such as programs, data or text. A file is a logical unit of data, for example, an essay, a program, or a chapter from a book, which is stored on a computer system. Once you create a file, it is kept until you instruct the system to remove it. You may create a file during one UNIX session, end the session, and return to use it at a later time. Files contain anything you choose to write and store in them. The sizes of files vary to suit your needs; one file might hold only a single number, yet another might contain a very long document or program. The only way to save information from one session to the next is to store it in a file, which you will learn in Session 1.
filename Filenames are used to distinguish one file from another, serving the same purpose as the labels of manila folders in a file cabinet. In order to write or access information in a file, you use the name of that file in a UNIX command, and the system will automatically locate the file.
disk Files are stored on an input/output device called a disk, which looks something like a stack of phonograph records. Each surface is coated with a material similar to that on magnetic recording tape, and information is recorded on it.
buffer A temporary work space, made available to the user for the duration of a session of text editing and used for creating and modifying the text file. We can think of the buffer as a blackboard that is erased after each class, where each session with the editor is a class.

USD:11-4 Edit: A Tutorial

Session 1

Making contact with UNIX

To use the editor you must first make contact with the computer by logging in to UNIX . We'll quickly review the standard UNIX login procedure for the two ways you can make contact: on a terminal that is directly linked to the computer, or over a telephone line where the computer answers your call.

Directly-linked terminals

Turn on your terminal and press the RETURN key. You are now ready to login.

Dial-up terminals

If your terminal connects with the computer over a telephone line, turn on the terminal, dial the system access number, and, when you hear a high-pitched tone, place the telephone handset in the acoustic coupler, if you are using one. You are now ready to login.

Logging in

The message inviting you to login is:

          login:

Type your login name, which identifies you to UNIX , on the same line as the login message, and press RETURN . If the terminal you are using has both upper and lower case, be sure you enter your login name in lower case; otherwise UNIX assumes your terminal has only upper case and will not recognize lower case letters you may type. UNIX types ``login:'' and you reply with your login name, for example ``susan'':

          login: susan (and press the RETURN key)

(In the examples, input you would type appears in bold face to distinguish it from the responses from UNIX .)

UNIX will next respond with a request for a password as an additional precaution to prevent unauthorized people from using your account. The password will not appear when you type it, to prevent others from seeing it. The message is:

          Password:    (type your password and press RETURN)

If any of the information you gave during the login sequence was mistyped or incorrect, UNIX will respond with

          Login incorrect.

          login:

in which case you should start the login process anew. Assuming that you have successfully logged in, UNIX will print the message of the day and eventually will present you with a % at the beginning of a fresh line. The % is the UNIX prompt symbol which tells you that UNIX is ready to accept a command.

Asking for e ed di it t

You are ready to tell UNIX that you want to work with edit, the text editor. Now is a convenient time to choose a name for the file of text you are about to create. To begin your editing session, type edit followed by a space and then the filename you have selected; for example, ``text''. After that, press the RETURN key and wait for edit's response:

          % edit text    (followed by a RETURN)
          "text" No such file or directory
          :

If you typed the command correctly, you will now be in communication with edit. Edit has set aside a buffer for use as a temporary working space during your current editing session. Since ``text'' is a new file we are about to create the editor was unable to find that file, which it confirms by saying:

          "text" No such file or directory

On the next line appears edit's prompt ``:'', announcing that you are in command mode and edit expects a command from you. You may now begin to create the new file.

The ``Command not found'' message

If you misspelled edit by typing, say, ``editor'', this might appear:

          % editor
          editor: Command not found
          %

Your mistake in calling edit ``editor'' was treated by UNIX as a request for a program named ``editor''. Since there is no program named ``editor'', UNIX reported that the program was ``not found''. A new % indicates that UNIX is ready for another command, and you may then enter the correct command.

A summary

Your exchange with UNIX as you logged in and made contact with edit should look something like this:

          login: susan
          Password:
          ... A Message of General Interest ...
          % edit text
          "text" No such file or directory
          :

Entering text

You may now begin entering text into the buffer. This is done by appending (or adding) text to whatever is currently in the buffer. Since there is nothing in the buffer at the moment, you are appending text to nothing; in effect, since you are adding text to nothing you are creating text. Most edit commands have two equivalent forms: a word that suggests what the command does, and a shorter abbreviation of that word. Many beginners find the full command names easier to remember at first, but once you are familiar with editing you may prefer to type the shorter abbreviations. The command to input text is ``append''. (It may be abbreviated ``a''.) Type append and press the RETURN key.

          % edit text
          :append

Messages from e ed di it t

If you make a mistake in entering a command and type something that edit does not recognize, edit will respond with a message intended to help you diagnose your error. For example, if you misspell the command to input text by typing, perhaps, ``add'' instead of ``append'' or ``a'', you will receive this message:

          :add
          add: Not an editor command
          :

When you receive a diagnostic message, check what you typed in order to determine what part of your command confused edit. The message above means that edit was unable to recognize your mistyped command and, therefore, did not execute it. Instead, a new ``:'' appeared to let you know that edit is again ready to execute a command.

Text input mode

By giving the command ``append'' (or using the abbreviation ``a''), you entered text input mode, also known as append mode. When you enter text input mode, edit stops sending you a prompt. You will not receive any prompts or error messages while in text input mode. You can enter pretty much anything you want on the lines. The lines are transmitted one by one to the buffer and held there during the editing session. You may append as much text as you want, and when you wish to stop entering text lines you should type a period as the only character on the line and press the RETURN key. When you type the period and press RETURN , you signal that you want to stop appending text, and edit responds by allowing you to exit text input mode and reenter command mode. Edit will again prompt you for a command by printing ``:''.

Leaving append mode does not destroy the text in the buffer. You have to leave append mode to do any of the other kinds of editing, such as changing, adding, or printing text. If you type a period as the first character and type any other character on the same line, edit will believe you want to remain in append mode and will not let you out. As this can be very frustrating, be sure to type only the period and the RETURN key.

This is a good place to learn an important lesson about computers and text: a blank space is a character as far as a computer is concerned. If you so much as type a period followed by a blank (that is, type a period and then the space bar on the keyboard), you will remain in append mode with the last line of text being:


          .

Let's say that you enter the lines (try to type exactly what you see, including ``thiss''):

          This is some sample text.
          And thiss is some more text.
          Text editing is strange, but nice.
          .

The last line is the period followed by a RETURN that gets you out of append mode.

Making corrections

If you have read a general introduction to UNIX , you will recall that it is possible to erase individual letters that you have typed. This is done by typing the designated erase character as many times as there are characters you want to erase.

The usual erase character varies from place to place and user to user. Often it is the backspace (control-H), so you can correct typing errors in the line you are typing by holding down the CTRL key and typing the ``H'' key. (Sometimes it is the DEL key.) If you type the erase character you will notice that the terminal backspaces in the line you are on. You can backspace over your error, and then type what you want to be the rest of the line.

If you make a bad start in a line and would like to begin again, you can either backspace to the beginning of the line or you can use the at-sign ``@'' to erase everything on the line:

          Text edtiing is strange, but@
          Text editing is strange, but nice.

When you type the at-sign (@), you erase the entire line typed so far and are given a fresh line to type on. You may immediately begin to retype the line. This, unfortunately, does not work after you type the line and press RETURN . To make corrections in lines that have been completed, it is necessary to use the editing commands covered in the next sessions.

Writing text to disk

You are now ready to edit the text. One common operation is to write the text to disk as a file for safekeeping after the session is over. This is the only way to save information from one session to the next, since the editor's buffer is temporary and will last only until the end of the editing session. Learning how to write a file to disk is second in importance only to entering the text. To write the contents of the buffer to a disk file, use the command ``write'' (or its abbreviation ``w''):

          :write

Edit will copy the contents of the buffer to a disk file. If the file does not yet exist, a new file will be created automatically and the presence of a ``[New file]'' will be noted. The newly-created file will be given the name specified when you entered the editor, in this case ``text''. To confirm that the disk file has been successfully written, edit will repeat the filename and give the number of lines and the total number of characters in the file. The buffer remains unchanged by the ``write'' command. All of the lines that were written to disk will still be in the buffer, should you want to modify or add to them.

Edit must have a name for the file to be written. If you forgot to indicate the name of the file when you began to edit, edit will print in response to your write command:

          No current filename

If this happens, you can specify the filename in a new write command:

          :write text

After the ``write'' (or ``w''), type a space and then the name of the file.

Signing off

We have done enough for this first lesson on using the UNIX text editor, and are ready to quit the session with edit. To do this we type ``quit'' (or ``q'') and press RETURN :

          :write
          "text" [New file]  3 lines, 90 characters
          :quit
          %

The % is from UNIX to tell you that your session with edit is over and you may command UNIX further. Since we want to end the entire session at the terminal, we also need to exit from UNIX . In response to the UNIX prompt of ``%'' type the command

          %logout

This will end your session with UNIX , and will ready the terminal for the next user. It is always important to type logout at the end of a session to make absolutely sure no one could accidentally stumble into your abandoned session and thus gain access to your files, tempting even the most honest of souls.

This is the end of the first session on UNIX text editing.

Edit: A Tutorial USD:11-5

Session 2

Login with UNIX as in the first session:

          login: susan  (carriage return)
          Password:       (give password and carriage return)

          ... A Message of General Interest ...
          %

When you indicate you want to edit, you can specify the name of the file you worked on last time. This will start edit working, and it will fetch the contents of the file into the buffer, so that you can resume editing the same file. When edit has copied the file into the buffer, it will repeat its name and tell you the number of lines and characters it contains. Thus,

          % edit text
          "text" 3 lines, 90 characters
          :

means you asked edit to fetch the file named ``text'' for editing, causing it to copy the 90 characters of text into the buffer. Edit awaits your further instructions, and indicates this by its prompt character, the colon (:). In this session, we will append more text to our file, print the contents of the buffer, and learn to change the text of a line.

Adding more text to the file

If you want to add more to the end of your text you may do so by using the append command to enter text input mode. When ``append'' is the first command of your editing session, the lines you enter are placed at the end of the buffer. Here we'll use the abbreviation for the append command, ``a'':

          :a
          This is text added in Session 2.
          It doesn't mean much here, but
          it does illustrate the editor.
          .

You may recall that once you enter append mode using the ``a'' (or ``append'') command, you need to type a line containing only a period (.) to exit append mode.

Interrupt

Should you press the RUB key (sometimes labelled DELETE ) while working with edit, it will send this message to you:

          Interrupt
          :

Any command that edit might be executing is terminated by rub or delete, causing edit to prompt you for a new command. If you are appending text at the time, you will exit from append mode and be expected to give another command. The line of text you were typing when the append command was interrupted will not be entered into the buffer.

Making corrections

If while typing the line you hit an incorrect key, recall that you may delete the incorrect character or cancel the entire line of input by erasing in the usual way. Refer either to the last few pages of Session 1 if you need to review the procedures for making a correction. The most important idea to remember is that erasing a character or cancelling a line must be done before you press the RETURN key.

Listing what's in the buffer (p)

Having appended text to what you wrote in Session 1, you might want to see all the lines in the buffer. To print the contents of the buffer, type the command:

          :1,$p

The ``1''

stands for line 1 of the buffer, the ``$'' is a special symbol designating the last line of the buffer, and ``p'' (or print) is the command to print from line 1 to the end of the buffer. The command ``1,$p'' gives you:

          This is some sample text.
          And thiss is some more text.
          Text editing is strange, but nice.
          This is text added in Session 2.
          It doesn't mean much here, but
          it does illustrate the editor.

Occasionally, you may accidentally type a character that can't be printed, which can be done by striking a key while the CTRL key is pressed. In printing lines, edit uses a special notation to show the existence of non-printing characters. Suppose you had introduced the non-printing character ``control-A'' into the word ``illustrate'' by accidently pressing the CTRL key while typing ``a''. This can happen on many terminals because the CTRL key and the ``A'' key are beside each other. If your finger presses between the two keys, control-A results. When asked to print the contents of the buffer, edit would display

          it does illustr^Ate the editor.

To represent the control-A, edit shows ``^A''. The sequence ``^'' followed by a capital letter stands for the one character entered by holding down the CTRL key and typing the letter which appears after the ``^''. We'll soon discuss the commands that can be used to correct this typing error.

In looking over the text we see that ``this'' is typed as ``thiss'' in the second line, a deliberate error so we can learn to make corrections. Let's correct the spelling.

Finding things in the buffer

In order to change something in the buffer we first need to find it. We can find ``thiss'' in the text we have entered by looking at a listing of the lines. Physically speaking, we search the lines of text looking for ``thiss'' and stop searching when we have found it. The way to tell edit to search for something is to type it inside slash marks:

          :/thiss/

By typing /thiss/ and pressing RETURN , you instruct edit to search for ``thiss''. If you ask edit to look for a pattern of characters which it cannot find in the buffer, it will respond ``Pattern not found''. When edit finds the characters ``thiss'', it will print the line of text for your inspection:

          And thiss is some more text.

Edit is now positioned in the buffer at the line it just printed, ready to make a change in the line.

USD:11-6 Edit: A Tutorial

The current line

Edit keeps track of the line in the buffer where it is located at all times during an editing session. In general, the line that has been most recently printed, entered, or changed is the current location in the buffer. The editor is prepared to make changes at the current location in the buffer, unless you direct it to another location.

In particular, when you bring a file into the buffer, you will be located at the last line in the file, where the editor left off copying the lines from the file to the buffer. If your first editing command is ``append'', the lines you enter are added to the end of the file, after the current line -- the last line in the file.

You can refer to your current location in the buffer by the symbol period (.) usually known by the name ``dot''. If you type ``.'' and carriage return you will be instructing edit to print the current line:

          :.
          And thiss is some more text.

If you want to know the number of the current line, you can type .= and press RETURN , and edit will respond with the line number:

          :.=
          2

If you type the number of any line and press RETURN , edit will position you at that line and print its contents:

          :2
          And thiss is some more text.

You should experiment with these commands to gain experience in using them to make changes.

Numbering lines (nu)

The number (nu) command is similar to print, giving both the number and the text of each printed line. To see the number and the text of the current line type

          :nu
               2  And thiss is some more text.

Note that the shortest abbreviation for the number command is ``nu'' (and not ``n'', which is used for a different command). You may specify a range of lines to be listed by the number command in the same way that lines are specified for print. For example, 1,$nu lists all lines in the buffer with their corresponding line numbers.

Substitute command (s)

Now that you have found the misspelled word, you can change it from ``thiss'' to ``this''. As far as edit is concerned, changing things is a matter of substituting one thing for another. As a stood for append, so s stands for substitute. We will use the abbreviation ``s'' to reduce the chance of mistyping the substitute command. This command will instruct edit to make the change:

          2s/thiss/this/

We first indicate the line to be changed, line 2, and then type an ``s'' to indicate we want edit to make a substitution. Inside the first set of slashes are the characters that we want to change, followed by the characters to replace them, and then a closing slash mark. To summarize:

          2s/ what is to be changed / what to change it to /

If edit finds an exact match of the characters to be changed it will make the change only in the first occurrence of the characters. If it does not find the characters to be changed, it will respond:

          Substitute pattern match failed

indicating that your instructions could not be carried out. When edit does find the characters that you want to change, it will make the substitution and automatically print the changed line, so that you can check that the correct substitution was made. In the example,

          :2s/thiss/this/
          And this is some more text.

line 2 (and line 2 only) will be searched for the characters ``thiss'', and when the first exact match is found, ``thiss'' will be changed to ``this''. Strictly speaking, it was not necessary above to specify the number of the line to be changed. In

          :s/thiss/this/

edit will assume that we mean to change the line where we are currently located (``.''). In this case, the command without a line number would have produced the same result because we were already located at the line we wished to change.

For another illustration of the substitute command, let us choose the line:

          Text editing is strange, but nice.

You can make this line a bit more positive by taking out the characters ``strange, but '' so the line reads:

          Text editing is nice.

A command that will first position edit at the desired line and then make the substitution is:

          :/strange/s/strange, but //

What we have done here is combine our search with our substitution. Such combinations are perfectly legal, and speed up editing quite a bit once you get used to them. That is, you do not necessarily have to use line numbers to identify a line to edit. Instead, you may identify the line you want to change by asking edit to search for a specified pattern of letters that occurs in that line. The parts of the above command are:

You should note the space after ``but'' in ``/strange, but /''. If you do not indicate that the space is to be taken out, your line will read:

          Text editing is   nice.

which looks a little funny because of the extra space between ``is'' and ``nice''. Again, we realize from this that a blank space is a real character to a computer, and in editing text we need to be aware of spaces within a line just as we would be aware of an ``a'' or a ``4''.

Another way to list what's in the buffer (z)

Although the print command is useful for looking at specific lines in the buffer, other commands may be more convenient for viewing large sections of text. You can ask to see a screen full of text at a time by using the command z. If you type

          :1z

edit will start with line 1 and continue printing lines, stopping either when the screen of your terminal is full or when the last line in the buffer has been printed. If you want to read the next segment of text, type the command

          :z

If no starting line number is given for the z command, printing will start at the ``current'' line, in this case the last line printed. Viewing lines in the buffer one screen full at a time is known as paging. Paging can also be used to print a section of text on a hard-copy terminal.

Saving the modified text

This seems to be a good place to pause in our work, and so we should end the second session. If you (in haste) type ``q'' to quit the session your dialogue with edit will be:

          :q
          No write since last change (:quit! overrides)
          :

This is edit's warning that you have not written the modified contents of the buffer to disk. You run the risk of losing the work you did during the editing session since you typed the latest write command. Because in this lesson we have not written to disk at all, everything we have done would have been lost if edit had obeyed the q command. If you did not want to save the work done during this editing session, you would have to type ``q!'' or (``quit!'') to confirm that you indeed wanted to end the session immediately, leaving the file as it was after the most recent ``write'' command. However, since you want to save what you have edited, you need to type:

          :w
          "text" 6 lines, 171 characters

and then follow with the commands to quit and logout:

          :q
          % logout

and hang up the phone or turn off the terminal when UNIX asks for a name. Terminals connected to the port selector will stop after the logout command, and pressing keys on the keyboard will do nothing.

This is the end of the second session on UNIX text editing.

Edit: A Tutorial USD:11-7

Session 3

Bringing text into the buffer (e)

Login to UNIX and make contact with edit. You should try to login without looking at the notes, but if you must then by all means do.

Did you remember to give the name of the file you wanted to edit? That is, did you type

          % edit text

or simply

          % edit

Both ways get you in contact with edit, but the first way will bring a copy of the file named ``text'' into the buffer. If you did forget to tell edit the name of your file, you can get it into the buffer by typing:

          :e text
          "text" 6 lines, 171 characters

The command edit, which may be abbreviated e, tells edit that you want to erase anything that might already be in the buffer and bring a copy of the file ``text'' into the buffer for editing. You may also use the edit (e) command to change files in the middle of an editing session, or to give edit the name of a new file that you want to create. Because the edit command clears the buffer, you will receive a warning if you try to edit a new file without having saved a copy of the old file. This gives you a chance to write the contents of the buffer to disk before editing the next file.

Moving text in the buffer (m)

Edit allows you to move lines of text from one location in the buffer to another by means of the move (m) command. The first two examples are for illustration only, though after you have read this Session you are welcome to return to them for practice. The command

          :2,4m$

directs edit to move lines 2, 3, and 4 to the end of the buffer ($). The format for the move command is that you specify the first line to be moved, the last line to be moved, the move command ``m'', and the line after which the moved text is to be placed. So,

          :1,3m6

would instruct edit to move lines 1 through 3 (inclusive) to a location after line 6 in the buffer. To move only one line, say, line 4, to a location in the buffer after line 5, the command would be ``4m5''.

Let's move some text using the command:

          :5,$m1
          2 lines moved
          it does illustrate the editor.

After executing a command that moves more than one line of the buffer, edit tells how many lines were affected by the move and prints the last moved line for your inspection. If you want to see more than just the last line, you can then use the print (p), z, or number (nu) command to view more text. The buffer should now contain:

          This is some sample text.
          It doesn't mean much here, but
          it does illustrate the editor.
          And this is some more text.
          Text editing is nice.
          This is text added in Session 2.

You can restore the original order by typing:

          :4,$m1

or, combining context searching and the move command:

          :/And this is some/,/This is text/m/This is some sample/

(Do not type both examples here!) The problem with combining context searching with the move command is that your chance of making a typing error in such a long command is greater than if you type line numbers.

Copying lines (copy)

The copy command is used to make a second copy of specified lines, leaving the original lines where they were. Copy has the same format as the move command, for example:

          :2,5copy $

makes a copy of lines 2 through 5, placing the added lines after the buffer's end ($). Experiment with the copy command so that you can become familiar with how it works. Note that the shortest abbreviation for copy is co (and not the letter ``c'', which has another meaning).

Deleting lines (d)

Suppose you want to delete the line

          This is text added in Session 2.

from the buffer. If you know the number of the line to be deleted, you can type that number followed by delete or d. This example deletes line 4, which is ``This is text added in Session 2.'' if you typed the commands suggested so far.

          :4d
          It doesn't mean much here, but

Here ``4'' is the number of the line to be deleted, and ``delete'' or ``d'' is the command to delete the line. After executing the delete command, edit prints the line that has become the current line (``.'').

If you do not happen to know the line number you can search for the line and then delete it using this sequence of commands:

          :/added in Session 2./
          This is text added in Session 2.
          :d
          It doesn't mean much here, but

The ``/added in Session 2./'' asks edit to locate and print the line containing the indicated text, starting its search at the current line and moving line by line until it finds the text. Once you are sure that you have correctly specified the line you want to delete, you can enter the delete (d) command. In this case it is not necessary to specify a line number before the ``d''. If no line number is given, edit deletes the current line (``.''), that is, the line found by our search. After the deletion, your buffer should contain:

          This is some sample text.
          And this is some more text.
          Text editing is nice.
          It doesn't mean much here, but
          it does illustrate the editor.
          And this is some more text.
          Text editing is nice.
          This is text added in Session 2.
          It doesn't mean much here, but

To delete both lines 2 and 3:

          And this is some more text.
          Text editing is nice.

you type

          :2,3d
          2 lines deleted

which specifies the range of lines from 2 to 3, and the operation on those lines -- ``d'' for delete. If you delete more than one line you will receive a message telling you the number of lines deleted, as indicated in the example above.

The previous example assumes that you know the line numbers for the lines to be deleted. If you do not you might combine the search command with the delete command:

          :/And this is some/,/Text editing is nice./d

A word or two of caution

In using the search function to locate lines to be deleted you should be absolutely sure the characters you give as the basis for the search will take edit to the line you want deleted. Edit will search for the first occurrence of the characters starting from where you last edited - that is, from the line you see printed if you type dot (.).

A search based on too few characters may result in the wrong lines being deleted, which edit will do as easily as if you had meant it. For this reason, it is usually safer to specify the search and then delete in two separate steps, at least until you become familiar enough with using the editor that you understand how best to specify searches. For a beginner it is not a bad idea to double-check each command before pressing RETURN to send the command on its way.

Undo (u) to the rescue

The undo (u) command has the ability to reverse the effects of the last command that changed the buffer. To undo the previous command, type ``u'' or ``undo''. Undo can rescue the contents of the buffer from many an unfortunate mistake. However, its powers are not unlimited, so it is still wise to be reasonably careful about the commands you give.

It is possible to undo only commands which have the power to change the buffer -- for example, delete, append, move, copy, substitute, and even undo itself. The commands write (w) and edit (e), which interact with disk files, cannot be undone, nor can commands that do not change the buffer, such as print. Most importantly, the only command that can be reversed by undo is the last ``undo-able'' command you typed. You can use control-H and @ to change commands while you are typing them, and undo to reverse the effect of the commands after you have typed them and pressed RETURN .

To illustrate, let's issue an undo command. Recall that the last buffer-changing command we gave deleted the lines formerly numbered 2 and 3. Typing undo at this moment will reverse the effects of the deletion, causing those two lines to be replaced in the buffer.

          :u
          2 more lines in file after undo
          And this is some more text.

Here again, edit informs you if the command affects more than one line, and prints the text of the line which is now ``dot'' (the current line).

More about the dot (.) and buffer end ($)

The function assumed by the symbol dot depends on its context. It can be used:

1. to exit from append mode; we type dot (and only a dot) on a line and press RETURN ;
2. to refer to the line we are at in the buffer.

Dot can also be combined with the equal sign to get the number of the line currently being edited:

          :.=

If we type ``.='' we are asking for the number of the line, and if we type ``.'' we are asking for the text of the line.

In this editing session and the last, we used the dollar sign to indicate the end of the buffer in commands such as print, copy, and move. The dollar sign as a command asks edit to print the last line in the buffer. If the dollar sign is combined with the equal sign ($=) edit will print the line number corresponding to the last line in the buffer.

``.'' and ``$'', then, represent line numbers. Whenever appropriate, these symbols can be used in place of line numbers in commands. For example

          :.,$d

instructs edit to delete all lines from the current line (.) to the end of the buffer.

Moving around in the buffer (+ and -)

When you are editing you often want to go back and re-read a previous line. You could specify a context search for a line you want to read if you remember some of its text, but if you simply want to see what was written a few, say 3, lines ago, you can type

          -3p

This tells edit to move back to a position 3 lines before the current line (.) and print that line. You can move forward in the buffer similarly:

          +2p

instructs edit to print the line that is 2 ahead of your current position.

You may use ``+'' and ``-'' in any command where edit accepts line numbers. Line numbers specified with ``+'' or ``-'' can be combined to print a range of lines. The command

          :-1,+2copy$

makes a copy of 4 lines: the current line, the line before it, and the two after it. The copied lines will be placed after the last line in the buffer ($), and the original lines referred to by ``-1'' and ``+2'' remain where they are.

Try typing only ``-''; you will move back one line just as if you had typed ``-1p''. Typing the command ``+'' works similarly. You might also try typing a few plus or minus signs in a row (such as ``+++'') to see edit's response. Typing RETURN alone on a line is the equivalent of typing ``+1p''; it will move you one line ahead in the buffer and print that line.

If you are at the last line of the buffer and try to move further ahead, perhaps by typing a ``+'' or a carriage return alone on the line, edit will remind you that you are at the end of the buffer:

          At end-of-file

or

          Not that many lines in buffer

Similarly, if you try to move to a position before the first line, edit will print one of these messages:

          Nonzero address required on this command

or

          Negative address - first buffer line is 1

The number associated with a buffer line is the line's ``address'', in that it can be used to locate the line.

Changing lines (c)

You can also delete certain lines and insert new text in their place. This can be accomplished easily with the change (c) command. The change command instructs edit to delete specified lines and then switch to text input mode to accept the text that will replace them. Let's say you want to change the first two lines in the buffer:

          This is some sample text.
          And this is some more text.

to read

          This text was created with the UNIX text editor.

To do so, you type:

          :1,2c
          2 lines changed
          This text was created with the UNIX text editor.
          .
          :

In the command 1,2c we specify that we want to change the range of lines beginning with 1 and ending with 2 by giving line numbers as with the print command. These lines will be deleted. After you type RETURN to end the change command, edit notifies you if more than one line will be changed and places you in text input mode. Any text typed on the following lines will be inserted into the position where lines were deleted by the change command. You will remain in text input mode until you exit in the usual way, by typing a period alone on a line. Note that the number of lines added to the buffer need not be the same as the number of lines deleted.

This is the end of the third session on text editing with UNIX .

USD:11-8 Edit: A Tutorial

Session 4

This lesson covers several topics, starting with commands that apply throughout the buffer, characters with special meanings, and how to issue UNIX commands while in the editor. The next topics deal with files: more on reading and writing, and methods of recovering files lost in a crash. The final section suggests sources of further information.

Making commands global (g)

One disadvantage to the commands we have used for searching or substituting is that if you have a number of instances of a word to change it appears that you have to type the command repeatedly, once for each time the change needs to be made. Edit, however, provides a way to make commands apply to the entire contents of the buffer - the global (g) command.

To print all lines containing a certain sequence of characters (say, ``text'') the command is:

          :g/text/p

The ``g'' instructs edit to make a global search for all lines in the buffer containing the characters ``text''. The ``p'' prints the lines found.

To issue a global command, start by typing a ``g'' and then a search pattern identifying the lines to be affected. Then, on the same line, type the command to be executed for the identified lines. Global substitutions are frequently useful. For example, to change all instances of the word ``text'' to the word ``material'' the command would be a combination of the global search and the substitute command:

          :g/text/s/text/material/g

Note the ``g'' at the end of the global command, which instructs edit to change each and every instance of ``text'' to ``material''. If you do not type the ``g'' at the end of the command only the first instance of ``text'' in each line will be changed (the normal result of the substitute command). The ``g'' at the end of the command is independent of the ``g'' at the beginning. You may give a command such as:

          :5s/text/material/g

to change every instance of ``text'' in line 5 alone. Further, neither command will change ``text'' to ``material'' if ``Text'' begins with a capital rather than a lower-case t.

Edit does not automatically print the lines modified by a global command. If you want the lines to be printed, type a ``p'' at the end of the global command:

          :g/text/s/text/material/gp

You should be careful about using the global command in combination with any other - in essence, be sure of what you are telling edit to do to the entire buffer. For example,

          :g/ /d
          72 less lines in file after global

will delete every line containing a blank anywhere in it. This could adversely affect your document, since most lines have spaces between words and thus would be deleted. After executing the global command, edit will print a warning if the command added or deleted more than one line. Fortunately, the undo command can reverse the effects of a global command. You should experiment with the global command on a small file of text to see what it can do for you.

More about searching and substituting

In using slashes to identify a character string that we want to search for or change, we have always specified the exact characters. There is a less tedious way to repeat the same string of characters. To change ``text'' to ``texts'' we may type either

          :/text/s/text/texts/

as we have done in the past, or a somewhat abbreviated command:

          :/text/s//texts/

In this example, the characters to be changed are not specified - there are no characters, not even a space, between the two slash marks that indicate what is to be changed. This lack of characters between the slashes is taken by the editor to mean ``use the characters we last searched for as the characters to be changed.''

Similarly, the last context search may be repeated by typing a pair of slashes with nothing between them:

          :/does/
          It doesn't mean much here, but
          ://
          it does illustrate the editor.

(You should note that the search command found the characters ``does'' in the word ``doesn't'' in the first search request.) Because no characters are specified for the second search, the editor scans the buffer for the next occurrence of the characters ``does''.

Edit normally searches forward through the buffer, wrapping around from the end of the buffer to the beginning, until the specified character string is found. If you want to search in the reverse direction, use question marks (?) instead of slashes to surround the characters you are searching for.

It is also possible to repeat the last substitution without having to retype the entire command. An ampersand (&) used as a command repeats the most recent substitute command, using the same search and replacement patterns. After altering the current line by typing

          :s/text/texts/

you type

          :/text/&

or simply

          ://&

to make the same change on the next line in the buffer containing the characters ``text''.

Special characters

Two characters have special meanings when used in specifying searches: ``$'' and ``^''. ``$'' is taken by the editor to mean ``end of the line'' and is used to identify strings that occur at the end of a line.

          :g/text.$/s//material./p

tells the editor to search for all lines ending in ``text.'' (and nothing else, not even a blank space), to change each final ``text.'' to ``material.'', and print the changed lines.

The symbol ``^'' indicates the beginning of a line. Thus,

          :s/^/1. /

instructs the editor to insert ``1.'' and a space at the beginning of the current line.

The characters ``$'' and ``^'' have special meanings only in the context of searching. At other times, they are ordinary characters. If you ever need to search for a character that has a special meaning, you must indicate that the character is to lose temporarily its special significance by typing another special character, the backslash (), before it.

          :s/\$/dollar/

looks for the character ``$'' in the current line and replaces it by the word ``dollar''. Were it not for the backslash, the ``$'' would have represented ``the end of the line'' in your search rather than the character ``$''. The backslash retains its special significance unless it is preceded by another backslash.

Issuing UNIX commands from the editor

After creating several files with the editor, you may want to delete files no longer useful to you or ask for a list of your files. Removing and listing files are not functions of the editor, and so they require the use of UNIX system commands (also referred to as ``shell'' commands, as ``shell'' is the name of the program that processes UNIX commands). You do not need to quit the editor to execute a UNIX command as long as you indicate that it is to be sent to the shell for execution. To use the UNIX command rm to remove the file named ``junk'' type:

          :!rm junk
          !
          :

The exclamation mark (!) indicates that the rest of the line is to be processed as a shell command. If the buffer contents have not been written since the last change, a warning will be printed before the command is executed:

          [No write since last change]

The editor prints a ``!'' when the command is completed. Other tutorials describe useful features of the system, of which an editor is only one part.

Filenames and file manipulation

Throughout each editing session, edit keeps track of the name of the file being edited as the current filename. Edit remembers as the current filename the name given when you entered the editor. The current filename changes whenever the edit (e) command is used to specify a new file. Once edit has recorded a current filename, it inserts that name into any command where a filename has been omitted. If a write command does not specify a file, edit, as we have seen, supplies the current filename. If you are editing a file named ``draft3'' having 283 lines in it, you can have the editor write onto a different file by including its name in the write command:

          :w chapter3
          "chapter3" [new file] 283 lines, 8698 characters

The current filename remembered by the editor will not be changed as a result of the write command. Thus, if the next write command does not specify a name, edit will write onto the current file (``draft3'') and not onto the file ``chapter3''.

The file (f) command

To ask for the current filename, type file (or f). In response, the editor provides current information about the buffer, including the filename, your current position, the number of lines in the buffer, and the percent of the distance through the file your current location is.

          :f
          "text" [Modified] line 3 of 4 --75%--

If the contents of the buffer have changed since the last time the file was written, the editor will tell you that the file has been ``[Modified]''. After you save the changes by writing onto a disk file, the buffer will no longer be considered modified:

          :w
          "text" 4 lines, 88 characters
          :f
          "text" line 3 of 4 --75%--

Reading additional files (r)

The read (r) command allows you to add the contents of a file to the buffer at a specified location, essentially copying new lines between two existing lines. To use it, specify the line after which the new text will be placed, the read (r) command, and then the name of the file. If you have a file named ``example'', the command

          :$r example
          "example" 18 lines, 473 characters

reads the file ``example'' and adds it to the buffer after the last line. The current filename is not changed by the read command.

Writing parts of the buffer

The write (w) command can write all or part of the buffer to a file you specify. We are already familiar with writing the entire contents of the buffer to a disk file. To write only part of the buffer onto a file, indicate the beginning and ending lines before the write command, for example

          :45,$w ending

Here all lines from 45 through the end of the buffer are written onto the file named ending. The lines remain in the buffer as part of the document you are editing, and you may continue to edit the entire buffer. Your original file is unaffected by your command to write part of the buffer to another file. Edit still remembers whether you have saved changes to the buffer in your original file or not.

Recovering files

Although it does not happen very often, there are times UNIX stops working because of some malfunction. This situation is known as a crash. Under most circumstances, edit's crash recovery feature is able to save work to within a few lines of changes before a crash (or an accidental phone hang up). If you lose the contents of an editing buffer in a system crash, you will normally receive mail when you login that gives the name of the recovered file. To recover the file, enter the editor and type the command recover (rec), followed by the name of the lost file. For example, to recover the buffer for an edit session involving the file ``chap6'', the command is:

          :recover chap6

Recover is sometimes unable to save the entire buffer successfully, so always check the contents of the saved buffer carefully before writing it back onto the original file. For best results, write the buffer to a new file temporarily so you can examine it without risk to the original file. Unfortunately, you cannot use the recover command to retrieve a file you removed using the shell command rm.

Other recovery techniques

If something goes wrong when you are using the editor, it may be possible to save your work by using the command preserve (pre), which saves the buffer as if the system had crashed. If you are writing a file and you get the message ``Quota exceeded'', you have tried to use more disk storage than is allotted to your account. Proceed with caution because it is likely that only a part of the editor's buffer is now present in the file you tried to write. In this case you should use the shell escape from the editor (!) to remove some files you don't need and try to write the file again. If this is not possible and you cannot find someone to help you, enter the command

          :preserve

and wait for the reply,

          File preserved.

If you do not receive this reply, seek help immediately. Do not simply leave the editor. If you do, the buffer will be lost, and you may not be able to save your file. If the reply is ``File preserved.'' you can leave the editor (or logout) to remedy the situation. After a preserve, you can use the recover command once the problem has been corrected, or the -r option of the edit command if you leave the editor and want to return.

If you make an undesirable change to the buffer and type a write command before discovering your mistake, the modified version will replace any previous version of the file. Should you ever lose a good version of a document in this way, do not panic and leave the editor. As long as you stay in the editor, the contents of the buffer remain accessible. Depending on the nature of the problem, it may be possible to restore the buffer to a more complete state with the undo command. After fixing the damaged buffer, you can again write the file to disk.

Further reading and other information

Edit is an editor designed for beginning and casual users. It is actually a version of a more powerful editor called ex. These lessons are intended to introduce you to the editor and its more commonly-used commands. We have not covered all of the editor's commands, but a selection of commands that should be sufficient to accomplish most of your editing tasks. You can find out more about the editor in the Ex Reference Manual, which is applicable to both ex and edit. One way to become familiar with the manual is to begin by reading the description of commands that you already know.

Using e ex x

As you become more experienced with using the editor, you may still find that edit continues to meet your needs. However, should you become interested in using ex, it is easy to switch. To begin an editing session with ex, use the name ex in your command instead of edit.

Edit commands also work in ex, but the editing environment is somewhat different. You should be aware of a few differences between ex and edit. In edit, only the characters ``^'', ``$'', and ``'' have special meanings in searching the buffer or indicating characters to be changed by a substitute command. Several additional characters have special meanings in ex, as described in the Ex Reference Manual. Another feature of the edit environment prevents users from accidently entering two alternative modes of editing, open and visual, in which the editor behaves quite differently from normal command mode. If you are using ex and you encounter strange behavior, you may have accidently entered open mode by typing ``o''. Type the ESC key and then a ``Q'' to get out of open or visual mode and back into the regular editor command mode. The document An Introduction to Display Editing with Vi provide full details of visual mode.

Edit: A Tutorial USD:11-9

Index

addressing, see line numbers
ampersand, 20
append mode, 6-7
append (a) command, 6, 7, 9
``At end of file'' (message), 18
backslash (), 21
buffer, 3
caret (^), 10, 20
change (c) command, 18
command mode, 5-6
``Command not found'' (message), 6
context search, 10-12, 19-21
control characters (``^'' notation), 10
control-H, 7
copy (co) command, 15
corrections, 7, 16
current filename, 21
current line (.), 11, 17
delete (d) command, 15-16
dial-up, 5
disk, 3
documentation, 3, 23
dollar ($), 10, 11, 17, 20-21
dot (.) 11, 17
edit (text editor), 3, 5, 23
edit (e) command, 5, 9, 14
editing commands:

  append (a), 6, 7, 9
  change (c), 18
  copy (co), 15
  delete (d), 15-16
  edit (text editor), 3, 5, 23
  edit (e), 5, 9, 14
  file (f), 21-22
  global (g), 19
  move (m), 14-15
  number (nu), 11
  preserve (pre), 22-23
  print (p), 10
  quit (q), 8, 13
  read (r), 22
  recover (rec), 22, 23
  substitute (s), 11-12, 19, 20
  undo (u), 16-17, 23
  write (w), 8, 13, 21, 22
  z, 12-13
  ! (shell escape), 21
  $=, 17
  +, 17
  -, 17
  //, 12, 20
  ??, 20
  ., 11, 17
  .=, 11, 17

entering text, 3, 6-7
erasing

  characters (^H), 7
  lines (@), 7

error corrections, 7, 16
ex (text editor), 23
Ex Reference Manual, 23
exclamation (!), 21
file, 3
file (f) command, 21-22
file recovery, 22-23
filename, 3, 21
global (g) command, 19
input mode, 6-7
Interrupt (message), 9
line numbers, see also current line

  dollar sign ($), 10, 11, 17
  dot (.), 11, 17
  relative (+ and -), 17

list, 10
logging in, 4-6
logging out, 8
``Login incorrect'' (message), 5
minus (-), 17
move (m) command, 14-15
``Negative address--first buffer line is 1'' (message), 18
``No current filename'' (message), 8
``No such file or directory'' (message), 5, 6
``No write since last change'' (message), 21
non-printing characters, 10
``Nonzero address required'' (message), 18
``Not an editor command'' (message), 6
``Not that many lines in buffer'' (message), 18
number (nu) command, 11
password, 5
period (.), 11, 17
plus (+), 17
preserve (pre) command, 22-23
print (p) command, 10
program, 3
prompts

  % (UNIX), 5
  : (edit), 5, 6, 7
    (append), 7

question (?), 20
quit (q) command, 8, 13
read (r) command, 22
recover (rec) command, 22, 23
recovery, see file recovery
references, 3, 23
remove (rm) command, 21, 22
reverse command effects (undo), 16-17, 23
searching, 10-12, 19-21
shell, 21
shell escape (!), 21
slash (/), 11-12, 20
special characters (^, $, ), 10, 11, 17, 20-21
substitute (s) command, 11-12, 19, 20
terminals, 4-5
text input mode, 7
undo (u) command, 16-17, 23
UNIX, 3
write (w) command, 8, 13, 21, 22
z command, 12-13


nvi-1.81.6/docs/html/exref.html0100444000076400001440000026033210720065717015355 0ustar skimousers Ex Reference Manual

Ex Reference Manual

1. Starting ex
2. File manipulation
2.1. Current file
2.2. Alternate file
2.3. Filename expansion
2.4. Multiple files and named buffers
2.5. Read only
3. Exceptional Conditions
3.1. Errors and interrupts
3.2. Recovering from hangups and crashes
4. Editing modes
5. Command structure
5.1. Command parameters
5.2. Command variants
5.3. Flags after commands
5.4. Comments
5.5. Multiple commands per line
5.6. Reporting large changes
6. Command addressing
6.1. Addressing primitives
6.2. Combining addressing primitives
7. Command descriptions
8. Regular expressions and substitute replacement patterns
8.1. Regular expressions
8.2. Magic and nomagic
8.3. Basic regular expression summary
8.4. Combining regular expression primitives
8.5. Substitute replacement patterns
9. Option descriptions
10. Acknowledgements

Version 3.7

ABSTRACT

William Joy

                           Mark Horton
                    Computer Science Division
     Department of Electrical Engineering and Computer Science
               University of California, Berkeley
                      Berkeley, Ca.  94720

Ex a line oriented text editor, which supports both command and display oriented editing. This reference manual describes the command oriented part of ex; the display editing features of ex are described in An Introduction to Display Editing with Vi. Other documents about the editor include the introduction Edit: A tutorial, the Ex/edit Command Summary, and a Vi Quick Reference card.

1. Starting ex

Each instance of the editor has a set of options, which can be set to tailor it to your liking. The command edit invokes a version of ex designed for more casual or beginning users by changing the default settings of some of these options. To simplify the description which follows we assume the default settings of the options.

When invoked, ex determines the terminal type from the TERM variable in the environment. It there is a TERMCAP variable in the environment, and the type of the terminal described there matches the TERM variable, then that description is used. Also if the TERMCAP variable contains a pathname (beginning with a /) then the editor will seek the description of the terminal in that file (rather than the default /etc/termcap). If there is a variable EXINIT in the environment, then the editor will execute the commands in that variable, otherwise if there is a file .exrc in your HOME directory ex reads commands from that file, simulating a source command. Option setting commands placed in EXINIT or .exrc will be executed before each editor session.

A command to enter ex has the following prototype:

     ex [ - ] [ -v ] [ -t tag ] [ -r ] [ -l ] [ -wn ] [ -x ] [ -R ] [ +command ] name ...

The most common case edits a single file with no options, i.e.:

     ex name

The - command line option option suppresses all interactive-user feedback and is useful in processing editor scripts in command files. The -v option is equivalent to using vi rather than ex. The -t option is equivalent to an initial tag command, editing the file containing the tag and positioning the editor at its definition. The -r option is used in recovering after an editor or system crash, retrieving the last saved version of the named file or, if no file is specified, typing a list of saved files. The -l option sets up for editing LISP , setting the showmatch and lisp options. The -w option sets the default window size to n, and is useful on dialups to start in small windows. The -x option causes ex to prompt for a key, which is used to encrypt and decrypt the contents of the file, which should already be encrypted using the same key, see crypt(1). The -R option sets the readonly option at the start. Name arguments indicate files to be edited. An argument of the form +command indicates that the editor should begin by executing the specified command. If command is omitted, then it defaults to ``$'', positioning the editor at the last line of the first file initially. Other useful commands here are scanning patterns of the form ``/pat'' or line numbers, e.g. ``+100'' starting at line 100.

2. File manipulation

2.1. Current file

Ex is normally editing the contents of a single file, whose name is recorded in the current file name. Ex performs all editing actions in a buffer (actually a temporary file) into which the text of the file is initially read. Changes made to the buffer have no effect on the file being edited unless and until the buffer contents are written out to the file with a write command. After the buffer contents are written, the previous contents of the written file are no longer accessible. When a file is edited, its name becomes the current file name, and its contents are read into the buffer.

The current file is almost always considered to be edited. This means that the contents of the buffer are logically connected with the current file name, so that writing the current buffer contents onto that file, even if it exists, is a reasonable action. If the current file is not edited then ex will not normally write on it if it already exists.*

2.2. Alternate file

Each time a new value is given to the current file name, the previous current file name is saved as the alternate file name. Similarly if a file is mentioned but does not become the current file, it is saved as the alternate file name.

2.3. Filename expansion

Filenames within the editor may be specified using the normal shell expansion conventions. In addition, the character `%' in filenames is replaced by the current file name and the character `#' by the alternate file name.

2.4. Multiple files and named buffers

If more than one file is given on the command line, then the first file is edited as described above. The remaining arguments are placed with the first file in the argument list. The current argument list may be displayed with the args command. The next file in the argument list may be edited with the next command. The argument list may also be respecified by specifying a list of names to the next command. These names are expanded, the resulting list of names becomes the new argument list, and ex edits the first file on the list.

For saving blocks of text while editing, and especially when editing more than one file, ex has a group of named buffers. These are similar to the normal buffer, except that only a limited number of operations are available on them. The buffers have names a through z.

2.5. Read only

It is possible to use ex in read only mode to look at files that you have no intention of modifying. This mode protects you from accidently overwriting the file. Read only mode is on when the readonly option is set. It can be turned on with the -R command line option, by the view command line invocation, or by setting the readonly option. It can be cleared by setting noreadonly. It is possible to write, even while in read only mode, by indicating that you really know what you are doing. You can write to a different file, or can use the ! form of write, even while in read only mode.

3. Exceptional Conditions

3.1. Errors and interrupts

When errors occur ex (optionally) rings the terminal bell and, in any case, prints an error diagnostic. If the primary input is from a file, editor processing will terminate. If an interrupt signal is received, ex prints ``Interrupt'' and returns to its command level. If the primary input is a file, then ex will exit when this occurs.

3.2. Recovering from hangups and crashes

If a hangup signal is received and the buffer has been modified since it was last written out, or if the system crashes, either the editor (in the first case) or the system (after it reboots in the second) will attempt to preserve the buffer. The next time you log in you should be able to recover the work you were doing, losing at most a few lines of changes from the last point before the hangup or editor crash. To recover a file you can use the -r option. If you were editing the file resume, then you should change to the directory where you were when the crash occurred, giving the command

     ex -r resume

After checking that the retrieved file is indeed ok, you can write it over the previous contents of that file.

You will normally get mail from the system telling you when a file has been saved after a crash. The command

     ex -r

will print a list of the files which have been saved for you. (In the case of a hangup, the file will not appear in the list, although it can be recovered.)

4. Editing modes

Ex has five distinct modes. The primary mode is command mode. Commands are entered in command mode when a `:' prompt is present, and are executed each time a complete line is sent. In text input mode ex gathers input lines and places them in the file. The append, insert, and change commands use text input mode. No prompt is printed when you are in text input mode. This mode is left by typing a `.' alone at the beginning of a line, and command mode resumes.

The last three modes are open and visual modes, entered by the commands of the same name, and, within open and visual modes text insertion mode. Open and visual modes allow local editing operations to be performed on the text in the file. The open command displays one line at a time on any terminal while visual works on CRT terminals with random positioning cursors, using the screen as a (single) window for file editing changes. These modes are described (only) in An Introduction to Display Editing with Vi.

5. Command structure

Most command names are English words, and initial prefixes of the words are acceptable abbreviations. The ambiguity of abbreviations is resolved in favor of the more commonly used commands.*

5.1. Command parameters

Most commands accept prefix addresses specifying the lines in the file upon which they are to have effect. The forms of these addresses will be discussed below. A number of commands also may take a trailing count specifying the number of lines to be involved in the command.

Thus the command ``10p'' will print the tenth line in the buffer while ``delete 5'' will delete five lines from the buffer, starting with the current line.

Some commands take other information or parameters, this information always being given after the command name.

5.2. Command variants

A number of commands have two distinct variants. The variant form of the command is invoked by placing an `!' immediately after the command name. Some of the default variants may be controlled by options; in this case, the `!' serves to toggle the default.

5.3. Flags after commands

The characters `#', `p' and `l' may be placed after many commands.**

In this case, the command abbreviated by these characters is executed after the command completes. Since ex normally prints the new current line after each change, `p' is rarely necessary. Any number of `+' or `-' characters may also be given with these flags. If they appear, the specified offset is applied to the current line value before the printing command is executed.

5.4. Comments

It is possible to give editor commands which are ignored. This is useful when making complex editor scripts for which comments are desired. The comment character is the double quote: ". Any command line beginning with " is ignored. Comments beginning with " may also be placed at the ends of commands, except in cases where they could be confused as part of text (shell escapes and the substitute and map commands).

5.5. Multiple commands per line

More than one command may be placed on a line by separating each pair of commands by a `|' character. However the global commands, comments, and the shell escape `!' must be the last command on a line, as they are not terminated by a `|'.

5.6. Reporting large changes

Most commands which change the contents of the editor buffer give feedback if the scope of the change exceeds a threshold given by the report option. This feedback helps to detect undesirably large changes so that they may be quickly and easily reversed with an undo. After commands with more global effect such as global or visual, you will be informed if the net change in the number of lines in the buffer during this command exceeds this threshold.

6. Command addressing

6.1. Addressing primitives

. The current line. Most commands leave the current line as the last line which they affect. The default address for most commands is the current line, thus `.' is rarely used alone as an address.
n The nth line in the editor's buffer, lines being numbered sequentially from 1.
$ The last line in the buffer.
% An abbreviation for ``1,$'', the entire buffer.
+n -n An offset relative to the current buffer line.

/ pat / ? pat ? Scan forward and backward respectively for a line containing pat, a regular expression (as defined below). The scans normally wrap around the end of the buffer. If all that is desired is to print the next line containing pat, then the trailing / or ? may be omitted. If pat is omitted or explicitly empty, then the last regular expression specified is located.

x Before each non-relative motion of the current line `.', the previous current line is marked with a tag, subsequently referred to as `'. This makes it easy to refer or return to this previous context. Marks may also be established by the mark command, using single lower case letters x and the marked lines referred to as `x'.

6.2. Combining addressing primitives

Addresses to commands consist of a series of addressing primitives, separated by `,' or `;'. Such address lists are evaluated left-to-right. When addresses are separated by `;' the current line `.' is set to the value of the previous addressing expression before the next address is interpreted. If more addresses are given than the command requires, then all but the last one or two are ignored. If the command takes two addresses, the first addressed line must precede the second in the buffer.

7. Command descriptions

The following form is a prototype for all ex commands:

     address command ! parameters count flags

All parts are optional; the degenerate case is the empty command which prints the next line in the file. For sanity with use from within visual mode, ex ignores a ``:'' preceding any command.

In the following command descriptions, the default addresses are shown in parentheses, which are not, however, part of the command.

abbreviate word rhs abbr: ab

Add the named abbreviation to the current list. When in input mode in visual, if word is typed as a complete word, it will be changed to rhs.

( . ) append abbr: a
text

.

Reads the input text and places it after the specified line. After the command, `.' addresses the last line input or the specified line if no lines were input. If address `0' is given, text is placed at the beginning of the buffer.

a!
text

.

The variant flag to append toggles the setting for the autoindent option during the input of text.

args

The members of the argument list are printed, with the current argument delimited by `[' and `]'.

( . , . ) change count abbr: c
text

.

Replaces the specified lines with the input text. The current line becomes the last line input; if no lines were input it is left as for a delete.

c!
text

.

The variant toggles autoindent during the change.

( . , . )copy addr flags abbr: co

A copy of the specified lines is placed after addr, which may be `0'. The current line `.' addresses the last line of the copy. The command t is a synonym for copy.

( . , . )delete buffer count flags abbr: d

Removes the specified lines from the buffer. The line after the last line deleted becomes the current line; if the lines deleted were originally at the end, the new last line becomes the current line. If a named buffer is specified by giving a letter, then the specified lines are saved in that buffer, or appended to it if an upper case letter is used.

edit file abbr: e
ex
file

Used to begin an editing session on a new file. The editor first checks to see if the buffer has been modified since the last write command was issued. If it has been, a warning is issued and the command is aborted. The command otherwise deletes the entire contents of the editor buffer, makes the named file the current file and prints the new filename. After insuring that this file is sensible

the editor reads the file into its buffer.
If the read of the file completes without error, the number of lines and characters read is typed. If there were any non- ASCII characters in the file they are stripped of their non- ASCII high bits, and any null characters in the file are discarded. If none of these errors occurred, the file is considered edited. If the last line of the input file is missing the trailing newline character, it will be supplied and a complaint will be issued. This command leaves the current line `.' at the last line read.

e! file

The variant form suppresses the complaint about modifications having been made and not written from the editor buffer, thus discarding all changes which have been made before editing the new file.

e +n file

Causes the editor to begin at line n rather than at the last line; n may also be an editor command containing no spaces, e.g.: ``+/pat''.

file abbr: f

Prints the current file name, whether it has been `[Modified]' since the last write command, whether it is read only, the current line, the number of lines in the buffer, and the percentage of the way through the buffer of the current line.*

file file

The current file name is changed to file which is considered `[Not edited]'.

( 1 , $ ) global /pat/ cmds abbr: g

First marks each line among those specified which matches the given regular expression. Then the given command list is executed with `.' initially set to each marked line.
The command list consists of the remaining commands on the current input line and may continue to multiple lines by ending all but the last such line with a `'. If cmds (and possibly the trailing / delimiter) is omitted, each line matching pat is printed. Append, insert, and change commands and associated input are permitted; the `.' terminating input may be omitted if it would be on the last line of the command list. Open and visual commands are permitted in the command list and take input from the terminal.
The global command itself may not appear in cmds. The undo command is also not permitted there, as undo instead can be used to reverse the entire global command. The options autoprint and autoindent are inhibited during a global, (and possibly the trailing / delimiter) and the value of the report option is temporarily infinite, in deference to a report for the entire global. Finally, the context mark `' is set to the value of `.' before the global command begins and is not changed during a global command, except perhaps by an open or visual within the global.

g! /pat/ cmds abbr: v

The variant form of global runs cmds at each line not matching pat.

( . )insert abbr: i
text

.

Places the given text before the specified line. The current line is left at the last line input; if there were none input it is left at the line before the addressed line. This command differs from append only in the placement of text.

i!
text

.

The variant toggles autoindent during the insert.

( . , .+1 ) join count flags abbr: j

Places the text from a specified range of lines together on one line. White space is adjusted at each junction to provide at least one blank character, two if there was a `.' at the end of the line, or none if the first following character is a `)'. If there is already white space at the end of the line, then the white space at the start of the next line will be discarded.

j!

The variant causes a simpler join with no white space processing; the characters in the lines are simply concatenated.

( . ) k x

The k command is a synonym for mark. It does not require a blank or tab before the following letter.

( . , . ) list count flags

Prints the specified lines in a more unambiguous way: tabs are printed as `^I' and the end of each line is marked with a trailing `$'. The current line is left at the last line printed.

map lhs rhs

The map command is used to define macros for use in visual mode. Lhs should be a single character, or the sequence ``#n'', for n a digit, referring to function key n. When this character or function key is typed in visual mode, it will be as though the corresponding rhs had been typed. On terminals without function keys, you can type ``#n''. See section 6.9 of the ``Introduction to Display Editing with Vi'' for more details.

( . ) mark x

Gives the specified line mark x, a single lower case letter. The x must be preceded by a blank or a tab. The addressing form `x' then addresses this line. The current line is not affected by this command.

( . , . ) move addr abbr: m

The move command repositions the specified lines to be after addr. The first of the moved lines becomes the current line.

next abbr: n

The next file from the command line argument list is edited.

n!

The variant suppresses warnings about the modifications to the buffer not having been written out, discarding (irretrievably) any changes which may have been made.

n filelist
n +
command filelist

The specified filelist is expanded and the resulting list replaces the current argument list; the first file in the new list is then edited. If command is given (it must contain no spaces), then it is executed after editing the first such file.

( . , . ) number count flags abbr: # or nu

Prints each specified line preceded by its buffer line number. The current line is left at the last line printed.

( . ) open flags abbr: o
( . ) open /pat/ flags

Enters intraline editing open mode at each addressed line. If pat is given, then the cursor will be placed initially at the beginning of the string matched by the pattern. To exit this mode use Q. See An Introduction to Display Editing with Vi for more details.

preserve

The current editor buffer is saved as though the system had just crashed. This command is for use only in emergencies when a write command has resulted in an error and you don't know how to save your work. After a preserve you should seek help.

( . , . )print count abbr: p or P

Prints the specified lines with non-printing characters printed as control characters `^x'; delete (octal 177) is represented as `^?'. The current line is left at the last line printed.

( . )put buffer abbr: pu

Puts back previously deleted or yanked lines. Normally used with delete to effect movement of lines, or with yank to effect duplication of lines. If no buffer is specified, then the last deleted or yanked text is restored.*

By using a named buffer, text may be restored that was saved there at any previous time.

quit abbr: q

Causes ex to terminate. No automatic write of the editor buffer to a file is performed. However, ex issues a warning message if the file has changed since the last write command was issued, and does not quit.

Normally, you will wish to save your changes, and you should give a write command; if you wish to discard them, use the q! command variant.

q!

Quits from the editor, discarding changes to the buffer without complaint.

( . ) read file abbr: r

Places a copy of the text of the given file in the editing buffer after the specified line. If no file is given the current file name is used. The current file name is not changed unless there is none in which case file becomes the current name. The sensibility restrictions for the edit command apply here also. If the file buffer is empty and there is no current name then ex treats this as an edit command.
Address `0' is legal for this command and causes the file to be read at the beginning of the buffer. Statistics are given as for the edit command when the read successfully terminates. After a read the current line is the last line read.

( . ) read !command

Reads the output of the command command into the buffer after the specified line. This is not a variant form of the command, rather a read specifying a command rather than a filename; a blank or tab before the ! is mandatory.

recover file

Recovers file from the system save area. Used after a accidental hangup of the phone**

or a system crash** or preserve command. Except when you use preserve you will be notified by mail when a file is saved.

rewind abbr: rew

The argument list is rewound, and the first file in the list is edited.

rew!

Rewinds the argument list discarding any changes made to the current buffer.

set parameter

With no arguments, prints those options whose values have been changed from their defaults; with parameter all it prints all of the option values.
Giving an option name followed by a `?' causes the current value of that option to be printed. The `?' is unnecessary unless the option is Boolean valued. Boolean options are given values either by the form `set option' to turn them on or `set nooption' to turn them off; string and numeric options are assigned via the form `set option=value'.
More than one parameter may be given to set; they are interpreted left-to-right.

shell abbr: sh

A new shell is created. When it terminates, editing resumes.

source file abbr: so

Reads and executes commands from the specified file. Source commands may be nested.

( . , . ) substitute /pat/repl/ options count flagsabbr: s

On each specified line, the first instance of pattern pat is replaced by replacement pattern repl. If the global indicator option character `g' appears, then all instances are substituted; if the confirm indication character `c' appears, then before each substitution the line to be substituted is typed with the string to be substituted marked with `' characters. By typing an `y' one can cause the substitution to be performed, any other input causes no change to take place. After a substitute the current line is the last line substituted.
Lines may be split by substituting new-line characters into them. The newline in repl must be escaped by preceding it with a `'. Other metacharacters available in pat and repl are described below.

stop

Suspends the editor, returning control to the top level shell. If autowrite is set and there are unsaved changes, a write is done first unless the form stop! is used. This commands is only available where supported by the teletype driver and operating system.

( . , . ) substitute options count flagsabbr: s

If pat and repl are omitted, then the last substitution is repeated. This is a synonym for the & command.

( . , . ) t addr flags

The t command is a synonym for copy.

ta tag

The focus of editing switches to the location of tag, switching to a different line in the current file where it is defined, or if necessary to another file.

The tags file is normally created by a program such as ctags, and consists of a number of lines with three fields separated by blanks or tabs. The first field gives the name of the tag, the second the name of the file where the tag resides, and the third gives an addressing form which can be used by the editor to find the tag; this field is usually a contextual scan using `/pat/' to be immune to minor changes in the file. Such scans are always performed as if nomagic was set.

The tag names in the tags file must be sorted alphabetically.

unabbreviate word abbr: una

Delete word from the list of abbreviations.

undo abbr: u

Reverses the changes made in the buffer by the last buffer editing command. Note that global commands are considered a single command for the purpose of undo (as are open and visual.) Also, the commands write and edit which interact with the file system cannot be undone. Undo is its own inverse.
Undo always marks the previous value of the current line `.' as `'. After an undo the current line is the first line restored or the line before the first line deleted if no lines were restored. For commands with more global effect such as global and visual the current line regains it's pre-command value after an undo.

unmap lhs

The macro expansion associated by map for lhs is removed.

( 1 , $ ) v /pat/ cmds

A synonym for the global command variant g!, running the specified cmds on each line which does not match pat.

version abbr: ve

Prints the current version number of the editor as well as the date the editor was last changed.

( . ) visual type count flags abbr: vi

Enters visual mode at the specified line. Type is optional and may be `-' , `' or `.' as in the z command to specify the placement of the specified line on the screen. By default, if type is omitted, the specified line is placed as the first on the screen. A count specifies an initial window size; the default is the value of the option window. See the document An Introduction to Display Editing with Vi for more details. To exit this mode, type Q.

visual file
visual
+n file

From visual mode, this command is the same as edit.

( 1 , $ ) write file abbr: w

Writes changes made back to file, printing the number of lines and characters written. Normally file is omitted and the text goes back where it came from. If a file is specified, then text will be written to that file.*

If the file does not exist it is created. The current file name is changed only if there is no current file name; the current line is never changed.
If an error occurs while writing the current and edited file, the editor considers that there has been ``No write since last change'' even if the buffer had not previously been modified.

( 1 , $ ) write>> file abbr: w>>

Writes the buffer contents at the end of an existing file.

w! name

Overrides the checking of the normal write command, and will write to any file which the system permits.

( 1 , $ ) w !command

Writes the specified lines into command. Note the difference between w! which overrides checks and w ! which writes to a command.

wq name

Like a write and then a quit command.

wq! name

The variant overrides checking on the sensibility of the write command, as w! does.

xit name

If any changes have been made and not written, writes the buffer out. Then, in any case, quits.

( . , . )yank buffer count abbr: ya

Places the specified lines in the named buffer, for later retrieval via put. If no buffer name is specified, the lines go to a more volatile place; see the put command description.

( .+1 ) z count

Print the next count lines, default window.

( . ) z type count

Prints a window of text with the specified line at the top. If type is `-' the line is placed at the bottom; a `.' causes the line to be placed in the center.* A count gives the number of lines to be displayed rather than double the number specified by the scroll option. On a CRT the screen is cleared before display begins unless a count which is less than the screen size is given. The current line is left at the last line printed.

! command

The remainder of the line after the `!' character is sent to a shell to be executed. Within the text of command the characters `%' and `#' are expanded as in filenames and the character `!' is replaced with the text of the previous command. Thus, in particular, `!!' repeats the last such shell escape. If any such expansion is performed, the expanded line will be echoed. The current line is unchanged by this command.
If there has been ``[No write]'' of the buffer contents since the last change to the editing buffer, then a diagnostic will be printed before the command is executed as a warning. A single `!' is printed when the command completes.

( addr , addr ) ! command

Takes the specified address range and supplies it as standard input to command; the resulting output then replaces the input lines.

( $ ) =

Prints the line number of the addressed line. The current line is unchanged.

( . , . ) > count flags
( . , . ) < count flags

Perform intelligent shifting on the specified lines; < shifts left and > shift right. The quantity of shift is determined by the shiftwidth option and the repetition of the specification character. Only white space (blanks and tabs) is shifted; no non-white characters are discarded in a left-shift. The current line becomes the last line which changed due to the shifting.

^D

An end-of-file from a terminal input scrolls through the file. The scroll option specifies the size of the scroll, normally a half screen of text.

( .+1 , .+1 )
( .+1 , .+1 ) |

An address alone causes the addressed lines to be printed. A blank line prints the next line in the file.

( . , . ) & options count flags

Repeats the previous substitute command.

( . , . ) ~ options count flags

Replaces the previous regular expression with the previous replacement pattern from a substitution.

8. Regular expressions and substitute replacement patterns

8.1. Regular expressions

A regular expression specifies a set of strings of characters. A member of this set of strings is said to be matched by the regular expression. Ex remembers two previous regular expressions: the previous regular expression used in a substitute command and the previous regular expression used elsewhere (referred to as the previous scanning regular expression.) The previous regular expression can always be referred to by a null re, e.g. `//' or `??'.

8.2. Magic and nomagic

The regular expressions allowed by ex are constructed in one of two ways depending on the setting of the magic option. The ex and vi default setting of magic gives quick access to a powerful set of regular expression metacharacters. The disadvantage of magic is that the user must remember that these metacharacters are magic and precede them with the character `' to use them as ``ordinary'' characters. With nomagic, the default for edit, regular expressions are much simpler, there being only two metacharacters. The power of the other metacharacters is still available by preceding the (now) ordinary character with a `'. Note that `' is thus always a metacharacter.

The remainder of the discussion of regular expressions assumes that that the setting of this option is magic.

8.3. Basic regular expression summary

The following basic constructs are used to construct magic mode regular expressions.

char An ordinary character matches itself. The characters `' at the beginning of a line, `$' at the end of line, `*' as any character other than the first, `.', `', `[', and ` ~ ' are not ordinary characters and must be escaped (preceded) by `' to be treated as such.
At the beginning of a pattern forces the match to succeed only at the beginning of a line.
$ At the end of a regular expression forces the match to succeed only at the end of the line.
. Matches any single character except the new-line character.
< Forces the match to occur only at the beginning of a ``variable'' or ``word''; that is, either at the beginning of a line, or just before a letter, digit, or underline and after a character not one of these.
> Similar to `<', but matching the end of a ``variable'' or ``word'', i.e. either the end of the line or before character which is neither a letter, nor a digit, nor the underline character.
[ string ] Matches any (single) character in the class defined by string. Most characters in string define themselves. A pair of characters separated by `-' in string defines the set of characters collating between the specified lower and upper bounds, thus `[a-z]' as a regular expression matches any (single) lower-case letter. If the first character of string is an `' then the construct matches those characters which it otherwise would not; thus `[a-z]' matches anything but a lower-case letter (and of course a newline). To place any of the characters `', `[', or `-' in string you must escape them with a preceding `'.

8.4. Combining regular expression primitives

The concatenation of two regular expressions matches the leftmost and then longest string which can be divided with the first piece matching the first regular expression and the second piece matching the second. Any of the (single character matching) regular expressions mentioned above may be followed by the character `*' to form a regular expression which matches any number of adjacent occurrences (including 0) of characters matched by the regular expression it follows.

The character ` ~ ' may be used in a regular expression, and matches the text which defined the replacement part of the last substitute command. A regular expression may be enclosed between the sequences `' and `)' with side effects in the substitute replacement patterns.

8.5. Substitute replacement patterns

The basic metacharacters for the replacement pattern are `&' and `~'; these are given as `&' and `~' when nomagic is set. Each instance of `&' is replaced by the characters which the regular expression matched. The metacharacter `~' stands, in the replacement pattern, for the defining text of the previous replacement pattern.

Other metasequences possible in the replacement pattern are always introduced by the escaping character `'. The sequence `\n' is replaced by the text matched by the n-th regular subexpression enclosed between `' and `)'.

The sequences `u' and `l' cause the immediately following character in the replacement to be converted to upper- or lower-case respectively if this character is a letter. The sequences `U' and `L' turn such conversion on, either until `E' or `e' is encountered, or until the end of the replacement pattern.

9. Option descriptions

autoindent, ai default: noai

Can be used to ease the preparation of structured program text. At the beginning of each append, change or insert command or when a new line is opened or created by an append, change, insert, or substitute operation within open or visual mode, ex looks at the line being appended after, the first line changed or the line inserted before and calculates the amount of white space at the start of the line. It then aligns the cursor at the level of indentation so determined.
If the user then types lines of text in, they will continue to be justified at the displayed indenting level. If more white space is typed at the beginning of a line, the following line will start aligned with the first non-white character of the previous line. To back the cursor up to the preceding tab stop one can hit ^D. The tab stops going backwards are defined at multiples of the shiftwidth option. You cannot backspace over the indent, except by sending an end-of-file with a ^D.
Specially processed in this mode is a line with no characters added to it, which turns into a completely blank line (the white space provided for the autoindent is discarded.) Also specially processed in this mode are lines beginning with an `' and immediately followed by a ^D. This causes the input to be repositioned at the beginning of the line, but retaining the previous indent for the next line. Similarly, a `0' followed by a ^D repositions at the beginning but without retaining the previous indent.
Autoindent doesn't happen in global commands or when the input is not a terminal.

autoprint, ap default: ap

Causes the current line to be printed after each delete, copy, join, move, substitute, t, undo or shift command. This has the same effect as supplying a trailing `p' to each such command. Autoprint is suppressed in globals, and only applies to the last of many commands on a line.

autowrite, aw default: noaw

Causes the contents of the buffer to be written to the current file if you have modified it and give a next, rewind, stop, tag, or ! command, or a ^ (switch files) or ^] (tag goto) command in visual. Note, that the edit and ex commands do not autowrite. In each case, there is an equivalent way of switching when autowrite is set to avoid the autowrite (edit for next, rewind! for .I rewind , stop! for stop, tag! for tag, shell for !, and :e # and a :ta! command from within visual).

beautify, bf default: nobeautify

Causes all control characters except tab, newline and form-feed to be discarded from the input. A complaint is registered the first time a backspace character is discarded. Beautify does not apply to command input.

directory, dir default: dir=/tmp

Specifies the directory in which ex places its buffer file. If this directory in not writable, then the editor will exit abruptly when it fails to be able to create its buffer there.

edcompatible default: noedcompatible

Causes the presence of absence of g and c suffixes on substitute commands to be remembered, and to be toggled by repeating the suffices. The suffix r makes the substitution be as in the ~ command, instead of like &.

errorbells, eb default: noeb

Error messages are preceded by a bell.*

If possible the editor always places the error message in a standout mode of the terminal (such as inverse video) instead of ringing the bell.

hardtabs, ht default: ht=8

Gives the boundaries on which terminal hardware tabs are set (or on which the system expands tabs).

ignorecase, ic default: noic

All upper case characters in the text are mapped to lower case in regular expression matching. In addition, all upper case characters in regular expressions are mapped to lower case except in character class specifications.

lisp default: nolisp

Autoindent indents appropriately for lisp code, and the ( ) { } [[ and ]] commands in open and visual are modified to have meaning for lisp.

list default: nolist

All printed lines will be displayed (more) unambiguously, showing tabs and end-of-lines as in the list command.

magic default: magic for ex and vi

If nomagic is set, the number of regular expression metacharacters is greatly reduced, with only `' and `$' having special effects. In addition the metacharacters `~' and `&' of the replacement pattern are treated as normal characters. All the normal metacharacters may be made magic when nomagic is set by preceding them with a `'.

mesg default: mesg

Causes write permission to be turned off to the terminal while you are in visual mode, if nomesg is set.

modeline default: nomodeline

If modeline is set, then the first 5 lines and the last five lines of the file will be checked for ex command lines and the comands issued. To be recognized as a command line, the line must have the string ex: or vi: preceeded by a tab or a space. This string may be anywhere in the line and anything after the : is interpeted as editor commands. This option defaults to off because of unexpected behavior when editting files such as /etc/passwd.

number, nu default: nonumber

Causes all output lines to be printed with their line numbers. In addition each input line will be prompted for by supplying the line number it will have.

open default: open

If noopen, the commands open and visual are not permitted. This is set for edit to prevent confusion resulting from accidental entry to open or visual mode.

optimize, opt default: optimize

Throughput of text is expedited by setting the terminal to not do automatic carriage returns when printing more than one (logical) line of output, greatly speeding output on terminals without addressable cursors when text with leading white space is printed.

paragraphs, para default: para=IPLPPPQPP LIbp

Specifies the paragraphs for the { and } operations in open and visual. The pairs of characters in the option's value are the names of the macros which start paragraphs.

prompt default: prompt

Command mode input is prompted for with a `:'.

redraw default: noredraw

The editor simulates (using great amounts of output), an intelligent terminal on a dumb terminal (e.g. during insertions in visual the characters to the right of the cursor position are refreshed as each input character is typed.) Useful only at very high speed.

remap default: remap

If on, macros are repeatedly tried until they are unchanged. For example, if o is mapped to O, and O is mapped to I, then if remap is set, o will map to I, but if noremap is set, it will map to O.

report default: report=5

Specifies a threshold for feedback from commands. Any command which modifies more than the specified number of lines will provide feedback as to the scope of its changes. For commands such as global, open, undo, and visual which have potentially more far reaching scope, the net change in the number of lines in the buffer is presented at the end of the command, subject to this same threshold. Thus notification is suppressed during a global command on the individual commands performed.

scroll default: scroll= window

Determines the number of logical lines scrolled when an end-of-file is received from a terminal input in command mode, and the number of lines printed by a command mode z command (double the value of scroll).

sections default: sections=SHNHH HU

Specifies the section macros for the [[ and ]] operations in open and visual. The pairs of characters in the options's value are the names of the macros which start paragraphs.

shell, sh default: sh=/bin/sh

Gives the path name of the shell forked for the shell escape command `!', and by the shell command. The default is taken from SHELL in the environment, if present.

shiftwidth, sw default: sw=8

Gives the width a software tab stop, used in reverse tabbing with ^D when using autoindent to append text, and by the shift commands.

showmatch, sm default: nosm

In open and visual mode, when a ) or } is typed, move the cursor to the matching ( or { for one second if this matching character is on the screen. Extremely useful with lisp.

slowopen, slow terminal dependent

Affects the display algorithm used in visual mode, holding off display updating during input of new text to improve throughput when the terminal in use is both slow and unintelligent. See An Introduction to Display Editing with Vi for more details.

tabstop, ts default: ts=8

The editor expands tabs in the input file to be on tabstop boundaries for the purposes of display.

taglength, tl default: tl=0

Tags are not significant beyond this many characters. A value of zero (the default) means that all characters are significant.

tags default: tags=tags /usr/lib/tags

A path of files to be used as tag files for the tag command. A requested tag is searched for in the specified files, sequentially. By default, files called tags are searched for in the current directory and in /usr/lib (a master file for the entire system).

term from environment TERM

The terminal type of the output device.

terse default: noterse

Shorter error diagnostics are produced for the experienced user.

warn default: warn

Warn if there has been `[No write since last change]' before a `!' command escape.

window default: window=speed dependent

The number of lines in a text window in the visual command. The default is 8 at slow speeds (600 baud or less), 16 at medium speed (1200 baud), and the full screen (minus one line) at higher speeds.

w300, w1200 w9600

These are not true options but set window only if the speed is slow (300), medium (1200), or high (9600), respectively. They are suitable for an EXINIT and make it easy to change the 8/16/full screen rule.

wrapscan, ws default: ws

Searches using the regular expressions in addressing will wrap around past the end of the file.

wrapmargin, wm default: wm=0

Defines a margin for automatic wrapover of text during input in open and visual modes. See An Introduction to Text Editing with Vi for details.

writeany, wa default: nowa

Inhibit the checks normally made before write commands, allowing a write to any file which the system protection mechanism will allow.

10. Acknowledgements

Chuck Haley contributed greatly to the early development of ex. Bruce Englar encouraged the redesign which led to ex version 1. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made the editor work on a large number of terminals and Unix systems.


nvi-1.81.6/docs/html/ex-summary.html0100444000076400001440000001414110720065720016340 0ustar skimousers

Ex/Edit Command Summary (Version 2.0)

Ex and edit are text editors, used for creating and modifying files of text on the UNIX computer system. Edit is a variant of ex with features designed to make it less complicated to learn and use. In terms of command syntax and effect the editors are essentially identical, and this command summary applies to both.

The summary is meant as a quick reference for users already acquainted with edit or ex. Fuller explanations of the editors are available in the documents Edit: A Tutorial (a self-teaching introduction) and the Ex Reference Manual (the comprehensive reference source for both edit and ex). Both of these writeups are available in the Computing Services Library.

In the examples included with the summary, commands and text entered by the user are printed in boldface to distinguish them from responses printed by the computer.

The Editor Buffer

In order to perform its tasks the editor sets aside a temporary work space, called a buffer, separate from the user's permanent file. Before starting to work on an existing file the editor makes a copy of it in the buffer, leaving the original untouched. All editing changes are made to the buffer copy, which must then be written back to the permanent file in order to update the old version. The buffer disappears at the end of the editing session.

Editing: Command and Text Input Modes

During an editing session there are two usual modes of operation: command mode and text input mode. (This disregards, for the moment, open and visual modes, discussed below.) In command mode, the editor issues a colon prompt (:) to show that it is ready to accept and execute a command. In text input mode, on the other hand, there is no prompt and the editor merely accepts text to be added to the buffer. Text input mode is initiated by the commands append, insert, and change, and is terminated by typing a period as the first and only character on a line.

Line Numbers and Command Syntax

The editor keeps track of lines of text in the buffer by numbering them consecutively starting with 1 and renumbering as lines are added or deleted. At any given time the editor is positioned at one of these lines; this position is called the current line. Generally, commands that change the contents of the buffer print the new current line at the end of their execution.

Most commands can be preceded by one or two line-number addresses which indicate the lines to be affected. If one number is given the command operates on that line only; if two, on an inclusive range of lines. Commands that can take line-number prefixes also assume default prefixes if none are given. The default assumed by each command is designed to make it convenient to use in many instances without any line-number prefix. For the most part, a command used without a prefix operates on the current line, though exceptions to this rule should be noted. The print command by itself, for instance, causes one line, the current line, to be printed at the terminal.

The summary shows the number of line addresses that can be prefixed to each command as well as the defaults assumed if they are omitted. For example, (.,.) means that up to 2 line-numbers may be given, and that if none is given the command operates on the current line. (In the address prefix notation, ``.'' stands for the current line and ``$'' stands for the last line of the buffer.) If no such notation appears, no line-number prefix may be used.

Some commands take trailing information; only the more important instances of this are mentioned in the summary.

Open and Visual Modes

Besides command and text input modes, ex and edit provide on some CRT terminals other modes of editing, open and visual. In these modes the cursor can be moved to individual words or characters in a line. The commands then given are very different from the standard editor commands; most do not appear on the screen when typed. An Introduction to Display Editing with Vi provides a full discussion.

Special Characters

Some characters take on special meanings when used in context searches and in patterns given to the substitute command. For edit, these are ``^'' and ``$'', meaning the beginning and end of a line, respectively. Ex has the following additional special characters:

. & * [ ] ~

To use one of the special characters as its simple graphic representation rather than with its special meaning, precede it by a backslash (). The backslash always has a special meaning.



nvi-1.81.6/docs/html/vi.0.html0100444000076400001440000045000410720065721015010 0ustar skimousers VI

VI

NAME
SYNOPSIS
LICENSE
DESCRIPTION
FAST STARTUP
VI COMMANDS
VI TEXT INPUT COMMANDS
EX COMMANDS
SET OPTIONS
ENVIRONMENT VARIABLES
ASYNCHRONOUS EVENTS
FILES
SEE ALSO
HISTORY
STANDARDS

NAME

ex, vi, view - text editors

SYNOPSIS

ex [-eFRrSsv] [-c cmd] [-t tag] [-w size] [file ...]
vi
[-eFlRrSv] [-c cmd] [-t tag] [-w size] [file ...]
view
[-eFRrSv] [-c cmd] [-t tag] [-w size] [file ...]

LICENSE

The vi program is freely redistributable. You are welcome to copy, modify and share it with others under the conditions listed in the LICENSE file. If any company (not individual!) finds vi sufficiently useful that you would have purchased it, or if any company wishes to redistribute it, contributions to the authors would be appreciated.

DESCRIPTION

Vi is a screen oriented text editor. Ex is a line-oriented text editor. Ex and vi are different interfaces to the same program, and it is possible to switch back and forth during an edit session. View is the equivalent of using the -R (read-only) option of vi.
This manual page is the one provided with the nex/nvi versions of the ex/vi text editors. Nex/nvi are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) ex and vi programs. For the rest of this manual page, nex/nvi is used only when it's necessary to distinguish it from the historic implementations of ex/vi.
This manual page is intended for users already familiar with ex/vi. Anyone else should almost certainly read a good tutorial on the editor before this manual page. If you're in an unfamiliar environment, and you absolutely have to get work done immediately, read the section after the options description, entitled ``Fast Startup''. It's probably enough to get you going.
The following options are available:
-c
Execute cmd immediately after starting the edit session. Particularly useful for initial positioning in the file, however cmd is not limited to positioning commands. This is the POSIX 1003.2 interface for the historic ``+cmd'' syntax. Nex/nvi supports both the old and new syntax.
-e
Start editing in ex mode, as if the command name were ex.
-F
Don't copy the entire file when first starting to edit. (The default is to make a copy in case someone else modifies the file during your edit session.)
-l
Start editing with the lisp and showmatch options set.
-R
Start editing in read-only mode, as if the command name was view, or the readonly option was set.
-r
Recover the specified files, or, if no files are specified, list the files that could be recovered. If no recoverable files by the specified name exist, the file is edited as if the -r option had not been specified.
-S
Run with the secure edit option set, disallowing all access to external programs.
-s
Enter batch mode; applicable only to ex edit sessions. Batch mode is useful when running ex scripts. Prompts, informative messages and other user oriented message are turned off, and no startup files or environmental variables are read. This is the POSIX 1003.2 interface for the historic ``-'' argument. Nex/nvi supports both the old and new syntax.
-t
Start editing at the specified tag. (See ctags(1)).
-w
Set the initial window size to the specified number of lines.
-v
Start editing in vi mode, as if the command name was vi or view.
Command input for ex/vi is read from the standard input. In the vi interface, it is an error if standard input is not a terminal. In the ex interface, if standard input is not a terminal, ex will read commands from it regardless, however, the session will be a batch mode session, exactly as if the -s option had been specified.
Ex/vi exits 0 on success, and greater than 0 if an error occurs.

FAST STARTUP

This section will tell you the minimum amount that you need to do simple editing tasks using vi. If you've never used any screen editor before, you're likely to have problems even with this simple introduction. In that case you should find someone that already knows vi and have them walk you through this section.
Vi is a screen editor. This means that it takes up almost the entire screen, displaying part of the file on each screen line, except for the last line of the screen. The last line of the screen is used for you to give commands to vi, and for vi to give information to you.
The other fact that you need to understand is that vi is a modeful editor, i.e. you are either entering text or you are executing commands, and you have to be in the right mode to do one or the other. You will be in command mode when you first start editing a file. There are commands that switch you into input mode. There is only one key that takes you out of input mode, and that is the <escape> key. (Key names are written using less-than and greater-than signs, e.g. <escape> means the ``escape'' key, usually labeled ``esc'' on your terminal's keyboard.) If you're ever confused as to which mode you're in, keep entering the <escape> key until vi beeps at you. (Generally, vi will beep at you if you try and do something that's not allowed. It will also display error messages.)
To start editing a file, enter the command ``vi file_name<carriage-return>''. The command you should enter as soon as you start editing is ``:set verbose showmode<carriage-return>''. This will make the editor give you verbose error messages and display the current mode at the bottom of the screen.
The commands to move around the file are:
h
Move the cursor left one character.
j
Move the cursor down one line.
k
Move the cursor up one line.
l
Move the cursor right one character.
<cursor-arrows>
The cursor arrow keys should work, too.
/text<carriage-return>
Search for the string ``text'' in the file, and move the cursor to its first character.
The commands to enter new text are:
a
Append new text, after the cursor.
i
Insert new text, before the cursor.
o
Open a new line below the line the cursor is on, and start entering text.
O
Open a new line above the line the cursor is on, and start entering text.
<escape>
Once you've entered input mode using the one of the a, i, O or o commands, use <escape> to quit entering text and return to command mode.
The commands to copy text are:
yy
Copy the line the cursor is on.
p
Append the copied line after the line the cursor is on.
The commands to delete text are:
dd
Delete the line the cursor is on.
x
Delete the character the cursor is on.
The commands to write the file are:
:w<carriage-return>
Write the file back to the file with the name that you originally used as an argument on the vi command line.
:w file_name<carriage-return>
Write the file back to the file with the name ``file_name''.
The commands to quit editing and exit the editor are:
:q<carriage-return>
Quit editing and leave vi (if you've modified the file, but not saved your changes, vi will refuse to quit).
:q!<carriage-return>
Quit, discarding any modifications that you may have made.
One final caution. Unusual characters can take up more than one column on the screen, and long lines can take up more than a single screen line. The above commands work on ``physical'' characters and lines, i.e. they affect the entire line no matter how many screen lines it takes up and the entire character no matter how many screen columns it takes up.

VI COMMANDS

The following section describes the commands available in the command mode of the vi editor. In each entry below, the tag line is a usage synopsis for the command character.
[count] <control-A>
Search forward count times for the current word.
[count] <control-B>
Page backwards count screens.
[count] <control-D>
Scroll forward count lines.
[count] <control-E>
Scroll forward count lines, leaving the current line and column as is, if possible.
[count] <control-F>
Page forward count screens.
<control-G>
Display the file information.
<control-H>
[count] h
Move the cursor back count characters in the current line.
[count] <control-J>
[count] <control-N>
[count] j
Move the cursor down count lines without changing the current column.
<control-L>
<control-R>
Repaint the screen.
[count] <control-M>
[count] +
Move the cursor down count lines to the first nonblank character of that line.
[count] <control-P>
[count] k
Move the cursor up count lines, without changing the current column.
<control-T>
Return to the most recent tag context.
<control-U>
Scroll backwards count lines.
<control-W>
Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window.
<control-Y>
Scroll backwards count lines, leaving the current line and column as is, if possible.
<control-Z>
Suspend the current editor session.
<escape>
Execute ex commands or cancel partial commands.
<control-]>
Push a tag reference onto the tag stack.
<control-^>
Switch to the most recently edited file.
[count] <space>
[count] l
Move the cursor forward count characters without changing the current line.
[count] ! motion shell-argument(s)
Replace text with results from a shell command.
[count] # #|+|-
Increment or decrement the cursor number.
[count] $
Move the cursor to the end of a line.
%
Move to the matching character.
&
Repeat the previous substitution command on the current line.
'<character>
`<character>
Return to a context marked by the character <character>.
[count] (
Back up count sentences.
[count] )
Move forward count sentences.
[count] ,
Reverse find character count times.
[count] -
Move to first nonblank of the previous line, count times.
[count] .
Repeat the last vi command that modified text.
/RE<carriage-return>
/RE/ [offset]<carriage-return>
?RE<carriage-return>
?RE? [offset]<carriage-return>
N
n
Search forward or backward for a regular expression.
0
Move to the first character in the current line.
:
Execute an ex command.
[count] ;
Repeat the last character find count times.
[count] < motion
[count] > motion
Shift lines left or right.
@ buffer
Execute a named buffer.
[count] A
Enter input mode, appending the text after the end of the line.
[count] B
Move backwards count bigwords.
[buffer] [count] C
Change text from the current position to the end-of-line.
[buffer] D
Delete text from the current position to the end-of-line.
[count] E
Move forward count end-of-bigwords.
[count] F <character>
Search count times backward through the current line for <character>.
[count] G
Move to line count, or the last line of the file if count not specified.
[count] H
Move to the screen line count - 1 lines below the top of the screen.
[count] I
Enter input mode, inserting the text at the beginning of the line.
[count] J
Join lines.
[count] L
Move to the screen line count - 1 lines above the bottom of the screen.
M
Move to the screen line in the middle of the screen.
[count] O
Enter input mode, appending text in a new line above the current line.
[buffer] P
Insert text from a buffer.
Q
Exit vi (or visual) mode and switch to ex mode.
[count] R
Enter input mode, replacing the characters in the current line.
[buffer] [count] S
Substitute count lines.
[count] T <character>
Search backwards, count times, through the current line for the character after the specified <character>.
U
Restore the current line to its state before the cursor last moved to it.
[count] W
Move forward count bigwords.
[buffer] [count] X
Delete count characters before the cursor.
[buffer] [count] Y
Copy (or ``yank'') count lines into the specified buffer.
ZZ
Write the file and exit vi.
[count] [[
Back up count section boundaries.
[count] ]]
Move forward count section boundaries.
^
Move to first nonblank character on the current line.
[count] _
Move down count - 1 lines, to the first nonblank character.
[count] a
Enter input mode, appending the text after the cursor.
[count] b
Move backwards count words.
[buffer] [count] c motion
Change a region of text.
[buffer] [count] d motion
Delete a region of text.
[count] e
Move forward count end-of-words.
[count] f<character>
Search forward, count times, through the rest of the current line for <character>.
[count] i
Enter input mode, inserting the text before the cursor.
m <character>
Save the current context (line and column) as <character>.
[count] o
Enter input mode, appending text in a new line under the current line.
[buffer] p
Append text from a buffer.
[count] r <character>
Replace count characters.
[buffer] [count] s
Substitute count characters in the current line starting with the current character.
[count] t <character>
Search forward, count times, through the current line for the character immediately before <character>.
u
Undo the last change made to the file.
[count] w
Move forward count words.
[buffer] [count] x
Delete count characters.
[buffer] [count] y motion
Copy (or ``yank'') a text region specified by the count and motion into a buffer.
[count1] z [count2] -|.|+|^|<carriage-return>
Redraw, optionally repositioning and resizing the screen.
[count] {
Move backward count paragraphs.
[count] |
Move to a specific column position on the current line.
[count] }
Move forward count paragraphs.
[count] ~
Reverse the case of the next count character(s).
[count] ~ motion
Reverse the case of the characters in a text region specified by the count and motion.
<interrupt>
Interrupt the current operation.

VI TEXT INPUT COMMANDS

The following section describes the commands available in the text input mode of the vi editor.
<nul>
Replay the previous input.
<control-D>
Erase to the previous shiftwidth column boundary.
^<control-D>
Erase all of the autoindent characters, and reset the autoindent level.
0<control-D>
Erase all of the autoindent characters.
<control-T>
Insert sufficient <tab> and <space> characters to move forward to the next shiftwidth column boundary.
<erase>
<control-H>
Erase the last character.
<literal next>
Quote the next character.
<escape>
Resolve all text input into the file, and return to command mode.
<line erase>
Erase the current line.
<control-W>
<word erase>
Erase the last word. The definition of word is dependent on the altwerase and ttywerase options.
<control-X>[0-9A-Fa-f]+
Insert a character with the specified hexadecimal value into the text.
<interrupt>
Interrupt text input mode, returning to command mode.

EX COMMANDS

The following section describes the commands available in the ex editor. In each entry below, the tag line is a usage synopsis for the command.
<end-of-file>
Scroll the screen.
! argument(s)
[range]! argument(s)
Execute a shell command, or filter lines through a shell command.
"
A comment.
[range] nu[mber] [count] [flags]
[range] # [count] [flags]
Display the selected lines, each preceded with its line number.
@ buffer
* buffer
Execute a buffer.
[line] a[ppend][!]
The input text is appended after the specified line.
[range] c[hange][!] [count]
The input text replaces the specified range.
cs[cope] add | find | help | kill | reset
Execute a Cscope command.
[range] d[elete] [buffer] [count] [flags]
Delete the lines from the file.
di[splay] b[uffers] | c[onnections] | s[creens] | t[ags]
Display buffers, Cscope connections, screens or tags.
[Ee][dit][!] [+cmd] [file]
[Ee]x[!] [+cmd] [file]
Edit a different file.
exu[sage] [command]
Display usage for an ex command.
f[ile] [file]
Display and optionally change the file name.
[Ff]g [name]
Vi mode only. Foreground the specified screen.
[range] g[lobal] /pattern/ [commands]
[range] v /pattern/ [commands]
Apply commands to lines matching (or not matching) a pattern.
he[lp]
Display a help message.
[line] i[nsert][!]
The input text is inserted before the specified line.
[range] j[oin][!] [count] [flags]
Join lines of text together.
[range] l[ist] [count] [flags]
Display the lines unambiguously.
map[!] [lhs rhs]
Define or display maps (for vi only).
[line] ma[rk] <character>
[line] k <character>
Mark the line with the mark <character>.
[range] m[ove] line
Move the specified lines after the target line.
mk[exrc][!] file
Write the abbreviations, editor options and maps to the specified file.
[Nn][ext][!] [file ...]
Edit the next file from the argument list.
[line] o[pen] /pattern/ [flags]
Enter open mode.
pre[serve]
Save the file in a form that can later be recovered using the ex -r option.
[Pp]rev[ious][!]
Edit the previous file from the argument list.
[range] p[rint] [count] [flags]
Display the specified lines.
[line] pu[t] [buffer]
Append buffer contents to the current line.
q[uit][!]
End the editing session.
[line] r[ead][!] [file]
Read a file.
rec[over] file
Recover file if it was previously saved.
res[ize] [+|-]size
Vi mode only. Grow or shrink the current screen.
rew[ind][!]
Rewind the argument list.
se[t] [option[=[value]] ...] [nooption ...] [option? ...] [all]
Display or set editor options.
sh[ell]
Run a shell program.
so[urce] file
Read and execute ex commands from a file.
[range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]
[range] & [options] [count] [flags]
[range] ~ [options] [count] [flags]
Make substitutions.
su[spend][!]
st[op][!]
<suspend>
Suspend the edit session.
[Tt]a[g][!] tagstring
Edit the file containing the specified tag.
tagn[ext][!]
Edit the file containing the next context for the current tag.
tagp[op][!] [file | number]
Pop to the specified tag in the tags stack.
tagp[rev][!]
Edit the file containing the previous context for the current tag.
unm[ap][!] lhs
Unmap a mapped string.
ve[rsion]
Display the version of the ex/vi editor.
[line] vi[sual] [type] [count] [flags]
Ex mode only. Enter vi.
[Vi]i[sual][!] [+cmd] [file]
Vi mode only. Edit a new file.
viu[sage] [command]
Display usage for a vi command.
[range] w[rite][!] [>>] [file]
[range] w[rite] [!] [file]
[range] wn[!] [>>] [file]
[range] wq[!] [>>] [file]
Write the file.
[range] x[it][!] [file]
Write the file if it has been modified.
[range] ya[nk] [buffer] [count]
Copy the specified lines to a buffer.
[line] z [type] [count] [flags]
Adjust the window.

SET OPTIONS

There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values.
In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbreviations. The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associated value.
Options apply to both ex and vi modes, unless otherwise specified.
altwerase [off]
Vi only. Select an alternate word erase algorithm.
autoindent, ai [off]
Automatically indent new lines.
autoprint, ap [off]
Ex only. Display the current line automatically.
autowrite, aw [off]
Write modified files automatically when changing files.
backup [""]
Backup files before they are overwritten.
beautify, bf [off]
Discard control characters.
cdpath [environment variable CDPATH, or current directory]
The directory paths used as path prefixes for the cd command.
cedit [no default]
Set the character to edit the colon command-line history.
columns, co [80]
Set the number of columns in the screen.
comment [off]
Vi only. Skip leading comments in shell, C and C++ language files.
directory, dir [environment variable TMPDIR, or /tmp]
The directory where temporary files are created.
edcompatible, ed [off]
Remember the values of the ``c'' and ``g'' suffices to the substitute commands, instead of initializing them as unset for each new command.
errorbells, eb [off]
Ex only. Announce error messages with a bell.
exrc, ex [off]
Read the startup files in the local directory.
extended [off]
Regular expressions are extended (i.e. egrep(1)-style) expressions.
filec [no default]
Set the character to perform file path completion on the colon command line.
flash [on]
Flash the screen instead of beeping the keyboard on error.
hardtabs, ht [8]
Set the spacing between hardware tab settings.
iclower [off]
Makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string.
ignorecase, ic [off]
Ignore case differences in regular expressions.
keytime [6]
The 10th's of a second ex/vi waits for a subsequent key to complete a key mapping.
leftright [off]
Vi only. Do left-right scrolling.
lines, li [24]
Vi only. Set the number of lines in the screen.
lisp [off]
Vi only. Modify various search commands and options to work with Lisp. This option is not yet implemented.
list [off]
Display lines in an unambiguous fashion.
lock [on]
Attempt to get an exclusive lock on any file being edited, read or written.
magic [on]
Treat certain characters specially in regular expressions.
matchtime [7]
Vi only. The 10th's of a second ex/vi pauses on the matching character when the showmatch option is set.
mesg [on]
Permit messages from other users.
modelines, modeline [off]
Read the first and last few lines of each file for ex commands. This option will never be implemented.
noprint [""]
Characters that are never handled as printable characters.
number, nu [off]
Precede each line displayed with its current line number.
octal [off]
Display unknown characters as octal numbers, instead of the default hexadecimal.
open [on]
Ex only. If this option is not set, the open and visual commands are disallowed.
optimize, opt [on]
Vi only. Optimize text throughput to dumb terminals. This option is not yet implemented.
paragraphs, para [IPLPPPQPP LIpplpipbp]
Vi only. Define additional paragraph boundaries for the { and } commands.
path []
Define additional directories to search for files being edited.
print [""]
Characters that are always handled as printable characters.
prompt [on]
Ex only. Display a command prompt.
readonly, ro [off]
Mark the file and session as read-only.
recdir [/var/tmp/vi.recover]
The directory where recovery files are stored.
redraw, re [off]
Vi only. Simulate an intelligent terminal on a dumb one. This option is not yet implemented.
remap [on]
Remap keys until resolved.
report [5]
Set the number of lines about which the editor reports changes or yanks.
ruler [off]
Vi only. Display a row/column ruler on the colon command line.
scroll, scr [window / 2]
Set the number of lines scrolled.
searchincr [off]
Makes the / and ? commands incremental.
sections, sect [NHSHH HUnhsh]
Vi only. Define additional section boundaries for the [[ and ]] commands.
secure [off]
Turns off all access to external programs.
shell, sh [environment variable SHELL, or /bin/sh]
Select the shell used by the editor.
shellmeta [~{[*?$`'"]
Set the meta characters checked to determine if file name expansion is necessary.
shiftwidth, sw [8]
Set the autoindent and shift command indentation width.
showmatch, sm [off]
Vi only. Note matching ``{'' and ``('' for ``}'' and ``)'' characters.
showmode, smd [off]
Vi only. Display the current editor mode and a ``modified'' flag.
sidescroll [16]
Vi only. Set the amount a left-right scroll will shift.
slowopen, slow [off]
Delay display updating during text input. This option is not yet implemented.
sourceany [off]
Read startup files not owned by the current user. This option will never be implemented.
tabstop, ts [8]
This option sets tab widths for the editor display.
taglength, tl [0]
Set the number of significant characters in tag names.
tags, tag [tags /var/db/libc.tags /sys/kern/tags]
Set the list of tags files.
term, ttytype, tty [environment variable TERM]
Set the terminal type.
terse [off]
This option has historically made editor messages less verbose. It has no effect in this implementation.
tildeop [off]
Modify the ~ command to take an associated motion.
timeout, to [on]
Time out on keys which may be mapped.
ttywerase [off]
Vi only. Select an alternate erase algorithm.
verbose [off]
Vi only. Display an error message for every error.
w300 [no default]
Vi only. Set the window size if the baud rate is less than 1200 baud.
w1200 [no default]
Vi only. Set the window size if the baud rate is equal to 1200 baud.
w9600 [no default]
Vi only. Set the window size if the baud rate is greater than 1200 baud.
warn [on]
Ex only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a ! command.
window, w, wi [environment variable LINES]
Set the window size for the screen.
windowname [off]
Change the icon/window name to the current file name even if it can't be restored on editor exit.
wraplen, wl [0]
Vi only. Break lines automatically, the specified number of columns from the left-hand margin. If both the wraplen and wrapmargin edit options are set, the wrapmargin value is used.
wrapmargin, wm [0]
Vi only. Break lines automatically, the specified number of columns from the right-hand margin. If both the wraplen and wrapmargin edit options are set, the wrapmargin value is used.
wrapscan, ws [on]
Set searches to wrap around the end or beginning of the file.
writeany, wa [off]
Turn off file-overwriting checks.

ENVIRONMENT VARIABLES

COLUMNS
The number of columns on the screen. This value overrides any system or terminal specific values. If the COLUMNS environmental variable is not set when ex/vi runs, or the columns option is explicitly reset by the user, ex/vi enters the value into the environment.
EXINIT
A list of ex startup commands, read if the variable NEXINIT is not set.
HOME
The user's home directory, used as the initial directory path for the startup ``$HOME/.nexrc'' and ``$HOME/.exrc'' files. This value is also used as the default directory for the vi cd command.
LINES
The number of rows on the screen. This value overrides any system or terminal specific values. If the LINES environmental variable is not set when ex/vi runs, or the lines option is explicitly reset by the user, ex/vi enters the value into the environment.
NEXINIT
A list of ex startup commands.
SHELL
The user's shell of choice (see also the shell option).
TERM
The user's terminal type. The default is the type ``unknown''. If the TERM environmental variable is not set when ex/vi runs, or the term option is explicitly reset by the user, ex/vi enters the value into the environment.
TMPDIR
The location used to stored temporary files (see also the directory edit option).

ASYNCHRONOUS EVENTS

SIGALRM
Vi/ex uses this signal for periodic backups of file modifications and to display ``busy'' messages when operations are likely to take a long time.
SIGHUP
SIGTERM
If the current buffer has changed since it was last written in its entirety, the editor attempts to save the modified file so it can be later recovered. See the vi/ex Reference manual section entitled ``Recovery'' for more information.
SIGINT
When an interrupt occurs, the current operation is halted, and the editor returns to the command level. If interrupted during text input, the text already input is resolved into the file as if the text input had been normally terminated.
SIGWINCH
The screen is resized. See the vi/ex Reference manual section entitled ``Sizing the Screen'' for more information.
SIGCONT
SIGQUIT
SIGTSTP
Vi/ex ignores these signals.

FILES

/bin/sh
The default user shell.
/etc/vi.exrc
System-wide vi startup file.
/tmp
Temporary file directory.
/var/tmp/vi.recover
The default recovery file directory.
$HOME/.nexrc
1st choice for user's home directory startup file.
$HOME/.exrc
2nd choice for user's home directory startup file.
.nexrc
1st choice for local directory startup file.
.exrc
2nd choice for local directory startup file.

SEE ALSO

ctags(1), more(1), curses(3), dbopen(3)
The ``Vi Quick Reference'' card.
``An Introduction to Display Editing with Vi'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the closest thing available to an introduction to the vi screen editor.
``Ex Reference Manual (Version 3.7)'', found in the ``UNIX User's Manual Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual sets. This document is the final reference for the ex editor, as distributed in most historic 4BSD and System V systems.
``Edit: A tutorial'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.3BSD manual set. This document is an introduction to a simple version of the ex screen editor.
``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual Supplementary Documents'' section of the 4.4BSD manual set. This document is the final reference for the nex/nvi text editors, as distributed in 4.4BSD and 4.4BSD-Lite.
Roff source for all of these documents is distributed with nex/nvi in the nvi/USD.doc directory of the nex/nvi source code.
The files ``autowrite'', ``input'', ``quoting'' and ``structures'' found in the nvi/docs/internals directory of the nex/nvi source code.

HISTORY

The nex/nvi replacements for the ex/vi editor first appeared in 4.4BSD.

STANDARDS

Nex/nvi is close to IEEE Std1003.2 (``POSIX''). That document differs from historical ex/vi practice in several places; there are changes to be made on both sides.

nvi-1.81.6/docs/html/vi.ref.html0100444000076400001440000120347210720065723015435 0ustar skimousers Untitled

1 Description

Vi is a screen oriented text editor. Ex is a line-oriented text editor. Ex and vi are different interfaces to the same program, and it is possible to switch back and forth during an edit session. View is the equivalent of using the -R (read-only) option of vi .

This reference manual is the one provided with the nex/nvi versions of the ex/vi text editors. Nex/nvi are intended as bug-for-bug compatible replacements for the original Fourth Berkeley Software Distribution (4BSD) ex/vi programs. This reference manual is accompanied by a traditional-style manual page. That manual page describes the functionality found in ex/vi in far less detail than the description here. In addition, it describes the system interface to ex/vi, e.g. command line options, session recovery, signals, environmental variables, and similar things.

This reference is intended for users already familiar with ex/vi. Anyone else should almost certainly read a good tutorial on the editor first. If you are in an unfamiliar environment, and you absolutely have to get work done immediately, see the section entitled “Fast Startup” in the manual page. It is probably enough to get you started.

There are a few features in nex/nvi that are not found in historic versions of ex/vi. Some of the more interesting of those features are briefly described in the next section, entitled “Additional Features” . For the rest of this document, nex/nvi is used only when it is necessary to distinguish it from the historic implementations of ex/vi.

Future versions of this software will be periodically made available by anonymous ftp, and can be retrieved from ftp.cs.berkeley.edu, in the directory ucb/4bsd.

2 Additional Features in Nex/Nvi

There are a few features in nex/nvi that are not found in historic versions of ex/vi. Some of the more interesting of these are as follows:

  • 8-bit clean data, large lines, files

    Nex/nvi will edit any format file. Line lengths are limited by available memory, and file sizes are limited by available disk space. The vi text input mode command <control-X> can insert any possible character value into the text.

  • Background and foreground screens

    The bg command backgrounds the current screen, and the fg command foregrounds backgrounded screens. The display command can be used to list the background screens.

  • Command Editing

    You can enter a normal editing window on the collected commands that you've entered on the vi colon command-line, and then modify and/or execute the commands. See the cedit edit option for more information.

  • Displays

    The display command can be used to display the current buffers, the backgrounded screens, and the tags stack.

  • Extended Regular Expressions

    The extended option causes Regular Expressions to be interpreted as as Extended Regular Expressions, (i.e. egrep(1) style Regular Expressions).

  • File Name Completion

    It is possible to do file name completion and file name displays when entering commands on the vi colon command-line. See the filec option for more information.

  • Infinite undo

    Changes made during an edit session may be rolled backward and forward. A . command immediately after a u command continues either forward or backward depending on whether the u command was an undo or a redo.

  • Left-right scrolling

    The leftright option causes nvi to do left-right screen scrolling, instead of the traditional vi line wrapping.

  • Message Catalogs

    It is possible to display informational and error messages in different languages by providing a catalog of messages. See the msgcat option and the file catalog/READMEfor more information.

  • Incrementing numbers

    The # command increments or decrements the number referenced by the cursor.

  • Previous file

    The previous command edits the previous file from the argument list.

  • Scripting languages

    The :pe[rl] cmd, :perld[o] cmd and :tc[l] cmd commands execute Perl and Tcl/Tk commands, respectively, on lines from the edit buffer. See the “Scripting Languages” section and the specific commands for more information.

  • Split screens

    The Edit , Ex , Next , Previous , Tag and Visual (in vi mode) commands divide the screen into multiple editing regions and then perform their normal function in a new screen area. The <control-W> command rotates between the foreground screens. The resize command can be used to grow or shrink a particular screen.

  • Tag stacks

    Tags are now maintained in a stack. The <control-T> command returns to the previous tag location. The tagpop command returns to the most recent tag location by default, or, optionally to a specific tag number in the tag stack, or the most recent tag from a specified file. The display command can be used to list the tags stack. The tagtop command returns to the top of the tag stack.

  • Usage information

    The exusage and viusage commands provide usage information for all of the ex and vi commands by default, or, optionally, for a specific command or key.

  • Word search

    The <control-A> command searches for the word referenced by the cursor.

3 Startup Information

Ex/vi interprets one of two possible environmental variables and reads up to three of five possible files during startup. The variables and files are expected to contain ex commands, not vi commands. In addition, they are interpreted before the file to be edited is read, and therefore many ex commands may not be used. Generally, any command that requires output to the screen or that needs a file upon which to operate, will cause an error if included in a startup file or environmental variable.

Because the ex command set supported by nex/nvi is a superset of the command set supported by historical implementations of ex , nex/nvi can use the startup files created for the historical implementations, but the converse may not be true.

If the -s (the historic - option) is specified, or if standard input is redirected from a file, all environmental variables and startup files are ignored.

Otherwise, startup files and environmental variables are handled in the following order:

  1. The file /etc/vi.exrcis read, as long as it is owned by root or the effective user ID of the user.
  2. The environmental variable NEXINIT(or the variable EXINIT, if NEXINITis not set) is interpreted.
  3. If neither NEXINITor EXINITwas set, and the HOMEenvironmental variable is set, the file $HOME/.nexrc(or the file $HOME/.exrc, if $HOME/.nexrcdoes not exist) is read, as long as the effective user ID of the user is root or is the same as the owner of the file.
         
         
    When the $HOME directory is being used for both nex/nvi and an historic implementation of ex/vi, a possible solution is to put nex/nvi specific commands in the .nexrcfile, along with a :source $HOME/.exrc command to read in the commands common to both implementations.
  4. If the exrc option was turned on by one of the previous startup information sources, the file .nexrc(or the file .exrc, if .nexrcdoes not exist) is read, as long as the effective user ID of the user is the same as the owner of the file.

No startup file is read if it is writable by anyone other than its owner.

It is not an error for any of the startup environmental variables or files not to exist.

Once all environmental variables are interpreted, and all startup files are read, the first file to be edited is read in (or a temporary file is created). Then, any commands specified using the -c option are executed, in the context of that file.

4 Recovery

There is no recovery program for nex/nvi, nor does nex/nvi run setuid. Recovery files are created readable and writable by the owner only. Users may recover any file which they can read, and the superuser may recover any edit session.

Edit sessions are backed by files in the directory named by the recdir option (the directory /var/tmp/vi.recoverby default), and are named “vi.XXXXXX”, where “XXXXXX” is a number related to the process ID. When a file is first modified, a second recovery file containing an email message for the user is created, and is named “recover.XXXXXX”, where, again, “XXXXXX” is associated with the process ID. Both files are removed at the end of a normal edit session, but will remain if the edit session is abnormally terminated or the user runs the ex preserve command.

The recdir option may be set in either the user's or system's startup information, changing the recovery directory. (Note, however, that if a memory based file system is used as the backup directory, each system reboot will delete all of the recovery files! The same caution applies to directories such as /tmpwhich are cleared of their contents by a system reboot, or /usr/tmpwhich is periodically cleared of old files on many systems.)

The recovery directory should be owned by root, or at least by a pseudo-user. In addition, if directory “sticky-bit” semantics are available, the directory should have the sticky-bit set so that files may only be removed by their owners. The recovery directory must be read, write, and executable by any user, i.e. mode 1777.

If the recovery directory does not exist, ex/vi will attempt to create it. This can result in the recovery directory being owned by a normal user, which means that that user will be able to remove other user's recovery and backup files. This is annoying, but is not a security issue as the user cannot otherwise access or modify the files.

The recovery file has all of the necessary information in it to enable the user to recover the edit session. In addition, it has all of the necessary email headers for sendmail(8). When the system is rebooted, all of the files in /var/tmp/vi.recovernamed “recover.XXXXXX” should be sent to their owners, by email, using the -t option of sendmail (or a similar mechanism in other mailers). If ex/vi receives a hangup (SIGHUP) signal, or the user executes the ex preserve command, ex/vi will automatically email the recovery information to the user.

If your system does not have the sendmail utility (or a mailer program which supports its interface) the source file nvi/common/recover.cwill have to be modified to use your local mail delivery programs. Note, if nex/nvi is changed to use another mailer, it is important to remember that the owner of the file given to the mailer is the nex/nvi user, so nothing in the file should be trusted as it may have been modified in an effort to compromise the system.

Finally, the owner execute bit is set on backup files when they are created, and unset when they are first modified, e.g. backup files that have no associated email recovery file will have this bit set. (There is also a small window where empty files can be created and not yet have this bit set. This is due to the method in which the files are created.) Such files should be deleted when the system reboots.

A simple way to do this cleanup is to run the Bourne shell script recover , from your /etc/rc.local(or other system startup) file. The script should work with the historic Bourne shell, a POSIX 1003.2 shell or the Korn shell. The recover script is installed as part of the nex/nvi installation process.

Consult the manual page for details on recovering preserved or aborted editing sessions.

5 Sizing the Screen

The size of the screen can be set in a number of ways. Ex/vi takes the following steps until values are obtained for both the number of rows and number of columns in the screen.

  1. If the environmental variable LINESexists, it is used to specify the number of rows in the screen.
  2. If the environmental variable COLUMNSexists, it is used to specify the number of columns in the screen.
  3. The TIOCGWINSZ ioctl(2) is attempted on the standard error file descriptor.
  4. The termcap entry (or terminfo entry on System V machines) is checked for the “li” entry (rows) and the “co” entry (columns).
  5. The number of rows is set to 24, and the number of columns is set to 80.

If a window change size signal (SIGWINCH) is received, the new window size is retrieved using the TIOCGWINSZ ioctl(2) call, and all other information is ignored.

6 Character Display

In both ex and vi printable characters as defined by isprint(3) are displayed using the local character set.

Non-printable characters, for which iscntrl(3) returns true, and which are less than octal \e040, are displayed as the string “^<character>”, where <character>is the character that is the original character's value offset from the “@” character. For example, the octal character \e001 is displayed as “^A”. If iscntrl(3) returns true for the octal character \e177, it is displayed as the string “^?”. All other characters are displayed as either hexadecimal values, in the form “0x<high-halfbyte> ... 0x<low-halfbyte>”, or as octal values, in the form “e<high-one-or-two-bits> ... e<low-three-bits>”. The display of unknown characters is based on the value of the octal option.

In vi command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In vi text input mode, the cursor is positioned on the first column of characters which take up more than one column on the screen.

7 Multiple Screens

Nvi supports multiple screens by dividing the window into regions. It also supports stacks of screens by permitting the user to change the set of screens that are currently displayed.

The Edit , Ex , Fg , Next , Previous , Tag and Visual (in vi mode) commands divide the current screen into two regions of approximately equal size and then perform their usual action in a new screen area. If the cursor is in the lower half of the screen, the screen will split up, i.e. the new screen will be above the old one. If the cursor is in the upper half of the screen, the new screen will be below the old one.

When more than one screen is editing a file, changes in any screen are reflected in all other screens editing the same file. Exiting a screen without saving any changes (or explicitly discarding them) is permitted until the last screen editing the file is exited, at which time the changes must be saved or discarded.

The resize command permits resizing of individual screens. Screens may be grown, shrunk or set to an absolute number of rows.

The ^W command is used to switch between screens. Each ^W moves to the next lower screen in the window, or to the first screen in the window if there are no lower screens.

The bg command “backgrounds” the current screen. The screen disappears from the window, and the rows it occupied are taken over by a neighboring screen. It is an error to attempt to background the only screen in the window.

The display screens command displays the names of the files associated with the current backgrounded screens in the window.

The fg [file] command moves the specified screen from the list of backgrounded screens to the foreground. If no file argument is specified, the first screen on the list is foregrounded. By default, foregrounding consists of backgrounding the current screen, and replacing its space in the window with the foregrounded screen.

Capitalizing the first letter of the command, i.e. Fg , will foreground the backgrounded screen in a new screen instead of swapping it with the current screen.

If the last foregrounded screen in the window is exited, and there are backgrounded screens, the first screen on the list of backgrounded screens takes over the window.

8 Tags, Tag Stacks, and Cscope

Nvi supports the historic vi tag command <control-]> , and the historic ex tag command tag . These commands change the current file context to a new location, based on information found in the tagsfiles. If you are unfamiliar with these commands, you should review their description in the ex and vi commands section of this manual. For additional information on tags files, see the discussion of the tags edit option and the system ctags(1) manual page.

In addition, nvi supports the notion of “tags stacks”, using the <control-T> command. The <control-T> command returns the user to the previous context, i.e., the last place from which a <control-]> or tag command was entered. These three commands provide the basic functionality which allows you to use vi to review source code in a structured manner.

Nvi also provides two other basic ex commands for tag support: tagpop and tagtop . The tagpop command is identical to the <control-T> command, with the additional functionality that you may specify that modifications to the current file are to be discarded. This cannot be done using the <control-T> command. The tagtop command discards all of the contexts that have been pushed onto the tag stack, returning to the context from which the first <control-]> or tag command was entered.

The historic ctags(1) tags file format supports only a single location per tag, normally the function declaration or structure or string definition. More sophisticated source code tools often provide multiple locations per tag, e.g., a list of the places from which a function is called or a string definition is used. An example of this functionality is the System V source code tool, cscope .


Cscope creates a database of information on source code files, and supports a query language for that information as described in the cscope(1) manual page. Nvi contains an interface to the cscope query language which permits you to query cscope and then sequentially step through the locations in the sources files which cscope returns. There are two nvi commands which support this ability to step through multiple locations. They are the ex commands tagnext and tagprev . The tagnext command moves to the next location for the current tag. The tagprev command moves to the previous location for the current tag. (See the tagnext and tagprev command discussion in the ex commands section of this manual for more information.) At any time during this sequential walk, you may use the <control-]> , tag or cscope commands to move to a new tag context, and then use the <control-T> or tagpop commands to return and continue stepping through the locations for this tag. This is similar to the previous model of a simple tag stack, except that each entry in the tag stack may have more than one file context that is of interest.

Although there is no widely distributed version of ctags(1) that creates tags files with multiple locations per tag, nvi has been written to understand the obvious extension to the historic tags file format, i.e., more than a single line in the tags file with the same initial tag name. If you wish to extend your ctags implementation or other tool with which you build tags files, this extension should be simple and will require no changes to nvi .

The nvi and cscope interface is based on the new ex command cscope , which has five subcommands: add , find , help , kill and reset . The subcommand find itself has eight subcommands: c , d , e , f , g , i , s and t .

  • cs[cope] a[dd] file

    The add command attaches to the specified cscope database. The file name is expanded using the standard filename expansions. If file is a directory, the file “cscope.out” in that directory is used as the database.

    After nvi attaches to a new database, all subsequent cscope queries will be asked of that database. The result of any single query is the collection of response to the query from all of the attached databases.

         
         
    If the “CSCOPE_DIRS” environmental variable is set when nvi is run, it is expected to be a <colon> or <blank>-separated list of cscope databases or directories containing cscope databases, to which the user wishes to attach.
  • :cs[cope] f[ind] c|d|e|f|g|i|s|t buffer|pattern

    The find command is the cscope query command for nvi . For this command, nvi queries all attached cscope databases for the pattern. If the pattern is a double-quote character followed by a valid buffer name (e.g., "<character>" ), then the contents of the named buffer are used as the pattern. Otherwise, the pattern is a Regular Expression.

         
         
    The find command pushes the current location onto the tags stack, and switches to the first location resulting from the query, if the query returned at least one result.
         
         
    File names returned by the cscope query, if not absolute paths, are searched for relative to the directory where the cscope database is located. In addition, if the file “cscope.tpath” appears in the same directory as the cscope database, it is expected to contain a colon-separated list of directory names where files referenced by its associated cscope database may be found.
         
         
    The find subcommand is one of the following:
    c
    Find callers of the name.
    d
    Find all function calls made from name.
    e
    Find pattern.
    f
    Find files with name as substring.
    g
    Find definition of name.
    i
    Find files #including name.
    s
    Find all uses of name.
    t
    Find assignments to name.
  • :cs[cope] h[elp] [command]

    List the cscope commands, or optionally list usage help for any single cscope command.

  • :display c[onnections]

    Display the list of cscope databases to which nvi is currently connected.

  • :cs[cope] k[ill] #

    Disconnect from a specific cscope database. The connection number is the one displayed by the ex display connections command.

  • :cs[cope] r[eset]

    Disconnect from all attached cscope databases.

Cscope is not freely redistributable software, but is fairly inexpensive and easily available. To purchase a copy of cscope , see http://www.att.com/ssg/products/toolchest.html.

9 Regular Expressions and Replacement Strings

Regular expressions are used in line addresses, as the first part of the ex substitute , global , and v commands, and in search patterns.

The regular expressions supported by ex/vi are, by default, the Basic Regular Expressions (BRE's) described in the IEEE POSIX Standard 1003.2. The extended option causes all regular expressions to be interpreted as the Extended Regular Expressions (ERE's) described by the same standard. (See re_format(7) for more information.) Generally speaking, BRE's are the Regular Expressions found in ed(1) and grep(1), and ERE's are the Regular Expressions found in egrep(1).

The following is not intended to provide a description of Regular Expressions. The information here only describes strings and characters which have special meanings in the ex/vi version of RE's, or options which change the meanings of characters that normally have special meanings in RE's.

  1. An empty RE (e.g. “//” or “??” is equivalent to the last RE used.
  2. The construct “e<” matches the beginning of a word.
  3. The construct “e>” matches the end of a word.
  4. The character “~” matches the replacement part of the last substitute command.

When the magic option is not set, the only characters with special meanings are a “^” character at the beginning of an RE, a “$” character at the end of an RE, and the escaping character “e”. The characters “.”, “*”, “[” and “~” are treated as ordinary characters unless preceded by a “e”; when preceded by a “e” they regain their special meaning.

Replacement strings are the second part of a substitute command.

The character “&” (or “e&” if the magic option is not set) in the replacement string stands for the text matched by the RE that is being replaced. The character “~” (or “e~” if the magic option is not set) stands for the replacement part of the previous substitute command. It is only valid after a substitute command has been performed.

The string “e#”, where “#” is an integer value from 1 to 9, stands for the text matched by the portion of the RE enclosed in the “#”'th set of escaped parentheses, e.g. “e(” and “e)”. For example, “s/abce(.*e)def/e1/” deletes the strings “abc” and “def” from the matched pattern.

The strings “el”, “eu”, “eL” and “eU” can be used to modify the case of elements in the replacement string. The string “el” causes the next character to be converted to lowercase; the string “eu” behaves similarly, but converts to uppercase (e.g. s/abc/eU&/replaces the string abcwith ABC). The string “eL” causes characters up to the end of the string or the next occurrence of the strings “ee” or “eE” to be converted to lowercase; the string “eU” behaves similarly, but converts to uppercase.

If the entire replacement pattern is “%”, then the last replacement pattern is used again.

In vi , inserting a <control-M>into the replacement string will cause the matched line to be split into two lines at that point. (The <control-M>will be discarded.)

10 Scripting Languages

The nvi editor currently supports two scripting languages, Tcl/Tk and Perl. (Note that Perl4 isn't sufficient, and that the Perl5 used must be version 5.002 or later. See the “Building Nvi” section for more information.

The scripting language interface is still being worked on, therefore the following information is probably incomplete, probably wrong in cases, and likely to change. See the perl_apiand tcl_apisource directories for more information. As a quick reference, the following function calls are provided for both the Perl and Tcl interfaces. The Perl interface uses a slightly different naming convention, e.g. “viFindScreen” is named “VI::FindScreen”.

  • viFindScreen file

    Return the screenIdassociated with file.

  • viAppendLine screenId lineNumber text

    Append textas a new line after line number lineNumber, in the screen screenId.

  • viDelLine screenId lineNum

    Delete the line lineNumberfrom the screen screenId.

  • viGetLine screenId lineNumber

    Return the line lineNumberfrom the screen screenId.

  • viInsertLine screenId lineNumber text

    Insert textas a new line before line number lineNumberin the screen screenId.

  • viLastLine screenId

    Return the line number of the last line in the screen screenId.

  • viSetLine screenId lineNumber text

    Change the line lineNumberin the screen screenIdto match the specified text.

  • viGetMark screenId mark

    Return the current line and column for the specified markfrom the screen screenId.

  • viSetMark screenId mark line column

    Set the specified markto be at line line, column column, in the screen screenId.

  • viGetCursor screenId

    Return the current line and column for the cursor in the screen screenId.

  • viSetCursor screenId line column

    Set the cursor in the screen screenIdto the specified lineand column.

  • viMsg screenId text

    Display the specified textas a vi message in the screen screenId.

  • viNewScreen screenId [file]

    Create a new screen.

  • viEndScreen screenId

    Exit the screen screenId.

  • viSwitchScreen screenId screenId

    Switch from the screen screenIdto the screen screenId.

  • viMapKey screenId key tclproc

    Map the specified keyin the screen screenIdto the Tcl procedure tclproc.

  • viUnmMapKey screenId key

    Unmap the specified keyin the screen screenId

  • viGetOpt screenId option

    Return the value of the specified optionfrom the screen screenId.

  • viSetOpt screenId command

    Set one or more options in the screen screenId.

11 General Editor Description

When ex or vi are executed, the text of a file is read (or a temporary file is created), and then all editing changes happen within the context of the copy of the file. No changes affect the actual file until the file is written out, either using a write command or another command which is affected by the autowrite option.

All files are locked (using the flock(2) or fcntl(2) interfaces) during the edit session, to avoid inadvertently making modifications to multiple copies of the file. If a lock cannot be obtained for a file because it is locked by another process, the edit session is read-only (as if the readonly option or the -R flag had been specified). If a lock cannot be obtained for other reasons, the edit session will continue, but the file status information (see the <control-G> command) will reflect this fact.

Both ex and vi are modeful editors, i.e. they have two modes, “command” mode and “text input” mode. The former is intended to permit you to enter commands which modifies already existing text. The latter is intended to permit you to enter new text. When ex first starts running, it is in command mode, and usually displays a prompt (see the prompt option for more information). The prompt is a single colon “:” character. There are three commands that switch ex into text input mode: append , change and insert . Once in input mode, entering a line containing only a single period “.” ends text input mode and returns to command mode, where the prompt is redisplayed.

When vi first starts running, it is in command mode as well. There are eleven commands that switch vi into text input mode: A , a , C , c , I , i , O , o , R , S and s . Once in input mode, entering an <escape>character ends text input mode and returns to command mode.

Ex/vi present three different interfaces to editing a file. Ex presents a line oriented interface. Vi presents a full screen display oriented interface, also known as “visual mode”. In addition, there is a third mode, “open mode”, which is line oriented, but supports cursor movement and editing within the displayed line, similarly to visual mode. Open mode is not yet implemented in nvi .

The following words have special meanings in both the ex and vi command descriptions:

  • <interrupt>

    The interrupt character is used to interrupt the current operation. Normally <control-C>, whatever character is set for the current terminal is used.

  • <literal-next>

    The literal next character is used to escape the subsequent character from any special meaning. This character is always <control-V>. If the terminal is not set up to do XON/XOFF flow control, then <control-Q>is used to mean literal next as well.

  • current pathname

    The pathname of the file currently being edited by vi. When the percent character “%” appears in a file name entered as part of an ex command argument, it is replaced by the current pathname. (The “%” character can be escaped by preceding it with a backslash.)

  • alternate pathname

    The name of the last file name mentioned in an ex command, or, the previous current pathname if the last file mentioned becomes the current file. When the hash mark character “#” appears in a file name entered as part of an ex command argument, it is replaced by the alternate pathname. (The “#” character can be escaped by preceding it with a backslash.)

  • buffer

    One of a number of named areas for saving copies of text. Commands that change or delete text can save the changed or deleted text into a specific buffer, for later use, if the command allows it (i.e. the ex change command cannot save the changed text in a named buffer). Buffers are named with a single character, preceded by a double quote, e.g. "<character>" in vi and without the double quote, e.g. <character>, in ex . (The double quote isn't necessary for ex because buffers names are denoted by their position in the command line.) Historic implementations of ex/vi limited <character>to the alphanumeric characters; nex/nvi permits the use of any character without another meaning in the position where a buffer name is expected.

         
         
    Buffers named by uppercase characters are the same as buffers named by lowercase characters, e.g. the buffer named by the English character “A” is the same as the buffer named by the character “a”, with the exception that, if the buffer contents are being changed (as with a text deletion or vi change command), the text is appended to the buffer, instead of replacing the current contents.
         
         
    The buffers named by the numeric characters (in English, “1” through “9”), are special. If a region of text including characters from more than one line, or a single line of text specified by using a line-oriented motion, is changed or deleted in the file using the vi change or delete commands, a copy of the text is placed into the numeric buffer “1”, regardless of the user specifying another buffer in which to save it. In addition, there are a few commands which, when used as a motionwith the vi change and delete commands, always copy the specified region of text into the numeric buffers regardless of the region including characters from more than one line. These commands are:
         
         

    <control-A> % ( )
    `<character> / ? N
    n { }

         
         
    Before this copy is done, the previous contents of buffer “1” are moved into buffer “2”, “2” into buffer “3”, and so on. The contents of buffer “9” are discarded. In vi , text may be explicitly stored into the numeric buffers. In this case, the buffer rotation described above occurs before the replacement of the buffer's contents. The numeric buffers are only available in visualand openmodes, and are not accessible by ex in any way, although changed and deleted text is still stored there while in ex mode.
         
         
    When a vi command synopsis shows both a [buffer]and a [count], they may be presented in any order.
         
         
    Finally, all buffers are either “line” or “character” oriented. All ex commands which store text into buffers are line oriented. Some vi commands which store text into buffers are line oriented, and some are character oriented; the description for each applicable vi command notes whether text copied into buffers using the command is line or character oriented. In addition, the vi command display buffers displays the current orientation for each buffer. Generally, the only importance attached to this orientation is that if the buffer is subsequently inserted into the text, line oriented buffers create new lines for each of the lines they contain, and character oriented buffers create new lines for any lines other than the first and last lines they contain. The first and last lines are inserted into the text at the current cursor position, becoming part of the current line. If there is more than one line in the buffer, however, the current line itself will be split.
  • unnamed buffer

    The unnamed buffer is a text storage area which is used by commands that use or operate on a buffer when no buffer is specified by the user. If the command stores text into a buffer, the text is stored into the unnamed buffer even if a buffer is also specified by the user. It is not possible to append text to the unnamed buffer. If text is appended to a named buffer, the named buffer contains both the old and new text, while the unnamed buffer contains only the new text. There is no way to explicitly reference the unnamed buffer.

         
         
    Historically, the contents of the unnamed buffer were discarded by many different commands, even ones that didn't store text into it. Nex/nvi never discards the contents of the unnamed buffer until new text replaces them.
  • whitespace

    The characters <tab> and <space>.

  • <carriage-return>

    The character represented by an ASCII <control-M>. This character is almost always treated identically to a <newline>character, but differs in that it can be escaped into the file text or into a command.

  • <newline>

    The character represented by an ASCII <control-J>. This character is almost always treated identically to a <control-M>character, but differs in that it cannot be escaped into the file text or into a command.

12 Vi Description

Vi takes up the entire screen to display the edited file, except for the bottom line of the screen. The bottom line of the screen is used to enter exp commands, and for vi error and informational messages. If no other information is being displayed, the default display can show the current cursor row and cursor column, an indication of whether the file has been modified, and the current mode of the editor. See the ruler and showmode options for more information.

Empty lines do not have any special representation on the screen, but lines on the screen that would logically come after the end of the file are displayed as a single tilde “~” character. To differentiate between empty lines and lines consisting of only whitespace characters, use the list option. Historically, implementations of vi have also displayed some lines as single asterisk “@” characters. These were lines that were not correctly displayed, i.e. lines on the screen that did not correspond to lines in the file, or lines that did not fit on the current screen. Nvi never displays lines in this fashion.

Vi is a modeful editor, i.e. it has two modes, “command” mode and “text input” mode. When vi first starts, it is in command mode. There are several commands that change vi into text input mode. The <escape>character is used to resolve the text input into the file, and exit back into command mode. In vi command mode, the cursor is always positioned on the last column of characters which take up more than one column on the screen. In vi text insert mode, the cursor is positioned on the first column of characters which take up more than one column on the screen.

When positioning the cursor to a new line and column, the type of movement is defined by the distance to the new cursor position. If the new position is close, the screen is scrolled to the new location. If the new position is far away, the screen is repainted so that the new position is on the screen. If the screen is scrolled, it is moved a minimal amount, and the cursor line will usually appear at the top or bottom of the screen. If the screen is repainted, the cursor line will appear in the center of the screen, unless the cursor is sufficiently close to the beginning or end of the file that this isn't possible. If the leftright option is set, the screen may be scrolled or repainted in a horizontal direction as well as in a vertical one.

A major difference between the historical vi presentation and nvi is in the scrolling and screen oriented position commands, <control-B>, <control-D>, <control-E>, <control-F>, <control-U>, <control-Y>, H, L and M. In historical implementations of vi, these commands acted on physical (as opposed to logical, or screen) lines. For lines that were sufficiently long in relation to the size of the screen, this meant that single line scroll commands might repaint the entire screen, scrolling or screen positioning commands might not change the screen or move the cursor at all, and some lines simply could not be displayed, even though vi would edit the file that contained them. In nvi, these commands act on logical, i.e. screen lines. You are unlikely to notice any difference unless you are editing files with lines significantly longer than a screen width.

Vi keeps track of the currently “most attractive” cursor position. Each command description (for commands that alter the current cursor position), specifies if the cursor is set to a specific location in the line, or if it is moved to the “most attractive cursor position”. The latter means that the cursor is moved to the cursor position that is horizontally as close as possible to the current cursor position. If the current line is shorter than the cursor position vi would select, the cursor is positioned on the last character in the line. (If the line is empty, the cursor is positioned on the first column of the line.) If a command moves the cursor to the most attractive position, it does not alter the current cursor position, and a subsequent movement will again attempt to move the cursor to that position. Therefore, although a movement to a line shorter than the currently most attractive position will cause the cursor to move to the end of that line, a subsequent movement to a longer line will cause the cursor to move back to the most attractive position.

In addition, the $ command makes the end of each line the most attractive cursor position rather than a specific column.

Each vi command described below notes where the cursor ends up after it is executed. This position is described in terms of characters on the line, i.e. “the previous character”, or, “the last character in the line”. This is to avoid needing to continually refer to on what part of the character the cursor rests.

The following words have special meaning for vi commands.

  • previous context

    The position of the cursor before the command which caused the last absolute movement was executed. Each vi command described in the next section that is considered an absolute movement is so noted. In addition, specifying any address to an ex command is considered an absolute movement.

  • motion

    A second vi command can be used as an optional trailing argument to the vi <, >, !, c, d, y, and (depending on the tildeop option) ~ commands. This command indicates the end of the region of text that's affected by the command. The motion command may be either the command character repeated (in which case it means the current line) or a cursor movement command. In the latter case, the region affected by the command is from the starting or stopping cursor position which comes first in the file, to immediately before the starting or stopping cursor position which comes later in the file. Commands that operate on lines instead of using beginning and ending cursor positions operate on all of the lines that are wholly or partially in the region. In addition, some other commands become line oriented depending on where in the text they are used. The command descriptions below note these special cases.

         
         
    The following commands may all be used as motion components for vi commands:
         
         

    <control-A> <control-H> <control-J> <control-M>
    <control-N> <control-P> <space> $
    % '<character> ( )
    + , - /
    0 ; ? B
    E F G H
    L M N T
    W [[ ]] ^
    _ `<character> b e
    f h j k
    l n t w
    { | }

         
         
    The optional count prefix available for some of the vi commands that take motion commands, or the count prefix available for the vi commands that are used as motion components, may be included and is always considered part of the motion argument. For example, the commands “c2w” and “2cw” are equivalent, and the region affected by the c command is two words of text. In addition, if the optional count prefix is specified for both the vi command and its motion component, the effect is multiplicative and is considered part of the motion argument. For example, the commands “4cw” and “2c2w” are equivalent, and the region affected by the c command is four words of text.
  • count

    A positive number used as an optional argument to most commands, either to give a size or a position (for display or movement commands), or as a repeat count (for commands that modify text). The count argument is always optional and defaults to 1 unless otherwise noted in the command description.

         
         
    When a vi command synopsis shows both a [buffer]and [count], they may be presented in any order.
  • word

    Generally, in languages where it is applicable, vi recognizes two kinds of words. First, a sequence of letters, digits and underscores, delimited at both ends by: characters other than letters, digits, or underscores, the beginning or end of a line, and the beginning or end of the file. Second, a sequence of characters other than letters, digits, underscores, or whitespace characters, delimited at both ends by: a letter, digit, underscore, or whitespace character, the beginning or end of a line, and the beginning or end of the file. For example, the characters “!@#abc$%^ ” contain three words: “!@#”, “abc” and “$%^”.

         
         
    Groups of empty lines (or lines containing only whitespace characters) are treated as a single word.
  • bigword

    A set of non-whitespace characters preceded and followed by whitespace characters or the beginning or end of the file or line. For example, the characters “!@#abc$%^ ” contain one bigword: “!@#abc$%^”.

         
         
    Groups of empty lines (or lines containing only whitespace characters) are treated as a single bigword.
  • paragraph

    An area of text that begins with either the beginning of a file, an empty line, or a section boundary, and continues until either an empty line, section boundary, or the end of the file.

         
         
    Groups of empty lines (or lines containing only whitespace characters) are treated as a single paragraph.
         
         
    Additional paragraph boundaries can be defined using the paragraphs option.
  • section

    An area of text that starts with the beginning of the file or a line whose first character is an open brace {” and continues until the next section or the end of the file.

         
         
    Additional section boundaries can be defined using the sections option.
  • sentence

    An area of text that begins with either the beginning of the file or the first nonblank character following the previous sentence, paragraph, or section boundary and continues until the end of the file or a period “.” exclamation point “!” or question mark “?” character, followed by either an end-of-line or two whitespace characters. Any number of closing parentheses “)”, brackets “]”, double-quote “"” or single quote “'” characters can appear between the period, exclamation point, or question mark and the whitespace characters or end-of-line.

         
         
    Groups of empty lines (or lines containing only whitespace characters) are treated as a single sentence.

    13 Vi Commands

The following section describes the commands available in the command mode of the vi editor. In each entry below, the tag line is a usage synopsis for the command character. In addition, the final line and column the cursor rests upon, and any options which affect the command are noted.

— Command: [count] <control-A>

Search forward counttimes for the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. The search is literal, i.e. no characters in the word have any special meaning in terms of Regular Expressions. It is an error if no matching pattern is found between the starting position and the end of the file.

     
     
The <control-A> command is an absolute movement. The <control-A> command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line where the word is found.
Column:
Set to the first character of the word.
Options:
Affected by the ignorecase and wrapscan options.

— Command: [count] <control-B>

Page backward countscreens. Two lines of overlap are maintained, if possible, by displaying the window starting at line (top_line - count * window_size) + 2, where window_sizeis the value of the window option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the beginning of the file.

Line:
Set to the last line of text displayed on the screen.
Column:
Set to the first nonblank character of the line.
Options:
Affected by the window option.

— Command: [count] <control-D>

Scroll forward countlines. If countis not specified, scroll forward the number of lines specified by the last <control-D> or <control-U> command. If this is the first <control-D> or <control-U> command, scroll forward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the end of the file.

Line:
Set to the current line plus the number of lines scrolled.
Column:
Set to the first nonblank character of the line.
Options:
None.

— Command: [count] <control-E>

Scroll forward countlines, leaving the cursor on the current line and column, if possible. It is an error if the movement is past the end of the file.

Line:
Unchanged unless the current line scrolls off the screen, in which case it is set to the first line on the screen.
Column:
Unchanged unless the current line scrolls off the screen, in which case it is set to the most attractive cursor position.
Options:
None.

— Command: [count] <control-F>

Page forward countscreens. Two lines of overlap are maintained, if possible, by displaying the window starting at line top_line + count * window_size - 2, where window_sizeis the value of the window option. (In the case of split screens, this size is corrected to the current screen size.) It is an error if the movement is past the end of the file.

Line:
Set to the first line on the screen.
Column:
Set to the first nonblank character of the current line.
Options:
Affected by the window option.

— Command: <control-G>

Display the file information. The information includes the current pathname, the current line, the number of total lines in the file, the current line as a percentage of the total lines in the file, if the file has been modified, was able to be locked, if the file's name has been changed, and if the edit session is read-only.

Line:
Unchanged.
Column:
Unchanged.
Options:
None.

— Command: [count] <control-H>
— Command: [count] h

Move the cursor back countcharacters in the current line. It is an error if the cursor is on the first character in the line.

     
     
The <control-H> and h commands may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the current - countcharacter, or, the first character in the line if countis greater than or equal to the number of characters in the line before the cursor.
Options:
None.

— Command: [count] <control-J>

— Command: [count] <control-N>

— Command: [count] j

Move the cursor down countlines without changing the current column. It is an error if the movement is past the end of the file.

     
     
The <control-J>, <control-N> and j commands may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the current line plus count.
Column:
The most attractive cursor position.
Options:
None.

— Command: <control-L>

— Command: <control-R>

Repaint the screen.

Line:
Unchanged.
Column:
Unchanged.
Options:
None.

— Command: [count] <control-M>

— Command: [count] +

Move the cursor down countlines to the first nonblank character of that line. It is an error if the movement is past the end of the file.

     
     
The <control-M> and + commands may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the current line plus count.
Column:
Set to the first nonblank character in the line.
Options:
None.

— Command: [count] <control-P>

— Command: [count] k

Move the cursor up countlines, without changing the current column. It is an error if the movement is past the beginning of the file.

     
     
The <control-P> and k commands may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the current line minus count.
Column:
The most attractive cursor position.
Options:
None.

— Command: <control-T>

Return to the most recent tag context. The <control-T> command is an absolute movement.

Line:
Set to the context of the previous tag command.
Column:
Set to the context of the previous tag command.
Options:
None.

— Command: [count] <control-U>

Scroll backward countlines. If countis not specified, scroll backward the number of lines specified by the last <control-D> or <control-U> command. If this is the first <control-D> or <control-U> command, scroll backward half the number of lines in the screen. (In the case of split screens, the default scrolling distance is corrected to half the current screen size.) It is an error if the movement is past the beginning of the file.

Line:
Set to the current line minus the amount scrolled.
Column:
Set to the first nonblank character in the line.
Options:
None.

— Command: <control-W>

Switch to the next lower screen in the window, or, to the first screen if there are no lower screens in the window.

Line:
Set to the previous cursor position in the window.
Column:
Set to the previous cursor position in the window.
Options:
None.

— Command: [count] <control-Y>

Scroll backward countlines, leaving the current line and column as is, if possible. It is an error if the movement is past the beginning of the file.

Line:
Unchanged unless the current line scrolls off the screen, in which case it is set to the last line of text displayed on the screen.
Column:
Unchanged unless the current line scrolls off the screen, in which case it is the most attractive cursor position.
Options:
None.

— Command: <control-Z>

Suspend the current editor session. If the file has been modified since it was last completely written, and the autowrite option is set, the file is written before the editor session is suspended. If this write fails, the editor session is not suspended.

Line:
Unchanged.
Column:
Unchanged.
Options:
Affected by the autowrite option.

— Command: <escape>

Execute ex commands or cancel partial commands. If an ex command is being entered (e.g. /, ?, : or !), the command is executed. If a partial command has been entered, e.g. “[0-9]*”, or “[0-9]*[!<>cdy]”, the command is cancelled. Otherwise, it is an error.

Line:
When an ex command is being executed, the current line is set as described for that command. Otherwise, unchanged.
Column:
When an ex command is being executed, the current column is set as described for that command. Otherwise, unchanged.
Options:
None.

— Command: <control-]>

Push a tag reference onto the tag stack. The tags files (see the tags option for more information) are searched for a tag matching the current word. The current word begins at the first non-whitespace character on or after the current cursor position, and extends up to the next non-word character or the end of the line. If a matching tag is found, the current file is discarded and the file containing the tag reference is edited.

     
     
If the current file has been modified since it was last completely written, the command will fail. The <control-]> command is an absolute movement.
Line:
Set to the line containing the matching tag string.
Column:
Set to the start of the matching tag string.
Options:
Affected by the tags and taglength options.

— Command: <control-^>

Switch to the most recently edited file.

     
     
If the file has been modified since it was last completely written, and the autowrite option is set, the file is written out. If this write fails, the command will fail. Otherwise, if the current file has been modified since it was last completely written, the command will fail.
Line:
Set to the line the cursor was on when the file was last edited.
Column:
Set to the column the cursor was on when the file was last edited.
Options:
Affected by the autowrite option.

— Command: [count] <space>

— Command: [count] l

Move the cursor forward countcharacters without changing the current line. It is an error if the cursor is on the last character in the line.

     
     
The <space> and l commands may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented. In addition, these commands may be used as the motion components of other commands when the cursor is on the last character in the line, without error.
Line:
Unchanged.
Column:
Set to the current character plus the next countcharacters, or to the last character on the line if countis greater than the number of characters in the line after the current character.
Options:
None.

— Command: [count] ! motion shell-argument(s)<carriage-return>

Replace text with results from a shell command. Pass the lines specified by the countand motionarguments as standard input to the program named by the shell option, and replace those lines with the output (both standard error and standard output) of that command.

     
     
After the motion is entered, vi prompts for arguments to the shell command.
     
     
Within those arguments, “%” and “#” characters are expanded to the current and alternate pathnames, respectively. The “!” character is expanded with the command text of the previous ! or :! commands. (Therefore, the command !<motion>! repeats the previous ! command.) The special meanings of “%”, “#” and “!” can be overridden by escaping them with a backslash. If no ! or :! command has yet been executed, it is an error to use an unescaped “!” character as a shell argument. The ! command does not do shell expansion on the strings provided as arguments. If any of the above expansions change the arguments the user entered, the command is redisplayed at the bottom of the screen.
     
     
Vi then executes the program named by the shell option, with a -c flag followed by the arguments (which are bundled into a single argument).
     
     
The ! command is permitted in an empty file.
     
     
If the file has been modified since it was last completely written, the ! command will warn you.
Line:
The first line of the replaced text.
Column:
The first column of the replaced text.
Options:
Affected by the shell option.

— Command: [count] # #|+|-

Increment or decrement the number referenced by the cursor. If the trailing character is a +or #, the number is incremented by count. If the trailing character is a -, the number is decremented by count.

     
     
A leading “0X” or “0x” causes the number to be interpreted as a hexadecimal number. Otherwise, a leading “0” causes the number to be interpreted as an octal number, unless a non-octal digit is found as part of the number. Otherwise, the number is interpreted as a decimal number, and may have a leading +or -sign. The current number begins at the first non-blank character at or after the current cursor position, and extends up to the end of the line or the first character that isn't a possible character for the numeric type. The format of the number (e.g. leading 0's, signs) is retained unless the new value cannot be represented in the previous format.
     
     
Octal and hexadecimal numbers, and the result of the operation, must fit into an “unsigned long”. Similarly, decimal numbers and their result must fit into a “signed long”. It is an error to use this command when the cursor is not positioned at a number.
     
     
Line:
Unchanged.
Column:
Set to the first character in the cursor number.
Options:
None.

— Command: [count] $

Move the cursor to the end of a line. If countis specified, the cursor moves down count - 1lines.

     
     
It is not an error to use the $ command when the cursor is on the last character in the line or when the line is empty.
     
     
The $ command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the cursor is at, or before the first nonblank character in the line, in which case it is line oriented. It is not an error to use the $ command as a motion component when the cursor is on the last character in the line, although it is an error when the line is empty.
Line:
Set to the current line plus countminus 1.
Column:
Set to the last character in the line.
Options:
None.

— Command: %

Move to the matching character. The cursor moves to the parenthesis or curly brace which matches the parenthesis or curly brace found at the current cursor position or which is the closest one to the right of the cursor on the line. It is an error to execute the % command on a line without a parenthesis or curly brace. Historically, any countspecified to the % command was ignored.

     
     
The % command is an absolute movement. The % command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is at or before the first nonblank character on its line, and the ending point is at or after the last nonblank character on its line, in which case it is line oriented.
Line:
Set to the line containing the matching character.
Column:
Set to the matching character.
Options:
None.

— Command: &

Repeat the previous substitution command on the current line.

     
     
Historically, any countspecified to the & command was ignored.
Line:
Unchanged.
Column:
Unchanged if the cursor was on the last character in the line, otherwise, set to the first nonblank character in the line.
Options:
Affected by the edcompatible, extended, ignorecase and magic options.

— Command: '<character>

— Command: `<character>

Return to a context marked by the character <character>. If <character>is the “'” or “`” character, return to the previous context. If <character>is any other character, return to the context marked by that character (see the m command for more information). If the command is the ' command, only the line value is restored, and the cursor is placed on the first nonblank character of that line. If the command is the ` command, both the line and column values are restored.

     
     
It is an error if the context no longer exists because of line deletion. (Contexts follow lines that are moved, or which are deleted and then restored.)
     
     
The ' and ` commands are both absolute movements. They may be used as a motion component for other vi commands. For the ' command, any text copied into a buffer is line oriented. For the ` command, any text copied into a buffer is character oriented, unless it both starts and stops at the first character in the line, in which case it is line oriented. In addition, when using the ` command as a motion component, commands which move backward and started at the first character in the line, or move forward and ended at the first character in the line, are corrected to the last character of the line preceding the starting and ending lines, respectively.
Line:
Set to the line from the context.
Column:
Set to the first nonblank character in the line, for the ' command, and set to the context's column for the ` command.
Options:
None.

— Command: [count] (

Back up countsentences.

     
     
The ( command is an absolute movement. The ( command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting and stopping points of the region are the first character in the line, in which case it is line oriented. If it is line oriented, the starting point of the region is adjusted to be the end of the line immediately before the starting cursor position.
Line:
Set to the line containing the beginning of the sentence.
Column:
Set to the first nonblank character of the sentence.
Options:
Affected by the lisp option.

— Command: [count] )

Move forward countsentences.

     
     
The ) command is an absolute movement. The ) command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting point of the region is the first character in the line, in which case it is line oriented. In the latter case, if the stopping point of the region is also the first character in the line, it is adjusted to be the end of the line immediately before it.
Line:
Set to the line containing the beginning of the sentence.
Column:
Set to the first nonblank character of the sentence.
Options:
Affected by the lisp option.

— Command: [count] ,

Reverse find character counttimes. Reverse the last F, f, T or t command, searching the other way in the line, counttimes. It is an error if a F, f, T or t command has not been performed yet.

     
     
The , command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the searched-for character for the F and f commands, before the character for the t command and after the character for the T command.
Options:
None.

— Command: [count] -

Move to the first nonblank of the previous line, counttimes.

     
     
It is an error if the movement is past the beginning of the file.
     
     
The - command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the current line minus count.
Column:
Set to the first nonblank character in the line.
Options:
None.

— Command: [count] .

Repeat the last vi command that modified text. The repeated command may be a command and motion component combination. If countis specified, it replaces both the count specified for the repeated command, and, if applicable, for the repeated motion component. If countis not specified, the counts originally specified to the command being repeated are used again.

     
     
As a special case, if the . command is executed immediately after the u command, the change log is rolled forward or backward, depending on the action of the u command.
Line:
Set as described for the repeated command.
Column:
Set as described for the repeated command.
Options:
None.

— Command: /RE<carriage-return>
— Command: /RE/ [

— Command: ?RE<carriage-return>
— Command: ?RE? [

— Command: N

— Command: n

Search forward or backward for a regular expression. The commands beginning with a slash “/” character are forward searches, the commands beginning with a question mark “?” are backward searches. Vi prompts with the leading character on the last line of the screen for a string. It then searches forward or backward in the file for the next occurrence of the string, which is interpreted as a Basic Regular Expression.

     
     
The / and ? commands are absolute movements. They may be used as the motion components of other vi commands, in which case any text copied into a buffer is character oriented, unless the search started and ended on the first column of a line, in which case it is line oriented. In addition, forward searches ending at the first character of a line, and backward searches beginning at the first character in the line, are corrected to begin or end at the last character of the previous line. (Note, forward and backward searches can occur for both / and ? commands, if the wrapscan option is set.)
     
     
If an offset from the matched line is specified (i.e. a trailing “/” or “?” character is followed by a signed offset), the buffer will always be line oriented (e.g. “/string/+0” will always guarantee a line orientation).
     
     
The N command repeats the previous search, but in the reverse direction. The n command repeats the previous search. If either the N or n commands are used as motion components for the ! command, you will not be prompted for the text of the bang command, instead the previous bang command will be executed.
     
     
Missing RE's (e.g. “//<carriage-return>”, “/<carriage-return>”, “??<carriage-return>”, or “?<carriage-return>” search for the last search RE, in the indicated direction.
     
     
Searches may be interrupted using the <interrupt>character.
     
     
Multiple search patterns may be grouped together by delimiting them with semicolons and zero or more whitespace characters, e.g. /foo/ ; ?bar?searches forward for fooand then, from that location, backwards for bar. When search patterns are grouped together in this manner, the search patterns are evaluated left to right with the final cursor position determined by the last search pattern.
     
     
It is also permissible to append a z command to the search strings, e.g. /foo/ z.searches forward for the next occurrence of foo, and then positions that line in the middle of screen.
Line:
Set to the line in which the match occurred.
Column:
Set to the first character of the matched string.
Options:
Affected by the edcompatible, extended, ignorecase, magic, and wrapscan options.

— Command: 0

Move to the first character in the current line. It is not an error to use the 0 command when the cursor is on the first character in the line,

     
     
The 0 command may be used as the motion component of other vi commands, in which case it is an error if the cursor is on the first character in the line, and any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the first character in the line.
Options:
None.

— Command: :

Execute an ex command. Vi prompts for an ex command on the last line of the screen, using a colon “:” character. The command is terminated by a <carriage-return>, <newline>or <escape>character; all of these characters may be escaped by using a <literal-next>character. The command is then executed.

     
     
If the ex command writes to the screen, vi will prompt the user for a <carriage-return>before continuing when the ex command finishes. Large amounts of output from the ex command will be paged for the user, and the user prompted for a <carriage-return>or <space>key to continue. In some cases, a quit (normally a “q” character) or <interrupt>may be entered to interrupt the ex command.
     
     
When the ex command finishes, and the user is prompted to resume visual mode, it is also possible to enter another “:” character followed by another ex command.
Line:
The current line is set as described for the ex command.
Column:
The current column is set as described for the ex command.
Options:
Affected as described for the ex command.

— Command: [count] ;

Repeat the last character find counttimes. The last character find is one of the F, f, T or t commands. It is an error if a F, f, T or t command has not been performed yet.

     
     
The ; command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the searched-for character for the F and f commands, before the character for the t command and after the character for the T command.
Options:
None.

— Command: [count] < motion

— Command: [count] > motion

Shift lines left or right. Shift the number of lines in the region specified by the countand motionleft (for the < command) or right (for the > command) by the number of columns specified by the shiftwidth option. Only whitespace characters are deleted when shifting left. Once the first character in the line no longer contains a whitespace character, the command will succeed, but the line will not be modified.

Line:
Unchanged.
Column:
Set to the first nonblank character in the line.
Options:
Affected by the shiftwidth option.

— Command: @ buffer

Execute a named buffer. Execute the named buffer as vi commands. The buffer may include ex commands, too, but they must be expressed as a : command. If the buffer is line oriented, <newline>characters are logically appended to each line of the buffer. If the buffer is character oriented, <newline>characters are logically appended to all but the last line in the buffer.

     
     
If the buffer name is “@”, or “*”, then the last buffer executed shall be used. It is an error to specify “@@” or “@*” if there were no previous buffer executions. The text of a buffer may contain a @ command, and it is possible to create infinite loops in this manner. (The <interrupt>character may be used to interrupt the loop.)
Line:
The current line is set as described for the command(s).
Column:
The current column is set as described for the command(s).
Options:
None.

— Command: [count] A

Enter input mode, appending the text after the end of the line. If countis specified, the text is repeatedly input count - 1more times after input mode is exited.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [count] B

Move backward countbigwords. Move the cursor backward to the beginning of a bigword by repeating the following algorithm: if the current position is at the beginning of a bigword or the character at the current position cannot be part of a bigword, move to the first character of the preceding bigword. Otherwise, move to the first character of the bigword at the current position. If no preceding bigword exists on the current line, move to the first character of the last bigword on the first preceding line that contains a bigword.

     
     
The B command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line containing the word selected.
Column:
Set to the first character of the word selected.
Options:
None.

— Command: [buffer] [count] C

Change text from the current position to the end-of-line. If countis specified, the input text replaces from the current position to the end-of-line, plus count - 1subsequent lines.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [buffer] D

Delete text from the current position to the end-of-line.

     
     
It is not an error to execute the D command on an empty line.
Line:
Unchanged.
Column:
Set to the character before the current character, or, column 1 if the cursor was on column 1.
Options:
None.

— Command: [count] E

Move forward countend-of-bigwords. Move the cursor forward to the end of a bigword by repeating the following algorithm: if the current position is the end of a bigword or the character at that position cannot be part of a bigword, move to the last character of the following bigword. Otherwise, move to the last character of the bigword at the current position. If no succeeding bigword exists on the current line, move to the last character of the first bigword on the next following line that contains a bigword.

     
     
The E command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line containing the word selected.
Column:
Set to the last character of the word selected.
Options:
None.

— Command: [count] F <character>

Search counttimes backward through the current line for <character>.

     
     
The F command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the searched-for character.
Options:
None.

— Command: [count] G

Move to line count, or the last line of the file if countnot specified.

     
     
The G command is an absolute movement. The G command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to count, if specified, otherwise, the last line.
Column:
Set to the first nonblank character in the line.
Options:
None.

— Command: [count] H

Move to the screen line count - 1lines below the top of the screen.

     
     
The H command is an absolute movement. The H command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the line count - 1lines below the top of the screen.
Column:
Set to the first nonblank character of the screen line.
Options:
None.

— Command: [count] I

Enter input mode, inserting the text at the beginning of the line. If countis specified, the text input is repeatedly input count - 1more times.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
None.

— Command: [count] J

Join lines. If countis specified, countlines are joined; a minimum of two lines are always joined, regardless of the value of count.

     
     
If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis “(” do nothing. Otherwise, if the current line ends with a question mark “?”, period “.” or exclamation point “!”, insert two spaces. Otherwise, insert a single space.
     
     
It is not an error to join lines past the end of the file, i.e. lines that do not exist.
Line:
Unchanged.
Column:
Set to the character after the last character of the next-to-last joined line.
Options:
None.

— Command: [count] L

Move to the screen line count - 1lines above the bottom of the screen.

     
     
The L command is an absolute movement. The L command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
Line:
Set to the line count - 1lines above the bottom of the screen.
Column:
Set to the first nonblank character of the screen line.
Options:
None.

— Command: M

Move to the screen line in the middle of the screen.

     
     
The M command is an absolute movement. The M command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.
     
     
Historically, any countspecified to the M command was ignored.
Line:
Set to the line in the middle of the screen.
Column:
Set to the first nonblank character of the screen line.
Options:
None.

— Command: [count] O

Enter input mode, appending text in a new line above the current line. If countis specified, the text input is repeatedly input count - 1more times.

     
     
Historically, any countspecified to the O command was ignored.
Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [buffer] P

Insert text from a buffer. Text from the buffer (the unnamed buffer by default) is inserted before the current column or, if the buffer is line oriented, before the current line.

Line:
Set to the lowest numbered line insert, if the buffer is line oriented, otherwise unchanged.
Column:
Set to the first nonblank character of the appended text, if the buffer is line oriented, otherwise, the last character of the appended text.
Options:
None.

— Command: Q

Exit vi (or visual) mode and switch to ex mode.

Line:
Unchanged.
Column:
No longer relevant.
Options:
None.

— Command: [count] R

Enter input mode, replacing the characters in the current line. If countis specified, the text input is repeatedly input count - 1more times.

     
     
If the end of the current line is reached, no more characters are replaced and any further characters input are appended to the line.
Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [buffer] [count] S

Substitute countlines.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [count] T <character>

Search backward, counttimes, through the current line for the character after the specified <character>.

     
     
The T command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the character after the searched-for character.
Options:
None.

— Command: U

Restore the current line to its state before the cursor last moved to it.

Line:
Unchanged.
Column:
The first character in the line.
Options:
None.

— Command: [count] W

Move forward countbigwords. Move the cursor forward to the beginning of a bigword by repeating the following algorithm: if the current position is within a bigword or the character at that position cannot be part of a bigword, move to the first character of the next bigword. If no subsequent bigword exists on the current line, move to the first character of the first bigword on the first following line that contains a bigword.

     
     
The W command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
The line containing the word selected.
Column:
The first character of the word selected.
Options:
None.

— Command: [buffer] [count] X

Delete countcharacters before the cursor. If the number of characters to be deleted is greater than or equal to the number of characters to the beginning of the line, all of the characters before the current cursor position, to the beginning of the line, are deleted.

Line:
Unchanged.
Column:
Set to the current character minus count, or the first character if count is greater than the number of characters in the line before the cursor.
Options:
None.

— Command: [buffer] [count] Y

Copy (or “yank”) countlines into the specified buffer.

Line:
Unchanged.
Column:
Unchanged.
Options:
None.

— Command: ZZ

Write the file and exit vi. The file is only written if it has been modified since the last complete write of the file to any file.

     
     
The ZZ command will exit the editor after writing the file, if there are no further files to edit. Entering two “quit” commands (i.e. wq, quit, xit or ZZ) in a row will override this check and the editor will exit, ignoring any files that have not yet been edited.
Line:
Unchanged.
Column:
Unchanged.
Options:
None.

— Command: [count] [[

Back up countsection boundaries.

     
     
The [[ command is an absolute movement. The [[ command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented.
     
     
It is an error if the movement is past the beginning of the file.
Line:
Set to the previous line that is countsection boundaries back, or the first line of the file if no more section boundaries exist preceding the current line.
Column:
Set to the first nonblank character in the line.
Options:
Affected by the sections option.

— Command: [count] ]]

Move forward countsection boundaries.

     
     
The ]] command is an absolute movement. The ]] command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting position is column 0, in which case it is line oriented.
     
     
It is an error if the movement is past the end of the file.
Line:
Set to the line that is countsection boundaries forward, or to the last line of the file if no more section boundaries exist following the current line.
Column:
Set to the first nonblank character in the line.
Options:
Affected by the sections option.

— Command: ^

Move to first nonblank character on the current line.

     
     
The ^ command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the first nonblank character of the current line.
Options:
None.

— Command: [count] _

Move down count - 1lines, to the first nonblank character. The _ command may be used as the motion component of other vi commands, in which case any text copied into a buffer is line oriented.

     
     
It is not an error to execute the _ command when the cursor is on the first character in the line.
Line:
The current line plus count - 1.
Column:
The first nonblank character in the line.
Options:
None.

— Command: [count] a

Enter input mode, appending the text after the cursor. If countis specified, the text input is repeatedly input count - 1more times.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [count] b

Move backward countwords. Move the cursor backward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the preceding word. Otherwise, the current position moves to the first character of the word at the current position. If no preceding word exists on the current line, move to the first character of the last word on the first preceding line that contains a word.

     
     
The b command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line containing the word selected.
Column:
Set to the first character of the word selected.
Options:
None.

— Command: [buffer] [count] c motion

Change the region of text specified by the countand motion. If only part of a single line is affected, then the last character being changed is marked with a “$”. Otherwise, the region of text is deleted, and input mode is entered.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [buffer] [count] d motion

Delete the region of text specified by the countand motion.

Line:
Set to the line where the region starts.
Column:
Set to the first character in the line after the last character in the region. If no such character exists, set to the last character before the region.
Options:
None.

— Command: [count] e

Move forward countend-of-words. Move the cursor forward to the end of a word by repeating the following algorithm: if the current position is the end of a word, move to the last character of the following word. Otherwise, move to the last character of the word at the current position. If no succeeding word exists on the current line, move to the last character of the first word on the next following line that contains a word.

     
     
The e command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line containing the word selected.
Column:
Set to the last character of the word selected.
Options:
None.

— Command: [count] f <character>

Search forward, counttimes, through the rest of the current line for <character>.

     
     
The f command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the searched-for character.
Options:
None.

— Command: [count] i

Enter input mode, inserting the text before the cursor. If countis specified, the text input is repeatedly input count - 1more times.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: m <character>

Save the current context (line and column) as <character>. The exact position is referred to by “`<character>”. The line is referred to by “'<character>”.

     
     
Historically, <character>was restricted to lower-case letters. Nvi permits the use of any character.
Line:
Unchanged.
Column:
Unchanged.
Options:
None.

— Command: [count] o

Enter input mode, appending text in a new line under the current line. If countis specified, the text input is repeatedly input count - 1more times.

     
     
Historically, any countspecified to the o command was ignored.
Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [buffer] p

Append text from a buffer. Text from the buffer (the unnamed buffer by default) is appended after the current column or, if the buffer is line oriented, after the current line.

Line:
Set to the first line appended, if the buffer is line oriented, otherwise unchanged.
Column:
Set to the first nonblank character of the appended text if the buffer is line oriented, otherwise, the last character of the appended text.
Options:
None.

— Command: [count] r <character>

Replace characters. The next countcharacters in the line are replaced with <character>. Replacing characters with <newline>characters results in creating new, empty lines into the file.

     
     
If <character>is <escape>, the command is cancelled.
Line:
Unchanged unless the replacement character is a <newline>, in which case it is set to the current line plus count - 1.
Column:
Set to the last character replaced, unless the replacement character is a <newline>, in which case the cursor is in column 1 of the last line inserted.
Options:
None.

— Command: [buffer] [count] s

Substitute countcharacters in the current line starting with the current character.

Line:
Set to the last line upon which characters were entered.
Column:
Set to the last character entered.
Options:
Affected by the altwerase, autoindent, beautify, showmatch, ttywerase and wrapmargin options.

— Command: [count] t <character>

Search forward, counttimes, through the current line for the character immediately before <character>.

     
     
The t command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Unchanged.
Column:
Set to the character before the searched-for character.
Options:
None.

— Command: u

Undo the last change made to the file. If repeated, the u command alternates between these two states, and is its own inverse. When used after an insert that inserted text on more than one line, the lines are saved in the numeric buffers.

     
     
The . command, when used immediately after the u command, causes the change log to be rolled forward or backward, depending on the action of the u command.
Line:
Set to the position of the first line changed, if the reversal affects only one line or represents an addition or change; otherwise, the line preceding the deleted text.
Column:
Set to the cursor position before the change was made.
Options:
None.

— Command: [count] w

Move forward countwords. Move the cursor forward to the beginning of a word by repeating the following algorithm: if the current position is at the beginning of a word, move to the first character of the next word. If no subsequent word exists on the current line, move to the first character of the first word on the first following line that contains a word.

     
     
The w command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented.
Line:
Set to the line containing the word selected.
Column:
Set to the first character of the word selected.
Options:
None.

— Command: [buffer] [count] x

Delete countcharacters. The deletion is at the current character position. If the number of characters to be deleted is greater than or equal to the number of characters to the end of the line, all of the characters from the current cursor position to the end of the line are deleted.

Line:
Unchanged.
Column:
Unchanged unless the last character in the line is deleted and the cursor is not already on the first character in the line, in which case it is set to the previous character.
Options:
None.

— Command: [buffer] [count] y motion

Copy (or “yank”) the text region specified by the countand motion, into a buffer.

Line:
Unchanged, unless the region covers more than a single line, in which case it is set to the line where the region starts.
Column:
Unchanged, unless the region covers more than a single line, in which case it is set to the character were the region starts.
Options:
None.

— Command: [count1] z [

Redraw the screen with a window count2lines long, with line count1placed as specified by the typecharacter. If count1is not specified, it defaults to the current line. If count2is not specified, it defaults to the current window size.

     
     
The following typecharacters may be used:
+
If count1is specified, place the line count1at the top of the screen. Otherwise, display the screen after the current screen, similarly to the <control-F> command.
<carriage-return>
Place the line count1at the top of the screen.
.
Place the line count1in the center of the screen.
-
Place the line count1at the bottom of the screen.
^
If count1is specified, place the line that is at the top of the screen when count1is at the bottom of the screen, at the bottom of the screen, i.e. display the screen before the screen before count1. Otherwise, display the screen before the current screen, similarly to the <control-B> command.
Line:
Set to count1unless count1is not specified and the typecharacter was either “^” or “+”, in which case it is set to the line before the first line on the previous screen or the line after the last line on the previous screen, respectively.
Column:
Set to the first nonblank character in the line.
Options:
None.

— Command: [count] {

Move backward countparagraphs.

     
     
The { command is an absolute movement. The { command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting character is the first character on its line, in which case it is line oriented.
Line:
Set to the line containing the beginning of the previous paragraph.
Column:
Set to the first nonblank character in the line.
Options:
Affected by the paragraph option.

— Command: [count] |

Move to a specific column position on the current line.

     
     
The | command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented. It is an error to use the | command as a motion component and for the cursor not to move.
Line:
Unchanged.
Column:
Set to the character occupying the column position identified by count, if the position exists in the line. If the column length of the current line is less than count, the cursor is moved to the last character in the line.
Options:
None.

— Command: [count] }

Move forward countparagraphs.

     
     
The } command is an absolute movement. The } command may be used as the motion component of other vi commands, in which case any text copied into a buffer is character oriented, unless the starting character is at or before any nonblank characters in its line, in which case it is line oriented.
Line:
Set to the line containing the beginning of the next paragraph.
Column:
Set to the first nonblank character in the line.
Options:
Affected by the paragraph option.

— Command: [count] ~

Reverse the case of the next countcharacter(s). This is the historic semantic for the ~ command and it is only in effect if the tildeop option is not set.

     
     
Lowercase alphabetic characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected.
     
     
Historically, the ~ command did not take an associated count, nor did it move past the end of the current line. As it had no associated motion it was difficult to change the case of large blocks of text. In nvi, if the cursor is on the last character of a line, and there are more lines in the file, the cursor moves to the next line.
     
     
It is not an error to specify a count larger than the number of characters between the cursor and the end of the file.
Line:
Set to the line of the character after countcharacters, or, end of file.
Column:
Set to the character after countcharacters, or, end-of-file.
Options:
Affected by the tildeop option.

— Command: [count] ~ motion

Reverse the case of the characters in a text region specified by the countand motion. Only in effect if the tildeop option is set.

     
     
Lowercase characters are changed to uppercase, and uppercase characters are changed to lowercase. No other characters are affected.
Line:
Set to the line of the character after the last character in the region.
Column:
Set to the character after the last character in the region.
Options:
Affected by the tildeop option.

— Command: <interrupt>

Interrupt the current operation. Many of the potentially long-running vi commands may be interrupted using the terminal interrupt character. These operations include searches, file reading and writing, filter operations and map character expansion. Interrupts are also enabled when running commands outside of vi.

     
     
If the <interrupt>character is used to interrupt while entering an ex command, the command is aborted, the cursor returns to its previous position, and vi remains in command mode.
     
     
Generally, if the <interrupt>character is used to interrupt any operation, any changes made before the interrupt are left in place.
Line:
Dependent on the operation being interrupted.
Column:
Dependent on the operation being interrupted.
Options:
None.

14 Vi Text Input Commands

The following section describes the commands available in the text input mode of the vi editor.

Historically, vi implementations only permitted the characters inserted on the current line to be erased. In addition, only the <control-D>erase character and the “0<control-D>” and “^<control-D>” erase strings could erase autoindent characters. (Autoindent characters include both the characters inserted automatically at the beginning of an input line as well as characters inserted using the <control-T>command.) This implementation permits erasure to continue past the beginning of the current line, and back to where text input mode was entered. In addition, autoindent characters may be erased using the standard erase characters. For the line and word erase characters, reaching the autoindent characters forms a “soft” boundary, denoting the end of the current word or line erase. Repeating the word or line erase key will erase the autoindent characters.

Historically, vi always used <control-H>and <control-W>as character and word erase characters, respectively, regardless of the current terminal settings. This implementation accepts, in addition to these two characters, the current terminal characters for those operations.

— Input: <nul>

If the first character of the input is a <nul>, the previous input is replayed, as if just entered.

— Input: <control-D>

If the previous character on the line was an autoindent character, erase characters to move the cursor back to the column immediately after the previous (1-based) column which is a multiple of the shiftwidth edit option. This may result in any number of <tab>and <space>characters preceding the cursor being changed.

     
     
Otherwise, if the autoindent option is set and the user is entering the first character in the line, <control-D>is ignored. Otherwise, a literal <control-D>character is entered.

— Input: ^<control-D>

If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. In addition, the autoindent level is reset to 0.

— Input: 0<control-D>

If the previous character on the line was an autoindent character, erase all of the autoindent characters on the line. The autoindent level is not altered.

— Input: <control-T>

Insert sufficient <tab>and <space>characters to move the cursor forward to the column immediately after the next (1-based) column which is a multiple of the shiftwidth edit option. This may result in any number of <tab>and <space>characters preceding the cursor being changed.

     
     
Historically, vi did not permit the <control-T>command to be used unless the cursor was at the first column of a new line or it was preceded only by autoindent characters. Nvi permits it to be used at any time during insert mode.

— Input: <erase>

— Input: <control-H>

Erase the last character.

— Input: <literal-next>

Quote the next character. The next character will not be mapped (see the map command for more information) or interpreted specially. A carat “^” character will be displayed immediately as a placeholder, but will be replaced by the next character.

— Input: <escape>

If on the colon command line, and the filec edit option is set, behave as described for that option. Otherwise, if on the colon command line, execute the command. Otherwise, if not on the colon command line, resolve all text input into the file, and return to command mode.

— Input: <line erase>

Erase the current line.

— Input: <control-W>

— Input: <word erase>

Erase the last word. The definition of word is dependent on the altwerase and ttywerase options.

— Input: <control-X>[0-9A-Fa-f]+

Insert a character with the specified hexadecimal value into the text. The value is delimited by any non-hexadecimal character or the input of the maximum number of characters that can be translated into a single character value.

— Input: <interrupt>

Interrupt text input mode, returning to command mode. If the <interrupt>character is used to interrupt inserting text into the file, it is as if the <escape>character was used; all text input up to the interruption is resolved into the file.

15 Ex Addressing

Addressing in ex (and when ex commands are executed from vi ) relates to the current line. In general, the current line is the last line affected by a command. The exact effect on the current line is discussed under the description of each command. When the file contains no lines, the current line is zero.

Addresses are constructed by one or more of the following methods:

  1. The address “.” refers to the current line.
  2. The address “$” refers to the last line of the file.
  3. The address “N”, where Nis a positive number, refers to the N-th line of the file.
  4. The address “'<character>” or “`<character>” refers to the line marked with the name <character>. (See the k or m commands for more information on how to mark lines.)
  5. A regular expression (RE) enclosed by slashes “/” is an address, and it refers to the first line found by searching forward from the line after the current line toward the end of the file, and stopping at the first line containing a string matching the RE. (The trailing slash can be omitted at the end of the command line.)
         
         
    If no RE is specified, i.e. the pattern is “//”, the last RE used in any command is used in the search.
         
         
    If the extended option is set, the RE is handled as an extended RE, not a basic RE. If the wrapscan option is set, the search wraps around to the beginning of the file and continues up to and including the current line, so that the entire file is searched.
         
         
    The form “e/” is accepted for historic reasons, and is identical to “//”.
  6. An RE enclosed in question marks “?” addresses the first line found by searching backward from the line preceding the current line, toward the beginning of the file and stopping at the first line containing a string matching the RE. (The trailing question mark can be omitted at the end of a command line.)
         
         
    If no RE is specified, i.e. the pattern is “??”, the last RE used in any command is used in the search.
         
         
    If the extended option is set, the RE is handled as an extended RE, not a basic RE. If the wrapscan option is set, the search wraps around from the beginning of the file to the end of the file and continues up to and including the current line, so that the entire file is searched.
         
         
    The form “e?” is accepted for historic reasons, and is identical to “??”.
  7. An address followed by a plus sign “+” or a minus sign “-” followed by a number is an offset address and refers to the address plus (or minus) the indicated number of lines. If the address is omitted, the addition or subtraction is done with respect to the current line.
  8. An address of “+” or “-” followed by a number is an offset from the current line. For example, “-5” is the same as “.-5”.
  9. An address ending with “+” or “-” has 1 added to or subtracted from the address, respectively. As a consequence of this rule and of the previous rule, the address “-” refers to the line preceding the current line. Moreover, trailing “+” and “-” characters have a cumulative effect. For example, “++-++” refers to the current line plus 3.
  10. A percent sign “%” is equivalent to the address range “1,$”.

Ex commands require zero, one, or two addresses. It is an error to specify an address to a command which requires zero addresses.

If the user provides more than the expected number of addresses to any ex command, the first addresses specified are discarded. For example, “1,2,3,5”print prints lines 3 through 5, because the print command only takes two addresses.

The addresses in a range are separated from each other by a comma “,” or a semicolon “;”. In the latter case, the current line “.” is set to the first address, and only then is the second address calculated. This feature can be used to determine the starting line for forward and backward searches (see rules (5) and (6) above). The second address of any two-address sequence corresponds to a line that follows, in the file, the line corresponding to the first address. The first address must be less than or equal to the second address. The first address must be greater than or equal to the first line of the file, and the last address must be less than or equal to the last line of the file.

16 Ex Description

The following words have special meanings for ex commands.

  • <end-of-file>

    The end-of-file character is used to scroll the screen in the ex editor. This character is normally <control-D>. However, whatever character is set for the current terminal is supported as well as <control-D>.

  • line

    A single-line address, given in any of the forms described in the section entitled “Ex Addressing” . The default for lineis the current line.

  • range

    A line, or a pair of line addresses, separated by a comma or semicolon. (See the section entitled “Ex Addressing” for more information.) The default for range is the current line only, i.e. “.,.”. A percent sign “%” stands for the range “1,$”. The starting address must be less than, or equal to, the ending address.

  • count

    A positive integer, specifying the number of lines to be affected by the command; the default is 1. Generally, a count past the end-of-file may be specified, e.g. the command “p 3000” in a 10 line file is acceptable, and will print from the current line through the last line in the file.

  • flags

    One or more of the characters “#”, “p”, and “l”. When a command that accepts these flags completes, the addressed line(s) are written out as if by the corresponding #, l or p commands. In addition, any number of “+” or “-” characters can be specified before, after, or during the flags, in which case the line written is not necessarily the one affected by the command, but rather the line addressed by the offset address specified. The default for flagsis none.

  • file

    A pattern used to derive a pathname; the default is the current file. File names are subjected to normal sh(1) word expansions.

Anywhere a file name is specified, it is also possible to use the special string “/tmp”. This will be replaced with a temporary file name which can be used for temporary work, e.g. “:e /tmp” creates and edits a new file.

If both a count and a range are specified for commands that use either, the starting line for the command is the last line addressed by the range, and count- 1 subsequent lines are affected by the command, e.g. the command “2,3p4” prints out lines 3, 4, 5 and 6.

When only a line or range is specified, with no command, the implied command is either a list, number or print command. The command used is the most recent of the three commands to have been used (including any use as a flag). If none of these commands have been used before, the print command is the implied command. When no range or count is specified and the command line is a blank line, the current line is incremented by 1 and then the current line is displayed.

Zero or more whitespace characters may precede or follow the addresses, count, flags, or command name. Any object following a command name (such as buffer, file, etc.), that begins with an alphabetic character, should be separated from the command name by at least one whitespace character.

Any character, including <carriage-return>, “%” and “#” retain their literal value when preceded by a backslash.

17 Ex Commands

The following section describes the commands available in the ex editor. In each entry below, the tag line is a usage synopsis for the command.

Each command can be entered as the abbreviation (those characters in the synopsis command word preceding the “[” character), the full command (all characters shown for the command word, omitting the “[” and “]” characters), or any leading subset of the full command down to the abbreviation. For example, the args command (shown as “ar[gs]” in the synopsis) can be entered as “ar”, “arg” or “args”.

Each ex command described below notes the new current line after it is executed, as well as any options that affect the command.

— Command: "

A comment. Command lines beginning with the double-quote character “"” are ignored. This permits comments in editor scripts and startup files.

— Command: <control-D>
— Command: <end-of-file>

Scroll the screen. Write the next N lines, where N is the value of the scroll option. The command is the end-of-file terminal character, which may be different on different terminals. Traditionally, it is the <control-D>key.

     
     
Historically, the eof command ignored any preceding count, and the <end-of-file>character was ignored unless it was entered as the first character of the command. This implementation treats it as a command only if entered as the first character of the command line, and otherwise treats it as any other character.
Line:
Set to the last line written.
Options:
Affected by the scroll option.

— Command: ! argument(s)
— Command: [range]! argument(s)

Execute a shell command, or filter lines through a shell command. In the first synopsis, the remainder of the line after the “!” character is passed to the program named by the shell option, as a single argument.

     
     
Within the rest of the line, “%” and “#” are expanded into the current and alternate pathnames, respectively. The character “!” is expanded with the command text of the previous ! command. (Therefore, the command !! repeats the previous ! command.) The special meanings of “%”, “#”, and “!” can be overridden by escaping them with a backslash. If no ! or :! command has yet been executed, it is an error to use an unescaped “!” character. The ! command does not do shell expansion on the strings provided as arguments. If any of the above expansions change the command the user entered, the command is redisplayed at the bottom of the screen.
     
     
Ex then executes the program named by the shell option, with a -c flag followed by the arguments (which are bundled into a single argument).
     
     
The ! command is permitted in an empty file.
     
     
If the file has been modified since it was last completely written, the ! command will warn you.
     
     
A single “!” character is displayed when the command completes.
     
     
In the second form of the ! command, the remainder of the line after the “!” is passed to the program named by the shell option, as described above. The specified lines are passed to the program as standard input, and the standard and standard error output of the program replace the original lines.
Line:
Unchanged if no range was specified, otherwise set to the first line of the range.
Options:
Affected by the shell and warn options.

— Command: [range] # [

— Command: [range] nu[mber] [

Display the selected lines, each preceded with its line number.

     
     
The line number format is “%6d”, followed by two spaces.
Line:
Set to the last line displayed.
Options:
Affected by the list option.

— Command: @ buffer

— Command: * buffer

Execute a buffer. Each line in the named buffer is executed as an ex command. If no buffer is specified, or if the specified buffer is “@” or “*”, the last buffer executed is used.

— Command: [range] <[< ...] [

Shift lines left or right. The specified lines are shifted to the left (for the < command) or right (for the > command), by the number of columns specified by the shiftwidth option. Only leading whitespace characters are deleted when shifting left; once the first column of the line contains a nonblank character, the shift command will succeed, but the line will not be modified.

     
     
If the command character < or > is repeated more than once, the command is repeated once for each additional command character.
Line:
If the current line is set to one of the lines that are affected by the command, it is unchanged. Otherwise, it is set to the first nonblank character of the lowest numbered line shifted.
Options:
Affected by the shiftwidth option.

— Command: [line] = [

Display the line number of line(which defaults to the last line in the file).

Line:
Unchanged.
Options:
None.

— Command: [range] >[> ...] [

Shift right. The specified lines are shifted to the right by the number of columns specified by the shiftwidth option, by inserting tab and space characters. Empty lines are not changed.

     
     
If the command character “>” is repeated more than once, the command is repeated once for each additional command character.
Line:
Set to the last line modified by the command.
Options:
Affected by the shiftwidth option.

— Command: ab[brev] lhs rhs

Add an abbreviation to the current abbreviation list. When inserting text in vi, each time a non-word character is entered after a word character, a set of characters ending at the word character are checked for a match with lhs. If a match is found, they are replaced with rhs. The set of characters that are checked for a match are defined as follows, for inexplicable historical reasons. If only one or two characters were entered before the non-word character that triggered the check, and after the beginning of the insertion, or the beginning of the line or the file, or the last <blank>character that was entered, then the one or the both characters are checked for a match. Otherwise, the set includes both characters, as well as the characters that precede them that are the same word class (i.e. word or non-word) as the second to last character entered before the non-word character that triggered the check, back to the first <blank>character, the beginning of the insertion, or the beginning of the line or the file.

     
     
For example, the abbreviations:
     
     

:abbreviate abc ABC
:abbreviate #i #include
:abbreviate /*#i /*#include
will all work, while the abbreviations:

     
     

:abbreviate a#i A#include
:abbreviate /* /********************
will not work, and are not permitted by nvi.

     
     
To keep the abbreviation expansion from happening, the character immediately following the lhscharacters should be quoted with a <literal-next>character.
     
     
The replacement rhsis itself subject to both further abbreviation expansion and further map expansion.
Line:
Unchanged.
Options:
None.

— Command: [line] a[ppend][!]

The input text is appended to the specified line. If line 0 is specified, the text is inserted at the beginning of the file. Set to the last line input. If no lines are input, then set to line, or to the first line of the file if a lineof 0 was specified. Following the command name with a “!” character causes the autoindent option to be toggled for the duration of the command.

Line:
Unchanged.
Options:
Affected by the autoindent and number options.

— Command: ar[gs]

Display the argument list. The current argument is displayed inside of “[” and “]” characters. The argument list is the list of operands specified on startup, which can be replaced using the next command.

Line:
Unchanged.
Options:
None.

— Command: bg

Vi mode only. Background the current screen. The screen is unchanged, but is no longer accessible and disappears from the display. Use the fg command to bring the screen back to the display foreground.

Line:
Set to the current line when the screen was last edited.
Options:
None.

— Command: [range] c[hange][!] [

Replace the lines with input text. Following the command name with a “!” character causes the autoindent option to be toggled for the duration of the command.

Line:
Set to the last line input, or, if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line.
Options:
Affected by the autoindent and number options.

— Command: chd[ir][!] [
— Command: cd[!] [

Change the current working directory. The directoryargument is subjected to sh(1) word expansions. When invoked with no directory argument and the HOMEenvironment variable is set, the directory named by the HOMEenvironment variable becomes the new current directory. Otherwise, the new current directory becomes the directory returned by the getpwent(3) routine.

     
     
The chdir command will fail if the file has been modified since the last complete write of the file. You can override this check by appending a “!” character to the command.
Line:
Unchanged.
Options:
Affected by the cdpath option.

— Command: [range] co[py] line [flags]
— Command: [range] t line [flags]

Copy the specified lines (range) after the destination line. Line 0 may be specified to insert the lines at the beginning of the file.

Line:
Unchanged.
Options:
None.

— Command: cs[cope] command [args]

Execute a cscope command. For more information, see the section of the reference manual entitled “Tags, Tag Stacks, and Cscope” .

— Command: [range] d[elete] [

Delete the lines from the file. The deleted text is saved in the specified buffer, or, if no buffer is specified, in the unnamed buffer. If the command name is followed by a letter that could be interpreted as either a buffer name or a flag value (because neither a countor flagsvalues were given), ex treats the letter as a flagsvalue if the letter immediately follows the command name, without any whitespace separation. If the letter is preceded by whitespace characters, it treats it as a buffer name.

Line:
Set to the line following the deleted lines, or to the last line if the deleted lines were at the end.
Options:
None.

— Command: di[splay] b[uffers] | c[onnections] | s[creens] | t[ags]

Display buffers, cscope connections, screens or tags. The display command takes one of three additional arguments, which are as follows:

b[uffers]
Display all buffers (including named, unnamed, and numeric) that contain text.
c[onnections]
Display the source directories for all attached cscope databases.
s[creens]
Display the file names of all background screens.
t[ags]
Display the tags stack.
Line:
Unchanged.
Options:
None.

— Command: e[dit][!] [
— Command: ex[!] [
— Command: vs[plit][!] [

Edit a different file. If the current buffer has been modified since the last complete write, the command will fail. You can override this by appending a “!” character to the command name.

     
     
If the “+cmd” option is specified, that ex command will be executed in the new file. Any ex command may be used, although the most common use of this feature is to specify a line number or search pattern to set the initial location in the new file.
     
     
Capitalizing the first letter of the command, i.e., Edit or Ex, while in vi mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored. vsplit is similar, but the screen will be split vertically to produce the new screen, rather than horizontally.
Line:
If you have previously edited the file, the current line will be set to your last position in the file. If that position does not exist, or you have not previously edited the file, the current line will be set to the first line of the file if you are in vi mode, and the last line of the file if you are in ex.
Options:
None.

— Command: exu[sage] [

Display usage for an ex command. If commandis specified, a usage statement for that command is displayed. Otherwise, usage statements for all ex commands are displayed.

Line:
Unchanged.
Options:
None.

— Command: f[ile] [

Display and optionally change the file name. If a file name is specified, the current pathname is changed to the specified name. The current pathname, the number of lines, and the current position in the file are displayed.

Line:
Unchanged.
Options:
None.

— Command: fg [

Vi mode only. Foreground the specified screen. If the argument name doesn't exactly match the name of a file displayed by a background screen, it is compared against the last component of each of the file names. If no background screen is specified, the first background screen is foregrounded.

     
     
By default, foregrounding causes the current screen to be swapped with the backgrounded screen. Capitalizing the first letter of the command, i.e. Fg, will foreground the backgrounded screen in a new screen instead of swapping it with the current screen.
Line:
Set to the current line when the screen was last edited.
Options:
None.

— Command: [range] g[lobal] /pattern/ [commands]

— Command: [range] v /pattern/ [commands]

Apply commands to lines matching (or not matching) a pattern. The lines within the given range that match “g[lobal]”, or do not match “v” the given pattern are selected. Then, the specified ex command(s) are executed with the current line “.” set to each selected line. If no range is specified, the entire file is searched for matching, or not matching, lines.

     
     
Multiple commands can be specified, one per line, by escaping each <newline>character with a backslash, or by separating commands with a “|” character. If no commands are specified, the command defaults to the print command.
     
     
For the append, change and insert commands, the input text must be part of the global command line. In this case, the terminating period can be omitted if it ends the commands.
     
     
The visual command may also be specified as one of the ex commands. In this mode, input is taken from the terminal. Entering a Q command in vi mode causes the next line matching the pattern to be selected and vi to be reentered, until the list is exhausted.
     
     
The global, v and undo commands cannot be used as part of these commands.
     
     
The editor options autoindent, autoprint and report are turned off for the duration of the global and v commands.
Line:
The last line modified.
Options:
Affected by the ignorecase and magic options. Turns off the autoindent, autoprint and report options.

— Command: he[lp]

Display a help message.

Line:
Unchanged.
Options:
None.

— Command: [line] i[nsert][!]

The input text is inserted before the specified line. Following the command name with a “!” character causes the autoindent option setting to be toggled for the duration of this command.

Line:
Set to the last line input; if no lines were input, set to the line before the target line, or to the first line of the file if there are no lines preceding the target line. Affected by the autoindent and number options.

— Command: [range] j[oin][!] [

Join lines of text together.

     
     
A countspecified to the join command specifies that the last line of the rangeplus countsubsequent lines will be joined. (Note, this differs by one from the general rule where only count- 1 subsequent lines are affected.)
     
     
If the current line ends with a whitespace character, all whitespace is stripped from the next line. Otherwise, if the next line starts with a open parenthesis “(”, do nothing. Otherwise, if the current line ends with a question mark “?”, period “.” or exclamation point “!”, insert two spaces. Otherwise, insert a single space.
     
     
Appending a “!” character to the command name causes a simpler join with no white-space processing.
Line:
Unchanged.
Options:
None.

— Command: [range] l[ist] [

Display the lines unambiguously. Tabs are displayed as “^I”, and the end of the line is marked with a “$” character.

Line:
Set to the last line displayed.
Options:
Affected by the number option.

— Command: map[!] [

Define or display maps (for vi only).

     
     
If “lhs” and “rhs” are not specified, the current set of command mode maps are displayed. If a “!” character is appended to to the command, the text input mode maps are displayed.
     
     
Otherwise, when the “lhs” character sequence is entered in vi, the action is as if the corresponding “rhs” had been entered. If a “!” character is appended to the command name, the mapping is effective during text input mode, otherwise, it is effective during command mode. This allows “lhs” to have two different macro definitions at the same time: one for command mode and one for input mode.
     
     
Whitespace characters require escaping with a <literal-next>character to be entered in the lhsstring in visual mode.
     
     
Normally, keys in the rhsstring are remapped (see the remap option), and it is possible to create infinite loops. However, keys which map to themselves are not further remapped, regardless of the setting of the remap option. For example, the command “:map n nz.” maps the “n” key to the n and z commands.
     
     
To exit an infinitely looping map, use the terminal <interrupt>character.
Line:
Unchanged.
Options:
Affected by the remap option.

— Command: [line] ma[rk] <character>
— Command: [line] k <character>

Mark the line with the mark <character>. The expressions “'<character>” and “`<character>” can then be used as an address in any command that uses one.

Line:
Unchanged.
Options:
None.

— Command: [range] m[ove] line

Move the specified lines after the target line. A target line of 0 places the lines at the beginning of the file.

Line:
Set to the first of the moved lines.
Options:
None.

— Command: mk[exrc][!] file

Write the abbreviations, editor options and maps to the specified file. Information is written in a form which can later be read back in using the ex source command. If filealready exists, the mkexrc command will fail. This check can be overridden by appending a “!” character to the command.

Line:
Unchanged.
Options:
None.

— Command: n[ext][!] [

Edit the next file from the argument list. The next command will fail if the file has been modified since the last complete write. This check can be overridden by appending the “!” character to the command name. The argument list can optionally be replaced by specifying a new one as arguments to this command. In this case, editing starts with the first file on the new list.

     
     
Capitalizing the first letter of the command, i.e. Next, while in vi mode, will set the argument list and edit the file in a new screen. In this case, any modifications to the current file are ignored.
Line:
Set as described for the edit command.
Options:
Affected by the options autowrite and writeany.

— Command: [line] o[pen] /pattern/ [flags]

Enter open mode. Open mode is the same as being in vi, but with a one-line window. All the standard vi commands are available. If a match is found for the optional RE argument, the cursor is set to the start of the matching pattern.

     
     
This command is not yet implemented.
Line:
Unchanged, unless the optional RE is specified, in which case it is set to the line where the matching pattern is found.
Options:
Affected by the open option.

— Command: pre[serve]

Save the file in a form that can later be recovered using the ex -r option. When the file is preserved, an email message is sent to the user.

Line:
Unchanged.
Options:
None.

— Command: prev[ious][!]

Edit the previous file from the argument list. The previous command will fail if the file has been modified since the last complete write. This check can be overridden by appending the “!” character to the command name.

     
     
Capitalizing the first letter of the command, i.e. Previous, while in vi mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored.
Line:
Set as described for the edit command.
Options:
Affected by the options autowrite and writeany. None.

— Command: [range] p[rint] [

Display the specified lines.

Line:
Set to the last line displayed.
Options:
Affected by the list and number option.

— Command: [line] pu[t] [

Append buffer contents to the current line. If a buffer is specified, its contents are appended to the line, otherwise, the contents of the unnamed buffer are used.

Line:
Set to the line after the current line.
Options:
None.

— Command: q[uit][!]

End the editing session. If the file has been modified since the last complete write, the quit command will fail. This check may be overridden by appending a “!” character to the command.

     
     
If there are more files to edit, the quit command will fail. Appending a “!” character to the command name or entering two quit commands (i.e. wq, quit, xit or ZZ) in a row) will override this check and the editor will exit.
Line:
Unchanged.
Options:
None.

— Command: [line] r[ead][!] [

Read a file. A copy of the specified file is appended to the line. If lineis 0, the copy is inserted at the beginning of the file. If no file is specified, the current file is read; if there is no current file, then filebecomes the current file. If there is no current file and no fileis specified, then the read command will fail.

     
     
If fileis preceded by a “!” character, fileis treated as if it were a shell command, and passed to the program named by the shell edit option. The standard and standard error outputs of that command are read into the file after the specified line. The special meaning of the “!” character can be overridden by escaping it with a backslash “e” character.
Line:
When executed from ex, the current line is set to the last line read. When executed from vi, the current line is set to the first line read.
Options:
None.

— Command: rec[over] file

Recover fileif it was previously saved. If no saved file by that name exists, the recover command behaves equivalently to the edit command.

Line:
Set as described for the edit command.
Options:
None.

— Command: res[ize] [

Vi mode only. Grow or shrink the current screen. If sizeis a positive, signed number, the current screen is grown by that many lines. If sizeis a negative, signed number, the current screen is shrunk by that many lines. If sizeis not signed, the current screen is set to the specified size. Applicable only to split screens.

Line:
Unchanged.
Options:
None.

— Command: rew[ind][!]

Rewind the argument list. If the current file has been modified since the last complete write, the rewind command will fail. This check may be overridden by appending the “!” character to the command.

     
     
Otherwise, the current file is set to the first file in the argument list.
Line:
Set as described for the edit command.
Options:
Affected by the autowrite and writeany options.

— Command: se[t] [

Display or set editor options. When no arguments are specified, the editor option term, and any editor options whose values have been changed from the default settings are displayed. If the argument allis specified, the values of all of editor options are displayed.

     
     
Specifying an option name followed by the character “?” causes the current value of that option to be displayed. The “?” can be separated from the option name by whitespace characters. The “?” is necessary only for Boolean valued options. Boolean options can be given values by the form “set option” to turn them on, or “set nooption” to turn them off. String and numeric options can be assigned by the form “set option=value”. Any whitespace characters in strings can be included literally by preceding each with a backslash. More than one option can be set or listed by a single set command, by specifying multiple arguments, each separated from the next by whitespace characters.
Line:
Unchanged.
Options:
None.

— Command: sh[ell]

Run the shell program. The program named by the shell option is run with a -i (for interactive) flag. Editing is resumed when that program exits.

Line:
Unchanged.
Options:
Affected by the shell option.

— Command: so[urce] file

Read and execute ex commands from a file. Source commands may be nested.

Line:
Unchanged.
Options:
None.

— Command: [range] s[ubstitute] [

— Command: [range] & [

— Command: [range] ~ [

Make substitutions. Replace the first instance of patternwith the string replaceon the specified line(s). If the “/pattern/repl/” argument is not specified, the “/pattern/repl/” from the previous substitute command is used. Any character other than an alphabetic, numeric, <blank> or backslash character may be used as the delimiter.

     
     
If optionsincludes the letter “c” (confirm), you will be prompted for confirmation before each replacement is done. An affirmative response (in English, a “y” character) causes the replacement to be made. A quit response (in English, a “q” character) causes the substitute command to be terminated. Any other response causes the replacement not to be made, and the substitute command continues. If optionsincludes the letter “g” (global), all nonoverlapping instances of patternin the line are replaced.
     
     
The & version of the command is the same as not specifying a pattern or replacement string to the substitute command, and the “&” is replaced by the pattern and replacement information from the previous substitute command.
     
     
The ~ version of the command is the same as & and s, except that the search pattern used is the last RE used in any command, not necessarily the one used in the last substitute command.
     
     
For example, in the sequence
          s/red/blue/
          /green
          ~
     

the “~” is equivalent to “s/green/blue/”.

     
     
The substitute command may be interrupted, using the terminal interrupt character. All substitutions completed before the interrupt are retained.
Line:
Set to the last line upon which a substitution was made.
Options:
Affected by the ignorecase and magic option.

— Command: su[spend][!]

— Command: st[op][!]
— Comamnd: <control-Z>

Suspend the edit session. Appending a “!” character to these commands turns off the autowrite option for the command.

Line:
Unchanged.
Options:
Affected by the autowrite and writeany options.

— Command: ta[g][!] tagstring

Edit the file containing the specified tag. If the tag is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the tag command will fail. This check can be overridden by appending the “!” character to the command name.

     
     
The tag command searches for tagstringin the tags file(s) specified by the tags option. (See ctags(1) for more information on tags files.)
     
     
Capitalizing the first letter of the command, i.e. Tag, while in vi mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored.
Line:
Set to the line indicated by the tag.
Options:
Affected by the autowrite, taglength, tags and writeany options.

— Command: tagn[ext][!]

Edit the file containing the next context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the tagnext command will fail. This check can be overridden by appending the “!” character to the command name.

     
     
Capitalizing the first letter of the command, i.e. Tagnext, while in vi mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored.
Line:
Set to the line indicated by the tag.
Options:
Affected by the autowrite and writeany options.

— Command: tagp[op][!] [

Pop to the specified tag in the tags stack. If neither fileor numberis specified, the tagpop command pops to the most recent entry on the tags stack. If fileor numberis specified, the tagpop command pops to the most recent entry in the tags stack for that file, or numbered entry in the tags stack, respectively. (See the display command for information on displaying the tags stack.)

     
     
If the file has been modified since the last complete write, the tagpop command will fail. This check may be overridden by appending a “!” character to the command name.
Line:
Set to the line indicated by the tag.
Options:
Affected by the autowrite and writeany options.

— Command: tagp[rev][!]

Edit the file containing the previous context for the current tag. If the context is in a different file, then the new file is edited. If the current file has been modified since the last complete write, the tagprev command will fail. This check can be overridden by appending the “!” character to the command name.

     
     
Capitalizing the first letter of the command, i.e. Tagprev, while in vi mode, will edit the file in a new screen. In this case, any modifications to the current file are ignored.
Line:
Set to the line indicated by the tag.
Options:
Affected by the autowrite and writeany options.

— Command: tagt[op][!]

Pop to the least recent tag on the tags stack, clearing the tags stack.

     
     
If the file has been modified since the last complete write, the tagtop command will fail. This check may be overridden by appending a “!” character to the command name.
Line:
Set to the line indicated by the tag.
Options:
Affected by the autowrite and writeany options.

— Command: una[bbrev] lhs

Delete an abbreviation. Delete lhsfrom the current list of abbreviations.

Line:
Unchanged.
Options:
None.

— Command: u[ndo]

Undo the last change made to the file. Changes made by global, v, visual and map sequences are considered a single command. If repeated, the u command alternates between these two states, and is its own inverse.

Line:
Set to the last line modified by the command.
Options:
None.

— Command: unm[ap][!] lhs

Unmap a mapped string. Delete the command mode map definition for lhs. If a “!” character is appended to the command name, delete the text input mode map definition instead.

Line:
Unchanged.
Options:
None.

— Command: ve[rsion]

Display the version of the ex/vi editor.

— Command: [line] vi[sual] [

Ex mode only. Enter vi. The typeis optional, and can be “-”, “+” or “^”, as in the ex z command, to specify the position of the specified line in the screen window. (The default is to place the line at the top of the screen window.) A countspecifies the number of lines that will initially be displayed. (The default is the value of the window editor option.)

Line:
Unchanged unless lineis specified, in which case it is set to that line.
Options:
None.

— Command: vi[sual][!] [

Vi mode only. Edit a new file. Identical to the “edit[!] [+cmd] [file]” command.

     
     
Capitalizing the first letter of the command, i.e. Visual, will edit the file in a new screen. In this case, any modifications to the current file are ignored.

— Command: viu[sage] [

Display usage for a vi command. If commandis specified, a usage statement for that command is displayed. Otherwise, usage statements for all vi commands are displayed.

Line:
Unchanged.
Options:
None.

— Command: [range] w[rite][!] [
— Command: [range] w[rite] [

— Command: [range] wn[!] [

— Command: [range] wq[!] [

Write the file. The specified lines (the entire file, if no range is given) is written to file. If fileis not specified, the current pathname is used. If fileis specified, and it exists, or if the current pathname was set using the file command, and the file already exists, these commands will fail. Appending a “!” character to the command name will override this check and the write will be attempted, regardless.

     
     
Specifying the optional “>>” string will cause the write to be appended to the file, in which case no tests are made for the file already existing.
     
     
If the file is preceded by a “!” character, the program named by the shell edit option is invoked with file as its second argument, and the specified lines are passed as standard input to that command. The “!” in this usage must be separated from command name by at least one whitespace character. The special meaning of the “!” may be overridden by escaping it with a backslash “e” character.
     
     
The wq version of the write command will exit the editor after writing the file, if there are no further files to edit. Appending a “!” character to the command name or entering two “quit” commands (i.e. wq, quit, xit or ZZ) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited.
     
     
The wn version of the write command will move to the next file after writing the file, unless the write fails.
Line:
Unchanged.
Options:
Affected by the readonly and writeany options.

— Command: [range] x[it][!] [

Write the file if it has been modified. The specified lines are written to file, if the file has been modified since the last complete write to any file. If no rangeis specified, the entire file is written.

     
     
The xit command will exit the editor after writing the file, if there are no further files to edit. Appending a “!” character to the command name or entering two “quit” commands (i.e. wq, quit, xit or ZZ) in a row) will override this check and the editor will exit, ignoring any files that have not yet been edited.
Line:
Unchanged.
Options:
Affected by the readonly and writeany options.

— Command: [range] ya[nk] [

Copy the specified lines to a buffer. If no buffer is specified, the unnamed buffer is used.

Line:
Unchanged.
Options:
None.

— Command: [line] z [

Adjust the window. If no typeis specified, then countlines following the specified line are displayed. The default countis the value of the window option. The typeargument changes the position at which lineis displayed on the screen by changing the number of lines displayed before and after line. The following typecharacters may be used:

-
Place the line at the bottom of the screen.
+
Place the line at the top of the screen.
.
Place the line in the middle of the screen.
^
Write out count lines starting count * 2lines before line; the net effect of this is that a “z^” command following a z command writes the previous page.
=
Center lineon the screen with a line of hyphens displayed immediately before and after it. The number of preceding and following lines of text displayed are reduced to account for those lines.
Line:
Set to the last line displayed, with the exception of the “=type, where the current line is set to the line specified by the command.
Options:
Affected by the scroll option.

18 Set Options

There are a large number of options that may be set (or unset) to change the editor's behavior. This section describes the options, their abbreviations and their default values.

In each entry below, the first part of the tag line is the full name of the option, followed by any equivalent abbreviations. (Regardless of the abbreviations, it is only necessary to use the minimum number of characters necessary to distinguish an abbreviation from all other commands for it to be accepted, in nex/nvi. Historically, only the full name and the official abbreviations were accepted by ex/vi. Using full names in your startup files and environmental variables will probably make them more portable.) The part in square brackets is the default value of the option. Most of the options are boolean, i.e. they are either on or off, and do not have an associated value.

Options apply to both ex and vi modes, unless otherwise specified.

With a few exceptions, all options are settable per screen, i.e. the tags option can be set differently in each screen. The exceptions are the columns, lines, secure and term options. Changing these options modifies the respective information for all screens.

For information on modifying the options or to display the options and their current values, see the “set” command in the section entitled “Ex Commands” .

  • altwerase [off]

    Vi only. Change how vi does word erase during text input. When this option is set, text is broken up into three classes: alphabetic, numeric and underscore characters, other nonblank characters, and blank characters. Changing from one class to another marks the end of a word. In addition, the class of the first character erased is ignored (which is exactly what you want when erasing pathname components).

  • autoindent, ai [off]

    If this option is set, whenever you create a new line (using the vi A, a, C, c, I, i, O, o, R, r, S, and s commands, or the ex append, change, and insert commands) the new line is automatically indented to align the cursor with the first nonblank character of the line from which you created it. Lines are indented using tab characters to the extent possible (based on the value of the tabstop option) and then using space characters as necessary. For commands inserting text into the middle of a line, any blank characters to the right of the cursor are discarded, and the first nonblank character to the right of the cursor is aligned as described above.

         
         
    The indent characters are themselves somewhat special. If you do not enter more characters on the new line before moving to another line, or entering <escape>, the indent character will be deleted and the line will be empty. For example, if you enter <carriage-return>twice in succession, the line created by the first <carriage-return>will not have any characters in it, regardless of the indentation of the previous or subsequent line.
         
         
    Indent characters also require that you enter additional erase characters to delete them. For example, if you have an indented line, containing only blanks, the first <word-erase>character you enter will erase up to end of the indent characters, and the second will erase back to the beginning of the line. (Historically, only the <control-D>key would erase the indent characters. Both the <control-D>key and the usual erase keys work in nvi.) In addition, if the cursor is positioned at the end of the indent characters, the keys “0<control-D>” will erase all of the indent characters for the current line, resetting the indentation level to 0. Similarly, the keys “^<control-D>” will erase all of the indent characters for the current line, leaving the indentation level for future created lines unaffected.
         
         
    Finally, if the autoindent option is set, the S and cc commands change from the first nonblank of the line to the end of the line, instead of from the beginning of the line to the end of the line.
  • autoprint, ap [off]

    Ex only. Cause the current line to be automatically displayed after the ex commands <, >, copy, delete, join, move, put, t, Undo, and undo. This automatic display is suppressed during global and v commands, and for any command where optional flags are used to explicitly display the line.

  • autowrite, aw [off]

    If this option is set, the vi !, ^^, ^] and <control-Z> commands, and the ex edit, next, rewind, stop, suspend, tag, tagpop, and tagtop commands automatically write the current file back to the current file name if it has been modified since it was last written. If the write fails, the command fails and goes no further.

         
         
    Appending the optional force flag character “!” to the ex commands next, rewind, stop, suspend, tag, tagpop, and tagtop stops the automatic write from being attempted.
         
         
    (Historically, the next command ignored the optional force flag.) Note, the ex commands edit, quit, shell, and xit are not affected by the autowrite option.
         
         
    The autowrite option is ignored if the file is considered read-only for any reason.
  • backup [""]

    If this option is set, it specifies a pathname used as a backup file, and, whenever a file is written, the file's current contents are copied to it. The pathname is “#”, “%” and “!” expanded.

         
         
    If the first character of the pathname is “N”, a version number is appended to the pathname (and the “N” character is then discarded). Version numbers are always incremented, and each backup file will have a version number one greater than the highest version number currently found in the directory.
         
         
    Backup files must be regular files, owned by the real user ID of the user running the editor, and not accessible by any other user.
  • beautify, bf [off]

    If this option is set, all control characters that are not currently being specially interpreted, other than <tab>, <newline>, and <form-feed>, are discarded from commands read in by ex from command files, and from input text entered to vi (either into the file or to the colon command line). Text files read by ex/vi are not affected by the beautify option.

  • cdpath [environment variable CDPATH, or current directory]

    This option is used to specify a colon separated list of directories which are used as path prefixes for any relative path names used as arguments for the cd command. The value of this option defaults to the value of the environmental variable CDPATHif it is set, otherwise to the current directory. For compatibility with the POSIX 1003.2 shell, the cd command does not check the current directory as a path prefix for relative path names unless it is explicitly specified. It may be so specified by entering an empty string or a “.” character into the CDPATHvariable or the option value.

  • cedit [no default]

    This option adds the ability to edit the colon command-line history. This option is set to a string. Whenever the first character of that string is entered on the colon command line, you will enter a normal editing window on the collected commands that you've entered on the vi colon command-line. You may then modify and/or execute the commands. All normal text editing is available, except that you cannot use <control-W> to switch to an alternate screen. Entering a <carriage-return> will execute the current line of the screen window as an ex command in the context of the screen from which you created the colon command-line screen, and you will then return to that screen.

         
         
    Because of vi's parsing rules, it can be difficult to set the colon command-line edit character to the <escape>character. To set it to <escape>, use “set cedit=<literal-next><escape>”.
         
         
    If the cedit edit option is set to the same character as the filec edit option, vi will perform colon command-line editing if the character is entered as the first character of the line, otherwise, vi will perform file name expansion.
  • columns, co [80]

    The number of columns in the screen. Setting this option causes ex/vi to set (or reset) the environmental variable COLUMNS. See the section entitled “Sizing the Screen” more information.

  • comment [off]

    Vi only. If the first non-empty line of the file begins with the string “#”, “/*” or “//”, this option causes vi to skip to the end of that shell, C or C++ comment (probably a terribly boring legal notice) before displaying the file.

  • directory, dir [environment variable TMPDIR, or /tmp]

    The directory where temporary files are created. The environmental variable TMPDIRis used as the default value if it exists, otherwise /tmpis used.

  • edcompatible, ed [off]

    Remember the values of the “c” and “g” suffixes to the substitute commands, instead of initializing them as unset for each new command. Specifying pattern and replacement strings to the substitute command unsets the “c” and “g” suffixes as well.

  • escapetime [1]

    The 10th's of a second ex/vi waits for a subsequent key to complete an <escape>key mapping.

  • errorbells, eb [off]

    Ex only. Ex error messages are normally presented in inverse video. If that is not possible for the terminal, setting this option causes error messages to be announced by ringing the terminal bell.

  • exrc, ex [off]

    If this option is turned on in the EXINIT environment variables, or the system or $HOME startup files, the local startup files are read, unless they are the same as the system or $HOME startup files or fail to pass the standard permission checks. See the section entitled “Startup Information” for more information.

  • extended [off]

    This option causes all regular expressions to be treated as POSIX 1003.2 Extended Regular Expressions (which are similar to historic egrep(1) style expressions).

  • filec [no default]

    This option adds the ability to do shell expansion when entering input on the colon command line. This option is set to a string. Whenever the first character of that string is entered on the colon command line, the <blank> delimited string immediately before the cursor is expanded as if it were followed by a *character, and file name expansion for the ex edit command was done. If no match is found, the screen is flashed and text input resumed. If a single match results, that match replaces the expanded text. In addition, if the single match is for a directory, a /character is appended and file completion is repeated. If more than a single match results, any unique prefix shared by the matches replaces the expanded text, the matches are displayed, and text input resumed.

         
         
    Because of vi's parsing rules, it can be difficult to set the path completion character to two command values, <escape>and <tab>. To set it to <escape>, use “set filec=<literal-next><escape>”. To set it to <tab>, use “set filec=e<tab>”.
         
         
    If the cedit edit option is set to the same character as the filec edit option, vi will perform colon command-line editing if the character is entered as the first character of the line, otherwise, vi will perform file name expansion.
  • flash [on]

    This option causes the screen to flash instead of beeping the keyboard, on error, if the terminal has the capability.

  • hardtabs, ht [8]

    This option defines the spacing between hardware tab settings, i.e. the tab expansion done by the operating system and/or the terminal itself. As nex/nvi never writes <tab>characters to the terminal, unlike historic versions of ex/vi, this option does not currently have any affect.

  • iclower [off]

    The iclower edit option makes all Regular Expressions case-insensitive, as long as an upper-case letter does not appear in the search string.

  • ignorecase, ic [off]

    This option causes regular expressions, both in ex commands and in searches, to be evaluated in a case-insensitive manner.

  • keytime [6]

    The 10th's of a second ex/vi waits for a subsequent key to complete a key mapping.

  • leftright [off]

    Vi only. This option causes the screen to be scrolled left-right to view lines longer than the screen, instead of the traditional vi screen interface which folds long lines at the right-hand margin of the terminal.

  • lines, li [24]

    Vi only. The number of lines in the screen. Setting this option causes ex/vi to set (or reset) the environmental variable LINES. See the section entitled “Sizing the Screen” for more information.

  • lisp [off]

    Vi only. This option changes the behavior of the vi (, ), {, }, [[ and ]] commands to match the Lisp language. Also, the autoindent option's behavior is changed to be appropriate for Lisp.

         
         
    This option is not yet implemented.
  • list [off]

    This option causes lines to be displayed in an unambiguous fashion. Specifically, tabs are displayed as control characters, i.e. “^I”, and the ends of lines are marked with a “$” character.

  • lock [on]

    This option causes the editor to attempt to get an exclusive lock on any file being edited, read or written. Reading or writing a file that cannot be locked produces a warning message, but no other effect. Editing a file that cannot be locked results in a read only edit session, as if the readonly edit option were set.

  • magic [on]

    This option is on by default. Turning the magic option off causes all regular expression characters except for “^” and “$”, to be treated as ordinary characters. To re-enable characters individually, when the magic option is off, precede them with a backslash “e” character. See the section entitled “Regular Expressions and Replacement Strings” for more information.

  • matchtime [7]

    Vi only. The 10th's of a second vi pauses on the matching character when the showmatch option is set.

  • mesg [on]

    This option allows other users to contact you using the talk(1) and write(1) utilities, while you are editing. Ex/vi does not turn message on, i.e. if messages were turned off when the editor was invoked, they will stay turned off. This option only permits you to disallow messages for the edit session. See the mesg(1) utility for more information.

  • msgcat [./]

    This option selects a message catalog to be used to display error and informational messages in a specified language. If the value of this option ends with a '/', it is treated as the name of a directory that contains a message catalog “vi_XXXX”, where “XXXX” is the value of the LANGenvironmental variable, if it's set, or the value of the LC_MESSAGESenvironmental variable if it's not. If neither of those environmental variables are set, or if the option doesn't end in a '/', the option is treated as the full path name of the message catalog to use.

         
         
    If any messages are missing from the catalog, the backup text (English) is used instead.
         
         
    See the distribution file catalog/READMEfor additional information on building and installing message catalogs.
  • modelines, modeline [off]

    If the modelines option is set, ex/vi has historically scanned the first and last five lines of each file as it is read for editing, looking for any ex commands that have been placed in those lines. After the startup information has been processed, and before the user starts editing the file, any commands embedded in the file are executed.

         
         
    Commands were recognized by the letters “e” or “v” followed by “x” or “i”, at the beginning of a line or following a tab or space character, and followed by a “:”, an ex command, and another “:”.
         
         
    This option is a security problem of immense proportions, and should not be used under any circumstances.
         
         
    This option will never be implemented.
  • noprint [""]

    Characters that are never handled as printable characters. By default, the C library function isprint(3) is used to determine if a character is printable or not. This edit option overrides that decision.

  • number, nu [off]

    Precede each line displayed with its current line number.

  • octal [off]

    Display unknown characters as octal numbers “"e###"”, instead of the default hexadecimal “"ex##"”.

  • open [on]

    Ex only. If this option is not set, the open and visual commands are disallowed.

  • optimize, opt [on]

    Vi only. Throughput of text is expedited by setting the terminal not to do automatic carriage returns when printing more than one (logical) line of output, greatly speeding output on terminals without addressable cursors when text with leading white space is printed.

         
         
    This option is not yet implemented.
  • paragraphs, para [IPLPPPQPP LIpplpipbp]

    Vi only. Define additional paragraph boundaries for the { and } commands. The value of this option must be a character string consisting of zero or more character pairs.

         
         
    In the text to be edited, the character string <newline>.<char-pair>, (where <char-pair>is one of the character pairs in the option's value) defines a paragraph boundary. For example, if the option were set to LaA<space>##, then all of the following additional paragraph boundaries would be recognized:
         
         
              <newline>.La
              <newline>.A<space>
              <newline>.##
         

  • path []

    The path option can be used to specify a <colon>-separated list of paths, similar to the PATHenvironment variable in the shells. If this option is set, the name of the file to be edited is not an absolute pathname, the first component of the filename is not “.” or “..”, and the file to be edited doesn't exist in the current directory, the elements of the path option are sequentially searched for a file of the specified name. If such a file is found, it is edited.

  • print [""]

    Characters that are always handled as printable characters. By default, the C library function isprint(3) is used to determine if a character is printable or not. This edit option overrides that decision.

  • prompt [on]

    Ex only. This option causes ex to prompt for command input with a “:” character; when it is not set, no prompt is displayed.

  • readonly, ro [off]

    This option causes a force flag to be required to attempt to write the file. Setting this option is equivalent to using the -R command line option, or executing the vi program using the name view.

         
         
    The readonly edit option is not usually persistent, like other edit options. If the -R command line option is set, vi is executed as view, or the readonly edit option is explicitly set, all files edited in the screen will be marked readonly, and the force flag will be required to write them. However, if none of these conditions are true, or the readonly edit option is explicitly unset, then the readonly edit option will toggle based on the write permissions of the file currently being edited as of when it is loaded into the edit buffer. In other words, the readonly edit option will be set if the current file lacks write permissions, and will not be set if the user has write permissions for the file.
  • recdir [/var/tmp/vi.recover]

    The directory where recovery files are stored.

         
         
    If you change the value of recdir, be careful to choose a directory whose contents are not regularly deleted. Bad choices include directories in memory based filesystems, or /tmp, on most systems, as their contents are removed when the machine is rebooted.
         
         
    Public directories like /usr/tmpand /var/tmpare usually safe, although some sites periodically prune old files from them. There is no requirement that you use a public directory, e.g. a sub-directory of your home directory will work fine.
         
         
    Finally, if you change the value of recdir, you must modify the recovery script to operate in your chosen recovery area.
         
         
    See the section entitled “Recovery” for further information.
  • redraw, re [off]

    Vi only. The editor simulates (using great amounts of output), an intelligent terminal on a dumb terminal (e.g. during insertions in vi the characters to the right of the cursor are refreshed as each input character is typed).

         
         
    This option is not yet implemented.
  • remap [on]

    If this option is set, it is possible to define macros in terms of other macros. Otherwise, each key is only remapped up to one time. For example, if “A” is mapped to “B”, and “B” is mapped to “C”, The keystroke “A” will be mapped to “C” if the remap option is set, and to “B” if it is not set.

  • report [5]

    Set the threshold of the number of lines that need to be changed or yanked before a message will be displayed to the user. For everything but the yank command, the value is the largest value about which the editor is silent, i.e. by default, 6 lines must be deleted before the user is notified. However, if the number of lines yanked is greater than or equal to the set value, it is reported to the user.

  • ruler [off]

    Vi only. Display a row/column ruler on the colon command line.

  • scroll, scr [(environment variable LINES - 1) / 2]

    Set the number of lines scrolled by the ex <control-D> and <end-of-file> commands.

         
         
    Historically, the ex z command, when specified without a count, used two times the size of the scroll value; the POSIX 1003.2 standard specified the window size, which is a better choice.
  • searchincr [off]

    The searchincr edit option makes the search commands / and ? incremental, i.e. the screen is updated and the cursor moves to the matching text as the search pattern is entered. If the search pattern is not found, the screen is beeped and the cursor remains on the colon-command line. Erasing characters from the search pattern backs the cursor up to the previous matching text.

  • sections, sect [NHSHH HUnhsh]

    Vi only. Define additional section boundaries for the [[ and ]] commands. The sections option should be set to a character string consisting of zero or more character pairs. In the text to be edited, the character string <newline>.<char-pair>, (where <char-pair>is one of the character pairs in the option's value), defines a section boundary in the same manner that paragraphs option boundaries are defined.

  • secure [off]

    The secure edit option turns off all access to external programs. This means that the versions of the read and write commands that filter text through other programs, the vi ! and <control-Z> commands, the ex !, script, shell, stop and suspend commands and file name expansion will not be permitted. Once set, the secure edit option may not be unset.

  • shell, sh [environment variable SHELL, or /bin/sh]

    Select the shell used by the editor. The specified path is the pathname of the shell invoked by the vi ! shell escape command and by the ex shell command. This program is also used to resolve any shell meta-characters in ex commands.

  • shellmeta [~{[*?$`'"\]

    The set of characters that ex checks for when doing file name expansion. If any of the specified characters are found in the file name arguments to the ex commands, the arguments are expanded using the program defined by the shell option. The default set of characters is a union of meta characters from the Version 7 and the Berkeley C shell.

  • shiftwidth, sw [8]

    Set the autoindent and shift command indentation width. This width is used by the autoindent option and by the <, >, and shift commands.

  • showmatch, sm [off]

    Vi only. This option causes vi, when a }” or “)” is entered, to briefly move the cursor the matching {” or “(”. See the matchtime option for more information.

  • showmode, smd [off]

    Vi only. This option causes vi to display a string identifying the current editor mode on the colon command line. The string is preceded by an asterisk (“*”) if the file has been modified since it was last completely written,

  • sidescroll [16]

    Vi only. Sets the number of columns that are shifted to the left or right, when vi is doing left-right scrolling and the left or right margin is crossed. See the leftright option for more information.

  • slowopen, slow [off]

    This option affects the display algorithm used by vi, holding off display updating during input of new text to improve throughput when the terminal in use is slow and unintelligent.

         
         
    This option is not yet implemented.
  • sourceany [off]

    If this option is turned on, vi historically read startup files that were owned by someone other than the editor user. See the section entitled “Startup Information” for more information. This option is a security problem of immense proportions, and should not be used under any circumstances.

         
         
    This option will never be implemented.
  • tabstop, ts [8]

    This option sets tab widths for the editor display.

  • taglength, tl [0]

    This option sets the maximum number of characters that are considered significant in a tag name. Setting the value to 0 makes all of the characters in the tag name significant.

  • tags, tag [tags /var/db/libc.tags /sys/kern/tags]

    Sets the list of tags files, in search order, which are used when the editor searches for a tag.

  • term, ttytype, tty [environment variable TERM]

    Set the terminal type. Setting this option causes ex/vi to set (or reset) the environmental variable TERM.

  • terse [off]

    This option has historically made editor messages less verbose. It has no effect in this implementation. See the verbose option for more information.

  • tildeop [off]

    Modify the ~ command to take an associated motion.

  • timeout, to [on]

    If this option is set, ex/vi waits for a specific period for a subsequent key to complete a key mapping (see the keytime option). If the option is not set, the editor waits until enough keys are entered to resolve the ambiguity, regardless of how long it takes.

  • ttywerase [off]

    Vi only. This option changes how vi does word erase during text input. If this option is set, text is broken up into two classes, blank characters and nonblank characters. Changing from one class to another marks the end of a word.

  • verbose [off]

    Vi only. Vi historically bells the terminal for many obvious mistakes, e.g. trying to move past the left-hand margin, or past the end of the file. If this option is set, an error message is displayed for all errors.

  • w300 [no default]

    Vi only. Set the window size if the baud rate is less than 1200 baud. See the window option for more information.

  • w1200 [no default]

    Vi only. Set the window size if the baud rate is equal to 1200 baud. See the window option for more information.

  • w9600 [no default]

    Vi only. Set the window size if the baud rate is greater than 1200 baud. See the window option for more information.

  • warn [on]

    Ex only. This option causes a warning message to the terminal if the file has been modified, since it was last written, before a ! command.

  • window, w, wi [environment variable LINES - 1]

    This option determines the default number of lines in a screenful, as displayed by the z command. It also determines the number of lines scrolled by the vi commands <control-B> and <control-F>, and the default number of lines scrolled by the vi commands <control-D> and <control-U>. The value of window can be unrelated to the real screen size, although it starts out as the number of lines on the screen. See the section entitled “Sizing the Screen” for more information. Setting the value of the window option is the same as using the -w command line option.

         
         
    If the value of the window option (as set by the window, w300, w1200 or w9600 options) is smaller than the actual size of the screen, large screen movements will result in displaying only that smaller number of lines on the screen. (Further movements in that same area will result in the screen being filled.) This can provide a performance improvement when viewing different places in one or more files over a slow link.
         
         
    Resetting the window size does not reset the default number of lines scrolled by the <control-D> and <control-U> commands.
  • windowname [off]

    Vi changes the name of the editor's icon/window to the current file name when it's possible and not destructive, i.e., when the editor can restore it to its original value on exit or when the icon/window will be discarded as the editor exits. If the windowname edit option is set, vi will change the icon/window name even when it's destructive and the icon/window name will remain after the editor exits. (This is the case for xterm(1)).

  • wraplen, wl [0]

    This option is identical to the wrapmargin option, with the exception that it specifies the number of columns from the left margin before the line splits, not the right margin.

         
         
    If both wraplen and wrapmargin are set, the wrapmargin value is used.
  • wrapmargin, wm [0]

    Vi only. If the value of the wrapmargin option is non-zero, vi will split lines so that they end at least that number of columns before the right-hand margin of the screen. (Note, the value of wrapmargin is not a text length. In a screen that is 80 columns wide, the command “:set wrapmargin=8” attempts to keep the lines less than or equal to 72 columns wide.)

         
         
    Lines are split at the previous whitespace character closest to the number. Any trailing whitespace characters before that character are deleted. If the line is split because of an inserted <space>or <tab>character, and you then enter another <space>character, it is discarded.
         
         
    If wrapmargin is set to 0, or if there is no blank character upon which to split the line, the line is not broken.
         
         
    If both wraplen and wrapmargin are set, the wrapmargin value is used.
  • wrapscan, ws [on]

    This option causes searches to wrap around the end or the beginning of the file, and back to the starting point. Otherwise, the end or beginning of the file terminates the search.

  • writeany, wa [off]

    If this option is set, file-overwriting checks that would usually be made before the write and xit commands, or before an automatic write (see the autowrite option), are not made. This allows a write to any file, provided the file permissions allow it.

19 Index

nvi-1.81.6/docs/html/vitut.html0100444000076400001440000036402610720065730015417 0ustar skimousers An Introduction to Display Editing with Vi

An Introduction to Display Editing with Vi

1. Getting started
1.1. Specifying terminal type
1.2. Editing a file
1.3. The editor's copy: the buffer
1.4. Notational conventions
1.5. Arrow keys
1.6. Special characters: ESC , CR and DEL
1.7. Getting out of the editor
2. Moving around in the file
2.1. Scrolling and paging
2.2. Searching, goto, and previous context
2.3. Moving around on the screen
2.4. Moving within a line
2.5. Summary
2.6. View
3. Making simple changes
3.1. Inserting
3.2. Making small corrections
3.3. More corrections: operators
3.4. Operating on lines
3.5. Undoing
3.6. Summary
4. Moving about; rearranging and duplicating text
4.1. Low level character motions
4.2. Higher level text objects
4.3. Rearranging and duplicating text
4.4. Summary.
5. High level commands
5.1. Writing, quitting, editing new files
5.2. Escaping to a shell
5.3. Marking and returning
5.4. Adjusting the screen
6. Special topics
6.1. Editing on slow terminals
6.2. Options, set, and editor startup files
6.3. Recovering lost lines
6.4. Recovering lost files
6.5. Continuous text input
6.6. Features for editing programs
6.7. Filtering portions of the buffer
6.8. Commands for editing LISP
6.9. Macros
7. Word Abbreviations
7.1. Abbreviations
8. Nitty-gritty details
8.1. Line representation in the display
8.2. Counts
8.3. More file manipulation commands
8.4. More about searching for strings
8.5. More about input mode
8.6. Upper case only terminals
8.7. Vi and ex
8.8. Open mode: vi on hardcopy terminals and ``glass tty's''
Acknowledgements
Appendix: character functions

ABSTRACT



William Joy

                           Mark Horton
                    Computer Science Division
     Department of Electrical Engineering and Computer Science
               University of California, Berkeley
                      Berkeley, Ca.  94720

Vi (visual) is a display oriented interactive text editor. When using vi the screen of your terminal acts as a window into the file which you are editing. Changes which you make to the file are reflected in what you see.

Using vi you can insert new text any place in the file quite easily. Most of the commands to vi move the cursor around in the file. There are commands to move the cursor forward and backward in units of characters, words, sentences and paragraphs. A small set of operators, like d for delete and c for change, are combined with the motion commands to form operations such as delete word or change paragraph, in a simple and natural way. This regularity and the mnemonic assignment of commands to keys makes the editor command set easy to remember and to use.

Vi will work on a large number of display terminals, and new terminals are easily driven after editing a terminal description file. While it is advantageous to have an intelligent terminal which can locally insert and delete lines and characters from the display, the editor will function quite well on dumb terminals over slow phone lines. The editor makes allowance for the low bandwidth in these situations and uses smaller window sizes and different display updating algorithms to make best use of the limited speed available.

It is also possible to use the command set of vi on hardcopy terminals, storage tubes and ``glass tty's'' using a one line editing window; thus vi's command set is available on all terminals. The full command set of the more traditional, line oriented editor ex is available within vi; it is quite simple to switch between the two modes of editing.

1. Getting started

This document provides a quick introduction to vi. (Pronounced vee-eye.) You should be running vi on a file you are familiar with while you are reading this. The first part of this document (sections 1 through 5) describes the basics of using vi. Some topics of special interest are presented in section 6, and some nitty-gritty details of how the editor functions are saved for section 7 to avoid cluttering the presentation here.

There is also a short appendix here, which gives for each character the special meanings which this character has in vi. Attached to this document should be a quick reference card. This card summarizes the commands of vi in a very compact format. You should have the card handy while you are learning vi.

1.1. Specifying terminal type

Before you can start vi you must tell the system what kind of terminal you are using. Here is a (necessarily incomplete) list of terminal type codes. If your terminal does not appear here, you should consult with one of the staff members on your system to find out the code for your terminal. If your terminal does not have a code, one can be assigned and a description for the terminal can be created.

Suppose for example that you have a Hewlett-Packard HP2621A terminal. The code used by the system for this terminal is `2621'. In this case you can use one of the following commands to tell the system the type of your terminal:

     % setenv TERM 2621

This command works with the csh shell. If you are using the standard Bourne shell sh then you should give the commands

     $ TERM=2621
     $ export TERM

If you want to arrange to have your terminal type set up automatically when you log in, you can use the tset program. If you dial in on a mime, but often use hardwired ports, a typical line for your .login file (if you use csh) would be

     setenv TERM tset - -d mime

or for your .profile file (if you use sh)

     TERM=tset - -d mime

Tset knows which terminals are hardwired to each port and needs only to be told that when you dial in you are probably on a mime. Tset is usually used to change the erase and kill characters, too.

1.2. Editing a file

After telling the system which kind of terminal you have, you should make a copy of a file you are familiar with, and run vi on this file, giving the command

     % vi name

replacing name with the name of the copy file you just created. The screen should clear and the text of your file should appear on the screen. If something else happens refer to the footnote.

1.3. The editor's copy: the buffer

The editor does not directly modify the file which you are editing. Rather, the editor makes a copy of this file, in a place called the buffer, and remembers the file's name. You do not affect the contents of the file unless and until you write the changes you make back into the original file.

1.4. Notational conventions

In our examples, input which must be typed as is will be presented in bold face. Text which should be replaced with appropriate input will be given in italics. We will represent special characters in SMALL CAPITALS .

1.5. Arrow keys

The editor command set is independent of the terminal you are using. On most terminals with cursor positioning keys, these keys will also work within the editor. If you don't have cursor positioning keys, or even if you do, you can use the h j k and l keys as cursor positioning keys (these are labelled with arrows on an adm3a).*

(Particular note for the HP2621: on this terminal the function keys must be shifted (ick) to send to the machine, otherwise they only act locally. Unshifted use will leave the cursor positioned incorrectly.)

1.6. Special characters: ESC , CR and DEL

Several of these special characters are very important, so be sure to find them right now. Look on your keyboard for a key labelled ESC or ALT . It should be near the upper left corner of your terminal. Try hitting this key a few times. The editor will ring the bell to indicate that it is in a quiescent state.

Partially formed commands are cancelled by ESC , and when you insert text in the file you end the text insertion with ESC . This key is a fairly harmless one to hit, so you can just hit it if you don't know what is going on until the editor rings the bell.

The CR or RETURN key is important because it is used to terminate certain commands. It is usually at the right side of the keyboard, and is the same command used at the end of each shell command.

Another very useful key is the DEL or RUB key, which generates an interrupt, telling the editor to stop what it is doing. It is a forceful way of making the editor listen to you, or to return it to the quiescent state if you don't know or don't like what is going on. Try hitting the `/' key on your terminal. This key is used when you want to specify a string to be searched for. The cursor should now be positioned at the bottom line of the terminal after a `/' printed as a prompt. You can get the cursor back to the current position by hitting the DEL or RUB key; try this now.*

From now on we will simply refer to hitting the DEL or RUB key as ``sending an interrupt.''**

The editor often echoes your commands on the last line of the terminal. If the cursor is on the first position of this last line, then the editor is performing a computation, such as computing a new position in the file after a search or running a command to reformat part of the buffer. When this is happening you can stop the editor by sending an interrupt.

1.7. Getting out of the editor

After you have worked with this introduction for a while, and you wish to do something else, you can give the command ZZ to the editor. This will write the contents of the editor's buffer back into the file you are editing, if you made any changes, and then quit from the editor. You can also end an editor session by giving the command :q! CR ;

this is a dangerous but occasionally essential command which ends the editor session and discards all your changes. You need to know about this command in case you change the editor's copy of a file you wish only to look at. Be very careful not to give this command when you really want to save the changes you have made.

2. Moving around in the file

2.1. Scrolling and paging

The editor has a number of commands for moving around in the file. The most useful of these is generated by hitting the control and D keys at the same time, a control-D or `^D'. We will use this two character notation for referring to these control keys from now on. You may have a key labelled `^' on your terminal. This key will be represented as `' in this document; `^' is exclusively used as part of the `^x' notation for control characters.

As you know now if you tried hitting ^D, this command scrolls down in the file. The D thus stands for down. Many editor commands are mnemonic and this makes them much easier to remember. For instance the command to scroll up is ^U. Many dumb terminals can't scroll up at all, in which case hitting ^U clears the screen and refreshes it with a line which is farther back in the file at the top.

If you want to see more of the file below where you are, you can hit ^E to expose one more line at the bottom of the screen, leaving the cursor where it is. The command ^Y (which is hopelessly non-mnemonic, but next to ^U on the keyboard) exposes one more line at the top of the screen.

There are other ways to move around in the file; the keys ^F and ^B move forward and backward a page, keeping a couple of lines of continuity between screens so that it is possible to read through a file using these rather than ^D and ^U if you wish.

Notice the difference between scrolling and paging. If you are trying to read the text in a file, hitting ^F to move forward a page will leave you only a little context to look back at. Scrolling on the other hand leaves more context, and happens more smoothly. You can continue to read the text as scrolling is taking place.

2.2. Searching, goto, and previous context

Another way to position yourself in the file is by giving the editor a string to search for. Type the character / followed by a string of characters terminated by CR . The editor will position the cursor at the next occurrence of this string. Try hitting n to then go to the next occurrence of this string. The character ? will search backwards from where you are, and is otherwise like /.

If the search string you give the editor is not present in the file the editor will print a diagnostic on the last line of the screen, and the cursor will be returned to its initial position.

If you wish the search to match only at the beginning of a line, begin the search string with an . To match only at the end of a line, end the search string with a $. Thus /search CR will search for the word `search' at the beginning of a line, and /last$ CR searches for the word `last' at the end of a line.*

The command G, when preceded by a number will position the cursor at that line in the file. Thus 1G will move the cursor to the first line of the file. If you give G no count, then it moves to the end of the file.

If you are near the end of the file, and the last line is not at the bottom of the screen, the editor will place only the character `~' on each remaining line. This indicates that the last line in the file is on the screen; that is, the `~' lines are past the end of the file.

You can find out the state of the file you are editing by typing a ^G. The editor will show you the name of the file you are editing, the number of the current line, the number of lines in the buffer, and the percentage of the way through the buffer which you are. Try doing this now, and remember the number of the line you are on. Give a G command to get to the end and then another G command to get back where you were.

You can also get back to a previous position by using the command (two back quotes). This is often more convenient than G because it requires no advance preparation. Try giving a G or a search with / or ? and then a to get back to where you were. If you accidentally hit n or any command which moves you far away from a context of interest, you can quickly get back by hitting .

2.3. Moving around on the screen

Now try just moving the cursor around on the screen. If your terminal has arrow keys (4 or 5 keys with arrows going in each direction) try them and convince yourself that they work. If you don't have working arrow keys, you can always use h, j, k, and l. Experienced users of vi prefer these keys to arrow keys, because they are usually right underneath their fingers.

Hit the + key. Each time you do, notice that the cursor advances to the next line in the file, at the first non-white position on the line. The - key is like + but goes the other way.

These are very common keys for moving up and down lines in the file. Notice that if you go off the bottom or top with these keys then the screen will scroll down (and up if possible) to bring a line at a time into view. The RETURN key has the same effect as the + key.

Vi also has commands to take you to the top, middle and bottom of the screen. H will take you to the top (home) line on the screen. Try preceding it with a number as in 3H. This will take you to the third line on the screen. Many vi commands take preceding numbers and do interesting things with them. Try M, which takes you to the middle line on the screen, and L, which takes you to the last line on the screen. L also takes counts, thus 5L will take you to the fifth line from the bottom.

2.4. Moving within a line

Now try picking a word on some line on the screen, not the first word on the line. move the cursor using RETURN and - to be on the line where the word is. Try hitting the w key. This will advance the cursor to the next word on the line. Try hitting the b key to back up words in the line. Also try the e key which advances you to the end of the current word rather than to the beginning of the next word. Also try SPACE (the space bar) which moves right one character and the BS (backspace or ^H) key which moves left one character. The key h works as ^H does and is useful if you don't have a BS key. (Also, as noted just above, l will move to the right.)

If the line had punctuation in it you may have noticed that that the w and b keys stopped at each group of punctuation. You can also go back and forwards words without stopping at punctuation by using W and B rather than the lower case equivalents. Think of these as bigger words. Try these on a few lines with punctuation to see how they differ from the lower case w and b.

The word keys wrap around the end of line, rather than stopping at the end. Try moving to a word on a line below where you are by repeatedly hitting w.

2.5. Summary

2.6. View

If you want to use the editor to look at a file, rather than to make changes, invoke it as view instead of vi. This will set the readonly option which will prevent you from accidently overwriting the file.

3. Making simple changes

3.1. Inserting

One of the most useful commands is the i (insert) command. After you type i, everything you type until you hit ESC is inserted into the file. Try this now; position yourself to some word in the file and try inserting text before this word. If you are on an dumb terminal it will seem, for a minute, that some of the characters in your line have been overwritten, but they will reappear when you hit ESC .

Now try finding a word which can, but does not, end in an `s'. Position yourself at this word and type e (move to end of word), then a for append and then `s ESC ' to terminate the textual insert. This sequence of commands can be used to easily pluralize a word.

Try inserting and appending a few times to make sure you understand how this works; i placing text to the left of the cursor, a to the right.

It is often the case that you want to add new lines to the file you are editing, before or after some specific line in the file. Find a line where this makes sense and then give the command o to create a new line after the line you are on, or the command O to create a new line before the line you are on. After you create a new line in this way, text you type up to an ESC is inserted on the new line.

Many related editor commands are invoked by the same letter key and differ only in that one is given by a lower case key and the other is given by an upper case key. In these cases, the upper case key often differs from the lower case key in its sense of direction, with the upper case key working backward and/or up, while the lower case key moves forward and/or down.

Whenever you are typing in text, you can give many lines of input or just a few characters. To type in more than one line of text, hit a RETURN at the middle of your input. A new line will be created for text, and you can continue to type. If you are on a slow and dumb terminal the editor may choose to wait to redraw the tail of the screen, and will let you type over the existing screen lines. This avoids the lengthy delay which would occur if the editor attempted to keep the tail of the screen always up to date. The tail of the screen will be fixed up, and the missing lines will reappear, when you hit ESC .

While you are inserting new text, you can use the characters you normally use at the system command level (usually ^H or #) to backspace over the last character which you typed, and the character which you use to kill input lines (usually @, ^X, or ^U) to erase the input you have typed on the current line.

The character ^W will erase a whole word and leave you after the space after the previous word; it is useful for quickly backing up in an insert.

Notice that when you backspace during an insertion the characters you backspace over are not erased; the cursor moves backwards, and the characters remain on the display. This is often useful if you are planning to type in something similar. In any case the characters disappear when when you hit ESC ; if you want to get rid of them immediately, hit an ESC and then a again.

Notice also that you can't erase characters which you didn't insert, and that you can't backspace around the end of a line. If you need to back up to the previous line to make a correction, just hit ESC and move the cursor back to the previous line. After making the correction you can return to where you were and use the insert or append command again.

3.2. Making small corrections

You can make small corrections in existing text quite easily. Find a single character which is wrong or just pick any character. Use the arrow keys to find the character, or get near the character with the word motion keys and then either backspace (hit the BS key or ^H or even just h) or SPACE (using the space bar) until the cursor is on the character which is wrong. If the character is not needed then hit the x key; this deletes the character from the file. It is analogous to the way you x out characters when you make mistakes on a typewriter (except it's not as messy).

If the character is incorrect, you can replace it with the correct character by giving the command rc, where c is replaced by the correct character. Finally if the character which is incorrect should be replaced by more than one character, give the command s which substitutes a string of characters, ending with ESC , for it. If there are a small number of characters which are wrong you can precede s with a count of the number of characters to be replaced. Counts are also useful with x to specify the number of characters to be deleted.

3.3. More corrections: operators

You already know almost enough to make changes at a higher level. All you need to know now is that the d key acts as a delete operator. Try the command dw to delete a word. Try hitting . a few times. Notice that this repeats the effect of the dw. The command . repeats the last command which made a change. You can remember it by analogy with an ellipsis `...'.

Now try db. This deletes a word backwards, namely the preceding word. Try d SPACE . This deletes a single character, and is equivalent to the x command.

Another very useful operator is c or change. The command cw thus changes the text of a single word. You follow it by the replacement text ending with an ESC . Find a word which you can change to another, and try this now. Notice that the end of the text to be changed was marked with the character `$' so that you can see this as you are typing in the new material.

3.4. Operating on lines

It is often the case that you want to operate on lines. Find a line which you want to delete, and type dd, the d operator twice. This will delete the line. If you are on a dumb terminal, the editor may just erase the line on the screen, replacing it with a line with only an @ on it. This line does not correspond to any line in your file, but only acts as a place holder. It helps to avoid a lengthy redraw of the rest of the screen which would be necessary to close up the hole created by the deletion on a terminal without a delete line capability.

Try repeating the c operator twice; this will change a whole line, erasing its previous contents and replacing them with text you type up to an ESC .

You can delete or change more than one line by preceding the dd or cc with a count, i.e. 5dd deletes 5 lines. You can also give a command like dL to delete all the lines up to and including the last line on the screen, or d3L to delete through the third from the bottom line. Try some commands like this now.*

Notice that the editor lets you know when you change a large number of lines so that you can see the extent of the change. The editor will also always tell you when a change you make affects text which you cannot see.

3.5. Undoing

Now suppose that the last change which you made was incorrect; you could use the insert, delete and append commands to put the correct material back. However, since it is often the case that we regret a change or make a change incorrectly, the editor provides a u (undo) command to reverse the last change which you made. Try this a few times, and give it twice in a row to notice that an u also undoes a u.

The undo command lets you reverse only a single change. After you make a number of changes to a line, you may decide that you would rather have the original state of the line back. The U command restores the current line to the state before you started changing it.

You can recover text which you delete, even if undo will not bring it back; see the section on recovering lost text below.

3.6. Summary

4. Moving about; rearranging and duplicating text

4.1. Low level character motions

Now move the cursor to a line where there is a punctuation or a bracketing character such as a parenthesis or a comma or period. Try the command fx where x is this character. This command finds the next x character to the right of the cursor in the current line. Try then hitting a ;, which finds the next instance of the same character. By using the f command and then a sequence of ;'s you can often get to a particular place in a line much faster than with a sequence of word motions or SPACE s. There is also a F command, which is like f, but searches backward. The ; command repeats F also.

When you are operating on the text in a line it is often desirable to deal with the characters up to, but not including, the first instance of a character. Try dfx for some x now and notice that the x character is deleted. Undo this with u and then try dtx; the t here stands for to, i.e. delete up to the next x, but not the x. The command T is the reverse of t.

When working with the text of a single line, an moves the cursor to the first non-white position on the line, and a $ moves it to the end of the line. Thus $a will append new text at the end of the current line.

Your file may have tab (^I) characters in it. These characters are represented as a number of spaces expanding to a tab stop, where tab stops are every 8 positions.*

When the cursor is at a tab, it sits on the last of the several spaces which represent that tab. Try moving the cursor back and forth over tabs so you understand how this works.

On rare occasions, your file may have nonprinting characters in it. These characters are displayed in the same way they are represented in this document, that is with a two character code, the first character of which is `^'. On the screen non-printing characters resemble a `^' character adjacent to another, but spacing or backspacing over the character will reveal that the two characters are, like the spaces representing a tab character, a single character.

The editor sometimes discards control characters, depending on the character and the setting of the beautify option, if you attempt to insert them in your file. You can get a control character in the file by beginning an insert and then typing a ^V before the control character. The ^V quotes the following character, causing it to be inserted directly into the file.

4.2. Higher level text objects

In working with a document it is often advantageous to work in terms of sentences, paragraphs, and sections. The operations ( and ) move to the beginning of the previous and next sentences respectively. Thus the command d) will delete the rest of the current sentence; likewise d( will delete the previous sentence if you are at the beginning of the current sentence, or the current sentence up to where you are if you are not at the beginning of the current sentence.

A sentence is defined to end at a `.', `!' or `?' which is followed by either the end of a line, or by two spaces. Any number of closing `)', `]', `"' and `' characters may appear after the `.', `!' or `?' before the spaces or end of line.

The operations { and } move over paragraphs and the operations [[ and ]] move over sections.

A paragraph begins after each empty line, and also at each of a set of paragraph macros, specified by the pairs of characters in the definition of the string valued option paragraphs. The default setting for this option defines the paragraph macros of the -ms and -mm macro packages, i.e. the `.IP', `.LP', `.PP' and `.QP', `.P' and `.LI' macros.

Each paragraph boundary is also a sentence boundary. The sentence and paragraph commands can be given counts to operate over groups of sentences and paragraphs.

Sections in the editor begin after each macro in the sections option, normally `.NH', `.SH', `.H' and `.HU', and each line with a formfeed ^L in the first column. Section boundaries are always line and paragraph boundaries also.

Try experimenting with the sentence and paragraph commands until you are sure how they work. If you have a large document, try looking through it using the section commands. The section commands interpret a preceding count as a different window size in which to redraw the screen at the new location, and this window size is the base size for newly drawn windows until another size is specified. This is very useful if you are on a slow terminal and are looking for a particular section. You can give the first section command a small count to then see each successive section heading in a small window.

4.3. Rearranging and duplicating text

The editor has a single unnamed buffer where the last deleted or changed away text is saved, and a set of named buffers a-z which you can use to save copies of text and to move text around in your file and between files.

The operator y yanks a copy of the object which follows into the unnamed buffer. If preceded by a buffer name, "xy, where x here is replaced by a letter a-z, it places the text in the named buffer. The text can then be put back in the file with the commands p and P; p puts the text after or below the cursor, while P puts the text before or above the cursor.

If the text which you yank forms a part of a line, or is an object such as a sentence which partially spans more than one line, then when you put the text back, it will be placed after the cursor (or before if you use P). If the yanked text forms whole lines, they will be put back as whole lines, without changing the current line. In this case, the put acts much like a o or O command.

Try the command YP. This makes a copy of the current line and leaves you on this copy, which is placed before the current line. The command Y is a convenient abbreviation for yy. The command Yp will also make a copy of the current line, and place it after the current line. You can give Y a count of lines to yank, and thus duplicate several lines; try 3YP.

To move text within the buffer, you need to delete it in one place, and put it back in another. You can precede a delete operation by the name of a buffer in which the text is to be stored as in "a5dd deleting 5 lines into the named buffer a. You can then move the cursor to the eventual resting place of the these lines and do a "ap or "aP to put them back. In fact, you can switch and edit another file before you put the lines back, by giving a command of the form :e name CR where name is the name of the other file you want to edit. You will have to write back the contents of the current editor buffer (or discard them) if you have made changes before the editor will let you switch to the other file. An ordinary delete command saves the text in the unnamed buffer, so that an ordinary put can move it elsewhere. However, the unnamed buffer is lost when you change files, so to move text from one file to another you should use an unnamed buffer.

4.4. Summary.

5. High level commands

5.1. Writing, quitting, editing new files

So far we have seen how to enter vi and to write out our file using either ZZ or :w CR . The first exits from the editor, (writing if changes were made), the second writes and stays in the editor.

If you have changed the editor's copy of the file but do not wish to save your changes, either because you messed up the file or decided that the changes are not an improvement to the file, then you can give the command :q! CR to quit from the editor without writing the changes. You can also reedit the same file (starting over) by giving the command :e! CR . These commands should be used only rarely, and with caution, as it is not possible to recover the changes you have made after you discard them in this manner.

You can edit a different file without leaving the editor by giving the command :e name CR . If you have not written out your file before you try to do this, then the editor will tell you this, and delay editing the other file. You can then give the command :w CR to save your work and then the :e name CR command again, or carefully give the command :e! name CR , which edits the other file discarding the changes you have made to the current file. To have the editor automatically save changes, include set autowrite in your EXINIT, and use :n instead of :e.

5.2. Escaping to a shell

You can get to a shell to execute a single command by giving a vi command of the form :!cmd CR . The system will run the single command cmd and when the command finishes, the editor will ask you to hit a RETURN to continue. When you have finished looking at the output on the screen, you should hit RETURN and the editor will clear the screen and redraw it. You can then continue editing. You can also give another : command when it asks you for a RETURN ; in this case the screen will not be redrawn.

If you wish to execute more than one command in the shell, then you can give the command :sh CR . This will give you a new shell, and when you finish with the shell, ending it by typing a ^D, the editor will clear the screen and continue.

On systems which support it, ^Z will suspend the editor and return to the (top level) shell. When the editor is resumed, the screen will be redrawn.

5.3. Marking and returning

The command returned to the previous place after a motion of the cursor by a command such as /, ? or G. You can also mark lines in the file with single letter tags and return to these marks later by naming the tags. Try marking the current line with the command mx, where you should pick some letter for x, say `a'. Then move the cursor to a different line (any way you like) and hit a. The cursor will return to the place which you marked. Marks last only until you edit another file.

When using operators such as d and referring to marked lines, it is often desirable to delete whole lines rather than deleting to the exact position in the line marked by m. In this case you can use the form x rather than x. Used without an operator, x will move to the first non-white character of the marked line; similarly moves to the first non-white character of the line containing the previous context mark .

5.4. Adjusting the screen

If the screen image is messed up because of a transmission error to your terminal, or because some program other than the editor wrote output to your terminal, you can hit a ^L, the ASCII form-feed character, to cause the screen to be refreshed.

On a dumb terminal, if there are @ lines in the middle of the screen as a result of line deletion, you may get rid of these lines by typing ^R to cause the editor to retype the screen, closing up these holes.

Finally, if you wish to place a certain line on the screen at the top middle or bottom of the screen, you can position the cursor to that line, and then give a z command. You should follow the z command with a RETURN if you want the line to appear at the top of the window, a . if you want it at the center, or a - if you want it at the bottom.

6. Special topics

6.1. Editing on slow terminals

When you are on a slow terminal, it is important to limit the amount of output which is generated to your screen so that you will not suffer long delays, waiting for the screen to be refreshed. We have already pointed out how the editor optimizes the updating of the screen during insertions on dumb terminals to limit the delays, and how the editor erases lines to @ when they are deleted on dumb terminals.

The use of the slow terminal insertion mode is controlled by the slowopen option. You can force the editor to use this mode even on faster terminals by giving the command :se slow CR . If your system is sluggish this helps lessen the amount of output coming to your terminal. You can disable this option by :se noslow CR .

The editor can simulate an intelligent terminal on a dumb one. Try giving the command :se redraw CR . This simulation generates a great deal of output and is generally tolerable only on lightly loaded systems and fast terminals. You can disable this by giving the command :se noredraw CR .

The editor also makes editing more pleasant at low speed by starting editing in a small window, and letting the window expand as you edit. This works particularly well on intelligent terminals. The editor can expand the window easily when you insert in the middle of the screen on these terminals. If possible, try the editor on an intelligent terminal to see how this works.

You can control the size of the window which is redrawn each time the screen is cleared by giving window sizes as argument to the commands which cause large screen motions:

     :  /  ?  [[  ]]    

Thus if you are searching for a particular instance of a common string in a file you can precede the first search command by a small number, say 3, and the editor will draw three line windows around each instance of the string which it locates.

You can easily expand or contract the window, placing the current line as you choose, by giving a number on a z command, after the z and before the following RETURN , . or -. Thus the command z5. redraws the screen with the current line in the center of a five line window.

If the editor is redrawing or otherwise updating large portions of the display, you can interrupt this updating by hitting a DEL or RUB as usual. If you do this you may partially confuse the editor about what is displayed on the screen. You can still edit the text on the screen if you wish; clear up the confusion by hitting a ^L; or move or search again, ignoring the current state of the display.

See section 7.8 on open mode for another way to use the vi command set on slow terminals.

6.2. Options, set, and editor startup files

The editor has a set of options, some of which have been mentioned above. The most useful options are given in the following table.

The options are of three kinds: numeric options, string options, and toggle options. You can set numeric and string options by a statement of the form

     set opt=val

and toggle options can be set or unset by statements of one of the forms

     set opt
     set noopt

These statements can be placed in your EXINIT in your environment, or given while you are running vi by preceding them with a : and following them with a CR .

You can get a list of all options which you have changed by the command :set CR , or the value of a single option by the command :set opt? CR . A list of all possible options and their values is generated by :set all CR . Set can be abbreviated se. Multiple options can be placed on one line, e.g. :se ai aw nu CR .

Options set by the set command only last while you stay in the editor. It is common to want to have certain options set whenever you use the editor. This can be accomplished by creating a list of ex commands

which are to be run every time you start up ex, edit, or vi. A typical list includes a set command, and possibly a few map commands. Since it is advisable to get these commands on one line, they can be separated with the | character, for example:

     set ai aw terse|map @ dd|map # x

which sets the options autoindent, autowrite, terse, (the set command), makes @ delete a line, (the first map), and makes # delete a character, (the second map). (See section 6.9 for a description of the map command) This string should be placed in the variable EXINIT in your environment. If you use the shell csh, put this line in the file .login in your home directory:

     setenv EXINIT set ai aw terse|map @ dd|map # x

If you use the standard shell sh, put these lines in the file .profile in your home directory:

     EXINIT=set ai aw terse|map @ dd|map # x
     export EXINIT

Of course, the particulars of the line would depend on which options you wanted to set.

6.3. Recovering lost lines

You might have a serious problem if you delete a number of lines and then regret that they were deleted. Despair not, the editor saves the last 9 deleted blocks of text in a set of numbered registers 1-9. You can get the n'th previous deleted text back in your file by the command "np. The " here says that a buffer name is to follow, n is the number of the buffer you wish to try (use the number 1 for now), and p is the put command, which puts text in the buffer after the cursor. If this doesn't bring back the text you wanted, hit u to undo this and then . (period) to repeat the put command. In general the . command will repeat the last change you made. As a special case, when the last command refers to a numbered text buffer, the . command increments the number of the buffer before repeating the command. Thus a sequence of the form

     "1pu.u.u.

will, if repeated long enough, show you all the deleted text which has been saved for you. You can omit the u commands here to gather up all this text in the buffer, or stop after any . command to keep just the then recovered text. The command P can also be used rather than p to put the recovered text before rather than after the cursor.

6.4. Recovering lost files

If the system crashes, you can recover the work you were doing to within a few changes. You will normally receive mail when you next login giving you the name of the file which has been saved for you. You should then change to the directory where you were when the system crashed and give a command of the form:

     % vi -r name

replacing name with the name of the file which you were editing. This will recover your work to a point near where you left off.

You can get a listing of the files which are saved for you by giving the command:

     % vi -r

If there is more than one instance of a particular file saved, the editor gives you the newest instance each time you recover it. You can thus get an older saved copy back by first recovering the newer copies.

For this feature to work, vi must be correctly installed by a super user on your system, and the mail program must exist to receive mail. The invocation ``vi -r'' will not always list all saved files, but they can be recovered even if they are not listed.

6.5. Continuous text input

When you are typing in large amounts of text it is convenient to have lines broken near the right margin automatically. You can cause this to happen by giving the command :se wm=10 CR . This causes all lines to be broken at a space at least 10 columns from the right hand edge of the screen.

If the editor breaks an input line and you wish to put it back together you can tell it to join the lines with J. You can give J a count of the number of lines to be joined as in 3J to join 3 lines. The editor supplies white space, if appropriate, at the juncture of the joined lines, and leaves the cursor at this white space. You can kill the white space with x if you don't want it.

6.6. Features for editing programs

The editor has a number of commands for editing programs. The thing that most distinguishes editing of programs from editing of text is the desirability of maintaining an indented structure to the body of the program. The editor has a autoindent facility for helping you generate correctly indented programs.

To enable this facility you can give the command :se ai CR . Now try opening a new line with o and type some characters on the line after a few tabs. If you now start another line, notice that the editor supplies white space at the beginning of the line to line it up with the previous line. You cannot backspace over this indentation, but you can use ^D key to backtab over the supplied indentation.

Each time you type ^D you back up one position, normally to an 8 column boundary. This amount is settable; the editor has an option called shiftwidth which you can set to change this value. Try giving the command :se sw=4 CR and then experimenting with autoindent again.

For shifting lines in the program left and right, there are operators < and >. These shift the lines you specify right or left by one shiftwidth. Try << and >> which shift one line left or right, and <L and >L shifting the rest of the display left and right.

If you have a complicated expression and wish to see how the parentheses match, put the cursor at a left or right parenthesis and hit %. This will show you the matching parenthesis. This works also for braces { and }, and brackets [ and ].

If you are editing C programs, you can use the [[ and ]] keys to advance or retreat to a line starting with a {, i.e. a function declaration at a time. When ]] is used with an operator it stops after a line which starts with }; this is sometimes useful with y]].

6.7. Filtering portions of the buffer

You can run system commands over portions of the buffer using the operator !. You can use this to sort lines in the buffer, or to reformat portions of the buffer with a pretty-printer. Try typing in a list of random words, one per line and ending them with a blank line. Back up to the beginning of the list, and then give the command !}sort CR . This says to sort the next paragraph of material, and the blank line ends a paragraph.

6.8. Commands for editing LISP

If you are editing a LISP program you should set the option lisp by doing :se lisp CR . This changes the ( and ) commands to move backward and forward over s-expressions. The { and } commands are like ( and ) but don't stop at atoms. These can be used to skip to the next list, or through a comment quickly.

The autoindent option works differently for LISP , supplying indent to align at the first argument to the last open list. If there is no such argument then the indent is two spaces more than the last level.

There is another option which is useful for typing in LISP , the showmatch option. Try setting it with :se sm CR and then try typing a `(' some words and then a `)'. Notice that the cursor shows the position of the `(' which matches the `)' briefly. This happens only if the matching `(' is on the screen, and the cursor stays there for at most one second.

The editor also has an operator to realign existing lines as though they had been typed in with lisp and autoindent set. This is the = operator. Try the command =% at the beginning of a function. This will realign all the lines of the function declaration.

When you are editing LISP ,, the [[ and ]] advance and retreat to lines beginning with a (, and are useful for dealing with entire function definitions.

6.9. Macros

Vi has a parameterless macro facility, which lets you set it up so that when you hit a single keystroke, the editor will act as though you had hit some longer sequence of keys. You can set this up if you find yourself typing the same sequence of commands repeatedly.

Briefly, there are two flavors of macros:

a) Ones where you put the macro body in a buffer register, say x. You can then type @x to invoke the macro. The @ may be followed by another @ to repeat the last macro.
b) You can use the map command from vi (typically in your EXINIT) with a command of the form:
     :map lhs rhsCR
mapping lhs into rhs. There are restrictions: lhs should be one keystroke (either 1 character or one function key) since it must be entered within one second (unless notimeout is set, in which case you can type it as slowly as you wish, and vi will wait for you to finish it before it echoes anything). The lhs can be no longer than 10 characters, the rhs no longer than 100. To get a space, tab or newline into lhs or rhs you should escape them with a ^V. (It may be necessary to double the ^V if the map command is given inside vi, rather than in ex.) Spaces and tabs inside the rhs need not be escaped.

Thus to make the q key write and exit the editor, you can give the command

     :map q :wq^V^VCR CR

which means that whenever you type q, it will be as though you had typed the four characters :wq CR . A ^V's is needed because without it the CR would end the : command, rather than becoming part of the map definition. There are two ^V's because from within vi, two ^V's must be typed to get one. The first CR is part of the rhs, the second terminates the : command.

Macros can be deleted with

     unmap lhs

If the lhs of a macro is ``#0'' through ``#9'', this maps the particular function key instead of the 2 character ``#'' sequence. So that terminals without function keys can access such definitions, the form ``#x'' will mean function key x on all terminals (and need not be typed within one second.) The character ``#'' can be changed by using a macro in the usual way:

     :map ^V^V^I #

to use tab, for example. (This won't affect the map command, which still uses #, but just the invocation from visual mode.

The undo command reverses an entire macro call as a unit, if it made any changes.

Placing a `!' after the word map causes the mapping to apply to input mode, rather than command mode. Thus, to arrange for ^T to be the same as 4 spaces in input mode, you can type:

     :map ^T ^Vb/b/b/b/

where b/ is a blank. The ^V is necessary to prevent the blanks from being taken as white space between the lhs and rhs.

7. Word Abbreviations

A feature similar to macros in input mode is word abbreviation. This allows you to type a short word and have it expanded into a longer word or words. The commands are :abbreviate and :unabbreviate (:ab and :una) and have the same syntax as :map. For example:

     :ab eecs Electrical Engineering and Computer Sciences

causes the word `eecs' to always be changed into the phrase `Electrical Engineering and Computer Sciences'. Word abbreviation is different from macros in that only whole words are affected. If `eecs' were typed as part of a larger word, it would be left alone. Also, the partial word is echoed as it is typed. There is no need for an abbreviation to be a single keystroke, as it should be with a macro.

7.1. Abbreviations

The editor has a number of short commands which abbreviate longer commands which we have introduced here. You can find these commands easily on the quick reference card. They often save a bit of typing and you can learn them as convenient.

8. Nitty-gritty details

8.1. Line representation in the display

The editor folds long logical lines onto many physical lines in the display. Commands which advance lines advance logical lines and will skip over all the segments of a line in one motion. The command | moves the cursor to a specific column, and may be useful for getting near the middle of a long line to split it in half. Try 80| on a line which is more than 80 columns long.

The editor only puts full lines on the display; if there is not enough room on the display to fit a logical line, the editor leaves the physical line empty, placing only an @ on the line as a place holder. When you delete lines on a dumb terminal, the editor will often just clear the lines to @ to save time (rather than rewriting the rest of the screen.) You can always maximize the information on the screen by giving the ^R command.

If you wish, you can have the editor place line numbers before each line on the display. Give the command :se nu CR to enable this, and the command :se nonu CR to turn it off. You can have tabs represented as ^I and the ends of lines indicated with `$' by giving the command :se list CR ; :se nolist CR turns this off.

Finally, lines consisting of only the character `~' are displayed when the last line in the file is in the middle of the screen. These represent physical lines which are past the logical end of file.

8.2. Counts

Most vi commands will use a preceding count to affect their behavior in some way. The following table gives the common ways in which the counts are used:


The editor maintains a notion of the current default window size. On terminals which run at speeds greater than 1200 baud the editor uses the full terminal screen. On terminals which are slower than 1200 baud (most dialup lines are in this group) the editor uses 8 lines as the default window size. At 1200 baud the default is 16 lines.

This size is the size used when the editor clears and refills the screen after a search or other motion moves far from the edge of the current window. The commands which take a new window size as count all often cause the screen to be redrawn. If you anticipate this, but do not need as large a window as you are currently using, you may wish to change the screen size by specifying the new size before these commands. In any case, the number of lines used on the screen will expand if you move off the top with a - or similar command or off the bottom with a command such as RETURN or ^D. The window will revert to the last specified size the next time it is cleared and refilled.

The scroll commands ^D and ^U likewise remember the amount of scroll last specified, using half the basic window size initially. The simple insert commands use a count to specify a repetition of the inserted text. Thus 10a+---- ESC will insert a grid-like string of text. A few commands also use a preceding count as a line or column number.

Except for a few commands which ignore any counts (such as ^R), the rest of the editor commands use a count to indicate a simple repetition of their effect. Thus 5w advances five words on the current line, while 5 RETURN advances five lines. A very useful instance of a count as a repetition is a count given to the . command, which repeats the last changing command. If you do dw and then 3., you will delete first one and then three words. You can then delete two more words with 2..

8.3. More file manipulation commands

The following table lists the file manipulation commands which you can use when you are in vi.


All of these commands are followed by a CR or ESC . The most basic commands are :w and :e. A normal editing session on a single file will end with a ZZ command. If you are editing for a long period of time you can give :w commands occasionally after major amounts of editing, and then finish with a ZZ. When you edit more than one file, you can finish with one with a :w and start editing a new file by giving a :e command, or set autowrite and use :n <file>.

If you make changes to the editor's copy of a file, but do not wish to write them back, then you must give an ! after the command you would otherwise use; this forces the editor to discard any changes you have made. Use this carefully.

The :e command can be given a + argument to start at the end of the file, or a +n argument to start at line n. In actuality, n may be any editor command not containing a space, usefully a scan like +/pat or +?pat. In forming new names to the e command, you can use the character % which is replaced by the current file name, or the character # which is replaced by the alternate file name. The alternate file name is generally the last name you typed other than the current file. Thus if you try to do a :e and get a diagnostic that you haven't written the file, you can give a :w command and then a :e # command to redo the previous :e.

You can write part of the buffer to a file by finding out the lines that bound the range to be written using ^G, and giving these numbers after the : and before the w, separated by ,'s. You can also mark these lines with m and then use an address of the form x,y on the w command here.

You can read another file into the buffer after the current line by using the :r command. You can similarly read in the output from a command, just use !cmd instead of a file name.

If you wish to edit a set of files in succession, you can give all the names on the command line, and then edit each one in turn using the command :n. It is also possible to respecify the list of files to be edited by giving the :n command a list of file names, or a pattern to be expanded as you would have given it on the initial vi command.

If you are editing large programs, you will find the :ta command very useful. It utilizes a data base of function names and their locations, which can be created by programs such as ctags, to quickly find a function whose name you give. If the :ta command will require the editor to switch files, then you must :w or abandon any changes before switching. You can repeat the :ta command without any arguments to look for the same tag again.

8.4. More about searching for strings

When you are searching for strings in the file with / and ?, the editor normally places you at the next or previous occurrence of the string. If you are using an operator such as d, c or y, then you may well wish to affect lines up to the line before the line containing the pattern. You can give a search of the form /pat/-n to refer to the n'th line before the next line containing pat, or you can use + instead of - to refer to the lines after the one containing pat. If you don't give a line offset, then the editor will affect characters up to the match place, rather than whole lines; thus use ``+0'' to affect to the line which matches.

You can have the editor ignore the case of words in the searches it does by giving the command :se ic CR . The command :se noic CR turns this off.

Strings given to searches may actually be regular expressions. If you do not want or need this facility, you should

     set nomagic

in your EXINIT. In this case, only the characters and $ are special in patterns. The character \ is also then special (as it is most everywhere in the system), and may be used to get at the an extended pattern matching facility. It is also necessary to use a \ before a / in a forward scan or a ? in a backward scan, in any case. The following table gives the extended forms when magic is set.


If you use nomagic mode, then the . [ and * primitives are given with a preceding .

8.5. More about input mode

There are a number of characters which you can use to make corrections during input mode. These are summarized in the following table.


The most usual way of making corrections to input is by typing ^H to correct a single character, or by typing one or more ^W's to back over incorrect words. If you use # as your erase character in the normal system, it will work like ^H.

Your system kill character, normally @, ^X or ^U, will erase all the input you have given on the current line. In general, you can neither erase input back around a line boundary nor can you erase characters which you did not insert with this insertion command. To make corrections on the previous line after a new line has been started you can hit ESC to end the insertion, move over and make the correction, and then return to where you were to continue. The command A which appends at the end of the current line is often useful for continuing.

If you wish to type in your erase or kill character (say # or @) then you must precede it with a \, just as you would do at the normal system command level. A more general way of typing non-printing characters into the file is to precede them with a ^V. The ^V echoes as a character on which the cursor rests. This indicates that the editor expects you to type a control character. In fact you may type any character and it will be inserted into the file at that point.*

If you are using autoindent you can backtab over the indent which it supplies by typing a ^D. This backs up to a shiftwidth boundary. This only works immediately after the supplied autoindent.

When you are using autoindent you may wish to place a label at the left margin of a line. The way to do this easily is to type and then ^D. The editor will move the cursor to the left margin for one line, and restore the previous indent on the next. You can also type a 0 followed immediately by a ^D if you wish to kill all the indent and not have it come back on the next line.

8.6. Upper case only terminals

If your terminal has only upper case, you can still use vi by using the normal system convention for typing on such a terminal. Characters which you normally type are converted to lower case, and you can type upper case letters by preceding them with a . The characters { ~ } | are not available on such terminals, but you can escape them as \ ) ! \(&acute;). These characters are represented on the display in the same way they are typed.

8.7. Vi and ex

Vi is actually one mode of editing within the editor ex. When you are running vi you can escape to the line oriented editor of ex by giving the command Q. All of the : commands which were introduced above are available in ex. Likewise, most ex commands can be invoked from vi using :. Just give them without the : and follow them with a CR .

In rare instances, an internal error may occur in vi. In this case you will get a diagnostic and be left in the command mode of ex. You can then save your work and quit if you wish by giving a command x after the : which ex prompts you with, or you can reenter vi by giving ex a vi command.

There are a number of things which you can do more easily in ex than in vi. Systematic changes in line oriented material are particularly easy. You can read the advanced editing documents for the editor ed to find out a lot more about this style of editing. Experienced users often mix their use of ex command mode and vi command mode to speed the work they are doing.

8.8. Open mode: vi on hardcopy terminals and ``glass tty's''

If you are on a hardcopy terminal or a terminal which does not have a cursor which can move off the bottom line, you can still use the command set of vi, but in a different mode. When you give a vi command, the editor will tell you that it is using open mode. This name comes from the open command in ex, which is used to get into the same mode.

The only difference between visual mode and open mode is the way in which the text is displayed.

In open mode the editor uses a single line window into the file, and moving backward and forward in the file causes new lines to be displayed, always below the current line. Two commands of vi work differently in open: z and ^R. The z command does not take parameters, but rather draws a window of context around the current line and then returns you to the current line.

If you are on a hardcopy terminal, the ^R command will retype the current line. On such terminals, the editor normally uses two lines to represent the current line. The first line is a copy of the line as you started to edit it, and you work on the line below this line. When you delete characters, the editor types a number of 's to show you the characters which are deleted. The editor also reprints the current line soon after such changes so that you can see what the line looks like again.

It is sometimes useful to use this mode on very slow terminals which can support vi in the full screen mode. You can do this by entering ex and using an open command.

Acknowledgements

Bruce Englar encouraged the early development of this display editor. Peter Kessler helped bring sanity to version 2's command layout. Bill Joy wrote versions 1 and 2.0 through 2.7, and created the framework that users see in the present editor. Mark Horton added macros and other features and made the editor work on a large number of terminals and Unix systems.

Appendix: character functions

This appendix gives the uses the editor makes of each character. The characters are presented in their order in the ASCII character set: Control characters come first, then most special characters, then the digits, upper and then lower case characters.

For each character we tell a meaning it has as a command and any meaning it has during an insert. If it has only meaning as a command, then only this is discussed. Section numbers in parentheses indicate where the character is discussed; a `f' after the section number means that the character is mentioned in a footnote.

^@ Not a command character. If typed as the first character of an insertion it is replaced with the last text inserted, and the insert terminates. Only 128 characters are saved from the last insert; if more characters were inserted the mechanism is not available. A ^@ cannot be part of the file due to the editor implementation (7.5f).
^A Unused.
^B Backward window. A count specifies repetition. Two lines of continuity are kept if possible (2.1, 6.1, 7.2).
^C Unused.
^D As a command, scrolls down a half-window of text. A count gives the number of (logical) lines to scroll, and is remembered for future ^D and ^U commands (2.1, 7.2). During an insert, backtabs over autoindent white space at the beginning of a line (6.6, 7.5); this white space cannot be backspaced over.
^E Exposes one more line below the current screen in the file, leaving the cursor where it is if possible. (Version 3 only.)
^F Forward window. A count specifies repetition. Two lines of continuity are kept if possible (2.1, 6.1, 7.2).
^G Equivalent to :f CR , printing the current file, whether it has been modified, the current line number and the number of lines in the file, and the percentage of the way through the file that you are.
^H ( BS ) Same as left arrow. (See h). During an insert, eliminates the last input character, backing over it but not erasing it; it remains so you can see what you typed if you wish to type something only slightly different (3.1, 7.5).
^I ( TAB ) Not a command character. When inserted it prints as some number of spaces. When the cursor is at a tab character it rests at the last of the spaces which represent the tab. The spacing of tabstops is controlled by the tabstop option (4.1, 6.6).
^J ( LF ) Same as down arrow (see j).
^K Unused.
^L The ASCII formfeed character, this causes the screen to be cleared and redrawn. This is useful after a transmission error, if characters typed by a program other than the editor scramble the screen, or after output is stopped by an interrupt (5.4, 7.2f).
^M ( CR ) A carriage return advances to the next line, at the first non-white position in the line. Given a count, it advances that many lines (2.3). During an insert, a CR causes the insert to continue onto another line (3.1).
^N Same as down arrow (see j).
^O Unused.
^P Same as up arrow (see k).
^Q Not a command character. In input mode, ^Q quotes the next character, the same as ^V, except that some teletype drivers will eat the ^Q so that the editor never sees it.
^R Redraws the current screen, eliminating logical lines not corresponding to physical lines (lines with only a single @ character on them). On hardcopy terminals in open mode, retypes the current line (5.4, 7.2, 7.8).
^S Unused. Some teletype drivers use ^S to suspend output until pressed.^Qis
^T Not a command character. During an insert, with autoindent set and at the beginning of the line, inserts shiftwidth white space.
^U Scrolls the screen up, inverting ^D which scrolls down. Counts work as they do for ^D, and the previous scroll amount is common to both. On a dumb terminal, ^U will often necessitate clearing and redrawing the screen further back in the file (2.1, 7.2).
^V Not a command character. In input mode, quotes the next character so that it is possible to insert non-printing and special characters into the file (4.2, 7.5).
^W Not a command character. During an insert, backs up as b would in command mode; the deleted characters remain on the display (see ^H) (7.5).
^X Unused.
^Y Exposes one more line above the current screen, leaving the cursor where it is if possible. (No mnemonic value for this key; however, it is next to ^U which scrolls up a bunch.) (Version 3 only.)
^Z If supported by the Unix system, stops the editor, exiting to the top level shell. Same as :stop CR . Otherwise, unused.
^[ ( ESC ) Cancels a partially formed command, such as a z when no following character has yet been given; terminates inputs on the last line (read by commands such as : / and ?); ends insertions of new text into the buffer. If an ESC is given when quiescent in command state, the editor rings the bell or flashes the screen. You can thus hit ESC if you don't know what is happening till the editor rings the bell. If you don't know if you are in insert mode you can type ESC a, and then material to be input; the material will be inserted correctly whether or not you were in insert mode when you started (1.5, 3.1, 7.5).
^\ Unused.
^] Searches for the word which is after the cursor as a tag. Equivalent to typing :ta, this word, and then a CR . Mnemonically, this command is ``go right to'' (7.3).
^ Equivalent to :e # CR , returning to the previous position in the last edited file, or editing a file which you specified if you got a `No write since last change diagnostic' and do not want to have to type the file name again (7.3). (You have to do a :w before ^ will work in this case. If you do not wish to write the file you should do :e! # CR instead.)
^_ Unused. Reserved as the command character for the Tektronix 4025 and 4027 terminal.
SPACE Same as right arrow (see l).
! An operator, which processes lines from the buffer with reformatting commands. Follow ! with the object to be processed, and then the command name terminated by CR . Doubling ! and preceding it by a count causes count lines to be filtered; otherwise the count is passed on to the object after the !. Thus 2!}fmt CR reformats the next two paragraphs by running them through the program fmt. If you are working on LISP , the command !%grind CR ,*

given at the beginning of a function, will run the text of the function through the LISP grinder (6.7, 7.3). To read a file or the output of a command into the buffer use :r (7.3). To simply execute a command use :! (7.3).
" Precedes a named buffer specification. There are named buffers 1-9 used for saving deleted text and named buffers a-z into which you can place text (4.3, 6.3)
# The macro character which, when followed by a number, will substitute for a function key on terminals without function keys (6.9). In input mode, if this is your erase character, it will delete the last character you typed in input mode, and must be preceded with a \ to insert it, since it normally backs over the last input character you gave.
$ Moves to the end of the current line. If you :se list CR , then the end of each line will be shown by printing a $ after the end of the displayed text in the line. Given a count, advances to the count'th following end of line; thus 2$ advances to the end of the following line.
% Moves to the parenthesis or brace { } which balances the parenthesis or brace at the current cursor position.
& A synonym for :& CR , by analogy with the ex & command.
When followed by a returns to the previous context at the beginning of a line. The previous context is set whenever the current line is moved in a non-relative way. When followed by a letter a-z, returns to the line which was marked with this letter with a m command, at the first non-white character in the line. (2.2, 5.3). When used with an operator such as d, the operation takes place over complete lines; if you use , the operation takes place from the exact marked place to the current cursor position within the line.
( Retreats to the beginning of a sentence, or to the beginning of a LISP s-expression if the lisp option is set. A sentence ends at a . ! or ? which is followed by either the end of a line or by two spaces. Any number of closing ) ] " and characters may appear after the . ! or ?, and before the spaces or end of line. Sentences also begin at paragraph and section boundaries (see { and [[ below). A count advances that many sentences (4.2, 6.8).
) Advances to the beginning of a sentence. A count repeats the effect. See ( above for the definition of a sentence (4.2, 6.8).
* Unused.
+ Same as CR when used as a command.
, Reverse of the last f F t or T command, looking the other way in the current line. Especially useful after hitting too many ; characters. A count repeats the search.
- Retreats to the previous line at the first non-white character. This is the inverse of + and RETURN . If the line moved to is not on the screen, the screen is scrolled, or cleared and redrawn if this is not possible. If a large amount of scrolling would be required the screen is also cleared and redrawn, with the current line at the center (2.3).
. Repeats the last command which changed the buffer. Especially useful when deleting words or lines; you can delete some words/lines and then hit . to delete more and more words/lines. Given a count, it passes it on to the command being repeated. Thus after a 2dw, 3. deletes three words (3.3, 6.3, 7.2, 7.4).
/ Reads a string from the last line on the screen, and scans forward for the next occurrence of this string. The normal input editing sequences may be used during the input on the bottom line; an returns to command state without ever searching. The search begins when you hit CR to terminate the pattern; the cursor moves to the beginning of the last line to indicate that the search is in progress; the search may then be terminated with a DEL or RUB , or by backspacing when at the beginning of the bottom line, returning the cursor to its initial position. Searches normally wrap end-around to find a string anywhere in the buffer.
When used with an operator the enclosed region is normally affected. By mentioning an offset from the line matched by the pattern you can force whole lines to be affected. To do this give a pattern with a closing a closing / and then an offset +n or -n.
To include the character / in the search string, you must escape it with a preceding \. A at the beginning of the pattern forces the match to occur at the beginning of a line only; this speeds the search. A $ at the end of the pattern forces the match to occur at the end of a line only. More extended pattern matching is available, see section 7.4; unless you set nomagic in your .exrc file you will have to preceed the characters . [ * and ~ in the search pattern with a \ to get them to work as you would naively expect (1.5, 2,2, 6.1, 7.2, 7.4).
0 Moves to the first character on the current line. Also used, in forming numbers, after an initial 1-9.
1-9 Used to form numeric arguments to commands (2.3, 7.2).
: A prefix to a set of commands for file and option manipulation and escapes to the system. Input is given on the bottom line and terminated with an CR , and the command then executed. You can return to where you were by hitting DEL or RUB if you hit : accidentally (see primarily 6.2 and 7.3).
; Repeats the last single character find which used f F t or T. A count iterates the basic scan (4.1).
< An operator which shifts lines left one shiftwidth, normally 8 spaces. Like all operators, affects lines when repeated, as in <<. Counts are passed through to the basic object, thus 3<< shifts three lines (6.6, 7.2).
= Reindents line for LISP , as though they were typed in with lisp and autoindent set (6.8).
> An operator which shifts lines right one shiftwidth, normally 8 spaces. Affects lines when repeated as in >>. Counts repeat the basic object (6.6, 7.2).
? Scans backwards, the opposite of /. See the / description above for details on scanning (2.2, 6.1, 7.4).
@ A macro character (6.9). If this is your kill character, you must escape it with a \ to type it in during input mode, as it normally backs over the input you have given on the current line (3.1, 3.4, 7.5).
A Appends at the end of line, a synonym for $a (7.2).
B Backs up a word, where words are composed of non-blank sequences, placing the cursor at the beginning of the word. A count repeats the effect (2.4).
C Changes the rest of the text on the current line; a synonym for c$.
D Deletes the rest of the text on the current line; a synonym for d$.
E Moves forward to the end of a word, defined as blanks and non-blanks, like B and W. A count repeats the effect.
F Finds a single following character, backwards in the current line. A count repeats this search that many times (4.1).
G Goes to the line number given as preceding argument, or the end of the file if no preceding count is given. The screen is redrawn with the new current line in the center if necessary (7.2).
H Home arrow. Homes the cursor to the top line on the screen. If a count is given, then the cursor is moved to the count'th line on the screen. In any case the cursor is moved to the first non-white character on the line. If used as the target of an operator, full lines are affected (2.3, 3.2).
I Inserts at the beginning of a line; a synonym for i.
J Joins together lines, supplying appropriate white space: one space between words, two spaces after a ., and no spaces at all if the first character of the joined on line is ). A count causes that many lines to be joined rather than the default two (6.5, 7.1f).
K Unused.
L Moves the cursor to the first non-white character of the last line on the screen. With a count, to the first non-white of the count'th line from the bottom. Operators affect whole lines when used with L (2.3).
M Moves the cursor to the middle line on the screen, at the first non-white position on the line (2.3).
N Scans for the next match of the last pattern given to / or ?, but in the reverse direction; this is the reverse of n.
O Opens a new line above the current line and inputs text there up to an ESC . A count can be used on dumb terminals to specify a number of lines to be opened; this is generally obsolete, as the slowopen option works better (3.1).
P Puts the last deleted text back before/above the cursor. The text goes back as whole lines above the cursor if it was deleted as whole lines. Otherwise the text is inserted between the characters before and at the cursor. May be preceded by a named buffer specification "x to retrieve the contents of the buffer; buffers 1-9 contain deleted material, buffers a-z are available for general use (6.3).
Q Quits from vi to ex command mode. In this mode, whole lines form commands, ending with a RETURN . You can give all the : commands; the editor supplies the : as a prompt (7.7).
R Replaces characters on the screen with characters you type (overlay fashion). Terminates with an ESC .
S Changes whole lines, a synonym for cc. A count substitutes for that many lines. The lines are saved in the numeric buffers, and erased on the screen before the substitution begins.
T Takes a single following character, locates the character before the cursor in the current line, and places the cursor just after that character. A count repeats the effect. Most useful with operators such as d (4.1).
U Restores the current line to its state before you started changing it (3.5).
V Unused.
W Moves forward to the beginning of a word in the current line, where words are defined as sequences of blank/non-blank characters. A count repeats the effect (2.4).
X Deletes the character before the cursor. A count repeats the effect, but only characters on the current line are deleted.
Y Yanks a copy of the current line into the unnamed buffer, to be put back by a later p or P; a very useful synonym for yy. A count yanks that many lines. May be preceded by a buffer name to put lines in that buffer (7.4).
ZZ Exits the editor. (Same as :x CR .) If any changes have been made, the buffer is written out to the current file. Then the editor quits.
[[ Backs up to the previous section boundary. A section begins at each macro in the sections option, normally a `.NH' or `.SH' and also at lines which which start with a formfeed ^L. Lines beginning with { also stop [[; this makes it useful for looking backwards, a function at a time, in C programs. If the option lisp is set, stops at each ( at the beginning of a line, and is thus useful for moving backwards at the top level LISP objects. (4.2, 6.1, 6.6, 7.2).
\ Unused.
]] Forward to a section boundary, see [[ for a definition (4.2, 6.1, 6.6, 7.2).
Moves to the first non-white position on the current line (4.4).
_ Unused.
When followed by a returns to the previous context. The previous context is set whenever the current line is moved in a non-relative way. When followed by a letter a-z, returns to the position which was marked with this letter with a m command. When used with an operator such as d, the operation takes place from the exact marked place to the current position within the line; if you use , the operation takes place over complete lines (2.2, 5.3).
a Appends arbitrary text after the current cursor position; the insert can continue onto multiple lines by using RETURN within the insert. A count causes the inserted text to be replicated, but only if the inserted text is all on one line. The insertion terminates with an ESC (3.1, 7.2).
b Backs up to the beginning of a word in the current line. A word is a sequence of alphanumerics, or a sequence of special characters. A count repeats the effect (2.4).
c An operator which changes the following object, replacing it with the following input text up to an ESC . If more than part of a single line is affected, the text which is changed away is saved in the numeric named buffers. If only part of the current line is affected, then the last character to be changed away is marked with a $. A count causes that many objects to be affected, thus both 3c) and c3) change the following three sentences (7.4).
d An operator which deletes the following object. If more than part of a line is affected, the text is saved in the numeric buffers. A count causes that many objects to be affected; thus 3dw is the same as d3w (3.3, 3.4, 4.1, 7.4).
e Advances to the end of the next word, defined as for b and w. A count repeats the effect (2.4, 3.1).
f Finds the first instance of the next character following the cursor on the current line. A count repeats the find (4.1).
g Unused.
Arrow keys h, j, k, l, and H.
h Left arrow. Moves the cursor one character to the left. Like the other arrow keys, either h, the left arrow key, or one of the synonyms (^H) has the same effect. On v2 editors, arrow keys on certain kinds of terminals (those which send escape sequences, such as vt52, c100, or hp) cannot be used. A count repeats the effect (3.1, 7.5).
i Inserts text before the cursor, otherwise like a (7.2).
j Down arrow. Moves the cursor one line down in the same column. If the position does not exist, vi comes as close as possible to the same column. Synonyms include ^J (linefeed) and ^N.
k Up arrow. Moves the cursor one line up. ^P is a synonym.
l Right arrow. Moves the cursor one character to the right. SPACE is a synonym.
m Marks the current position of the cursor in the mark register which is specified by the next character a-z. Return to this position or use with an operator using or (5.3).
n Repeats the last / or ? scanning commands (2.2).
o Opens new lines below the current line; otherwise like O (3.1).
p Puts text after/below the cursor; otherwise like P (6.3).
q Unused.
r Replaces the single character at the cursor with a single character you type. The new character may be a RETURN ; this is the easiest way to split lines. A count replaces each of the following count characters with the single character given; see R above which is the more usually useful iteration of r (3.2).
s Changes the single character under the cursor to the text which follows up to an ESC ; given a count, that many characters from the current line are changed. The last character to be changed is marked with $ as in c (3.2).
t Advances the cursor upto the character before the next character typed. Most useful with operators such as d and c to delete the characters up to a following character. You can use . to delete more if this doesn't delete enough the first time (4.1).
u Undoes the last change made to the current buffer. If repeated, will alternate between these two states, thus is its own inverse. When used after an insert which inserted text on more than one line, the lines are saved in the numeric named buffers (3.5).
v Unused.
w Advances to the beginning of the next word, as defined by b (2.4).
x Deletes the single character under the cursor. With a count deletes deletes that many characters forward from the cursor position, but only on the current line (6.5).
y An operator, yanks the following object into the unnamed temporary buffer. If preceded by a named buffer specification, "x, the text is placed in that buffer also. Text can be recovered by a later p or P (7.4).
z Redraws the screen with the current line placed as specified by the following character: RETURN specifies the top of the screen, . the center of the screen, and - at the bottom of the screen. A count may be given after the z and before the following character to specify the new screen size for the redraw. A count before the z gives the number of the line to place in the center of the screen instead of the default current line. (5.4)
{ Retreats to the beginning of the beginning of the preceding paragraph. A paragraph begins at each macro in the paragraphs option, normally `.IP', `.LP', `.PP', `.QP' and `.bp'. A paragraph also begins after a completely empty line, and at each section boundary (see [[ above) (4.2, 6.8, 7.6).
| Places the cursor on the character in the column specified by the count (7.1, 7.2).
} Advances to the beginning of the next paragraph. See { for the definition of paragraph (4.2, 6.8, 7.6).
~ Unused.
^? ( DEL ) Interrupts the editor, returning it to command accepting state (1.5, 7.5)

An Introduction to Display Editing with Vi USD:11-21

.


nvi-1.81.6/docs/html/vi-summary.html0100444000076400001440000000712710720065732016353 0ustar skimousers

Ex Quick Reference

Entering/leaving ex

Ex states

Ex commands

Ex command addresses

Specifying terminal type

Some terminal types

Initializing options

Useful options

Scanning pattern formation

Vi Quick Reference

Entering/leaving vi

The display

Vi states

Counts before vi commands

Simple commands

Interrupting, cancelling

File manipulation

Positioning within file

Adjusting the screen

Marking and returning

Line positioning

Character positioning

Words, sentences, paragraphs

Commands for LISP

Corrections during insert

Insert and replace

Operators (double to affect lines)

Miscellaneous operations

Yank and put

Undo, redo, retrieve


nvi-1.81.6/docs/html/viapwh.html0100444000076400001440000020602610720065733015540 0ustar skimousers Vi Command & Function Reference

Vi Command & Function Reference

1. Author's Disclaimer
2. Notation
3. Basics
3.1. Bourne Shell
3.2. The C Shell
4. Normal Commands
4.1. Entry and Exit
4.2. Cursor and Page Motion
4.3. Searches
4.4. Text Insertion
4.5. Text Deletion
4.6. Text Replacement
4.7. Moving Text
4.8. Miscellaneous Commands
4.9. Special Insert Characters
5. : Commands
6. Special Arrangements for Startup
7. Set Commands

1. Author's Disclaimer

This document does not claim to be 100% complete. There are a few commands listed in the original document that I was unable to test either because I do not speak lisp, because they required programs we don't have, or because I wasn't able to make them work. In these cases I left the command out. The commands listed in this document have been tried and are known to work. It is expected that prospective users of this document will read it once to get the flavor of everything that vi can do and then use it as a reference document. Experimentation is recommended. If you don't understand a command, try it and see what happens.

[Note: In revising this document, I have attempted to make it completely reflect version 2.12 of vi. It does not attempt to document the VAX version (version 3), but with one or two exceptions (wrapmargin, arrow keys) everything said about 2.12 should apply to 3.1. Mark Horton]

2. Notation

[option] is used to denote optional parts of a command. Many vi commands have an optional count. [cnt] means that an optional number may precede the command to multiply or iterate the command. {variable item} is used to denote parts of the command which must appear, but can take a number of different values. <character [-character]> means that the character or one of the characters in the range described between the two angle brackets is to be typed. For example <esc> means the escape key is to be typed. <a-z> means that a lower case letter is to be typed. ^<character> means that the character is to be typed as a control character, that is, with the <cntl> key held down while simultaneously typing the specified character. In this document control characters will be denoted using the upper case character, but ^<uppercase chr> and ^<lowercase chr> are equivalent. That is, for example, <^D> is equal to <^d>. The most common character abbreviations used in this list are as follows:

<esc> escape, octal 033
<cr> carriage return, ^M, octal 015
<lf> linefeed ^J, octal 012
<nl> newline, ^J, octal 012 (same as linefeed)
<bs> backspace, ^H, octal 010
<tab> tab, ^I, octal 011
<bell> bell, ^G, octal 07
<ff> formfeed, ^L, octal 014
<sp> space, octal 040
<del> delete, octal 0177

3. Basics

To run vi the shell variable TERM must be defined and exported to your environment. How you do this depends on which shell you are using. You can tell which shell you have by the character it prompts you for commands with. The Bourne shell prompts with `$', and the C shell prompts with `%'. For these examples, we will suppose that you are using an HP 2621 terminal, whose termcap name is ``2621''.

3.1. Bourne Shell

To manually set your terminal type to 2621 you would type:

     TERM=2621
     export TERM

There are various ways of having this automatically or semi-automatically done when you log in. Suppose you usually dial in on a 2621. You want to tell this to the machine, but still have it work when you use a hardwired terminal. The recommended way, if you have the tset program, is to use the sequence

     tset -s -d 2621 > tset$$
     . tset$$
     rm tset$$

in your .login (for csh) or the same thing using `.' instead of `source' in your .profile (for sh). The above line says that if you are dialing in you are on a 2621, but if you are on a hardwired terminal it figures out your terminal type from an on-line list.

3.2. The C Shell

To manually set your terminal type to 2621 you would type:

     setenv TERM 2621

There are various ways of having this automatically or semi-automatically done when you log in. Suppose you usually dial in on a 2621. You want to tell this to the machine, but still have it work when you use a hardwired terminal. The recommended way, if you have the tset program, is to use the sequence

     tset -s -d 2621 > tset$$
     source tset$$
     rm tset$$

in your .login.*

The above line says that if you are dialing in you are on a 2621, but if you are on a hardwired terminal it figures out your terminal type from an on-line list.

4. Normal Commands

Vi is a visual editor with a window on the file. What you see on the screen is vi's current notion of what your file will contain, (at this point in the file), when it is written out. Most commands do not cause any change in the screen until the complete command is typed. Should you get confused while typing a command, you can abort the command by typing an <del> character. You will know you are back to command level when you hear a <bell>. Usually typing an <esc> will produce the same result. When vi gets an improperly formatted command it rings the <bell>. Following are the vi commands broken down by function.

4.1. Entry and Exit

To enter vi on a particular file, type

     vi file

The file will be read in and the cursor will be placed at the beginning of the first line. The first screenfull of the file will be displayed on the terminal.

To get out of the editor, type

     ZZ

If you are in some special mode, such as input mode or the middle of a multi-keystroke command, it may be necessary to type <esc> first.

4.2. Cursor and Page Motion

NOTE: The arrow keys (see the next four commands) on certain kinds of terminals will not work with the PDP-11 version of vi. The control versions or the hjkl versions will work on any terminal. Experienced users prefer the hjkl keys because they are always right under their fingers. Beginners often prefer the arrow keys, since they do not require memorization of which hjkl key is which. The mnemonic value of hjkl is clear from looking at the keyboard of an adm3a.

[cnt]<bs> or [cnt]h or [cnt]
Move the cursor to the left one character. Cursor stops at the left margin of the page. If cnt is given, these commands move that many spaces.

[cnt]^N or [cnt]j or [cnt] or [cnt]<lf>
Move down one line. Moving off the screen scrolls the window to force a new line onto the screen. Mnemonic: Next

[cnt]^P or [cnt]k or [cnt]
Move up one line. Moving off the top of the screen forces new text onto the screen. Mnemonic: Previous

[cnt]<sp> or [cnt]l or [cnt]
Move to the right one character. Cursor will not go beyond the end of the line.

[cnt]- Move the cursor up the screen to the beginning of the next line. Scroll if necessary.

[cnt]+ or [cnt]<cr>

Move the cursor down the screen to the beginning of the next line. Scroll up if necessary.
[cnt]$ Move the cursor to the end of the line. If there is a count, move to the end of the line "cnt" lines forward in the file.
^ Move the cursor to the beginning of the first word on the line.
0 Move the cursor to the left margin of the current line.
[cnt]| Move the cursor to the column specified by the count. The default is column zero.
[cnt]w Move the cursor to the beginning of the next word. If there is a count, then move forward that many words and position the cursor at the beginning of the word. Mnemonic: next-word
[cnt]W Move the cursor to the beginning of the next word which follows a "white space" (<sp>,<tab>, or <nl>). Ignore other punctuation.
[cnt]b Move the cursor to the preceding word. Mnemonic: backup-word
[cnt]B Move the cursor to the preceding word that is separated from the current word by a "white space" (<sp>,<tab>, or <nl>).
[cnt]e Move the cursor to the end of the current word or the end of the "cnt"'th word hence. Mnemonic: end-of-word
[cnt]E Move the cursor to the end of the current word which is delimited by "white space" (<sp>,<tab>, or <nl>).
[line number]G Move the cursor to the line specified. Of particular use are the sequences "1G" and "G", which move the cursor to the beginning and the end of the file respectively. Mnemonic: Go-to

NOTE: The next four commands (^D, ^U, ^F, ^B) are not true motion commands, in that they cannot be used as the object of commands such as delete or change.

[cnt]^D Move the cursor down in the file by "cnt" lines (or the last "cnt" if a new count isn't given. The initial default is half a page.) The screen is simultaneously scrolled up. Mnemonic: Down
[cnt]^U Move the cursor up in the file by "cnt" lines. The screen is simultaneously scrolled down. Mnemonic: Up
[cnt]^F Move the cursor to the next page. A count moves that many pages. Two lines of the previous page are kept on the screen for continuity if possible. Mnemonic: Forward-a-page
[cnt]^B Move the cursor to the previous page. Two lines of the current page are kept if possible. Mnemonic: Backup-a-page
[cnt]( Move the cursor to the beginning of the next sentence. A sentence is defined as ending with a ".", "!", or "?" followed by two spaces or a <nl>.
[cnt]) Move the cursor backwards to the beginning of a sentence.
[cnt]} Move the cursor to the beginning of the next paragraph. This command works best inside nroff documents. It understands two sets of nroff macros, -ms and -mm, for which the commands ".IP", ".LP", ".PP", ".QP", "P", as well as the nroff command ".bp" are considered to be paragraph delimiters. A blank line also delimits a paragraph. The nroff macros that it accepts as paragraph delimiters is adjustable. See paragraphs under the Set Commands section.
[cnt]{ Move the cursor backwards to the beginning of a paragraph.
]] Move the cursor to the next "section", where a section is defined by two sets of nroff macros, -ms and -mm, in which ".NH", ".SH", and ".H" delimit a section. A line beginning with a <ff><nl> sequence, or a line beginning with a "{" are also considered to be section delimiters. The last option makes it useful for finding the beginnings of C functions. The nroff macros that are used for section delimiters can be adjusted. See sections under the Set Commands section.
[[ Move the cursor backwards to the beginning of a section.
% Move the cursor to the matching parenthesis or brace. This is very useful in C or lisp code. If the cursor is sitting on a ( ) { or } the cursor is moved to the matching character at the other end of the section. If the cursor is not sitting on a brace or a parenthesis, vi searches forward until it finds one and then jumps to the match mate.
[cnt]H If there is no count move the cursor to the top left position on the screen. If there is a count, then move the cursor to the beginning of the line "cnt" lines from the top of the screen. Mnemonic: Home
[cnt]L If there is no count move the cursor to the beginning of the last line on the screen. If there is a count, then move the cursor to the beginning of the line "cnt" lines from the bottom of the screen. Mnemonic: Last
M Move the cursor to the beginning of the middle line on the screen. Mnemonic: Middle
m<a-z> This command does not move the cursor, but it marks the place in the file and the character "<a-z>" becomes the label for referring to this location in the file. See the next two commands. Mnemonic: mark NOTE: The mark command is not a motion, and cannot be used as the target of commands such as delete.
<a-z> Move the cursor to the beginning of the line that is marked with the label "<a-z>".
<a-z> Move the cursor to the exact position on the line that was marked with with the label "<a-z>".
Move the cursor back to the beginning of the line where it was before the last "non-relative" move. A "non-relative" move is something such as a search or a jump to a specific line in the file, rather than moving the cursor or scrolling the screen.
Move the cursor back to the exact spot on the line where it was located before the last "non-relative" move.

4.3. Searches

The following commands allow you to search for items in a file.

[cnt]f{chr} Search forward on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed at the character of interest. Mnemonic: find character
[cnt]F{chr} Search backwards on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed at the character of interest.
[cnt]t{chr} Search forward on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed just preceding the character of interest. Mnemonic: move cursor up to character
[cnt]T{chr} Search backwards on the line for the next or "cnt"'th occurrence of the character "chr". The cursor is placed just preceding the character of interest.
[cnt]; Repeat the last "f", "F", "t" or "T" command.
[cnt], Repeat the last "f", "F", "t" or "T" command, but in the opposite search direction. This is useful if you overshoot.

[cnt]/[string]/<nl>
Search forward for the next occurrence of "string". Wrap around at the end of the file does occur. The final </> is not required.

[cnt]?[string]?<nl>
Search backwards for the next occurrence of "string". If a count is specified, the count becomes the new window size. Wrap around at the beginning of the file does occur. The final <?> is not required.

n Repeat the last /[string]/ or ?[string]? search. Mnemonic: next occurrence.
N Repeat the last /[string]/ or ?[string]? search, but in the reverse direction.

:g/[string]/[editor command]<nl>

Using the : syntax it is possible to do global searches ala the standard UNIX "ed" editor.

4.4. Text Insertion

The following commands allow for the insertion of text. All multicharacter text insertions are terminated with an <esc> character. The last change can always be undone by typing a u. The text insert in insertion mode can contain newlines.

a{text}<esc> Insert text immediately following the cursor position. Mnemonic: append
A{text}<esc> Insert text at the end of the current line. Mnemonic: Append
i{text}<esc> Insert text immediately preceding the cursor position. Mnemonic: insert
I{text}<esc> Insert text at the beginning of the current line.
o{text}<esc> Insert a new line after the line on which the cursor appears and insert text there. Mnemonic: open new line
O{text}<esc> Insert a new line preceding the line on which the cursor appears and insert text there.

4.5. Text Deletion

The following commands allow the user to delete text in various ways. All changes can always be undone by typing the u command.

[cnt]x Delete the character or characters starting at the cursor position.
[cnt]X Delete the character or characters starting at the character preceding the cursor position.
D Deletes the remainder of the line starting at the cursor. Mnemonic: Delete the rest of line
[cnt]d{motion} Deletes one or more occurrences of the specified motion. Any motion from sections 4.1 and 4.2 can be used here. The d can be stuttered (e.g. [cnt]dd) to delete cnt lines.

4.6. Text Replacement

The following commands allow the user to simultaneously delete and insert new text. All such actions can be undone by typing u following the command.

r<chr> Replaces the character at the current cursor position with <chr>. This is a one character replacement. No <esc> is required for termination. Mnemonic: replace character
R{text}<esc> Starts overlaying the characters on the screen with whatever you type. It does not stop until an <esc> is typed.

[cnt]s{text}<esc>
Substitute for "cnt" characters beginning at the current cursor position. A "$" will appear at the position in the text where the "cnt"'th character appears so you will know how much you are erasing. Mnemonic: substitute

[cnt]S{text}<esc>
Substitute for the entire current line (or lines). If no count is given, a "$" appears at the end of the current line. If a count of more than 1 is given, all the lines to be replaced are deleted before the insertion begins.

[cnt]c{motion}{text}<esc>
Change the specified "motion" by replacing it with the insertion text. A "$" will appear at the end of the last item that is being deleted unless the deletion involves whole lines. Motion's can be any motion from sections 4.1 or 4.2. Stuttering the c (e.g. [cnt]cc) changes cnt lines.

4.7. Moving Text

Vi provides a number of ways of moving chunks of text around. There are nine buffers into which each piece of text which is deleted or "yanked" is put in addition to the "undo" buffer. The most recent deletion or yank is in the "undo" buffer and also usually in buffer 1, the next most recent in buffer 2, and so forth. Each new deletion pushes down all the older deletions. Deletions older than 9 disappear. There is also a set of named registers, a-z, into which text can optionally be placed. If any delete or replacement type command is preceded by "<a-z>, that named buffer will contain the text deleted after the command is executed. For example, "a3dd will delete three lines starting at the current line and put them in buffer "a.*

There are two more basic commands and some variations useful in getting and putting text into a file.

["<a-z>][cnt]y{motion}

Yank the specified item or "cnt" items and put in the "undo" buffer or the specified buffer. The variety of "items" that can be yanked is the same as those that can be deleted with the "d" command or changed with the "c" command. In the same way that "dd" means delete the current line and "cc" means replace the current line, "yy" means yank the current line.
["<a-z>][cnt]Y Yank the current line or the "cnt" lines starting from the current line. If no buffer is specified, they will go into the "undo" buffer, like any delete would. It is equivalent to "yy". Mnemonic: Yank
["<a-z>]p Put "undo" buffer or the specified buffer down after the cursor. If whole lines were yanked or deleted into the buffer, then they will be put down on the line following the line the cursor is on. If something else was deleted, like a word or sentence, then it will be inserted immediately following the cursor. Mnemonic: put buffer
It should be noted that text in the named buffers remains there when you start editing a new file with the :e file<esc> command. Since this is so, it is possible to copy or delete text from one file and carry it over to another file in the buffers. However, the undo buffer and the ability to undo are lost when changing files.
["<a-z>]P Put "undo" buffer or the specified buffer down before the cursor. If whole lines where yanked or deleted into the buffer, then they will be put down on the line preceding the line the cursor is on. If something else was deleted, like a word or sentence, then it will be inserted immediately preceding the cursor.
[cnt]>{motion} The shift operator will right shift all the text from the line on which the cursor is located to the line where the motion is located. The text is shifted by one shiftwidth. (See section 6.) >> means right shift the current line or lines.
[cnt]<{motion} The shift operator will left shift all the text from the line on which the cursor is located to the line where the item is located. The text is shifted by one shiftwidth. (See section 6.) << means left shift the current line or lines. Once the line has reached the left margin it is not further affected.
[cnt]={motion} Prettyprints the indicated area according to lisp conventions. The area should be a lisp s-expression.

4.8. Miscellaneous Commands

Vi has a number of miscellaneous commands that are very useful. They are:

ZZ This is the normal way to exit from vi. If any changes have been made, the file is written out. Then you are returned to the shell.
^L Redraw the current screen. This is useful if someone "write"s you while you are in "vi" or if for any reason garbage gets onto the screen.
^R On dumb terminals, those not having the "delete line" function (the vt100 is such a terminal), vi saves redrawing the screen when you delete a line by just marking the line with an "@" at the beginning and blanking the line. If you want to actually get rid of the lines marked with "@" and see what the page looks like, typing a ^R will do this.
. "Dot" is a particularly useful command. It repeats the last text modifying command. Therefore you can type a command once and then to another place and repeat it by just typing ".".
u Perhaps the most important command in the editor, u undoes the last command that changed the buffer. Mnemonic: undo
U Undo all the text modifying commands performed on the current line since the last time you moved onto it.
[cnt]J Join the current line and the following line. The <nl> is deleted and the two lines joined, usually with a space between the end of the first line and the beginning of what was the second line. If the first line ended with a "period", then two spaces are inserted. A count joins the next cnt lines. Mnemonic: Join lines
Q Switch to ex editing mode. In this mode vi will behave very much like ed. The editor in this mode will operate on single lines normally and will not attempt to keep the "window" up to date. Once in this mode it is also possible to switch to the open mode of editing. By entering the command [line number]open<nl> you enter this mode. It is similar to the normal visual mode except the window is only one line long. Mnemonic: Quit visual mode
^] An abbreviation for a tag command. The cursor should be positioned at the beginning of a word. That word is taken as a tag name, and the tag with that name is found as if it had been typed in a :tag command.

[cnt]!{motion}{UNIX cmd}<nl>
Any UNIX filter (e.g. command that reads the standard input and outputs something to the standard output) can be sent a section of the current file and have the output of the command replace the original text. Useful examples are programs like cb, sort, and nroff. For instance, using sort it would be possible to sort a section of the current file into a new list. Using !! means take a line or lines starting at the line the cursor is currently on and pass them to the UNIX command. NOTE: To just escape to the shell for one command, use :!{cmd}<nl>, see section 5.

z{cnt}<nl> This resets the current window size to "cnt" lines and redraws the screen.

4.9. Special Insert Characters

There are some characters that have special meanings during insert modes. They are:

^V During inserts, typing a ^V allows you to quote control characters into the file. Any character typed after the ^V will be inserted into the file.
[^]^D or [0]^D <^D> without any argument backs up one shiftwidth. This is necessary to remove indentation that was inserted by the autoindent feature. ^<^D> temporarily removes all the autoindentation, thus placing the cursor at the left margin. On the next line, the previous indent level will be restored. This is useful for putting "labels" at the left margin. 0<^D> says remove all autoindents and stay that way. Thus the cursor moves to the left margin and stays there on successive lines until <tab>'s are typed. As with the <tab>, the <^D> is only effective before any other "non-autoindent" controlling characters are typed. Mnemonic: Delete a shiftwidth
^W If the cursor is sitting on a word, <^W> moves the cursor back to the beginning of the word, thus erasing the word from the insert. Mnemonic: erase Word
<bs> The backspace always serves as an erase during insert modes in addition to your normal "erase" character. To insert a <bs> into your file, use the <^V> to quote it.

5. : Commands

Typing a ":" during command mode causes vi to put the cursor at the bottom on the screen in preparation for a command. In the ":" mode, vi can be given most ed commands. It is also from this mode that you exit from vi or switch to different files. All commands of this variety are terminated by a <nl>, <cr>, or <esc>.

:w[!] [file] Causes vi to write out the current text to the disk. It is written to the file you are editing unless "file" is supplied. If "file" is supplied, the write is directed to that file instead. If that file already exists, vi will not perform the write unless the "!" is supplied indicating you really want to destroy the older copy of the file.
:q[!] Causes vi to exit. If you have modified the file you are looking at currently and haven't written it out, vi will refuse to exit unless the "!" is supplied.

:e[!] [+[cmd]] [file]

Start editing a new file called "file" or start editing the current file over again. The command ":e!" says "ignore the changes I've made to this file and start over from the beginning". It is useful if you really mess up the file. The optional "+" says instead of starting at the beginning, start at the "end", or, if "cmd" is supplied, execute "cmd" first. Useful cases of this are where cmd is "n" (any integer) which starts at line number n, and "/text", which searches for "text" and starts at the line where it is found.
^^ Switch back to the place you were before your last tag command. If your last tag command stayed within the file, ^^ returns to that tag. If you have no recent tag command, it will return to the same place in the previous file that it was showing when you switched to the current file.
:n[!] Start editing the next file in the argument list. Since vi can be called with multiple file names, the ":n" command tells it to stop work on the current file and switch to the next file. If the current file was modifies, it has to be written out before the ":n" will work or else the "!" must be supplied, which says discard the changes I made to the current file.

:n[!] file [file file ...]

Replace the current argument list with a new list of files and start editing the first file in this new list.
:r file Read in a copy of "file" on the line after the cursor.
:r !cmd Execute the "cmd" and take its output and put it into the file after the current line.
:!cmd Execute any UNIX shell command.
:ta[!] tag Vi looks in the file named tags in the current directory. Tags is a file of lines in the format:
tag filename vi-search-command
If vi finds the tag you specified in the :ta command, it stops editing the current file if necessary and if the current file is up to date on the disk and switches to the file specified and uses the search pattern specified to find the "tagged" item of interest. This is particularly useful when editing multi-file C programs such as the operating system. There is a program called ctags which will generate an appropriate tags file for C and f77 programs so that by saying :ta function<nl> you will be switched to that function. It could also be useful when editing multi-file documents, though the tags file would have to be generated manually.

6. Special Arrangements for Startup

Vi takes the value of $TERM and looks up the characteristics of that terminal in the file /etc/termcap. If you don't know vi's name for the terminal you are working on, look in /etc/termcap.

When vi starts, it attempts to read the variable EXINIT from your environment.* If that exists, it takes the values in it as the default values for certain of its internal constants. See the section on "Set Values" for further details. If EXINIT doesn't exist you will get all the normal defaults.

Should you inadvertently hang up the phone while inside vi, or should the computer crash, all may not be lost. Upon returning to the system, type:

     vi -r file

This will normally recover the file. If there is more than one temporary file for a specific file name, vi recovers the newest one. You can get an older version by recovering the file more than once. The command "vi -r" without a file name gives you the list of files that were saved in the last system crash (but not the file just saved when the phone was hung up).

7. Set Commands

Vi has a number of internal variables and switches which can be set to achieve special affects. These options come in three forms, those that are switches, which toggle from off to on and back, those that require a numeric value, and those that require an alphanumeric string value. The toggle options are set by a command of the form:

     :set option<nl>

and turned off with the command:

     :set nooption<nl>

Commands requiring a value are set with a command of the form:

     :set option=value<nl>

To display the value of a specific option type:

     :set option?<nl>

To display only those that you have changed type:

     :set<nl>

and to display the long table of all the settable parameters and their current values type:

     :set all<nl>

Most of the options have a long form and an abbreviation. Both are listed in the following table as well as the normal default value.

To arrange to have values other than the default used every time you enter vi, place the appropriate set command in EXINIT in your environment, e.g.

     EXINIT='set ai aw terse sh=/bin/csh'
     export EXINIT

or

     setenv EXINIT 'set ai aw terse sh=/bin/csh'

for sh and csh, respectively. These are usually placed in your .profile or .login. If you are running a system without environments (such as version 6) you can place the set command in the file .exrc in your home directory.

autoindent ai Default: noai Type: toggle
When in autoindent mode, vi helps you indent code by starting each line in the same column as the preceding line. Tabbing to the right with <tab> or <^T> will move this boundary to the right, and it can be moved to the left with <^D>.
autoprint ap Default: ap Type: toggle
Causes the current line to be printed after each ex text modifying command. This is not of much interest in the normal vi visual mode.
autowrite aw Default: noaw type: toggle
Autowrite causes an automatic write to be done if there are unsaved changes before certain commands which change files or otherwise interact with the outside world. These commands are :!, :tag, :next, :rewind, ^^, and ^].
beautify bf Default: nobf Type: toggle
Causes all control characters except <tab>, <nl>, and <ff> to be discarded.
directory dir Default: dir=/tmp Type: string
This is the directory in which vi puts its temporary file.
errorbells eb Default: noeb Type: toggle
Error messages are preceded by a <bell>.
hardtabs ht Default: hardtabs=8 Type: numeric
This option contains the value of hardware tabs in your terminal, or of software tabs expanded by the Unix system.
ignorecase ic Default: noic Type: toggle
All upper case characters are mapped to lower case in regular expression matching.
lisp Default: nolisp Type: toggle
Autoindent for lisp code. The commands ( ) [[ and ]] are modified appropriately to affect s-expressions and functions.
list Default: nolist Type: toggle
All printed lines have the <tab> and <nl> characters displayed visually.
magic Default: magic Type: toggle
Enable the metacharacters for matching. These include . * < > [string] [^string] and [<chr>-<chr>].
number nu Default: nonu Type: toggle
Each line is displayed with its line number.
open Default: open Type: toggle
When set, prevents entering open or visual modes from ex or edit. Not of interest from vi.
optimize opt Default: opt Type: toggle
Basically of use only when using the ex capabilities. This option prevents automatic <cr>s from taking place, and speeds up output of indented lines, at the expense of losing typeahead on some versions of UNIX.
paragraphs para Default: para=IPLPPPQPP bp Type: string
Each pair of characters in the string indicate nroff macros which are to be treated as the beginning of a paragraph for the { and } commands. The default string is for the -ms and -mm macros. To indicate one letter nroff macros, such as .P or .H, quote a space in for the second character position. For example:
:set paragraphs=P\ bp<nl>
would cause vi to consider .P and .bp as paragraph delimiters.
prompt Default: prompt Type: toggle
In ex command mode the prompt character : will be printed when ex is waiting for a command. This is not of interest from vi.
redraw Default: noredraw Type: toggle
On dumb terminals, force the screen to always be up to date, by sending great amounts of output. Useful only at high speeds.
report Default: report=5 Type: numeric
This sets the threshold for the number of lines modified. When more than this number of lines are modified, removed, or yanked, vi will report the number of lines changed at the bottom of the screen.
scroll Default: scroll={1/2 window} Type: numeric
This is the number of lines that the screen scrolls up or down when using the <^U> and <^D> commands.
sections Default: sections=SHNHH HU Type: string
Each two character pair of this string specify nroff macro names which are to be treated as the beginning of a section by the ]] and [[ commands. The default string is for the -ms and -mm macros. To enter one letter nroff macros, use a quoted space as the second character. See paragraphs for a fuller explanation.
shell sh Default: sh=from environment SHELL or /bin/sh Type: string
This is the name of the sh to be used for "escaped" commands.
shiftwidth sw Default: sw=8 Type: numeric
This is the number of spaces that a <^T> or <^D> will move over for indenting, and the amount < and > shift by.
showmatch sm Default: nosm Type: toggle
When a ) or } is typed, show the matching ( or { by moving the cursor to it for one second if it is on the current screen.
slowopen slow Default: terminal dependent Type: toggle
On terminals that are slow and unintelligent, this option prevents the updating of the screen some of the time to improve speed.
tabstop ts Default: ts=8 Type: numeric
<tab>s are expanded to boundaries that are multiples of this value.
taglength tl Default: tl=0 Type: numeric
If nonzero, tag names are only significant to this many characters.
term Default: (from environment TERM, else dumb) Type: string
This is the terminal and controls the visual displays. It cannot be changed when in "visual" mode, you have to Q to command mode, type a set term command, and do ``vi.'' to get back into visual. Or exit vi, fix $TERM, and reenter. The definitions that drive a particular terminal type are found in the file /etc/termcap.
terse Default: terse Type: toggle
When set, the error diagnostics are short.
warn Default: warn Type: toggle
The user is warned if she/he tries to escape to the shell without writing out the current changes.
window Default: window={8 at 600 baud or less, 16 at 1200 baud, and screen size - 1 at 2400 baud or more} Type: numeric
This is the number of lines in the window whenever vi must redraw an entire screen. It is useful to make this size smaller if you are on a slow line.

w300, w1200, w9600
These set window, but only within the corresponding speed ranges. They are useful in an EXINIT to fine tune window sizes. For example,

     set w300=4 w1200=12
causes a 4 lines window at speed up to 600 baud, a 12 line window at 1200 baud, and a full screen (the default) at over 1200 baud.
wrapscan ws Default: ws Type: toggle
Searches will wrap around the end of the file when is option is set. When it is off, the search will terminate when it reaches the end or the beginning of the file.
wrapmargin wm Default: wm=0 Type: numeric
Vi
will automatically insert a <nl> when it finds a natural break point (usually a <sp> between words) that occurs within "wm" spaces of the right margin. Therefore with "wm=0" the option is off. Setting it to 10 would mean that any time you are within 10 spaces of the right margin vi would be looking for a <sp> or <tab> which it could replace with a <nl>. This is convenient for people who forget to look at the screen while they type. (In version 3, wrapmargin behaves more like nroff, in that the boundary specified by the distance from the right edge of the screen is taken as the rightmost edge of the area where a break is allowed, instead of the leftmost edge.)
writeany wa Default: nowa Type: toggle
Vi
normally makes a number of checks before it writes out a file. This prevents the user from inadvertently destroying a file. When the "writeany" option is enabled, vi no longer makes these checks.

nvi-1.81.6/ex/0040755000076400001440000000000010720065713012071 5ustar skimousersnvi-1.81.6/ex/ex.awk0100644000076400001440000000025510720065506013210 0ustar skimousers# $Id: ex.awk,v 10.1 1995/06/08 18:55:37 bostic Exp $ (Berkeley) $Date: 1995/06/08 18:55:37 $ /^\/\* C_[0-9A-Z_]* \*\/$/ { printf("#define %s %d\n", $2, cnt++); next; } nvi-1.81.6/ex/ex.c0100644000076400001440000017376110720065506012665 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex.c,v 10.75 2004/03/16 14:13:35 skimo Exp $ (Berkeley) $Date: 2004/03/16 14:13:35 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #if defined(DEBUG) && defined(COMLOG) static void ex_comlog __P((SCR *, EXCMD *)); #endif static EXCMDLIST const * ex_comm_search __P((SCR *, CHAR_T *, size_t)); static int ex_discard __P((SCR *)); static int ex_line __P((SCR *, EXCMD *, MARK *, int *, int *)); static int ex_load __P((SCR *)); static void ex_unknown __P((SCR *, CHAR_T *, size_t)); /* * ex -- * Main ex loop. * * PUBLIC: int ex __P((SCR **)); */ int ex(SCR **spp) { EX_PRIVATE *exp; GS *gp; WIN *wp; MSGS *mp; SCR *sp; TEXT *tp; u_int32_t flags; sp = *spp; wp = sp->wp; gp = sp->gp; exp = EXP(sp); /* Start the ex screen. */ if (ex_init(sp)) return (1); /* Flush any saved messages. */ while ((mp = gp->msgq.lh_first) != NULL) { wp->scr_msg(sp, mp->mtype, mp->buf, mp->len); LIST_REMOVE(mp, q); free(mp->buf); free(mp); } /* If reading from a file, errors should have name and line info. */ if (F_ISSET(gp, G_SCRIPTED)) { wp->excmd.if_lno = 1; wp->excmd.if_name = "script"; } /* * !!! * Initialize the text flags. The beautify edit option historically * applied to ex command input read from a file. In addition, the * first time a ^H was discarded from the input, there was a message, * "^H discarded", that was displayed. We don't bother. */ LF_INIT(TXT_BACKSLASH | TXT_CNTRLD | TXT_CR); for (;; ++wp->excmd.if_lno) { /* Display status line and flush. */ if (F_ISSET(sp, SC_STATUS)) { if (!F_ISSET(sp, SC_EX_SILENT)) msgq_status(sp, sp->lno, 0); F_CLR(sp, SC_STATUS); } (void)ex_fflush(sp); /* Set the flags the user can reset. */ if (O_ISSET(sp, O_BEAUTIFY)) LF_SET(TXT_BEAUTIFY); if (O_ISSET(sp, O_PROMPT)) LF_SET(TXT_PROMPT); /* Clear any current interrupts, and get a command. */ CLR_INTERRUPT(sp); if (ex_txt(sp, &sp->tiq, ':', flags)) return (1); if (INTERRUPTED(sp)) { (void)ex_puts(sp, "\n"); (void)ex_fflush(sp); continue; } /* Initialize the command structure. */ CLEAR_EX_PARSER(&wp->excmd); /* * If the user entered a single carriage return, send * ex_cmd() a separator -- it discards single newlines. */ tp = sp->tiq.cqh_first; if (tp->len == 0) { static CHAR_T space = ' '; wp->excmd.cp = &space; /* __TK__ why not |? */ wp->excmd.clen = 1; } else { wp->excmd.cp = tp->lb; wp->excmd.clen = tp->len; } F_INIT(&wp->excmd, E_NRSEP); if (ex_cmd(sp) && F_ISSET(gp, G_SCRIPTED)) return (1); if (INTERRUPTED(sp)) { CLR_INTERRUPT(sp); msgq(sp, M_ERR, "170|Interrupted"); } /* * If the last command caused a restart, or switched screens * or into vi, return. */ if (F_ISSET(gp, G_SRESTART) || F_ISSET(sp, SC_SSWITCH | SC_VI)) { *spp = sp; break; } /* If the last command switched files, we don't care. */ F_CLR(sp, SC_FSWITCH); /* * If we're exiting this screen, move to the next one. By * definition, this means returning into vi, so return to the * main editor loop. The ordering is careful, don't discard * the contents of sp until the end. */ if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) { if (file_end(sp, NULL, F_ISSET(sp, SC_EXIT_FORCE))) return (1); *spp = screen_next(sp); return (screen_end(sp)); } } return (0); } /* * ex_cmd -- * The guts of the ex parser: parse and execute a string containing * ex commands. * * !!! * This code MODIFIES the string that gets passed in, to delete quoting * characters, etc. The string cannot be readonly/text space, nor should * you expect to use it again after ex_cmd() returns. * * !!! * For the fun of it, if you want to see if a vi clone got the ex argument * parsing right, try: * * echo 'foo|bar' > file1; echo 'foo/bar' > file2; * vi * :edit +1|s/|/PIPE/|w file1| e file2|1 | s/\//SLASH/|wq * * or: vi * :set|file|append|set|file * * For extra credit, try them in a startup .exrc file. * * PUBLIC: int ex_cmd __P((SCR *)); */ int ex_cmd(SCR *sp) { enum nresult nret; EX_PRIVATE *exp; EXCMD *ecp; GS *gp; WIN *wp; MARK cur; db_recno_t lno; size_t arg1_len, discard, len; u_int32_t flags; long ltmp; int at_found, gv_found; int cnt, delim, isaddr, namelen; int newscreen, notempty, tmp, vi_address; CHAR_T *arg1, *s, *p, *t; CHAR_T ch; CHAR_T *n; char *np; gp = sp->gp; wp = sp->wp; exp = EXP(sp); /* * We always start running the command on the top of the stack. * This means that *everything* must be resolved when we leave * this function for any reason. */ loop: ecp = wp->ecq.lh_first; /* If we're reading a command from a file, set up error information. */ if (ecp->if_name != NULL) { wp->if_lno = ecp->if_lno; wp->if_name = ecp->if_name; } /* * If a move to the end of the file is scheduled for this command, * do it now. */ if (F_ISSET(ecp, E_MOVETOEND)) { if (db_last(sp, &sp->lno)) goto rfail; sp->cno = 0; F_CLR(ecp, E_MOVETOEND); } /* If we found a newline, increment the count now. */ if (F_ISSET(ecp, E_NEWLINE)) { ++wp->if_lno; ++ecp->if_lno; F_CLR(ecp, E_NEWLINE); } /* (Re)initialize the EXCMD structure, preserving some flags. */ CLEAR_EX_CMD(ecp); /* Initialize the argument structures. */ if (argv_init(sp, ecp)) goto err; /* Initialize +cmd, saved command information. */ arg1 = NULL; ecp->save_cmdlen = 0; /* Skip s, empty lines. */ for (notempty = 0; ecp->clen > 0; ++ecp->cp, --ecp->clen) if ((ch = *ecp->cp) == '\n') { ++wp->if_lno; ++ecp->if_lno; } else if (ISBLANK(ch)) notempty = 1; else break; /* * !!! * Permit extra colons at the start of the line. Historically, * ex/vi allowed a single extra one. It's simpler not to count. * The stripping is done here because, historically, any command * could have preceding colons, e.g. ":g/pattern/:p" worked. */ if (ecp->clen != 0 && ch == ':') { notempty = 1; while (--ecp->clen > 0 && (ch = *++ecp->cp) == ':'); } /* * Command lines that start with a double-quote are comments. * * !!! * Historically, there was no escape or delimiter for a comment, e.g. * :"foo|set was a single comment and nothing was output. Since nvi * permits users to escape characters into command lines, we * have to check for that case. */ if (ecp->clen != 0 && ch == '"') { while (--ecp->clen > 0 && *++ecp->cp != '\n'); if (*ecp->cp == '\n') { F_SET(ecp, E_NEWLINE); ++ecp->cp; --ecp->clen; } goto loop; } /* Skip whitespace. */ for (; ecp->clen > 0; ++ecp->cp, --ecp->clen) { ch = *ecp->cp; if (!ISBLANK(ch)) break; } /* * The last point at which an empty line can mean do nothing. * * !!! * Historically, in ex mode, lines containing only characters * were the same as a single , i.e. a default command. * In vi mode, they were ignored. In .exrc files this was a serious * annoyance, as vi kept trying to treat them as print commands. We * ignore backward compatibility in this case, discarding lines that * contain only characters from .exrc files. * * !!! * This is where you end up when you're done a command, i.e. clen has * gone to zero. Continue if there are more commands to run. */ if (ecp->clen == 0 && (!notempty || F_ISSET(sp, SC_VI) || F_ISSET(ecp, E_BLIGNORE))) { if (ex_load(sp)) goto rfail; ecp = wp->ecq.lh_first; if (ecp->clen == 0) goto rsuccess; goto loop; } /* * Check to see if this is a command for which we may want to move * the cursor back up to the previous line. (The command :1 * wants a separator, but the command : wants to erase * the command line.) If the line is empty except for s, * or , we'll probably want to move up. I * don't think there's any way to get characters *after* the * command character, but this is the ex parser, and I've been wrong * before. */ if (F_ISSET(ecp, E_NRSEP) && ecp->clen != 0 && (ecp->clen != 1 || ecp->cp[0] != '\004')) F_CLR(ecp, E_NRSEP); /* Parse command addresses. */ if (ex_range(sp, ecp, &tmp)) goto rfail; if (tmp) goto err; /* * Skip s and any more colons (the command :3,5:print * worked, historically). */ for (; ecp->clen > 0; ++ecp->cp, --ecp->clen) { ch = *ecp->cp; if (!ISBLANK(ch) && ch != ':') break; } /* * If no command, ex does the last specified of p, l, or #, and vi * moves to the line. Otherwise, determine the length of the command * name by looking for the first non-alphabetic character. (There * are a few non-alphabetic characters in command names, but they're * all single character commands.) This isn't a great test, because * it means that, for the command ":e +cut.c file", we'll report that * the command "cut" wasn't known. However, it makes ":e+35 file" work * correctly. * * !!! * Historically, lines with multiple adjacent (or separated) * command separators were very strange. For example, the command * |||, when the cursor was on line 1, displayed * lines 2, 3 and 5 of the file. In addition, the command " | " * would only display the line after the next line, instead of the * next two lines. No ideas why. It worked reasonably when executed * from vi mode, and displayed lines 2, 3, and 4, so we do a default * command for each separator. */ #define SINGLE_CHAR_COMMANDS "\004!#&*<=>@~" newscreen = 0; if (ecp->clen != 0 && ecp->cp[0] != '|' && ecp->cp[0] != '\n') { if (strchr(SINGLE_CHAR_COMMANDS, *ecp->cp)) { p = ecp->cp; ++ecp->cp; --ecp->clen; namelen = 1; } else { for (p = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (!ISALPHA(*ecp->cp)) break; if ((namelen = ecp->cp - p) == 0) { msgq(sp, M_ERR, "080|Unknown command name"); goto err; } } /* * !!! * Historic vi permitted flags to immediately follow any * subset of the 'delete' command, but then did not permit * further arguments (flag, buffer, count). Make it work. * Permit further arguments for the few shreds of dignity * it offers. * * Adding commands that start with 'd', and match "delete" * up to a l, p, +, - or # character can break this code. * * !!! * Capital letters beginning the command names ex, edit, * next, previous, tag and visual (in vi mode) indicate the * command should happen in a new screen. */ switch (p[0]) { case 'd': for (s = p, n = cmds[C_DELETE].name; *s == *n; ++s, ++n); if (s[0] == 'l' || s[0] == 'p' || s[0] == '+' || s[0] == '-' || s[0] == '^' || s[0] == '#') { len = (ecp->cp - p) - (s - p); ecp->cp -= len; ecp->clen += len; ecp->rcmd = cmds[C_DELETE]; ecp->rcmd.syntax = "1bca1"; ecp->cmd = &ecp->rcmd; goto skip_srch; } break; case 'E': case 'F': case 'N': case 'P': case 'T': case 'V': newscreen = 1; p[0] = tolower(p[0]); break; } /* * Search the table for the command. * * !!! * Historic vi permitted the mark to immediately follow the * 'k' in the 'k' command. Make it work. * * !!! * Historic vi permitted any flag to follow the s command, e.g. * "s/e/E/|s|sgc3p" was legal. Make the command "sgc" work. * Since the following characters all have to be flags, i.e. * alphabetics, we can let the s command routine return errors * if it was some illegal command string. This code will break * if an "sg" or similar command is ever added. The substitute * code doesn't care if it's a "cgr" flag or a "#lp" flag that * follows the 's', but we limit the choices here to "cgr" so * that we get unknown command messages for wrong combinations. */ if ((ecp->cmd = ex_comm_search(sp, p, namelen)) == NULL) switch (p[0]) { case 'k': if (namelen == 2) { ecp->cp -= namelen - 1; ecp->clen += namelen - 1; ecp->cmd = &cmds[C_K]; break; } goto unknown; case 's': for (s = p + 1, cnt = namelen; --cnt; ++s) if (s[0] != 'c' && s[0] != 'g' && s[0] != 'r') break; if (cnt == 0) { ecp->cp -= namelen - 1; ecp->clen += namelen - 1; ecp->rcmd = cmds[C_SUBSTITUTE]; ecp->rcmd.fn = ex_subagain; ecp->cmd = &ecp->rcmd; break; } /* FALLTHROUGH */ default: unknown: if (newscreen) p[0] = toupper(p[0]); ex_unknown(sp, p, namelen); goto err; } /* * The visual command has a different syntax when called * from ex than when called from a vi colon command. FMH. * Make the change now, before we test for the newscreen * semantic, so that we're testing the right one. */ skip_srch: if (ecp->cmd == &cmds[C_VISUAL_EX] && F_ISSET(sp, SC_VI)) ecp->cmd = &cmds[C_VISUAL_VI]; /* * !!! * Historic vi permitted a capital 'P' at the beginning of * any command that started with 'p'. Probably wanted the * P[rint] command for backward compatibility, and the code * just made Preserve and Put work by accident. Nvi uses * Previous to mean previous-in-a-new-screen, so be careful. */ if (newscreen && !F_ISSET(ecp->cmd, E_NEWSCREEN) && (ecp->cmd == &cmds[C_PRINT] || ecp->cmd == &cmds[C_PRESERVE])) newscreen = 0; /* Test for a newscreen associated with this command. */ if (newscreen && !F_ISSET(ecp->cmd, E_NEWSCREEN)) goto unknown; /* Secure means no shell access. */ if (F_ISSET(ecp->cmd, E_SECURE) && O_ISSET(sp, O_SECURE)) { ex_wemsg(sp, ecp->cmd->name, EXM_SECURE); goto err; } /* * Multiple < and > characters; another "feature". Note, * The string passed to the underlying function may not be * nul terminated in this case. */ if ((ecp->cmd == &cmds[C_SHIFTL] && *p == '<') || (ecp->cmd == &cmds[C_SHIFTR] && *p == '>')) { for (ch = *p; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (*ecp->cp != ch) break; if (argv_exp0(sp, ecp, p, ecp->cp - p)) goto err; } /* Set the format style flags for the next command. */ if (ecp->cmd == &cmds[C_HASH]) exp->fdef = E_C_HASH; else if (ecp->cmd == &cmds[C_LIST]) exp->fdef = E_C_LIST; else if (ecp->cmd == &cmds[C_PRINT]) exp->fdef = E_C_PRINT; F_CLR(ecp, E_USELASTCMD); } else { /* Print is the default command. */ ecp->cmd = &cmds[C_PRINT]; /* Set the saved format flags. */ F_SET(ecp, exp->fdef); /* * !!! * If no address was specified, and it's not a global command, * we up the address by one. (I have no idea why globals are * exempted, but it's (ahem) historic practice.) */ if (ecp->addrcnt == 0 && !F_ISSET(sp, SC_EX_GLOBAL)) { ecp->addrcnt = 1; ecp->addr1.lno = sp->lno + 1; ecp->addr1.cno = sp->cno; } F_SET(ecp, E_USELASTCMD); } /* * !!! * Historically, the number option applied to both ex and vi. One * strangeness was that ex didn't switch display formats until a * command was entered, e.g. 's after the set didn't change to * the new format, but :1p would. */ if (O_ISSET(sp, O_NUMBER)) { F_SET(ecp, E_OPTNUM); FL_SET(ecp->iflags, E_C_HASH); } else F_CLR(ecp, E_OPTNUM); /* Check for ex mode legality. */ if (F_ISSET(sp, SC_EX) && (F_ISSET(ecp->cmd, E_VIONLY) || newscreen)) { msgq(sp, M_ERR, "082|%s: command not available in ex mode", ecp->cmd->name); goto err; } /* Add standard command flags. */ F_SET(ecp, ecp->cmd->flags); if (!newscreen) F_CLR(ecp, E_NEWSCREEN); /* * There are three normal termination cases for an ex command. They * are the end of the string (ecp->clen), or unescaped (by characters) or '|' characters. As we're now past * possible addresses, we can determine how long the command is, so we * don't have to look for all the possible terminations. Naturally, * there are some exciting special cases: * * 1: The bang, global, v and the filter versions of the read and * write commands are delimited by s (they can contain * shell pipes). * 2: The ex, edit, next and visual in vi mode commands all take ex * commands as their first arguments. * 3: The s command takes an RE as its first argument, and wants it * to be specially delimited. * * Historically, '|' characters in the first argument of the ex, edit, * next, vi visual, and s commands didn't delimit the command. And, * in the filter cases for read and write, and the bang, global and v * commands, they did not delimit the command at all. * * For example, the following commands were legal: * * :edit +25|s/abc/ABC/ file.c * :s/|/PIPE/ * :read !spell % | columnate * :global/pattern/p|l * * It's not quite as simple as it sounds, however. The command: * * :s/a/b/|s/c/d|set * * was also legal, i.e. the historic ex parser (using the word loosely, * since "parser" implies some regularity of syntax) delimited the RE's * based on its delimiter and not anything so irretrievably vulgar as a * command syntax. * * Anyhow, the following code makes this all work. First, for the * special cases we move past their special argument(s). Then, we * do normal command processing on whatever is left. Barf-O-Rama. */ discard = 0; /* Characters discarded from the command. */ arg1_len = 0; ecp->save_cmd = ecp->cp; if (ecp->cmd == &cmds[C_EDIT] || ecp->cmd == &cmds[C_EX] || ecp->cmd == &cmds[C_NEXT] || ecp->cmd == &cmds[C_VISUAL_VI] || ecp->cmd == &cmds[C_VSPLIT]) { /* * Move to the next non-whitespace character. A '!' * immediately following the command is eaten as a * force flag. */ if (ecp->clen > 0 && *ecp->cp == '!') { ++ecp->cp; --ecp->clen; FL_SET(ecp->iflags, E_C_FORCE); /* Reset, don't reparse. */ ecp->save_cmd = ecp->cp; } for (; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (!ISBLANK(*ecp->cp)) break; /* * QUOTING NOTE: * * The historic implementation ignored all escape characters * so there was no way to put a space or newline into the +cmd * field. We do a simplistic job of fixing it by moving to the * first whitespace character that isn't escaped. The escaping * characters are stripped as no longer useful. */ if (ecp->clen > 0 && *ecp->cp == '+') { ++ecp->cp; --ecp->clen; for (arg1 = p = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = *ecp->cp; if (IS_ESCAPE(sp, ecp, ch) && ecp->clen > 1) { ++discard; --ecp->clen; ch = *++ecp->cp; } else if (ISBLANK(ch)) break; *p++ = ch; } arg1_len = ecp->cp - arg1; /* Reset, so the first argument isn't reparsed. */ ecp->save_cmd = ecp->cp; } } else if (ecp->cmd == &cmds[C_BANG] || ecp->cmd == &cmds[C_GLOBAL] || ecp->cmd == &cmds[C_V]) { /* * QUOTING NOTE: * * We use backslashes to escape characters, although * this wasn't historic practice for the bang command. It was * for the global and v commands, and it's common usage when * doing text insert during the command. Escaping characters * are stripped as no longer useful. */ for (p = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = *ecp->cp; if (ch == '\\' && ecp->clen > 1 && ecp->cp[1] == '\n') { ++discard; --ecp->clen; ch = *++ecp->cp; ++wp->if_lno; ++ecp->if_lno; } else if (ch == '\n') break; *p++ = ch; } } else if (ecp->cmd == &cmds[C_READ] || ecp->cmd == &cmds[C_WRITE]) { /* * For write commands, if the next character is a , and * the next non-blank character is a '!', it's a filter command * and we want to eat everything up to the . For read * commands, if the next non-blank character is a '!', it's a * filter command and we want to eat everything up to the next * . Otherwise, we're done. */ for (tmp = 0; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = *ecp->cp; if (ISBLANK(ch)) tmp = 1; else break; } if (ecp->clen > 0 && ch == '!' && (ecp->cmd == &cmds[C_READ] || tmp)) for (; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (ecp->cp[0] == '\n') break; } else if (ecp->cmd == &cmds[C_SUBSTITUTE]) { /* * Move to the next non-whitespace character, we'll use it as * the delimiter. If the character isn't an alphanumeric or * a '|', it's the delimiter, so parse it. Otherwise, we're * into something like ":s g", so use the special s command. */ for (; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (!ISBLANK(ecp->cp[0])) break; if (ISALNUM(ecp->cp[0]) || ecp->cp[0] == '|') { ecp->rcmd = cmds[C_SUBSTITUTE]; ecp->rcmd.fn = ex_subagain; ecp->cmd = &ecp->rcmd; } else if (ecp->clen > 0) { /* * QUOTING NOTE: * * Backslashes quote delimiter characters for RE's. * The backslashes are NOT removed since they'll be * used by the RE code. Move to the third delimiter * that's not escaped (or the end of the command). */ delim = *ecp->cp; ++ecp->cp; --ecp->clen; for (cnt = 2; ecp->clen > 0 && cnt != 0; --ecp->clen, ++ecp->cp) if (ecp->cp[0] == '\\' && ecp->clen > 1) { ++ecp->cp; --ecp->clen; } else if (ecp->cp[0] == delim) --cnt; } } /* * Use normal quoting and termination rules to find the end of this * command. * * QUOTING NOTE: * * Historically, vi permitted ^V's to escape 's in the .exrc * file. It was almost certainly a bug, but that's what bug-for-bug * compatibility means, Grasshopper. Also, ^V's escape the command * delimiters. Literal next quote characters in front of the newlines, * '|' characters or literal next characters are stripped as they're * no longer useful. */ vi_address = ecp->clen != 0 && ecp->cp[0] != '\n'; for (p = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = ecp->cp[0]; if (IS_ESCAPE(sp, ecp, ch) && ecp->clen > 1) { CHAR_T tmp = ecp->cp[1]; if (tmp == '\n' || tmp == '|') { if (tmp == '\n') { ++wp->if_lno; ++ecp->if_lno; } ++discard; --ecp->clen; ++ecp->cp; ch = tmp; } } else if (ch == '\n' || ch == '|') { if (ch == '\n') F_SET(ecp, E_NEWLINE); --ecp->clen; break; } *p++ = ch; } /* * Save off the next command information, go back to the * original start of the command. */ p = ecp->cp + 1; ecp->cp = ecp->save_cmd; ecp->save_cmd = p; ecp->save_cmdlen = ecp->clen; ecp->clen = ((ecp->save_cmd - ecp->cp) - 1) - discard; /* * QUOTING NOTE: * * The "set tags" command historically used a backslash, not the * user's literal next character, to escape whitespace. Handle * it here instead of complicating the argv_exp3() code. Note, * this isn't a particularly complex trap, and if backslashes were * legal in set commands, this would have to be much more complicated. */ if (ecp->cmd == &cmds[C_SET]) for (p = ecp->cp, len = ecp->clen; len > 0; --len, ++p) if (*p == '\\') *p = CH_LITERAL; /* * Set the default addresses. It's an error to specify an address for * a command that doesn't take them. If two addresses are specified * for a command that only takes one, lose the first one. Two special * cases here, some commands take 0 or 2 addresses. For most of them * (the E_ADDR2_ALL flag), 0 defaults to the entire file. For one * (the `!' command, the E_ADDR2_NONE flag), 0 defaults to no lines. * * Also, if the file is empty, some commands want to use an address of * 0, i.e. the entire file is 0 to 0, and the default first address is * 0. Otherwise, an entire file is 1 to N and the default line is 1. * Note, we also add the E_ADDR_ZERO flag to the command flags, for the * case where the 0 address is only valid if it's a default address. * * Also, set a flag if we set the default addresses. Some commands * (ex: z) care if the user specified an address or if we just used * the current cursor. */ switch (F_ISSET(ecp, E_ADDR1 | E_ADDR2 | E_ADDR2_ALL | E_ADDR2_NONE)) { case E_ADDR1: /* One address: */ switch (ecp->addrcnt) { case 0: /* Default cursor/empty file. */ ecp->addrcnt = 1; F_SET(ecp, E_ADDR_DEF); if (F_ISSET(ecp, E_ADDR_ZERODEF)) { if (db_last(sp, &lno)) goto err; if (lno == 0) { ecp->addr1.lno = 0; F_SET(ecp, E_ADDR_ZERO); } else ecp->addr1.lno = sp->lno; } else ecp->addr1.lno = sp->lno; ecp->addr1.cno = sp->cno; break; case 1: break; case 2: /* Lose the first address. */ ecp->addrcnt = 1; ecp->addr1 = ecp->addr2; } break; case E_ADDR2_NONE: /* Zero/two addresses: */ if (ecp->addrcnt == 0) /* Default to nothing. */ break; goto two_addr; case E_ADDR2_ALL: /* Zero/two addresses: */ if (ecp->addrcnt == 0) { /* Default entire/empty file. */ F_SET(ecp, E_ADDR_DEF); ecp->addrcnt = 2; if (sp->ep == NULL) ecp->addr2.lno = 0; else if (db_last(sp, &ecp->addr2.lno)) goto err; if (F_ISSET(ecp, E_ADDR_ZERODEF) && ecp->addr2.lno == 0) { ecp->addr1.lno = 0; F_SET(ecp, E_ADDR_ZERO); } else ecp->addr1.lno = 1; ecp->addr1.cno = ecp->addr2.cno = 0; F_SET(ecp, E_ADDR2_ALL); break; } /* FALLTHROUGH */ case E_ADDR2: /* Two addresses: */ two_addr: switch (ecp->addrcnt) { case 0: /* Default cursor/empty file. */ ecp->addrcnt = 2; F_SET(ecp, E_ADDR_DEF); if (sp->lno == 1 && F_ISSET(ecp, E_ADDR_ZERODEF)) { if (db_last(sp, &lno)) goto err; if (lno == 0) { ecp->addr1.lno = ecp->addr2.lno = 0; F_SET(ecp, E_ADDR_ZERO); } else ecp->addr1.lno = ecp->addr2.lno = sp->lno; } else ecp->addr1.lno = ecp->addr2.lno = sp->lno; ecp->addr1.cno = ecp->addr2.cno = sp->cno; break; case 1: /* Default to first address. */ //ecp->addrcnt = 2; /* XXX Was this needed ??? */ ecp->addr2 = ecp->addr1; break; case 2: break; } break; default: if (ecp->addrcnt) /* Error. */ goto usage; } /* * !!! * The ^D scroll command historically scrolled the value of the scroll * option or to EOF. It was an error if the cursor was already at EOF. * (Leading addresses were permitted, but were then ignored.) */ if (ecp->cmd == &cmds[C_SCROLL]) { ecp->addrcnt = 2; ecp->addr1.lno = sp->lno + 1; ecp->addr2.lno = sp->lno + O_VAL(sp, O_SCROLL); ecp->addr1.cno = ecp->addr2.cno = sp->cno; if (db_last(sp, &lno)) goto err; if (lno != 0 && lno > sp->lno && ecp->addr2.lno > lno) ecp->addr2.lno = lno; } ecp->flagoff = 0; for (np = ecp->cmd->syntax; *np != '\0'; ++np) { /* * The force flag is sensitive to leading whitespace, i.e. * "next !" is different from "next!". Handle it before * skipping leading s. */ if (*np == '!') { if (ecp->clen > 0 && *ecp->cp == '!') { ++ecp->cp; --ecp->clen; FL_SET(ecp->iflags, E_C_FORCE); } continue; } /* Skip leading s. */ for (; ecp->clen > 0; --ecp->clen, ++ecp->cp) if (!ISBLANK(*ecp->cp)) break; if (ecp->clen == 0) break; switch (*np) { case '1': /* +, -, #, l, p */ /* * !!! * Historically, some flags were ignored depending * on where they occurred in the command line. For * example, in the command, ":3+++p--#", historic vi * acted on the '#' flag, but ignored the '-' flags. * It's unambiguous what the flags mean, so we just * handle them regardless of the stupidity of their * location. */ for (; ecp->clen; --ecp->clen, ++ecp->cp) switch (*ecp->cp) { case '+': ++ecp->flagoff; break; case '-': case '^': --ecp->flagoff; break; case '#': F_CLR(ecp, E_OPTNUM); FL_SET(ecp->iflags, E_C_HASH); exp->fdef |= E_C_HASH; break; case 'l': FL_SET(ecp->iflags, E_C_LIST); exp->fdef |= E_C_LIST; break; case 'p': FL_SET(ecp->iflags, E_C_PRINT); exp->fdef |= E_C_PRINT; break; default: goto end_case1; } end_case1: break; case '2': /* -, ., +, ^ */ case '3': /* -, ., +, ^, = */ for (; ecp->clen; --ecp->clen, ++ecp->cp) switch (*ecp->cp) { case '-': FL_SET(ecp->iflags, E_C_DASH); break; case '.': FL_SET(ecp->iflags, E_C_DOT); break; case '+': FL_SET(ecp->iflags, E_C_PLUS); break; case '^': FL_SET(ecp->iflags, E_C_CARAT); break; case '=': if (*np == '3') { FL_SET(ecp->iflags, E_C_EQUAL); break; } /* FALLTHROUGH */ default: goto end_case23; } end_case23: break; case 'b': /* buffer */ /* * !!! * Historically, "d #" was a delete with a flag, not a * delete into the '#' buffer. If the current command * permits a flag, don't use one as a buffer. However, * the 'l' and 'p' flags were legal buffer names in the * historic ex, and were used as buffers, not flags. */ if ((ecp->cp[0] == '+' || ecp->cp[0] == '-' || ecp->cp[0] == '^' || ecp->cp[0] == '#') && strchr(np, '1') != NULL) break; /* * !!! * Digits can't be buffer names in ex commands, or the * command "d2" would be a delete into buffer '2', and * not a two-line deletion. */ if (!ISDIGIT(ecp->cp[0])) { ecp->buffer = *ecp->cp; ++ecp->cp; --ecp->clen; FL_SET(ecp->iflags, E_C_BUFFER); } break; case 'c': /* count [01+a] */ ++np; /* Validate any signed value. */ if (!ISDIGIT(*ecp->cp) && (*np != '+' || (*ecp->cp != '+' && *ecp->cp != '-'))) break; /* If a signed value, set appropriate flags. */ if (*ecp->cp == '-') FL_SET(ecp->iflags, E_C_COUNT_NEG); else if (*ecp->cp == '+') FL_SET(ecp->iflags, E_C_COUNT_POS); if ((nret = nget_slong(sp, <mp, ecp->cp, &t, 10)) != NUM_OK) { ex_badaddr(sp, NULL, A_NOTSET, nret); goto err; } if (ltmp == 0 && *np != '0') { msgq(sp, M_ERR, "083|Count may not be zero"); goto err; } ecp->clen -= (t - ecp->cp); ecp->cp = t; /* * Counts as address offsets occur in commands taking * two addresses. Historic vi practice was to use * the count as an offset from the *second* address. * * Set a count flag; some underlying commands (see * join) do different things with counts than with * line addresses. */ if (*np == 'a') { ecp->addr1 = ecp->addr2; ecp->addr2.lno = ecp->addr1.lno + ltmp - 1; } else ecp->count = ltmp; FL_SET(ecp->iflags, E_C_COUNT); break; case 'f': /* file */ if (argv_exp2(sp, ecp, ecp->cp, ecp->clen)) goto err; goto arg_cnt_chk; case 'l': /* line */ /* * Get a line specification. * * If the line was a search expression, we may have * changed state during the call, and we're now * searching the file. Push ourselves onto the state * stack. */ if (ex_line(sp, ecp, &cur, &isaddr, &tmp)) goto rfail; if (tmp) goto err; /* Line specifications are always required. */ if (!isaddr) { msgq_wstr(sp, M_ERR, ecp->cp, "084|%s: bad line specification"); goto err; } /* * The target line should exist for these commands, * but 0 is legal for them as well. */ if (cur.lno != 0 && !db_exist(sp, cur.lno)) { ex_badaddr(sp, NULL, A_EOF, NUM_OK); goto err; } ecp->lineno = cur.lno; break; case 'S': /* string, file exp. */ if (ecp->clen != 0) { if (argv_exp1(sp, ecp, ecp->cp, ecp->clen, ecp->cmd == &cmds[C_BANG])) goto err; goto addr_verify; } /* FALLTHROUGH */ case 's': /* string */ if (argv_exp0(sp, ecp, ecp->cp, ecp->clen)) goto err; goto addr_verify; case 'W': /* word string */ /* * QUOTING NOTE: * * Literal next characters escape the following * character. Quoting characters are stripped here * since they are no longer useful. * * First there was the word. */ for (p = t = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = *ecp->cp; if (IS_ESCAPE(sp, ecp, ch) && ecp->clen > 1) { --ecp->clen; *p++ = *++ecp->cp; } else if (ISBLANK(ch)) { ++ecp->cp; --ecp->clen; break; } else *p++ = ch; } if (argv_exp0(sp, ecp, t, p - t)) goto err; /* Delete intervening whitespace. */ for (; ecp->clen > 0; --ecp->clen, ++ecp->cp) { ch = *ecp->cp; if (!ISBLANK(ch)) break; } if (ecp->clen == 0) goto usage; /* Followed by the string. */ for (p = t = ecp->cp; ecp->clen > 0; --ecp->clen, ++ecp->cp, ++p) { ch = *ecp->cp; if (IS_ESCAPE(sp, ecp, ch) && ecp->clen > 1) { --ecp->clen; *p = *++ecp->cp; } else *p = ch; } if (argv_exp0(sp, ecp, t, p - t)) goto err; goto addr_verify; case 'w': /* word */ if (argv_exp3(sp, ecp, ecp->cp, ecp->clen)) goto err; arg_cnt_chk: if (*++np != 'N') { /* N */ /* * If a number is specified, must either be * 0 or that number, if optional, and that * number, if required. */ tmp = *np - '0'; if ((*++np != 'o' || exp->argsoff != 0) && exp->argsoff != tmp) goto usage; } goto addr_verify; default: msgq(sp, M_ERR, "085|Internal syntax table error (%s: %s)", ecp->cmd->name, KEY_NAME(sp, *np)); } } /* Skip trailing whitespace. */ for (; ecp->clen > 0; --ecp->clen) { ch = *ecp->cp++; if (!ISBLANK(ch)) break; } /* * There shouldn't be anything left, and no more required fields, * i.e neither 'l' or 'r' in the syntax string. */ if (ecp->clen != 0 || strpbrk(np, "lr")) { usage: msgq(sp, M_ERR, "086|Usage: %s", ecp->cmd->usage); goto err; } /* * Verify that the addresses are legal. Check the addresses here, * because this is a place where all ex addresses pass through. * (They don't all pass through ex_line(), for instance.) We're * assuming that any non-existent line doesn't exist because it's * past the end-of-file. That's a pretty good guess. * * If it's a "default vi command", an address of zero is okay. */ addr_verify: switch (ecp->addrcnt) { case 2: /* * Historic ex/vi permitted commands with counts to go past * EOF. So, for example, if the file only had 5 lines, the * ex command "1,6>" would fail, but the command ">300" * would succeed. Since we don't want to have to make all * of the underlying commands handle random line numbers, * fix it here. */ if (ecp->addr2.lno == 0) { if (!F_ISSET(ecp, E_ADDR_ZERO) && (F_ISSET(sp, SC_EX) || !F_ISSET(ecp, E_USELASTCMD))) { ex_badaddr(sp, ecp->cmd, A_ZERO, NUM_OK); goto err; } } else if (!db_exist(sp, ecp->addr2.lno)) { if (FL_ISSET(ecp->iflags, E_C_COUNT)) { if (db_last(sp, &lno)) goto err; ecp->addr2.lno = lno; } else { ex_badaddr(sp, NULL, A_EOF, NUM_OK); goto err; } } /* FALLTHROUGH */ case 1: if (ecp->addr1.lno == 0) { if (!F_ISSET(ecp, E_ADDR_ZERO) && (F_ISSET(sp, SC_EX) || !F_ISSET(ecp, E_USELASTCMD))) { ex_badaddr(sp, ecp->cmd, A_ZERO, NUM_OK); goto err; } } else if (!db_exist(sp, ecp->addr1.lno)) { ex_badaddr(sp, NULL, A_EOF, NUM_OK); goto err; } break; } /* * If doing a default command and there's nothing left on the line, * vi just moves to the line. For example, ":3" and ":'a,'b" just * move to line 3 and line 'b, respectively, but ":3|" prints line 3. * * !!! * In addition, IF THE LINE CHANGES, move to the first nonblank of * the line. * * !!! * This is done before the absolute mark gets set; historically, * "/a/,/b/" did NOT set vi's absolute mark, but "/a/,/b/d" did. */ if ((F_ISSET(sp, SC_VI) || F_ISSET(ecp, E_NOPRDEF)) && F_ISSET(ecp, E_USELASTCMD) && vi_address == 0) { switch (ecp->addrcnt) { case 2: if (sp->lno != (ecp->addr2.lno ? ecp->addr2.lno : 1)) { sp->lno = ecp->addr2.lno ? ecp->addr2.lno : 1; sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } break; case 1: if (sp->lno != (ecp->addr1.lno ? ecp->addr1.lno : 1)) { sp->lno = ecp->addr1.lno ? ecp->addr1.lno : 1; sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } break; } ecp->cp = ecp->save_cmd; ecp->clen = ecp->save_cmdlen; goto loop; } /* * Set the absolute mark -- we have to set it for vi here, in case * it's a compound command, e.g. ":5p|6" should set the absolute * mark for vi. */ if (F_ISSET(ecp, E_ABSMARK)) { cur.lno = sp->lno; cur.cno = sp->cno; F_CLR(ecp, E_ABSMARK); if (mark_set(sp, ABSMARK1, &cur, 1)) goto err; } #if defined(DEBUG) && defined(COMLOG) ex_comlog(sp, ecp); #endif /* Increment the command count if not called from vi. */ if (F_ISSET(sp, SC_EX)) ++sp->ccnt; /* * If file state available, and not doing a global command, * log the start of an action. */ if (sp->ep != NULL && !F_ISSET(sp, SC_EX_GLOBAL)) (void)log_cursor(sp); /* * !!! * There are two special commands for the purposes of this code: the * default command () or the scrolling commands (^D * and ) as the first non- characters in the line. * * If this is the first command in the command line, we received the * command from the ex command loop and we're talking to a tty, and * and there's nothing else on the command line, and it's one of the * special commands, we move back up to the previous line, and erase * the prompt character with the output. Since ex runs in canonical * mode, we don't have to do anything else, a has already * been echoed by the tty driver. It's OK if vi calls us -- we won't * be in ex mode so we'll do nothing. */ if (F_ISSET(ecp, E_NRSEP)) { if (sp->ep != NULL && F_ISSET(sp, SC_EX) && !F_ISSET(gp, G_SCRIPTED) && (F_ISSET(ecp, E_USELASTCMD) || ecp->cmd == &cmds[C_SCROLL])) gp->scr_ex_adjust(sp, EX_TERM_SCROLL); F_CLR(ecp, E_NRSEP); } /* * Call the underlying function for the ex command. * * XXX * Interrupts behave like errors, for now. */ if (ecp->cmd->fn(sp, ecp) || INTERRUPTED(sp)) { if (F_ISSET(gp, G_SCRIPTED)) F_SET(sp, SC_EXIT_FORCE); goto err; } #ifdef DEBUG /* Make sure no function left global temporary space locked. */ if (F_ISSET(wp, W_TMP_INUSE)) { F_CLR(wp, W_TMP_INUSE); msgq(sp, M_ERR, "087|%s: temporary buffer not released", ecp->cmd->name); } #endif /* * Ex displayed the number of lines modified immediately after each * command, so the command "1,10d|1,10d" would display: * * 10 lines deleted * 10 lines deleted * * * Executing ex commands from vi only reported the final modified * lines message -- that's wrong enough that we don't match it. */ if (F_ISSET(sp, SC_EX)) mod_rpt(sp); /* * Integrate any offset parsed by the underlying command, and make * sure the referenced line exists. * * XXX * May not match historic practice (which I've never been able to * completely figure out.) For example, the '=' command from vi * mode often got the offset wrong, and complained it was too large, * but didn't seem to have a problem with the cursor. If anyone * complains, ask them how it's supposed to work, they might know. */ if (sp->ep != NULL && ecp->flagoff) { if (ecp->flagoff < 0) { if (sp->lno <= -ecp->flagoff) { msgq(sp, M_ERR, "088|Flag offset to before line 1"); goto err; } } else { if (!NPFITS(DB_MAX_RECORDS, sp->lno, ecp->flagoff)) { ex_badaddr(sp, NULL, A_NOTSET, NUM_OVER); goto err; } if (!db_exist(sp, sp->lno + ecp->flagoff)) { msgq(sp, M_ERR, "089|Flag offset past end-of-file"); goto err; } } sp->lno += ecp->flagoff; } /* * If the command executed successfully, we may want to display a line * based on the autoprint option or an explicit print flag. (Make sure * that there's a line to display.) Also, the autoprint edit option is * turned off for the duration of global commands. */ if (F_ISSET(sp, SC_EX) && sp->ep != NULL && sp->lno != 0) { /* * The print commands have already handled the `print' flags. * If so, clear them. */ if (FL_ISSET(ecp->iflags, E_CLRFLAG)) FL_CLR(ecp->iflags, E_C_HASH | E_C_LIST | E_C_PRINT); /* If hash set only because of the number option, discard it. */ if (F_ISSET(ecp, E_OPTNUM)) FL_CLR(ecp->iflags, E_C_HASH); /* * If there was an explicit flag to display the new cursor line, * or autoprint is set and a change was made, display the line. * If any print flags were set use them, else default to print. */ LF_INIT(FL_ISSET(ecp->iflags, E_C_HASH | E_C_LIST | E_C_PRINT)); if (!LF_ISSET(E_C_HASH | E_C_LIST | E_C_PRINT | E_NOAUTO) && !F_ISSET(sp, SC_EX_GLOBAL) && O_ISSET(sp, O_AUTOPRINT) && F_ISSET(ecp, E_AUTOPRINT)) LF_INIT(E_C_PRINT); if (LF_ISSET(E_C_HASH | E_C_LIST | E_C_PRINT)) { cur.lno = sp->lno; cur.cno = 0; (void)ex_print(sp, ecp, &cur, &cur, flags); } } /* * If the command had an associated "+cmd", it has to be executed * before we finish executing any more of this ex command. For * example, consider a .exrc file that contains the following lines: * * :set all * :edit +25 file.c|s/abc/ABC/|1 * :3,5 print * * This can happen more than once -- the historic vi simply hung or * dropped core, of course. Prepend the + command back into the * current command and continue. We may have to add an additional * character. We know that it will fit because we * discarded at least one space and the + character. */ if (arg1_len != 0) { /* * If the last character of the + command was a * character, it would be treated differently because of the * append. Quote it, if necessary. */ if (IS_ESCAPE(sp, ecp, arg1[arg1_len - 1])) { *--ecp->save_cmd = CH_LITERAL; ++ecp->save_cmdlen; } ecp->save_cmd -= arg1_len; ecp->save_cmdlen += arg1_len; MEMCPYW(ecp->save_cmd, arg1, arg1_len); /* * Any commands executed from a +cmd are executed starting at * the first column of the last line of the file -- NOT the * first nonblank.) The main file startup code doesn't know * that a +cmd was set, however, so it may have put us at the * top of the file. (Note, this is safe because we must have * switched files to get here.) */ F_SET(ecp, E_MOVETOEND); } /* Update the current command. */ ecp->cp = ecp->save_cmd; ecp->clen = ecp->save_cmdlen; /* * !!! * If we've changed screens or underlying files, any pending global or * v command, or @ buffer that has associated addresses, has to be * discarded. This is historic practice for globals, and necessary for * @ buffers that had associated addresses. * * Otherwise, if we've changed underlying files, it's not a problem, * we continue with the rest of the ex command(s), operating on the * new file. However, if we switch screens (either by exiting or by * an explicit command), we have no way of knowing where to put output * messages, and, since we don't control screens here, we could screw * up the upper layers, (e.g. we could exit/reenter a screen multiple * times). So, return and continue after we've got a new screen. */ if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE | SC_FSWITCH | SC_SSWITCH)) { at_found = gv_found = 0; for (ecp = wp->ecq.lh_first; ecp != NULL; ecp = ecp->q.le_next) switch (ecp->agv_flags) { case 0: case AGV_AT_NORANGE: break; case AGV_AT: if (!at_found) { at_found = 1; msgq(sp, M_ERR, "090|@ with range running when the file/screen changed"); } break; case AGV_GLOBAL: case AGV_V: if (!gv_found) { gv_found = 1; msgq(sp, M_ERR, "091|Global/v command running when the file/screen changed"); } break; default: abort(); } if (at_found || gv_found) goto discard; if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE | SC_SSWITCH)) goto rsuccess; } goto loop; /* NOTREACHED */ err: /* * On command failure, we discard keys and pending commands remaining, * as well as any keys that were mapped and waiting. The save_cmdlen * test is not necessarily correct. If we fail early enough we don't * know if the entire string was a single command or not. Guess, as * it's useful to know if commands other than the current one are being * discarded. */ if (ecp->save_cmdlen == 0) for (; ecp->clen; --ecp->clen) { ch = *ecp->cp++; if (IS_ESCAPE(sp, ecp, ch) && ecp->clen > 1) { --ecp->clen; ++ecp->cp; } else if (ch == '\n' || ch == '|') { if (ecp->clen > 1) ecp->save_cmdlen = 1; break; } } if (ecp->save_cmdlen != 0 || wp->ecq.lh_first != &wp->excmd) { discard: msgq(sp, M_BERR, "092|Ex command failed: pending commands discarded"); ex_discard(sp); } if (v_event_flush(sp, CH_MAPPED)) msgq(sp, M_BERR, "093|Ex command failed: mapped keys discarded"); rfail: tmp = 1; if (0) rsuccess: tmp = 0; /* Turn off any file name error information. */ wp->if_name = NULL; /* Turn off the global bit. */ F_CLR(sp, SC_EX_GLOBAL); return (tmp); } /* * ex_range -- * Get a line range for ex commands, or perform a vi ex address search. * * PUBLIC: int ex_range __P((SCR *, EXCMD *, int *)); */ int ex_range(SCR *sp, EXCMD *ecp, int *errp) { enum { ADDR_FOUND, ADDR_NEED, ADDR_NONE } addr; GS *gp; EX_PRIVATE *exp; MARK m; int isaddr; *errp = 0; /* * Parse comma or semi-colon delimited line specs. * * Semi-colon delimiters update the current address to be the last * address. For example, the command * * :3;/pattern/ecp->cp * * will search for pattern from line 3. In addition, if ecp->cp * is not a valid command, the current line will be left at 3, not * at the original address. * * Extra addresses are discarded, starting with the first. * * !!! * If any addresses are missing, they default to the current line. * This was historically true for both leading and trailing comma * delimited addresses as well as for trailing semicolon delimited * addresses. For consistency, we make it true for leading semicolon * addresses as well. */ gp = sp->gp; exp = EXP(sp); for (addr = ADDR_NONE, ecp->addrcnt = 0; ecp->clen > 0;) switch (*ecp->cp) { case '%': /* Entire file. */ /* Vi ex address searches didn't permit % signs. */ if (F_ISSET(ecp, E_VISEARCH)) goto ret; /* It's an error if the file is empty. */ if (sp->ep == NULL) { ex_badaddr(sp, NULL, A_EMPTY, NUM_OK); *errp = 1; return (0); } /* * !!! * A percent character addresses all of the lines in * the file. Historically, it couldn't be followed by * any other address. We do it as a text substitution * for simplicity. POSIX 1003.2 is expected to follow * this practice. * * If it's an empty file, the first line is 0, not 1. */ if (addr == ADDR_FOUND) { ex_badaddr(sp, NULL, A_COMBO, NUM_OK); *errp = 1; return (0); } if (db_last(sp, &ecp->addr2.lno)) return (1); ecp->addr1.lno = ecp->addr2.lno == 0 ? 0 : 1; ecp->addr1.cno = ecp->addr2.cno = 0; ecp->addrcnt = 2; addr = ADDR_FOUND; ++ecp->cp; --ecp->clen; break; case ',': /* Comma delimiter. */ /* Vi ex address searches didn't permit commas. */ if (F_ISSET(ecp, E_VISEARCH)) goto ret; /* FALLTHROUGH */ case ';': /* Semi-colon delimiter. */ if (sp->ep == NULL) { ex_badaddr(sp, NULL, A_EMPTY, NUM_OK); *errp = 1; return (0); } if (addr != ADDR_FOUND) switch (ecp->addrcnt) { case 0: ecp->addr1.lno = sp->lno; ecp->addr1.cno = sp->cno; ecp->addrcnt = 1; break; case 2: ecp->addr1 = ecp->addr2; /* FALLTHROUGH */ case 1: ecp->addr2.lno = sp->lno; ecp->addr2.cno = sp->cno; ecp->addrcnt = 2; break; } if (*ecp->cp == ';') switch (ecp->addrcnt) { case 0: abort(); /* NOTREACHED */ case 1: sp->lno = ecp->addr1.lno; sp->cno = ecp->addr1.cno; break; case 2: sp->lno = ecp->addr2.lno; sp->cno = ecp->addr2.cno; break; } addr = ADDR_NEED; /* FALLTHROUGH */ case ' ': /* Whitespace. */ case '\t': /* Whitespace. */ ++ecp->cp; --ecp->clen; break; default: /* Get a line specification. */ if (ex_line(sp, ecp, &m, &isaddr, errp)) return (1); if (*errp) return (0); if (!isaddr) goto ret; if (addr == ADDR_FOUND) { ex_badaddr(sp, NULL, A_COMBO, NUM_OK); *errp = 1; return (0); } switch (ecp->addrcnt) { case 0: ecp->addr1 = m; ecp->addrcnt = 1; break; case 1: ecp->addr2 = m; ecp->addrcnt = 2; break; case 2: ecp->addr1 = ecp->addr2; ecp->addr2 = m; break; } addr = ADDR_FOUND; break; } /* * !!! * Vi ex address searches are indifferent to order or trailing * semi-colons. */ ret: if (F_ISSET(ecp, E_VISEARCH)) return (0); if (addr == ADDR_NEED) switch (ecp->addrcnt) { case 0: ecp->addr1.lno = sp->lno; ecp->addr1.cno = sp->cno; ecp->addrcnt = 1; break; case 2: ecp->addr1 = ecp->addr2; /* FALLTHROUGH */ case 1: ecp->addr2.lno = sp->lno; ecp->addr2.cno = sp->cno; ecp->addrcnt = 2; break; } if (ecp->addrcnt == 2 && ecp->addr2.lno < ecp->addr1.lno) { msgq(sp, M_ERR, "094|The second address is smaller than the first"); *errp = 1; } return (0); } /* * ex_line -- * Get a single line address specifier. * * The way the "previous context" mark worked was that any "non-relative" * motion set it. While ex/vi wasn't totally consistent about this, ANY * numeric address, search pattern, '$', or mark reference in an address * was considered non-relative, and set the value. Which should explain * why we're hacking marks down here. The problem was that the mark was * only set if the command was called, i.e. we have to set a flag and test * it later. * * XXX * This is probably still not exactly historic practice, although I think * it's fairly close. */ static int ex_line(SCR *sp, EXCMD *ecp, MARK *mp, int *isaddrp, int *errp) { enum nresult nret; EX_PRIVATE *exp; GS *gp; long total, val; int isneg; int (*sf) __P((SCR *, MARK *, MARK *, CHAR_T *, size_t, CHAR_T **, u_int)); CHAR_T *endp; gp = sp->gp; exp = EXP(sp); *isaddrp = *errp = 0; F_CLR(ecp, E_DELTA); /* No addresses permitted until a file has been read in. */ if (sp->ep == NULL && strchr("$0123456789'\\/?.+-^", *ecp->cp)) { ex_badaddr(sp, NULL, A_EMPTY, NUM_OK); *errp = 1; return (0); } switch (*ecp->cp) { case '$': /* Last line in the file. */ *isaddrp = 1; F_SET(ecp, E_ABSMARK); mp->cno = 0; if (db_last(sp, &mp->lno)) return (1); ++ecp->cp; --ecp->clen; break; /* Absolute line number. */ case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': *isaddrp = 1; F_SET(ecp, E_ABSMARK); if ((nret = nget_slong(sp, &val, ecp->cp, &endp, 10)) != NUM_OK) { ex_badaddr(sp, NULL, A_NOTSET, nret); *errp = 1; return (0); } if (!NPFITS(DB_MAX_RECORDS, 0, val)) { ex_badaddr(sp, NULL, A_NOTSET, NUM_OVER); *errp = 1; return (0); } mp->lno = val; mp->cno = 0; ecp->clen -= (endp - ecp->cp); ecp->cp = endp; break; case '\'': /* Use a mark. */ *isaddrp = 1; F_SET(ecp, E_ABSMARK); if (ecp->clen == 1) { msgq(sp, M_ERR, "095|No mark name supplied"); *errp = 1; return (0); } if (mark_get(sp, ecp->cp[1], mp, M_ERR)) { *errp = 1; return (0); } ecp->cp += 2; ecp->clen -= 2; break; case '\\': /* Search: forward/backward. */ /* * !!! * I can't find any difference between // and \/ or between * ?? and \?. Mark Horton doesn't remember there being any * difference. C'est la vie. */ if (ecp->clen < 2 || ecp->cp[1] != '/' && ecp->cp[1] != '?') { msgq(sp, M_ERR, "096|\\ not followed by / or ?"); *errp = 1; return (0); } ++ecp->cp; --ecp->clen; sf = ecp->cp[0] == '/' ? f_search : b_search; goto search; case '/': /* Search forward. */ sf = f_search; goto search; case '?': /* Search backward. */ sf = b_search; search: mp->lno = sp->lno; mp->cno = sp->cno; if (sf(sp, mp, mp, ecp->cp, ecp->clen, &endp, SEARCH_MSG | SEARCH_PARSE | SEARCH_SET | (F_ISSET(ecp, E_SEARCH_WMSG) ? SEARCH_WMSG : 0))) { *errp = 1; return (0); } /* Fix up the command pointers. */ ecp->clen -= (endp - ecp->cp); ecp->cp = endp; *isaddrp = 1; F_SET(ecp, E_ABSMARK); break; case '.': /* Current position. */ *isaddrp = 1; mp->cno = sp->cno; /* If an empty file, then '.' is 0, not 1. */ if (sp->lno == 1) { if (db_last(sp, &mp->lno)) return (1); if (mp->lno != 0) mp->lno = 1; } else mp->lno = sp->lno; /* * !!! * Historically, . was the same as .+, i.e. * the '+' could be omitted. (This feature is found in ed * as well.) */ if (ecp->clen > 1 && ISDIGIT(ecp->cp[1])) *ecp->cp = '+'; else { ++ecp->cp; --ecp->clen; } break; } /* Skip trailing s. */ for (; ecp->clen > 0 && ISBLANK(ecp->cp[0]); ++ecp->cp, --ecp->clen); /* * Evaluate any offset. If no address yet found, the offset * is relative to ".". */ total = 0; if (ecp->clen != 0 && (ISDIGIT(ecp->cp[0]) || ecp->cp[0] == '+' || ecp->cp[0] == '-' || ecp->cp[0] == '^')) { if (!*isaddrp) { *isaddrp = 1; mp->lno = sp->lno; mp->cno = sp->cno; } /* * Evaluate an offset, defined as: * * [+-^]*[]*[0-9]* * * The rough translation is any number of signs, optionally * followed by numbers, or a number by itself, all * separated. * * !!! * All address offsets were additive, e.g. "2 2 3p" was the * same as "7p", or, "/ZZZ/ 2" was the same as "/ZZZ/+2". * Note, however, "2 /ZZZ/" was an error. It was also legal * to insert signs without numbers, so "3 - 2" was legal, and * equal to 4. * * !!! * Offsets were historically permitted for any line address, * e.g. the command "1,2 copy 2 2 2 2" copied lines 1,2 after * line 8. * * !!! * Offsets were historically permitted for search commands, * and handled as addresses: "/pattern/2 2 2" was legal, and * referenced the 6th line after pattern. */ F_SET(ecp, E_DELTA); for (;;) { for (; ecp->clen > 0 && ISBLANK(ecp->cp[0]); ++ecp->cp, --ecp->clen); if (ecp->clen == 0 || !ISDIGIT(ecp->cp[0]) && ecp->cp[0] != '+' && ecp->cp[0] != '-' && ecp->cp[0] != '^') break; if (!ISDIGIT(ecp->cp[0]) && !ISDIGIT(ecp->cp[1])) { total += ecp->cp[0] == '+' ? 1 : -1; --ecp->clen; ++ecp->cp; } else { if (ecp->cp[0] == '-' || ecp->cp[0] == '^') { ++ecp->cp; --ecp->clen; isneg = 1; } else isneg = 0; /* Get a signed long, add it to the total. */ if ((nret = nget_slong(sp, &val, ecp->cp, &endp, 10)) != NUM_OK || (nret = NADD_SLONG(sp, total, val)) != NUM_OK) { ex_badaddr(sp, NULL, A_NOTSET, nret); *errp = 1; return (0); } total += isneg ? -val : val; ecp->clen -= (endp - ecp->cp); ecp->cp = endp; } } } /* * Any value less than 0 is an error. Make sure that the new value * will fit into a db_recno_t. */ if (*isaddrp && total != 0) { if (total < 0) { if (-total > mp->lno) { msgq(sp, M_ERR, "097|Reference to a line number less than 0"); *errp = 1; return (0); } } else if (!NPFITS(DB_MAX_RECORDS, mp->lno, total)) { ex_badaddr(sp, NULL, A_NOTSET, NUM_OVER); *errp = 1; return (0); } mp->lno += total; } return (0); } /* * ex_load -- * Load up the next command, which may be an @ buffer or global command. */ static int ex_load(SCR *sp) { WIN *wp; EXCMD *ecp; RANGE *rp; F_CLR(sp, SC_EX_GLOBAL); /* * Lose any exhausted commands. We know that the first command * can't be an AGV command, which makes things a bit easier. */ for (wp = sp->wp;;) { /* * If we're back to the original structure, leave it around, * but discard any allocated source name, we've returned to * the beginning of the command stack. */ if ((ecp = wp->ecq.lh_first) == &wp->excmd) { if (F_ISSET(ecp, E_NAMEDISCARD)) { free(ecp->if_name); ecp->if_name = NULL; } return (0); } /* * ecp->clen will be 0 for the first discarded command, but * may not be 0 for subsequent ones, e.g. if the original * command was ":g/xx/@a|s/b/c/", then when we discard the * command pushed on the stack by the @a, we have to resume * the global command which included the substitute command. */ if (ecp->clen != 0) return (0); /* * If it's an @, global or v command, we may need to continue * the command on a different line. */ if (FL_ISSET(ecp->agv_flags, AGV_ALL)) { /* Discard any exhausted ranges. */ while ((rp = ecp->rq.cqh_first) != (void *)&ecp->rq) if (rp->start > rp->stop) { CIRCLEQ_REMOVE(&ecp->rq, rp, q); free(rp); } else break; /* If there's another range, continue with it. */ if (rp != (void *)&ecp->rq) break; /* If it's a global/v command, fix up the last line. */ if (FL_ISSET(ecp->agv_flags, AGV_GLOBAL | AGV_V) && ecp->range_lno != OOBLNO) if (db_exist(sp, ecp->range_lno)) sp->lno = ecp->range_lno; else { if (db_last(sp, &sp->lno)) return (1); if (sp->lno == 0) sp->lno = 1; } free(ecp->o_cp); } /* Discard the EXCMD. */ LIST_REMOVE(ecp, q); free(ecp); } /* * We only get here if it's an active @, global or v command. Set * the current line number, and get a new copy of the command for * the parser. Note, the original pointer almost certainly moved, * so we have play games. */ ecp->cp = ecp->o_cp; MEMCPYW(ecp->cp, ecp->cp + ecp->o_clen, ecp->o_clen); ecp->clen = ecp->o_clen; ecp->range_lno = sp->lno = rp->start++; if (FL_ISSET(ecp->agv_flags, AGV_GLOBAL | AGV_V)) F_SET(sp, SC_EX_GLOBAL); return (0); } /* * ex_discard -- * Discard any pending ex commands. */ static int ex_discard(SCR *sp) { WIN *wp; EXCMD *ecp; RANGE *rp; /* * We know the first command can't be an AGV command, so we don't * process it specially. We do, however, nail the command itself. */ for (wp = sp->wp; (ecp = wp->ecq.lh_first) != &wp->excmd;) { if (FL_ISSET(ecp->agv_flags, AGV_ALL)) { while ((rp = ecp->rq.cqh_first) != (void *)&ecp->rq) { CIRCLEQ_REMOVE(&ecp->rq, rp, q); free(rp); } free(ecp->o_cp); } LIST_REMOVE(ecp, q); free(ecp); } wp->ecq.lh_first->clen = 0; return (0); } /* * ex_unknown -- * Display an unknown command name. */ static void ex_unknown(SCR *sp, CHAR_T *cmd, size_t len) { size_t blen; CHAR_T *bp; GET_SPACE_GOTOW(sp, bp, blen, len + 1); bp[len] = '\0'; MEMCPYW(bp, cmd, len); msgq_wstr(sp, M_ERR, bp, "098|The %s command is unknown"); FREE_SPACEW(sp, bp, blen); alloc_err: return; } /* * ex_is_abbrev - * The vi text input routine needs to know if ex thinks this is an * [un]abbreviate command, so it can turn off abbreviations. See * the usual ranting in the vi/v_txt_ev.c:txt_abbrev() routine. * * PUBLIC: int ex_is_abbrev __P((SCR *, CHAR_T *, size_t)); */ int ex_is_abbrev(SCR *sp, CHAR_T *name, size_t len) { EXCMDLIST const *cp; return ((cp = ex_comm_search(sp, name, len)) != NULL && (cp == &cmds[C_ABBR] || cp == &cmds[C_UNABBREVIATE])); } /* * ex_is_unmap - * The vi text input routine needs to know if ex thinks this is an * unmap command, so it can turn off input mapping. See the usual * ranting in the vi/v_txt_ev.c:txt_unmap() routine. * * PUBLIC: int ex_is_unmap __P((SCR *, CHAR_T *, size_t)); */ int ex_is_unmap(SCR *sp, CHAR_T *name, size_t len) { EXCMDLIST const *cp; /* * The command the vi input routines are really interested in * is "unmap!", not just unmap. */ if (name[len - 1] != '!') return (0); --len; return ((cp = ex_comm_search(sp, name, len)) != NULL && cp == &cmds[C_UNMAP]); } /* * ex_comm_search -- * Search for a command name. */ static EXCMDLIST const * ex_comm_search(SCR *sp, CHAR_T *name, size_t len) { EXCMDLIST const *cp; for (cp = cmds; cp->name != NULL; ++cp) { if (cp->name[0] > name[0]) return (NULL); if (cp->name[0] != name[0]) continue; if (!MEMCMP(name, cp->name, len)) return (cp); } return (NULL); } /* * ex_badaddr -- * Display a bad address message. * * PUBLIC: void ex_badaddr * PUBLIC: __P((SCR *, EXCMDLIST const *, enum badaddr, enum nresult)); */ void ex_badaddr(SCR *sp, const EXCMDLIST *cp, enum badaddr ba, enum nresult nret) { db_recno_t lno; switch (nret) { case NUM_OK: break; case NUM_ERR: msgq(sp, M_SYSERR, NULL); return; case NUM_OVER: msgq(sp, M_ERR, "099|Address value overflow"); return; case NUM_UNDER: msgq(sp, M_ERR, "100|Address value underflow"); return; } /* * When encountering an address error, tell the user if there's no * underlying file, that's the real problem. */ if (sp->ep == NULL) { ex_wemsg(sp, cp ? cp->name : NULL, EXM_NOFILEYET); return; } switch (ba) { case A_COMBO: msgq(sp, M_ERR, "101|Illegal address combination"); break; case A_EOF: if (db_last(sp, &lno)) return; if (lno != 0) { msgq(sp, M_ERR, "102|Illegal address: only %lu lines in the file", lno); break; } /* FALLTHROUGH */ case A_EMPTY: msgq(sp, M_ERR, "103|Illegal address: the file is empty"); break; case A_NOTSET: abort(); /* NOTREACHED */ case A_ZERO: msgq(sp, M_ERR, "104|The %s command doesn't permit an address of 0", cp->name); break; } return; } #if defined(DEBUG) && defined(COMLOG) /* * ex_comlog -- * Log ex commands. */ static void ex_comlog(sp, ecp) SCR *sp; EXCMD *ecp; { vtrace(sp, "ecmd: %s", ecp->cmd->name); if (ecp->addrcnt > 0) { vtrace(sp, " a1 %d", ecp->addr1.lno); if (ecp->addrcnt > 1) vtrace(sp, " a2: %d", ecp->addr2.lno); } if (ecp->lineno) vtrace(sp, " line %d", ecp->lineno); if (ecp->flags) vtrace(sp, " flags 0x%x", ecp->flags); if (F_ISSET(&exc, E_BUFFER)) vtrace(sp, " buffer %c", ecp->buffer); if (ecp->argc) for (cnt = 0; cnt < ecp->argc; ++cnt) vtrace(sp, " arg %d: {%s}", cnt, ecp->argv[cnt]->bp); vtrace(sp, "\n"); } #endif nvi-1.81.6/ex/ex.h0100644000076400001440000002130210720065506012651 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: ex.h,v 10.30 2004/03/16 14:11:33 skimo Exp $ (Berkeley) $Date: 2004/03/16 14:11:33 $ */ #define PROMPTCHAR ':' /* Prompt using a colon. */ typedef struct _excmdlist { /* Ex command table structure. */ CHAR_T *name; /* Command name, underlying function. */ int (*fn) __P((SCR *, EXCMD *)); #define E_ADDR1 0x00000001 /* One address. */ #define E_ADDR2 0x00000002 /* Two addresses. */ #define E_ADDR2_ALL 0x00000004 /* Zero/two addresses; zero == all. */ #define E_ADDR2_NONE 0x00000008 /* Zero/two addresses; zero == none. */ #define E_ADDR_ZERO 0x00000010 /* 0 is a legal addr1. */ #define E_ADDR_ZERODEF 0x00000020 /* 0 is default addr1 of empty files. */ #define E_AUTOPRINT 0x00000040 /* Command always sets autoprint. */ #define E_CLRFLAG 0x00000080 /* Clear the print (#, l, p) flags. */ #define E_NEWSCREEN 0x00000100 /* Create a new screen. */ #define E_SECURE 0x00000200 /* Permission denied if O_SECURE set. */ #define E_VIONLY 0x00000400 /* Meaningful only in vi. */ #define __INUSE1 0xfffff800 /* Same name space as EX_PRIVATE. */ u_int16_t flags; char *syntax; /* Syntax script. */ char *usage; /* Usage line. */ char *help; /* Help line. */ } EXCMDLIST; #define MAXCMDNAMELEN 12 /* Longest command name. */ extern EXCMDLIST const cmds[]; /* Table of ex commands. */ /* * !!! * QUOTING NOTE: * * Historically, .exrc files and EXINIT variables could only use ^V as an * escape character, neither ^Q or a user specified character worked. We * enforce that here, just in case someone depends on it. */ #define IS_ESCAPE(sp, cmdp, ch) \ (F_ISSET(cmdp, E_VLITONLY) ? \ (ch) == CH_LITERAL : KEY_VAL(sp, ch) == K_VLNEXT) /* * File state must be checked for each command -- any ex command may be entered * at any time, and most of them won't work well if a file hasn't yet been read * in. Historic vi generally took the easy way out and dropped core. */ #define NEEDFILE(sp, cmdp) { \ if ((sp)->ep == NULL) { \ ex_wemsg(sp, (cmdp)->cmd->name, EXM_NOFILEYET); \ return (1); \ } \ } /* Range structures for global and @ commands. */ typedef struct _range RANGE; struct _range { /* Global command range. */ CIRCLEQ_ENTRY(_range) q; /* Linked list of ranges. */ db_recno_t start, stop; /* Start/stop of the range. */ }; /* Ex command structure. */ struct _excmd { LIST_ENTRY(_excmd) q; /* Linked list of commands. */ char *if_name; /* Associated file. */ db_recno_t if_lno; /* Associated line number. */ /* Clear the structure for the ex parser. */ #define CLEAR_EX_PARSER(cmdp) \ memset(&((cmdp)->cp), 0, ((char *)&(cmdp)->flags - \ (char *)&((cmdp)->cp)) + sizeof((cmdp)->flags)) CHAR_T *cp; /* Current command text. */ size_t clen; /* Current command length. */ CHAR_T *save_cmd; /* Remaining command. */ size_t save_cmdlen; /* Remaining command length. */ EXCMDLIST const *cmd; /* Command: entry in command table. */ EXCMDLIST rcmd; /* Command: table entry/replacement. */ CIRCLEQ_HEAD(_rh, _range) rq; /* @/global range: linked list. */ db_recno_t range_lno; /* @/global range: set line number. */ CHAR_T *o_cp; /* Original @/global command. */ size_t o_clen; /* Original @/global command length. */ #define AGV_AT 0x01 /* @ buffer execution. */ #define AGV_AT_NORANGE 0x02 /* @ buffer execution without range. */ #define AGV_GLOBAL 0x04 /* global command. */ #define AGV_V 0x08 /* v command. */ #define AGV_ALL (AGV_AT | AGV_AT_NORANGE | AGV_GLOBAL | AGV_V) u_int8_t agv_flags; /* Clear the structure before each ex command. */ #define CLEAR_EX_CMD(cmdp) { \ u_int32_t L__f = F_ISSET(cmdp, E_PRESERVE); \ memset(&((cmdp)->buffer), 0, ((char *)&(cmdp)->flags - \ (char *)&((cmdp)->buffer)) + sizeof((cmdp)->flags)); \ F_SET(cmdp, L__f); \ } CHAR_T buffer; /* Command: named buffer. */ db_recno_t lineno; /* Command: line number. */ long count; /* Command: signed count. */ long flagoff; /* Command: signed flag offset. */ int addrcnt; /* Command: addresses (0, 1 or 2). */ MARK addr1; /* Command: 1st address. */ MARK addr2; /* Command: 2nd address. */ ARGS **argv; /* Command: array of arguments. */ int argc; /* Command: count of arguments. */ #define E_C_BUFFER 0x00001 /* Buffer name specified. */ #define E_C_CARAT 0x00002 /* ^ flag. */ #define E_C_COUNT 0x00004 /* Count specified. */ #define E_C_COUNT_NEG 0x00008 /* Count was signed negative. */ #define E_C_COUNT_POS 0x00010 /* Count was signed positive. */ #define E_C_DASH 0x00020 /* - flag. */ #define E_C_DOT 0x00040 /* . flag. */ #define E_C_EQUAL 0x00080 /* = flag. */ #define E_C_FORCE 0x00100 /* ! flag. */ #define E_C_HASH 0x00200 /* # flag. */ #define E_C_LIST 0x00400 /* l flag. */ #define E_C_PLUS 0x00800 /* + flag. */ #define E_C_PRINT 0x01000 /* p flag. */ u_int16_t iflags; /* User input information. */ #define __INUSE2 0x000007ff /* Same name space as EXCMDLIST. */ #define E_BLIGNORE 0x00000800 /* Ignore blank lines. */ #define E_NAMEDISCARD 0x00001000 /* Free/discard the name. */ #define E_NOAUTO 0x00002000 /* Don't do autoprint output. */ #define E_NOPRDEF 0x00004000 /* Don't print as default. */ #define E_NRSEP 0x00008000 /* Need to line adjust ex output. */ #define E_OPTNUM 0x00010000 /* Number edit option affected. */ #define E_VLITONLY 0x00020000 /* Use ^V quoting only. */ #define E_PRESERVE 0x0003f800 /* Bits to preserve across commands. */ #define E_ABSMARK 0x00040000 /* Set the absolute mark. */ #define E_ADDR_DEF 0x00080000 /* Default addresses used. */ #define E_DELTA 0x00100000 /* Search address with delta. */ #define E_MODIFY 0x00200000 /* File name expansion modified arg. */ #define E_MOVETOEND 0x00400000 /* Move to the end of the file first. */ #define E_NEWLINE 0x00800000 /* Found ending . */ #define E_SEARCH_WMSG 0x01000000 /* Display search-wrapped message. */ #define E_USELASTCMD 0x02000000 /* Use the last command. */ #define E_VISEARCH 0x04000000 /* It's really a vi search command. */ u_int32_t flags; /* Current flags. */ }; /* Ex private, per-screen memory. */ typedef struct _ex_private { CIRCLEQ_HEAD(_tqh, _tagq) tq; /* Tag queue. */ TAILQ_HEAD(_tagfh, _tagf) tagfq;/* Tag file list. */ LIST_HEAD(_csch, _csc) cscq; /* Cscope connection list. */ CHAR_T *tag_last; /* Saved last tag string. */ CHAR_T *lastbcomm; /* Last bang command. */ ARGS **args; /* Command: argument list. */ int argscnt; /* Command: argument list count. */ int argsoff; /* Command: offset into arguments. */ u_int32_t fdef; /* Saved E_C_* default command flags. */ char *ibp; /* File line input buffer. */ size_t ibp_len; /* File line input buffer length. */ CONVWIN ibcw; /* File line input conversion buffer. */ /* * Buffers for the ex output. The screen/vi support doesn't do any * character buffering of any kind. We do it here so that we're not * calling the screen output routines on every character. * * XXX * Change to grow dynamically. */ char obp[1024]; /* Ex output buffer. */ size_t obp_len; /* Ex output buffer length. */ #define EXP_CSCINIT 0x01 /* Cscope initialized. */ u_int8_t flags; } EX_PRIVATE; #define EXP(sp) ((EX_PRIVATE *)((sp)->ex_private)) /* * Filter actions: * * FILTER_BANG !: filter text through the utility. * FILTER_RBANG !: read from the utility (without stdin). * FILTER_READ read: read from the utility (with stdin). * FILTER_WRITE write: write to the utility, display its output. */ enum filtertype { FILTER_BANG, FILTER_RBANG, FILTER_READ, FILTER_WRITE }; /* Ex common error messages. */ typedef enum { EXM_EMPTYBUF, /* Empty buffer. */ EXM_FILECOUNT, /* Too many file names. */ EXM_LOCKED, /* Another thread is active. */ EXM_NOCANON, /* No terminal interface. */ EXM_NOCANON_F, /* EXM_NOCANO: filter version. */ EXM_NOFILEYET, /* Illegal until a file read in. */ EXM_NOPREVBUF, /* No previous buffer specified. */ EXM_NOPREVRE, /* No previous RE specified. */ EXM_NOSUSPEND, /* No suspension. */ EXM_SECURE, /* Illegal if secure edit option set. */ EXM_SECURE_F, /* EXM_SECURE: filter version */ EXM_USAGE /* Standard usage message. */ } exm_t; /* Ex address error types. */ enum badaddr { A_COMBO, A_EMPTY, A_EOF, A_NOTSET, A_ZERO }; /* Ex common tag error messages. */ typedef enum { TAG_BADLNO, /* Tag line doesn't exist. */ TAG_EMPTY, /* Tags stack is empty. */ TAG_SEARCH /* Tags search pattern wasn't found. */ } tagmsg_t; #include "ex_def.h" #include "extern.h" nvi-1.81.6/ex/ex_abbrev.c0100644000076400001440000000546610720065506014202 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_abbrev.c,v 10.10 2001/12/16 18:18:54 skimo Exp $ (Berkeley) $Date: 2001/12/16 18:18:54 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_abbr -- :abbreviate [key replacement] * Create an abbreviation or display abbreviations. * * PUBLIC: int ex_abbr __P((SCR *, EXCMD *)); */ int ex_abbr(SCR *sp, EXCMD *cmdp) { CHAR_T *p; size_t len; switch (cmdp->argc) { case 0: if (seq_dump(sp, SEQ_ABBREV, 0) == 0) msgq(sp, M_INFO, "105|No abbreviations to display"); return (0); case 2: break; default: abort(); } /* * Check for illegal characters. * * !!! * Another fun one, historically. See vi/v_ntext.c:txt_abbrev() for * details. The bottom line is that all abbreviations have to end * with a "word" character, because it's the transition from word to * non-word characters that triggers the test for an abbreviation. In * addition, because of the way the test is done, there can't be any * transitions from word to non-word character (or vice-versa) other * than between the next-to-last and last characters of the string, * and there can't be any characters. Warn the user. */ if (!inword(cmdp->argv[0]->bp[cmdp->argv[0]->len - 1])) { msgq(sp, M_ERR, "106|Abbreviations must end with a \"word\" character"); return (1); } for (p = cmdp->argv[0]->bp; *p != '\0'; ++p) if (ISBLANK(p[0])) { msgq(sp, M_ERR, "107|Abbreviations may not contain tabs or spaces"); return (1); } if (cmdp->argv[0]->len > 2) for (p = cmdp->argv[0]->bp, len = cmdp->argv[0]->len - 2; len; --len, ++p) if (inword(p[0]) != inword(p[1])) { msgq(sp, M_ERR, "108|Abbreviations may not mix word/non-word characters, except at the end"); return (1); } if (seq_set(sp, NULL, 0, cmdp->argv[0]->bp, cmdp->argv[0]->len, cmdp->argv[1]->bp, cmdp->argv[1]->len, SEQ_ABBREV, SEQ_USERDEF)) return (1); F_SET(sp->gp, G_ABBREV); return (0); } /* * ex_unabbr -- :unabbreviate key * Delete an abbreviation. * * PUBLIC: int ex_unabbr __P((SCR *, EXCMD *)); */ int ex_unabbr(SCR *sp, EXCMD *cmdp) { ARGS *ap; ap = cmdp->argv[0]; if (!F_ISSET(sp->gp, G_ABBREV) || seq_delete(sp, ap->bp, ap->len, SEQ_ABBREV)) { msgq_wstr(sp, M_ERR, ap->bp, "109|\"%s\" is not an abbreviation"); return (1); } return (0); } nvi-1.81.6/ex/ex_append.c0100644000076400001440000001643510720065506014206 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_append.c,v 10.34 2001/06/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:14 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" enum which {APPEND, CHANGE, INSERT}; static int ex_aci __P((SCR *, EXCMD *, enum which)); /* * ex_append -- :[line] a[ppend][!] * Append one or more lines of new text after the specified line, * or the current line if no address is specified. * * PUBLIC: int ex_append __P((SCR *, EXCMD *)); */ int ex_append(SCR *sp, EXCMD *cmdp) { return (ex_aci(sp, cmdp, APPEND)); } /* * ex_change -- :[line[,line]] c[hange][!] [count] * Change one or more lines to the input text. * * PUBLIC: int ex_change __P((SCR *, EXCMD *)); */ int ex_change(SCR *sp, EXCMD *cmdp) { return (ex_aci(sp, cmdp, CHANGE)); } /* * ex_insert -- :[line] i[nsert][!] * Insert one or more lines of new text before the specified line, * or the current line if no address is specified. * * PUBLIC: int ex_insert __P((SCR *, EXCMD *)); */ int ex_insert(SCR *sp, EXCMD *cmdp) { return (ex_aci(sp, cmdp, INSERT)); } /* * ex_aci -- * Append, change, insert in ex. */ static int ex_aci(SCR *sp, EXCMD *cmdp, enum which cmd) { CHAR_T *p, *t; GS *gp; TEXT *tp; TEXTH tiq; db_recno_t cnt, lno; size_t len; u_int32_t flags; int need_newline; gp = sp->gp; NEEDFILE(sp, cmdp); /* * If doing a change, replace lines for as long as possible. Then, * append more lines or delete remaining lines. Changes to an empty * file are appends, inserts are the same as appends to the previous * line. * * !!! * Set the address to which we'll append. We set sp->lno to this * address as well so that autoindent works correctly when get text * from the user. */ lno = cmdp->addr1.lno; sp->lno = lno; if ((cmd == CHANGE || cmd == INSERT) && lno != 0) --lno; /* * !!! * If the file isn't empty, cut changes into the unnamed buffer. */ if (cmd == CHANGE && cmdp->addr1.lno != 0 && (cut(sp, NULL, &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE) || del(sp, &cmdp->addr1, &cmdp->addr2, 1))) return (1); /* * !!! * Anything that was left after the command separator becomes part * of the inserted text. Apparently, it was common usage to enter: * * :g/pattern/append|stuff1 * * and append the line of text "stuff1" to the lines containing the * pattern. It was also historically legal to enter: * * :append|stuff1 * stuff2 * . * * and the text on the ex command line would be appended as well as * the text inserted after it. There was an historic bug however, * that the user had to enter *two* terminating lines (the '.' lines) * to terminate text input mode, in this case. This whole thing * could be taken too far, however. Entering: * * :append|stuff1\ * stuff2 * stuff3 * . * * i.e. mixing and matching the forms confused the historic vi, and, * not only did it take two terminating lines to terminate text input * mode, but the trailing backslashes were retained on the input. We * match historic practice except that we discard the backslashes. * * Input lines specified on the ex command line lines are separated by * s. If there is a trailing delimiter an empty line was * inserted. There may also be a leading delimiter, which is ignored * unless it's also a trailing delimiter. It is possible to encounter * a termination line, i.e. a single '.', in a global command, but not * necessary if the text insert command was the last of the global * commands. */ if (cmdp->save_cmdlen != 0) { for (p = cmdp->save_cmd, len = cmdp->save_cmdlen; len > 0; p = t) { for (t = p; len > 0 && t[0] != '\n'; ++t, --len); if (t != p || len == 0) { if (F_ISSET(sp, SC_EX_GLOBAL) && t - p == 1 && p[0] == '.') { ++t; if (len > 0) --len; break; } if (db_append(sp, 1, lno++, p, t - p)) return (1); } if (len != 0) { ++t; if (--len == 0 && db_append(sp, 1, lno++, NULL, 0)) return (1); } } /* * If there's any remaining text, we're in a global, and * there's more command to parse. * * !!! * We depend on the fact that non-global commands will eat the * rest of the command line as text input, and before getting * any text input from the user. Otherwise, we'd have to save * off the command text before or during the call to the text * input function below. */ if (len != 0) cmdp->save_cmd = t; cmdp->save_cmdlen = len; } if (F_ISSET(sp, SC_EX_GLOBAL)) { if ((sp->lno = lno) == 0 && db_exist(sp, 1)) sp->lno = 1; return (0); } /* * If not in a global command, read from the terminal. * * If this code is called by vi, we want to reset the terminal and use * ex's line get routine. It actually works fine if we use vi's get * routine, but it doesn't look as nice. Maybe if we had a separate * window or something, but getting a line at a time looks awkward. * However, depending on the screen that we're using, that may not * be possible. */ if (F_ISSET(sp, SC_VI)) { if (gp->scr_screen(sp, SC_EX)) { ex_wemsg(sp, cmdp->cmd->name, EXM_NOCANON); return (1); } /* If we're still in the vi screen, move out explicitly. */ need_newline = !F_ISSET(sp, SC_SCR_EXWROTE); F_SET(sp, SC_SCR_EX | SC_SCR_EXWROTE); if (need_newline) (void)ex_puts(sp, "\n"); /* * !!! * Users of historical versions of vi sometimes get confused * when they enter append mode, and can't seem to get out of * it. Give them an informational message. */ (void)ex_puts(sp, msg_cat(sp, "273|Entering ex input mode.", NULL)); (void)ex_puts(sp, "\n"); (void)ex_fflush(sp); } /* * Set input flags; the ! flag turns off autoindent for append, * change and insert. */ LF_INIT(TXT_DOTTERM | TXT_NUMBER); if (!FL_ISSET(cmdp->iflags, E_C_FORCE) && O_ISSET(sp, O_AUTOINDENT)) LF_SET(TXT_AUTOINDENT); if (O_ISSET(sp, O_BEAUTIFY)) LF_SET(TXT_BEAUTIFY); /* * This code can't use the common screen TEXTH structure (sp->tiq), * as it may already be in use, e.g. ":append|s/abc/ABC/" would fail * as we are only halfway through the text when the append code fires. * Use a local structure instead. (The ex code would have to use a * local structure except that we're guaranteed to finish remaining * characters in the common TEXTH structure when they were inserted * into the file, above.) */ memset(&tiq, 0, sizeof(TEXTH)); CIRCLEQ_INIT(&tiq); if (ex_txt(sp, &tiq, 0, flags)) return (1); for (cnt = 0, tp = tiq.cqh_first; tp != (TEXT *)&tiq; ++cnt, tp = tp->q.cqe_next) if (db_append(sp, 1, lno++, tp->lb, tp->len)) return (1); /* * Set sp->lno to the final line number value (correcting for a * possible 0 value) as that's historically correct for the final * line value, whether or not the user entered any text. */ if ((sp->lno = lno) == 0 && db_exist(sp, 1)) sp->lno = 1; return (0); } nvi-1.81.6/ex/ex_args.c0100644000076400001440000001641410720065506013670 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_args.c,v 10.18 2001/06/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:14 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" static int ex_N_next __P((SCR *, EXCMD *)); /* * ex_next -- :next [+cmd] [files] * Edit the next file, optionally setting the list of files. * * !!! * The :next command behaved differently from the :rewind command in * historic vi. See nvi/docs/autowrite for details, but the basic * idea was that it ignored the force flag if the autowrite flag was * set. This implementation handles them all identically. * * PUBLIC: int ex_next __P((SCR *, EXCMD *)); */ int ex_next(SCR *sp, EXCMD *cmdp) { ARGS **argv; FREF *frp; int noargs; char **ap; CHAR_T *wp; size_t wlen; char *np; size_t nlen; /* Check for file to move to. */ if (cmdp->argc == 0 && (sp->cargv == NULL || sp->cargv[1] == NULL)) { msgq(sp, M_ERR, "111|No more files to edit"); return (1); } if (F_ISSET(cmdp, E_NEWSCREEN)) { /* By default, edit the next file in the old argument list. */ if (cmdp->argc == 0) { CHAR2INT(sp, sp->cargv[1], strlen(sp->cargv[1]) + 1, wp, wlen); if (argv_exp0(sp, cmdp, wp, wlen - 1)) return (1); return (ex_edit(sp, cmdp)); } return (ex_N_next(sp, cmdp)); } /* Check modification. */ if (file_m1(sp, FL_ISSET(cmdp->iflags, E_C_FORCE), FS_ALL | FS_POSSIBLE)) return (1); /* Any arguments are a replacement file list. */ if (cmdp->argc) { /* Free the current list. */ if (!F_ISSET(sp, SC_ARGNOFREE) && sp->argv != NULL) { for (ap = sp->argv; *ap != NULL; ++ap) free(*ap); free(sp->argv); } F_CLR(sp, SC_ARGNOFREE | SC_ARGRECOVER); sp->cargv = NULL; /* Create a new list. */ CALLOC_RET(sp, sp->argv, char **, cmdp->argc + 1, sizeof(char *)); for (ap = sp->argv, argv = cmdp->argv; argv[0]->len != 0; ++ap, ++argv) { INT2CHAR(sp, argv[0]->bp, argv[0]->len, np, nlen); if ((*ap = v_strdup(sp, np, nlen)) == NULL) return (1); } *ap = NULL; /* Switch to the first file. */ sp->cargv = sp->argv; if ((frp = file_add(sp, *sp->cargv)) == NULL) return (1); noargs = 0; /* Display a file count with the welcome message. */ F_SET(sp, SC_STATUS_CNT); } else { if ((frp = file_add(sp, sp->cargv[1])) == NULL) return (1); if (F_ISSET(sp, SC_ARGRECOVER)) F_SET(frp, FR_RECOVER); noargs = 1; } if (file_init(sp, frp, NULL, FS_SETALT | (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) return (1); if (noargs) ++sp->cargv; F_SET(sp, SC_FSWITCH); return (0); } /* * ex_N_next -- * New screen version of ex_next. */ static int ex_N_next(SCR *sp, EXCMD *cmdp) { SCR *new; FREF *frp; char *np; size_t nlen; /* Get a new screen. */ if (screen_init(sp->gp, sp, &new)) return (1); if (vs_split(sp, new, 0)) { (void)screen_end(new); return (1); } /* Get a backing file. */ INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, np, nlen); if ((frp = file_add(new, np)) == NULL || file_init(new, frp, NULL, (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) { (void)vs_discard(new, NULL); (void)screen_end(new); return (1); } /* The arguments are a replacement file list. */ new->cargv = new->argv = ex_buildargv(sp, cmdp, NULL); /* Display a file count with the welcome message. */ F_SET(new, SC_STATUS_CNT); /* Set up the switch. */ sp->nextdisp = new; F_SET(sp, SC_SSWITCH); return (0); } /* * ex_prev -- :prev * Edit the previous file. * * PUBLIC: int ex_prev __P((SCR *, EXCMD *)); */ int ex_prev(SCR *sp, EXCMD *cmdp) { FREF *frp; size_t wlen; CHAR_T *wp; if (sp->cargv == sp->argv) { msgq(sp, M_ERR, "112|No previous files to edit"); return (1); } if (F_ISSET(cmdp, E_NEWSCREEN)) { CHAR2INT(sp, sp->cargv[-1], strlen(sp->cargv[-1]) + 1, wp, wlen); if (argv_exp0(sp, cmdp, wp, wlen - 1)) return (1); return (ex_edit(sp, cmdp)); } if (file_m1(sp, FL_ISSET(cmdp->iflags, E_C_FORCE), FS_ALL | FS_POSSIBLE)) return (1); if ((frp = file_add(sp, sp->cargv[-1])) == NULL) return (1); if (file_init(sp, frp, NULL, FS_SETALT | (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) return (1); --sp->cargv; F_SET(sp, SC_FSWITCH); return (0); } /* * ex_rew -- :rew * Re-edit the list of files. * * !!! * Historic practice was that all files would start editing at the beginning * of the file. We don't get this right because we may have multiple screens * and we can't clear the FR_CURSORSET bit for a single screen. I don't see * anyone noticing, but if they do, we'll have to put information into the SCR * structure so we can keep track of it. * * PUBLIC: int ex_rew __P((SCR *, EXCMD *)); */ int ex_rew(SCR *sp, EXCMD *cmdp) { FREF *frp; /* * !!! * Historic practice -- you can rewind to the current file. */ if (sp->argv == NULL) { msgq(sp, M_ERR, "113|No previous files to rewind"); return (1); } if (file_m1(sp, FL_ISSET(cmdp->iflags, E_C_FORCE), FS_ALL | FS_POSSIBLE)) return (1); /* Switch to the first one. */ sp->cargv = sp->argv; if ((frp = file_add(sp, *sp->cargv)) == NULL) return (1); if (file_init(sp, frp, NULL, FS_SETALT | (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) return (1); /* Switch and display a file count with the welcome message. */ F_SET(sp, SC_FSWITCH | SC_STATUS_CNT); return (0); } /* * ex_args -- :args * Display the list of files. * * PUBLIC: int ex_args __P((SCR *, EXCMD *)); */ int ex_args(SCR *sp, EXCMD *cmdp) { GS *gp; int cnt, col, len, sep; char **ap; if (sp->argv == NULL) { (void)msgq(sp, M_ERR, "114|No file list to display"); return (0); } gp = sp->gp; col = len = sep = 0; for (cnt = 1, ap = sp->argv; *ap != NULL; ++ap) { col += len = strlen(*ap) + sep + (ap == sp->cargv ? 2 : 0); if (col >= sp->cols - 1) { col = len; sep = 0; (void)ex_puts(sp, "\n"); } else if (cnt != 1) { sep = 1; (void)ex_puts(sp, " "); } ++cnt; (void)ex_printf(sp, "%s%s%s", ap == sp->cargv ? "[" : "", *ap, ap == sp->cargv ? "]" : ""); if (INTERRUPTED(sp)) break; } (void)ex_puts(sp, "\n"); return (0); } /* * ex_buildargv -- * Build a new file argument list. * * PUBLIC: char **ex_buildargv __P((SCR *, EXCMD *, char *)); */ char ** ex_buildargv(SCR *sp, EXCMD *cmdp, char *name) { ARGS **argv; int argc; char **ap, **s_argv; char *np; size_t nlen; argc = cmdp == NULL ? 1 : cmdp->argc; CALLOC(sp, s_argv, char **, argc + 1, sizeof(char *)); if ((ap = s_argv) == NULL) return (NULL); if (cmdp == NULL) { if ((*ap = v_strdup(sp, name, strlen(name))) == NULL) return (NULL); ++ap; } else for (argv = cmdp->argv; argv[0]->len != 0; ++ap, ++argv) { INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len, np, nlen); if ((*ap = v_strdup(sp, np, nlen)) == NULL) return (NULL); } *ap = NULL; return (s_argv); } nvi-1.81.6/ex/ex_argv.c0100644000076400001440000004210010720065506013662 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_argv.c,v 10.39 2003/11/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:11:54 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" static int argv_alloc __P((SCR *, size_t)); static int argv_comp __P((const void *, const void *)); static int argv_fexp __P((SCR *, EXCMD *, CHAR_T *, size_t, CHAR_T *, size_t *, CHAR_T **, size_t *, int)); static int argv_lexp __P((SCR *, EXCMD *, char *)); static int argv_sexp __P((SCR *, CHAR_T **, size_t *, size_t *)); /* * argv_init -- * Build a prototype arguments list. * * PUBLIC: int argv_init __P((SCR *, EXCMD *)); */ int argv_init(SCR *sp, EXCMD *excp) { EX_PRIVATE *exp; exp = EXP(sp); exp->argsoff = 0; argv_alloc(sp, 1); excp->argv = exp->args; excp->argc = exp->argsoff; return (0); } /* * argv_exp0 -- * Append a string to the argument list. * * PUBLIC: int argv_exp0 __P((SCR *, EXCMD *, CHAR_T *, size_t)); */ int argv_exp0(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen) { EX_PRIVATE *exp; exp = EXP(sp); argv_alloc(sp, cmdlen); MEMCPY(exp->args[exp->argsoff]->bp, cmd, cmdlen); exp->args[exp->argsoff]->bp[cmdlen] = '\0'; exp->args[exp->argsoff]->len = cmdlen; ++exp->argsoff; excp->argv = exp->args; excp->argc = exp->argsoff; return (0); } /* * argv_exp1 -- * Do file name expansion on a string, and append it to the * argument list. * * PUBLIC: int argv_exp1 __P((SCR *, EXCMD *, CHAR_T *, size_t, int)); */ int argv_exp1(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen, int is_bang) { EX_PRIVATE *exp; size_t blen, len; CHAR_T *p, *t, *bp; size_t wlen; CHAR_T *wp; GET_SPACE_RETW(sp, bp, blen, 512); len = 0; exp = EXP(sp); if (argv_fexp(sp, excp, cmd, cmdlen, bp, &len, &bp, &blen, is_bang)) { FREE_SPACEW(sp, bp, blen); return (1); } /* If it's empty, we're done. */ if (len != 0) { for (p = bp, t = bp + len; p < t; ++p) if (!isblank(*p)) break; if (p == t) goto ret; } else goto ret; (void)argv_exp0(sp, excp, bp, len); ret: FREE_SPACEW(sp, bp, blen); return (0); } /* * argv_exp2 -- * Do file name and shell expansion on a string, and append it to * the argument list. * * PUBLIC: int argv_exp2 __P((SCR *, EXCMD *, CHAR_T *, size_t)); */ int argv_exp2(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen) { size_t blen, len, n; int rval; CHAR_T *bp, *p; char *mp, *np; GET_SPACE_RETW(sp, bp, blen, 512); #define SHELLECHO "echo " #define SHELLOFFSET (sizeof(SHELLECHO) - 1) p = bp; *p++ = 'e'; *p++ = 'c'; *p++ = 'h'; *p++ = 'o'; *p++ = ' '; len = SHELLOFFSET; #if defined(DEBUG) && 0 vtrace(sp, "file_argv: {%.*s}\n", (int)cmdlen, cmd); #endif if (argv_fexp(sp, excp, cmd, cmdlen, p, &len, &bp, &blen, 0)) { rval = 1; goto err; } #if defined(DEBUG) && 0 vtrace(sp, "before shell: %d: {%s}\n", len, bp); #endif /* * Do shell word expansion -- it's very, very hard to figure out what * magic characters the user's shell expects. Historically, it was a * union of v7 shell and csh meta characters. We match that practice * by default, so ":read \%" tries to read a file named '%'. It would * make more sense to pass any special characters through the shell, * but then, if your shell was csh, the above example will behave * differently in nvi than in vi. If you want to get other characters * passed through to your shell, change the "meta" option. * * To avoid a function call per character, we do a first pass through * the meta characters looking for characters that aren't expected * to be there, and then we can ignore them in the user's argument. */ if (opts_empty(sp, O_SHELL, 1) || opts_empty(sp, O_SHELLMETA, 1)) n = 0; else { for (np = mp = O_STR(sp, O_SHELLMETA); *np != '\0'; ++np) if (isblank(*np) || isalnum(*np)) break; p = bp + SHELLOFFSET; n = len - SHELLOFFSET; if (*p != '\0') { for (; n > 0; --n, ++p) if (strchr(mp, *p) != NULL) break; } else for (; n > 0; --n, ++p) if (!isblank(*p) && !isalnum(*p) && strchr(mp, *p) != NULL) break; } /* * If we found a meta character in the string, fork a shell to expand * it. Unfortunately, this is comparatively slow. Historically, it * didn't matter much, since users don't enter meta characters as part * of pathnames that frequently. The addition of filename completion * broke that assumption because it's easy to use. As a result, lots * folks have complained that the expansion code is too slow. So, we * detect filename completion as a special case, and do it internally. * Note that this code assumes that the character is the * match-anything meta character. That feels safe -- if anyone writes * a shell that doesn't follow that convention, I'd suggest giving them * a festive hot-lead enema. */ switch (n) { case 0: p = bp + SHELLOFFSET; len -= SHELLOFFSET; rval = argv_exp3(sp, excp, p, len); break; case 1: if (*p == '*') { char *np, *d; size_t nlen; *p = '\0'; INT2CHAR(sp, bp + SHELLOFFSET, STRLEN(bp + SHELLOFFSET) + 1, np, nlen); d = strdup(np); rval = argv_lexp(sp, excp, d); free (d); break; } /* FALLTHROUGH */ default: if (argv_sexp(sp, &bp, &blen, &len)) { rval = 1; goto err; } p = bp; rval = argv_exp3(sp, excp, p, len); break; } err: FREE_SPACEW(sp, bp, blen); return (rval); } /* * argv_exp3 -- * Take a string and break it up into an argv, which is appended * to the argument list. * * PUBLIC: int argv_exp3 __P((SCR *, EXCMD *, CHAR_T *, size_t)); */ int argv_exp3(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen) { EX_PRIVATE *exp; size_t len; int ch, off; CHAR_T *ap, *p; for (exp = EXP(sp); cmdlen > 0; ++exp->argsoff) { /* Skip any leading whitespace. */ for (; cmdlen > 0; --cmdlen, ++cmd) { ch = *cmd; if (!isblank(ch)) break; } if (cmdlen == 0) break; /* * Determine the length of this whitespace delimited * argument. * * QUOTING NOTE: * * Skip any character preceded by the user's quoting * character. */ for (ap = cmd, len = 0; cmdlen > 0; ++cmd, --cmdlen, ++len) { ch = *cmd; if (IS_ESCAPE(sp, excp, ch) && cmdlen > 1) { ++cmd; --cmdlen; } else if (isblank(ch)) break; } /* * Copy the argument into place. * * QUOTING NOTE: * * Lose quote chars. */ argv_alloc(sp, len); off = exp->argsoff; exp->args[off]->len = len; for (p = exp->args[off]->bp; len > 0; --len, *p++ = *ap++) if (IS_ESCAPE(sp, excp, *ap)) ++ap; *p = '\0'; } excp->argv = exp->args; excp->argc = exp->argsoff; #if defined(DEBUG) && 0 for (cnt = 0; cnt < exp->argsoff; ++cnt) vtrace(sp, "arg %d: {%s}\n", cnt, exp->argv[cnt]); #endif return (0); } /* * argv_fexp -- * Do file name and bang command expansion. */ static int argv_fexp(SCR *sp, EXCMD *excp, CHAR_T *cmd, size_t cmdlen, CHAR_T *p, size_t *lenp, CHAR_T **bpp, size_t *blenp, int is_bang) { EX_PRIVATE *exp; char *t; size_t blen, len, off, tlen; CHAR_T *bp; CHAR_T *wp; size_t wlen; /* Replace file name characters. */ for (bp = *bpp, blen = *blenp, len = *lenp; cmdlen > 0; --cmdlen, ++cmd) switch (*cmd) { case '!': if (!is_bang) goto ins_ch; exp = EXP(sp); if (exp->lastbcomm == NULL) { msgq(sp, M_ERR, "115|No previous command to replace \"!\""); return (1); } len += tlen = STRLEN(exp->lastbcomm); off = p - bp; ADD_SPACE_RETW(sp, bp, blen, len); p = bp + off; MEMCPY(p, exp->lastbcomm, tlen); p += tlen; F_SET(excp, E_MODIFY); break; case '%': if ((t = sp->frp->name) == NULL) { msgq(sp, M_ERR, "116|No filename to substitute for %%"); return (1); } tlen = strlen(t); len += tlen; off = p - bp; ADD_SPACE_RETW(sp, bp, blen, len); p = bp + off; CHAR2INT(sp, t, tlen, wp, wlen); MEMCPY(p, wp, wlen); p += wlen; F_SET(excp, E_MODIFY); break; case '#': if ((t = sp->alt_name) == NULL) { msgq(sp, M_ERR, "117|No filename to substitute for #"); return (1); } len += tlen = strlen(t); off = p - bp; ADD_SPACE_RETW(sp, bp, blen, len); p = bp + off; CHAR2INT(sp, t, tlen, wp, wlen); MEMCPY(p, wp, wlen); p += tlen; F_SET(excp, E_MODIFY); break; case '\\': /* * QUOTING NOTE: * * Strip any backslashes that protected the file * expansion characters. */ if (cmdlen > 1 && (cmd[1] == '%' || cmd[1] == '#' || cmd[1] == '!')) { ++cmd; --cmdlen; } /* FALLTHROUGH */ default: ins_ch: ++len; off = p - bp; ADD_SPACE_RETW(sp, bp, blen, len); p = bp + off; *p++ = *cmd; } /* Nul termination. */ ++len; off = p - bp; ADD_SPACE_RETW(sp, bp, blen, len); p = bp + off; *p = '\0'; /* Return the new string length, buffer, buffer length. */ *lenp = len - 1; *bpp = bp; *blenp = blen; return (0); } /* * argv_alloc -- * Make more space for arguments. */ static int argv_alloc(SCR *sp, size_t len) { ARGS *ap; EX_PRIVATE *exp; int cnt, off; /* * Allocate room for another argument, always leaving * enough room for an ARGS structure with a length of 0. */ #define INCREMENT 20 exp = EXP(sp); off = exp->argsoff; if (exp->argscnt == 0 || off + 2 >= exp->argscnt - 1) { cnt = exp->argscnt + INCREMENT; REALLOC(sp, exp->args, ARGS **, cnt * sizeof(ARGS *)); if (exp->args == NULL) { (void)argv_free(sp); goto mem; } memset(&exp->args[exp->argscnt], 0, INCREMENT * sizeof(ARGS *)); exp->argscnt = cnt; } /* First argument. */ if (exp->args[off] == NULL) { CALLOC(sp, exp->args[off], ARGS *, 1, sizeof(ARGS)); if (exp->args[off] == NULL) goto mem; } /* First argument buffer. */ ap = exp->args[off]; ap->len = 0; if (ap->blen < len + 1) { ap->blen = len + 1; REALLOC(sp, ap->bp, CHAR_T *, ap->blen * sizeof(CHAR_T)); if (ap->bp == NULL) { ap->bp = NULL; ap->blen = 0; F_CLR(ap, A_ALLOCATED); mem: msgq(sp, M_SYSERR, NULL); return (1); } F_SET(ap, A_ALLOCATED); } /* Second argument. */ if (exp->args[++off] == NULL) { CALLOC(sp, exp->args[off], ARGS *, 1, sizeof(ARGS)); if (exp->args[off] == NULL) goto mem; } /* 0 length serves as end-of-argument marker. */ exp->args[off]->len = 0; return (0); } /* * argv_free -- * Free up argument structures. * * PUBLIC: int argv_free __P((SCR *)); */ int argv_free(SCR *sp) { EX_PRIVATE *exp; int off; exp = EXP(sp); if (exp->args != NULL) { for (off = 0; off < exp->argscnt; ++off) { if (exp->args[off] == NULL) continue; if (F_ISSET(exp->args[off], A_ALLOCATED)) free(exp->args[off]->bp); free(exp->args[off]); } free(exp->args); } exp->args = NULL; exp->argscnt = 0; exp->argsoff = 0; return (0); } /* * argv_lexp -- * Find all file names matching the prefix and append them to the * buffer. */ static int argv_lexp(SCR *sp, EXCMD *excp, char *path) { struct dirent *dp; DIR *dirp; EX_PRIVATE *exp; int off; size_t dlen, len, nlen; char *dname, *name; char *p; size_t wlen; CHAR_T *wp; CHAR_T *n; exp = EXP(sp); /* Set up the name and length for comparison. */ if ((p = strrchr(path, '/')) == NULL) { dname = "."; dlen = 0; name = path; } else { if (p == path) { dname = "/"; dlen = 1; } else { *p = '\0'; dname = path; dlen = strlen(path); } name = p + 1; } nlen = strlen(name); /* * XXX * We don't use the d_namlen field, it's not portable enough; we * assume that d_name is nul terminated, instead. */ if ((dirp = opendir(dname)) == NULL) { msgq_str(sp, M_SYSERR, dname, "%s"); return (1); } for (off = exp->argsoff; (dp = readdir(dirp)) != NULL;) { if (nlen == 0) { if (dp->d_name[0] == '.') continue; len = strlen(dp->d_name); } else { len = strlen(dp->d_name); if (len < nlen || memcmp(dp->d_name, name, nlen)) continue; } /* Directory + name + slash + null. */ argv_alloc(sp, dlen + len + 2); n = exp->args[exp->argsoff]->bp; if (dlen != 0) { CHAR2INT(sp, dname, dlen, wp, wlen); MEMCPY(n, wp, wlen); n += dlen; if (dlen > 1 || dname[0] != '/') *n++ = '/'; } CHAR2INT(sp, dp->d_name, len + 1, wp, wlen); MEMCPY(n, wp, wlen); exp->args[exp->argsoff]->len = dlen + len + 1; ++exp->argsoff; excp->argv = exp->args; excp->argc = exp->argsoff; } closedir(dirp); if (off == exp->argsoff) { /* * If we didn't find a match, complain that the expansion * failed. We can't know for certain that's the error, but * it's a good guess, and it matches historic practice. */ msgq(sp, M_ERR, "304|Shell expansion failed"); return (1); } qsort(exp->args + off, exp->argsoff - off, sizeof(ARGS *), argv_comp); return (0); } /* * argv_comp -- * Alphabetic comparison. */ static int argv_comp(const void *a, const void *b) { return (STRCMP((*(ARGS **)a)->bp, (*(ARGS **)b)->bp)); } /* * argv_sexp -- * Fork a shell, pipe a command through it, and read the output into * a buffer. */ static int argv_sexp(SCR *sp, CHAR_T **bpp, size_t *blenp, size_t *lenp) { enum { SEXP_ERR, SEXP_EXPANSION_ERR, SEXP_OK } rval; FILE *ifp; pid_t pid; size_t blen, len; int ch, std_output[2]; CHAR_T *bp, *p; char *sh, *sh_path; char *np; size_t nlen; /* Secure means no shell access. */ if (O_ISSET(sp, O_SECURE)) { msgq(sp, M_ERR, "289|Shell expansions not supported when the secure edit option is set"); return (1); } sh_path = O_STR(sp, O_SHELL); if ((sh = strrchr(sh_path, '/')) == NULL) sh = sh_path; else ++sh; /* Local copies of the buffer variables. */ bp = *bpp; blen = *blenp; /* * There are two different processes running through this code, named * the utility (the shell) and the parent. The utility reads standard * input and writes standard output and standard error output. The * parent writes to the utility, reads its standard output and ignores * its standard error output. Historically, the standard error output * was discarded by vi, as it produces a lot of noise when file patterns * don't match. * * The parent reads std_output[0], and the utility writes std_output[1]. */ ifp = NULL; std_output[0] = std_output[1] = -1; if (pipe(std_output) < 0) { msgq(sp, M_SYSERR, "pipe"); return (1); } if ((ifp = fdopen(std_output[0], "r")) == NULL) { msgq(sp, M_SYSERR, "fdopen"); goto err; } /* * Do the minimal amount of work possible, the shell is going to run * briefly and then exit. We sincerely hope. */ switch (pid = vfork()) { case -1: /* Error. */ msgq(sp, M_SYSERR, "vfork"); err: if (ifp != NULL) (void)fclose(ifp); else if (std_output[0] != -1) close(std_output[0]); if (std_output[1] != -1) close(std_output[0]); return (1); case 0: /* Utility. */ /* Redirect stdout to the write end of the pipe. */ (void)dup2(std_output[1], STDOUT_FILENO); /* Close the utility's file descriptors. */ (void)close(std_output[0]); (void)close(std_output[1]); (void)close(STDERR_FILENO); /* * XXX * Assume that all shells have -c. */ INT2CHAR(sp, bp, STRLEN(bp)+1, np, nlen); execl(sh_path, sh, "-c", np, (char *)NULL); msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s"); _exit(127); default: /* Parent. */ /* Close the pipe ends the parent won't use. */ (void)close(std_output[1]); break; } /* * Copy process standard output into a buffer. * * !!! * Historic vi apparently discarded leading \n and \r's from * the shell output stream. We don't on the grounds that any * shell that does that is broken. */ for (p = bp, len = 0, ch = EOF; (ch = getc(ifp)) != EOF; *p++ = ch, blen-=sizeof(CHAR_T), ++len) if (blen < 5) { ADD_SPACE_GOTOW(sp, bp, *blenp, *blenp * 2); p = bp + len; blen = *blenp - len; } /* Delete the final newline, nul terminate the string. */ if (p > bp && (p[-1] == '\n' || p[-1] == '\r')) { --p; --len; } *p = '\0'; *lenp = len; *bpp = bp; /* *blenp is already updated. */ if (ferror(ifp)) goto ioerr; if (fclose(ifp)) { ioerr: msgq_str(sp, M_ERR, sh, "119|I/O error: %s"); alloc_err: rval = SEXP_ERR; } else rval = SEXP_OK; /* * Wait for the process. If the shell process fails (e.g., "echo $q" * where q wasn't a defined variable) or if the returned string has * no characters or only blank characters, (e.g., "echo $5"), complain * that the shell expansion failed. We can't know for certain that's * the error, but it's a good guess, and it matches historic practice. * This won't catch "echo foo_$5", but that's not a common error and * historic vi didn't catch it either. */ if (proc_wait(sp, (long)pid, sh, 1, 0)) rval = SEXP_EXPANSION_ERR; for (p = bp; len; ++p, --len) if (!isblank(*p)) break; if (len == 0) rval = SEXP_EXPANSION_ERR; if (rval == SEXP_EXPANSION_ERR) msgq(sp, M_ERR, "304|Shell expansion failed"); return (rval == SEXP_OK ? 0 : 1); } nvi-1.81.6/ex/ex_at.c0100644000076400001440000000661110720065506013336 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_at.c,v 10.16 2001/06/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:14 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_at -- :@[@ | buffer] * :*[* | buffer] * * Execute the contents of the buffer. * * PUBLIC: int ex_at __P((SCR *, EXCMD *)); */ int ex_at(SCR *sp, EXCMD *cmdp) { CB *cbp; CHAR_T name; EXCMD *ecp; RANGE *rp; TEXT *tp; size_t len; CHAR_T *p; /* * !!! * Historically, [@*] and [@*][@*] executed the most * recently executed buffer in ex mode. */ name = FL_ISSET(cmdp->iflags, E_C_BUFFER) ? cmdp->buffer : '@'; if (name == '@' || name == '*') { if (!F_ISSET(sp, SC_AT_SET)) { ex_emsg(sp, NULL, EXM_NOPREVBUF); return (1); } name = sp->at_lbuf; } sp->at_lbuf = name; F_SET(sp, SC_AT_SET); CBNAME(sp, cbp, name); if (cbp == NULL) { ex_emsg(sp, KEY_NAME(sp, name), EXM_EMPTYBUF); return (1); } /* * !!! * Historically the @ command took a range of lines, and the @ buffer * was executed once per line. The historic vi could be trashed by * this because it didn't notice if the underlying file changed, or, * for that matter, if there were no more lines on which to operate. * For example, take a 10 line file, load "%delete" into a buffer, * and enter :8,10@. * * The solution is a bit tricky. If the user specifies a range, take * the same approach as for global commands, and discard the command * if exit or switch to a new file/screen. If the user doesn't specify * the range, continue to execute after a file/screen switch, which * means @ buffers are still useful in a multi-screen environment. */ CALLOC_RET(sp, ecp, EXCMD *, 1, sizeof(EXCMD)); CIRCLEQ_INIT(&ecp->rq); CALLOC_RET(sp, rp, RANGE *, 1, sizeof(RANGE)); rp->start = cmdp->addr1.lno; if (F_ISSET(cmdp, E_ADDR_DEF)) { rp->stop = rp->start; FL_SET(ecp->agv_flags, AGV_AT_NORANGE); } else { rp->stop = cmdp->addr2.lno; FL_SET(ecp->agv_flags, AGV_AT); } CIRCLEQ_INSERT_HEAD(&ecp->rq, rp, q); /* * Buffers executed in ex mode or from the colon command line in vi * were ex commands. We can't push it on the terminal queue, since * it has to be executed immediately, and we may be in the middle of * an ex command already. Push the command on the ex command stack. * Build two copies of the command. We need two copies because the * ex parser may step on the command string when it's parsing it. */ for (len = 0, tp = cbp->textq.cqh_last; tp != (void *)&cbp->textq; tp = tp->q.cqe_prev) len += tp->len + 1; MALLOC_RET(sp, ecp->cp, CHAR_T *, len * 2 * sizeof(CHAR_T)); ecp->o_cp = ecp->cp; ecp->o_clen = len; ecp->cp[len] = '\0'; /* Copy the buffer into the command space. */ for (p = ecp->cp + len, tp = cbp->textq.cqh_last; tp != (void *)&cbp->textq; tp = tp->q.cqe_prev) { MEMCPYW(p, tp->lb, tp->len); p += tp->len; *p++ = '\n'; } LIST_INSERT_HEAD(&sp->wp->ecq, ecp, q); return (0); } nvi-1.81.6/ex/ex_bang.c0100644000076400001440000001254510720065506013644 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_bang.c,v 10.36 2001/06/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:14 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_bang -- :[line [,line]] ! command * * Pass the rest of the line after the ! character to the program named by * the O_SHELL option. * * Historical vi did NOT do shell expansion on the arguments before passing * them, only file name expansion. This means that the O_SHELL program got * "$t" as an argument if that is what the user entered. Also, there's a * special expansion done for the bang command. Any exclamation points in * the user's argument are replaced by the last, expanded ! command. * * There's some fairly amazing slop in this routine to make the different * ways of getting here display the right things. It took a long time to * get it right (wrong?), so be careful. * * PUBLIC: int ex_bang __P((SCR *, EXCMD *)); */ int ex_bang(SCR *sp, EXCMD *cmdp) { enum filtertype ftype; ARGS *ap; EX_PRIVATE *exp; MARK rm; db_recno_t lno; int rval; const char *msg; char *np; size_t nlen; ap = cmdp->argv[0]; if (ap->len == 0) { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } /* Set the "last bang command" remembered value. */ exp = EXP(sp); if (exp->lastbcomm != NULL) free(exp->lastbcomm); if ((exp->lastbcomm = v_wstrdup(sp, ap->bp, ap->len)) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } /* * If the command was modified by the expansion, it was historically * redisplayed. */ if (F_ISSET(cmdp, E_MODIFY) && !F_ISSET(sp, SC_EX_SILENT)) { /* * Display the command if modified. Historic ex/vi displayed * the command if it was modified due to file name and/or bang * expansion. If piping lines in vi, it would be immediately * overwritten by any error or line change reporting. */ if (F_ISSET(sp, SC_VI)) vs_update(sp, "!", ap->bp); else { (void)ex_printf(sp, "!%s\n", ap->bp); (void)ex_fflush(sp); } } /* * If no addresses were specified, run the command. If there's an * underlying file, it's been modified and autowrite is set, write * the file back. If the file has been modified, autowrite is not * set and the warn option is set, tell the user about the file. */ if (cmdp->addrcnt == 0) { msg = NULL; if (sp->ep != NULL && F_ISSET(sp->ep, F_MODIFIED)) if (O_ISSET(sp, O_AUTOWRITE)) { if (file_aw(sp, FS_ALL)) return (0); } else if (O_ISSET(sp, O_WARN) && !F_ISSET(sp, SC_EX_SILENT)) msg = msg_cat(sp, "303|File modified since last write.", NULL); /* If we're still in a vi screen, move out explicitly. */ INT2CHAR(sp, ap->bp, ap->len+1, np, nlen); (void)ex_exec_proc(sp, cmdp, np, msg, !F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)); } /* * If addresses were specified, pipe lines from the file through the * command. * * Historically, vi lines were replaced by both the stdout and stderr * lines of the command, but ex lines by only the stdout lines. This * makes no sense to me, so nvi makes it consistent for both, and * matches vi's historic behavior. */ else { NEEDFILE(sp, cmdp); /* Autoprint is set historically, even if the command fails. */ F_SET(cmdp, E_AUTOPRINT); /* * !!! * Historical vi permitted "!!" in an empty file. When this * happens, we arrive here with two addresses of 1,1 and a * bad attitude. The simple solution is to turn it into a * FILTER_READ operation, with the exception that stdin isn't * opened for the utility, and the cursor position isn't the * same. The only historic glitch (I think) is that we don't * put an empty line into the default cut buffer, as historic * vi did. Imagine, if you can, my disappointment. */ ftype = FILTER_BANG; if (cmdp->addr1.lno == 1 && cmdp->addr2.lno == 1) { if (db_last(sp, &lno)) return (1); if (lno == 0) { cmdp->addr1.lno = cmdp->addr2.lno = 0; ftype = FILTER_RBANG; } } rval = ex_filter(sp, cmdp, &cmdp->addr1, &cmdp->addr2, &rm, ap->bp, ftype); /* * If in vi mode, move to the first nonblank. * * !!! * Historic vi wasn't consistent in this area -- if you used * a forward motion it moved to the first nonblank, but if you * did a backward motion it didn't. And, if you followed a * backward motion with a forward motion, it wouldn't move to * the nonblank for either. Going to the nonblank generally * seems more useful and consistent, so we do it. */ sp->lno = rm.lno; if (F_ISSET(sp, SC_VI)) { sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } else sp->cno = rm.cno; } /* Ex terminates with a bang, even if the command fails. */ if (!F_ISSET(sp, SC_VI) && !F_ISSET(sp, SC_EX_SILENT)) (void)ex_puts(sp, "!\n"); /* * XXX * The ! commands never return an error, so that autoprint always * happens in the ex parser. */ return (0); } nvi-1.81.6/ex/ex_cd.c0100644000076400001440000000630110720065506013314 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_cd.c,v 10.12 2001/06/25 15:19:14 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:14 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_cd -- :cd[!] [directory] * Change directories. * * PUBLIC: int ex_cd __P((SCR *, EXCMD *)); */ int ex_cd(SCR *sp, EXCMD *cmdp) { struct passwd *pw; ARGS *ap; CHAR_T savech; char *dir, *p, *t; /* XXX: END OF THE STACK, DON'T TRUST GETCWD. */ char buf[MAXPATHLEN * 2]; size_t dlen; /* * !!! * Historic practice is that the cd isn't attempted if the file has * been modified, unless its name begins with a leading '/' or the * force flag is set. */ if (F_ISSET(sp->ep, F_MODIFIED) && !FL_ISSET(cmdp->iflags, E_C_FORCE) && sp->frp->name[0] != '/') { msgq(sp, M_ERR, "120|File modified since last complete write; write or use ! to override"); return (1); } switch (cmdp->argc) { case 0: /* If no argument, change to the user's home directory. */ if ((dir = getenv("HOME")) == NULL) { if ((pw = getpwuid(getuid())) == NULL || pw->pw_dir == NULL || pw->pw_dir[0] == '\0') { msgq(sp, M_ERR, "121|Unable to find home directory location"); return (1); } dir = pw->pw_dir; } break; case 1: INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, dir, dlen); break; default: abort(); } /* * Try the current directory first. If this succeeds, don't display * a message, vi didn't historically, and it should be obvious to the * user where they are. */ if (!chdir(dir)) return (0); /* * If moving to the user's home directory, or, the path begins with * "/", "./" or "../", it's the only place we try. */ if (cmdp->argc == 0 || (ap = cmdp->argv[0])->bp[0] == '/' || ap->len == 1 && ap->bp[0] == '.' || ap->len >= 2 && ap->bp[0] == '.' && ap->bp[1] == '.' && (ap->bp[2] == '/' || ap->bp[2] == '\0')) goto err; /* Try the O_CDPATH option values. */ for (p = t = O_STR(sp, O_CDPATH);; ++p) if (*p == '\0' || *p == ':') { /* * Empty strings specify ".". The only way to get an * empty string is a leading colon, colons in a row, * or a trailing colon. Or, to put it the other way, * if the length is 1 or less, then we're dealing with * ":XXX", "XXX::XXXX" , "XXX:", or "". Since we've * already tried dot, we ignore tham all. */ if (t < p - 1) { savech = *p; *p = '\0'; (void)snprintf(buf, sizeof(buf), "%s/%s", t, dir); *p = savech; if (!chdir(buf)) { if (getcwd(buf, sizeof(buf)) != NULL) msgq_str(sp, M_INFO, buf, "122|New current directory: %s"); return (0); } } t = p + 1; if (*p == '\0') break; } err: msgq_str(sp, M_SYSERR, dir, "%s"); return (1); } nvi-1.81.6/ex/ex_cmd.c0100644000076400001440000003055610720065506013502 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_cmd.c,v 10.25 2001/06/10 10:23:44 skimo Exp $ (Berkeley) $Date: 2001/06/10 10:23:44 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * This array maps ex command names to command functions. * * The order in which command names are listed below is important -- * ambiguous abbreviations are resolved to be the first possible match, * e.g. "r" means "read", not "rewind", because "read" is listed before * "rewind". * * The syntax of the ex commands is unbelievably irregular, and a special * case from beginning to end. Each command has an associated "syntax * script" which describes the "arguments" that are possible. The script * syntax is as follows: * * ! -- ! flag * 1 -- flags: [+-]*[pl#][+-]* * 2 -- flags: [-.+^] * 3 -- flags: [-.+^=] * b -- buffer * c[01+a] -- count (0-N, 1-N, signed 1-N, address offset) * f[N#][or] -- file (a number or N, optional or required) * l -- line * S -- string with file name expansion * s -- string * W -- word string * w[N#][or] -- word (a number or N, optional or required) */ EXCMDLIST const cmds[] = { /* C_SCROLL */ {L("\004"), ex_pr, E_ADDR2, "", "^D", "scroll lines"}, /* C_BANG */ {L("!"), ex_bang, E_ADDR2_NONE|E_SECURE, "S", "[line [,line]] ! command", "filter lines through commands or run commands"}, /* C_HASH */ {L("#"), ex_number, E_ADDR2|E_CLRFLAG, "ca1", "[line [,line]] # [count] [l]", "display numbered lines"}, /* C_SUBAGAIN */ {L("&"), ex_subagain, E_ADDR2|E_ADDR_ZERO, "s", "[line [,line]] & [cgr] [count] [#lp]", "repeat the last subsitution"}, /* C_STAR */ {L("*"), ex_at, 0, "b", "* [buffer]", "execute a buffer"}, /* C_SHIFTL */ {L("<"), ex_shiftl, E_ADDR2|E_AUTOPRINT, "ca1", "[line [,line]] <[<...] [count] [flags]", "shift lines left"}, /* C_EQUAL */ {L("="), ex_equal, E_ADDR1|E_ADDR_ZERO|E_ADDR_ZERODEF, "1", "[line] = [flags]", "display line number"}, /* C_SHIFTR */ {L(">"), ex_shiftr, E_ADDR2|E_AUTOPRINT, "ca1", "[line [,line]] >[>...] [count] [flags]", "shift lines right"}, /* C_AT */ {L("@"), ex_at, E_ADDR2, "b", "@ [buffer]", "execute a buffer"}, /* C_APPEND */ {L("append"), ex_append, E_ADDR1|E_ADDR_ZERO|E_ADDR_ZERODEF, "!", "[line] a[ppend][!]", "append input to a line"}, /* C_ABBR */ {L("abbreviate"), ex_abbr, 0, "W", "ab[brev] [word replace]", "specify an input abbreviation"}, /* C_ARGS */ {L("args"), ex_args, 0, "", "ar[gs]", "display file argument list"}, /* C_BG */ {L("bg"), ex_bg, E_VIONLY, "", "bg", "put a foreground screen into the background"}, /* C_CHANGE */ {L("change"), ex_change, E_ADDR2|E_ADDR_ZERODEF, "!ca", "[line [,line]] c[hange][!] [count]", "change lines to input"}, /* C_CD */ {L("cd"), ex_cd, 0, "!f1o", "cd[!] [directory]", "change the current directory"}, /* C_CHDIR */ {L("chdir"), ex_cd, 0, "!f1o", "chd[ir][!] [directory]", "change the current directory"}, /* C_COPY */ {L("copy"), ex_copy, E_ADDR2|E_AUTOPRINT, "l1", "[line [,line]] co[py] line [flags]", "copy lines elsewhere in the file"}, /* C_CSCOPE */ {L("cscope"), ex_cscope, 0, "!s", "cs[cope] command [args]", "create a set of tags using a cscope command"}, /* * !!! * Adding new commands starting with 'd' may break the delete command code * in ex_cmd() (the ex parser). Read through the comments there, first. */ /* C_DELETE */ {L("delete"), ex_delete, E_ADDR2|E_AUTOPRINT, "bca1", "[line [,line]] d[elete][flags] [buffer] [count] [flags]", "delete lines from the file"}, /* C_DISPLAY */ {L("display"), ex_display, 0, "w1r", "display b[uffers] | c[onnections] | s[creens] | t[ags]", "display buffers, connections, screens or tags"}, /* C_EDIT */ {L("edit"), ex_edit, E_NEWSCREEN, "f1o", "[Ee][dit][!] [+cmd] [file]", "begin editing another file"}, /* C_EX */ {L("ex"), ex_edit, E_NEWSCREEN, "f1o", "[Ee]x[!] [+cmd] [file]", "begin editing another file"}, /* C_EXUSAGE */ {L("exusage"), ex_usage, 0, "w1o", "[exu]sage [command]", "display ex command usage statement"}, /* C_FILE */ {L("file"), ex_file, 0, "f1o", "f[ile] [name]", "display (and optionally set) file name"}, /* C_FG */ {L("fg"), ex_fg, E_NEWSCREEN|E_VIONLY, "f1o", "[Ff]g [file]", "bring a backgrounded screen into the foreground"}, /* C_GLOBAL */ {L("global"), ex_global, E_ADDR2_ALL, "!s", "[line [,line]] g[lobal][!] [;/]RE[;/] [commands]", "execute a global command on lines matching an RE"}, /* C_HELP */ {L("help"), ex_help, 0, "", "he[lp]", "display help statement"}, /* C_INSERT */ {L("insert"), ex_insert, E_ADDR1|E_ADDR_ZERO|E_ADDR_ZERODEF, "!", "[line] i[nsert][!]", "insert input before a line"}, /* C_JOIN */ {L("join"), ex_join, E_ADDR2|E_AUTOPRINT, "!ca1", "[line [,line]] j[oin][!] [count] [flags]", "join lines into a single line"}, /* C_K */ {L("k"), ex_mark, E_ADDR1, "w1r", "[line] k key", "mark a line position"}, /* C_LIST */ {L("list"), ex_list, E_ADDR2|E_CLRFLAG, "ca1", "[line [,line]] l[ist] [count] [#]", "display lines in an unambiguous form"}, /* C_MOVE */ {L("move"), ex_move, E_ADDR2|E_AUTOPRINT, "l", "[line [,line]] m[ove] line", "move lines elsewhere in the file"}, /* C_MARK */ {L("mark"), ex_mark, E_ADDR1, "w1r", "[line] ma[rk] key", "mark a line position"}, /* C_MAP */ {L("map"), ex_map, 0, "!W", "map[!] [keys replace]", "map input or commands to one or more keys"}, /* C_MKEXRC */ {L("mkexrc"), ex_mkexrc, 0, "!f1r", "mkexrc[!] file", "write a .exrc file"}, /* C_NEXT */ {L("next"), ex_next, E_NEWSCREEN, "!fN", "[Nn][ext][!] [+cmd] [file ...]", "edit (and optionally specify) the next file"}, /* C_NUMBER */ {L("number"), ex_number, E_ADDR2|E_CLRFLAG, "ca1", "[line [,line]] nu[mber] [count] [l]", "change display to number lines"}, /* C_OPEN */ {L("open"), ex_open, E_ADDR1, "s", "[line] o[pen] [/RE/] [flags]", "enter \"open\" mode (not implemented)"}, /* C_PRINT */ {L("print"), ex_pr, E_ADDR2|E_CLRFLAG, "ca1", "[line [,line]] p[rint] [count] [#l]", "display lines"}, /* C_PERLCMD */ {L("perl"), ex_perl, E_ADDR2_ALL|E_ADDR_ZERO| E_ADDR_ZERODEF|E_SECURE, "s", "pe[rl] cmd", "run the perl interpreter with the command"}, /* C_PERLDOCMD */ {L("perldo"), ex_perl, E_ADDR2|E_ADDR_ZERO| E_ADDR_ZERODEF|E_SECURE, "s", "perld[o] cmd", "run the perl interpreter with the command, on each line"}, /* C_PRESERVE */ {L("preserve"), ex_preserve, 0, "", "pre[serve]", "preserve an edit session for recovery"}, /* C_PREVIOUS */ {L("previous"), ex_prev, E_NEWSCREEN, "!", "[Pp]rev[ious][!]", "edit the previous file in the file argument list"}, /* C_PUT */ {L("put"), ex_put, E_ADDR1|E_AUTOPRINT|E_ADDR_ZERO|E_ADDR_ZERODEF, "b", "[line] pu[t] [buffer]", "append a cut buffer to the line"}, /* C_QUIT */ {L("quit"), ex_quit, 0, "!", "q[uit][!]", "exit ex/vi"}, /* C_READ */ {L("read"), ex_read, E_ADDR1|E_ADDR_ZERO|E_ADDR_ZERODEF, "s", "[line] r[ead] [!cmd | [file]]", "append input from a command or file to the line"}, /* C_RECOVER */ {L("recover"), ex_recover, 0, "!f1r", "recover[!] file", "recover a saved file"}, /* C_RESIZE */ {L("resize"), ex_resize, E_VIONLY, "c+", "resize [+-]rows", "grow or shrink the current screen"}, /* C_REWIND */ {L("rewind"), ex_rew, 0, "!", "rew[ind][!]", "re-edit all the files in the file argument list"}, /* * !!! * Adding new commands starting with 's' may break the substitute command code * in ex_cmd() (the ex parser). Read through the comments there, first. */ /* C_SUBSTITUTE */ {L("s"), ex_s, E_ADDR2|E_ADDR_ZERO, "s", "[line [,line]] s [[/;]RE[/;]repl[/;] [cgr] [count] [#lp]]", "substitute on lines matching an RE"}, /* C_SCRIPT */ {L("script"), ex_script, E_SECURE, "!f1o", "sc[ript][!] [file]", "run a shell in a screen"}, /* C_SET */ {L("set"), ex_set, 0, "wN", "se[t] [option[=[value]]...] [nooption ...] [option? ...] [all]", "set options (use \":set all\" to see all options)"}, /* C_SHELL */ {L("shell"), ex_shell, E_SECURE, "", "sh[ell]", "suspend editing and run a shell"}, /* C_SOURCE */ {L("source"), ex_source, 0, "f1r", "so[urce] file", "read a file of ex commands"}, /* C_STOP */ {L("stop"), ex_stop, E_SECURE, "!", "st[op][!]", "suspend the edit session"}, /* C_SUSPEND */ {L("suspend"), ex_stop, E_SECURE, "!", "su[spend][!]", "suspend the edit session"}, /* C_T */ {L("t"), ex_copy, E_ADDR2|E_AUTOPRINT, "l1", "[line [,line]] t line [flags]", "copy lines elsewhere in the file"}, /* C_TAG */ {L("tag"), ex_tag_push, E_NEWSCREEN, "!w1o", "[Tt]a[g][!] [string]", "edit the file containing the tag"}, /* C_TAGNEXT */ {L("tagnext"), ex_tag_next, 0, "!", "tagn[ext][!]", "move to the next tag"}, /* C_TAGPOP */ {L("tagpop"), ex_tag_pop, 0, "!w1o", "tagp[op][!] [number | file]", "return to the previous group of tags"}, /* C_TAGPREV */ {L("tagprev"), ex_tag_prev, 0, "!", "tagpr[ev][!]", "move to the previous tag"}, /* C_TAGTOP */ {L("tagtop"), ex_tag_top, 0, "!", "tagt[op][!]", "discard all tags"}, /* C_TCLCMD */ {L("tcl"), ex_tcl, E_ADDR2_ALL|E_ADDR_ZERO| E_ADDR_ZERODEF|E_SECURE, "s", "tc[l] cmd", "run the tcl interpreter with the command"}, /* C_UNDO */ {L("undo"), ex_undo, E_AUTOPRINT, "", "u[ndo]", "undo the most recent change"}, /* C_UNABBREVIATE */ {L("unabbreviate"),ex_unabbr, 0, "w1r", "una[bbrev] word", "delete an abbreviation"}, /* C_UNMAP */ {L("unmap"), ex_unmap, 0, "!w1r", "unm[ap][!] word", "delete an input or command map"}, /* C_V */ {L("v"), ex_v, E_ADDR2_ALL, "s", "[line [,line]] v [;/]RE[;/] [commands]", "execute a global command on lines NOT matching an RE"}, /* C_VERSION */ {L("version"), ex_version, 0, "", "version", "display the program version information"}, /* C_VISUAL_EX */ {L("visual"), ex_visual, E_ADDR1|E_ADDR_ZERODEF, "2c11", "[line] vi[sual] [-|.|+|^] [window_size] [flags]", "enter visual (vi) mode from ex mode"}, /* C_VISUAL_VI */ {L("visual"), ex_edit, E_NEWSCREEN, "f1o", "[Vv]i[sual][!] [+cmd] [file]", "edit another file (from vi mode only)"}, /* C_VIUSAGE */ {L("viusage"), ex_viusage, 0, "w1o", "[viu]sage [key]", "display vi key usage statement"}, /* C_VSPLIT */ {L("vsplit"), ex_edit, E_VIONLY, "f1o", "vs[plit] [+cmd] [file]", "split the current screen vertically"}, /* C_WRITE */ {L("write"), ex_write, E_ADDR2_ALL|E_ADDR_ZERODEF, "!s", "[line [,line]] w[rite][!] [ !cmd | [>>] [file]]", "write the file"}, /* C_WN */ {L("wn"), ex_wn, E_ADDR2_ALL|E_ADDR_ZERODEF, "!s", "[line [,line]] wn[!] [>>] [file]", "write the file and switch to the next file"}, /* C_WQ */ {L("wq"), ex_wq, E_ADDR2_ALL|E_ADDR_ZERODEF, "!s", "[line [,line]] wq[!] [>>] [file]", "write the file and exit"}, /* C_XIT */ {L("xit"), ex_xit, E_ADDR2_ALL|E_ADDR_ZERODEF, "!f1o", "[line [,line]] x[it][!] [file]", "exit"}, /* C_YANK */ {L("yank"), ex_yank, E_ADDR2, "bca", "[line [,line]] ya[nk] [buffer] [count]", "copy lines to a cut buffer"}, /* C_Z */ {L("z"), ex_z, E_ADDR1, "3c01", "[line] z [-|.|+|^|=] [count] [flags]", "display different screens of the file"}, /* C_SUBTILDE */ {L("~"), ex_subtilde, E_ADDR2|E_ADDR_ZERO, "s", "[line [,line]] ~ [cgr] [count] [#lp]", "replace previous RE with previous replacement string,"}, {NULL}, }; nvi-1.81.6/ex/ex_cscope.c0100644000076400001440000005764610720065506014224 0ustar skimousers/*- * Copyright (c) 1994, 1996 * Rob Mayoff. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_cscope.c,v 10.21 2003/11/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:11:54 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "pathnames.h" #include "tag.h" #define CSCOPE_DBFILE "cscope.out" #define CSCOPE_PATHS "cscope.tpath" /* * 0name find all uses of name * 1name find definition of name * 2name find all function calls made from name * 3name find callers of name * 4string find text string (cscope 12.9) * 4name find assignments to name (cscope 13.3) * 5pattern change pattern -- NOT USED * 6pattern find pattern * 7name find files with name as substring * 8name find files #including name */ #define FINDHELP "\ find c|d|e|f|g|i|s|t buffer|pattern\n\ c: find callers of name\n\ d: find all function calls made from name\n\ e: find pattern\n\ f: find files with name as substring\n\ g: find definition of name\n\ i: find files #including name\n\ s: find all uses of name\n\ t: find assignments to name" static int cscope_add __P((SCR *, EXCMD *, CHAR_T *)); static int cscope_find __P((SCR *, EXCMD*, CHAR_T *)); static int cscope_help __P((SCR *, EXCMD *, CHAR_T *)); static int cscope_kill __P((SCR *, EXCMD *, CHAR_T *)); static int cscope_reset __P((SCR *, EXCMD *, CHAR_T *)); typedef struct _cc { char *name; int (*function) __P((SCR *, EXCMD *, CHAR_T *)); char *help_msg; char *usage_msg; } CC; static CC const cscope_cmds[] = { { "add", cscope_add, "Add a new cscope database", "add file | directory" }, { "find", cscope_find, "Query the databases for a pattern", FINDHELP }, { "help", cscope_help, "Show help for cscope commands", "help [command]" }, { "kill", cscope_kill, "Kill a cscope connection", "kill number" }, { "reset", cscope_reset, "Discard all current cscope connections", "reset" }, { NULL } }; static TAGQ *create_cs_cmd __P((SCR *, char *, size_t *)); static int csc_help __P((SCR *, char *)); static void csc_file __P((SCR *, CSC *, char *, char **, size_t *, int *)); static int get_paths __P((SCR *, CSC *)); static CC const *lookup_ccmd __P((char *)); static int parse __P((SCR *, CSC *, TAGQ *, int *)); static int read_prompt __P((SCR *, CSC *)); static int run_cscope __P((SCR *, CSC *, char *)); static int start_cscopes __P((SCR *, EXCMD *)); static int terminate __P((SCR *, CSC *, int)); /* * ex_cscope -- * Perform an ex cscope. * * PUBLIC: int ex_cscope __P((SCR *, EXCMD *)); */ int ex_cscope(SCR *sp, EXCMD *cmdp) { CC const *ccp; EX_PRIVATE *exp; int i; CHAR_T *cmd; CHAR_T *p; char *np; size_t nlen; /* Initialize the default cscope directories. */ exp = EXP(sp); if (!F_ISSET(exp, EXP_CSCINIT) && start_cscopes(sp, cmdp)) return (1); F_SET(exp, EXP_CSCINIT); /* Skip leading whitespace. */ for (p = cmdp->argv[0]->bp, i = cmdp->argv[0]->len; i > 0; --i, ++p) if (!isspace(*p)) break; if (i == 0) goto usage; /* Skip the command to any arguments. */ for (cmd = p; i > 0; --i, ++p) if (isspace(*p)) break; if (*p != '\0') { *p++ = '\0'; for (; *p && isspace(*p); ++p); } INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen); if ((ccp = lookup_ccmd(np)) == NULL) { usage: msgq(sp, M_ERR, "309|Use \"cscope help\" for help"); return (1); } /* Call the underlying function. */ return (ccp->function(sp, cmdp, p)); } /* * start_cscopes -- * Initialize the cscope package. */ static int start_cscopes(SCR *sp, EXCMD *cmdp) { size_t blen, len; char *bp, *cscopes, *p, *t; CHAR_T *wp; size_t wlen; /* * EXTENSION #1: * * If the CSCOPE_DIRS environment variable is set, we treat it as a * list of cscope directories that we're using, similar to the tags * edit option. * * XXX * This should probably be an edit option, although that implies that * we start/stop cscope processes periodically, instead of once when * the editor starts. */ if ((cscopes = getenv("CSCOPE_DIRS")) == NULL) return (0); len = strlen(cscopes); GET_SPACE_RETC(sp, bp, blen, len); memcpy(bp, cscopes, len + 1); for (cscopes = t = bp; (p = strsep(&t, "\t :")) != NULL;) if (*p != '\0') { CHAR2INT(sp, p, strlen(p) + 1, wp, wlen); (void)cscope_add(sp, cmdp, wp); } FREE_SPACE(sp, bp, blen); return (0); } /* * cscope_add -- * The cscope add command. */ static int cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T *dname) { struct stat sb; EX_PRIVATE *exp; CSC *csc; size_t len; int cur_argc; char *dbname, path[MAXPATHLEN]; char *np; size_t nlen; exp = EXP(sp); /* * 0 additional args: usage. * 1 additional args: matched a file. * >1 additional args: object, too many args. */ cur_argc = cmdp->argc; if (argv_exp2(sp, cmdp, dname, STRLEN(dname))) { return (1); } if (cmdp->argc == cur_argc) { (void)csc_help(sp, "add"); return (1); } if (cmdp->argc == cur_argc + 1) dname = cmdp->argv[cur_argc]->bp; else { ex_emsg(sp, np, EXM_FILECOUNT); return (1); } INT2CHAR(sp, dname, STRLEN(dname)+1, np, nlen); /* * The user can specify a specific file (so they can have multiple * Cscope databases in a single directory) or a directory. If the * file doesn't exist, we're done. If it's a directory, append the * standard database file name and try again. Store the directory * name regardless so that we can use it as a base for searches. */ if (stat(np, &sb)) { msgq(sp, M_SYSERR, np); return (1); } if (S_ISDIR(sb.st_mode)) { (void)snprintf(path, sizeof(path), "%s/%s", np, CSCOPE_DBFILE); if (stat(path, &sb)) { msgq(sp, M_SYSERR, path); return (1); } dbname = CSCOPE_DBFILE; } else if ((dbname = strrchr(np, '/')) != NULL) *dbname++ = '\0'; else { dbname = np; np = "."; } /* Allocate a cscope connection structure and initialize its fields. */ len = strlen(np); CALLOC_RET(sp, csc, CSC *, 1, sizeof(CSC) + len); csc->dname = csc->buf; csc->dlen = len; memcpy(csc->dname, np, len); csc->mtime = sb.st_mtime; /* Get the search paths for the cscope. */ if (get_paths(sp, csc)) goto err; /* Start the cscope process. */ if (run_cscope(sp, csc, dbname)) goto err; /* * Add the cscope connection to the screen's list. From now on, * on error, we have to call terminate, which expects the csc to * be on the chain. */ LIST_INSERT_HEAD(&exp->cscq, csc, q); /* Read the initial prompt from the cscope to make sure it's okay. */ return read_prompt(sp, csc); err: free(csc); return (1); } /* * get_paths -- * Get the directories to search for the files associated with this * cscope database. */ static int get_paths(SCR *sp, CSC *csc) { struct stat sb; int fd, nentries; size_t len; char *p, **pathp, buf[MAXPATHLEN * 2]; /* * EXTENSION #2: * * If there's a cscope directory with a file named CSCOPE_PATHS, it * contains a colon-separated list of paths in which to search for * files returned by cscope. * * XXX * These paths are absolute paths, and not relative to the cscope * directory. To fix this, rewrite the each path using the cscope * directory as a prefix. */ (void)snprintf(buf, sizeof(buf), "%s/%s", csc->dname, CSCOPE_PATHS); if (stat(buf, &sb) == 0) { /* Read in the CSCOPE_PATHS file. */ len = sb.st_size; MALLOC_RET(sp, csc->pbuf, char *, len + 1); if ((fd = open(buf, O_RDONLY, 0)) < 0 || read(fd, csc->pbuf, len) != len) { msgq_str(sp, M_SYSERR, buf, "%s"); if (fd >= 0) (void)close(fd); return (1); } (void)close(fd); csc->pbuf[len] = '\0'; /* Count up the entries. */ for (nentries = 0, p = csc->pbuf; *p != '\0'; ++p) if (p[0] == ':' && p[1] != '\0') ++nentries; /* Build an array of pointers to the paths. */ CALLOC_GOTO(sp, csc->paths, char **, nentries + 1, sizeof(char **)); for (pathp = csc->paths, p = strtok(csc->pbuf, ":"); p != NULL; p = strtok(NULL, ":")) *pathp++ = p; return (0); } /* * If the CSCOPE_PATHS file doesn't exist, we look for files * relative to the cscope directory. */ if ((csc->pbuf = strdup(csc->dname)) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } CALLOC_GOTO(sp, csc->paths, char **, 2, sizeof(char *)); csc->paths[0] = csc->pbuf; return (0); alloc_err: if (csc->pbuf != NULL) { free(csc->pbuf); csc->pbuf = NULL; } return (1); } /* * run_cscope -- * Fork off the cscope process. */ static int run_cscope(SCR *sp, CSC *csc, char *dbname) { int to_cs[2], from_cs[2]; char cmd[MAXPATHLEN * 2]; /* * Cscope reads from to_cs[0] and writes to from_cs[1]; vi reads from * from_cs[0] and writes to to_cs[1]. */ to_cs[0] = to_cs[1] = from_cs[0] = from_cs[0] = -1; if (pipe(to_cs) < 0 || pipe(from_cs) < 0) { msgq(sp, M_SYSERR, "pipe"); goto err; } switch (csc->pid = vfork()) { case -1: msgq(sp, M_SYSERR, "vfork"); err: if (to_cs[0] != -1) (void)close(to_cs[0]); if (to_cs[1] != -1) (void)close(to_cs[1]); if (from_cs[0] != -1) (void)close(from_cs[0]); if (from_cs[1] != -1) (void)close(from_cs[1]); return (1); case 0: /* child: run cscope. */ (void)dup2(to_cs[0], STDIN_FILENO); (void)dup2(from_cs[1], STDOUT_FILENO); (void)dup2(from_cs[1], STDERR_FILENO); /* Close unused file descriptors. */ (void)close(to_cs[1]); (void)close(from_cs[0]); /* Run the cscope command. */ #define CSCOPE_CMD_FMT "cd '%s' && exec cscope -dl -f %s" (void)snprintf(cmd, sizeof(cmd), CSCOPE_CMD_FMT, csc->dname, dbname); (void)execl(_PATH_BSHELL, "sh", "-c", cmd, (char *)NULL); msgq_str(sp, M_SYSERR, cmd, "execl: %s"); _exit (127); /* NOTREACHED */ default: /* parent. */ /* Close unused file descriptors. */ (void)close(to_cs[0]); (void)close(from_cs[1]); /* * Save the file descriptors for later duplication, and * reopen as streams. */ csc->to_fd = to_cs[1]; csc->to_fp = fdopen(to_cs[1], "w"); csc->from_fd = from_cs[0]; csc->from_fp = fdopen(from_cs[0], "r"); break; } return (0); } /* * cscope_find -- * The cscope find command. */ static int cscope_find(SCR *sp, EXCMD *cmdp, CHAR_T *pattern) { CSC *csc, *csc_next; EX_PRIVATE *exp; FREF *frp; TAGQ *rtqp, *tqp; TAG *rtp; db_recno_t lno; size_t cno, search; int force, istmp, matches; char *np = NULL; size_t nlen; exp = EXP(sp); /* Check for connections. */ if (exp->cscq.lh_first == NULL) { msgq(sp, M_ERR, "310|No cscope connections running"); return (1); } /* * Allocate all necessary memory before doing anything hard. If the * tags stack is empty, we'll need the `local context' TAGQ structure * later. */ rtp = NULL; rtqp = NULL; if (exp->tq.cqh_first == (void *)&exp->tq) { /* Initialize the `local context' tag queue structure. */ CALLOC_GOTO(sp, rtqp, TAGQ *, 1, sizeof(TAGQ)); CIRCLEQ_INIT(&rtqp->tagq); /* Initialize and link in its tag structure. */ CALLOC_GOTO(sp, rtp, TAG *, 1, sizeof(TAG)); CIRCLEQ_INSERT_HEAD(&rtqp->tagq, rtp, q); rtqp->current = rtp; } /* Create the cscope command. */ INT2CHAR(sp, pattern, STRLEN(pattern) + 1, np, nlen); np = strdup(np); if ((tqp = create_cs_cmd(sp, np, &search)) == NULL) goto err; /* * Stick the current context in a convenient place, we'll lose it * when we switch files. */ frp = sp->frp; lno = sp->lno; cno = sp->cno; istmp = F_ISSET(sp->frp, FR_TMPFILE) && !F_ISSET(cmdp, E_NEWSCREEN); /* Search all open connections for a match. */ matches = 0; for (csc = exp->cscq.lh_first; csc != NULL; csc = csc_next) { /* Copy csc->q.lh_next here in case csc is killed. */ csc_next = csc->q.le_next; /* * Send the command to the cscope program. (We skip the * first two bytes of the command, because we stored the * search cscope command character and a leading space * there.) */ (void)fprintf(csc->to_fp, "%d%s\n", search, tqp->tag + 2); (void)fflush(csc->to_fp); /* Read the output. */ if (parse(sp, csc, tqp, &matches)) { if (rtqp != NULL) free(rtqp); tagq_free(sp, tqp); return (1); } } if (matches == 0) { msgq(sp, M_INFO, "278|No matches for query"); return (0); } tqp->current = tqp->tagq.cqh_first; /* Try to switch to the first tag. */ force = FL_ISSET(cmdp->iflags, E_C_FORCE); if (F_ISSET(cmdp, E_NEWSCREEN)) { if (ex_tag_Nswitch(sp, tqp->current, force)) goto err; /* Everything else gets done in the new screen. */ sp = sp->nextdisp; exp = EXP(sp); } else if (ex_tag_nswitch(sp, tqp->current, force)) goto err; /* * If this is the first tag, put a `current location' queue entry * in place, so we can pop all the way back to the current mark. * Note, it doesn't point to much of anything, it's a placeholder. */ if (exp->tq.cqh_first == (void *)&exp->tq) { CIRCLEQ_INSERT_HEAD(&exp->tq, rtqp, q); } else rtqp = exp->tq.cqh_first; /* Link the current TAGQ structure into place. */ CIRCLEQ_INSERT_HEAD(&exp->tq, tqp, q); (void)cscope_search(sp, tqp, tqp->current); /* * Move the current context from the temporary save area into the * right structure. * * If we were in a temporary file, we don't have a context to which * we can return, so just make it be the same as what we're moving * to. It will be a little odd that ^T doesn't change anything, but * I don't think it's a big deal. */ if (istmp) { rtqp->current->frp = sp->frp; rtqp->current->lno = sp->lno; rtqp->current->cno = sp->cno; } else { rtqp->current->frp = frp; rtqp->current->lno = lno; rtqp->current->cno = cno; } return (0); err: alloc_err: if (rtqp != NULL) free(rtqp); if (rtp != NULL) free(rtp); if (np != NULL) free(np); return (1); } /* * create_cs_cmd -- * Build a cscope command, creating and initializing the base TAGQ. */ static TAGQ * create_cs_cmd(SCR *sp, char *pattern, size_t *searchp) { CB *cbp; TAGQ *tqp; size_t tlen; char *p; /* * Cscope supports a "change pattern" command which we never use, * cscope command 5. Set CSCOPE_QUERIES[5] to " " since the user * can't pass " " as the first character of pattern. That way the * user can't ask for pattern 5 so we don't need any special-case * code. */ #define CSCOPE_QUERIES "sgdct efi" if (pattern == NULL) goto usage; /* Skip leading blanks, check for command character. */ for (; isblank(pattern[0]); ++pattern); if (pattern[0] == '\0' || !isblank(pattern[1])) goto usage; for (*searchp = 0, p = CSCOPE_QUERIES; *p != '\0' && *p != pattern[0]; ++*searchp, ++p); if (*p == '\0') { msgq(sp, M_ERR, "311|%s: unknown search type: use one of %s", KEY_NAME(sp, pattern[0]), CSCOPE_QUERIES); return (NULL); } /* Skip characters to the pattern. */ for (p = pattern + 1; *p != '\0' && isblank(*p); ++p); if (*p == '\0') { usage: (void)csc_help(sp, "find"); return (NULL); } /* The user can specify the contents of a buffer as the pattern. */ cbp = NULL; if (p[0] == '"' && p[1] != '\0' && p[2] == '\0') CBNAME(sp, cbp, p[1]); if (cbp != NULL) { INT2CHAR(sp, cbp->textq.cqh_first->lb, cbp->textq.cqh_first->len, p, tlen); } else tlen = strlen(p); /* Allocate and initialize the TAGQ structure. */ CALLOC(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + tlen + 3); if (tqp == NULL) return (NULL); CIRCLEQ_INIT(&tqp->tagq); tqp->tag = tqp->buf; tqp->tag[0] = pattern[0]; tqp->tag[1] = ' '; tqp->tlen = tlen + 2; memcpy(tqp->tag + 2, p, tlen); tqp->tag[tlen + 2] = '\0'; F_SET(tqp, TAG_CSCOPE); return (tqp); } /* * parse -- * Parse the cscope output. */ static int parse(SCR *sp, CSC *csc, TAGQ *tqp, int *matchesp) { TAG *tp; db_recno_t slno; size_t dlen, nlen, slen; int ch, i, isolder, nlines; char *dname, *name, *search, *p, *t, dummy[2], buf[2048]; for (;;) { if (!fgets(buf, sizeof(buf), csc->from_fp)) goto io_err; /* * If the database is out of date, or there's some other * problem, cscope will output error messages before the * number-of-lines output. Display/discard any output * that doesn't match what we want. */ #define CSCOPE_NLINES_FMT "cscope: %d lines%1[\n]" if (sscanf(buf, CSCOPE_NLINES_FMT, &nlines, dummy) == 2) break; if ((p = strchr(buf, '\n')) != NULL) *p = '\0'; msgq(sp, M_ERR, "%s: \"%s\"", csc->dname, buf); } while (nlines--) { if (fgets(buf, sizeof(buf), csc->from_fp) == NULL) goto io_err; /* If the line's too long for the buffer, discard it. */ if ((p = strchr(buf, '\n')) == NULL) { while ((ch = getc(csc->from_fp)) != EOF && ch != '\n'); continue; } *p = '\0'; /* * The cscope output is in the following format: * * * * Figure out how long everything is so we can allocate in one * swell foop, but discard anything that looks wrong. */ for (p = buf, i = 0; i < 3 && (t = strsep(&p, "\t ")) != NULL; ++i) switch (i) { case 0: /* Filename. */ name = t; nlen = strlen(name); break; case 1: /* Context. */ break; case 2: /* Line number. */ slno = (db_recno_t)atol(t); break; } if (i != 3 || p == NULL || t == NULL) continue; /* The rest of the string is the search pattern. */ search = p; slen = strlen(p); /* Resolve the file name. */ csc_file(sp, csc, name, &dname, &dlen, &isolder); /* * If the file is older than the cscope database, that is, * the database was built since the file was last modified, * or there wasn't a search string, use the line number. */ if (isolder || strcmp(search, "") == 0) { search = NULL; slen = 0; } /* * Allocate and initialize a tag structure plus the variable * length cscope information that follows it. */ CALLOC_RET(sp, tp, TAG *, 1, sizeof(TAG) + dlen + 2 + nlen + 1 + slen + 1); tp->fname = (char *)tp->buf; if (dlen != 0) { memcpy(tp->fname, dname, dlen); tp->fname[dlen] = '/'; ++dlen; } memcpy(tp->fname + dlen, name, nlen + 1); tp->fnlen = dlen + nlen; tp->slno = slno; if (slen != 0) { tp->search = (CHAR_T*)(tp->fname + tp->fnlen + 1); MEMCPYW(tp->search, search, (tp->slen = slen) + 1); } CIRCLEQ_INSERT_TAIL(&tqp->tagq, tp, q); ++*matchesp; } return read_prompt(sp, csc); io_err: if (feof(csc->from_fp)) errno = EIO; msgq_str(sp, M_SYSERR, "%s", csc->dname); terminate(sp, csc, 0); return (1); } /* * csc_file -- * Search for the right path to this file. */ static void csc_file(SCR *sp, CSC *csc, char *name, char **dirp, size_t *dlenp, int *isolderp) { struct stat sb; char **pp, buf[MAXPATHLEN]; /* * Check for the file in all of the listed paths. If we don't * find it, we simply return it unchanged. We have to do this * now, even though it's expensive, because if the user changes * directories, we can't change our minds as to where the file * lives. */ for (pp = csc->paths; *pp != NULL; ++pp) { (void)snprintf(buf, sizeof(buf), "%s/%s", *pp, name); if (stat(buf, &sb) == 0) { *dirp = *pp; *dlenp = strlen(*pp); *isolderp = sb.st_mtime < csc->mtime; return; } } *dlenp = 0; } /* * cscope_help -- * The cscope help command. */ static int cscope_help(SCR *sp, EXCMD *cmdp, CHAR_T *subcmd) { char *np; size_t nlen; INT2CHAR(sp, subcmd, STRLEN(subcmd) + 1, np, nlen); return (csc_help(sp, np)); } /* * csc_help -- * Display help/usage messages. */ static int csc_help(SCR *sp, char *cmd) { CC const *ccp; if (cmd != NULL && *cmd != '\0') if ((ccp = lookup_ccmd(cmd)) == NULL) { ex_printf(sp, "%s doesn't match any cscope command\n", cmd); return (1); } else { ex_printf(sp, "Command: %s (%s)\n", ccp->name, ccp->help_msg); ex_printf(sp, " Usage: %s\n", ccp->usage_msg); return (0); } ex_printf(sp, "cscope commands:\n"); for (ccp = cscope_cmds; ccp->name != NULL; ++ccp) ex_printf(sp, " %*s: %s\n", 5, ccp->name, ccp->help_msg); return (0); } /* * cscope_kill -- * The cscope kill command. */ static int cscope_kill(SCR *sp, EXCMD *cmdp, CHAR_T *cn) { char *np; size_t nlen; INT2CHAR(sp, cn, STRLEN(cn) + 1, np, nlen); return (terminate(sp, NULL, atoi(np))); } /* * terminate -- * Detach from a cscope process. */ static int terminate(SCR *sp, CSC *csc, int n) { EX_PRIVATE *exp; int i, pstat; exp = EXP(sp); /* * We either get a csc structure or a number. If not provided a * csc structure, find the right one. */ if (csc == NULL) { if (n < 1) goto badno; for (i = 1, csc = exp->cscq.lh_first; csc != NULL; csc = csc->q.le_next, i++) if (i == n) break; if (csc == NULL) { badno: msgq(sp, M_ERR, "312|%d: no such cscope session", n); return (1); } } /* * XXX * Theoretically, we have the only file descriptors to the process, * so closing them should let it exit gracefully, deleting temporary * files, etc. The original vi cscope integration sent the cscope * connection a SIGTERM signal, so I'm not sure if closing the file * descriptors is sufficient. */ if (csc->from_fp != NULL) (void)fclose(csc->from_fp); if (csc->to_fp != NULL) (void)fclose(csc->to_fp); (void)waitpid(csc->pid, &pstat, 0); /* Discard cscope connection information. */ LIST_REMOVE(csc, q); if (csc->pbuf != NULL) free(csc->pbuf); if (csc->paths != NULL) free(csc->paths); free(csc); return (0); } /* * cscope_reset -- * The cscope reset command. */ static int cscope_reset(SCR *sp, EXCMD *cmdp, CHAR_T *notusedp) { EX_PRIVATE *exp; for (exp = EXP(sp); exp->cscq.lh_first != NULL;) { static CHAR_T one[] = {'1', 0}; if (cscope_kill(sp, cmdp, one)) return (1); } return (0); } /* * cscope_display -- * Display current connections. * * PUBLIC: int cscope_display __P((SCR *)); */ int cscope_display(SCR *sp) { EX_PRIVATE *exp; CSC *csc; int i; exp = EXP(sp); if (exp->cscq.lh_first == NULL) { ex_printf(sp, "No cscope connections.\n"); return (0); } for (i = 1, csc = exp->cscq.lh_first; csc != NULL; ++i, csc = csc->q.le_next) ex_printf(sp, "%2d %s (process %lu)\n", i, csc->dname, (u_long)csc->pid); return (0); } /* * cscope_search -- * Search a file for a cscope entry. * * PUBLIC: int cscope_search __P((SCR *, TAGQ *, TAG *)); */ int cscope_search(SCR *sp, TAGQ *tqp, TAG *tp) { MARK m; /* If we don't have a search pattern, use the line number. */ if (tp->search == NULL) { if (!db_exist(sp, tp->slno)) { tag_msg(sp, TAG_BADLNO, tqp->tag); return (1); } m.lno = tp->slno; } else { /* * Search for the tag; cheap fallback for C functions * if the name is the same but the arguments have changed. */ m.lno = 1; m.cno = 0; if (f_search(sp, &m, &m, tp->search, tp->slen, NULL, SEARCH_CSCOPE | SEARCH_FIRST)) { tag_msg(sp, TAG_SEARCH, tqp->tag); return (1); } /* * !!! * Historically, tags set the search direction if it wasn't * already set. */ if (sp->searchdir == NOTSET) sp->searchdir = FORWARD; } /* * !!! * Tags move to the first non-blank, NOT the search pattern start. */ sp->lno = m.lno; sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); return (0); } /* * lookup_ccmd -- * Return a pointer to the command structure. */ static CC const * lookup_ccmd(char *name) { CC const *ccp; size_t len; len = strlen(name); for (ccp = cscope_cmds; ccp->name != NULL; ++ccp) if (strncmp(name, ccp->name, len) == 0) return (ccp); return (NULL); } /* * read_prompt -- * Read a prompt from cscope. */ static int read_prompt(SCR *sp, CSC *csc) { int ch; #define CSCOPE_PROMPT ">> " for (;;) { while ((ch = getc(csc->from_fp)) != EOF && ch != CSCOPE_PROMPT[0]); if (ch == EOF) { terminate(sp, csc, 0); return (1); } if (getc(csc->from_fp) != CSCOPE_PROMPT[1]) continue; if (getc(csc->from_fp) != CSCOPE_PROMPT[2]) continue; break; } return (0); } nvi-1.81.6/ex/ex_delete.c0100644000076400001440000000270710720065506014176 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_delete.c,v 10.11 2001/06/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:15 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_delete: [line [,line]] d[elete] [buffer] [count] [flags] * * Delete lines from the file. * * PUBLIC: int ex_delete __P((SCR *, EXCMD *)); */ int ex_delete(SCR *sp, EXCMD *cmdp) { db_recno_t lno; NEEDFILE(sp, cmdp); /* * !!! * Historically, lines deleted in ex were not placed in the numeric * buffers. We follow historic practice so that we don't overwrite * vi buffers accidentally. */ if (cut(sp, FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL, &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE)) return (1); /* Delete the lines. */ if (del(sp, &cmdp->addr1, &cmdp->addr2, 1)) return (1); /* Set the cursor to the line after the last line deleted. */ sp->lno = cmdp->addr1.lno; /* Or the last line in the file if deleted to the end of the file. */ if (db_last(sp, &lno)) return (1); if (sp->lno > lno) sp->lno = lno; return (0); } nvi-1.81.6/ex/ex_display.c0100644000076400001440000000617310720065506014402 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_display.c,v 10.15 2001/06/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:15 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "tag.h" static int bdisplay __P((SCR *)); static void db __P((SCR *, CB *, u_char *)); /* * ex_display -- :display b[uffers] | c[onnections] | s[creens] | t[ags] * * Display cscope connections, buffers, tags or screens. * * PUBLIC: int ex_display __P((SCR *, EXCMD *)); */ int ex_display(SCR *sp, EXCMD *cmdp) { switch (cmdp->argv[0]->bp[0]) { case 'b': #undef ARG #define ARG "buffers" if (cmdp->argv[0]->len >= sizeof(ARG) || memcmp(cmdp->argv[0]->bp, ARG, cmdp->argv[0]->len)) break; return (bdisplay(sp)); case 'c': #undef ARG #define ARG "connections" if (cmdp->argv[0]->len >= sizeof(ARG) || memcmp(cmdp->argv[0]->bp, ARG, cmdp->argv[0]->len)) break; return (cscope_display(sp)); case 's': #undef ARG #define ARG "screens" if (cmdp->argv[0]->len >= sizeof(ARG) || memcmp(cmdp->argv[0]->bp, ARG, cmdp->argv[0]->len)) break; return (ex_sdisplay(sp)); case 't': #undef ARG #define ARG "tags" if (cmdp->argv[0]->len >= sizeof(ARG) || memcmp(cmdp->argv[0]->bp, ARG, cmdp->argv[0]->len)) break; return (ex_tag_display(sp)); } ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } /* * bdisplay -- * * Display buffers. */ static int bdisplay(SCR *sp) { CB *cbp; if (sp->wp->cutq.lh_first == NULL && sp->wp->dcbp == NULL) { msgq(sp, M_INFO, "123|No cut buffers to display"); return (0); } /* Display regular cut buffers. */ for (cbp = sp->wp->cutq.lh_first; cbp != NULL; cbp = cbp->q.le_next) { if (isdigit(cbp->name)) continue; if (cbp->textq.cqh_first != (void *)&cbp->textq) db(sp, cbp, NULL); if (INTERRUPTED(sp)) return (0); } /* Display numbered buffers. */ for (cbp = sp->wp->cutq.lh_first; cbp != NULL; cbp = cbp->q.le_next) { if (!isdigit(cbp->name)) continue; if (cbp->textq.cqh_first != (void *)&cbp->textq) db(sp, cbp, NULL); if (INTERRUPTED(sp)) return (0); } /* Display default buffer. */ if ((cbp = sp->wp->dcbp) != NULL) db(sp, cbp, "default buffer"); return (0); } /* * db -- * Display a buffer. */ static void db(SCR *sp, CB *cbp, u_char *name) { CHAR_T *p; GS *gp; TEXT *tp; size_t len; gp = sp->gp; (void)ex_printf(sp, "********** %s%s\n", name == NULL ? KEY_NAME(sp, cbp->name) : name, F_ISSET(cbp, CB_LMODE) ? " (line mode)" : " (character mode)"); for (tp = cbp->textq.cqh_first; tp != (void *)&cbp->textq; tp = tp->q.cqe_next) { for (len = tp->len, p = tp->lb; len--; ++p) { (void)ex_puts(sp, KEY_NAME(sp, *p)); if (INTERRUPTED(sp)) return; } (void)ex_puts(sp, "\n"); } } nvi-1.81.6/ex/ex_edit.c0100644000076400001440000000701010720065506013651 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_edit.c,v 10.14 2001/08/28 13:29:15 skimo Exp $ (Berkeley) $Date: 2001/08/28 13:29:15 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" static int ex_N_edit __P((SCR *, EXCMD *, FREF *, int)); /* * ex_edit -- :e[dit][!] [+cmd] [file] * :ex[!] [+cmd] [file] * :vi[sual][!] [+cmd] [file] * * Edit a file; if none specified, re-edit the current file. The third * form of the command can only be executed while in vi mode. See the * hack in ex.c:ex_cmd(). * * !!! * Historic vi didn't permit the '+' command form without specifying * a file name as well. This seems unreasonable, so we support it * regardless. * * PUBLIC: int ex_edit __P((SCR *, EXCMD *)); */ int ex_edit(SCR *sp, EXCMD *cmdp) { FREF *frp; int attach, setalt; char *np; size_t nlen; switch (cmdp->argc) { case 0: /* * If the name has been changed, we edit that file, not the * original name. If the user was editing a temporary file * (or wasn't editing any file), create another one. The * reason for not reusing temporary files is that there is * special exit processing of them, and reuse is tricky. */ frp = sp->frp; if (sp->ep == NULL || F_ISSET(frp, FR_TMPFILE)) { if ((frp = file_add(sp, NULL)) == NULL) return (1); attach = 0; } else attach = 1; setalt = 0; break; case 1: INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, np, nlen); if ((frp = file_add(sp, np)) == NULL) return (1); attach = 0; setalt = 1; set_alt_name(sp, np); break; default: abort(); } if (F_ISSET(cmdp, E_NEWSCREEN) || cmdp->cmd == &cmds[C_VSPLIT]) return (ex_N_edit(sp, cmdp, frp, attach)); /* * Check for modifications. * * !!! * Contrary to POSIX 1003.2-1992, autowrite did not affect :edit. */ if (file_m2(sp, FL_ISSET(cmdp->iflags, E_C_FORCE))) return (1); /* Switch files. */ if (file_init(sp, frp, NULL, (setalt ? FS_SETALT : 0) | (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) return (1); F_SET(sp, SC_FSWITCH); return (0); } /* * ex_N_edit -- * New screen version of ex_edit. */ static int ex_N_edit(SCR *sp, EXCMD *cmdp, FREF *frp, int attach) { SCR *new; /* Get a new screen. */ if (screen_init(sp->gp, sp, &new)) return (1); if (cmdp->cmd == &cmds[C_VSPLIT] && vs_vsplit(sp, new) || cmdp->cmd != &cmds[C_VSPLIT] && vs_split(sp, new, 0)) { (void)screen_end(new); return (1); } /* Get a backing file. */ if (attach) { /* Copy file state, keep the screen and cursor the same. */ new->ep = sp->ep; ++new->ep->refcnt; CIRCLEQ_INSERT_HEAD(&new->ep->scrq, new, eq); new->frp = frp; new->frp->flags = sp->frp->flags; new->lno = sp->lno; new->cno = sp->cno; } else if (file_init(new, frp, NULL, (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) { (void)vs_discard(new, NULL); (void)screen_end(new); return (1); } /* Create the argument list. */ new->cargv = new->argv = ex_buildargv(sp, NULL, frp->name); /* Set up the switch. */ sp->nextdisp = new; F_SET(sp, SC_SSWITCH); return (0); } nvi-1.81.6/ex/ex_equal.c0100644000076400001440000000250510720065506014037 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_equal.c,v 10.12 2001/06/25 15:19:15 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:15 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_equal -- :address = * * PUBLIC: int ex_equal __P((SCR *, EXCMD *)); */ int ex_equal(SCR *sp, EXCMD *cmdp) { db_recno_t lno; NEEDFILE(sp, cmdp); /* * Print out the line number matching the specified address, * or the number of the last line in the file if no address * specified. * * !!! * Historically, ":0=" displayed 0, and ":=" or ":1=" in an * empty file displayed 1. Until somebody complains loudly, * we're going to do it right. The tables in excmd.c permit * lno to get away with any address from 0 to the end of the * file, which, in an empty file, is 0. */ if (F_ISSET(cmdp, E_ADDR_DEF)) { if (db_last(sp, &lno)) return (1); } else lno = cmdp->addr1.lno; (void)ex_printf(sp, "%ld\n", lno); return (0); } nvi-1.81.6/ex/ex_file.c0100644000076400001440000000332110720065506013644 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_file.c,v 10.14 2001/06/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:16 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_file -- :f[ile] [name] * Change the file's name and display the status line. * * PUBLIC: int ex_file __P((SCR *, EXCMD *)); */ int ex_file(SCR *sp, EXCMD *cmdp) { char *p; FREF *frp; char *np; size_t nlen; NEEDFILE(sp, cmdp); switch (cmdp->argc) { case 0: break; case 1: frp = sp->frp; /* Make sure can allocate enough space. */ INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, np, nlen); if ((p = v_strdup(sp, np, nlen - 1)) == NULL) return (1); /* If already have a file name, it becomes the alternate. */ if (!F_ISSET(frp, FR_TMPFILE)) set_alt_name(sp, frp->name); /* Free the previous name. */ free(frp->name); frp->name = p; /* * The file has a real name, it's no longer a temporary, * clear the temporary file flags. */ F_CLR(frp, FR_TMPEXIT | FR_TMPFILE); /* Have to force a write if the file exists, next time. */ F_SET(frp, FR_NAMECHANGE); /* Notify the screen. */ (void)sp->gp->scr_rename(sp, sp->frp->name, 1); break; default: abort(); } msgq_status(sp, sp->lno, MSTAT_SHOWLAST); return (0); } nvi-1.81.6/ex/ex_filter.c0100644000076400001440000002103610720065506014215 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_filter.c,v 10.44 2003/11/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:11:54 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" static int filter_ldisplay __P((SCR *, FILE *)); /* * ex_filter -- * Run a range of lines through a filter utility and optionally * replace the original text with the stdout/stderr output of * the utility. * * PUBLIC: int ex_filter __P((SCR *, * PUBLIC: EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype)); */ int ex_filter(SCR *sp, EXCMD *cmdp, MARK *fm, MARK *tm, MARK *rp, CHAR_T *cmd, enum filtertype ftype) { FILE *ifp, *ofp; pid_t parent_writer_pid, utility_pid; db_recno_t nread; int input[2], output[2], rval; char *name; char *np; size_t nlen; rval = 0; /* Set return cursor position, which is never less than line 1. */ *rp = *fm; if (rp->lno == 0) rp->lno = 1; /* We're going to need a shell. */ if (opts_empty(sp, O_SHELL, 0)) return (1); /* * There are three different processes running through this code. * They are the utility, the parent-writer and the parent-reader. * The parent-writer is the process that writes from the file to * the utility, the parent reader is the process that reads from * the utility. * * Input and output are named from the utility's point of view. * The utility reads from input[0] and the parent(s) write to * input[1]. The parent(s) read from output[0] and the utility * writes to output[1]. * * !!! * Historically, in the FILTER_READ case, the utility reads from * the terminal (e.g. :r! cat works). Otherwise open up utility * input pipe. */ ofp = NULL; input[0] = input[1] = output[0] = output[1] = -1; if (ftype != FILTER_READ && pipe(input) < 0) { msgq(sp, M_SYSERR, "pipe"); goto err; } /* Open up utility output pipe. */ if (pipe(output) < 0) { msgq(sp, M_SYSERR, "pipe"); goto err; } if ((ofp = fdopen(output[0], "r")) == NULL) { msgq(sp, M_SYSERR, "fdopen"); goto err; } /* Fork off the utility process. */ switch (utility_pid = vfork()) { case -1: /* Error. */ msgq(sp, M_SYSERR, "vfork"); err: if (input[0] != -1) (void)close(input[0]); if (input[1] != -1) (void)close(input[1]); if (ofp != NULL) (void)fclose(ofp); else if (output[0] != -1) (void)close(output[0]); if (output[1] != -1) (void)close(output[1]); return (1); case 0: /* Utility. */ /* * Redirect stdin from the read end of the input pipe, and * redirect stdout/stderr to the write end of the output pipe. * * !!! * Historically, ex only directed stdout into the input pipe, * letting stderr come out on the terminal as usual. Vi did * not, directing both stdout and stderr into the input pipe. * We match that practice in both ex and vi for consistency. */ if (input[0] != -1) (void)dup2(input[0], STDIN_FILENO); (void)dup2(output[1], STDOUT_FILENO); (void)dup2(output[1], STDERR_FILENO); /* Close the utility's file descriptors. */ if (input[0] != -1) (void)close(input[0]); if (input[1] != -1) (void)close(input[1]); (void)close(output[0]); (void)close(output[1]); if ((name = strrchr(O_STR(sp, O_SHELL), '/')) == NULL) name = O_STR(sp, O_SHELL); else ++name; INT2SYS(sp, cmd, STRLEN(cmd)+1, np, nlen); execl(O_STR(sp, O_SHELL), name, "-c", np, (char *)NULL); msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s"); _exit (127); /* NOTREACHED */ default: /* Parent-reader, parent-writer. */ /* Close the pipe ends neither parent will use. */ if (input[0] != -1) (void)close(input[0]); (void)close(output[1]); break; } /* * FILTER_RBANG, FILTER_READ: * * Reading is the simple case -- we don't need a parent writer, * so the parent reads the output from the read end of the output * pipe until it finishes, then waits for the child. Ex_readfp * appends to the MARK, and closes ofp. * * For FILTER_RBANG, there is nothing to write to the utility. * Make sure it doesn't wait forever by closing its standard * input. * * !!! * Set the return cursor to the last line read in for FILTER_READ. * Historically, this behaves differently from ":r file" command, * which leaves the cursor at the first line read in. Check to * make sure that it's not past EOF because we were reading into an * empty file. */ if (ftype == FILTER_RBANG || ftype == FILTER_READ) { if (ftype == FILTER_RBANG) (void)close(input[1]); if (ex_readfp(sp, "filter", ofp, fm, &nread, 1)) rval = 1; sp->rptlines[L_ADDED] += nread; if (ftype == FILTER_READ) if (fm->lno == 0) rp->lno = nread; else rp->lno += nread; goto uwait; } /* * FILTER_BANG, FILTER_WRITE * * Here we need both a reader and a writer. Temporary files are * expensive and we'd like to avoid disk I/O. Using pipes has the * obvious starvation conditions. It's done as follows: * * fork * child * write lines out * exit * parent * FILTER_BANG: * read lines into the file * delete old lines * FILTER_WRITE * read and display lines * wait for child * * XXX * We get away without locking the underlying database because we know * that none of the records that we're reading will be modified until * after we've read them. This depends on the fact that the current * B+tree implementation doesn't balance pages or similar things when * it inserts new records. When the DB code has locking, we should * treat vi as if it were multiple applications sharing a database, and * do the required locking. If necessary a work-around would be to do * explicit locking in the line.c:db_get() code, based on the flag set * here. */ F_SET(sp->ep, F_MULTILOCK); switch (parent_writer_pid = fork()) { case -1: /* Error. */ msgq(sp, M_SYSERR, "fork"); (void)close(input[1]); (void)close(output[0]); rval = 1; break; case 0: /* Parent-writer. */ /* * Write the selected lines to the write end of the input * pipe. This instance of ifp is closed by ex_writefp. */ (void)close(output[0]); if ((ifp = fdopen(input[1], "w")) == NULL) _exit (1); _exit(ex_writefp(sp, "filter", ifp, fm, tm, NULL, NULL, 1)); /* NOTREACHED */ default: /* Parent-reader. */ (void)close(input[1]); if (ftype == FILTER_WRITE) { /* * Read the output from the read end of the output * pipe and display it. Filter_ldisplay closes ofp. */ if (filter_ldisplay(sp, ofp)) rval = 1; } else { /* * Read the output from the read end of the output * pipe. Ex_readfp appends to the MARK and closes * ofp. */ if (ex_readfp(sp, "filter", ofp, tm, &nread, 1)) rval = 1; sp->rptlines[L_ADDED] += nread; } /* Wait for the parent-writer. */ if (proc_wait(sp, (long)parent_writer_pid, "parent-writer", 0, 1)) rval = 1; /* Delete any lines written to the utility. */ if (rval == 0 && ftype == FILTER_BANG && (cut(sp, NULL, fm, tm, CUT_LINEMODE) || del(sp, fm, tm, 1))) { rval = 1; break; } /* * If the filter had no output, we may have just deleted * the cursor. Don't do any real error correction, we'll * try and recover later. */ if (rp->lno > 1 && !db_exist(sp, rp->lno)) --rp->lno; break; } F_CLR(sp->ep, F_MULTILOCK); /* * !!! * Ignore errors on vi file reads, to make reads prettier. It's * completely inconsistent, and historic practice. */ uwait: INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen); return (proc_wait(sp, (long)utility_pid, np, ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval); } /* * filter_ldisplay -- * Display output from a utility. * * !!! * Historically, the characters were passed unmodified to the terminal. * We use the ex print routines to make sure they're printable. */ static int filter_ldisplay(SCR *sp, FILE *fp) { size_t len; size_t wlen; CHAR_T *wp; EX_PRIVATE *exp; for (exp = EXP(sp); !ex_getline(sp, fp, &len) && !INTERRUPTED(sp);) { FILE2INT5(sp, exp->ibcw, exp->ibp, len, wp, wlen); if (ex_ldisplay(sp, wp, wlen, 0, 0)) break; } if (ferror(fp)) msgq(sp, M_SYSERR, "filter read"); (void)fclose(fp); return (0); } nvi-1.81.6/ex/ex_global.c0100644000076400001440000001702010720065506014166 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_global.c,v 10.30 2001/06/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:16 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" enum which {GLOBAL, V}; static int ex_g_setup __P((SCR *, EXCMD *, enum which)); /* * ex_global -- [line [,line]] g[lobal][!] /pattern/ [commands] * Exec on lines matching a pattern. * * PUBLIC: int ex_global __P((SCR *, EXCMD *)); */ int ex_global(SCR *sp, EXCMD *cmdp) { return (ex_g_setup(sp, cmdp, FL_ISSET(cmdp->iflags, E_C_FORCE) ? V : GLOBAL)); } /* * ex_v -- [line [,line]] v /pattern/ [commands] * Exec on lines not matching a pattern. * * PUBLIC: int ex_v __P((SCR *, EXCMD *)); */ int ex_v(SCR *sp, EXCMD *cmdp) { return (ex_g_setup(sp, cmdp, V)); } /* * ex_g_setup -- * Ex global and v commands. */ static int ex_g_setup(SCR *sp, EXCMD *cmdp, enum which cmd) { CHAR_T *ptrn, *p, *t; EXCMD *ecp; MARK abs; RANGE *rp; busy_t btype; db_recno_t start, end; regex_t *re; regmatch_t match[1]; size_t len; int cnt, delim, eval; CHAR_T *dbp; NEEDFILE(sp, cmdp); if (F_ISSET(sp, SC_EX_GLOBAL)) { msgq(sp, M_ERR, "124|The %s command can't be used as part of a global or v command", cmdp->cmd->name); return (1); } /* * Skip leading white space. Historic vi allowed any non-alphanumeric * to serve as the global command delimiter. */ if (cmdp->argc == 0) goto usage; for (p = cmdp->argv[0]->bp; ISBLANK(*p); ++p); if (*p == '\0' || ISALNUM(*p) || *p == '\\' || *p == '|' || *p == '\n') { usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } delim = *p++; /* * Get the pattern string, toss escaped characters. * * QUOTING NOTE: * Only toss an escaped character if it escapes a delimiter. */ for (ptrn = t = p;;) { if (p[0] == '\0' || p[0] == delim) { if (p[0] == delim) ++p; /* * !!! * Nul terminate the pattern string -- it's passed * to regcomp which doesn't understand anything else. */ *t = L('\0'); break; } if (p[0] == L('\\')) if (p[1] == delim) ++p; else if (p[1] == L('\\')) *t++ = *p++; *t++ = *p++; } /* If the pattern string is empty, use the last one. */ if (*ptrn == L('\0')) { if (sp->re == NULL) { ex_emsg(sp, NULL, EXM_NOPREVRE); return (1); } /* Re-compile the RE if necessary. */ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp, sp->re, sp->re_len, NULL, NULL, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); } else { /* Compile the RE. */ if (re_compile(sp, ptrn, t - ptrn, &sp->re, &sp->re_len, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); /* * Set saved RE. Historic practice is that globals set * direction as well as the RE. */ sp->searchdir = FORWARD; } re = &sp->re_c; /* The global commands always set the previous context mark. */ abs.lno = sp->lno; abs.cno = sp->cno; if (mark_set(sp, ABSMARK1, &abs, 1)) return (1); /* Get an EXCMD structure. */ CALLOC_RET(sp, ecp, EXCMD *, 1, sizeof(EXCMD)); CIRCLEQ_INIT(&ecp->rq); /* * Get a copy of the command string; the default command is print. * Don't worry about a set of s with no command, that will * default to print in the ex parser. We need to have two copies * because the ex parser may step on the command string when it's * parsing it. */ if ((len = cmdp->argv[0]->len - (p - cmdp->argv[0]->bp)) == 0) { p = L("p"); len = 1; } MALLOC_RET(sp, ecp->cp, CHAR_T *, (len * 2) * sizeof(CHAR_T)); ecp->o_cp = ecp->cp; ecp->o_clen = len; MEMCPYW(ecp->cp + len, p, len); ecp->range_lno = OOBLNO; FL_SET(ecp->agv_flags, cmd == GLOBAL ? AGV_GLOBAL : AGV_V); LIST_INSERT_HEAD(&sp->wp->ecq, ecp, q); /* * For each line... The semantics of global matching are that we first * have to decide which lines are going to get passed to the command, * and then pass them to the command, ignoring other changes. There's * really no way to do this in a single pass, since arbitrary line * creation, deletion and movement can be done in the ex command. For * example, a good vi clone test is ":g/X/mo.-3", or "g/X/.,.+1d". * What we do is create linked list of lines that are tracked through * each ex command. There's a callback routine which the DB interface * routines call when a line is created or deleted. This doesn't help * the layering much. */ btype = BUSY_ON; cnt = INTERRUPT_CHECK; for (start = cmdp->addr1.lno, end = cmdp->addr2.lno; start <= end; ++start) { if (cnt-- == 0) { if (INTERRUPTED(sp)) { LIST_REMOVE(ecp, q); free(ecp->cp); free(ecp); break; } search_busy(sp, btype); btype = BUSY_UPDATE; cnt = INTERRUPT_CHECK; } if (db_get(sp, start, DBG_FATAL, &dbp, &len)) return (1); match[0].rm_so = 0; match[0].rm_eo = len; switch (eval = regexec(&sp->re_c, dbp, 0, match, REG_STARTEND)) { case 0: if (cmd == V) continue; break; case REG_NOMATCH: if (cmd == GLOBAL) continue; break; default: re_error(sp, eval, &sp->re_c); break; } /* If follows the last entry, extend the last entry's range. */ if ((rp = ecp->rq.cqh_last) != (void *)&ecp->rq && rp->stop == start - 1) { ++rp->stop; continue; } /* Allocate a new range, and append it to the list. */ CALLOC(sp, rp, RANGE *, 1, sizeof(RANGE)); if (rp == NULL) return (1); rp->start = rp->stop = start; CIRCLEQ_INSERT_TAIL(&ecp->rq, rp, q); } search_busy(sp, BUSY_OFF); return (0); } /* * ex_g_insdel -- * Update the ranges based on an insertion or deletion. * * PUBLIC: int ex_g_insdel __P((SCR *, lnop_t, db_recno_t)); */ int ex_g_insdel(SCR *sp, lnop_t op, db_recno_t lno) { EXCMD *ecp; RANGE *nrp, *rp; /* All insert/append operations are done as inserts. */ if (op == LINE_APPEND) abort(); if (op == LINE_RESET) return (0); for (ecp = sp->wp->ecq.lh_first; ecp != NULL; ecp = ecp->q.le_next) { if (!FL_ISSET(ecp->agv_flags, AGV_AT | AGV_GLOBAL | AGV_V)) continue; for (rp = ecp->rq.cqh_first; rp != (void *)&ecp->rq; rp = nrp) { nrp = rp->q.cqe_next; /* If range less than the line, ignore it. */ if (rp->stop < lno) continue; /* * If range greater than the line, decrement or * increment the range. */ if (rp->start > lno) { if (op == LINE_DELETE) { --rp->start; --rp->stop; } else { ++rp->start; ++rp->stop; } continue; } /* * Lno is inside the range, decrement the end point * for deletion, and split the range for insertion. * In the latter case, since we're inserting a new * element, neither range can be exhausted. */ if (op == LINE_DELETE) { if (rp->start > --rp->stop) { CIRCLEQ_REMOVE(&ecp->rq, rp, q); free(rp); } } else { CALLOC_RET(sp, nrp, RANGE *, 1, sizeof(RANGE)); nrp->start = lno + 1; nrp->stop = rp->stop + 1; rp->stop = lno - 1; CIRCLEQ_INSERT_AFTER(&ecp->rq, rp, nrp, q); rp = nrp; } } /* * If the command deleted/inserted lines, the cursor moves to * the line after the deleted/inserted line. */ ecp->range_lno = lno; } return (0); } nvi-1.81.6/ex/ex_init.c0100644000076400001440000002405010720065506013672 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_init.c,v 10.31 2001/06/25 15:19:16 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:16 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "tag.h" #include "pathnames.h" enum rc { NOEXIST, NOPERM, RCOK }; static enum rc exrc_isok __P((SCR *, struct stat *, char *, int, int)); static int ex_run_file __P((SCR *, char *)); /* * ex_screen_copy -- * Copy ex screen. * * PUBLIC: int ex_screen_copy __P((SCR *, SCR *)); */ int ex_screen_copy(SCR *orig, SCR *sp) { EX_PRIVATE *oexp, *nexp; /* Create the private ex structure. */ CALLOC_RET(orig, nexp, EX_PRIVATE *, 1, sizeof(EX_PRIVATE)); sp->ex_private = nexp; /* Initialize queues. */ CIRCLEQ_INIT(&nexp->tq); TAILQ_INIT(&nexp->tagfq); LIST_INIT(&nexp->cscq); if (orig == NULL) { } else { oexp = EXP(orig); if (oexp->lastbcomm != NULL && (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm, STRLEN(oexp->lastbcomm))) == NULL) { msgq(sp, M_SYSERR, NULL); return(1); } if (ex_tag_copy(orig, sp)) return (1); } return (0); } /* * ex_screen_end -- * End a vi screen. * * PUBLIC: int ex_screen_end __P((SCR *)); */ int ex_screen_end(SCR *sp) { EX_PRIVATE *exp; int rval; if ((exp = EXP(sp)) == NULL) return (0); rval = 0; /* Close down script connections. */ if (F_ISSET(sp, SC_SCRIPT) && sscr_end(sp)) rval = 1; if (argv_free(sp)) rval = 1; if (exp->ibp != NULL) free(exp->ibp); if (exp->lastbcomm != NULL) free(exp->lastbcomm); if (ex_tag_free(sp)) rval = 1; /* Free private memory. */ free(exp); sp->ex_private = NULL; return (rval); } /* * ex_optchange -- * Handle change of options for ex. * * PUBLIC: int ex_optchange __P((SCR *, int, char *, u_long *)); */ int ex_optchange(SCR *sp, int offset, char *str, u_long *valp) { switch (offset) { case O_TAGS: return (ex_tagf_alloc(sp, str)); } return (0); } /* * ex_exrc -- * Read the EXINIT environment variable and the startup exrc files, * and execute their commands. * * PUBLIC: int ex_exrc __P((SCR *)); */ int ex_exrc(SCR *sp) { struct stat hsb, lsb; char *p, path[MAXPATHLEN]; CHAR_T *wp; size_t wlen; /* * Source the system, environment, $HOME and local .exrc values. * Vi historically didn't check $HOME/.exrc if the environment * variable EXINIT was set. This is all done before the file is * read in, because things in the .exrc information can set, for * example, the recovery directory. * * !!! * While nvi can handle any of the options settings of historic vi, * the converse is not true. Since users are going to have to have * files and environmental variables that work with both, we use nvi * versions of both the $HOME and local startup files if they exist, * otherwise the historic ones. * * !!! * For a discussion of permissions and when what .exrc files are * read, see the comment above the exrc_isok() function below. * * !!! * If the user started the historic of vi in $HOME, vi read the user's * .exrc file twice, as $HOME/.exrc and as ./.exrc. We avoid this, as * it's going to make some commands behave oddly, and I can't imagine * anyone depending on it. */ switch (exrc_isok(sp, &hsb, _PATH_SYSEXRC, 1, 0)) { case NOEXIST: case NOPERM: break; case RCOK: if (ex_run_file(sp, _PATH_SYSEXRC)) return (1); break; } /* Run the commands. */ if (EXCMD_RUNNING(sp->wp)) (void)ex_cmd(sp); if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) return (0); if ((p = getenv("NEXINIT")) != NULL) { CHAR2INT(sp, p, strlen(p) + 1, wp, wlen); if (ex_run_str(sp, "NEXINIT", wp, wlen - 1, 1, 0)) return (1); } else if ((p = getenv("EXINIT")) != NULL) { CHAR2INT(sp, p, strlen(p) + 1, wp, wlen); if (ex_run_str(sp, "EXINIT", wp, wlen - 1, 1, 0)) return (1); } else if ((p = getenv("HOME")) != NULL && *p) { (void)snprintf(path, sizeof(path), "%s/%s", p, _PATH_NEXRC); switch (exrc_isok(sp, &hsb, path, 0, 1)) { case NOEXIST: (void)snprintf(path, sizeof(path), "%s/%s", p, _PATH_EXRC); if (exrc_isok(sp, &hsb, path, 0, 1) == RCOK && ex_run_file(sp, path)) return (1); break; case NOPERM: break; case RCOK: if (ex_run_file(sp, path)) return (1); break; } } /* Run the commands. */ if (EXCMD_RUNNING(sp->wp)) (void)ex_cmd(sp); if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) return (0); /* Previous commands may have set the exrc option. */ if (O_ISSET(sp, O_EXRC)) { switch (exrc_isok(sp, &lsb, _PATH_NEXRC, 0, 0)) { case NOEXIST: if (exrc_isok(sp, &lsb, _PATH_EXRC, 0, 0) == RCOK && (lsb.st_dev != hsb.st_dev || lsb.st_ino != hsb.st_ino) && ex_run_file(sp, _PATH_EXRC)) return (1); break; case NOPERM: break; case RCOK: if ((lsb.st_dev != hsb.st_dev || lsb.st_ino != hsb.st_ino) && ex_run_file(sp, _PATH_NEXRC)) return (1); break; } /* Run the commands. */ if (EXCMD_RUNNING(sp->wp)) (void)ex_cmd(sp); if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) return (0); } return (0); } /* * ex_run_file -- * Set up a file of ex commands to run. */ static int ex_run_file(SCR *sp, char *name) { EXCMD cmd; CHAR_T *wp; size_t wlen; ex_cinit(sp, &cmd, C_SOURCE, 0, OOBLNO, OOBLNO, 0); CHAR2INT(sp, name, strlen(name)+1, wp, wlen); argv_exp0(sp, &cmd, wp, wlen - 1); return (ex_source(sp, &cmd)); } /* * ex_run_str -- * Set up a string of ex commands to run. * * PUBLIC: int ex_run_str __P((SCR *, char *, CHAR_T *, size_t, int, int)); */ int ex_run_str(SCR *sp, char *name, CHAR_T *str, size_t len, int ex_flags, int nocopy) { WIN *wp; EXCMD *ecp; wp = sp->wp; if (EXCMD_RUNNING(wp)) { CALLOC_RET(sp, ecp, EXCMD *, 1, sizeof(EXCMD)); LIST_INSERT_HEAD(&wp->ecq, ecp, q); } else ecp = &wp->excmd; F_INIT(ecp, ex_flags ? E_BLIGNORE | E_NOAUTO | E_NOPRDEF | E_VLITONLY : 0); if (nocopy) ecp->cp = str; else if ((ecp->cp = v_wstrdup(sp, str, len)) == NULL) return (1); ecp->clen = len; if (name == NULL) ecp->if_name = NULL; else { if ((ecp->if_name = v_strdup(sp, name, strlen(name))) == NULL) return (1); ecp->if_lno = 1; F_SET(ecp, E_NAMEDISCARD); } return (0); } /* * exrc_isok -- * Check a .exrc file for source-ability. * * !!! * Historically, vi read the $HOME and local .exrc files if they were owned * by the user's real ID, or the "sourceany" option was set, regardless of * any other considerations. We no longer support the sourceany option as * it's a security problem of mammoth proportions. We require the system * .exrc file to be owned by root, the $HOME .exrc file to be owned by the * user's effective ID (or that the user's effective ID be root) and the * local .exrc files to be owned by the user's effective ID. In all cases, * the file cannot be writeable by anyone other than its owner. * * In O'Reilly ("Learning the VI Editor", Fifth Ed., May 1992, page 106), * it notes that System V release 3.2 and later has an option "[no]exrc". * The behavior is that local .exrc files are read only if the exrc option * is set. The default for the exrc option was off, so, by default, local * .exrc files were not read. The problem this was intended to solve was * that System V permitted users to give away files, so there's no possible * ownership or writeability test to ensure that the file is safe. * * POSIX 1003.2-1992 standardized exrc as an option. It required the exrc * option to be off by default, thus local .exrc files are not to be read * by default. The Rationale noted (incorrectly) that this was a change * to historic practice, but correctly noted that a default of off improves * system security. POSIX also required that vi check the effective user * ID instead of the real user ID, which is why we've switched from historic * practice. * * We initialize the exrc variable to off. If it's turned on by the system * or $HOME .exrc files, and the local .exrc file passes the ownership and * writeability tests, then we read it. This breaks historic 4BSD practice, * but it gives us a measure of security on systems where users can give away * files. */ static enum rc exrc_isok(SCR *sp, struct stat *sbp, char *path, int rootown, int rootid) { enum { ROOTOWN, OWN, WRITER } etype; uid_t euid; int nf1, nf2; char *a, *b, buf[MAXPATHLEN]; /* Check for the file's existence. */ if (stat(path, sbp)) return (NOEXIST); /* Check ownership permissions. */ euid = geteuid(); if (!(rootown && sbp->st_uid == 0) && !(rootid && euid == 0) && sbp->st_uid != euid) { etype = rootown ? ROOTOWN : OWN; goto denied; } /* Check writeability. */ if (sbp->st_mode & (S_IWGRP | S_IWOTH)) { etype = WRITER; goto denied; } return (RCOK); denied: a = msg_print(sp, path, &nf1); if (strchr(path, '/') == NULL && getcwd(buf, sizeof(buf)) != NULL) { b = msg_print(sp, buf, &nf2); switch (etype) { case ROOTOWN: msgq(sp, M_ERR, "125|%s/%s: not sourced: not owned by you or root", b, a); break; case OWN: msgq(sp, M_ERR, "126|%s/%s: not sourced: not owned by you", b, a); break; case WRITER: msgq(sp, M_ERR, "127|%s/%s: not sourced: writeable by a user other than the owner", b, a); break; } if (nf2) FREE_SPACE(sp, b, 0); } else switch (etype) { case ROOTOWN: msgq(sp, M_ERR, "128|%s: not sourced: not owned by you or root", a); break; case OWN: msgq(sp, M_ERR, "129|%s: not sourced: not owned by you", a); break; case WRITER: msgq(sp, M_ERR, "130|%s: not sourced: writeable by a user other than the owner", a); break; } if (nf1) FREE_SPACE(sp, a, 0); return (NOPERM); } nvi-1.81.6/ex/ex_join.c0100644000076400001440000001100510720065506013662 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_join.c,v 10.17 2004/03/16 14:14:04 skimo Exp $ (Berkeley) $Date: 2004/03/16 14:14:04 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_join -- :[line [,line]] j[oin][!] [count] [flags] * Join lines. * * PUBLIC: int ex_join __P((SCR *, EXCMD *)); */ int ex_join(SCR *sp, EXCMD *cmdp) { db_recno_t from, to; size_t blen, clen, len, tlen; int echar, extra, first; CHAR_T *bp, *tbp; CHAR_T *p; NEEDFILE(sp, cmdp); from = cmdp->addr1.lno; to = cmdp->addr2.lno; /* Check for no lines to join. */ if (!db_exist(sp, from + 1)) { msgq(sp, M_ERR, "131|No following lines to join"); return (1); } GET_SPACE_RETW(sp, bp, blen, 256); /* * The count for the join command was off-by-one, * historically, to other counts for other commands. */ if (F_ISSET(cmdp, E_ADDR_DEF) || cmdp->addrcnt == 1) ++cmdp->addr2.lno; clen = tlen = 0; for (first = 1, from = cmdp->addr1.lno, to = cmdp->addr2.lno; from <= to; ++from) { /* * Get next line. Historic versions of vi allowed "10J" while * less than 10 lines from the end-of-file, so we do too. */ if (db_get(sp, from, 0, &p, &len)) { cmdp->addr2.lno = from - 1; break; } /* Empty lines just go away. */ if (len == 0) continue; /* * Get more space if necessary. Note, tlen isn't the length * of the new line, it's roughly the amount of space needed. * tbp - bp is the length of the new line. */ tlen += len + 2; ADD_SPACE_RETW(sp, bp, blen, tlen); tbp = bp + clen; /* * Historic practice: * * If force specified, join without modification. * If the current line ends with whitespace, strip leading * whitespace from the joined line. * If the next line starts with a ), do nothing. * If the current line ends with ., insert two spaces. * Else, insert one space. * * One change -- add ? and ! to the list of characters for * which we insert two spaces. I expect that POSIX 1003.2 * will require this as well. * * Echar is the last character in the last line joined. */ extra = 0; if (!first && !FL_ISSET(cmdp->iflags, E_C_FORCE)) { if (isblank(echar)) for (; len && isblank(*p); --len, ++p); else if (p[0] != ')') { if (strchr(".?!", echar)) { *tbp++ = ' '; ++clen; extra = 1; } *tbp++ = ' '; ++clen; for (; len && isblank(*p); --len, ++p); } } if (len != 0) { MEMCPYW(tbp, p, len); tbp += len; clen += len; echar = p[len - 1]; } else echar = ' '; /* * Historic practice for vi was to put the cursor at the first * inserted whitespace character, if there was one, or the * first character of the joined line, if there wasn't, or the * last character of the line if joined to an empty line. If * a count was specified, the cursor was moved as described * for the first line joined, ignoring subsequent lines. If * the join was a ':' command, the cursor was placed at the * first non-blank character of the line unless the cursor was * "attracted" to the end of line when the command was executed * in which case it moved to the new end of line. There are * probably several more special cases, but frankly, my dear, * I don't give a damn. This implementation puts the cursor * on the first inserted whitespace character, the first * character of the joined line, or the last character of the * line regardless. Note, if the cursor isn't on the joined * line (possible with : commands), it is reset to the starting * line. */ if (first) { sp->cno = (tbp - bp) - (1 + extra); first = 0; } else sp->cno = (tbp - bp) - len - (1 + extra); } sp->lno = cmdp->addr1.lno; /* Delete the joined lines. */ for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; to > from; --to) if (db_delete(sp, to)) goto err; /* If the original line changed, reset it. */ if (!first && db_set(sp, from, bp, tbp - bp)) { err: FREE_SPACEW(sp, bp, blen); return (1); } FREE_SPACEW(sp, bp, blen); sp->rptlines[L_JOINED] += (cmdp->addr2.lno - cmdp->addr1.lno) + 1; return (0); } nvi-1.81.6/ex/ex_map.c0100644000076400001440000000624310720065506013510 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_map.c,v 10.11 2001/06/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:17 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_map -- :map[!] [input] [replacement] * Map a key/string or display mapped keys. * * Historical note: * Historic vi maps were fairly bizarre, and likely to differ in * very subtle and strange ways from this implementation. Two * things worth noting are that vi would often hang or drop core * if the map was strange enough (ex: map X "xy$@x^V), or, simply * not work. One trick worth remembering is that if you put a * mark at the start of the map, e.g. map X mx"xy ...), or if you * put the map in a .exrc file, things would often work much better. * No clue why. * * PUBLIC: int ex_map __P((SCR *, EXCMD *)); */ int ex_map(SCR *sp, EXCMD *cmdp) { seq_t stype; CHAR_T *input, *p; stype = FL_ISSET(cmdp->iflags, E_C_FORCE) ? SEQ_INPUT : SEQ_COMMAND; switch (cmdp->argc) { case 0: if (seq_dump(sp, stype, 1) == 0) msgq(sp, M_INFO, stype == SEQ_INPUT ? "132|No input map entries" : "133|No command map entries"); return (0); case 2: input = cmdp->argv[0]->bp; break; default: abort(); } /* * If the mapped string is #[0-9]* (and wasn't quoted) then store the * function key mapping. If the screen specific routine has been set, * call it as well. Note, the SEQ_FUNCMAP type is persistent across * screen types, maybe the next screen type will get it right. */ if (input[0] == '#' && isdigit(input[1])) { for (p = input + 2; isdigit(*p); ++p); if (p[0] != '\0') goto nofunc; if (seq_set(sp, NULL, 0, input, cmdp->argv[0]->len, cmdp->argv[1]->bp, cmdp->argv[1]->len, stype, SEQ_FUNCMAP | SEQ_USERDEF)) return (1); return (sp->gp->scr_fmap == NULL ? 0 : sp->gp->scr_fmap(sp, stype, input, cmdp->argv[0]->len, cmdp->argv[1]->bp, cmdp->argv[1]->len)); } /* Some single keys may not be remapped in command mode. */ nofunc: if (stype == SEQ_COMMAND && input[1] == '\0') switch (KEY_VAL(sp, input[0])) { case K_COLON: case K_ESCAPE: case K_NL: msgq(sp, M_ERR, "134|The %s character may not be remapped", KEY_NAME(sp, input[0])); return (1); } return (seq_set(sp, NULL, 0, input, cmdp->argv[0]->len, cmdp->argv[1]->bp, cmdp->argv[1]->len, stype, SEQ_USERDEF)); } /* * ex_unmap -- (:unmap[!] key) * Unmap a key. * * PUBLIC: int ex_unmap __P((SCR *, EXCMD *)); */ int ex_unmap(SCR *sp, EXCMD *cmdp) { if (seq_delete(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len, FL_ISSET(cmdp->iflags, E_C_FORCE) ? SEQ_INPUT : SEQ_COMMAND)) { msgq_wstr(sp, M_INFO, cmdp->argv[0]->bp, "135|\"%s\" isn't currently mapped"); return (1); } return (0); } nvi-1.81.6/ex/ex_mark.c0100644000076400001440000000164510720065506013666 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_mark.c,v 10.9 2001/06/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:17 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_mark -- :mark char * :k char * Mark lines. * * * PUBLIC: int ex_mark __P((SCR *, EXCMD *)); */ int ex_mark(SCR *sp, EXCMD *cmdp) { NEEDFILE(sp, cmdp); if (cmdp->argv[0]->len != 1) { msgq(sp, M_ERR, "136|Mark names must be a single character"); return (1); } return (mark_set(sp, cmdp->argv[0]->bp[0], &cmdp->addr1, 1)); } nvi-1.81.6/ex/ex_mkexrc.c0100644000076400001440000000420010720065506014213 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_mkexrc.c,v 10.13 2001/06/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:17 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "pathnames.h" /* * ex_mkexrc -- :mkexrc[!] [file] * * Create (or overwrite) a .exrc file with the current info. * * PUBLIC: int ex_mkexrc __P((SCR *, EXCMD *)); */ int ex_mkexrc(SCR *sp, EXCMD *cmdp) { struct stat sb; FILE *fp; int fd, sverrno; char *fname; size_t flen; switch (cmdp->argc) { case 0: fname = _PATH_EXRC; break; case 1: INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, fname, flen); set_alt_name(sp, fname); break; default: abort(); } if (!FL_ISSET(cmdp->iflags, E_C_FORCE) && !stat(fname, &sb)) { msgq_str(sp, M_ERR, fname, "137|%s exists, not written; use ! to override"); return (1); } /* Create with max permissions of rw-r--r--. */ if ((fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0) { msgq_str(sp, M_SYSERR, fname, "%s"); return (1); } if ((fp = fdopen(fd, "w")) == NULL) { sverrno = errno; (void)close(fd); goto e2; } if (seq_save(sp, fp, "abbreviate ", SEQ_ABBREV) || ferror(fp)) goto e1; if (seq_save(sp, fp, "map ", SEQ_COMMAND) || ferror(fp)) goto e1; if (seq_save(sp, fp, "map! ", SEQ_INPUT) || ferror(fp)) goto e1; if (opts_save(sp, fp) || ferror(fp)) goto e1; if (fclose(fp)) { sverrno = errno; goto e2; } msgq_str(sp, M_INFO, fname, "138|New exrc file: %s"); return (0); e1: sverrno = errno; (void)fclose(fp); e2: errno = sverrno; msgq_str(sp, M_SYSERR, fname, "%s"); return (1); } nvi-1.81.6/ex/ex_move.c0100644000076400001440000001075310720065506013702 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_move.c,v 10.15 2001/06/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:17 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_copy -- :[line [,line]] co[py] line [flags] * Copy selected lines. * * PUBLIC: int ex_copy __P((SCR *, EXCMD *)); */ int ex_copy(SCR *sp, EXCMD *cmdp) { CB cb; MARK fm1, fm2, m, tm; db_recno_t cnt; int rval; rval = 0; NEEDFILE(sp, cmdp); /* * It's possible to copy things into the area that's being * copied, e.g. "2,5copy3" is legitimate. Save the text to * a cut buffer. */ fm1 = cmdp->addr1; fm2 = cmdp->addr2; memset(&cb, 0, sizeof(cb)); CIRCLEQ_INIT(&cb.textq); for (cnt = fm1.lno; cnt <= fm2.lno; ++cnt) if (cut_line(sp, cnt, 0, 0, &cb)) { rval = 1; goto err; } cb.flags |= CB_LMODE; /* Put the text into place. */ tm.lno = cmdp->lineno; tm.cno = 0; if (put(sp, &cb, NULL, &tm, &m, 1)) rval = 1; else { /* * Copy puts the cursor on the last line copied. The cursor * returned by the put routine is the first line put, not the * last, because that's the historic semantic of vi. */ cnt = (fm2.lno - fm1.lno) + 1; sp->lno = m.lno + (cnt - 1); sp->cno = 0; } err: text_lfree(&cb.textq); return (rval); } /* * ex_move -- :[line [,line]] mo[ve] line * Move selected lines. * * PUBLIC: int ex_move __P((SCR *, EXCMD *)); */ int ex_move(SCR *sp, EXCMD *cmdp) { LMARK *lmp; MARK fm1, fm2; db_recno_t cnt, diff, fl, tl, mfl, mtl; size_t blen, len; int mark_reset; CHAR_T *bp; CHAR_T *p; NEEDFILE(sp, cmdp); /* * It's not possible to move things into the area that's being * moved. */ fm1 = cmdp->addr1; fm2 = cmdp->addr2; if (cmdp->lineno >= fm1.lno && cmdp->lineno <= fm2.lno) { msgq(sp, M_ERR, "139|Destination line is inside move range"); return (1); } /* * Log the positions of any marks in the to-be-deleted lines. This * has to work with the logging code. What happens is that we log * the old mark positions, make the changes, then log the new mark * positions. Then the marks end up in the right positions no matter * which way the log is traversed. * * XXX * Reset the MARK_USERSET flag so that the log can undo the mark. * This isn't very clean, and should probably be fixed. */ fl = fm1.lno; tl = cmdp->lineno; /* Log the old positions of the marks. */ mark_reset = 0; for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->name != ABSMARK1 && lmp->lno >= fl && lmp->lno <= tl) { mark_reset = 1; F_CLR(lmp, MARK_USERSET); (void)log_mark(sp, lmp); } /* Get memory for the copy. */ GET_SPACE_RETW(sp, bp, blen, 256); /* Move the lines. */ diff = (fm2.lno - fm1.lno) + 1; if (tl > fl) { /* Destination > source. */ mfl = tl - diff; mtl = tl; for (cnt = diff; cnt--;) { if (db_get(sp, fl, DBG_FATAL, &p, &len)) return (1); BINC_RETW(sp, bp, blen, len); MEMCPYW(bp, p, len); if (db_append(sp, 1, tl, bp, len)) return (1); if (mark_reset) for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->name != ABSMARK1 && lmp->lno == fl) lmp->lno = tl + 1; if (db_delete(sp, fl)) return (1); } } else { /* Destination < source. */ mfl = tl; mtl = tl + diff; for (cnt = diff; cnt--;) { if (db_get(sp, fl, DBG_FATAL, &p, &len)) return (1); BINC_RETW(sp, bp, blen, len); MEMCPYW(bp, p, len); if (db_append(sp, 1, tl++, bp, len)) return (1); if (mark_reset) for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->name != ABSMARK1 && lmp->lno == fl) lmp->lno = tl; ++fl; if (db_delete(sp, fl)) return (1); } } FREE_SPACEW(sp, bp, blen); sp->lno = tl; /* Last line moved. */ sp->cno = 0; /* Log the new positions of the marks. */ if (mark_reset) for (lmp = sp->ep->marks.lh_first; lmp != NULL; lmp = lmp->q.le_next) if (lmp->name != ABSMARK1 && lmp->lno >= mfl && lmp->lno <= mtl) (void)log_mark(sp, lmp); sp->rptlines[L_MOVED] += diff; return (0); } nvi-1.81.6/ex/ex_open.c0100644000076400001440000000176510720065506013700 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_open.c,v 10.8 2001/06/25 15:19:17 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:17 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_open -- :[line] o[pen] [/pattern/] [flags] * * Switch to single line "open" mode. * * PUBLIC: int ex_open __P((SCR *, EXCMD *)); */ int ex_open(SCR *sp, EXCMD *cmdp) { /* If open option off, disallow open command. */ if (!O_ISSET(sp, O_OPEN)) { msgq(sp, M_ERR, "140|The open command requires that the open option be set"); return (1); } msgq(sp, M_ERR, "141|The open command is not yet implemented"); return (1); } nvi-1.81.6/ex/ex_perl.c0100644000076400001440000000323510720065506013673 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1995 * George V. Neville-Neil. All rights reserved. * Copyright (c) 1996 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_perl.c,v 8.11 2001/06/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:18 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_perl -- :[line [,line]] perl [command] * Run a command through the perl interpreter. * * ex_perldo -- :[line [,line]] perldo [command] * Run a set of lines through the perl interpreter. * * PUBLIC: int ex_perl __P((SCR*, EXCMD *)); */ int ex_perl(SCR *sp, EXCMD *cmdp) { #ifdef HAVE_PERL_INTERP CHAR_T *p; size_t len; /* Skip leading white space. */ if (cmdp->argc != 0) for (p = cmdp->argv[0]->bp, len = cmdp->argv[0]->len; len > 0; --len, ++p) if (!isblank(*p)) break; if (cmdp->argc == 0 || len == 0) { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } return (cmdp->cmd == &cmds[C_PERLCMD] ? perl_ex_perl(sp, p, len, cmdp->addr1.lno, cmdp->addr2.lno) : perl_ex_perldo(sp, p, len, cmdp->addr1.lno, cmdp->addr2.lno)); #else msgq(sp, M_ERR, "306|Vi was not loaded with a Perl interpreter"); return (1); #endif } nvi-1.81.6/ex/ex_preserve.c0100644000076400001440000000411510720065506014562 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_preserve.c,v 10.15 2001/06/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:18 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_preserve -- :pre[serve] * Push the file to recovery. * * PUBLIC: int ex_preserve __P((SCR *, EXCMD *)); */ int ex_preserve(SCR *sp, EXCMD *cmdp) { db_recno_t lno; NEEDFILE(sp, cmdp); if (!F_ISSET(sp->ep, F_RCV_ON)) { msgq(sp, M_ERR, "142|Preservation of this file not possible"); return (1); } /* If recovery not initialized, do so. */ if (F_ISSET(sp->ep, F_FIRSTMODIFY) && rcv_init(sp)) return (1); /* Force the file to be read in, in case it hasn't yet. */ if (db_last(sp, &lno)) return (1); /* Sync to disk. */ if (rcv_sync(sp, RCV_SNAPSHOT)) return (1); msgq(sp, M_INFO, "143|File preserved"); return (0); } /* * ex_recover -- :rec[over][!] file * Recover the file. * * PUBLIC: int ex_recover __P((SCR *, EXCMD *)); */ int ex_recover(SCR *sp, EXCMD *cmdp) { ARGS *ap; FREF *frp; char *np; size_t nlen; ap = cmdp->argv[0]; /* Set the alternate file name. */ INT2CHAR(sp, ap->bp, ap->len+1, np, nlen); set_alt_name(sp, np); /* * Check for modifications. Autowrite did not historically * affect :recover. */ if (file_m2(sp, FL_ISSET(cmdp->iflags, E_C_FORCE))) return (1); /* Get a file structure for the file. */ INT2CHAR(sp, ap->bp, ap->len+1, np, nlen); if ((frp = file_add(sp, np)) == NULL) return (1); /* Set the recover bit. */ F_SET(frp, FR_RECOVER); /* Switch files. */ if (file_init(sp, frp, NULL, FS_SETALT | (FL_ISSET(cmdp->iflags, E_C_FORCE) ? FS_FORCE : 0))) return (1); F_SET(sp, SC_FSWITCH); return (0); } nvi-1.81.6/ex/ex_print.c0100644000076400001440000001552510720065506014072 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_print.c,v 10.24 2001/07/29 19:07:29 skimo Exp $ (Berkeley) $Date: 2001/07/29 19:07:29 $"; #endif /* not lint */ #include #include #include #include #include #include #include #ifdef __STDC__ #include #else #include #endif #include "../common/common.h" static int ex_prchars __P((SCR *, const CHAR_T *, size_t *, size_t, u_int, int)); /* * ex_list -- :[line [,line]] l[ist] [count] [flags] * * Display the addressed lines such that the output is unambiguous. * * PUBLIC: int ex_list __P((SCR *, EXCMD *)); */ int ex_list(SCR *sp, EXCMD *cmdp) { if (ex_print(sp, cmdp, &cmdp->addr1, &cmdp->addr2, cmdp->iflags | E_C_LIST)) return (1); sp->lno = cmdp->addr2.lno; sp->cno = cmdp->addr2.cno; return (0); } /* * ex_number -- :[line [,line]] nu[mber] [count] [flags] * * Display the addressed lines with a leading line number. * * PUBLIC: int ex_number __P((SCR *, EXCMD *)); */ int ex_number(SCR *sp, EXCMD *cmdp) { if (ex_print(sp, cmdp, &cmdp->addr1, &cmdp->addr2, cmdp->iflags | E_C_HASH)) return (1); sp->lno = cmdp->addr2.lno; sp->cno = cmdp->addr2.cno; return (0); } /* * ex_pr -- :[line [,line]] p[rint] [count] [flags] * * Display the addressed lines. * * PUBLIC: int ex_pr __P((SCR *, EXCMD *)); */ int ex_pr(SCR *sp, EXCMD *cmdp) { if (ex_print(sp, cmdp, &cmdp->addr1, &cmdp->addr2, cmdp->iflags)) return (1); sp->lno = cmdp->addr2.lno; sp->cno = cmdp->addr2.cno; return (0); } /* * ex_print -- * Print the selected lines. * * PUBLIC: int ex_print __P((SCR *, EXCMD *, MARK *, MARK *, u_int32_t)); */ int ex_print(SCR *sp, EXCMD *cmdp, MARK *fp, MARK *tp, u_int32_t flags) { GS *gp; db_recno_t from, to; size_t col, len; CHAR_T *p; CHAR_T buf[10]; CHAR_T *wp; size_t wlen; NEEDFILE(sp, cmdp); gp = sp->gp; for (from = fp->lno, to = tp->lno; from <= to; ++from) { col = 0; /* * Display the line number. The %6 format is specified * by POSIX 1003.2, and is almost certainly large enough. * Check, though, just in case. */ if (LF_ISSET(E_C_HASH)) { if (from <= 999999) { SPRINTF(buf, SIZE(buf), L("%6ld "), from); p = buf; } else p = L("TOOBIG "); if (ex_prchars(sp, p, &col, 8, 0, 0)) return (1); } /* * Display the line. The format for E_C_PRINT isn't very good, * especially in handling end-of-line tabs, but they're almost * backward compatible. */ if (db_get(sp, from, DBG_FATAL, &p, &len)) return (1); if (len == 0 && !LF_ISSET(E_C_LIST)) (void)ex_puts(sp, "\n"); else if (ex_ldisplay(sp, p, len, col, flags)) return (1); if (INTERRUPTED(sp)) break; } return (0); } /* * ex_ldisplay -- * Display a line without any preceding number. * * PUBLIC: int ex_ldisplay __P((SCR *, const CHAR_T *, size_t, size_t, u_int)); */ int ex_ldisplay(SCR *sp, const CHAR_T *p, size_t len, size_t col, u_int flags) { if (len > 0 && ex_prchars(sp, p, &col, len, LF_ISSET(E_C_LIST), 0)) return (1); if (!INTERRUPTED(sp) && LF_ISSET(E_C_LIST)) { p = L("$"); if (ex_prchars(sp, p, &col, 1, LF_ISSET(E_C_LIST), 0)) return (1); } if (!INTERRUPTED(sp)) (void)ex_puts(sp, "\n"); return (0); } /* * ex_scprint -- * Display a line for the substitute with confirmation routine. * * PUBLIC: int ex_scprint __P((SCR *, MARK *, MARK *)); */ int ex_scprint(SCR *sp, MARK *fp, MARK *tp) { CHAR_T *p; size_t col, len; col = 0; if (O_ISSET(sp, O_NUMBER)) { p = L(" "); if (ex_prchars(sp, p, &col, 8, 0, 0)) return (1); } if (db_get(sp, fp->lno, DBG_FATAL, &p, &len)) return (1); if (ex_prchars(sp, p, &col, fp->cno, 0, ' ')) return (1); p += fp->cno; if (ex_prchars(sp, p, &col, tp->cno == fp->cno ? 1 : tp->cno - fp->cno, 0, '^')) return (1); if (INTERRUPTED(sp)) return (1); p = L("[ynq]"); /* XXX: should be msg_cat. */ if (ex_prchars(sp, p, &col, 5, 0, 0)) return (1); (void)ex_fflush(sp); return (0); } /* * ex_prchars -- * Local routine to dump characters to the screen. */ static int ex_prchars(SCR *sp, const CHAR_T *p, size_t *colp, size_t len, u_int flags, int repeatc) { CHAR_T ch; char *kp; GS *gp; size_t col, tlen, ts; if (O_ISSET(sp, O_LIST)) LF_SET(E_C_LIST); gp = sp->gp; ts = O_VAL(sp, O_TABSTOP); for (col = *colp; len--;) if ((ch = *p++) == L('\t') && !LF_ISSET(E_C_LIST)) for (tlen = ts - col % ts; col < sp->cols && tlen--; ++col) { (void)ex_printf(sp, "%c", repeatc ? repeatc : ' '); if (INTERRUPTED(sp)) goto intr; } else { /* XXXX */ if (INTISWIDE(ch)) { CHAR_T str[2] = {0, 0}; str[0] = ch; INT2CHAR(sp, str, 2, kp, tlen); } else { kp = KEY_NAME(sp, ch); tlen = KEY_LEN(sp, ch); } if (!repeatc && col + tlen < sp->cols) { (void)ex_puts(sp, kp); col += tlen; } else for (; tlen--; ++kp, ++col) { if (col == sp->cols) { col = 0; (void)ex_puts(sp, "\n"); } (void)ex_printf(sp, "%c", repeatc ? repeatc : *kp); if (INTERRUPTED(sp)) goto intr; } } intr: *colp = col; return (0); } /* * ex_printf -- * Ex's version of printf. * * PUBLIC: int ex_printf __P((SCR *, const char *, ...)); */ int #ifdef __STDC__ ex_printf(SCR *sp, const char *fmt, ...) #else ex_printf(sp, fmt, va_alist) SCR *sp; const char *fmt; va_dcl #endif { EX_PRIVATE *exp; va_list ap; size_t n; CHAR_T *kp; exp = EXP(sp); #ifdef __STDC__ va_start(ap, fmt); #else va_start(ap); #endif exp->obp_len += n = vsnprintf(exp->obp + exp->obp_len, sizeof(exp->obp) - exp->obp_len, fmt, ap); va_end(ap); /* Flush when reach a or half the buffer. */ if (exp->obp[exp->obp_len - 1] == '\n' || exp->obp_len > sizeof(exp->obp) / 2) (void)ex_fflush(sp); return (n); } /* * ex_puts -- * Ex's version of puts. * * PUBLIC: int ex_puts __P((SCR *, const char *)); */ int ex_puts(SCR *sp, const char *str) { EX_PRIVATE *exp; int doflush, n; exp = EXP(sp); /* Flush when reach a or the end of the buffer. */ for (doflush = n = 0; *str != '\0'; ++n) { if (exp->obp_len > sizeof(exp->obp)) (void)ex_fflush(sp); if ((exp->obp[exp->obp_len++] = *str++) == '\n') doflush = 1; } if (doflush) (void)ex_fflush(sp); return (n); } /* * ex_fflush -- * Ex's version of fflush. * * PUBLIC: int ex_fflush __P((SCR *sp)); */ int ex_fflush(SCR *sp) { EX_PRIVATE *exp; exp = EXP(sp); if (exp->obp_len != 0) { sp->wp->scr_msg(sp, M_NONE, exp->obp, exp->obp_len); exp->obp_len = 0; } return (0); } nvi-1.81.6/ex/ex_put.c0100644000076400001440000000200110720065506013527 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_put.c,v 10.8 2001/06/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:18 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_put -- [line] pu[t] [buffer] * Append a cut buffer into the file. * * PUBLIC: int ex_put __P((SCR *, EXCMD *)); */ int ex_put(SCR *sp, EXCMD *cmdp) { MARK m; NEEDFILE(sp, cmdp); m.lno = sp->lno; m.cno = sp->cno; if (put(sp, NULL, FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL, &cmdp->addr1, &m, 1)) return (1); sp->lno = m.lno; sp->cno = m.cno; return (0); } nvi-1.81.6/ex/ex_quit.c0100644000076400001440000000166310720065506013716 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_quit.c,v 10.8 2001/06/25 15:19:18 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:18 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_quit -- :quit[!] * Quit. * * PUBLIC: int ex_quit __P((SCR *, EXCMD *)); */ int ex_quit(SCR *sp, EXCMD *cmdp) { int force; force = FL_ISSET(cmdp->iflags, E_C_FORCE); /* Check for file modifications, or more files to edit. */ if (file_m2(sp, force) || ex_ncheck(sp, force)) return (1); F_SET(sp, force ? SC_EXIT_FORCE : SC_EXIT); return (0); } nvi-1.81.6/ex/ex_read.c0100644000076400001440000002034310720065506013643 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_read.c,v 10.44 2001/06/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:19 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_read -- :read [file] * :read [!cmd] * Read from a file or utility. * * !!! * Historical vi wouldn't undo a filter read, for no apparent reason. * * PUBLIC: int ex_read __P((SCR *, EXCMD *)); */ int ex_read(SCR *sp, EXCMD *cmdp) { enum { R_ARG, R_EXPANDARG, R_FILTER } which; struct stat sb; CHAR_T *arg; char *name; size_t nlen; EX_PRIVATE *exp; FILE *fp; FREF *frp; GS *gp; MARK rm; db_recno_t nlines; size_t arglen; int argc, rval; char *p; char *np; gp = sp->gp; /* * 0 args: read the current pathname. * 1 args: check for "read !arg". */ switch (cmdp->argc) { case 0: which = R_ARG; break; case 1: arg = cmdp->argv[0]->bp; arglen = cmdp->argv[0]->len; if (*arg == '!') { ++arg; --arglen; which = R_FILTER; /* Secure means no shell access. */ if (O_ISSET(sp, O_SECURE)) { ex_wemsg(sp, cmdp->cmd->name, EXM_SECURE_F); return (1); } } else which = R_EXPANDARG; break; default: abort(); /* NOTREACHED */ } /* Load a temporary file if no file being edited. */ if (sp->ep == NULL) { if ((frp = file_add(sp, NULL)) == NULL) return (1); if (file_init(sp, frp, NULL, 0)) return (1); } switch (which) { case R_FILTER: /* * File name and bang expand the user's argument. If * we don't get an additional argument, it's illegal. */ argc = cmdp->argc; if (argv_exp1(sp, cmdp, arg, arglen, 1)) return (1); if (argc == cmdp->argc) { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } argc = cmdp->argc - 1; /* Set the last bang command. */ exp = EXP(sp); if (exp->lastbcomm != NULL) free(exp->lastbcomm); if ((exp->lastbcomm = v_wstrdup(sp, cmdp->argv[argc]->bp, cmdp->argv[argc]->len)) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } /* * Vi redisplayed the user's argument if it changed, ex * always displayed a !, plus the user's argument if it * changed. */ if (F_ISSET(sp, SC_VI)) { if (F_ISSET(cmdp, E_MODIFY)) (void)vs_update(sp, "!", cmdp->argv[argc]->bp); } else { if (F_ISSET(cmdp, E_MODIFY)) (void)ex_printf(sp, "!%s\n", cmdp->argv[argc]->bp); else (void)ex_puts(sp, "!\n"); (void)ex_fflush(sp); } /* * Historically, filter reads as the first ex command didn't * wait for the user. If SC_SCR_EXWROTE not already set, set * the don't-wait flag. */ if (!F_ISSET(sp, SC_SCR_EXWROTE)) F_SET(sp, SC_EX_WAIT_NO); /* * Switch into ex canonical mode. The reason to restore the * original terminal modes for read filters is so that users * can do things like ":r! cat /dev/tty". * * !!! * We do not output an extra , so that we don't touch * the screen on a normal read. */ if (F_ISSET(sp, SC_VI)) { if (gp->scr_screen(sp, SC_EX)) { ex_wemsg(sp, cmdp->cmd->name, EXM_NOCANON_F); return (1); } /* * !!! * Historically, the read command doesn't switch to * the alternate X11 xterm screen, if doing a filter * read -- don't set SA_ALTERNATE. */ F_SET(sp, SC_SCR_EX | SC_SCR_EXWROTE); } if (ex_filter(sp, cmdp, &cmdp->addr1, NULL, &rm, cmdp->argv[argc]->bp, FILTER_READ)) return (1); /* The filter version of read set the autoprint flag. */ F_SET(cmdp, E_AUTOPRINT); /* * If in vi mode, move to the first nonblank. Might have * switched into ex mode, so saved the original SC_VI value. */ sp->lno = rm.lno; if (F_ISSET(sp, SC_VI)) { sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } return (0); case R_ARG: name = sp->frp->name; break; case R_EXPANDARG: if (argv_exp2(sp, cmdp, arg, arglen)) return (1); /* * 0 args: impossible. * 1 args: impossible (I hope). * 2 args: read it. * >2 args: object, too many args. * * The 1 args case depends on the argv_sexp() function refusing * to return success without at least one non-blank character. */ switch (cmdp->argc) { case 0: case 1: abort(); /* NOTREACHED */ case 2: INT2CHAR(sp, cmdp->argv[1]->bp, cmdp->argv[1]->len + 1, name, nlen); /* * !!! * Historically, the read and write commands renamed * "unnamed" files, or, if the file had a name, set * the alternate file name. */ if (F_ISSET(sp->frp, FR_TMPFILE) && !F_ISSET(sp->frp, FR_EXNAMED)) { if ((p = strdup(name)) != NULL) { free(sp->frp->name); sp->frp->name = p; } /* * The file has a real name, it's no longer a * temporary, clear the temporary file flags. */ F_CLR(sp->frp, FR_TMPEXIT | FR_TMPFILE); F_SET(sp->frp, FR_NAMECHANGE | FR_EXNAMED); /* Notify the screen. */ (void)sp->gp->scr_rename(sp, sp->frp->name, 1); name = sp->frp->name; } else { set_alt_name(sp, name); name = sp->alt_name; } break; default: ex_wemsg(sp, cmdp->argv[0]->bp, EXM_FILECOUNT); return (1); } break; } /* * !!! * Historically, vi did not permit reads from non-regular files, nor * did it distinguish between "read !" and "read!", so there was no * way to "force" it. We permit reading from named pipes too, since * they didn't exist when the original implementation of vi was done * and they seem a reasonable addition. */ if ((fp = fopen(name, "r")) == NULL || fstat(fileno(fp), &sb)) { msgq_str(sp, M_SYSERR, name, "%s"); return (1); } if (!S_ISFIFO(sb.st_mode) && !S_ISREG(sb.st_mode)) { (void)fclose(fp); msgq(sp, M_ERR, "145|Only regular files and named pipes may be read"); return (1); } /* Try and get a lock. */ if (file_lock(sp, NULL, NULL, fileno(fp), 0) == LOCK_UNAVAIL) msgq(sp, M_ERR, "146|%s: read lock was unavailable", name); rval = ex_readfp(sp, name, fp, &cmdp->addr1, &nlines, 0); /* * In vi, set the cursor to the first line read in, if anything read * in, otherwise, the address. (Historic vi set it to the line after * the address regardless, but since that line may not exist we don't * bother.) * * In ex, set the cursor to the last line read in, if anything read in, * otherwise, the address. */ if (F_ISSET(sp, SC_VI)) { sp->lno = cmdp->addr1.lno; if (nlines) ++sp->lno; } else sp->lno = cmdp->addr1.lno + nlines; return (rval); } /* * ex_readfp -- * Read lines into the file. * * PUBLIC: int ex_readfp __P((SCR *, char *, FILE *, MARK *, db_recno_t *, int)); */ int ex_readfp(SCR *sp, char *name, FILE *fp, MARK *fm, db_recno_t *nlinesp, int silent) { EX_PRIVATE *exp; GS *gp; db_recno_t lcnt, lno; size_t len; u_long ccnt; /* XXX: can't print off_t portably. */ int nf, rval; char *p; size_t wlen; CHAR_T *wp; gp = sp->gp; exp = EXP(sp); /* * Add in the lines from the output. Insertion starts at the line * following the address. */ ccnt = 0; lcnt = 0; p = "147|Reading..."; for (lno = fm->lno; !ex_getline(sp, fp, &len); ++lno, ++lcnt) { if ((lcnt + 1) % INTERRUPT_CHECK == 0) { if (INTERRUPTED(sp)) break; if (!silent) { gp->scr_busy(sp, p, p == NULL ? BUSY_UPDATE : BUSY_ON); p = NULL; } } FILE2INT5(sp, exp->ibcw, exp->ibp, len, wp, wlen); if (db_append(sp, 1, lno, wp, wlen)) goto err; ccnt += len; } if (ferror(fp) || fclose(fp)) goto err; /* Return the number of lines read in. */ if (nlinesp != NULL) *nlinesp = lcnt; if (!silent) { p = msg_print(sp, name, &nf); msgq(sp, M_INFO, "148|%s: %lu lines, %lu characters", p, lcnt, ccnt); if (nf) FREE_SPACE(sp, p, 0); } rval = 0; if (0) { err: msgq_str(sp, M_SYSERR, name, "%s"); (void)fclose(fp); rval = 1; } if (!silent) gp->scr_busy(sp, NULL, BUSY_OFF); return (rval); } nvi-1.81.6/ex/ex_screen.c0100644000076400001440000000465210720065506014214 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_screen.c,v 10.12 2001/06/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:19 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_bg -- :bg * Hide the screen. * * PUBLIC: int ex_bg __P((SCR *, EXCMD *)); */ int ex_bg(SCR *sp, EXCMD *cmdp) { return (vs_bg(sp)); } /* * ex_fg -- :fg [file] * Show the screen. * * PUBLIC: int ex_fg __P((SCR *, EXCMD *)); */ int ex_fg(SCR *sp, EXCMD *cmdp) { SCR *nsp; int newscreen; newscreen = F_ISSET(cmdp, E_NEWSCREEN); if (vs_fg(sp, &nsp, cmdp->argc ? cmdp->argv[0]->bp : NULL, newscreen)) return (1); /* Set up the switch. */ if (newscreen) { sp->nextdisp = nsp; F_SET(sp, SC_SSWITCH); } return (0); } /* * ex_resize -- :resize [+-]rows * Change the screen size. * * PUBLIC: int ex_resize __P((SCR *, EXCMD *)); */ int ex_resize(SCR *sp, EXCMD *cmdp) { adj_t adj; switch (FL_ISSET(cmdp->iflags, E_C_COUNT | E_C_COUNT_NEG | E_C_COUNT_POS)) { case E_C_COUNT: adj = A_SET; break; case E_C_COUNT | E_C_COUNT_NEG: adj = A_DECREASE; break; case E_C_COUNT | E_C_COUNT_POS: adj = A_INCREASE; break; default: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } return (vs_resize(sp, cmdp->count, adj)); } /* * ex_sdisplay -- * Display the list of screens. * * PUBLIC: int ex_sdisplay __P((SCR *)); */ int ex_sdisplay(SCR *sp) { GS *gp; SCR *tsp; int cnt, col, len, sep; gp = sp->gp; if ((tsp = gp->hq.cqh_first) == (void *)&gp->hq) { msgq(sp, M_INFO, "149|No background screens to display"); return (0); } col = len = sep = 0; for (cnt = 1; tsp != (void *)&gp->hq && !INTERRUPTED(sp); tsp = tsp->q.cqe_next) { col += len = strlen(tsp->frp->name) + sep; if (col >= sp->cols - 1) { col = len; sep = 0; (void)ex_puts(sp, "\n"); } else if (cnt != 1) { sep = 1; (void)ex_puts(sp, " "); } (void)ex_puts(sp, tsp->frp->name); ++cnt; } if (!INTERRUPTED(sp)) (void)ex_puts(sp, "\n"); return (0); } nvi-1.81.6/ex/ex_script.c0100644000076400001440000004154310720065506014241 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * This code is derived from software contributed to Berkeley by * Brian Hirt. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_script.c,v 10.38 2001/06/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:19 $"; #endif /* not lint */ #include #include #include #ifdef HAVE_SYS_SELECT_H #include #endif #include #ifdef HAVE_SYS5_PTY #include #endif #include #include #include #include #include #include /* XXX: OSF/1 bug: include before */ #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #include "script.h" #include "pathnames.h" static void sscr_check __P((SCR *)); static int sscr_getprompt __P((SCR *)); static int sscr_init __P((SCR *)); static int sscr_insert __P((SCR *)); static int sscr_matchprompt __P((SCR *, CHAR_T *, size_t, size_t *)); static int sscr_pty __P((int *, int *, char *, struct termios *, void *)); static int sscr_setprompt __P((SCR *, CHAR_T *, size_t)); /* * ex_script -- : sc[ript][!] [file] * Switch to script mode. * * PUBLIC: int ex_script __P((SCR *, EXCMD *)); */ int ex_script(SCR *sp, EXCMD *cmdp) { /* Vi only command. */ if (!F_ISSET(sp, SC_VI)) { msgq(sp, M_ERR, "150|The script command is only available in vi mode"); return (1); } /* Switch to the new file. */ if (cmdp->argc != 0 && ex_edit(sp, cmdp)) return (1); /* Create the shell, figure out the prompt. */ if (sscr_init(sp)) return (1); return (0); } /* * sscr_init -- * Create a pty setup for a shell. */ static int sscr_init(SCR *sp) { SCRIPT *sc; char *sh, *sh_path; /* We're going to need a shell. */ if (opts_empty(sp, O_SHELL, 0)) return (1); MALLOC_RET(sp, sc, SCRIPT *, sizeof(SCRIPT)); sp->script = sc; sc->sh_prompt = NULL; sc->sh_prompt_len = 0; /* * There are two different processes running through this code. * They are the shell and the parent. */ sc->sh_master = sc->sh_slave = -1; if (tcgetattr(STDIN_FILENO, &sc->sh_term) == -1) { msgq(sp, M_SYSERR, "tcgetattr"); goto err; } /* * Turn off output postprocessing and echo. */ sc->sh_term.c_oflag &= ~OPOST; sc->sh_term.c_cflag &= ~(ECHO|ECHOE|ECHONL|ECHOK); #ifdef TIOCGWINSZ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &sc->sh_win) == -1) { msgq(sp, M_SYSERR, "tcgetattr"); goto err; } if (sscr_pty(&sc->sh_master, &sc->sh_slave, sc->sh_name, &sc->sh_term, &sc->sh_win) == -1) { msgq(sp, M_SYSERR, "pty"); goto err; } #else if (sscr_pty(&sc->sh_master, &sc->sh_slave, sc->sh_name, &sc->sh_term, NULL) == -1) { msgq(sp, M_SYSERR, "pty"); goto err; } #endif /* * __TK__ huh? * Don't use vfork() here, because the signal semantics differ from * implementation to implementation. */ switch (sc->sh_pid = fork()) { case -1: /* Error. */ msgq(sp, M_SYSERR, "fork"); err: if (sc->sh_master != -1) (void)close(sc->sh_master); if (sc->sh_slave != -1) (void)close(sc->sh_slave); return (1); case 0: /* Utility. */ /* * XXX * So that shells that do command line editing turn it off. */ (void)setenv("TERM", "emacs", 1); (void)setenv("TERMCAP", "emacs:", 1); (void)setenv("EMACS", "t", 1); (void)setsid(); #ifdef TIOCSCTTY /* * 4.4BSD allocates a controlling terminal using the TIOCSCTTY * ioctl, not by opening a terminal device file. POSIX 1003.1 * doesn't define a portable way to do this. If TIOCSCTTY is * not available, hope that the open does it. */ (void)ioctl(sc->sh_slave, TIOCSCTTY, 0); #endif (void)close(sc->sh_master); (void)dup2(sc->sh_slave, STDIN_FILENO); (void)dup2(sc->sh_slave, STDOUT_FILENO); (void)dup2(sc->sh_slave, STDERR_FILENO); (void)close(sc->sh_slave); /* Assumes that all shells have -i. */ sh_path = O_STR(sp, O_SHELL); if ((sh = strrchr(sh_path, '/')) == NULL) sh = sh_path; else ++sh; execl(sh_path, sh, "-i", NULL); msgq_str(sp, M_SYSERR, sh_path, "execl: %s"); _exit(127); default: /* Parent. */ break; } if (sscr_getprompt(sp)) return (1); F_SET(sp, SC_SCRIPT); F_SET(sp->gp, G_SCRWIN); return (0); } /* * sscr_getprompt -- * Eat lines printed by the shell until a line with no trailing * carriage return comes; set the prompt from that line. */ static int sscr_getprompt(SCR *sp) { struct timeval tv; CHAR_T *endp, *p, *t, buf[1024]; SCRIPT *sc; fd_set fdset; db_recno_t lline; size_t llen, len; u_int value; int nr; FD_ZERO(&fdset); endp = buf; len = sizeof(buf); /* Wait up to a second for characters to read. */ tv.tv_sec = 5; tv.tv_usec = 0; sc = sp->script; FD_SET(sc->sh_master, &fdset); switch (select(sc->sh_master + 1, &fdset, NULL, NULL, &tv)) { case -1: /* Error or interrupt. */ msgq(sp, M_SYSERR, "select"); goto prompterr; case 0: /* Timeout */ msgq(sp, M_ERR, "Error: timed out"); goto prompterr; case 1: /* Characters to read. */ break; } /* Read the characters. */ more: len = sizeof(buf) - (endp - buf); switch (nr = read(sc->sh_master, endp, len)) { case 0: /* EOF. */ msgq(sp, M_ERR, "Error: shell: EOF"); goto prompterr; case -1: /* Error or interrupt. */ msgq(sp, M_SYSERR, "shell"); goto prompterr; default: endp += nr; break; } /* If any complete lines, push them into the file. */ for (p = t = buf; p < endp; ++p) { value = KEY_VAL(sp, *p); if (value == K_CR || value == K_NL) { if (db_last(sp, &lline) || db_append(sp, 0, lline, t, p - t)) goto prompterr; t = p + 1; } } if (p > buf) { MEMMOVE(buf, t, endp - t); endp = buf + (endp - t); } if (endp == buf) goto more; /* Wait up 1/10 of a second to make sure that we got it all. */ tv.tv_sec = 0; tv.tv_usec = 100000; switch (select(sc->sh_master + 1, &fdset, NULL, NULL, &tv)) { case -1: /* Error or interrupt. */ msgq(sp, M_SYSERR, "select"); goto prompterr; case 0: /* Timeout */ break; case 1: /* Characters to read. */ goto more; } /* Timed out, so theoretically we have a prompt. */ llen = endp - buf; endp = buf; /* Append the line into the file. */ if (db_last(sp, &lline) || db_append(sp, 0, lline, buf, llen)) { prompterr: sscr_end(sp); return (1); } return (sscr_setprompt(sp, buf, llen)); } /* * sscr_exec -- * Take a line and hand it off to the shell. * * PUBLIC: int sscr_exec __P((SCR *, db_recno_t)); */ int sscr_exec(SCR *sp, db_recno_t lno) { SCRIPT *sc; db_recno_t last_lno; size_t blen, len, last_len, tlen; int isempty, matchprompt, nw, rval; CHAR_T *bp; CHAR_T *p; /* If there's a prompt on the last line, append the command. */ if (db_last(sp, &last_lno)) return (1); if (db_get(sp, last_lno, DBG_FATAL, &p, &last_len)) return (1); if (sscr_matchprompt(sp, p, last_len, &tlen) && tlen == 0) { matchprompt = 1; GET_SPACE_RETW(sp, bp, blen, last_len + 128); MEMMOVEW(bp, p, last_len); } else matchprompt = 0; /* Get something to execute. */ if (db_eget(sp, lno, &p, &len, &isempty)) { if (isempty) goto empty; goto err1; } /* Empty lines aren't interesting. */ if (len == 0) goto empty; /* Delete any prompt. */ if (sscr_matchprompt(sp, p, len, &tlen)) { if (tlen == len) { empty: msgq(sp, M_BERR, "151|No command to execute"); goto err1; } p += (len - tlen); len = tlen; } /* Push the line to the shell. */ sc = sp->script; if ((nw = write(sc->sh_master, p, len)) != len) goto err2; rval = 0; if (write(sc->sh_master, "\n", 1) != 1) { err2: if (nw == 0) errno = EIO; msgq(sp, M_SYSERR, "shell"); goto err1; } if (matchprompt) { ADD_SPACE_RETW(sp, bp, blen, last_len + len); MEMMOVEW(bp + last_len, p, len); if (db_set(sp, last_lno, bp, last_len + len)) err1: rval = 1; } if (matchprompt) FREE_SPACEW(sp, bp, blen); return (rval); } /* * sscr_check_input - * Check whether any input from shell or passed set. * * PUBLIC: int sscr_check_input __P((SCR *sp, fd_set *rdfd, int maxfd)); */ int sscr_check_input(SCR *sp, fd_set *fdset, int maxfd) { fd_set rdfd; SCR *tsp; WIN *wp; wp = sp->wp; loop: memcpy(&rdfd, fdset, sizeof(fd_set)); for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (F_ISSET(sp, SC_SCRIPT)) { FD_SET(sp->script->sh_master, &rdfd); if (sp->script->sh_master > maxfd) maxfd = sp->script->sh_master; } switch (select(maxfd + 1, &rdfd, NULL, NULL, NULL)) { case 0: abort(); case -1: return 1; default: break; } for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (F_ISSET(sp, SC_SCRIPT) && FD_ISSET(sp->script->sh_master, &rdfd)) { if (sscr_input(sp)) return 1; goto loop; } return 0; } /* * sscr_input -- * Read any waiting shell input. * * PUBLIC: int sscr_input __P((SCR *)); */ int sscr_input(SCR *sp) { GS *gp; WIN *wp; struct timeval poll; fd_set rdfd; int maxfd; gp = sp->gp; wp = sp->wp; loop: maxfd = 0; FD_ZERO(&rdfd); poll.tv_sec = 0; poll.tv_usec = 0; /* Set up the input mask. */ for (sp = wp->scrq.cqh_first; sp != (void *)&wp->scrq; sp = sp->q.cqe_next) if (F_ISSET(sp, SC_SCRIPT)) { FD_SET(sp->script->sh_master, &rdfd); if (sp->script->sh_master > maxfd) maxfd = sp->script->sh_master; } /* Check for input. */ switch (select(maxfd + 1, &rdfd, NULL, NULL, &poll)) { case -1: msgq(sp, M_SYSERR, "select"); return (1); case 0: return (0); default: break; } /* Read the input. */ for (sp = wp->scrq.cqh_first; sp != (void *)&wp->scrq; sp = sp->q.cqe_next) if (F_ISSET(sp, SC_SCRIPT) && FD_ISSET(sp->script->sh_master, &rdfd) && sscr_insert(sp)) return (1); goto loop; } /* * sscr_insert -- * Take a line from the shell and insert it into the file. */ static int sscr_insert(SCR *sp) { struct timeval tv; CHAR_T *endp, *p, *t; SCRIPT *sc; fd_set rdfd; db_recno_t lno; size_t blen, len, tlen; u_int value; int nr, rval; CHAR_T *bp; /* Find out where the end of the file is. */ if (db_last(sp, &lno)) return (1); #define MINREAD 1024 GET_SPACE_RETW(sp, bp, blen, MINREAD); endp = bp; /* Read the characters. */ rval = 1; sc = sp->script; more: switch (nr = read(sc->sh_master, endp, MINREAD)) { case 0: /* EOF; shell just exited. */ sscr_end(sp); rval = 0; goto ret; case -1: /* Error or interrupt. */ msgq(sp, M_SYSERR, "shell"); goto ret; default: endp += nr; break; } /* Append the lines into the file. */ for (p = t = bp; p < endp; ++p) { value = KEY_VAL(sp, *p); if (value == K_CR || value == K_NL) { len = p - t; if (db_append(sp, 1, lno++, t, len)) goto ret; t = p + 1; } } if (p > t) { len = p - t; /* * If the last thing from the shell isn't another prompt, wait * up to 1/10 of a second for more stuff to show up, so that * we don't break the output into two separate lines. Don't * want to hang indefinitely because some program is hanging, * confused the shell, or whatever. */ if (!sscr_matchprompt(sp, t, len, &tlen) || tlen != 0) { tv.tv_sec = 0; tv.tv_usec = 100000; FD_ZERO(&rdfd); FD_SET(sc->sh_master, &rdfd); if (select(sc->sh_master + 1, &rdfd, NULL, NULL, &tv) == 1) { MEMMOVE(bp, t, len); endp = bp + len; goto more; } } if (sscr_setprompt(sp, t, len)) return (1); if (db_append(sp, 1, lno++, t, len)) goto ret; } /* The cursor moves to EOF. */ sp->lno = lno; sp->cno = len ? len - 1 : 0; rval = vs_refresh(sp, 1); ret: FREE_SPACEW(sp, bp, blen); return (rval); } /* * sscr_setprompt -- * * Set the prompt to the last line we got from the shell. * */ static int sscr_setprompt(SCR *sp, CHAR_T *buf, size_t len) { SCRIPT *sc; char *np; size_t nlen; sc = sp->script; if (sc->sh_prompt) free(sc->sh_prompt); MALLOC(sp, sc->sh_prompt, char *, len + 1); if (sc->sh_prompt == NULL) { sscr_end(sp); return (1); } INT2CHAR(sp, buf, len, np, nlen); memmove(sc->sh_prompt, np, nlen); sc->sh_prompt_len = len; sc->sh_prompt[len] = '\0'; return (0); } /* * sscr_matchprompt -- * Check to see if a line matches the prompt. Nul's indicate * parts that can change, in both content and size. */ static int sscr_matchprompt(SCR *sp, CHAR_T *lp, size_t line_len, size_t *lenp) { SCRIPT *sc; size_t prompt_len; char *pp; sc = sp->script; if (line_len < (prompt_len = sc->sh_prompt_len)) return (0); for (pp = sc->sh_prompt; prompt_len && line_len; --prompt_len, --line_len) { if (*pp == '\0') { for (; prompt_len && *pp == '\0'; --prompt_len, ++pp); if (!prompt_len) return (0); for (; line_len && *lp != *pp; --line_len, ++lp); if (!line_len) return (0); } if (*pp++ != *lp++) break; } if (prompt_len) return (0); if (lenp != NULL) *lenp = line_len; return (1); } /* * sscr_end -- * End the pipe to a shell. * * PUBLIC: int sscr_end __P((SCR *)); */ int sscr_end(SCR *sp) { SCRIPT *sc; if ((sc = sp->script) == NULL) return (0); /* Turn off the script flags. */ F_CLR(sp, SC_SCRIPT); sscr_check(sp); /* Close down the parent's file descriptors. */ if (sc->sh_master != -1) (void)close(sc->sh_master); if (sc->sh_slave != -1) (void)close(sc->sh_slave); /* This should have killed the child. */ (void)proc_wait(sp, (long)sc->sh_pid, "script-shell", 0, 0); /* Free memory. */ free(sc->sh_prompt); free(sc); sp->script = NULL; return (0); } /* * sscr_check -- * Set/clear the global scripting bit. */ static void sscr_check(SCR *sp) { GS *gp; WIN *wp; gp = sp->gp; wp = sp->wp; for (sp = wp->scrq.cqh_first; sp != (void *)&wp->scrq; sp = sp->q.cqe_next) if (F_ISSET(sp, SC_SCRIPT)) { F_SET(gp, G_SCRWIN); return; } F_CLR(gp, G_SCRWIN); } #ifdef HAVE_SYS5_PTY static int ptys_open __P((int, char *)); static int ptym_open __P((char *)); static int sscr_pty(int *amaster, int *aslave, char *name, struct termios *termp, void *winp) { int master, slave, ttygid; /* open master terminal */ if ((master = ptym_open(name)) < 0) { errno = ENOENT; /* out of ptys */ return (-1); } /* open slave terminal */ if ((slave = ptys_open(master, name)) >= 0) { *amaster = master; *aslave = slave; } else { errno = ENOENT; /* out of ptys */ return (-1); } if (termp) (void) tcsetattr(slave, TCSAFLUSH, termp); #ifdef TIOCSWINSZ if (winp != NULL) (void) ioctl(slave, TIOCSWINSZ, (struct winsize *)winp); #endif return (0); } /* * ptym_open -- * This function opens a master pty and returns the file descriptor * to it. pts_name is also returned which is the name of the slave. */ static int ptym_open(char *pts_name) { int fdm; char *ptr, *ptsname(); strcpy(pts_name, _PATH_SYSV_PTY); if ((fdm = open(pts_name, O_RDWR)) < 0 ) return (-1); if (grantpt(fdm) < 0) { close(fdm); return (-2); } if (unlockpt(fdm) < 0) { close(fdm); return (-3); } if (unlockpt(fdm) < 0) { close(fdm); return (-3); } /* get slave's name */ if ((ptr = ptsname(fdm)) == NULL) { close(fdm); return (-3); } strcpy(pts_name, ptr); return (fdm); } /* * ptys_open -- * This function opens the slave pty. */ static int ptys_open(int fdm, char *pts_name) { int fds; if ((fds = open(pts_name, O_RDWR)) < 0) { close(fdm); return (-5); } if (ioctl(fds, I_PUSH, "ptem") < 0) { close(fds); close(fdm); return (-6); } if (ioctl(fds, I_PUSH, "ldterm") < 0) { close(fds); close(fdm); return (-7); } if (ioctl(fds, I_PUSH, "ttcompat") < 0) { close(fds); close(fdm); return (-8); } return (fds); } #else /* !HAVE_SYS5_PTY */ static int sscr_pty(amaster, aslave, name, termp, winp) int *amaster, *aslave; char *name; struct termios *termp; void *winp; { static char line[] = "/dev/ptyXX"; register char *cp1, *cp2; register int master, slave, ttygid; struct group *gr; if ((gr = getgrnam("tty")) != NULL) ttygid = gr->gr_gid; else ttygid = -1; for (cp1 = "pqrs"; *cp1; cp1++) { line[8] = *cp1; for (cp2 = "0123456789abcdef"; *cp2; cp2++) { line[5] = 'p'; line[9] = *cp2; if ((master = open(line, O_RDWR, 0)) == -1) { if (errno == ENOENT) return (-1); /* out of ptys */ } else { line[5] = 't'; (void) chown(line, getuid(), ttygid); (void) chmod(line, S_IRUSR|S_IWUSR|S_IWGRP); #ifdef HAVE_REVOKE (void) revoke(line); #endif if ((slave = open(line, O_RDWR, 0)) != -1) { *amaster = master; *aslave = slave; if (name) strcpy(name, line); if (termp) (void) tcsetattr(slave, TCSAFLUSH, termp); #ifdef TIOCSWINSZ if (winp) (void) ioctl(slave, TIOCSWINSZ, (char *)winp); #endif return (0); } (void) close(master); } } } errno = ENOENT; /* out of ptys */ return (-1); } #endif /* HAVE_SYS5_PTY */ nvi-1.81.6/ex/ex_set.c0100644000076400001440000000156210720065506013525 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_set.c,v 10.8 2001/06/25 15:19:19 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:19 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_set -- :set * Ex set option. * * PUBLIC: int ex_set __P((SCR *, EXCMD *)); */ int ex_set(SCR *sp, EXCMD *cmdp) { switch(cmdp->argc) { case 0: opts_dump(sp, CHANGED_DISPLAY); break; default: if (opts_set(sp, cmdp->argv, cmdp->cmd->usage)) return (1); break; } return (0); } nvi-1.81.6/ex/ex_shell.c0100644000076400001440000001720710720065506014044 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_shell.c,v 10.42 2003/11/05 17:11:54 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:11:54 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" static const char *sigmsg __P((int)); /* * ex_shell -- :sh[ell] * Invoke the program named in the SHELL environment variable * with the argument -i. * * PUBLIC: int ex_shell __P((SCR *, EXCMD *)); */ int ex_shell(SCR *sp, EXCMD *cmdp) { int rval; char buf[MAXPATHLEN]; /* We'll need a shell. */ if (opts_empty(sp, O_SHELL, 0)) return (1); /* * XXX * Assumes all shells use -i. */ (void)snprintf(buf, sizeof(buf), "%s -i", O_STR(sp, O_SHELL)); /* Restore the window name. */ (void)sp->gp->scr_rename(sp, NULL, 0); /* If we're still in a vi screen, move out explicitly. */ rval = ex_exec_proc(sp, cmdp, buf, NULL, !F_ISSET(sp, SC_SCR_EXWROTE)); /* Set the window name. */ (void)sp->gp->scr_rename(sp, sp->frp->name, 1); /* * !!! * Historically, vi didn't require a continue message after the * return of the shell. Match it. */ F_SET(sp, SC_EX_WAIT_NO); return (rval); } /* * ex_exec_proc -- * Run a separate process. * * PUBLIC: int ex_exec_proc __P((SCR *, EXCMD *, char *, const char *, int)); */ int ex_exec_proc(SCR *sp, EXCMD *cmdp, char *cmd, const char *msg, int need_newline) { GS *gp; const char *name; pid_t pid; gp = sp->gp; /* We'll need a shell. */ if (opts_empty(sp, O_SHELL, 0)) return (1); /* Enter ex mode. */ if (F_ISSET(sp, SC_VI)) { if (gp->scr_screen(sp, SC_EX)) { ex_wemsg(sp, cmdp->cmd->name, EXM_NOCANON); return (1); } (void)gp->scr_attr(sp, SA_ALTERNATE, 0); F_SET(sp, SC_SCR_EX | SC_SCR_EXWROTE); } /* Put out additional newline, message. */ if (need_newline) (void)ex_puts(sp, "\n"); if (msg != NULL) { (void)ex_puts(sp, msg); (void)ex_puts(sp, "\n"); } (void)ex_fflush(sp); switch (pid = vfork()) { case -1: /* Error. */ msgq(sp, M_SYSERR, "vfork"); return (1); case 0: /* Utility. */ if (gp->scr_child) gp->scr_child(sp); if ((name = strrchr(O_STR(sp, O_SHELL), '/')) == NULL) name = O_STR(sp, O_SHELL); else ++name; execl(O_STR(sp, O_SHELL), name, "-c", cmd, (char *)NULL); msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s"); _exit(127); /* NOTREACHED */ default: /* Parent. */ return (proc_wait(sp, (long)pid, cmd, 0, 0)); } /* NOTREACHED */ } /* * proc_wait -- * Wait for one of the processes. * * !!! * The pid_t type varies in size from a short to a long depending on the * system. It has to be cast into something or the standard promotion * rules get you. I'm using a long based on the belief that nobody is * going to make it unsigned and it's unlikely to be a quad. * * PUBLIC: int proc_wait __P((SCR *, long, const char *, int, int)); */ int proc_wait(SCR *sp, long int pid, const char *cmd, int silent, int okpipe) { size_t len; int nf, pstat; char *p; /* Wait for the utility, ignoring interruptions. */ for (;;) { errno = 0; if (waitpid((pid_t)pid, &pstat, 0) != -1) break; if (errno != EINTR) { msgq(sp, M_SYSERR, "waitpid"); return (1); } } /* * Display the utility's exit status. Ignore SIGPIPE from the * parent-writer, as that only means that the utility chose to * exit before reading all of its input. */ if (WIFSIGNALED(pstat) && (!okpipe || WTERMSIG(pstat) != SIGPIPE)) { for (; isblank(*cmd); ++cmd); p = msg_print(sp, cmd, &nf); len = strlen(p); msgq(sp, M_ERR, "%.*s%s: received signal: %s%s", MIN(len, 20), p, len > 20 ? " ..." : "", sigmsg(WTERMSIG(pstat)), WCOREDUMP(pstat) ? "; core dumped" : ""); if (nf) FREE_SPACE(sp, p, 0); return (1); } if (WIFEXITED(pstat) && WEXITSTATUS(pstat)) { /* * Remain silent for "normal" errors when doing shell file * name expansions, they almost certainly indicate nothing * more than a failure to match. * * Remain silent for vi read filter errors. It's historic * practice. */ if (!silent) { for (; isblank(*cmd); ++cmd); p = msg_print(sp, cmd, &nf); len = strlen(p); msgq(sp, M_ERR, "%.*s%s: exited with status %d", MIN(len, 20), p, len > 20 ? " ..." : "", WEXITSTATUS(pstat)); if (nf) FREE_SPACE(sp, p, 0); } return (1); } return (0); } /* * XXX * The sys_siglist[] table in the C library has this information, but there's * no portable way to get to it. (Believe me, I tried.) */ typedef struct _sigs { int number; /* signal number */ char *message; /* related message */ } SIGS; SIGS const sigs[] = { #ifdef SIGABRT SIGABRT, "Abort trap", #endif #ifdef SIGALRM SIGALRM, "Alarm clock", #endif #ifdef SIGBUS SIGBUS, "Bus error", #endif #ifdef SIGCLD SIGCLD, "Child exited or stopped", #endif #ifdef SIGCHLD SIGCHLD, "Child exited", #endif #ifdef SIGCONT SIGCONT, "Continued", #endif #ifdef SIGDANGER SIGDANGER, "System crash imminent", #endif #ifdef SIGEMT SIGEMT, "EMT trap", #endif #ifdef SIGFPE SIGFPE, "Floating point exception", #endif #ifdef SIGGRANT SIGGRANT, "HFT monitor mode granted", #endif #ifdef SIGHUP SIGHUP, "Hangup", #endif #ifdef SIGILL SIGILL, "Illegal instruction", #endif #ifdef SIGINFO SIGINFO, "Information request", #endif #ifdef SIGINT SIGINT, "Interrupt", #endif #ifdef SIGIO SIGIO, "I/O possible", #endif #ifdef SIGIOT SIGIOT, "IOT trap", #endif #ifdef SIGKILL SIGKILL, "Killed", #endif #ifdef SIGLOST SIGLOST, "Record lock", #endif #ifdef SIGMIGRATE SIGMIGRATE, "Migrate process to another CPU", #endif #ifdef SIGMSG SIGMSG, "HFT input data pending", #endif #ifdef SIGPIPE SIGPIPE, "Broken pipe", #endif #ifdef SIGPOLL SIGPOLL, "I/O possible", #endif #ifdef SIGPRE SIGPRE, "Programming error", #endif #ifdef SIGPROF SIGPROF, "Profiling timer expired", #endif #ifdef SIGPWR SIGPWR, "Power failure imminent", #endif #ifdef SIGRETRACT SIGRETRACT, "HFT monitor mode retracted", #endif #ifdef SIGQUIT SIGQUIT, "Quit", #endif #ifdef SIGSAK SIGSAK, "Secure Attention Key", #endif #ifdef SIGSEGV SIGSEGV, "Segmentation fault", #endif #ifdef SIGSOUND SIGSOUND, "HFT sound sequence completed", #endif #ifdef SIGSTOP SIGSTOP, "Suspended (signal)", #endif #ifdef SIGSYS SIGSYS, "Bad system call", #endif #ifdef SIGTERM SIGTERM, "Terminated", #endif #ifdef SIGTRAP SIGTRAP, "Trace/BPT trap", #endif #ifdef SIGTSTP SIGTSTP, "Suspended", #endif #ifdef SIGTTIN SIGTTIN, "Stopped (tty input)", #endif #ifdef SIGTTOU SIGTTOU, "Stopped (tty output)", #endif #ifdef SIGURG SIGURG, "Urgent I/O condition", #endif #ifdef SIGUSR1 SIGUSR1, "User defined signal 1", #endif #ifdef SIGUSR2 SIGUSR2, "User defined signal 2", #endif #ifdef SIGVTALRM SIGVTALRM, "Virtual timer expired", #endif #ifdef SIGWINCH SIGWINCH, "Window size changes", #endif #ifdef SIGXCPU SIGXCPU, "Cputime limit exceeded", #endif #ifdef SIGXFSZ SIGXFSZ, "Filesize limit exceeded", #endif }; /* * sigmsg -- * Return a pointer to a message describing a signal. */ static const char * sigmsg(int signo) { static char buf[40]; const SIGS *sigp; int n; for (n = 0, sigp = &sigs[0]; n < sizeof(sigs) / sizeof(sigs[0]); ++n, ++sigp) if (sigp->number == signo) return (sigp->message); (void)snprintf(buf, sizeof(buf), "Unknown signal: %d", signo); return (buf); } nvi-1.81.6/ex/ex_shift.c0100644000076400001440000001077010720065506014050 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_shift.c,v 10.17 2001/06/25 15:19:20 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:20 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" enum which {LEFT, RIGHT}; static int shift __P((SCR *, EXCMD *, enum which)); /* * ex_shiftl -- :<[<...] * * * PUBLIC: int ex_shiftl __P((SCR *, EXCMD *)); */ int ex_shiftl(SCR *sp, EXCMD *cmdp) { return (shift(sp, cmdp, LEFT)); } /* * ex_shiftr -- :>[>...] * * PUBLIC: int ex_shiftr __P((SCR *, EXCMD *)); */ int ex_shiftr(SCR *sp, EXCMD *cmdp) { return (shift(sp, cmdp, RIGHT)); } /* * shift -- * Ex shift support. */ static int shift(SCR *sp, EXCMD *cmdp, enum which rl) { db_recno_t from, to; size_t blen, len, newcol, newidx, oldcol, oldidx, sw; int curset; CHAR_T *p; CHAR_T *bp, *tbp; NEEDFILE(sp, cmdp); if (O_VAL(sp, O_SHIFTWIDTH) == 0) { msgq(sp, M_INFO, "152|shiftwidth option set to 0"); return (0); } /* Copy the lines being shifted into the unnamed buffer. */ if (cut(sp, NULL, &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE)) return (1); /* * The historic version of vi permitted the user to string any number * of '>' or '<' characters together, resulting in an indent of the * appropriate levels. There's a special hack in ex_cmd() so that * cmdp->argv[0] points to the string of '>' or '<' characters. * * Q: What's the difference between the people adding features * to vi and the Girl Scouts? * A: The Girl Scouts have mint cookies and adult supervision. */ for (p = cmdp->argv[0]->bp, sw = 0; *p == '>' || *p == '<'; ++p) sw += O_VAL(sp, O_SHIFTWIDTH); GET_SPACE_RETW(sp, bp, blen, 256); curset = 0; for (from = cmdp->addr1.lno, to = cmdp->addr2.lno; from <= to; ++from) { if (db_get(sp, from, DBG_FATAL, &p, &len)) goto err; if (!len) { if (sp->lno == from) curset = 1; continue; } /* * Calculate the old indent amount and the number of * characters it used. */ for (oldidx = 0, oldcol = 0; oldidx < len; ++oldidx) if (p[oldidx] == ' ') ++oldcol; else if (p[oldidx] == '\t') oldcol += O_VAL(sp, O_TABSTOP) - oldcol % O_VAL(sp, O_TABSTOP); else break; /* Calculate the new indent amount. */ if (rl == RIGHT) newcol = oldcol + sw; else { newcol = oldcol < sw ? 0 : oldcol - sw; if (newcol == oldcol) { if (sp->lno == from) curset = 1; continue; } } /* Get a buffer that will hold the new line. */ ADD_SPACE_RETW(sp, bp, blen, newcol + len); /* * Build a new indent string and count the number of * characters it uses. */ for (tbp = bp, newidx = 0; newcol >= O_VAL(sp, O_TABSTOP); ++newidx) { *tbp++ = '\t'; newcol -= O_VAL(sp, O_TABSTOP); } for (; newcol > 0; --newcol, ++newidx) *tbp++ = ' '; /* Add the original line. */ MEMCPYW(tbp, p + oldidx, len - oldidx); /* Set the replacement line. */ if (db_set(sp, from, bp, (tbp + (len - oldidx)) - bp)) { err: FREE_SPACEW(sp, bp, blen); return (1); } /* * !!! * The shift command in historic vi had the usual bizarre * collection of cursor semantics. If called from vi, the * cursor was repositioned to the first non-blank character * of the lowest numbered line shifted. If called from ex, * the cursor was repositioned to the first non-blank of the * highest numbered line shifted. Here, if the cursor isn't * part of the set of lines that are moved, move it to the * first non-blank of the last line shifted. (This makes * ":3>>" in vi work reasonably.) If the cursor is part of * the shifted lines, it doesn't get moved at all. This * permits shifting of marked areas, i.e. ">'a." shifts the * marked area twice, something that couldn't be done with * historic vi. */ if (sp->lno == from) { curset = 1; if (newidx > oldidx) sp->cno += newidx - oldidx; else if (sp->cno >= oldidx - newidx) sp->cno -= oldidx - newidx; } } if (!curset) { sp->lno = to; sp->cno = 0; (void)nonblank(sp, to, &sp->cno); } FREE_SPACEW(sp, bp, blen); sp->rptlines[L_SHIFT] += cmdp->addr2.lno - cmdp->addr1.lno + 1; return (0); } nvi-1.81.6/ex/ex_source.c0100644000076400001440000000436710720065506014240 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_source.c,v 10.16 2001/08/18 21:49:58 skimo Exp $ (Berkeley) $Date: 2001/08/18 21:49:58 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_source -- :source file * Execute ex commands from a file. * * PUBLIC: int ex_source __P((SCR *, EXCMD *)); */ int ex_source(SCR *sp, EXCMD *cmdp) { struct stat sb; int fd, len; char *bp; char *name; size_t nlen; CHAR_T *wp, *dp; size_t wlen; INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, name, nlen); if ((fd = open(name, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) goto err; /* * XXX * I'd like to test to see if the file is too large to malloc. Since * we don't know what size or type off_t's or size_t's are, what the * largest unsigned integral type is, or what random insanity the local * C compiler will perpetrate, doing the comparison in a portable way * is flatly impossible. So, put an fairly unreasonable limit on it, * I don't want to be dropping core here. */ #define MEGABYTE 1048576 if (sb.st_size > MEGABYTE) { errno = ENOMEM; goto err; } MALLOC(sp, bp, char *, (size_t)sb.st_size + 1); if (bp == NULL) { (void)close(fd); return (1); } bp[sb.st_size] = '\0'; /* Read the file into memory. */ len = read(fd, bp, (int)sb.st_size); (void)close(fd); if (len == -1 || len != sb.st_size) { if (len != sb.st_size) errno = EIO; free(bp); err: msgq_str(sp, M_SYSERR, name, "%s"); return (1); } if (CHAR2INT(sp, bp, (size_t)sb.st_size + 1, wp, wlen)) msgq(sp, M_ERR, "323|Invalid input. Truncated."); dp = v_wstrdup(sp, wp, wlen - 1); free(bp); /* Put it on the ex queue. */ INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len + 1, name, nlen); return (ex_run_str(sp, name, dp, wlen - 1, 1, 1)); } nvi-1.81.6/ex/ex_stop.c0100644000076400001440000000206310720065506013714 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_stop.c,v 10.11 2001/06/25 15:19:20 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:20 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_stop -- :stop[!] * :suspend[!] * Suspend execution. * * PUBLIC: int ex_stop __P((SCR *, EXCMD *)); */ int ex_stop(SCR *sp, EXCMD *cmdp) { int allowed; /* For some strange reason, the force flag turns off autowrite. */ if (!FL_ISSET(cmdp->iflags, E_C_FORCE) && file_aw(sp, FS_ALL)) return (1); if (sp->gp->scr_suspend(sp, &allowed)) return (1); if (!allowed) ex_emsg(sp, NULL, EXM_NOSUSPEND); return (0); } nvi-1.81.6/ex/ex_subst.c0100644000076400001440000010571710720065506014101 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_subst.c,v 10.50 2002/02/09 21:18:23 skimo Exp $ (Berkeley) $Date: 2002/02/09 21:18:23 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #define SUB_FIRST 0x01 /* The 'r' flag isn't reasonable. */ #define SUB_MUSTSETR 0x02 /* The 'r' flag is required. */ static int re_conv __P((SCR *, CHAR_T **, size_t *, int *)); static int re_cscope_conv __P((SCR *, CHAR_T **, size_t *, int *)); static int re_sub __P((SCR *, CHAR_T *, CHAR_T **, size_t *, size_t *, regmatch_t [10])); static int re_tag_conv __P((SCR *, CHAR_T **, size_t *, int *)); static int s __P((SCR *, EXCMD *, CHAR_T *, regex_t *, u_int)); /* * ex_s -- * [line [,line]] s[ubstitute] [[/;]pat[/;]/repl[/;] [cgr] [count] [#lp]] * * Substitute on lines matching a pattern. * * PUBLIC: int ex_s __P((SCR *, EXCMD *)); */ int ex_s(SCR *sp, EXCMD *cmdp) { regex_t *re; size_t blen, len; u_int flags; int delim; CHAR_T *bp, *p, *ptrn, *rep, *t; /* * Skip leading white space. * * !!! * Historic vi allowed any non-alphanumeric to serve as the * substitution command delimiter. * * !!! * If the arguments are empty, it's the same as &, i.e. we * repeat the last substitution. */ if (cmdp->argc == 0) goto subagain; for (p = cmdp->argv[0]->bp, len = cmdp->argv[0]->len; len > 0; --len, ++p) { if (!isblank(*p)) break; } if (len == 0) subagain: return (ex_subagain(sp, cmdp)); delim = *p++; if (isalnum(delim) || delim == '\\') return (s(sp, cmdp, p, &sp->subre_c, SUB_MUSTSETR)); /* * !!! * The full-blown substitute command reset the remembered * state of the 'c' and 'g' suffices. */ sp->c_suffix = sp->g_suffix = 0; /* * Get the pattern string, toss escaping characters. * * !!! * Historic vi accepted any of the following forms: * * :s/abc/def/ change "abc" to "def" * :s/abc/def change "abc" to "def" * :s/abc/ delete "abc" * :s/abc delete "abc" * * QUOTING NOTE: * * Only toss an escaping character if it escapes a delimiter. * This means that "s/A/\\\\f" replaces "A" with "\\f". It * would be nice to be more regular, i.e. for each layer of * escaping a single escaping character is removed, but that's * not how the historic vi worked. */ for (ptrn = t = p;;) { if (p[0] == '\0' || p[0] == delim) { if (p[0] == delim) ++p; /* * !!! * Nul terminate the pattern string -- it's passed * to regcomp which doesn't understand anything else. */ *t = '\0'; break; } if (p[0] == '\\') if (p[1] == delim) ++p; else if (p[1] == '\\') *t++ = *p++; *t++ = *p++; } /* * If the pattern string is empty, use the last RE (not just the * last substitution RE). */ if (*ptrn == '\0') { if (sp->re == NULL) { ex_emsg(sp, NULL, EXM_NOPREVRE); return (1); } /* Re-compile the RE if necessary. */ if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp, sp->re, sp->re_len, NULL, NULL, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); flags = 0; } else { /* * !!! * Compile the RE. Historic practice is that substitutes set * the search direction as well as both substitute and search * RE's. We compile the RE twice, as we don't want to bother * ref counting the pattern string and (opaque) structure. */ if (re_compile(sp, ptrn, t - ptrn, &sp->re, &sp->re_len, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); if (re_compile(sp, ptrn, t - ptrn, &sp->subre, &sp->subre_len, &sp->subre_c, SEARCH_CSUBST | SEARCH_MSG)) return (1); flags = SUB_FIRST; sp->searchdir = FORWARD; } re = &sp->re_c; /* * Get the replacement string. * * The special character & (\& if O_MAGIC not set) matches the * entire RE. No handling of & is required here, it's done by * re_sub(). * * The special character ~ (\~ if O_MAGIC not set) inserts the * previous replacement string into this replacement string. * Count ~'s to figure out how much space we need. We could * special case nonexistent last patterns or whether or not * O_MAGIC is set, but it's probably not worth the effort. * * QUOTING NOTE: * * Only toss an escaping character if it escapes a delimiter or * if O_MAGIC is set and it escapes a tilde. * * !!! * If the entire replacement pattern is "%", then use the last * replacement pattern. This semantic was added to vi in System * V and then percolated elsewhere, presumably around the time * that it was added to their version of ed(1). */ if (p[0] == L('\0') || p[0] == delim) { if (p[0] == delim) ++p; if (sp->repl != NULL) free(sp->repl); sp->repl = NULL; sp->repl_len = 0; } else if (p[0] == L('%') && (p[1] == L('\0') || p[1] == delim)) p += p[1] == delim ? 2 : 1; else { for (rep = p, len = 0; p[0] != L('\0') && p[0] != delim; ++p, ++len) if (p[0] == L('~')) len += sp->repl_len; GET_SPACE_RETW(sp, bp, blen, len); for (t = bp, len = 0, p = rep;;) { if (p[0] == L('\0') || p[0] == delim) { if (p[0] == delim) ++p; break; } if (p[0] == L('\\')) { if (p[1] == delim) ++p; else if (p[1] == L('\\')) { *t++ = *p++; ++len; } else if (p[1] == L('~')) { ++p; if (!O_ISSET(sp, O_MAGIC)) goto tilde; } } else if (p[0] == L('~') && O_ISSET(sp, O_MAGIC)) { tilde: ++p; MEMCPYW(t, sp->repl, sp->repl_len); t += sp->repl_len; len += sp->repl_len; continue; } *t++ = *p++; ++len; } if ((sp->repl_len = len) != 0) { if (sp->repl != NULL) free(sp->repl); if ((sp->repl = malloc(len * sizeof(CHAR_T))) == NULL) { msgq(sp, M_SYSERR, NULL); FREE_SPACEW(sp, bp, blen); return (1); } MEMCPYW(sp->repl, bp, len); } FREE_SPACEW(sp, bp, blen); } return (s(sp, cmdp, p, re, flags)); } /* * ex_subagain -- * [line [,line]] & [cgr] [count] [#lp]] * * Substitute using the last substitute RE and replacement pattern. * * PUBLIC: int ex_subagain __P((SCR *, EXCMD *)); */ int ex_subagain(SCR *sp, EXCMD *cmdp) { if (sp->subre == NULL) { ex_emsg(sp, NULL, EXM_NOPREVRE); return (1); } if (!F_ISSET(sp, SC_RE_SUBST) && re_compile(sp, sp->subre, sp->subre_len, NULL, NULL, &sp->subre_c, SEARCH_CSUBST | SEARCH_MSG)) return (1); return (s(sp, cmdp, cmdp->argc ? cmdp->argv[0]->bp : NULL, &sp->subre_c, 0)); } /* * ex_subtilde -- * [line [,line]] ~ [cgr] [count] [#lp]] * * Substitute using the last RE and last substitute replacement pattern. * * PUBLIC: int ex_subtilde __P((SCR *, EXCMD *)); */ int ex_subtilde(SCR *sp, EXCMD *cmdp) { if (sp->re == NULL) { ex_emsg(sp, NULL, EXM_NOPREVRE); return (1); } if (!F_ISSET(sp, SC_RE_SEARCH) && re_compile(sp, sp->re, sp->re_len, NULL, NULL, &sp->re_c, SEARCH_CSEARCH | SEARCH_MSG)) return (1); return (s(sp, cmdp, cmdp->argc ? cmdp->argv[0]->bp : NULL, &sp->re_c, 0)); } /* * s -- * Do the substitution. This stuff is *really* tricky. There are lots of * special cases, and general nastiness. Don't mess with it unless you're * pretty confident. * * The nasty part of the substitution is what happens when the replacement * string contains newlines. It's a bit tricky -- consider the information * that has to be retained for "s/f\(o\)o/^M\1^M\1/". The solution here is * to build a set of newline offsets which we use to break the line up later, * when the replacement is done. Don't change it unless you're *damned* * confident. */ #define NEEDNEWLINE(sp) { \ if (sp->newl_len == sp->newl_cnt) { \ sp->newl_len += 25; \ REALLOC(sp, sp->newl, size_t *, \ sp->newl_len * sizeof(size_t)); \ if (sp->newl == NULL) { \ sp->newl_len = 0; \ return (1); \ } \ } \ } #define BUILD(sp, l, len) { \ if (lbclen + (len) > lblen) { \ lblen += MAX(lbclen + (len), 256); \ REALLOC(sp, lb, CHAR_T *, lblen * sizeof(CHAR_T)); \ if (lb == NULL) { \ lbclen = 0; \ return (1); \ } \ } \ MEMCPYW(lb + lbclen, l, len); \ lbclen += len; \ } #define NEEDSP(sp, len, pnt) { \ if (lbclen + (len) > lblen) { \ lblen += MAX(lbclen + (len), 256); \ REALLOC(sp, lb, CHAR_T *, lblen * sizeof(CHAR_T)); \ if (lb == NULL) { \ lbclen = 0; \ return (1); \ } \ pnt = lb + lbclen; \ } \ } static int s(SCR *sp, EXCMD *cmdp, CHAR_T *s, regex_t *re, u_int flags) { EVENT ev; MARK from, to; TEXTH tiq; db_recno_t elno, lno, slno; u_long ul; regmatch_t match[10]; size_t blen, cnt, last, lbclen, lblen, len, llen; size_t offset, saved_offset, scno; int cflag, lflag, nflag, pflag, rflag; int didsub, do_eol_match, eflags, empty_ok, eval; int linechanged, matched, quit, rval; CHAR_T *p, *lb, *bp; enum nresult nret; NEEDFILE(sp, cmdp); slno = sp->lno; scno = sp->cno; /* * !!! * Historically, the 'g' and 'c' suffices were always toggled as flags, * so ":s/A/B/" was the same as ":s/A/B/ccgg". If O_EDCOMPATIBLE was * not set, they were initialized to 0 for all substitute commands. If * O_EDCOMPATIBLE was set, they were initialized to 0 only if the user * specified substitute/replacement patterns (see ex_s()). */ if (!O_ISSET(sp, O_EDCOMPATIBLE)) sp->c_suffix = sp->g_suffix = 0; /* * Historic vi permitted the '#', 'l' and 'p' options in vi mode, but * it only displayed the last change. I'd disallow them, but they are * useful in combination with the [v]global commands. In the current * model the problem is combining them with the 'c' flag -- the screen * would have to flip back and forth between the confirm screen and the * ex print screen, which would be pretty awful. We do display all * changes, though, for what that's worth. * * !!! * Historic vi was fairly strict about the order of "options", the * count, and "flags". I'm somewhat fuzzy on the difference between * options and flags, anyway, so this is a simpler approach, and we * just take it them in whatever order the user gives them. (The ex * usage statement doesn't reflect this.) */ cflag = lflag = nflag = pflag = rflag = 0; if (s == NULL) goto noargs; for (lno = OOBLNO; *s != '\0'; ++s) switch (*s) { case ' ': case '\t': continue; case '+': ++cmdp->flagoff; break; case '-': --cmdp->flagoff; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (lno != OOBLNO) goto usage; errno = 0; nret = nget_uslong(sp, &ul, s, &s, 10); lno = ul; if (*s == '\0') /* Loop increment correction. */ --s; if (nret != NUM_OK) { if (nret == NUM_OVER) msgq(sp, M_ERR, "153|Count overflow"); else if (nret == NUM_UNDER) msgq(sp, M_ERR, "154|Count underflow"); else msgq(sp, M_SYSERR, NULL); return (1); } /* * In historic vi, the count was inclusive from the * second address. */ cmdp->addr1.lno = cmdp->addr2.lno; cmdp->addr2.lno += lno - 1; if (!db_exist(sp, cmdp->addr2.lno) && db_last(sp, &cmdp->addr2.lno)) return (1); break; case '#': nflag = 1; break; case 'c': sp->c_suffix = !sp->c_suffix; /* Ex text structure initialization. */ if (F_ISSET(sp, SC_EX)) { memset(&tiq, 0, sizeof(TEXTH)); CIRCLEQ_INIT(&tiq); } break; case 'g': sp->g_suffix = !sp->g_suffix; break; case 'l': lflag = 1; break; case 'p': pflag = 1; break; case 'r': if (LF_ISSET(SUB_FIRST)) { msgq(sp, M_ERR, "155|Regular expression specified; r flag meaningless"); return (1); } if (!F_ISSET(sp, SC_RE_SEARCH)) { ex_emsg(sp, NULL, EXM_NOPREVRE); return (1); } rflag = 1; re = &sp->re_c; break; default: goto usage; } if (*s != '\0' || !rflag && LF_ISSET(SUB_MUSTSETR)) { usage: ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } noargs: if (F_ISSET(sp, SC_VI) && sp->c_suffix && (lflag || nflag || pflag)) { msgq(sp, M_ERR, "156|The #, l and p flags may not be combined with the c flag in vi mode"); return (1); } /* * bp: if interactive, line cache * blen: if interactive, line cache length * lb: build buffer pointer. * lbclen: current length of built buffer. * lblen; length of build buffer. */ bp = lb = NULL; blen = lbclen = lblen = 0; /* For each line... */ lno = cmdp->addr1.lno == 0 ? 1 : cmdp->addr1.lno; for (matched = quit = 0, elno = cmdp->addr2.lno; !quit && lno <= elno; ++lno) { /* Someone's unhappy, time to stop. */ if (INTERRUPTED(sp)) break; /* Get the line. */ if (db_get(sp, lno, DBG_FATAL, &s, &llen)) goto err; /* * Make a local copy if doing confirmation -- when calling * the confirm routine we're likely to lose the cached copy. */ if (sp->c_suffix) { if (bp == NULL) { GET_SPACE_RETW(sp, bp, blen, llen); } else ADD_SPACE_RETW(sp, bp, blen, llen); MEMCPYW(bp, s, llen); s = bp; } /* Start searching from the beginning. */ offset = 0; len = llen; /* Reset the build buffer offset. */ lbclen = 0; /* Reset empty match flag. */ empty_ok = 1; /* * We don't want to have to do a setline if the line didn't * change -- keep track of whether or not this line changed. * If doing confirmations, don't want to keep setting the * line if change is refused -- keep track of substitutions. */ didsub = linechanged = 0; /* New line, do an EOL match. */ do_eol_match = 1; /* It's not nul terminated, but we pretend it is. */ eflags = REG_STARTEND; /* * The search area is from s + offset to the EOL. * * Generally, match[0].rm_so is the offset of the start * of the match from the start of the search, and offset * is the offset of the start of the last search. */ nextmatch: match[0].rm_so = 0; match[0].rm_eo = len; /* Get the next match. */ eval = regexec(re, s + offset, 10, match, eflags); /* * There wasn't a match or if there was an error, deal with * it. If there was a previous match in this line, resolve * the changes into the database. Otherwise, just move on. */ if (eval == REG_NOMATCH) goto endmatch; if (eval != 0) { re_error(sp, eval, re); goto err; } matched = 1; /* Only the first search can match an anchored expression. */ eflags |= REG_NOTBOL; /* * !!! * It's possible to match 0-length strings -- for example, the * command s;a*;X;, when matched against the string "aabb" will * result in "XbXbX", i.e. the matches are "aa", the space * between the b's and the space between the b's and the end of * the string. There is a similar space between the beginning * of the string and the a's. The rule that we use (because vi * historically used it) is that any 0-length match, occurring * immediately after a match, is ignored. Otherwise, the above * example would have resulted in "XXbXbX". Another example is * incorrectly using " *" to replace groups of spaces with one * space. * * The way we do this is that if we just had a successful match, * the starting offset does not skip characters, and the match * is empty, ignore the match and move forward. If there's no * more characters in the string, we were attempting to match * after the last character, so quit. */ if (!empty_ok && match[0].rm_so == 0 && match[0].rm_eo == 0) { empty_ok = 1; if (len == 0) goto endmatch; BUILD(sp, s + offset, 1) ++offset; --len; goto nextmatch; } /* Confirm change. */ if (sp->c_suffix) { /* * Set the cursor position for confirmation. Note, * if we matched on a '$', the cursor may be past * the end of line. */ from.lno = to.lno = lno; from.cno = match[0].rm_so + offset; to.cno = match[0].rm_eo + offset; /* * Both ex and vi have to correct for a change before * the first character in the line. */ if (llen == 0) from.cno = to.cno = 0; if (F_ISSET(sp, SC_VI)) { /* * Only vi has to correct for a change after * the last character in the line. * * XXX * It would be nice to change the vi code so * that we could display a cursor past EOL. */ if (to.cno >= llen) to.cno = llen - 1; if (from.cno >= llen) from.cno = llen - 1; sp->lno = from.lno; sp->cno = from.cno; if (vs_refresh(sp, 1)) goto err; vs_update(sp, msg_cat(sp, "169|Confirm change? [n]", NULL), NULL); if (v_event_get(sp, &ev, 0, 0)) goto err; switch (ev.e_event) { case E_CHARACTER: break; case E_EOF: case E_ERR: case E_INTERRUPT: goto lquit; default: v_event_err(sp, &ev); goto lquit; } } else { if (ex_print(sp, cmdp, &from, &to, 0) || ex_scprint(sp, &from, &to)) goto lquit; if (ex_txt(sp, &tiq, 0, TXT_CR)) goto err; ev.e_c = tiq.cqh_first->lb[0]; } switch (ev.e_c) { case CH_YES: break; default: case CH_NO: didsub = 0; BUILD(sp, s +offset, match[0].rm_eo); goto skip; case CH_QUIT: /* Set the quit/interrupted flags. */ lquit: quit = 1; F_SET(sp->gp, G_INTERRUPTED); /* * Resolve any changes, then return to (and * exit from) the main loop. */ goto endmatch; } } /* * Set the cursor to the last position changed, converting * from 1-based to 0-based. */ sp->lno = lno; sp->cno = match[0].rm_so; /* Copy the bytes before the match into the build buffer. */ BUILD(sp, s + offset, match[0].rm_so); /* Substitute the matching bytes. */ didsub = 1; if (re_sub(sp, s + offset, &lb, &lbclen, &lblen, match)) goto err; /* Set the change flag so we know this line was modified. */ linechanged = 1; /* Move past the matched bytes. */ skip: offset += match[0].rm_eo; len -= match[0].rm_eo; /* A match cannot be followed by an empty pattern. */ empty_ok = 0; /* * If doing a global change with confirmation, we have to * update the screen. The basic idea is to store the line * so the screen update routines can find it, and restart. */ if (didsub && sp->c_suffix && sp->g_suffix) { /* * The new search offset will be the end of the * modified line. */ saved_offset = lbclen; /* Copy the rest of the line. */ if (len) BUILD(sp, s + offset, len) /* Set the new offset. */ offset = saved_offset; /* Store inserted lines, adjusting the build buffer. */ last = 0; if (sp->newl_cnt) { for (cnt = 0; cnt < sp->newl_cnt; ++cnt, ++lno, ++elno) { if (db_insert(sp, lno, lb + last, sp->newl[cnt] - last)) goto err; last = sp->newl[cnt] + 1; ++sp->rptlines[L_ADDED]; } lbclen -= last; offset -= last; sp->newl_cnt = 0; } /* Store and retrieve the line. */ if (db_set(sp, lno, lb + last, lbclen)) goto err; if (db_get(sp, lno, DBG_FATAL, &s, &llen)) goto err; ADD_SPACE_RETW(sp, bp, blen, llen) MEMCPYW(bp, s, llen); s = bp; len = llen - offset; /* Restart the build. */ lbclen = 0; BUILD(sp, s, offset); /* * If we haven't already done the after-the-string * match, do one. Set REG_NOTEOL so the '$' pattern * only matches once. */ if (!do_eol_match) goto endmatch; if (offset == len) { do_eol_match = 0; eflags |= REG_NOTEOL; } goto nextmatch; } /* * If it's a global: * * If at the end of the string, do a test for the after * the string match. Set REG_NOTEOL so the '$' pattern * only matches once. */ if (sp->g_suffix && do_eol_match) { if (len == 0) { do_eol_match = 0; eflags |= REG_NOTEOL; } goto nextmatch; } endmatch: if (!linechanged) continue; /* Copy any remaining bytes into the build buffer. */ if (len) BUILD(sp, s + offset, len) /* Store inserted lines, adjusting the build buffer. */ last = 0; if (sp->newl_cnt) { for (cnt = 0; cnt < sp->newl_cnt; ++cnt, ++lno, ++elno) { if (db_insert(sp, lno, lb + last, sp->newl[cnt] - last)) goto err; last = sp->newl[cnt] + 1; ++sp->rptlines[L_ADDED]; } lbclen -= last; sp->newl_cnt = 0; } /* Store the changed line. */ if (db_set(sp, lno, lb + last, lbclen)) goto err; /* Update changed line counter. */ if (sp->rptlchange != lno) { sp->rptlchange = lno; ++sp->rptlines[L_CHANGED]; } /* * !!! * Display as necessary. Historic practice is to only * display the last line of a line split into multiple * lines. */ if (lflag || nflag || pflag) { from.lno = to.lno = lno; from.cno = to.cno = 0; if (lflag) (void)ex_print(sp, cmdp, &from, &to, E_C_LIST); if (nflag) (void)ex_print(sp, cmdp, &from, &to, E_C_HASH); if (pflag) (void)ex_print(sp, cmdp, &from, &to, E_C_PRINT); } } /* * !!! * Historically, vi attempted to leave the cursor at the same place if * the substitution was done at the current cursor position. Otherwise * it moved it to the first non-blank of the last line changed. There * were some problems: for example, :s/$/foo/ with the cursor on the * last character of the line left the cursor on the last character, or * the & command with multiple occurrences of the matching string in the * line usually left the cursor in a fairly random position. * * We try to do the same thing, with the exception that if the user is * doing substitution with confirmation, we move to the last line about * which the user was consulted, as opposed to the last line that they * actually changed. This prevents a screen flash if the user doesn't * change many of the possible lines. */ if (!sp->c_suffix && (sp->lno != slno || sp->cno != scno)) { sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); } /* * If not in a global command, and nothing matched, say so. * Else, if none of the lines displayed, put something up. */ rval = 0; if (!matched) { if (!F_ISSET(sp, SC_EX_GLOBAL)) { msgq(sp, M_ERR, "157|No match found"); goto err; } } else if (!lflag && !nflag && !pflag) F_SET(cmdp, E_AUTOPRINT); if (0) { err: rval = 1; } if (bp != NULL) FREE_SPACEW(sp, bp, blen); if (lb != NULL) free(lb); return (rval); } /* * re_compile -- * Compile the RE. * * PUBLIC: int re_compile __P((SCR *, * PUBLIC: CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int)); */ int re_compile(SCR *sp, CHAR_T *ptrn, size_t plen, CHAR_T **ptrnp, size_t *lenp, regex_t *rep, u_int flags) { size_t len; int reflags, replaced, rval; CHAR_T *p; /* Set RE flags. */ reflags = 0; if (LF_ISSET(SEARCH_EXTEND)) reflags |= REG_EXTENDED; if (LF_ISSET(SEARCH_IC)) reflags |= REG_ICASE; if (LF_ISSET(SEARCH_LITERAL)) reflags |= REG_NOSPEC; if (!LF_ISSET(SEARCH_NOOPT | SEARCH_CSCOPE | SEARCH_TAG)) { if (O_ISSET(sp, O_EXTENDED)) reflags |= REG_EXTENDED; if (O_ISSET(sp, O_IGNORECASE)) reflags |= REG_ICASE; if (O_ISSET(sp, O_ICLOWER)) goto iclower; } if (LF_ISSET(SEARCH_ICL)) { iclower: for (p = ptrn, len = plen; len > 0; ++p, --len) if (isupper(*p)) break; if (len == 0) reflags |= REG_ICASE; } /* If we're replacing a saved value, clear the old one. */ if (LF_ISSET(SEARCH_CSEARCH) && F_ISSET(sp, SC_RE_SEARCH)) { regfree(&sp->re_c); F_CLR(sp, SC_RE_SEARCH); } if (LF_ISSET(SEARCH_CSUBST) && F_ISSET(sp, SC_RE_SUBST)) { regfree(&sp->subre_c); F_CLR(sp, SC_RE_SUBST); } /* * If we're saving the string, it's a pattern we haven't seen before, * so convert the vi-style RE's to POSIX 1003.2 RE's. Save a copy for * later recompilation. Free any previously saved value. */ if (ptrnp != NULL) { replaced = 0; if (LF_ISSET(SEARCH_CSCOPE)) { if (re_cscope_conv(sp, &ptrn, &plen, &replaced)) return (1); /* * XXX * Currently, the match-any- expression used in * re_cscope_conv() requires extended RE's. This may * not be right or safe. */ reflags |= REG_EXTENDED; } else if (LF_ISSET(SEARCH_TAG)) { if (re_tag_conv(sp, &ptrn, &plen, &replaced)) return (1); } else if (!LF_ISSET(SEARCH_LITERAL)) if (re_conv(sp, &ptrn, &plen, &replaced)) return (1); /* Discard previous pattern. */ if (*ptrnp != NULL) { free(*ptrnp); *ptrnp = NULL; } if (lenp != NULL) *lenp = plen; /* * Copy the string into allocated memory. * * XXX * Regcomp isn't 8-bit clean, so the pattern is nul-terminated * for now. There's just no other solution. */ MALLOC(sp, *ptrnp, CHAR_T *, (plen + 1) * sizeof(CHAR_T)); if (*ptrnp != NULL) { MEMCPYW(*ptrnp, ptrn, plen); (*ptrnp)[plen] = '\0'; } /* Free up conversion-routine-allocated memory. */ if (replaced) FREE_SPACEW(sp, ptrn, 0); if (*ptrnp == NULL) return (1); ptrn = *ptrnp; } /* * XXX * Regcomp isn't 8-bit clean, so we just lost if the pattern * contained a nul. Bummer! */ if ((rval = regcomp(rep, ptrn, /* plen, */ reflags)) != 0) { if (LF_ISSET(SEARCH_MSG)) re_error(sp, rval, rep); return (1); } if (LF_ISSET(SEARCH_CSEARCH)) F_SET(sp, SC_RE_SEARCH); if (LF_ISSET(SEARCH_CSUBST)) F_SET(sp, SC_RE_SUBST); return (0); } /* * re_conv -- * Convert vi's regular expressions into something that the * the POSIX 1003.2 RE functions can handle. * * There are three conversions we make to make vi's RE's (specifically * the global, search, and substitute patterns) work with POSIX RE's. * * 1: If O_MAGIC is not set, strip backslashes from the magic character * set (.[*~) that have them, and add them to the ones that don't. * 2: If O_MAGIC is not set, the string "\~" is replaced with the text * from the last substitute command's replacement string. If O_MAGIC * is set, it's the string "~". * 3: The pattern \ does "word" searches, convert it to use the * new RE escapes. * * !!!/XXX * This doesn't exactly match the historic behavior of vi because we do * the ~ substitution before calling the RE engine, so magic characters * in the replacement string will be expanded by the RE engine, and they * weren't historically. It's a bug. */ static int re_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp) { size_t blen, len, needlen; int magic; CHAR_T *bp, *p, *t; /* * First pass through, we figure out how much space we'll need. * We do it in two passes, on the grounds that most of the time * the user is doing a search and won't have magic characters. * That way we can skip most of the memory allocation and copies. */ magic = 0; for (p = *ptrnp, len = *plenp, needlen = 0; len > 0; ++p, --len) switch (*p) { case '\\': if (len > 1) { --len; switch (*++p) { case '<': magic = 1; needlen += RE_WSTART_LEN + 1; break; case '>': magic = 1; needlen += RE_WSTOP_LEN + 1; break; case '~': if (!O_ISSET(sp, O_MAGIC)) { magic = 1; needlen += sp->repl_len; } break; case '.': case '[': case '*': if (!O_ISSET(sp, O_MAGIC)) { magic = 1; needlen += 1; } break; default: needlen += 2; } } else needlen += 1; break; case '~': if (O_ISSET(sp, O_MAGIC)) { magic = 1; needlen += sp->repl_len; } break; case '.': case '[': case '*': if (!O_ISSET(sp, O_MAGIC)) { magic = 1; needlen += 2; } break; default: needlen += 1; break; } if (!magic) { *replacedp = 0; return (0); } /* Get enough memory to hold the final pattern. */ *replacedp = 1; GET_SPACE_RETW(sp, bp, blen, needlen); for (p = *ptrnp, len = *plenp, t = bp; len > 0; ++p, --len) switch (*p) { case '\\': if (len > 1) { --len; switch (*++p) { case '<': MEMCPY(t, RE_WSTART, RE_WSTART_LEN); t += RE_WSTART_LEN; break; case '>': MEMCPY(t, RE_WSTOP, RE_WSTOP_LEN); t += RE_WSTOP_LEN; break; case '~': if (O_ISSET(sp, O_MAGIC)) *t++ = '~'; else { MEMCPYW(t, sp->repl, sp->repl_len); t += sp->repl_len; } break; case '.': case '[': case '*': if (O_ISSET(sp, O_MAGIC)) *t++ = '\\'; *t++ = *p; break; default: *t++ = '\\'; *t++ = *p; } } else *t++ = '\\'; break; case '~': if (O_ISSET(sp, O_MAGIC)) { MEMCPYW(t, sp->repl, sp->repl_len); t += sp->repl_len; } else *t++ = '~'; break; case '.': case '[': case '*': if (!O_ISSET(sp, O_MAGIC)) *t++ = '\\'; *t++ = *p; break; default: *t++ = *p; break; } *ptrnp = bp; *plenp = t - bp; return (0); } /* * re_tag_conv -- * Convert a tags search path into something that the POSIX * 1003.2 RE functions can handle. */ static int re_tag_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp) { size_t blen, len; int lastdollar; CHAR_T *bp, *p, *t; len = *plenp; /* Max memory usage is 2 times the length of the string. */ *replacedp = 1; GET_SPACE_RETW(sp, bp, blen, len * 2); p = *ptrnp; t = bp; /* If the last character is a '/' or '?', we just strip it. */ if (len > 0 && (p[len - 1] == '/' || p[len - 1] == '?')) --len; /* If the next-to-last or last character is a '$', it's magic. */ if (len > 0 && p[len - 1] == '$') { --len; lastdollar = 1; } else lastdollar = 0; /* If the first character is a '/' or '?', we just strip it. */ if (len > 0 && (p[0] == '/' || p[0] == '?')) { ++p; --len; } /* If the first or second character is a '^', it's magic. */ if (p[0] == '^') { *t++ = *p++; --len; } /* * Escape every other magic character we can find, meanwhile stripping * the backslashes ctags inserts when escaping the search delimiter * characters. */ for (; len > 0; --len) { if (p[0] == '\\' && (p[1] == '/' || p[1] == '?')) { ++p; --len; } else if (strchr("^.[]$*", p[0])) *t++ = '\\'; *t++ = *p++; } if (lastdollar) *t++ = '$'; *ptrnp = bp; *plenp = t - bp; return (0); } /* * re_cscope_conv -- * Convert a cscope search path into something that the POSIX * 1003.2 RE functions can handle. */ static int re_cscope_conv(SCR *sp, CHAR_T **ptrnp, size_t *plenp, int *replacedp) { size_t blen, len, nspaces; CHAR_T *bp, *t; CHAR_T *p; CHAR_T *wp; size_t wlen; /* * Each space in the source line printed by cscope represents an * arbitrary sequence of spaces, tabs, and comments. */ #define CSCOPE_RE_SPACE "([ \t]|/\\*([^*]|\\*/)*\\*/)*" #define CSCOPE_LEN sizeof(CSCOPE_RE_SPACE) - 1 CHAR2INT(sp, CSCOPE_RE_SPACE, CSCOPE_LEN, wp, wlen); for (nspaces = 0, p = *ptrnp, len = *plenp; len > 0; ++p, --len) if (*p == ' ') ++nspaces; /* * Allocate plenty of space: * the string, plus potential escaping characters; * nspaces + 2 copies of CSCOPE_RE_SPACE; * ^, $, nul terminator characters. */ *replacedp = 1; len = (p - *ptrnp) * 2 + (nspaces + 2) * sizeof(CSCOPE_RE_SPACE) + 3; GET_SPACE_RETW(sp, bp, blen, len); p = *ptrnp; t = bp; *t++ = '^'; MEMCPYW(t, wp, wlen); t += wlen; for (len = *plenp; len > 0; ++p, --len) if (*p == ' ') { MEMCPYW(t, wp, wlen); t += wlen; } else { if (strchr("\\^.[]$*+?()|{}", *p)) *t++ = '\\'; *t++ = *p; } MEMCPYW(t, wp, wlen); t += wlen; *t++ = '$'; *ptrnp = bp; *plenp = t - bp; return (0); } /* * re_error -- * Report a regular expression error. * * PUBLIC: void re_error __P((SCR *, int, regex_t *)); */ void re_error(SCR *sp, int errcode, regex_t *preg) { size_t s; char *oe; s = regerror(errcode, preg, "", 0); if ((oe = malloc(s)) == NULL) msgq(sp, M_SYSERR, NULL); else { (void)regerror(errcode, preg, oe, s); msgq(sp, M_ERR, "RE error: %s", oe); free(oe); } } /* * re_sub -- * Do the substitution for a regular expression. */ static int re_sub(SCR *sp, CHAR_T *ip, CHAR_T **lbp, size_t *lbclenp, size_t *lblenp, regmatch_t *match) /* Input line. */ { enum { C_NOTSET, C_LOWER, C_ONELOWER, C_ONEUPPER, C_UPPER } conv; size_t lbclen, lblen; /* Local copies. */ size_t mlen; /* Match length. */ size_t rpl; /* Remaining replacement length. */ CHAR_T *rp; /* Replacement pointer. */ int ch; int no; /* Match replacement offset. */ CHAR_T *p, *t; /* Buffer pointers. */ CHAR_T *lb; /* Local copies. */ lb = *lbp; /* Get local copies. */ lbclen = *lbclenp; lblen = *lblenp; /* * QUOTING NOTE: * * There are some special sequences that vi provides in the * replacement patterns. * & string the RE matched (\& if nomagic set) * \# n-th regular subexpression * \E end \U, \L conversion * \e end \U, \L conversion * \l convert the next character to lower-case * \L convert to lower-case, until \E, \e, or end of replacement * \u convert the next character to upper-case * \U convert to upper-case, until \E, \e, or end of replacement * * Otherwise, since this is the lowest level of replacement, discard * all escaping characters. This (hopefully) matches historic practice. */ #define OUTCH(ch, nltrans) { \ CHAR_T __ch = (ch); \ u_int __value = KEY_VAL(sp, __ch); \ if (nltrans && (__value == K_CR || __value == K_NL)) { \ NEEDNEWLINE(sp); \ sp->newl[sp->newl_cnt++] = lbclen; \ } else if (conv != C_NOTSET) { \ switch (conv) { \ case C_ONELOWER: \ conv = C_NOTSET; \ /* FALLTHROUGH */ \ case C_LOWER: \ if (isupper(__ch)) \ __ch = tolower(__ch); \ break; \ case C_ONEUPPER: \ conv = C_NOTSET; \ /* FALLTHROUGH */ \ case C_UPPER: \ if (islower(__ch)) \ __ch = toupper(__ch); \ break; \ default: \ abort(); \ } \ } \ NEEDSP(sp, 1, p); \ *p++ = __ch; \ ++lbclen; \ } conv = C_NOTSET; for (rp = sp->repl, rpl = sp->repl_len, p = lb + lbclen; rpl--;) { switch (ch = *rp++) { case '&': if (O_ISSET(sp, O_MAGIC)) { no = 0; goto subzero; } break; case '\\': if (rpl == 0) break; --rpl; switch (ch = *rp) { case '&': ++rp; if (!O_ISSET(sp, O_MAGIC)) { no = 0; goto subzero; } break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': no = *rp++ - '0'; subzero: if (match[no].rm_so == -1 || match[no].rm_eo == -1) break; mlen = match[no].rm_eo - match[no].rm_so; for (t = ip + match[no].rm_so; mlen--; ++t) OUTCH(*t, 0); continue; case 'e': case 'E': ++rp; conv = C_NOTSET; continue; case 'l': ++rp; conv = C_ONELOWER; continue; case 'L': ++rp; conv = C_LOWER; continue; case 'u': ++rp; conv = C_ONEUPPER; continue; case 'U': ++rp; conv = C_UPPER; continue; default: ++rp; break; } } OUTCH(ch, 1); } *lbp = lb; /* Update caller's information. */ *lbclenp = lbclen; *lblenp = lblen; return (0); } nvi-1.81.6/ex/ex_tag.c0100644000076400001440000007444210720065506013514 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * This code is derived from software contributed to Berkeley by * David Hitz of Auspex Systems, Inc. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_tag.c,v 10.50 2004/03/16 14:09:11 skimo Exp $ (Berkeley) $Date: 2004/03/16 14:09:11 $"; #endif /* not lint */ #include #include /* XXX: param.h may not have included types.h */ #ifdef HAVE_SYS_MMAN_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #include "tag.h" static char *binary_search __P((char *, char *, char *)); static int compare __P((char *, char *, char *)); static void ctag_file __P((SCR *, TAGF *, char *, char **, size_t *)); static int ctag_search __P((SCR *, CHAR_T *, size_t, char *)); static int ctag_sfile __P((SCR *, TAGF *, TAGQ *, char *)); static TAGQ *ctag_slist __P((SCR *, CHAR_T *)); static char *linear_search __P((char *, char *, char *, long)); static int tag_copy __P((SCR *, TAG *, TAG **)); static int tag_pop __P((SCR *, TAGQ *, int)); static int tagf_copy __P((SCR *, TAGF *, TAGF **)); static int tagf_free __P((SCR *, TAGF *)); static int tagq_copy __P((SCR *, TAGQ *, TAGQ **)); /* * ex_tag_first -- * The tag code can be entered from main, e.g., "vi -t tag". * * PUBLIC: int ex_tag_first __P((SCR *, CHAR_T *)); */ int ex_tag_first(SCR *sp, CHAR_T *tagarg) { EXCMD cmd; /* Build an argument for the ex :tag command. */ ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, tagarg, STRLEN(tagarg)); /* * XXX * Historic vi went ahead and created a temporary file when it failed * to find the tag. We match historic practice, but don't distinguish * between real error and failure to find the tag. */ if (ex_tag_push(sp, &cmd)) return (0); /* Display tags in the center of the screen. */ F_CLR(sp, SC_SCR_TOP); F_SET(sp, SC_SCR_CENTER); return (0); } /* * ex_tag_push -- ^] * :tag[!] [string] * * Enter a new TAGQ context based on a ctag string. * * PUBLIC: int ex_tag_push __P((SCR *, EXCMD *)); */ int ex_tag_push(SCR *sp, EXCMD *cmdp) { EX_PRIVATE *exp; TAGQ *tqp; long tl; exp = EXP(sp); switch (cmdp->argc) { case 1: if (exp->tag_last != NULL) free(exp->tag_last); if ((exp->tag_last = v_wstrdup(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len)) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } /* Taglength may limit the number of characters. */ if ((tl = O_VAL(sp, O_TAGLENGTH)) != 0 && STRLEN(exp->tag_last) > tl) exp->tag_last[tl] = '\0'; break; case 0: if (exp->tag_last == NULL) { msgq(sp, M_ERR, "158|No previous tag entered"); return (1); } break; default: abort(); } /* Get the tag information. */ if ((tqp = ctag_slist(sp, exp->tag_last)) == NULL) return (1); if (tagq_push(sp, tqp, F_ISSET(cmdp, E_NEWSCREEN), FL_ISSET(cmdp->iflags, E_C_FORCE))) return 1; return 0; } /* * ex_tag_next -- * Switch context to the next TAG. * * PUBLIC: int ex_tag_next __P((SCR *, EXCMD *)); */ int ex_tag_next(SCR *sp, EXCMD *cmdp) { EX_PRIVATE *exp; TAG *tp; TAGQ *tqp; char *np; size_t nlen; exp = EXP(sp); if ((tqp = exp->tq.cqh_first) == (void *)&exp->tq) { tag_msg(sp, TAG_EMPTY, NULL); return (1); } if ((tp = tqp->current->q.cqe_next) == (void *)&tqp->tagq) { msgq(sp, M_ERR, "282|Already at the last tag of this group"); return (1); } if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE))) return (1); tqp->current = tp; if (F_ISSET(tqp, TAG_CSCOPE)) (void)cscope_search(sp, tqp, tp); else (void)ctag_search(sp, tp->search, tp->slen, tqp->tag); if (tqp->current->msg) { INT2CHAR(sp, tqp->current->msg, tqp->current->mlen + 1, np, nlen); msgq(sp, M_INFO, np); } return (0); } /* * ex_tag_prev -- * Switch context to the next TAG. * * PUBLIC: int ex_tag_prev __P((SCR *, EXCMD *)); */ int ex_tag_prev(SCR *sp, EXCMD *cmdp) { EX_PRIVATE *exp; TAG *tp; TAGQ *tqp; char *np; size_t nlen; exp = EXP(sp); if ((tqp = exp->tq.cqh_first) == (void *)&exp->tq) { tag_msg(sp, TAG_EMPTY, NULL); return (0); } if ((tp = tqp->current->q.cqe_prev) == (void *)&tqp->tagq) { msgq(sp, M_ERR, "255|Already at the first tag of this group"); return (1); } if (ex_tag_nswitch(sp, tp, FL_ISSET(cmdp->iflags, E_C_FORCE))) return (1); tqp->current = tp; if (F_ISSET(tqp, TAG_CSCOPE)) (void)cscope_search(sp, tqp, tp); else (void)ctag_search(sp, tp->search, tp->slen, tqp->tag); if (tqp->current->msg) { INT2CHAR(sp, tqp->current->msg, tqp->current->mlen + 1, np, nlen); msgq(sp, M_INFO, np); } return (0); } /* * ex_tag_nswitch -- * Switch context to the specified TAG. * * PUBLIC: int ex_tag_nswitch __P((SCR *, TAG *, int)); */ int ex_tag_nswitch(SCR *sp, TAG *tp, int force) { /* Get a file structure. */ if (tp->frp == NULL && (tp->frp = file_add(sp, tp->fname)) == NULL) return (1); /* If not changing files, return, we're done. */ if (tp->frp == sp->frp) return (0); /* Check for permission to leave. */ if (file_m1(sp, force, FS_ALL | FS_POSSIBLE)) return (1); /* Initialize the new file. */ if (file_init(sp, tp->frp, NULL, FS_SETALT)) return (1); /* Display tags in the center of the screen. */ F_CLR(sp, SC_SCR_TOP); F_SET(sp, SC_SCR_CENTER); /* Switch. */ F_SET(sp, SC_FSWITCH); return (0); } /* * ex_tag_Nswitch -- * Switch context to the specified TAG in a new screen. * * PUBLIC: int ex_tag_Nswitch __P((SCR *, TAG *, int)); */ int ex_tag_Nswitch(SCR *sp, TAG *tp, int force) { SCR *new; /* Get a file structure. */ if (tp->frp == NULL && (tp->frp = file_add(sp, tp->fname)) == NULL) return (1); /* Get a new screen. */ if (screen_init(sp->gp, sp, &new)) return (1); if (vs_split(sp, new, 0)) { (void)file_end(new, new->ep, 1); (void)screen_end(new); return (1); } /* Get a backing file. */ if (tp->frp == sp->frp) { /* Copy file state. */ new->ep = sp->ep; ++new->ep->refcnt; CIRCLEQ_INSERT_HEAD(&new->ep->scrq, new, eq); new->frp = tp->frp; new->frp->flags = sp->frp->flags; } else if (file_init(new, tp->frp, NULL, force)) { (void)vs_discard(new, NULL); (void)screen_end(new); return (1); } /* Create the argument list. */ new->cargv = new->argv = ex_buildargv(sp, NULL, tp->frp->name); /* Display tags in the center of the screen. */ F_CLR(new, SC_SCR_TOP); F_SET(new, SC_SCR_CENTER); /* Switch. */ sp->nextdisp = new; F_SET(sp, SC_SSWITCH); return (0); } /* * ex_tag_pop -- ^T * :tagp[op][!] [number | file] * * Pop to a previous TAGQ context. * * PUBLIC: int ex_tag_pop __P((SCR *, EXCMD *)); */ int ex_tag_pop(SCR *sp, EXCMD *cmdp) { EX_PRIVATE *exp; TAGQ *tqp, *dtqp; size_t arglen; long off; char *arg, *p, *t; size_t nlen; /* Check for an empty stack. */ exp = EXP(sp); if (exp->tq.cqh_first == (void *)&exp->tq) { tag_msg(sp, TAG_EMPTY, NULL); return (1); } /* Find the last TAG structure that we're going to DISCARD! */ switch (cmdp->argc) { case 0: /* Pop one tag. */ dtqp = exp->tq.cqh_first; break; case 1: /* Name or number. */ INT2CHAR(sp, cmdp->argv[0]->bp, cmdp->argv[0]->len+1, arg, nlen); off = strtol(arg, &p, 10); if (*p != '\0') goto filearg; /* Number: pop that many queue entries. */ if (off < 1) return (0); for (tqp = exp->tq.cqh_first; tqp != (void *)&exp->tq && --off > 1; tqp = tqp->q.cqe_next); if (tqp == (void *)&exp->tq) { msgq(sp, M_ERR, "159|Less than %s entries on the tags stack; use :display t[ags]", arg); return (1); } dtqp = tqp; break; /* File argument: pop to that queue entry. */ filearg: arglen = strlen(arg); for (tqp = exp->tq.cqh_first; tqp != (void *)&exp->tq; dtqp = tqp, tqp = tqp->q.cqe_next) { /* Don't pop to the current file. */ if (tqp == exp->tq.cqh_first) continue; p = tqp->current->frp->name; if ((t = strrchr(p, '/')) == NULL) t = p; else ++t; if (!strncmp(arg, t, arglen)) break; } if (tqp == (void *)&exp->tq) { msgq_str(sp, M_ERR, arg, "160|No file %s on the tags stack to return to; use :display t[ags]"); return (1); } if (tqp == exp->tq.cqh_first) return (0); break; default: abort(); } return (tag_pop(sp, dtqp, FL_ISSET(cmdp->iflags, E_C_FORCE))); } /* * ex_tag_top -- :tagt[op][!] * Clear the tag stack. * * PUBLIC: int ex_tag_top __P((SCR *, EXCMD *)); */ int ex_tag_top(SCR *sp, EXCMD *cmdp) { EX_PRIVATE *exp; exp = EXP(sp); /* Check for an empty stack. */ if (exp->tq.cqh_first == (void *)&exp->tq) { tag_msg(sp, TAG_EMPTY, NULL); return (1); } /* Return to the oldest information. */ return (tag_pop(sp, exp->tq.cqh_last->q.cqe_prev, FL_ISSET(cmdp->iflags, E_C_FORCE))); } /* * tag_pop -- * Pop up to and including the specified TAGQ context. */ static int tag_pop(SCR *sp, TAGQ *dtqp, int force) { EX_PRIVATE *exp; TAG *tp; TAGQ *tqp; exp = EXP(sp); /* * Update the cursor from the saved TAG information of the TAG * structure we're moving to. */ tp = dtqp->q.cqe_next->current; if (tp->frp == sp->frp) { sp->lno = tp->lno; sp->cno = tp->cno; } else { if (file_m1(sp, force, FS_ALL | FS_POSSIBLE)) return (1); tp->frp->lno = tp->lno; tp->frp->cno = tp->cno; F_SET(sp->frp, FR_CURSORSET); if (file_init(sp, tp->frp, NULL, FS_SETALT)) return (1); F_SET(sp, SC_FSWITCH); } /* Pop entries off the queue up to and including dtqp. */ do { tqp = exp->tq.cqh_first; if (tagq_free(sp, tqp)) return (0); } while (tqp != dtqp); /* * If only a single tag left, we've returned to the first tag point, * and the stack is now empty. */ if (exp->tq.cqh_first->q.cqe_next == (void *)&exp->tq) tagq_free(sp, exp->tq.cqh_first); return (0); } /* * ex_tag_display -- * Display the list of tags. * * PUBLIC: int ex_tag_display __P((SCR *)); */ int ex_tag_display(SCR *sp) { EX_PRIVATE *exp; TAG *tp; TAGQ *tqp; int cnt; size_t len; char *p; exp = EXP(sp); if ((tqp = exp->tq.cqh_first) == (void *)&exp->tq) { tag_msg(sp, TAG_EMPTY, NULL); return (0); } /* * We give the file name 20 columns and the search string the rest. * If there's not enough room, we don't do anything special, it's * not worth the effort, it just makes the display more confusing. * * We also assume that characters in file names map 1-1 to printing * characters. This might not be true, but I don't think it's worth * fixing. (The obvious fix is to pass the filenames through the * msg_print function.) */ #define L_NAME 30 /* Name. */ #define L_SLOP 4 /* Leading number plus trailing *. */ #define L_SPACE 5 /* Spaces after name, before tag. */ #define L_TAG 20 /* Tag. */ if (sp->cols <= L_NAME + L_SLOP) { msgq(sp, M_ERR, "292|Display too small."); return (0); } /* * Display the list of tags for each queue entry. The first entry * is numbered, and the current tag entry has an asterisk appended. */ for (cnt = 1, tqp = exp->tq.cqh_first; !INTERRUPTED(sp) && tqp != (void *)&exp->tq; ++cnt, tqp = tqp->q.cqe_next) for (tp = tqp->tagq.cqh_first; tp != (void *)&tqp->tagq; tp = tp->q.cqe_next) { if (tp == tqp->tagq.cqh_first) (void)ex_printf(sp, "%2d ", cnt); else (void)ex_printf(sp, " "); p = tp->frp == NULL ? tp->fname : tp->frp->name; if ((len = strlen(p)) > L_NAME) { len = len - (L_NAME - 4); (void)ex_printf(sp, " ... %*.*s", L_NAME - 4, L_NAME - 4, p + len); } else (void)ex_printf(sp, " %*.*s", L_NAME, L_NAME, p); if (tqp->current == tp) (void)ex_printf(sp, "*"); if (tp == tqp->tagq.cqh_first && tqp->tag != NULL && (sp->cols - L_NAME) >= L_TAG + L_SPACE) { len = strlen(tqp->tag); if (len > sp->cols - (L_NAME + L_SPACE)) len = sp->cols - (L_NAME + L_SPACE); (void)ex_printf(sp, "%s%.*s", tqp->current == tp ? " " : " ", (int)len, tqp->tag); } (void)ex_printf(sp, "\n"); } return (0); } /* * ex_tag_copy -- * Copy a screen's tag structures. * * PUBLIC: int ex_tag_copy __P((SCR *, SCR *)); */ int ex_tag_copy(SCR *orig, SCR *sp) { EX_PRIVATE *oexp, *nexp; TAGQ *aqp, *tqp; TAG *ap, *tp; TAGF *atfp, *tfp; oexp = EXP(orig); nexp = EXP(sp); /* Copy tag queue and tags stack. */ for (aqp = oexp->tq.cqh_first; aqp != (void *)&oexp->tq; aqp = aqp->q.cqe_next) { if (tagq_copy(sp, aqp, &tqp)) return (1); for (ap = aqp->tagq.cqh_first; ap != (void *)&aqp->tagq; ap = ap->q.cqe_next) { if (tag_copy(sp, ap, &tp)) return (1); /* Set the current pointer. */ if (aqp->current == ap) tqp->current = tp; CIRCLEQ_INSERT_TAIL(&tqp->tagq, tp, q); } CIRCLEQ_INSERT_TAIL(&nexp->tq, tqp, q); } /* Copy list of tag files. */ for (atfp = oexp->tagfq.tqh_first; atfp != NULL; atfp = atfp->q.tqe_next) { if (tagf_copy(sp, atfp, &tfp)) return (1); TAILQ_INSERT_TAIL(&nexp->tagfq, tfp, q); } /* Copy the last tag. */ if (oexp->tag_last != NULL && (nexp->tag_last = v_wstrdup(sp, oexp->tag_last, STRLEN(oexp->tag_last))) == NULL) { msgq(sp, M_SYSERR, NULL); return (1); } return (0); } /* * tagf_copy -- * Copy a TAGF structure and return it in new memory. */ static int tagf_copy(SCR *sp, TAGF *otfp, TAGF **tfpp) { TAGF *tfp; MALLOC_RET(sp, tfp, TAGF *, sizeof(TAGF)); *tfp = *otfp; /* XXX: Allocate as part of the TAGF structure!!! */ if ((tfp->name = strdup(otfp->name)) == NULL) return (1); *tfpp = tfp; return (0); } /* * tagq_copy -- * Copy a TAGQ structure and return it in new memory. */ static int tagq_copy(SCR *sp, TAGQ *otqp, TAGQ **tqpp) { TAGQ *tqp; size_t len; len = sizeof(TAGQ); if (otqp->tag != NULL) len += otqp->tlen + 1; MALLOC_RET(sp, tqp, TAGQ *, len); memcpy(tqp, otqp, len); CIRCLEQ_INIT(&tqp->tagq); tqp->current = NULL; if (otqp->tag != NULL) tqp->tag = tqp->buf; *tqpp = tqp; return (0); } /* * tag_copy -- * Copy a TAG structure and return it in new memory. */ static int tag_copy(SCR *sp, TAG *otp, TAG **tpp) { TAG *tp; size_t len; len = sizeof(TAG); if (otp->fname != NULL) len += otp->fnlen + 1; if (otp->search != NULL) len += otp->slen + 1; if (otp->msg != NULL) len += otp->mlen + 1; MALLOC_RET(sp, tp, TAG *, len); memcpy(tp, otp, len); if (otp->fname != NULL) tp->fname = (char *)tp->buf; if (otp->search != NULL) tp->search = tp->buf + (otp->search - otp->buf); if (otp->msg != NULL) tp->msg = tp->buf + (otp->msg - otp->buf); *tpp = tp; return (0); } /* * tagf_free -- * Free a TAGF structure. */ static int tagf_free(SCR *sp, TAGF *tfp) { EX_PRIVATE *exp; exp = EXP(sp); TAILQ_REMOVE(&exp->tagfq, tfp, q); free(tfp->name); free(tfp); return (0); } /* * tagq_free -- * Free a TAGQ structure (and associated TAG structures). * * PUBLIC: int tagq_free __P((SCR *, TAGQ *)); */ int tagq_free(SCR *sp, TAGQ *tqp) { EX_PRIVATE *exp; TAG *tp; exp = EXP(sp); while ((tp = tqp->tagq.cqh_first) != (void *)&tqp->tagq) { CIRCLEQ_REMOVE(&tqp->tagq, tp, q); free(tp); } /* * !!! * If allocated and then the user failed to switch files, the TAGQ * structure was never attached to any list. */ if (tqp->q.cqe_next != NULL) CIRCLEQ_REMOVE(&exp->tq, tqp, q); free(tqp); return (0); } /* * PUBLIC: int tagq_push __P((SCR*, TAGQ*, int, int )); */ int tagq_push(SCR *sp, TAGQ *tqp, int new_screen, int force) { EX_PRIVATE *exp; FREF *frp; TAG *rtp; TAGQ *rtqp; db_recno_t lno; size_t cno; int istmp; char *np; size_t nlen; exp = EXP(sp); /* * Allocate all necessary memory before swapping screens. Initialize * flags so we know what to free. */ rtp = NULL; rtqp = NULL; if (exp->tq.cqh_first == (void *)&exp->tq) { /* Initialize the `local context' tag queue structure. */ CALLOC_GOTO(sp, rtqp, TAGQ *, 1, sizeof(TAGQ)); CIRCLEQ_INIT(&rtqp->tagq); /* Initialize and link in its tag structure. */ CALLOC_GOTO(sp, rtp, TAG *, 1, sizeof(TAG)); CIRCLEQ_INSERT_HEAD(&rtqp->tagq, rtp, q); rtqp->current = rtp; } /* * Stick the current context information in a convenient place, we're * about to lose it. Note, if we're called on editor startup, there * will be no FREF structure. */ frp = sp->frp; lno = sp->lno; cno = sp->cno; istmp = frp == NULL || F_ISSET(frp, FR_TMPFILE) && !new_screen; /* Try to switch to the tag. */ if (new_screen) { if (ex_tag_Nswitch(sp, tqp->tagq.cqh_first, force)) goto err; /* Everything else gets done in the new screen. */ sp = sp->nextdisp; exp = EXP(sp); } else if (ex_tag_nswitch(sp, tqp->tagq.cqh_first, force)) goto err; /* * If this is the first tag, put a `current location' queue entry * in place, so we can pop all the way back to the current mark. * Note, it doesn't point to much of anything, it's a placeholder. */ if (exp->tq.cqh_first == (void *)&exp->tq) { CIRCLEQ_INSERT_HEAD(&exp->tq, rtqp, q); } else rtqp = exp->tq.cqh_first; /* Link the new TAGQ structure into place. */ CIRCLEQ_INSERT_HEAD(&exp->tq, tqp, q); (void)ctag_search(sp, tqp->current->search, tqp->current->slen, tqp->tag); if (tqp->current->msg) { INT2CHAR(sp, tqp->current->msg, tqp->current->mlen + 1, np, nlen); msgq(sp, M_INFO, np); } /* * Move the current context from the temporary save area into the * right structure. * * If we were in a temporary file, we don't have a context to which * we can return, so just make it be the same as what we're moving * to. It will be a little odd that ^T doesn't change anything, but * I don't think it's a big deal. */ if (istmp) { rtqp->current->frp = sp->frp; rtqp->current->lno = sp->lno; rtqp->current->cno = sp->cno; } else { rtqp->current->frp = frp; rtqp->current->lno = lno; rtqp->current->cno = cno; } return (0); err: alloc_err: if (rtqp != NULL) free(rtqp); if (rtp != NULL) free(rtp); tagq_free(sp, tqp); return (1); } /* * tag_msg * A few common messages. * * PUBLIC: void tag_msg __P((SCR *, tagmsg_t, char *)); */ void tag_msg(SCR *sp, tagmsg_t msg, char *tag) { switch (msg) { case TAG_BADLNO: msgq_str(sp, M_ERR, tag, "164|%s: the tag's line number is past the end of the file"); break; case TAG_EMPTY: msgq(sp, M_INFO, "165|The tags stack is empty"); break; case TAG_SEARCH: msgq_str(sp, M_ERR, tag, "166|%s: search pattern not found"); break; default: abort(); } } /* * ex_tagf_alloc -- * Create a new list of ctag files. * * PUBLIC: int ex_tagf_alloc __P((SCR *, char *)); */ int ex_tagf_alloc(SCR *sp, char *str) { EX_PRIVATE *exp; TAGF *tfp; size_t len; char *p, *t; /* Free current queue. */ exp = EXP(sp); while ((tfp = exp->tagfq.tqh_first) != NULL) tagf_free(sp, tfp); /* Create new queue. */ for (p = t = str;; ++p) { if (*p == '\0' || isblank(*p)) { if ((len = p - t) > 1) { MALLOC_RET(sp, tfp, TAGF *, sizeof(TAGF)); MALLOC(sp, tfp->name, char *, len + 1); if (tfp->name == NULL) { free(tfp); return (1); } memcpy(tfp->name, t, len); tfp->name[len] = '\0'; tfp->flags = 0; TAILQ_INSERT_TAIL(&exp->tagfq, tfp, q); } t = p + 1; } if (*p == '\0') break; } return (0); } /* Free previous queue. */ /* * ex_tag_free -- * Free the ex tag information. * * PUBLIC: int ex_tag_free __P((SCR *)); */ int ex_tag_free(SCR *sp) { EX_PRIVATE *exp; TAGF *tfp; TAGQ *tqp; /* Free up tag information. */ exp = EXP(sp); while ((tqp = exp->tq.cqh_first) != (void *)&exp->tq) tagq_free(sp, tqp); while ((tfp = exp->tagfq.tqh_first) != NULL) tagf_free(sp, tfp); if (exp->tag_last != NULL) free(exp->tag_last); return (0); } /* * ctag_search -- * Search a file for a tag. */ static int ctag_search(SCR *sp, CHAR_T *search, size_t slen, char *tag) { MARK m; char *p; char *np; size_t nlen; /* * !!! * The historic tags file format (from a long, long time ago...) * used a line number, not a search string. I got complaints, so * people are still using the format. POSIX 1003.2 permits it. */ if (ISDIGIT(search[0])) { INT2CHAR(sp, search, slen+1, np, nlen); m.lno = atoi(np); if (!db_exist(sp, m.lno)) { tag_msg(sp, TAG_BADLNO, tag); return (1); } } else { /* * Search for the tag; cheap fallback for C functions * if the name is the same but the arguments have changed. */ m.lno = 1; m.cno = 0; if (f_search(sp, &m, &m, search, slen, NULL, SEARCH_FIRST | SEARCH_TAG | SEARCH_PARSE)) { INT2CHAR(sp, search, slen, np, nlen); if ((p = strrchr(np, '(')) != NULL) { slen = p - np; if (f_search(sp, &m, &m, search, slen, NULL, SEARCH_FIRST | SEARCH_TAG)) goto notfound; } else { notfound: tag_msg(sp, TAG_SEARCH, tag); return (1); } } /* * !!! * Historically, tags set the search direction if it wasn't * already set. */ if (sp->searchdir == NOTSET) sp->searchdir = FORWARD; } /* * !!! * Tags move to the first non-blank, NOT the search pattern start. */ sp->lno = m.lno; sp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); return (0); } /* * ctag_slist -- * Search the list of tags files for a tag, and return tag queue. */ static TAGQ * ctag_slist(SCR *sp, CHAR_T *tag) { EX_PRIVATE *exp; TAGF *tfp; TAGQ *tqp; size_t len; int echk; char *np; size_t nlen; exp = EXP(sp); /* Allocate and initialize the tag queue structure. */ INT2CHAR(sp, tag, STRLEN(tag) + 1, np, nlen); len = nlen - 1; CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1); CIRCLEQ_INIT(&tqp->tagq); tqp->tag = tqp->buf; memcpy(tqp->tag, np, (tqp->tlen = len) + 1); /* * Find the tag, only display missing file messages once, and * then only if we didn't find the tag. */ for (echk = 0, tfp = exp->tagfq.tqh_first; tfp != NULL; tfp = tfp->q.tqe_next) if (ctag_sfile(sp, tfp, tqp, tqp->tag)) { echk = 1; F_SET(tfp, TAGF_ERR); } else F_CLR(tfp, TAGF_ERR | TAGF_ERR_WARN); /* Check to see if we found anything. */ if (tqp->tagq.cqh_first == (void *)&tqp->tagq) { msgq_str(sp, M_ERR, tqp->tag, "162|%s: tag not found"); if (echk) for (tfp = exp->tagfq.tqh_first; tfp != NULL; tfp = tfp->q.tqe_next) if (F_ISSET(tfp, TAGF_ERR) && !F_ISSET(tfp, TAGF_ERR_WARN)) { errno = tfp->errnum; msgq_str(sp, M_SYSERR, tfp->name, "%s"); F_SET(tfp, TAGF_ERR_WARN); } free(tqp); return (NULL); } tqp->current = tqp->tagq.cqh_first; return (tqp); alloc_err: return (NULL); } /* * ctag_sfile -- * Search a tags file for a tag, adding any found to the tag queue. */ static int ctag_sfile(SCR *sp, TAGF *tfp, TAGQ *tqp, char *tname) { struct stat sb; TAG *tp; size_t dlen, nlen, slen; int fd, i, nf1, nf2; char *back, *cname, *dname, *front, *map, *name, *p, *search, *t; CHAR_T *wp; size_t wlen; long tl; if ((fd = open(tfp->name, O_RDONLY, 0)) < 0) { tfp->errnum = errno; return (1); } /* * XXX * Some old BSD systems require MAP_FILE as an argument when mapping * regular files. */ #ifndef MAP_FILE #define MAP_FILE 0 #endif /* * XXX * We'd like to test if the file is too big to mmap. Since we don't * know what size or type off_t's or size_t's are, what the largest * unsigned integral type is, or what random insanity the local C * compiler will perpetrate, doing the comparison in a portable way * is flatly impossible. Hope mmap fails if the file is too large. */ if (fstat(fd, &sb) != 0 || (map = mmap(NULL, (size_t)sb.st_size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, fd, (off_t)0)) == (caddr_t)-1) { tfp->errnum = errno; (void)close(fd); return (1); } tl = O_VAL(sp, O_TAGLENGTH); front = map; back = front + sb.st_size; front = binary_search(tname, front, back); front = linear_search(tname, front, back, tl); if (front == NULL) goto done; /* * Initialize and link in the tag structure(s). The historic ctags * file format only permitted a single tag location per tag. The * obvious extension to permit multiple tags locations per tag is to * output multiple records in the standard format. Unfortunately, * this won't work correctly with historic ex/vi implementations, * because their binary search assumes that there's only one record * per tag, and so will use a random tag entry if there si more than * one. This code handles either format. * * The tags file is in the following format: * * | * * Figure out how long everything is so we can allocate in one swell * foop, but discard anything that looks wrong. */ for (;;) { /* Nul-terminate the end of the line. */ for (p = front; p < back && *p != '\n'; ++p); if (p == back || *p != '\n') break; *p = '\0'; /* Update the pointers for the next time. */ t = p + 1; p = front; front = t; /* Break the line into tokens. */ for (i = 0; i < 2 && (t = strsep(&p, "\t ")) != NULL; ++i) switch (i) { case 0: /* Tag. */ cname = t; break; case 1: /* Filename. */ name = t; nlen = strlen(name); break; } /* Check for corruption. */ if (i != 2 || p == NULL || t == NULL) goto corrupt; /* The rest of the string is the search pattern. */ search = p; if ((slen = strlen(p)) == 0) { corrupt: p = msg_print(sp, tname, &nf1); t = msg_print(sp, tfp->name, &nf2); msgq(sp, M_ERR, "163|%s: corrupted tag in %s", p, t); if (nf1) FREE_SPACE(sp, p, 0); if (nf2) FREE_SPACE(sp, t, 0); continue; } /* Check for passing the last entry. */ if (tl ? strncmp(tname, cname, tl) : strcmp(tname, cname)) break; /* Resolve the file name. */ ctag_file(sp, tfp, name, &dname, &dlen); CALLOC_GOTO(sp, tp, TAG *, 1, sizeof(TAG) + dlen + 2 + nlen + 1 + (slen + 1) * sizeof(CHAR_T)); tp->fname = (char *)tp->buf; if (dlen != 0) { memcpy(tp->fname, dname, dlen); tp->fname[dlen] = '/'; ++dlen; } memcpy(tp->fname + dlen, name, nlen + 1); tp->fnlen = dlen + nlen; tp->search = (CHAR_T*)(tp->fname + tp->fnlen + 1); CHAR2INT(sp, search, slen + 1, wp, wlen); MEMCPYW(tp->search, wp, (tp->slen = slen) + 1); CIRCLEQ_INSERT_TAIL(&tqp->tagq, tp, q); } alloc_err: done: if (munmap(map, (size_t)sb.st_size)) msgq(sp, M_SYSERR, "munmap"); if (close(fd)) msgq(sp, M_SYSERR, "close"); return (0); } /* * ctag_file -- * Search for the right path to this file. */ static void ctag_file(SCR *sp, TAGF *tfp, char *name, char **dirp, size_t *dlenp) { struct stat sb; size_t len; char *p, buf[MAXPATHLEN]; /* * !!! * If the tag file path is a relative path, see if it exists. If it * doesn't, look relative to the tags file path. It's okay for a tag * file to not exist, and historically, vi simply displayed a "new" * file. However, if the path exists relative to the tag file, it's * pretty clear what's happening, so we may as well get it right. */ *dlenp = 0; if (name[0] != '/' && stat(name, &sb) && (p = strrchr(tfp->name, '/')) != NULL) { *p = '\0'; len = snprintf(buf, sizeof(buf), "%s/%s", tfp->name, name); if (stat(buf, &sb) == 0) { *dirp = tfp->name; *dlenp = strlen(*dirp); } *p = '/'; } } /* * Binary search for "string" in memory between "front" and "back". * * This routine is expected to return a pointer to the start of a line at * *or before* the first word matching "string". Relaxing the constraint * this way simplifies the algorithm. * * Invariants: * front points to the beginning of a line at or before the first * matching string. * * back points to the beginning of a line at or after the first * matching line. * * Base of the Invariants. * front = NULL; * back = EOF; * * Advancing the Invariants: * * p = first newline after halfway point from front to back. * * If the string at "p" is not greater than the string to match, * p is the new front. Otherwise it is the new back. * * Termination: * * The definition of the routine allows it return at any point, * since front is always at or before the line to print. * * In fact, it returns when the chosen "p" equals "back". This * implies that there exists a string is least half as long as * (back - front), which in turn implies that a linear search will * be no more expensive than the cost of simply printing a string or two. * * Trying to continue with binary search at this point would be * more trouble than it's worth. */ #define EQUAL 0 #define GREATER 1 #define LESS (-1) #define SKIP_PAST_NEWLINE(p, back) while (p < back && *p++ != '\n'); static char * binary_search(register char *string, register char *front, register char *back) { register char *p; p = front + (back - front) / 2; SKIP_PAST_NEWLINE(p, back); while (p != back) { if (compare(string, p, back) == GREATER) front = p; else back = p; p = front + (back - front) / 2; SKIP_PAST_NEWLINE(p, back); } return (front); } /* * Find the first line that starts with string, linearly searching from front * to back. * * Return NULL for no such line. * * This routine assumes: * * o front points at the first character in a line. * o front is before or at the first line to be printed. */ static char * linear_search(char *string, char *front, char *back, long tl) { char *end; while (front < back) { end = tl && back-front > tl ? front+tl : back; switch (compare(string, front, end)) { case EQUAL: /* Found it. */ return (front); case LESS: /* No such string. */ return (NULL); case GREATER: /* Keep going. */ break; } SKIP_PAST_NEWLINE(front, back); } return (NULL); } /* * Return LESS, GREATER, or EQUAL depending on how the string1 compares * with string2 (s1 ??? s2). * * o Matches up to len(s1) are EQUAL. * o Matches up to len(s2) are GREATER. * * The string "s1" is null terminated. The string s2 is '\t', space, (or * "back") terminated. * * !!! * Reasonably modern ctags programs use tabs as separators, not spaces. * However, historic programs did use spaces, and, I got complaints. */ static int compare(register char *s1, register char *s2, register char *back) { for (; *s1 && s2 < back && (*s2 != '\t' && *s2 != ' '); ++s1, ++s2) if (*s1 != *s2) return (*s1 < *s2 ? LESS : GREATER); return (*s1 ? GREATER : s2 < back && (*s2 != '\t' && *s2 != ' ') ? LESS : EQUAL); } nvi-1.81.6/ex/ex_tcl.c0100644000076400001440000000350510720065506013513 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1995 * George V. Neville-Neil. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_tcl.c,v 8.11 2001/06/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:21 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" #ifdef HAVE_TCL_INTERP #include #endif /* * ex_tcl -- :[line [,line]] tcl [command] * Run a command through the tcl interpreter. * * PUBLIC: int ex_tcl __P((SCR*, EXCMD *)); */ int ex_tcl(SCR *sp, EXCMD *cmdp) { #ifdef HAVE_TCL_INTERP CHAR_T *p; GS *gp; size_t len; char buf[128]; /* Initialize the interpreter. */ gp = sp->gp; if (gp->tcl_interp == NULL && tcl_init(gp)) return (1); /* Skip leading white space. */ if (cmdp->argc != 0) for (p = cmdp->argv[0]->bp, len = cmdp->argv[0]->len; len > 0; --len, ++p) if (!isblank(*p)) break; if (cmdp->argc == 0 || len == 0) { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } (void)snprintf(buf, sizeof(buf), "set viScreenId %d\nset viStartLine %lu\nset viStopLine %lu", sp->id, cmdp->addr1.lno, cmdp->addr2.lno); if (Tcl_Eval(gp->tcl_interp, buf) == TCL_OK && Tcl_Eval(gp->tcl_interp, cmdp->argv[0]->bp) == TCL_OK) return (0); msgq(sp, M_ERR, "Tcl: %s", ((Tcl_Interp *)gp->tcl_interp)->result); return (1); #else msgq(sp, M_ERR, "302|Vi was not loaded with a Tcl interpreter"); return (1); #endif /* HAVE_TCL_INTERP */ } nvi-1.81.6/ex/ex_txt.c0100644000076400001440000002603210720065506013550 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_txt.c,v 10.23 2001/06/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:21 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * !!! * The backslash characters was special when it preceded a newline as part of * a substitution replacement pattern. For example, the input ":a\" would * failed immediately with an error, as the wasn't part of a substitution * replacement pattern. This implies a frightening integration of the editor * and the parser and/or the RE engine. There's no way I'm going to reproduce * those semantics. * * So, if backslashes are special, this code inserts the backslash and the next * character into the string, without regard for the character or the command * being entered. Since "\" was illegal historically (except for the one * special case), and the command will fail eventually, no historical scripts * should break (presuming they didn't depend on the failure mode itself or the * characters remaining when failure occurred. */ static int txt_dent __P((SCR *, TEXT *)); static void txt_prompt __P((SCR *, TEXT *, ARG_CHAR_T, u_int32_t)); /* * ex_txt -- * Get lines from the terminal for ex. * * PUBLIC: int ex_txt __P((SCR *, TEXTH *, ARG_CHAR_T, u_int32_t)); */ int ex_txt(SCR *sp, TEXTH *tiqh, ARG_CHAR_T prompt, u_int32_t flags) { EVENT ev; GS *gp; TEXT ait, *ntp, *tp; carat_t carat_st; size_t cnt; int rval; rval = 0; /* * Get a TEXT structure with some initial buffer space, reusing the * last one if it's big enough. (All TEXT bookkeeping fields default * to 0 -- text_init() handles this.) */ if (tiqh->cqh_first != (void *)tiqh) { tp = tiqh->cqh_first; if (tp->q.cqe_next != (void *)tiqh || tp->lb_len < 32) { text_lfree(tiqh); goto newtp; } tp->len = 0; } else { newtp: if ((tp = text_init(sp, NULL, 0, 32)) == NULL) goto err; CIRCLEQ_INSERT_HEAD(tiqh, tp, q); } /* Set the starting line number. */ tp->lno = sp->lno + 1; /* * If it's a terminal, set up autoindent, put out the prompt, and * set it up so we know we were suspended. Otherwise, turn off * the autoindent flag, as that requires less special casing below. * * XXX * Historic practice is that ^Z suspended command mode (but, because * it ran in cooked mode, it was unaffected by the autowrite option.) * On restart, any "current" input was discarded, whether in insert * mode or not, and ex was in command mode. This code matches historic * practice, but not 'cause it's easier. */ gp = sp->gp; if (F_ISSET(gp, G_SCRIPTED)) LF_CLR(TXT_AUTOINDENT); else { if (LF_ISSET(TXT_AUTOINDENT)) { LF_SET(TXT_EOFCHAR); if (v_txt_auto(sp, sp->lno, NULL, 0, tp)) goto err; } txt_prompt(sp, tp, prompt, flags); } for (carat_st = C_NOTSET;;) { if (v_event_get(sp, &ev, 0, 0)) goto err; /* Deal with all non-character events. */ switch (ev.e_event) { case E_CHARACTER: break; case E_ERR: goto err; case E_REPAINT: case E_WRESIZE: continue; case E_EOF: rval = 1; /* FALLTHROUGH */ case E_INTERRUPT: /* * Handle EOF/SIGINT events by discarding partially * entered text and returning. EOF returns failure, * E_INTERRUPT returns success. */ goto notlast; default: v_event_err(sp, &ev); goto notlast; } /* * Deal with character events. * * Check to see if the character fits into the input buffer. * (Use tp->len, ignore overwrite and non-printable chars.) */ BINC_GOTOW(sp, tp->lb, tp->lb_len, tp->len + 1); switch (ev.e_value) { case K_CR: /* * !!! * Historically, 's in the command * weren't special, so the ex parser would return an * unknown command error message. However, if they * terminated the command if they were in a map. I'm * pretty sure this still isn't right, but it handles * what I've seen so far. */ if (!FL_ISSET(ev.e_flags, CH_MAPPED)) goto ins_ch; /* FALLTHROUGH */ case K_NL: /* * '\' can escape /. We * don't discard the backslash because we need it * to get the through the ex parser. */ if (LF_ISSET(TXT_BACKSLASH) && tp->len != 0 && tp->lb[tp->len - 1] == '\\') goto ins_ch; /* * CR returns from the ex command line. * * XXX * Terminate with a nul, needed by filter. */ if (LF_ISSET(TXT_CR)) { tp->lb[tp->len] = '\0'; goto done; } /* * '.' may terminate text input mode; free the current * TEXT. */ if (LF_ISSET(TXT_DOTTERM) && tp->len == tp->ai + 1 && tp->lb[tp->len - 1] == '.') { notlast: CIRCLEQ_REMOVE(tiqh, tp, q); text_free(tp); goto done; } /* Set up bookkeeping for the new line. */ if ((ntp = text_init(sp, NULL, 0, 32)) == NULL) goto err; ntp->lno = tp->lno + 1; /* * Reset the autoindent line value. 0^D keeps the ai * line from changing, ^D changes the level, even if * there were no characters in the old line. Note, if * using the current tp structure, use the cursor as * the length, the autoindent characters may have been * erased. */ if (LF_ISSET(TXT_AUTOINDENT)) { if (carat_st == C_NOCHANGE) { if (v_txt_auto(sp, OOBLNO, &ait, ait.ai, ntp)) goto err; free(ait.lb); } else if (v_txt_auto(sp, OOBLNO, tp, tp->len, ntp)) goto err; carat_st = C_NOTSET; } txt_prompt(sp, ntp, prompt, flags); /* * Swap old and new TEXT's, and insert the new TEXT * into the queue. */ tp = ntp; CIRCLEQ_INSERT_TAIL(tiqh, tp, q); break; case K_CARAT: /* Delete autoindent chars. */ if (tp->len <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) carat_st = C_CARATSET; goto ins_ch; case K_ZERO: /* Delete autoindent chars. */ if (tp->len <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) carat_st = C_ZEROSET; goto ins_ch; case K_CNTRLD: /* Delete autoindent char. */ /* * !!! * Historically, the ^D command took (but then ignored) * a count. For simplicity, we don't return it unless * it's the first character entered. The check for len * equal to 0 is okay, TXT_AUTOINDENT won't be set. */ if (LF_ISSET(TXT_CNTRLD)) { for (cnt = 0; cnt < tp->len; ++cnt) if (!isblank(tp->lb[cnt])) break; if (cnt == tp->len) { tp->len = 1; tp->lb[0] = ev.e_c; tp->lb[1] = '\0'; /* * Put out a line separator, in case * the command fails. */ (void)putchar('\n'); goto done; } } /* * POSIX 1003.1b-1993, paragraph 7.1.1.9, states that * the EOF characters are discarded if there are other * characters to process in the line, i.e. if the EOF * is not the first character in the line. For this * reason, historic ex discarded the EOF characters, * even if occurring in the middle of the input line. * We match that historic practice. * * !!! * The test for discarding in the middle of the line is * done in the switch, because the CARAT forms are N+1, * not N. * * !!! * There's considerable magic to make the terminal code * return the EOF character at all. See that code for * details. */ if (!LF_ISSET(TXT_AUTOINDENT) || tp->len == 0) continue; switch (carat_st) { case C_CARATSET: /* ^^D */ if (tp->len > tp->ai + 1) continue; /* Save the ai string for later. */ ait.lb = NULL; ait.lb_len = 0; BINC_GOTOW(sp, ait.lb, ait.lb_len, tp->ai); MEMCPYW(ait.lb, tp->lb, tp->ai); ait.ai = ait.len = tp->ai; carat_st = C_NOCHANGE; goto leftmargin; case C_ZEROSET: /* 0^D */ if (tp->len > tp->ai + 1) continue; carat_st = C_NOTSET; leftmargin: (void)gp->scr_ex_adjust(sp, EX_TERM_CE); tp->ai = tp->len = 0; break; case C_NOTSET: /* ^D */ if (tp->len > tp->ai) continue; if (txt_dent(sp, tp)) goto err; break; default: abort(); } /* Clear and redisplay the line. */ (void)gp->scr_ex_adjust(sp, EX_TERM_CE); txt_prompt(sp, tp, prompt, flags); break; default: /* * See the TXT_BEAUTIFY comment in vi/v_txt_ev.c. * * Silently eliminate any iscntrl() character that was * not already handled specially, except for and * . */ ins_ch: if (LF_ISSET(TXT_BEAUTIFY) && ISCNTRL(ev.e_c) && ev.e_value != K_FORMFEED && ev.e_value != K_TAB) break; tp->lb[tp->len++] = ev.e_c; break; } } /* NOTREACHED */ done: return (rval); err: alloc_err: return (1); } /* * txt_prompt -- * Display the ex prompt, line number, ai characters. Characters had * better be printable by the terminal driver, but that's its problem, * not ours. */ static void txt_prompt(SCR *sp, TEXT *tp, ARG_CHAR_T prompt, u_int32_t flags) { /* Display the prompt. */ if (LF_ISSET(TXT_PROMPT)) (void)ex_printf(sp, "%c", prompt); /* Display the line number. */ if (LF_ISSET(TXT_NUMBER) && O_ISSET(sp, O_NUMBER)) (void)ex_printf(sp, "%6lu ", (u_long)tp->lno); /* Print out autoindent string. */ if (LF_ISSET(TXT_AUTOINDENT)) (void)ex_printf(sp, "%.*s", (int)tp->ai, tp->lb); (void)ex_fflush(sp); } /* * txt_dent -- * Handle ^D outdents. * * Ex version of vi/v_ntext.c:txt_dent(). See that code for the (usual) * ranting and raving. This is a fair bit simpler as ^T isn't special. */ static int txt_dent(SCR *sp, TEXT *tp) { u_long sw, ts; size_t cno, off, scno, spaces, tabs; ts = O_VAL(sp, O_TABSTOP); sw = O_VAL(sp, O_SHIFTWIDTH); /* Get the current screen column. */ for (off = scno = 0; off < tp->len; ++off) if (tp->lb[off] == '\t') scno += COL_OFF(scno, ts); else ++scno; /* Get the previous shiftwidth column. */ cno = scno; scno -= --scno % sw; /* * Since we don't know what comes before the character(s) being * deleted, we have to resolve the autoindent characters . The * example is a , which doesn't take up a full shiftwidth * number of columns because it's preceded by s. This is * easy to get if the user sets shiftwidth to a value less than * tabstop, and then uses ^T to indent, and ^D to outdent. * * Count up spaces/tabs needed to get to the target. */ for (cno = 0, tabs = 0; cno + COL_OFF(cno, ts) <= scno; ++tabs) cno += COL_OFF(cno, ts); spaces = scno - cno; /* Make sure there's enough room. */ BINC_RETW(sp, tp->lb, tp->lb_len, tabs + spaces + 1); /* Adjust the final ai character count. */ tp->ai = tabs + spaces; /* Enter the replacement characters. */ for (tp->len = 0; tabs > 0; --tabs) tp->lb[tp->len++] = '\t'; for (; spaces > 0; --spaces) tp->lb[tp->len++] = ' '; return (0); } nvi-1.81.6/ex/ex_undo.c0100644000076400001440000000274010720065506013676 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_undo.c,v 10.7 2001/06/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:21 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" /* * ex_undo -- u * Undo the last change. * * PUBLIC: int ex_undo __P((SCR *, EXCMD *)); */ int ex_undo(SCR *sp, EXCMD *cmdp) { EXF *ep; MARK m; /* * !!! * Historic undo always set the previous context mark. */ m.lno = sp->lno; m.cno = sp->cno; if (mark_set(sp, ABSMARK1, &m, 1)) return (1); /* * !!! * Multiple undo isn't available in ex, as there's no '.' command. * Whether 'u' is undo or redo is toggled each time, unless there * was a change since the last undo, in which case it's an undo. */ ep = sp->ep; if (!F_ISSET(ep, F_UNDO)) { F_SET(ep, F_UNDO); ep->lundo = FORWARD; } switch (ep->lundo) { case BACKWARD: if (log_forward(sp, &m)) return (1); ep->lundo = FORWARD; break; case FORWARD: if (log_backward(sp, &m)) return (1); ep->lundo = BACKWARD; break; case NOTSET: abort(); } sp->lno = m.lno; sp->cno = m.cno; return (0); } nvi-1.81.6/ex/ex_usage.c0100644000076400001440000001047710720065506014043 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_usage.c,v 10.15 2001/06/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:21 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_help -- :help * Display help message. * * PUBLIC: int ex_help __P((SCR *, EXCMD *)); */ int ex_help(SCR *sp, EXCMD *cmdp) { (void)ex_puts(sp, "To see the list of vi commands, enter \":viusage\"\n"); (void)ex_puts(sp, "To see the list of ex commands, enter \":exusage\"\n"); (void)ex_puts(sp, "For an ex command usage statement enter \":exusage [cmd]\"\n"); (void)ex_puts(sp, "For a vi key usage statement enter \":viusage [key]\"\n"); (void)ex_puts(sp, "To exit, enter \":q!\"\n"); return (0); } /* * ex_usage -- :exusage [cmd] * Display ex usage strings. * * PUBLIC: int ex_usage __P((SCR *, EXCMD *)); */ int ex_usage(SCR *sp, EXCMD *cmdp) { ARGS *ap; EXCMDLIST const *cp; int newscreen; CHAR_T *name, *p, nb[MAXCMDNAMELEN + 5]; switch (cmdp->argc) { case 1: ap = cmdp->argv[0]; if (isupper(ap->bp[0])) { newscreen = 1; ap->bp[0] = tolower(ap->bp[0]); } else newscreen = 0; for (cp = cmds; cp->name != NULL && memcmp(ap->bp, cp->name, ap->len); ++cp); if (cp->name == NULL || newscreen && !F_ISSET(cp, E_NEWSCREEN)) { if (newscreen) ap->bp[0] = toupper(ap->bp[0]); (void)ex_printf(sp, "The %.*s command is unknown\n", (int)ap->len, ap->bp); } else { (void)ex_printf(sp, "Command: %s\n Usage: %s\n", cp->help, cp->usage); /* * !!! * The "visual" command has two modes, one from ex, * one from the vi colon line. Don't ask. */ if (cp != &cmds[C_VISUAL_EX] && cp != &cmds[C_VISUAL_VI]) break; if (cp == &cmds[C_VISUAL_EX]) cp = &cmds[C_VISUAL_VI]; else cp = &cmds[C_VISUAL_EX]; (void)ex_printf(sp, "Command: %s\n Usage: %s\n", cp->help, cp->usage); } break; case 0: for (cp = cmds; cp->name != NULL && !INTERRUPTED(sp); ++cp) { /* * The ^D command has an unprintable name. * * XXX * We display both capital and lower-case versions of * the appropriate commands -- no need to add in extra * room, they're all short names. */ if (cp == &cmds[C_SCROLL]) name = L("^D"); else if (F_ISSET(cp, E_NEWSCREEN)) { nb[0] = L('['); nb[1] = TOUPPER(cp->name[0]); nb[2] = cp->name[0]; nb[3] = L(']'); for (name = cp->name + 1, p = nb + 4; (*p++ = *name++) != '\0';); name = nb; } else name = cp->name; (void)ex_printf(sp, WVS": %s\n", MAXCMDNAMELEN, name, cp->help); } break; default: abort(); } return (0); } /* * ex_viusage -- :viusage [key] * Display vi usage strings. * * PUBLIC: int ex_viusage __P((SCR *, EXCMD *)); */ int ex_viusage(SCR *sp, EXCMD *cmdp) { GS *gp; VIKEYS const *kp; int key; gp = sp->gp; switch (cmdp->argc) { case 1: if (cmdp->argv[0]->len != 1) { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } key = cmdp->argv[0]->bp[0]; if (key > MAXVIKEY) goto nokey; /* Special case: '[' and ']' commands. */ if ((key == '[' || key == ']') && cmdp->argv[0]->bp[1] != key) goto nokey; /* Special case: ~ command. */ if (key == '~' && O_ISSET(sp, O_TILDEOP)) kp = &tmotion; else kp = &vikeys[key]; if (kp->usage == NULL) nokey: (void)ex_printf(sp, "The %s key has no current meaning\n", KEY_NAME(sp, key)); else (void)ex_printf(sp, " Key:%s%s\nUsage: %s\n", isblank(*kp->help) ? "" : " ", kp->help, kp->usage); break; case 0: for (key = 0; key <= MAXVIKEY && !INTERRUPTED(sp); ++key) { /* Special case: ~ command. */ if (key == '~' && O_ISSET(sp, O_TILDEOP)) kp = &tmotion; else kp = &vikeys[key]; if (kp->help != NULL) (void)ex_printf(sp, "%s\n", kp->help); } break; default: abort(); } return (0); } nvi-1.81.6/ex/ex_util.c0100644000076400001440000001074110720065506013706 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_util.c,v 10.32 2001/06/25 15:19:21 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:21 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_cinit -- * Create an EX command structure. * * PUBLIC: void ex_cinit __P((SCR *, EXCMD *, int, int, db_recno_t, db_recno_t, int)); */ void ex_cinit(SCR *sp, EXCMD *cmdp, int cmd_id, int naddr, db_recno_t lno1, db_recno_t lno2, int force) { memset(cmdp, 0, sizeof(EXCMD)); cmdp->cmd = &cmds[cmd_id]; cmdp->addrcnt = naddr; cmdp->addr1.lno = lno1; cmdp->addr2.lno = lno2; cmdp->addr1.cno = cmdp->addr2.cno = 1; if (force) cmdp->iflags |= E_C_FORCE; (void)argv_init(sp, cmdp); } /* * ex_getline -- * Return a line from the file. * * PUBLIC: int ex_getline __P((SCR *, FILE *, size_t *)); */ int ex_getline(SCR *sp, FILE *fp, size_t *lenp) { EX_PRIVATE *exp; size_t off; int ch; char *p; exp = EXP(sp); for (errno = 0, off = 0, p = exp->ibp;;) { if (off >= exp->ibp_len) { BINC_RETC(sp, exp->ibp, exp->ibp_len, off + 1); p = exp->ibp + off; } if ((ch = getc(fp)) == EOF && !feof(fp)) { if (errno == EINTR) { errno = 0; clearerr(fp); continue; } return (1); } if (ch == EOF || ch == '\n') { if (ch == EOF && !off) return (1); *lenp = off; return (0); } *p++ = ch; ++off; } /* NOTREACHED */ } /* * ex_ncheck -- * Check for more files to edit. * * PUBLIC: int ex_ncheck __P((SCR *, int)); */ int ex_ncheck(SCR *sp, int force) { char **ap; /* * !!! * Historic practice: quit! or two quit's done in succession * (where ZZ counts as a quit) didn't check for other files. */ if (!force && sp->ccnt != sp->q_ccnt + 1 && sp->cargv != NULL && sp->cargv[1] != NULL) { sp->q_ccnt = sp->ccnt; for (ap = sp->cargv + 1; *ap != NULL; ++ap); msgq(sp, M_ERR, "167|%d more files to edit", (ap - sp->cargv) - 1); return (1); } return (0); } /* * ex_init -- * Init the screen for ex. * * PUBLIC: int ex_init __P((SCR *)); */ int ex_init(SCR *sp) { GS *gp; gp = sp->gp; if (gp->scr_screen(sp, SC_EX)) return (1); (void)gp->scr_attr(sp, SA_ALTERNATE, 0); sp->rows = O_VAL(sp, O_LINES); sp->cols = O_VAL(sp, O_COLUMNS); F_CLR(sp, SC_VI); F_SET(sp, SC_EX | SC_SCR_EX); return (0); } /* * ex_emsg -- * Display a few common ex and vi error messages. * * PUBLIC: void ex_wemsg __P((SCR *, CHAR_T *, exm_t)); */ void ex_wemsg(SCR* sp, CHAR_T *p, exm_t which) { char *np; size_t nlen; if (p) INT2CHAR(sp, p, STRLEN(p), np, nlen); else np = NULL; ex_emsg(sp, np, which); } /* * ex_emsg -- * Display a few common ex and vi error messages. * * PUBLIC: void ex_emsg __P((SCR *, char *, exm_t)); */ void ex_emsg(SCR *sp, char *p, exm_t which) { switch (which) { case EXM_EMPTYBUF: msgq(sp, M_ERR, "168|Buffer %s is empty", p); break; case EXM_FILECOUNT: msgq_str(sp, M_ERR, p, "144|%s: expanded into too many file names"); break; case EXM_LOCKED: msgq(sp, M_ERR, "Command failed, buffer is locked"); break; case EXM_NOCANON: msgq(sp, M_ERR, "283|The %s command requires the ex terminal interface", p); break; case EXM_NOCANON_F: msgq(sp, M_ERR, "272|That form of %s requires the ex terminal interface", p); break; case EXM_NOFILEYET: if (p == NULL) msgq(sp, M_ERR, "274|Command failed, no file read in yet."); else msgq(sp, M_ERR, "173|The %s command requires that a file have already been read in", p); break; case EXM_NOPREVBUF: msgq(sp, M_ERR, "171|No previous buffer to execute"); break; case EXM_NOPREVRE: msgq(sp, M_ERR, "172|No previous regular expression"); break; case EXM_NOSUSPEND: msgq(sp, M_ERR, "230|This screen may not be suspended"); break; case EXM_SECURE: msgq(sp, M_ERR, "290|The %s command is not supported when the secure edit option is set", p); break; case EXM_SECURE_F: msgq(sp, M_ERR, "284|That form of %s is not supported when the secure edit option is set", p); break; case EXM_USAGE: msgq(sp, M_ERR, "174|Usage: %s", p); break; } } nvi-1.81.6/ex/ex_version.c0100644000076400001440000000154710720065506014422 0ustar skimousers/*- * Copyright (c) 1991, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1991, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_version.c,v 10.32 2001/06/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:22 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" #include "version.h" /* * ex_version -- :version * Display the program version. * * PUBLIC: int ex_version __P((SCR *, EXCMD *)); */ int ex_version(SCR *sp, EXCMD *cmdp) { msgq(sp, M_INFO, "Version "VI_VERSION " The CSRG, University of California, Berkeley."); return (0); } nvi-1.81.6/ex/ex_visual.c0100644000076400001440000000752010720065506014235 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_visual.c,v 10.16 2001/08/29 11:04:13 skimo Exp $ (Berkeley) $Date: 2001/08/29 11:04:13 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" /* * ex_visual -- :[line] vi[sual] [^-.+] [window_size] [flags] * Switch to visual mode. * * PUBLIC: int ex_visual __P((SCR *, EXCMD *)); */ int ex_visual(SCR *sp, EXCMD *cmdp) { SCR *tsp; size_t len; int pos; char buf[256]; size_t wlen; CHAR_T *wp; /* If open option off, disallow visual command. */ if (!O_ISSET(sp, O_OPEN)) { msgq(sp, M_ERR, "175|The visual command requires that the open option be set"); return (1); } /* Move to the address. */ sp->lno = cmdp->addr1.lno == 0 ? 1 : cmdp->addr1.lno; /* * Push a command based on the line position flags. If no * flag specified, the line goes at the top of the screen. */ switch (FL_ISSET(cmdp->iflags, E_C_CARAT | E_C_DASH | E_C_DOT | E_C_PLUS)) { case E_C_CARAT: pos = '^'; break; case E_C_DASH: pos = '-'; break; case E_C_DOT: pos = '.'; break; case E_C_PLUS: pos = '+'; break; default: sp->frp->lno = sp->lno; sp->frp->cno = 0; (void)nonblank(sp, sp->lno, &sp->cno); F_SET(sp->frp, FR_CURSORSET); goto nopush; } if (FL_ISSET(cmdp->iflags, E_C_COUNT)) len = snprintf(buf, sizeof(buf), "%luz%c%lu", sp->lno, pos, cmdp->count); else len = snprintf(buf, sizeof(buf), "%luz%c", sp->lno, pos); CHAR2INT(sp, buf, len, wp, wlen); (void)v_event_push(sp, NULL, wp, wlen, CH_NOMAP | CH_QUOTED); /* * !!! * Historically, if no line address was specified, the [p#l] flags * caused the cursor to be moved to the last line of the file, which * was then positioned as described above. This seems useless, so * I haven't implemented it. */ switch (FL_ISSET(cmdp->iflags, E_C_HASH | E_C_LIST | E_C_PRINT)) { case E_C_HASH: O_SET(sp, O_NUMBER); break; case E_C_LIST: O_SET(sp, O_LIST); break; case E_C_PRINT: break; } nopush: /* * !!! * You can call the visual part of the editor from within an ex * global command. * * XXX * Historically, undoing a visual session was a single undo command, * i.e. you could undo all of the changes you made in visual mode. * We don't get this right; I'm waiting for the new logging code to * be available. * * It's explicit, don't have to wait for the user, unless there's * already a reason to wait. */ if (!F_ISSET(sp, SC_SCR_EXWROTE)) F_SET(sp, SC_EX_WAIT_NO); if (F_ISSET(sp, SC_EX_GLOBAL)) { /* * When the vi screen(s) exit, we don't want to lose our hold * on this screen or this file, otherwise we're going to fail * fairly spectacularly. */ ++sp->refcnt; ++sp->ep->refcnt; /* XXXX where is this decremented ? */ /* * Fake up a screen pointer -- vi doesn't get to change our * underlying file, regardless. */ tsp = sp; if (vi(&tsp)) return (1); /* * !!! * Historically, if the user exited the vi screen(s) using an * ex quit command (e.g. :wq, :q) ex/vi exited, it was only if * they exited vi using the Q command that ex continued. Some * early versions of nvi continued in ex regardless, but users * didn't like the semantic. * * Reset the screen. */ if (ex_init(sp)) return (1); /* Move out of the vi screen. */ (void)ex_puts(sp, "\n"); } else { F_CLR(sp, SC_EX | SC_SCR_EX); F_SET(sp, SC_VI); } return (0); } nvi-1.81.6/ex/ex_write.c0100644000076400001440000002014510720065506014062 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_write.c,v 10.38 2001/06/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:22 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" enum which {WN, WQ, WRITE, XIT}; static int exwr __P((SCR *, EXCMD *, enum which)); /* * ex_wn -- :wn[!] [>>] [file] * Write to a file and switch to the next one. * * PUBLIC: int ex_wn __P((SCR *, EXCMD *)); */ int ex_wn(SCR *sp, EXCMD *cmdp) { if (exwr(sp, cmdp, WN)) return (1); if (file_m3(sp, 0)) return (1); /* The file name isn't a new file to edit. */ cmdp->argc = 0; return (ex_next(sp, cmdp)); } /* * ex_wq -- :wq[!] [>>] [file] * Write to a file and quit. * * PUBLIC: int ex_wq __P((SCR *, EXCMD *)); */ int ex_wq(SCR *sp, EXCMD *cmdp) { int force; if (exwr(sp, cmdp, WQ)) return (1); if (file_m3(sp, 0)) return (1); force = FL_ISSET(cmdp->iflags, E_C_FORCE); if (ex_ncheck(sp, force)) return (1); F_SET(sp, force ? SC_EXIT_FORCE : SC_EXIT); return (0); } /* * ex_write -- :write[!] [>>] [file] * :write [!] [cmd] * Write to a file. * * PUBLIC: int ex_write __P((SCR *, EXCMD *)); */ int ex_write(SCR *sp, EXCMD *cmdp) { return (exwr(sp, cmdp, WRITE)); } /* * ex_xit -- :x[it]! [file] * Write out any modifications and quit. * * PUBLIC: int ex_xit __P((SCR *, EXCMD *)); */ int ex_xit(SCR *sp, EXCMD *cmdp) { int force; NEEDFILE(sp, cmdp); if (F_ISSET(sp->ep, F_MODIFIED) && exwr(sp, cmdp, XIT)) return (1); if (file_m3(sp, 0)) return (1); force = FL_ISSET(cmdp->iflags, E_C_FORCE); if (ex_ncheck(sp, force)) return (1); F_SET(sp, force ? SC_EXIT_FORCE : SC_EXIT); return (0); } /* * exwr -- * The guts of the ex write commands. */ static int exwr(SCR *sp, EXCMD *cmdp, enum which cmd) { MARK rm; int flags; char *name; CHAR_T *p; size_t nlen; char *n; int rc; NEEDFILE(sp, cmdp); /* All write commands can have an associated '!'. */ LF_INIT(FS_POSSIBLE); if (FL_ISSET(cmdp->iflags, E_C_FORCE)) LF_SET(FS_FORCE); /* Skip any leading whitespace. */ if (cmdp->argc != 0) for (p = cmdp->argv[0]->bp; *p != '\0' && isblank(*p); ++p); /* If "write !" it's a pipe to a utility. */ if (cmdp->argc != 0 && cmd == WRITE && *p == '!') { /* Secure means no shell access. */ if (O_ISSET(sp, O_SECURE)) { ex_wemsg(sp, cmdp->cmd->name, EXM_SECURE_F); return (1); } /* Expand the argument. */ for (++p; *p && isblank(*p); ++p); if (*p == '\0') { ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); return (1); } if (argv_exp1(sp, cmdp, p, STRLEN(p), 1)) return (1); /* * Historically, vi waited after a write filter even if there * wasn't any output from the command. People complained when * nvi waited only if there was output, wanting the visual cue * that the program hadn't written anything. */ F_SET(sp, SC_EX_WAIT_YES); /* * !!! * Ignore the return cursor position, the cursor doesn't * move. */ if (ex_filter(sp, cmdp, &cmdp->addr1, &cmdp->addr2, &rm, cmdp->argv[1]->bp, FILTER_WRITE)) return (1); /* Ex terminates with a bang, even if the command fails. */ if (!F_ISSET(sp, SC_VI) && !F_ISSET(sp, SC_EX_SILENT)) (void)ex_puts(sp, "!\n"); return (0); } /* Set the FS_ALL flag if we're writing the entire file. */ if (cmdp->addr1.lno <= 1 && !db_exist(sp, cmdp->addr2.lno + 1)) LF_SET(FS_ALL); /* If "write >>" it's an append to a file. */ if (cmdp->argc != 0 && cmd != XIT && p[0] == '>' && p[1] == '>') { LF_SET(FS_APPEND); /* Skip ">>" and whitespace. */ for (p += 2; *p && isblank(*p); ++p); } /* If no other arguments, just write the file back. */ if (cmdp->argc == 0 || *p == '\0') return (file_write(sp, &cmdp->addr1, &cmdp->addr2, NULL, flags)); /* Build an argv so we get an argument count and file expansion. */ if (argv_exp2(sp, cmdp, p, STRLEN(p))) return (1); /* * 0 args: impossible. * 1 args: impossible (I hope). * 2 args: read it. * >2 args: object, too many args. * * The 1 args case depends on the argv_sexp() function refusing * to return success without at least one non-blank character. */ switch (cmdp->argc) { case 0: case 1: abort(); /* NOTREACHED */ case 2: INT2CHAR(sp, cmdp->argv[1]->bp, cmdp->argv[1]->len+1, n, nlen); name = v_strdup(sp, n, nlen - 1); /* * !!! * Historically, the read and write commands renamed * "unnamed" files, or, if the file had a name, set * the alternate file name. */ if (F_ISSET(sp->frp, FR_TMPFILE) && !F_ISSET(sp->frp, FR_EXNAMED)) { if ((n = v_strdup(sp, name, nlen - 1)) != NULL) { free(sp->frp->name); sp->frp->name = n; } /* * The file has a real name, it's no longer a * temporary, clear the temporary file flags. * * !!! * If we're writing the whole file, FR_NAMECHANGE * will be cleared by the write routine -- this is * historic practice. */ F_CLR(sp->frp, FR_TMPEXIT | FR_TMPFILE); F_SET(sp->frp, FR_NAMECHANGE | FR_EXNAMED); /* Notify the screen. */ (void)sp->gp->scr_rename(sp, sp->frp->name, 1); } else set_alt_name(sp, name); break; default: INT2CHAR(sp, p, STRLEN(p) + 1, n, nlen); ex_emsg(sp, n, EXM_FILECOUNT); return (1); } rc = file_write(sp, &cmdp->addr1, &cmdp->addr2, name, flags); free(name); return rc; } /* * ex_writefp -- * Write a range of lines to a FILE *. * * PUBLIC: int ex_writefp __P((SCR *, * PUBLIC: char *, FILE *, MARK *, MARK *, u_long *, u_long *, int)); */ int ex_writefp(SCR *sp, char *name, FILE *fp, MARK *fm, MARK *tm, u_long *nlno, u_long *nch, int silent) { struct stat sb; GS *gp; u_long ccnt; /* XXX: can't print off_t portably. */ db_recno_t fline, tline, lcnt; size_t len; int rval; char *msg; CHAR_T *p; char *f; size_t flen; gp = sp->gp; fline = fm->lno; tline = tm->lno; if (nlno != NULL) { *nch = 0; *nlno = 0; } /* * The vi filter code has multiple processes running simultaneously, * and one of them calls ex_writefp(). The "unsafe" function calls * in this code are to db_get() and msgq(). Db_get() is safe, see * the comment in ex_filter.c:ex_filter() for details. We don't call * msgq if the multiple process bit in the EXF is set. * * !!! * Historic vi permitted files of 0 length to be written. However, * since the way vi got around dealing with "empty" files was to * always have a line in the file no matter what, it wrote them as * files of a single, empty line. We write empty files. * * "Alex, I'll take vi trivia for $1000." */ ccnt = 0; lcnt = 0; msg = "253|Writing..."; if (tline != 0) for (; fline <= tline; ++fline, ++lcnt) { /* Caller has to provide any interrupt message. */ if ((lcnt + 1) % INTERRUPT_CHECK == 0) { if (INTERRUPTED(sp)) break; if (!silent) { gp->scr_busy(sp, msg, msg == NULL ? BUSY_UPDATE : BUSY_ON); msg = NULL; } } if (db_get(sp, fline, DBG_FATAL, &p, &len)) goto err; INT2FILE(sp, p, len, f, flen); if (fwrite(f, 1, flen, fp) != flen) goto err; ccnt += len; if (putc('\n', fp) != '\n') break; ++ccnt; } if (fflush(fp)) goto err; /* * XXX * I don't trust NFS -- check to make sure that we're talking to * a regular file and sync so that NFS is forced to flush. */ if (!fstat(fileno(fp), &sb) && S_ISREG(sb.st_mode) && fsync(fileno(fp))) goto err; if (fclose(fp)) goto err; rval = 0; if (0) { err: if (!F_ISSET(sp->ep, F_MULTILOCK)) msgq_str(sp, M_SYSERR, name, "%s"); (void)fclose(fp); rval = 1; } if (!silent) gp->scr_busy(sp, NULL, BUSY_OFF); /* Report the possibly partial transfer. */ if (nlno != NULL) { *nch = ccnt; *nlno = lcnt; } return (rval); } nvi-1.81.6/ex/ex_yank.c0100644000076400001440000000200410720065506013664 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_yank.c,v 10.8 2001/06/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:22 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" /* * ex_yank -- :[line [,line]] ya[nk] [buffer] [count] * Yank the lines into a buffer. * * PUBLIC: int ex_yank __P((SCR *, EXCMD *)); */ int ex_yank(SCR *sp, EXCMD *cmdp) { NEEDFILE(sp, cmdp); /* * !!! * Historically, yanking lines in ex didn't count toward the * number-of-lines-yanked report. */ return (cut(sp, FL_ISSET(cmdp->iflags, E_C_BUFFER) ? &cmdp->buffer : NULL, &cmdp->addr1, &cmdp->addr2, CUT_LINEMODE)); } nvi-1.81.6/ex/ex_z.c0100644000076400001440000000743410720065506013207 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ex_z.c,v 10.12 2001/06/25 15:19:22 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:22 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" /* * ex_z -- :[line] z [^-.+=] [count] [flags] * Adjust window. * * PUBLIC: int ex_z __P((SCR *, EXCMD *)); */ int ex_z(SCR *sp, EXCMD *cmdp) { MARK abs; db_recno_t cnt, equals, lno; int eofcheck; NEEDFILE(sp, cmdp); /* * !!! * If no count specified, use either two times the size of the * scrolling region, or the size of the window option. POSIX * 1003.2 claims that the latter is correct, but historic ex/vi * documentation and practice appear to use the scrolling region. * I'm using the window size as it means that the entire screen * is used instead of losing a line to roundoff. Note, we drop * a line from the cnt if using the window size to leave room for * the next ex prompt. */ if (FL_ISSET(cmdp->iflags, E_C_COUNT)) cnt = cmdp->count; else #ifdef HISTORIC_PRACTICE cnt = O_VAL(sp, O_SCROLL) * 2; #else cnt = O_VAL(sp, O_WINDOW) - 1; #endif equals = 0; eofcheck = 0; lno = cmdp->addr1.lno; switch (FL_ISSET(cmdp->iflags, E_C_CARAT | E_C_DASH | E_C_DOT | E_C_EQUAL | E_C_PLUS)) { case E_C_CARAT: /* Display cnt * 2 before the line. */ eofcheck = 1; if (lno > cnt * 2) cmdp->addr1.lno = (lno - cnt * 2) + 1; else cmdp->addr1.lno = 1; cmdp->addr2.lno = (cmdp->addr1.lno + cnt) - 1; break; case E_C_DASH: /* Line goes at the bottom of the screen. */ cmdp->addr1.lno = lno > cnt ? (lno - cnt) + 1 : 1; cmdp->addr2.lno = lno; break; case E_C_DOT: /* Line goes in the middle of the screen. */ /* * !!! * Historically, the "middleness" of the line overrode the * count, so that "3z.19" or "3z.20" would display the first * 12 lines of the file, i.e. (N - 1) / 2 lines before and * after the specified line. */ eofcheck = 1; cnt = (cnt - 1) / 2; cmdp->addr1.lno = lno > cnt ? lno - cnt : 1; cmdp->addr2.lno = lno + cnt; /* * !!! * Historically, z. set the absolute cursor mark. */ abs.lno = sp->lno; abs.cno = sp->cno; (void)mark_set(sp, ABSMARK1, &abs, 1); break; case E_C_EQUAL: /* Center with hyphens. */ /* * !!! * Strangeness. The '=' flag is like the '.' flag (see the * above comment, it applies here as well) but with a special * little hack. Print out lines of hyphens before and after * the specified line. Additionally, the cursor remains set * on that line. */ eofcheck = 1; cnt = (cnt - 1) / 2; cmdp->addr1.lno = lno > cnt ? lno - cnt : 1; cmdp->addr2.lno = lno - 1; if (ex_pr(sp, cmdp)) return (1); (void)ex_puts(sp, "----------------------------------------\n"); cmdp->addr2.lno = cmdp->addr1.lno = equals = lno; if (ex_pr(sp, cmdp)) return (1); (void)ex_puts(sp, "----------------------------------------\n"); cmdp->addr1.lno = lno + 1; cmdp->addr2.lno = (lno + cnt) - 1; break; default: /* If no line specified, move to the next one. */ if (F_ISSET(cmdp, E_ADDR_DEF)) ++lno; /* FALLTHROUGH */ case E_C_PLUS: /* Line goes at the top of the screen. */ eofcheck = 1; cmdp->addr1.lno = lno; cmdp->addr2.lno = (lno + cnt) - 1; break; } if (eofcheck) { if (db_last(sp, &lno)) return (1); if (cmdp->addr2.lno > lno) cmdp->addr2.lno = lno; } if (ex_pr(sp, cmdp)) return (1); if (equals) sp->lno = equals; return (0); } nvi-1.81.6/ex/script.h0100644000076400001440000000131110720065506013537 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: script.h,v 10.2 1996/03/06 19:53:00 bostic Exp $ (Berkeley) $Date: 1996/03/06 19:53:00 $ */ struct _script { pid_t sh_pid; /* Shell pid. */ int sh_master; /* Master pty fd. */ int sh_slave; /* Slave pty fd. */ char *sh_prompt; /* Prompt. */ size_t sh_prompt_len; /* Prompt length. */ char sh_name[64]; /* Pty name */ #ifdef TIOCGWINSZ struct winsize sh_win; /* Window size. */ #endif struct termios sh_term; /* Terminal information. */ }; nvi-1.81.6/ex/tag.h0100644000076400001440000000627510720065506013024 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1994, 1996 * Rob Mayoff. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: tag.h,v 10.8 2000/07/14 14:29:22 skimo Exp $ (Berkeley) $Date: 2000/07/14 14:29:22 $ */ /* * Cscope connection information. One of these is maintained per cscope * connection, linked from the EX_PRIVATE structure. */ struct _csc { LIST_ENTRY(_csc) q; /* Linked list of cscope connections. */ char *dname; /* Base directory of this cscope connection. */ size_t dlen; /* Length of base directory. */ pid_t pid; /* PID of the connected cscope process. */ time_t mtime; /* Last modification time of cscope database. */ FILE *from_fp; /* from cscope: FILE. */ int from_fd; /* from cscope: file descriptor. */ FILE *to_fp; /* to cscope: FILE. */ int to_fd; /* to cscope: file descriptor. */ char **paths; /* Array of search paths for this cscope. */ char *pbuf; /* Search path buffer. */ size_t pblen; /* Search path buffer length. */ char buf[1]; /* Variable length buffer. */ }; /* * Tag file information. One of these is maintained per tag file, linked * from the EXPRIVATE structure. */ struct _tagf { /* Tag files. */ TAILQ_ENTRY(_tagf) q; /* Linked list of tag files. */ char *name; /* Tag file name. */ int errnum; /* Errno. */ #define TAGF_ERR 0x01 /* Error occurred. */ #define TAGF_ERR_WARN 0x02 /* Error reported. */ u_int8_t flags; }; /* * Tags are structured internally as follows: * * +----+ +----+ +----+ +----+ * | EP | -> | Q1 | <-- | T1 | <-- | T2 | * +----+ +----+ --> +----+ --> +----+ * | * +----+ +----+ * | Q2 | <-- | T1 | * +----+ --> +----+ * | * +----+ +----+ * | Q3 | <-- | T1 | * +----+ --> +----+ * * Each Q is a TAGQ, or tag "query", which is the result of one tag or cscope * command. Each Q references one or more TAG's, or tagged file locations. * * tag: put a new Q at the head (^]) * tagnext: T1 -> T2 inside Q (^N) * tagprev: T2 -> T1 inside Q (^P) * tagpop: discard Q (^T) * tagtop: discard all Q */ struct _tag { /* Tag list. */ CIRCLEQ_ENTRY(_tag) q; /* Linked list of tags. */ /* Tag pop/return information. */ FREF *frp; /* Saved file. */ db_recno_t lno; /* Saved line number. */ size_t cno; /* Saved column number. */ char *fname; /* Filename. */ size_t fnlen; /* Filename length. */ db_recno_t slno; /* Search line number. */ CHAR_T *search; /* Search string. */ size_t slen; /* Search string length. */ CHAR_T *msg; /* Message string. */ size_t mlen; /* Message string length. */ CHAR_T buf[1]; /* Variable length buffer. */ }; struct _tagq { /* Tag queue. */ CIRCLEQ_ENTRY(_tagq) q; /* Linked list of tag queues. */ /* This queue's tag list. */ CIRCLEQ_HEAD(_tagqh, _tag) tagq; TAG *current; /* Current TAG within the queue. */ char *tag; /* Tag string. */ size_t tlen; /* Tag string length. */ #define TAG_CSCOPE 0x01 /* Cscope tag. */ u_int8_t flags; char buf[1]; /* Variable length buffer. */ }; nvi-1.81.6/ex/ex_def.h0100444000076400001440000000302210720065712013463 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ #define C_SCROLL 0 #define C_BANG 1 #define C_HASH 2 #define C_SUBAGAIN 3 #define C_STAR 4 #define C_SHIFTL 5 #define C_EQUAL 6 #define C_SHIFTR 7 #define C_AT 8 #define C_APPEND 9 #define C_ABBR 10 #define C_ARGS 11 #define C_BG 12 #define C_CHANGE 13 #define C_CD 14 #define C_CHDIR 15 #define C_COPY 16 #define C_CSCOPE 17 #define C_DELETE 18 #define C_DISPLAY 19 #define C_EDIT 20 #define C_EX 21 #define C_EXUSAGE 22 #define C_FILE 23 #define C_FG 24 #define C_GLOBAL 25 #define C_HELP 26 #define C_INSERT 27 #define C_JOIN 28 #define C_K 29 #define C_LIST 30 #define C_MOVE 31 #define C_MARK 32 #define C_MAP 33 #define C_MKEXRC 34 #define C_NEXT 35 #define C_NUMBER 36 #define C_OPEN 37 #define C_PRINT 38 #define C_PERLCMD 39 #define C_PERLDOCMD 40 #define C_PRESERVE 41 #define C_PREVIOUS 42 #define C_PUT 43 #define C_QUIT 44 #define C_READ 45 #define C_RECOVER 46 #define C_RESIZE 47 #define C_REWIND 48 #define C_SUBSTITUTE 49 #define C_SCRIPT 50 #define C_SET 51 #define C_SHELL 52 #define C_SOURCE 53 #define C_STOP 54 #define C_SUSPEND 55 #define C_T 56 #define C_TAG 57 #define C_TAGNEXT 58 #define C_TAGPOP 59 #define C_TAGPREV 60 #define C_TAGTOP 61 #define C_TCLCMD 62 #define C_UNDO 63 #define C_UNABBREVIATE 64 #define C_UNMAP 65 #define C_V 66 #define C_VERSION 67 #define C_VISUAL_EX 68 #define C_VISUAL_VI 69 #define C_VIUSAGE 70 #define C_VSPLIT 71 #define C_WRITE 72 #define C_WN 73 #define C_WQ 74 #define C_XIT 75 #define C_YANK 76 #define C_Z 77 #define C_SUBTILDE 78 nvi-1.81.6/ex/extern.h0100444000076400001440000001204210720065712013540 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int ex __P((SCR **)); int ex_cmd __P((SCR *)); int ex_range __P((SCR *, EXCMD *, int *)); int ex_is_abbrev __P((SCR *, CHAR_T *, size_t)); int ex_is_unmap __P((SCR *, CHAR_T *, size_t)); void ex_badaddr __P((SCR *, EXCMDLIST const *, enum badaddr, enum nresult)); int ex_abbr __P((SCR *, EXCMD *)); int ex_unabbr __P((SCR *, EXCMD *)); int ex_append __P((SCR *, EXCMD *)); int ex_change __P((SCR *, EXCMD *)); int ex_insert __P((SCR *, EXCMD *)); int ex_next __P((SCR *, EXCMD *)); int ex_prev __P((SCR *, EXCMD *)); int ex_rew __P((SCR *, EXCMD *)); int ex_args __P((SCR *, EXCMD *)); char **ex_buildargv __P((SCR *, EXCMD *, char *)); int argv_init __P((SCR *, EXCMD *)); int argv_exp0 __P((SCR *, EXCMD *, CHAR_T *, size_t)); int argv_exp1 __P((SCR *, EXCMD *, CHAR_T *, size_t, int)); int argv_exp2 __P((SCR *, EXCMD *, CHAR_T *, size_t)); int argv_exp3 __P((SCR *, EXCMD *, CHAR_T *, size_t)); int argv_free __P((SCR *)); int ex_at __P((SCR *, EXCMD *)); int ex_bang __P((SCR *, EXCMD *)); int ex_cd __P((SCR *, EXCMD *)); int ex_cscope __P((SCR *, EXCMD *)); int cscope_display __P((SCR *)); int cscope_search __P((SCR *, TAGQ *, TAG *)); int ex_delete __P((SCR *, EXCMD *)); int ex_display __P((SCR *, EXCMD *)); int ex_edit __P((SCR *, EXCMD *)); int ex_equal __P((SCR *, EXCMD *)); int ex_file __P((SCR *, EXCMD *)); int ex_filter __P((SCR *, EXCMD *, MARK *, MARK *, MARK *, CHAR_T *, enum filtertype)); int ex_global __P((SCR *, EXCMD *)); int ex_v __P((SCR *, EXCMD *)); int ex_g_insdel __P((SCR *, lnop_t, db_recno_t)); int ex_screen_copy __P((SCR *, SCR *)); int ex_screen_end __P((SCR *)); int ex_optchange __P((SCR *, int, char *, u_long *)); int ex_exrc __P((SCR *)); int ex_run_str __P((SCR *, char *, CHAR_T *, size_t, int, int)); int ex_join __P((SCR *, EXCMD *)); int ex_map __P((SCR *, EXCMD *)); int ex_unmap __P((SCR *, EXCMD *)); int ex_mark __P((SCR *, EXCMD *)); int ex_mkexrc __P((SCR *, EXCMD *)); int ex_copy __P((SCR *, EXCMD *)); int ex_move __P((SCR *, EXCMD *)); int ex_open __P((SCR *, EXCMD *)); int ex_perl __P((SCR*, EXCMD *)); int ex_preserve __P((SCR *, EXCMD *)); int ex_recover __P((SCR *, EXCMD *)); int ex_list __P((SCR *, EXCMD *)); int ex_number __P((SCR *, EXCMD *)); int ex_pr __P((SCR *, EXCMD *)); int ex_print __P((SCR *, EXCMD *, MARK *, MARK *, u_int32_t)); int ex_ldisplay __P((SCR *, const CHAR_T *, size_t, size_t, u_int)); int ex_scprint __P((SCR *, MARK *, MARK *)); int ex_printf __P((SCR *, const char *, ...)); int ex_puts __P((SCR *, const char *)); int ex_fflush __P((SCR *sp)); int ex_put __P((SCR *, EXCMD *)); int ex_quit __P((SCR *, EXCMD *)); int ex_read __P((SCR *, EXCMD *)); int ex_readfp __P((SCR *, char *, FILE *, MARK *, db_recno_t *, int)); int ex_bg __P((SCR *, EXCMD *)); int ex_fg __P((SCR *, EXCMD *)); int ex_resize __P((SCR *, EXCMD *)); int ex_sdisplay __P((SCR *)); int ex_script __P((SCR *, EXCMD *)); int sscr_exec __P((SCR *, db_recno_t)); int sscr_check_input __P((SCR *sp, fd_set *rdfd, int maxfd)); int sscr_input __P((SCR *)); int sscr_end __P((SCR *)); int ex_set __P((SCR *, EXCMD *)); int ex_shell __P((SCR *, EXCMD *)); int ex_exec_proc __P((SCR *, EXCMD *, char *, const char *, int)); int proc_wait __P((SCR *, long, const char *, int, int)); int ex_shiftl __P((SCR *, EXCMD *)); int ex_shiftr __P((SCR *, EXCMD *)); int ex_source __P((SCR *, EXCMD *)); int ex_stop __P((SCR *, EXCMD *)); int ex_s __P((SCR *, EXCMD *)); int ex_subagain __P((SCR *, EXCMD *)); int ex_subtilde __P((SCR *, EXCMD *)); int re_compile __P((SCR *, CHAR_T *, size_t, CHAR_T **, size_t *, regex_t *, u_int)); void re_error __P((SCR *, int, regex_t *)); int ex_tag_first __P((SCR *, CHAR_T *)); int ex_tag_push __P((SCR *, EXCMD *)); int ex_tag_next __P((SCR *, EXCMD *)); int ex_tag_prev __P((SCR *, EXCMD *)); int ex_tag_nswitch __P((SCR *, TAG *, int)); int ex_tag_Nswitch __P((SCR *, TAG *, int)); int ex_tag_pop __P((SCR *, EXCMD *)); int ex_tag_top __P((SCR *, EXCMD *)); int ex_tag_display __P((SCR *)); int ex_tag_copy __P((SCR *, SCR *)); int tagq_free __P((SCR *, TAGQ *)); int tagq_push __P((SCR*, TAGQ*, int, int )); void tag_msg __P((SCR *, tagmsg_t, char *)); int ex_tagf_alloc __P((SCR *, char *)); int ex_tag_free __P((SCR *)); int ex_tcl __P((SCR*, EXCMD *)); int ex_txt __P((SCR *, TEXTH *, ARG_CHAR_T, u_int32_t)); int ex_undo __P((SCR *, EXCMD *)); int ex_help __P((SCR *, EXCMD *)); int ex_usage __P((SCR *, EXCMD *)); int ex_viusage __P((SCR *, EXCMD *)); void ex_cinit __P((SCR *, EXCMD *, int, int, db_recno_t, db_recno_t, int)); int ex_getline __P((SCR *, FILE *, size_t *)); int ex_ncheck __P((SCR *, int)); int ex_init __P((SCR *)); void ex_wemsg __P((SCR *, CHAR_T *, exm_t)); void ex_emsg __P((SCR *, char *, exm_t)); int ex_version __P((SCR *, EXCMD *)); int ex_visual __P((SCR *, EXCMD *)); int ex_wn __P((SCR *, EXCMD *)); int ex_wq __P((SCR *, EXCMD *)); int ex_write __P((SCR *, EXCMD *)); int ex_xit __P((SCR *, EXCMD *)); int ex_writefp __P((SCR *, char *, FILE *, MARK *, MARK *, u_long *, u_long *, int)); int ex_yank __P((SCR *, EXCMD *)); int ex_z __P((SCR *, EXCMD *)); nvi-1.81.6/ex/version.h0100644000076400001440000000005510720065713013724 0ustar skimousers#define VI_VERSION "nvi-1.81.6 (2007-11-18)" nvi-1.81.6/gtk/0040755000076400001440000000000010720065712012241 5ustar skimousersnvi-1.81.6/gtk/gtk.h0100644000076400001440000000024110720065506013172 0ustar skimouserstypedef struct { GtkViScreen *vi; GtkWidget *main; gint input_func; gint value_changed; IPVI *ipvi; int resized; } gtk_vi; nvi-1.81.6/gtk/gtk_main.c0100644000076400001440000000606410720065506014202 0ustar skimousers/*- * Copyright (c) 1999 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #include #include #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #include #include "gtkvi.h" #include "gtkviwindow.h" #include "gtkviscreen.h" #include "../gtk/extern.h" static void vi_destroyed __P((GtkWidget*,GtkWidget*)); static void vi_rename __P((GtkWidget*,gchar*,GtkWidget*)); static void vi_quit __P((GtkViWindow*, int)); static void win_toplevel(GtkViWindow *win); static void create_toplevel(GtkVi *vi); static GtkItemFactoryEntry menu_items[] = { { "/_File", NULL, NULL, 0, "" }, { "/File/E_xit", NULL, vi_quit, 1, NULL }, { "/File/_Quit", NULL, vi_quit, 0, NULL }, { "/_Window", NULL, NULL, 0, "" }, { "/Window/New Window", NULL, win_toplevel, 0, NULL }, #if 0 /*wrong argument anyway*/ { "/Window/Show Terminal", NULL, gtk_vi_show_term, 1, NULL }, { "/Window/Show Vi", NULL, gtk_vi_show_term, 0, NULL }, #endif }; static int n_toplevel = 0; int main(int argc, char **argv) { GtkVi *vi; gtk_set_locale (); gtk_init (&argc, &argv); gtk_vi_init(&vi, argc, argv); create_toplevel(vi); gtk_main(); return 0; } static void win_toplevel(GtkViWindow *win) { create_toplevel(win->vi); } static void create_toplevel(GtkVi *vi) { GtkWidget *window; GtkWidget *box, *menubar; GtkWidget *vi_window; gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); GtkItemFactory *factory; GtkAccelGroup *accel; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); ++n_toplevel; box = gtk_vbox_new(FALSE, 0); gtk_container_add(GTK_CONTAINER(window), box); gtk_widget_show(box); vi_window = gtk_vi_window_new(vi); accel = gtk_accel_group_new(); factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", accel); gtk_item_factory_create_items (factory, nmenu_items, menu_items, (gpointer)vi_window); gtk_accel_group_attach(accel, GTK_OBJECT(window)); menubar = gtk_item_factory_get_widget (factory, "
"); gtk_widget_show(menubar); gtk_box_pack_start(GTK_BOX(box), menubar, FALSE, FALSE, 0); gtk_accel_group_attach(accel, GTK_OBJECT(vi_window)); gtk_widget_show(vi_window); gtk_signal_connect(GTK_OBJECT(vi_window), "rename", GTK_SIGNAL_FUNC(vi_rename), window); gtk_signal_connect(GTK_OBJECT(GTK_VI_WINDOW(vi_window)->vi_screen), "destroy", GTK_SIGNAL_FUNC(vi_destroyed), window); gtk_box_pack_start(GTK_BOX(box), vi_window, TRUE, TRUE, 0); /* gtk_widget_grab_focus(GTK_WIDGET(vi->vi)); */ gtk_widget_show(window); } static void vi_quit(GtkViWindow *vi, gint write) { gtk_vi_quit(vi, write); } static void vi_destroyed(GtkWidget *vi, GtkWidget *window) { gtk_widget_destroy(window); if (!--n_toplevel) gtk_main_quit(); } static void vi_rename(GtkWidget *vi, gchar *name, GtkWidget *window) { gtk_window_set_title(GTK_WINDOW(window), name); } nvi-1.81.6/gtk/gtkvi.c0100644000076400001440000000353610720065506013536 0ustar skimousers/*- * Copyright (c) 1999 * Sven Verdoolaege. All rights reserved. * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #include #include #include #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #if 0 #include #include #endif #include "gtkvi.h" #include "gtkviscreen.h" #include "gtkviwindow.h" #include "extern.h" static int vi_key_press_event __P((GtkWidget*, GdkEventKey*, GtkVi*)); #if 0 static int vi_fork(ipvi) IPVI *ipvi; { GtkVi* vi = (GtkVi*)(ipvi->private_data); return zvt_term_forkpty(ZVT_TERM(vi->term), 0); } #endif /* * PUBLIC: int gtk_vi_init __P((GtkVi **, int, char*[])); */ int gtk_vi_init(GtkVi **vip, int argc, char **argv) { GtkVi *vi; GtkWidget *term; MALLOC_GOTO(NULL, vi, GtkVi*, sizeof(GtkVi)); memset(vi, 0, sizeof(GtkVi)); #if 0 term = zvt_term_new(); gtk_widget_show(term); vi->term = term; vt_parse_vt(&ZVT_TERM(term)->vx->vt, "test\n", 5); #endif /* doesn't work now; need to know when other process is running gtk_signal_connect(GTK_OBJECT(term), "key_press_event", (GtkSignalFunc) vi_key_press_event, vi); */ /* vi_create(&vi->ipvi, IP_EX_ALLOWED); */ vi_create(&vi->ipvi, 0); vi->ipvi->private_data = vi; /* Run vi: the parent returns, the child is the vi process. */ vi->ipvi->run(vi->ipvi, argc, argv); *vip = vi; return 0; alloc_err: return 1; } #if 0 static int vi_key_press_event(zvt, event, vi) GtkVi *vi; GtkWidget *zvt; GdkEventKey *event; { gtk_vi_key_press_event(vi, event); gtk_signal_emit_stop_by_name(GTK_OBJECT(zvt), "key_press_event"); /* handled */ return 1; } #endif nvi-1.81.6/gtk/gtkvi.h0100644000076400001440000000035110720065506013533 0ustar skimousers#ifndef __GTK_VI_H__ #define __GTK_VI_H__ typedef struct _GtkVi GtkVi; struct _GtkVi { // GtkWidget *term; // GtkWidget *vi; /* XXX */ // GtkWidget *vi_window; IPVI *ipvi; }; #endif /* __GTK_VI_H__ */ nvi-1.81.6/gtk/gtkviscreen.c0100644000076400001440000005072510720065506014740 0ustar skimousers#include #include #include #include #include "gtkviscreen.h" #include #define INTISUCS(c) ((c & ~0x7F) && !(((c) >> 16) & 0x7F)) #define INTUCS(c) (c) #ifdef USE_WIDECHAR #define CHAR_WIDTH(sp, ch) wcwidth(ch) #else #define CHAR_WIDTH(sp, ch) 1 #endif void * v_strset __P((CHAR_T *s, CHAR_T c, size_t n)); #define DEFAULT_VI_SCREEN_WIDTH_CHARS 80 #define DEFAULT_VI_SCREEN_HEIGHT_LINES 25 #define VI_SCREEN_BORDER_ROOM 1 enum { ARG_0, ARG_VADJUSTMENT, }; enum { RESIZED, LAST_SIGNAL }; static void gtk_vi_screen_class_init (GtkViScreenClass *klass); static void gtk_vi_screen_set_arg (GtkObject *object, GtkArg *arg, guint arg_id); static void gtk_vi_screen_get_arg (GtkObject *object, GtkArg *arg, guint arg_id); static void gtk_vi_screen_init (GtkViScreen *vi); static void gtk_vi_screen_destroy (GtkObject *object); static void gtk_vi_screen_realize (GtkWidget *widget); /* static void gtk_vi_screen_map (GtkWidget *widget); static void gtk_vi_screen_unmap (GtkWidget *widget); */ static void gtk_vi_screen_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_vi_screen_size_allocate (GtkWidget *widget, GtkAllocation *allocation); /* static void gtk_vi_screen_adjustment (GtkAdjustment *adjustment, GtkViScreen *text); */ static gint gtk_vi_screen_expose (GtkWidget *widget, GdkEventExpose *event); static void recompute_geometry (GtkViScreen* vi); static void expose_text (GtkViScreen* vi, GdkRectangle *area, gboolean cursor); static void draw_lines(GtkViScreen *vi, gint y, gint x, gint ymax, gint xmax); static void mark_lines(GtkViScreen *vi, gint ymin, gint xmin, gint ymax, gint xmax); static GtkWidgetClass *parent_class = NULL; static guint vi_screen_signals[LAST_SIGNAL] = { 0 }; static GdkFont *gb_font; static GdkFont *tfn; static GdkFont *tfw; #define CharAt(scr,y,x) scr->chars + (y) * scr->cols + x #define FlagAt(scr,y,x) (scr->reverse + (y) * scr->cols + x) #define ColAt(scr,y,x) (scr->endcol + (y) * scr->cols + x) #define COLOR_STANDARD 0x00 #define COLOR_STANDOUT 0x01 /* XXX */ enum { SA_ALTERNATE, SA_INVERSE }; void gtk_vi_screen_attribute(GtkViScreen *vi, gint attribute, gint on) { switch (attribute) { case SA_INVERSE: vi->color = on ? COLOR_STANDOUT : COLOR_STANDARD; break; } } /* col is screen column */ void gtk_vi_screen_move(GtkViScreen *vi, gint row, gint col) { gint x; guchar *endcol; endcol = vi->endcol + row*vi->cols; for (x = 0; col > endcol[x]; ++x); vi->curx = x; vi->cury = row; } static void cleartoel (GtkViScreen *vi, guint row, guint col) { CHAR_T *p, *e; if (MEMCMP(p = CharAt(vi,row,col), e = CharAt(vi,vi->rows,0), vi->cols - col)) { MEMMOVE(p, e, vi->cols - col); memset(FlagAt(vi,row,col), COLOR_STANDARD, vi->cols - col); mark_lines(vi, row, col, row+1, vi->cols); } } void gtk_vi_screen_clrtoel (GtkViScreen *vi) { cleartoel(vi, vi->cury, vi->curx); } void gtk_vi_screen_addstr(GtkViScreen *vi, const char *str, int len) { CHAR_T *p, *end; CHAR_T *line; guchar *endcol; gint col, startcol; gint x; line = vi->chars + vi->cury*vi->cols; endcol = vi->endcol + vi->cury*vi->cols; x = vi->curx; startcol = x ? endcol[x-1] : -1; for (p = CharAt(vi,vi->cury,vi->curx), end = p + len, col = startcol; p < end; ++x) { *p++ = *str++; endcol[x] = ++col; } memset(FlagAt(vi,vi->cury,vi->curx), vi->color, len); mark_lines(vi, vi->cury, startcol+1, vi->cury+1, endcol[x-1]+1); if (endcol[x-1] >= vi->cols) { if (++vi->cury >= vi->rows) { vi->cury = vi->rows-1; vi->curx = x-1; } else { vi->curx = 0; } } else vi->curx += len; if (x < vi->cols) endcol[x] = vi->cols; } void gtk_vi_screen_waddstr(GtkViScreen *vi, const CHAR_T *str, int len) { CHAR_T *p, *end; CHAR_T *line; guchar *endcol; gint col, startcol; gint x; MEMMOVE(CharAt(vi,vi->cury,vi->curx),str,len); memset(FlagAt(vi,vi->cury,vi->curx), vi->color, len); line = vi->chars + vi->cury*vi->cols; endcol = vi->endcol + vi->cury*vi->cols; x = vi->curx; startcol = x ? endcol[x-1] : -1; for (col = startcol; x < vi->curx + len; ++x) endcol[x] = col += CHAR_WIDTH(NULL, *(line+x)); mark_lines(vi, vi->cury, startcol+1, vi->cury+1, endcol[x-1]+1); if (endcol[x-1] >= vi->cols) { if (++vi->cury >= vi->rows) { vi->cury = vi->rows-1; vi->curx = x-1; } else { vi->curx = 0; } } else vi->curx += len; if (x < vi->cols) endcol[x] = vi->cols; } void gtk_vi_screen_deleteln(GtkViScreen *vi) { gint y = vi->cury; gint rows = vi->rows - (y+1); MEMMOVE(CharAt(vi,y,0), CharAt(vi,y+1,0), rows * vi->cols); cleartoel(vi,vi->rows-1,0); memmove(FlagAt(vi,y,0), FlagAt(vi,y+1,0), rows * vi->cols); memmove(ColAt(vi,y,0), ColAt(vi,y+1,0), rows * vi->cols); mark_lines(vi, y, 0, vi->rows-1, vi->cols); } void gtk_vi_screen_insertln(GtkViScreen *vi) { gint y = vi->cury; gint rows = vi->rows - (y+1); MEMMOVE(CharAt(vi,y+1,0), CharAt(vi,y,0), rows * vi->cols); cleartoel(vi,y,0); memmove(FlagAt(vi,y+1,0), FlagAt(vi,y,0), rows * vi->cols); memmove(ColAt(vi,y+1,0), ColAt(vi,y,0), rows * vi->cols); mark_lines(vi, y+1, 0, vi->rows, vi->cols); } void gtk_vi_screen_refresh(GtkViScreen *vi) { if (vi->lastx != vi->curx || vi->lasty != vi-> cury) { mark_lines(vi, vi->lasty, vi->lastx ? *ColAt(vi,vi->lasty,vi->lastx-1) + 1 : 0, vi->lasty+1, *ColAt(vi,vi->lasty,vi->lastx)+1); mark_lines(vi, vi->cury, vi->curx ? *ColAt(vi,vi->cury,vi->curx-1) + 1 : 0, vi->cury+1, *ColAt(vi,vi->cury,vi->curx)+1); } if (vi->marked_maxy == 0) return; draw_lines(vi, vi->marked_y, vi->marked_x, vi->marked_maxy, vi->marked_maxx); vi->marked_x = vi->cols; vi->marked_y = vi->rows; vi->marked_maxx = 0; vi->marked_maxy = 0; vi->lastx = vi->curx; vi->lasty = vi->cury; } void gtk_vi_screen_rewrite(GtkViScreen *vi, gint row) { memset(FlagAt(vi,row,0), COLOR_STANDARD, vi->cols); mark_lines(vi, row, 0, row+1, vi->cols); } GtkType gtk_vi_screen_get_type (void) { static GtkType vi_screen_type = 0; if (!vi_screen_type) { static const GtkTypeInfo vi_screen_info = { "GtkViScreen", sizeof (GtkViScreen), sizeof (GtkViScreenClass), (GtkClassInitFunc) gtk_vi_screen_class_init, (GtkObjectInitFunc) gtk_vi_screen_init, /* reserved_1 */ NULL, /* reserved_2 */ NULL, (GtkClassInitFunc) NULL, }; vi_screen_type = gtk_type_unique (GTK_TYPE_WIDGET, &vi_screen_info); } return vi_screen_type; } static void gtk_vi_screen_class_init (GtkViScreenClass *class) { GtkObjectClass *object_class; GtkWidgetClass *widget_class; object_class = (GtkObjectClass*) class; widget_class = (GtkWidgetClass*) class; parent_class = gtk_type_class (GTK_TYPE_WIDGET); vi_screen_signals[RESIZED] = gtk_signal_new ("resized", GTK_RUN_FIRST, GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET (GtkViScreenClass, resized), gtk_marshal_NONE__INT_INT, GTK_TYPE_NONE, 2, GTK_TYPE_INT, GTK_TYPE_INT, 0); #ifndef HAVE_PANGO gtk_object_class_add_signals(object_class, vi_screen_signals, LAST_SIGNAL); #endif gtk_object_add_arg_type ("GtkViScreen::vadjustment", GTK_TYPE_ADJUSTMENT, GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT, ARG_VADJUSTMENT); object_class->set_arg = gtk_vi_screen_set_arg; object_class->get_arg = gtk_vi_screen_get_arg; object_class->destroy = gtk_vi_screen_destroy; widget_class->realize = gtk_vi_screen_realize; /* widget_class->map = gtk_vi_screen_map; widget_class->unmap = gtk_vi_screen_unmap; */ widget_class->size_request = gtk_vi_screen_size_request; widget_class->size_allocate = gtk_vi_screen_size_allocate; widget_class->expose_event = gtk_vi_screen_expose; class->rename = NULL; class->resized = NULL; gb_font = gdk_font_load ("-*-*-*-*-*-*-16-*-*-*-*-*-gb2312.1980-*"); /* tf = gdk_font_load ("-misc-fixed-*-*-*-*-16-*-*-*-*-*-iso10646-*"); */ tfn = gdk_font_load ("-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646"); tfw = gdk_font_load ("-Misc-Fixed-Medium-R-*-*-13-120-75-75-C-120-ISO10646-1"); } static void gtk_vi_screen_set_arg (GtkObject *object, GtkArg *arg, guint arg_id) { GtkViScreen *vi_screen; vi_screen = GTK_VI_SCREEN (object); switch (arg_id) { case ARG_VADJUSTMENT: gtk_vi_screen_set_adjustment (vi_screen, GTK_VALUE_POINTER (*arg)); break; default: break; } } static void gtk_vi_screen_get_arg (GtkObject *object, GtkArg *arg, guint arg_id) { GtkViScreen *vi_screen; vi_screen = GTK_VI_SCREEN (object); switch (arg_id) { case ARG_VADJUSTMENT: GTK_VALUE_POINTER (*arg) = vi_screen->vadj; break; default: arg->type = GTK_TYPE_INVALID; break; } } static void gtk_vi_screen_init (GtkViScreen *vi) { GtkStyle *style; GTK_WIDGET_SET_FLAGS (vi, GTK_CAN_FOCUS); vi->text_area = NULL; vi->chars = 0; vi->reverse = 0; vi->cols = 0; vi->color = COLOR_STANDARD; vi->cols = 0; vi->rows = 0; #ifdef HAVE_PANGO vi->conx = NULL; #endif style = gtk_style_copy(GTK_WIDGET(vi)->style); gdk_font_unref(style->font); style->font = gdk_font_load("-*-fixed-*-*-*-*-16-*-*-*-*-*-iso8859-*"); GTK_WIDGET(vi)->style = style; } static void gtk_vi_screen_destroy (GtkObject *object) { GtkViScreen *vi_screen; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (object)); vi_screen = (GtkViScreen*) object; /* gtk_signal_disconnect_by_data (GTK_OBJECT (vi_screen->vadj), vi_screen); */ GTK_OBJECT_CLASS(parent_class)->destroy (object); } GtkWidget* gtk_vi_screen_new (GtkAdjustment *vadj) { GtkWidget *vi; vi = gtk_widget_new (GTK_TYPE_VI_SCREEN, "vadjustment", vadj, NULL); return vi; } void gtk_vi_screen_set_adjustment (GtkViScreen *vi_screen, GtkAdjustment *vadj) { g_return_if_fail (vi_screen != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (vi_screen)); if (vadj) g_return_if_fail (GTK_IS_ADJUSTMENT (vadj)); else vadj = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 1.0, 0.0, 1.0, 0.0, 0.0)); if (vi_screen->vadj && (vi_screen->vadj != vadj)) { gtk_signal_disconnect_by_data (GTK_OBJECT (vi_screen->vadj), vi_screen); gtk_object_unref (GTK_OBJECT (vi_screen->vadj)); } if (vi_screen->vadj != vadj) { vi_screen->vadj = vadj; gtk_object_ref (GTK_OBJECT (vi_screen->vadj)); gtk_object_sink (GTK_OBJECT (vi_screen->vadj)); /* gtk_signal_connect (GTK_OBJECT (vi_screen->vadj), "changed", (GtkSignalFunc) gtk_vi_screen_adjustment, vi_screen); gtk_signal_connect (GTK_OBJECT (vi_screen->vadj), "value_changed", (GtkSignalFunc) gtk_vi_screen_adjustment, vi_screen); gtk_signal_connect (GTK_OBJECT (vi_screen->vadj), "disconnect", (GtkSignalFunc) gtk_vi_screen_disconnect, vi_screen); gtk_vi_screen_adjustment (vadj, vi_screen); */ } } static void gtk_vi_screen_realize (GtkWidget *widget) { GtkViScreen *vi; GdkWindowAttr attributes; gint attributes_mask; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (widget)); vi = GTK_VI_SCREEN (widget); GTK_WIDGET_SET_FLAGS (vi, GTK_REALIZED); attributes.window_type = GDK_WINDOW_CHILD; attributes.x = widget->allocation.x; attributes.y = widget->allocation.y; attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); attributes.event_mask = gtk_widget_get_events (widget); attributes.event_mask |= (GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_KEY_PRESS_MASK); attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); gdk_window_set_user_data (widget->window, vi); attributes.x = (widget->style->xthickness + VI_SCREEN_BORDER_ROOM); attributes.y = (widget->style->ythickness + VI_SCREEN_BORDER_ROOM); attributes.width = MAX (1, (gint)widget->allocation.width - (gint)attributes.x * 2); attributes.height = MAX (1, (gint)widget->allocation.height - (gint)attributes.y * 2); vi->text_area = gdk_window_new (widget->window, &attributes, attributes_mask); gdk_window_set_user_data (vi->text_area, vi); widget->style = gtk_style_attach (widget->style, widget->window); /* Can't call gtk_style_set_background here because it's handled specially */ gdk_window_set_background (widget->window, &widget->style->base[GTK_STATE_NORMAL]); gdk_window_set_background (vi->text_area, &widget->style->base[GTK_STATE_NORMAL]); vi->gc = gdk_gc_new (vi->text_area); /* What's this ? */ gdk_gc_set_exposures (vi->gc, TRUE); gdk_gc_set_foreground (vi->gc, &widget->style->text[GTK_STATE_NORMAL]); vi->reverse_gc = gdk_gc_new (vi->text_area); gdk_gc_set_foreground (vi->reverse_gc, &widget->style->base[GTK_STATE_NORMAL]); gdk_window_show (vi->text_area); recompute_geometry (vi); } static void gtk_vi_screen_size_request (GtkWidget *widget, GtkRequisition *requisition) { gint xthick; gint ythick; gint char_height; gint char_width; GtkViScreen *vi; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (widget)); g_return_if_fail (requisition != NULL); vi = GTK_VI_SCREEN (widget); xthick = widget->style->xthickness + VI_SCREEN_BORDER_ROOM; ythick = widget->style->ythickness + VI_SCREEN_BORDER_ROOM; vi->ch_ascent = widget->style->font->ascent; vi->ch_height = (widget->style->font->ascent + widget->style->font->descent) + 1; vi->ch_width = gdk_text_width (widget->style->font, "A", 1); char_height = DEFAULT_VI_SCREEN_HEIGHT_LINES * vi->ch_height; char_width = DEFAULT_VI_SCREEN_WIDTH_CHARS * vi->ch_width; requisition->width = char_width + xthick * 2; requisition->height = char_height + ythick * 2; } static void gtk_vi_screen_size_allocate (GtkWidget *widget, GtkAllocation *allocation) { GtkViScreen *vi; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (widget)); g_return_if_fail (allocation != NULL); vi = GTK_VI_SCREEN (widget); widget->allocation = *allocation; if (GTK_WIDGET_REALIZED (widget)) { gdk_window_move_resize (widget->window, allocation->x, allocation->y, allocation->width, allocation->height); gdk_window_move_resize (vi->text_area, widget->style->xthickness + VI_SCREEN_BORDER_ROOM, widget->style->ythickness + VI_SCREEN_BORDER_ROOM, MAX (1, (gint)widget->allocation.width - (gint)(widget->style->xthickness + (gint)VI_SCREEN_BORDER_ROOM) * 2), MAX (1, (gint)widget->allocation.height - (gint)(widget->style->ythickness + (gint)VI_SCREEN_BORDER_ROOM) * 2)); recompute_geometry (vi); } } /* static void gtk_vi_screen_adjustment (GtkAdjustment *adjustment, GtkViScreen *vi_screen) { g_return_if_fail (adjustment != NULL); g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); g_return_if_fail (vi_screen != NULL); g_return_if_fail (GTK_IS_VI_SCREEN (vi_screen)); } */ static gint gtk_vi_screen_expose (GtkWidget *widget, GdkEventExpose *event) { g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (GTK_IS_VI_SCREEN (widget), FALSE); g_return_val_if_fail (event != NULL, FALSE); if (event->window == GTK_VI_SCREEN (widget)->text_area) { expose_text (GTK_VI_SCREEN (widget), &event->area, TRUE); } return FALSE; } static void recompute_geometry (GtkViScreen* vi) { //gint xthickness; //gint ythickness; gint height; gint width; gint rows, cols; gint i; //xthickness = widget->style->xthickness + VI_SCREEN_BORDER_ROOM; //ythickness = widget->style->ythickness + VI_SCREEN_BORDER_ROOM; gdk_window_get_size (vi->text_area, &width, &height); rows = height / vi->ch_height; cols = width / vi->ch_width; if (rows == vi->rows && cols == vi->cols) return; vi->marked_x = vi->cols = cols; vi->marked_y = vi->rows = rows; vi->marked_maxx = 0; vi->marked_maxy = 0; g_free(vi->chars); vi->chars = (CHAR_T*)g_new(gchar, (vi->rows+1)*vi->cols * sizeof(CHAR_T)); STRSET(vi->chars, L(' '), (vi->rows+1)*vi->cols); g_free(vi->endcol); vi->endcol = g_new(guchar, vi->rows*vi->cols); g_free(vi->reverse); vi->reverse = g_new(guchar, vi->rows*vi->cols); memset(vi->reverse, 0, vi->rows*vi->cols); gtk_signal_emit(GTK_OBJECT(vi), vi_screen_signals[RESIZED], vi->rows, vi->cols); } static void expose_text (GtkViScreen* vi, GdkRectangle *area, gboolean cursor) { gint ymax; gint xmax, xmin; gdk_window_clear_area (vi->text_area, area->x, area->y, area->width, area->height); ymax = MIN((area->y + area->height + vi->ch_height - 1) / vi->ch_height, vi->rows); xmin = area->x / vi->ch_width; xmax = MIN((area->x + area->width + vi->ch_width - 1) / vi->ch_width, vi->cols); draw_lines(vi, area->y / vi->ch_height, xmin, ymax, xmax); } #define Inverse(screen,y,x) \ ((*FlagAt(screen,y,x) == COLOR_STANDOUT) ^ \ (screen->cury == y && screen->curx == x)) static void draw_lines(GtkViScreen *vi, gint ymin, gint xmin, gint ymax, gint xmax) { gint y, x, len, blen, xpos; CHAR_T *line; GdkGC *fg, *bg; GdkFont *font; gchar buf[2]; gchar *p; gboolean pango; for (y = ymin, line = vi->chars + y*vi->cols; y < ymax; ++y, line += vi->cols) { for (x = 0, xpos = 0; xpos <= xmin; ++x) xpos += CHAR_WIDTH(NULL, *(line+x)); --x; xpos -= CHAR_WIDTH(NULL, *(line+x)); for (; xpos < xmax; x+=len, xpos+= blen) { gchar inverse; inverse = Inverse(vi,y,x); len = 1; if (sizeof(CHAR_T) == sizeof(gchar)) for (; x+len < xmax && Inverse(vi,y,x+len) == inverse; ++len); if (inverse) { fg = vi->reverse_gc; bg = vi->gc; } else { bg = vi->reverse_gc; fg = vi->gc; } pango = 0; #ifdef HAVE_PANGO if (INTISUCS(*(line+x))) { if (!vi->conx) { PangoFontDescription font_description; font_description.family_name = g_strdup ("monospace"); font_description.style = PANGO_STYLE_NORMAL; font_description.variant = PANGO_VARIANT_NORMAL; font_description.weight = 500; font_description.stretch = PANGO_STRETCH_NORMAL; font_description.size = 15000; vi->conx = gdk_pango_context_get(); pango_context_set_font_description (vi->conx, &font_description); pango_context_set_lang(vi->conx, "en_US"); vi->alist = pango_attr_list_new(); } blen = CHAR_WIDTH(NULL, *(line+x)); pango = 1; } else #endif { font = GTK_WIDGET(vi)->style->font; if (sizeof(CHAR_T) == sizeof(gchar)) p = (gchar*)line+x; else { buf[0] = *(line+x); p = buf; } blen = len; } gdk_draw_rectangle(vi->text_area, bg, 1, xpos * vi->ch_width, y * vi->ch_height, blen * vi->ch_width, vi->ch_height); /* hack to not display half a wide character that wasn't * removed. */ if (!pango) gdk_draw_text (vi->text_area, font, fg, xpos * vi->ch_width, y * vi->ch_height + vi->ch_ascent, p, blen); #ifdef HAVE_PANGO else { PangoGlyphString *gs; GList *list; PangoItem *item; char buf[3]; int len; len = ucs2utf8(line+x, 1, buf); list = pango_itemize(vi->conx, buf, 0, len, vi->alist, NULL); item = list->data; gs = pango_glyph_string_new (); pango_shape(buf, len, &item->analysis, gs); gdk_draw_glyphs (vi->text_area, fg, item->analysis.font, xpos * vi->ch_width, y * vi->ch_height + vi->ch_ascent, gs); } #endif } } } static void mark_lines(GtkViScreen *vi, gint ymin, gint xmin, gint ymax, gint xmax) { if (ymin < vi->marked_y) vi->marked_y = ymin; if (xmin < vi->marked_x) vi->marked_x = xmin; if (ymax > vi->marked_maxy) vi->marked_maxy = ymax; if (xmax > vi->marked_maxx) vi->marked_maxx = xmax; } nvi-1.81.6/gtk/gtkviscreen.h0100644000076400001440000000440310720065506014735 0ustar skimousers#ifndef __GTK_VI_SCREEN_H__ #define __GTK_VI_SCREEN_H__ #include #include "config.h" #include "port.h" #include "../common/multibyte.h" #ifdef HAVE_PANGO #include #include #else #define xthickness klass->xthickness #define ythickness klass->ythickness #define GTK_CLASS_TYPE(class) class->type #endif #define GTK_TYPE_VI_SCREEN (gtk_vi_screen_get_type ()) #define GTK_VI_SCREEN(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VI_SCREEN, GtkViScreen)) #define GTK_VI_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VI_SCREEN, GtkViScreenClass)) #define GTK_IS_VI_SCREEN(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VI_SCREEN)) #define GTK_IS_VI_SCREEN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VI_SCREEN)) typedef struct _GtkViScreen GtkViScreen; typedef struct _GtkViScreenClass GtkViScreenClass; struct _GtkViScreen { GtkWidget widget; GdkWindow *text_area; GtkAdjustment *vadj; GdkGC *gc; GdkGC *reverse_gc; CHAR_T *chars; guchar *endcol; guchar *reverse; guchar color; gint cols, rows; gint ch_width, ch_height, ch_ascent; gint curx, cury; /* character position */ gint lastx, lasty; gint marked_x, marked_y, marked_maxx, marked_maxy; #ifdef HAVE_PANGO PangoContext *conx; PangoAttrList* alist; #endif }; struct _GtkViScreenClass { GtkWidgetClass parent_class; void (*rename) (GtkViScreen *vi, gchar *name, gint len); void (*resized) (GtkViScreen *vi, gint width, gint height); }; GtkType gtk_vi_screen_get_type (void); GtkWidget* gtk_vi_screen_new (GtkAdjustment *vadj); void gtk_vi_screen_set_adjustment (GtkViScreen *vi_screen, GtkAdjustment *vadj); void gtk_vi_screen_move (GtkViScreen *vi, gint row, gint col); void gtk_vi_screen_clrtoel (GtkViScreen *vi); void gtk_vi_screen_attribute(GtkViScreen *vi, gint attribute, gint on); void gtk_vi_screen_addstr (GtkViScreen *vi, const char *str, int len); void gtk_vi_screen_deleteln (GtkViScreen *vi); void gtk_vi_screen_insertln (GtkViScreen *vi); void gtk_vi_screen_refresh (GtkViScreen *vi); void gtk_vi_screen_rewrite (GtkViScreen *vi, gint row); #endif /* __GTK_VI_SCREEN_H__ */ nvi-1.81.6/gtk/gtkviwindow.c0100644000076400001440000003576010720065506014772 0ustar skimousers/* change further to gtkviwindow have no knowledge of ipvi */ #include "config.h" #include #include #if 0 #ifdef HAVE_ZVT #include #include #endif #endif #include "../common/common.h" #include "../ipc/ip.h" #include "gtkvi.h" #include "gtkviscreen.h" #include "gtkviwindow.h" #include "extern.h" enum { RENAME, LAST_SIGNAL }; static void gtk_vi_window_class_init (GtkViWindowClass *klass); static void gtk_vi_window_init (GtkViWindow *vi); static void gtk_vi_window_destroy (GtkObject *object); static int vi_key_press_event __P((GtkWidget*, GdkEventKey*, GtkViWindow*)); static void vi_map __P((GtkWidget *, GtkWidget*)); static void vi_resized __P((GtkWidget *, int, int, IPVIWIN*)); static void vi_adjustment_value_changed __P((GtkAdjustment *, IPVIWIN *)); static void vi_input_func __P((gpointer , gint , GdkInputCondition)); static void vi_init_window __P((GtkViWindow *window, int)); static int vi_addstr __P((IPVIWIN*, const char *, u_int32_t)); static int vi_waddstr __P((IPVIWIN*, const CHAR_T *, u_int32_t)); static int vi_attribute __P((IPVIWIN*,u_int32_t ,u_int32_t )); static int vi_bell __P((IPVIWIN*)); static int vi_busyon __P((IPVIWIN*, const char *, u_int32_t)); static int vi_busyoff __P((IPVIWIN*)); static int vi_clrtoeol __P((IPVIWIN*)); static int vi_deleteln __P((IPVIWIN*)); static int vi_discard __P((IPVIWIN*)); static int vi_editopt __P((IPVIWIN*, const char *, u_int32_t, const char *, u_int32_t, u_int32_t)); static int vi_insertln __P((IPVIWIN*)); static int vi_move __P((IPVIWIN*, u_int32_t, u_int32_t)); static int vi_quit __P((IPVIWIN*)); static int vi_redraw __P((IPVIWIN*)); static int vi_refresh __P((IPVIWIN*)); static int vi_rename __P((IPVIWIN*, const char *, u_int32_t)); static int vi_rewrite __P((IPVIWIN*, u_int32_t)); static int vi_scrollbar __P((IPVIWIN*, u_int32_t, u_int32_t , u_int32_t )); static int vi_select __P((IPVIWIN*, const char *, u_int32_t)); static int vi_split __P((IPVIWIN*)); static int vi_ex_init __P((IPVIWIN*)); static int vi_vi_init __P((IPVIWIN*)); static int vi_fork __P((IPVIWIN*)); static GtkWidgetClass *parent_class = NULL; static guint vi_window_signals[LAST_SIGNAL] = { 0 }; GtkType gtk_vi_window_get_type (void) { static GtkType vi_window_type = 0; if (!vi_window_type) { static const GtkTypeInfo vi_window_info = { "GtkViWindow", sizeof (GtkViWindow), sizeof (GtkViWindowClass), (GtkClassInitFunc) gtk_vi_window_class_init, (GtkObjectInitFunc) gtk_vi_window_init, /* reserved_1 */ NULL, /* reserved_2 */ NULL, (GtkClassInitFunc) NULL, }; vi_window_type = gtk_type_unique (GTK_TYPE_NOTEBOOK, &vi_window_info); } return vi_window_type; } static void gtk_vi_window_class_init (GtkViWindowClass *class) { GtkObjectClass *object_class; object_class = (GtkObjectClass*) class; parent_class = gtk_type_class (GTK_TYPE_WIDGET); vi_window_signals[RENAME] = gtk_signal_new ("rename", GTK_RUN_FIRST, GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET (GtkViScreenClass, rename), gtk_marshal_VOID__STRING, GTK_TYPE_NONE, 1, GTK_TYPE_STRING, 0); #ifndef HAVE_PANGO gtk_object_class_add_signals(object_class, vi_window_signals, LAST_SIGNAL); #endif object_class->destroy = gtk_vi_window_destroy; } static void gtk_vi_window_init (GtkViWindow *vi) { } GtkWidget * gtk_vi_window_new (GtkVi *vi) { GtkViWindow* window; GtkWidget *vi_widget; GtkWidget *vscroll; GtkWidget *table; GtkWidget *term; int fd; #ifdef HAVE_ZVT int pty[2]; #endif window = gtk_type_new(gtk_vi_window_get_type()); window->vi = vi; //vi->vi_window = GTK_WIDGET(window); vi_widget = gtk_vi_screen_new(NULL); gtk_widget_show(GTK_WIDGET(vi_widget)); /* vi->vi = vi_widget; */ window->vi_screen = vi_widget; vscroll = gtk_vscrollbar_new(GTK_VI_SCREEN(vi_widget)->vadj); gtk_widget_show(vscroll); table = gtk_table_new(2, 2, FALSE); gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(vi_widget), 0, 1, 0, 1); gtk_table_attach(GTK_TABLE(table), vscroll, 1, 2, 0, 1, (GtkAttachOptions)0, GTK_FILL, 0, 0); gtk_widget_show(table); gtk_signal_connect(GTK_OBJECT(table), "map", GTK_SIGNAL_FUNC(vi_map), vi_widget/*->ipvi*/); window->table = table; gtk_notebook_set_show_tabs(GTK_NOTEBOOK(window), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(window), FALSE); gtk_notebook_append_page(GTK_NOTEBOOK(window), table, NULL); term = 0; fd = -1; #if 0 #ifdef HAVE_ZVT term = zvt_term_new(); zvt_term_set_blink(ZVT_TERM(term), FALSE); zvt_term_get_ptys(ZVT_TERM(term), 0, pty); fd = pty[1]; /* slave */ gtk_widget_show(term); gtk_notebook_append_page(GTK_NOTEBOOK(window), term, NULL); #endif #endif window->term = term; vi_init_window(window, fd); gtk_signal_connect(GTK_OBJECT(vi_widget), "resized", GTK_SIGNAL_FUNC(vi_resized), window->ipviwin); gtk_signal_connect(GTK_OBJECT(vi_widget), "key_press_event", (GtkSignalFunc) vi_key_press_event, window); window->value_changed = gtk_signal_connect(GTK_OBJECT(GTK_VI_SCREEN(vi_widget)->vadj), "value_changed", (GtkSignalFunc) vi_adjustment_value_changed, window->ipviwin); return GTK_WIDGET(window); } static void gtk_vi_window_destroy (GtkObject *object) { GtkViWindow *vi_window; g_return_if_fail (object != NULL); g_return_if_fail (GTK_IS_VI_WINDOW (object)); vi_window = (GtkViWindow*) object; if (vi_window->table) { gtk_signal_disconnect_by_data(GTK_OBJECT(vi_window->table), vi_window->vi_screen); vi_window->table = 0; } if (vi_window->vi_screen) { gtk_signal_disconnect_by_data(GTK_OBJECT(vi_window->vi_screen), vi_window->ipviwin); gtk_signal_disconnect(GTK_OBJECT(GTK_VI_SCREEN(vi_window->vi_screen)->vadj), vi_window->value_changed); gtk_widget_destroy(vi_window->vi_screen); vi_window->vi_screen = 0; } GTK_OBJECT_CLASS(parent_class)->destroy (object); } void gtk_vi_window_scrollbar(GtkViWindow *vi, guint top, guint size, guint max) { GtkViScreen *vi_screen; /* work around gcc bug */ volatile guint mymax = max; volatile guint mysize = size; vi_screen = GTK_VI_SCREEN(vi->vi_screen); vi_screen->vadj->value = top; vi_screen->vadj->upper = mymax; vi_screen->vadj->page_size = vi_screen->vadj->page_increment = mysize; gtk_signal_handler_block(GTK_OBJECT(vi_screen->vadj), vi->value_changed); gtk_adjustment_changed(vi_screen->vadj); /* gtk_adjustment_value_changed(vi_screen->vadj); */ gtk_signal_handler_unblock(GTK_OBJECT(vi_screen->vadj), vi->value_changed); } /* * PUBLIC: void gtk_vi_quit __P((GtkViWindow*, gint)); */ void gtk_vi_quit(vi, write) GtkViWindow *vi; gint write; { if (write) vi->ipviwin->wq(vi->ipviwin); else vi->ipviwin->quit(vi->ipviwin); } /* * PUBLIC: void gtk_vi_show_term __P((GtkViWindow*, gint)); */ void gtk_vi_show_term(window, show) GtkViWindow *window; gint show; { gtk_notebook_set_page(GTK_NOTEBOOK(window), show ? 1 : 0); } /* * PUBLIC: void gtk_vi_key_press_event __P((GtkViWindow*, GdkEventKey*)); */ void gtk_vi_key_press_event(window, event) GtkViWindow *window; GdkEventKey *event; { #if 0 static struct { guint key; gint offset; } table[] = { {GDK_Home, GTK_STRUCT_OFFSET(IPVI, c_bol) }, //{VI_C_BOTTOM, GTK_STRUCT_OFFSET(IPVI, c_bottom) }, {GDK_End, GTK_STRUCT_OFFSET(IPVI, c_eol) }, {GDK_Insert, GTK_STRUCT_OFFSET(IPVI, c_insert) }, {GDK_Left, GTK_STRUCT_OFFSET(IPVI, c_left) }, {GDK_Right, GTK_STRUCT_OFFSET(IPVI, c_right) }, //{VI_C_TOP, GTK_STRUCT_OFFSET(IPVI, c_top) }, }; #endif static struct { guint keyval; char key; } table[] = { { GDK_Left, 'h' }, { GDK_Right, 'l' }, { GDK_Up, 'k' }, { GDK_Down, 'j' }, { GDK_Page_Up, 'B' - '@' }, { GDK_Page_Down, 'F' - '@' }, }; char key = event->keyval; int i; #if 0 for (i = 0; i < sizeof(table)/sizeof(*table); ++i) if (table[i].key == event->keyval) { int (*fun) __P((IPVI*)) = *(int (**) __P((IPVI*)) )(((char *)vi->ipvi)+table[i].offset); fun(vi->ipvi); return; } #endif for (i = 0; i < sizeof(table)/sizeof(*table); ++i) if (table[i].keyval == event->keyval) { window->ipviwin->string(window->ipviwin, &table[i].key, 1); return; } if (event->state & GDK_CONTROL_MASK) { if ((key >= 'a') && (key <= 'z')) key -= 'a' - 'A'; key -= '@'; } /* fprintf(stderr, "key_press %d %d %d %c %p\n", event->length, event->keyval, event->keyval, key, ipvi); */ if (event->length > 0) window->ipviwin->string(window->ipviwin, &key, 1); } static int vi_key_press_event(vi_screen, event, vi) GtkViWindow *vi; GtkWidget *vi_screen; GdkEventKey *event; { gint handled; handled = gtk_accel_groups_activate (GTK_OBJECT (vi), event->keyval, (GdkModifierType) event->state); if (handled) return 1; gtk_vi_key_press_event(vi, event); gtk_signal_emit_stop_by_name(GTK_OBJECT(vi_screen), "key_press_event"); /* handled */ return 1; } static void vi_map(table, vi_screen) GtkWidget *vi_screen; GtkWidget *table; { gtk_widget_grab_focus(vi_screen); } static void vi_resized(vi_screen, rows, cols, ipviwin) int rows,cols; IPVIWIN *ipviwin; GtkWidget *vi_screen; { GtkViWindow *vi_window = GTK_VI_WINDOW((GtkVi*)(ipviwin->private_data)); ipviwin->resize(ipviwin, rows, cols); vi_window->resized = 1; } static void vi_adjustment_value_changed (adjustment, ipviwin) GtkAdjustment *adjustment; IPVIWIN *ipviwin; { GtkViWindow *vi_window = GTK_VI_WINDOW((GtkVi*)(ipviwin->private_data)); if (vi_window->resized) ipviwin->c_settop(ipviwin, adjustment->value); } static void vi_input_func (gpointer data, gint source, GdkInputCondition condition) { IPVIWIN *ipviwin = (IPVIWIN *) data; (void)ipviwin->input(ipviwin, source); } static void vi_init_window (GtkViWindow *window, int fd) { static struct ip_si_operations ipsi_ops_gtk = { vi_addstr, vi_attribute, vi_bell, vi_busyoff, vi_busyon, vi_clrtoeol, vi_deleteln, vi_discard, vi_editopt, vi_insertln, vi_move, vi_quit, vi_redraw, vi_refresh, vi_rename, vi_rewrite, vi_scrollbar, vi_select, vi_split, (IPFunc_a)vi_waddstr, }; GtkVi *vi = window->vi; vi->ipvi->new_window(vi->ipvi, &window->ipviwin, fd); window->ipviwin->private_data = window; window->ipviwin->set_ops(window->ipviwin, &ipsi_ops_gtk); window->input_func = gtk_input_add_full(window->ipviwin->ifd, GDK_INPUT_READ, vi_input_func, 0, (gpointer)window->ipviwin, 0); } static int vi_addstr(ipviwin, str, len) IPVIWIN *ipviwin; const char *str; u_int32_t len; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_addstr(GTK_VI_SCREEN(vi->vi_screen), str, len); return (0); } static int vi_waddstr(ipviwin, str, len) IPVIWIN *ipviwin; const CHAR_T *str; u_int32_t len; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_waddstr(GTK_VI_SCREEN(vi->vi_screen), str, len/sizeof(CHAR_T)); return (0); } static int vi_attribute(ipviwin,attribute,on) IPVIWIN *ipviwin; u_int32_t attribute, on; { GtkViWindow* window = (GtkViWindow*)(ipviwin->private_data); if (attribute == SA_ALTERNATE) { gtk_vi_show_term(window, !on); } else gtk_vi_screen_attribute(GTK_VI_SCREEN(window->vi_screen), attribute, on); return (0); } static int vi_bell(ipbp) IPVIWIN *ipbp; { /* fprintf(stderr, "vi_bell\n"); */ #if 0 /* * XXX * Future... implement visible bell. */ XBell(XtDisplay(__vi_screen->area), 0); #endif return (0); } static int vi_busyon (IPVIWIN* ipviwin, const char *a, u_int32_t s) { /* fprintf(stderr, "vi_busyon\n"); */ #if 0 __vi_set_cursor(__vi_screen, 1); #endif return (0); } static int vi_busyoff(ipbp) IPVIWIN *ipbp; { /* fprintf(stderr, "vi_busyoff\n"); */ #if 0 __vi_set_cursor(__vi_screen, 0); #endif return (0); } static int vi_clrtoeol(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_clrtoel(GTK_VI_SCREEN(vi->vi_screen)); return 0; } static int vi_deleteln(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_deleteln(GTK_VI_SCREEN(vi->vi_screen)); return (0); } static int vi_editopt (IPVIWIN* a, const char *b, u_int32_t c, const char *d, u_int32_t e, u_int32_t f) { /* fprintf(stderr, "%p %p vi_editopt\n", a, a->private_data); */ #if 0 /* XXX: Nothing. */ #endif return (0); } static int vi_discard(ipbp) IPVIWIN *ipbp; { /* fprintf(stderr, "vi_discard\n"); */ #if 0 /* XXX: Nothing. */ #endif return (0); } static int vi_insertln(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_insertln(GTK_VI_SCREEN(vi->vi_screen)); return (0); } static int vi_move(ipviwin, row, col) IPVIWIN *ipviwin; u_int32_t row; u_int32_t col; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_move(GTK_VI_SCREEN(vi->vi_screen), row, col); return (0); } static int vi_redraw(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_widget_draw(GTK_WIDGET(vi->vi_screen), NULL); return (0); } static int vi_refresh(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_refresh(GTK_VI_SCREEN(vi->vi_screen)); return (0); } static int vi_quit(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_input_remove(vi->input_func); gtk_widget_destroy(GTK_WIDGET(vi)); return (0); } static int vi_rename(ipviwin, str, len) IPVIWIN *ipviwin; const char *str; u_int32_t len; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gchar* name = g_strndup(str, len); gtk_signal_emit_by_name(GTK_OBJECT(vi), "rename", name); g_free(name); return (0); } static int vi_rewrite(ipviwin, row) IPVIWIN *ipviwin; u_int32_t row; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_screen_rewrite(GTK_VI_SCREEN(vi->vi_screen), row); return (0); } static int vi_scrollbar(ipviwin, top, size, max) IPVIWIN *ipviwin; u_int32_t top, size, max; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); gtk_vi_window_scrollbar(vi, top, size, max); return (0); } static int vi_select (IPVIWIN* a, const char * b, u_int32_t c) { /* fprintf(stderr, "vi_select\n"); */ #if 0 /* XXX: Nothing. */ #endif return (0); } static int vi_split(ipbp) IPVIWIN *ipbp; { fprintf(stderr, "vi_split\n"); #if 0 /* XXX: Nothing. */ #endif return (0); } static int vi_ex_init(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); /* gtk_vi_show_term(vi, 1); */ return 0; } static int vi_vi_init(ipviwin) IPVIWIN *ipviwin; { GtkViWindow* vi = (GtkViWindow*)(ipviwin->private_data); /* gtk_vi_show_term(vi, 0); */ return 0; } nvi-1.81.6/gtk/gtkviwindow.h0100644000076400001440000000236010720065506014765 0ustar skimousers#ifndef __GTK_VI_WINDOW_H__ #define __GTK_VI_WINDOW_H__ #ifndef HAVE_PANGO #define gtk_marshal_VOID__STRING gtk_marshal_NONE__STRING #define GTK_CLASS_TYPE(class) class->type #endif #define GTK_TYPE_VI_WINDOW (gtk_vi_window_get_type ()) #define GTK_VI_WINDOW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VI_WINDOW, GtkViWindow)) #define GTK_VI_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VI_WINDOW, GtkViWindowClass)) #define GTK_IS_VI_WINDOW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VI_WINDOW)) #define GTK_IS_VI_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VI_WINDOW)) typedef struct _GtkViWindow GtkViWindow; typedef struct _GtkViWindowClass GtkViWindowClass; struct _GtkViWindow { GtkNotebook notebook; GtkWidget *term; GtkVi *vi; GtkWidget *table; GtkWidget *vi_screen; gint value_changed; int resized; gint input_func; IPVIWIN *ipviwin; }; struct _GtkViWindowClass { GtkNotebookClass parent_class; }; GtkType gtk_vi_window_get_type (void); GtkWidget * gtk_vi_window_new (GtkVi *vi); void gtk_vi_window_scrollbar(GtkViWindow *vi, guint top, guint size, guint max); #endif /* __GTK_VI_WINDOW_H__ */ nvi-1.81.6/gtk/extern.h0100444000076400001440000000040410720065712013710 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int gtk_vi_init __P((GtkVi **, int, char*[])); void gtk_vi_quit __P((GtkViWindow*, gint)); void gtk_vi_show_term __P((GtkViWindow*, gint)); void gtk_vi_key_press_event __P((GtkViWindow*, GdkEventKey*)); nvi-1.81.6/include/0040755000076400001440000000000010720065506013100 5ustar skimousersnvi-1.81.6/include/bitstring.h0100644000076400001440000001165610720065506015264 0ustar skimousers/* * Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Paul Vixie. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)bitstring.h 8.1 (Berkeley) 7/19/93 */ #ifndef _BITSTRING_H_ #define _BITSTRING_H_ typedef unsigned char bitstr_t; /* internal macros */ /* byte of the bitstring bit is in */ #define _bit_byte(bit) \ ((bit) >> 3) /* mask for the bit within its byte */ #define _bit_mask(bit) \ (1 << ((bit)&0x7)) /* external macros */ /* bytes in a bitstring of nbits bits */ #define bitstr_size(nbits) \ ((((nbits) - 1) >> 3) + 1) /* allocate a bitstring */ #define bit_alloc(nbits) \ (bitstr_t *)calloc(1, \ (unsigned int)bitstr_size(nbits) * sizeof(bitstr_t)) /* allocate a bitstring on the stack */ #define bit_decl(name, nbits) \ (name)[bitstr_size(nbits)] /* is bit N of bitstring name set? */ #define bit_test(name, bit) \ ((name)[_bit_byte(bit)] & _bit_mask(bit)) /* set bit N of bitstring name */ #define bit_set(name, bit) \ (name)[_bit_byte(bit)] |= _bit_mask(bit) /* clear bit N of bitstring name */ #define bit_clear(name, bit) \ (name)[_bit_byte(bit)] &= ~_bit_mask(bit) /* clear bits start ... stop in bitstring */ #define bit_nclear(name, start, stop) { \ register bitstr_t *_name = name; \ register int _start = start, _stop = stop; \ register int _startbyte = _bit_byte(_start); \ register int _stopbyte = _bit_byte(_stop); \ if (_startbyte == _stopbyte) { \ _name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \ (0xff << ((_stop&0x7) + 1))); \ } else { \ _name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \ while (++_startbyte < _stopbyte) \ _name[_startbyte] = 0; \ _name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \ } \ } /* set bits start ... stop in bitstring */ #define bit_nset(name, start, stop) { \ register bitstr_t *_name = name; \ register int _start = start, _stop = stop; \ register int _startbyte = _bit_byte(_start); \ register int _stopbyte = _bit_byte(_stop); \ if (_startbyte == _stopbyte) { \ _name[_startbyte] |= ((0xff << (_start&0x7)) & \ (0xff >> (7 - (_stop&0x7)))); \ } else { \ _name[_startbyte] |= 0xff << ((_start)&0x7); \ while (++_startbyte < _stopbyte) \ _name[_startbyte] = 0xff; \ _name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \ } \ } /* find first bit clear in name */ #define bit_ffc(name, nbits, value) { \ register bitstr_t *_name = name; \ register int _byte, _nbits = nbits; \ register int _stopbyte = _bit_byte(_nbits), _value = -1; \ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ if (_name[_byte] != 0xff) { \ _value = _byte << 3; \ for (_stopbyte = _name[_byte]; (_stopbyte&0x1); \ ++_value, _stopbyte >>= 1); \ break; \ } \ *(value) = _value; \ } /* find first bit set in name */ #define bit_ffs(name, nbits, value) { \ register bitstr_t *_name = name; \ register int _byte, _nbits = nbits; \ register int _stopbyte = _bit_byte(_nbits), _value = -1; \ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ if (_name[_byte]) { \ _value = _byte << 3; \ for (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \ ++_value, _stopbyte >>= 1); \ break; \ } \ *(value) = _value; \ } #endif /* !_BITSTRING_H_ */ nvi-1.81.6/include/sys/0040755000076400001440000000000010720065506013716 5ustar skimousersnvi-1.81.6/include/sys/queue.h0100644000076400001440000002166010720065506015215 0ustar skimousers/* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 */ #ifndef _SYS_QUEUE_H_ #define _SYS_QUEUE_H_ /* * This file defines three types of data structures: lists, tail queues, * and circular queues. * * A list is headed by a single forward pointer (or an array of forward * pointers for a hash table header). The elements are doubly linked * so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before * or after an existing element or at the head of the list. A list * may only be traversed in the forward direction. * * A tail queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or * after an existing element, at the head of the list, or at the end of * the list. A tail queue may only be traversed in the forward direction. * * A circle queue is headed by a pair of pointers, one to the head of the * list and the other to the tail of the list. The elements are doubly * linked so that an arbitrary element can be removed without a need to * traverse the list. New elements can be added to the list before or after * an existing element, at the head of the list, or at the end of the list. * A circle queue may be traversed in either direction, but has a more * complex end of list detection. * * For details on the use of these macros, see the queue(3) manual page. */ /* * List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ struct type *lh_first; /* first element */ \ } #define LIST_ENTRY(type) \ struct { \ struct type *le_next; /* next element */ \ struct type **le_prev; /* address of previous next element */ \ } /* * List functions. */ #define LIST_INIT(head) { \ (head)->lh_first = NULL; \ } #define LIST_INSERT_AFTER(listelm, elm, field) { \ if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \ (listelm)->field.le_next->field.le_prev = \ &(elm)->field.le_next; \ (listelm)->field.le_next = (elm); \ (elm)->field.le_prev = &(listelm)->field.le_next; \ } #define LIST_INSERT_BEFORE(listelm, elm, field) { \ (elm)->field.le_prev = (listelm)->field.le_prev; \ (elm)->field.le_next = (listelm); \ *(listelm)->field.le_prev = (elm); \ (listelm)->field.le_prev = &(elm)->field.le_next; \ } #define LIST_INSERT_HEAD(head, elm, field) { \ if (((elm)->field.le_next = (head)->lh_first) != NULL) \ (head)->lh_first->field.le_prev = &(elm)->field.le_next;\ (head)->lh_first = (elm); \ (elm)->field.le_prev = &(head)->lh_first; \ } #define LIST_REMOVE(elm, field) { \ if ((elm)->field.le_next != NULL) \ (elm)->field.le_next->field.le_prev = \ (elm)->field.le_prev; \ *(elm)->field.le_prev = (elm)->field.le_next; \ } /* * Tail queue definitions. */ #define TAILQ_HEAD(name, type) \ struct name { \ struct type *tqh_first; /* first element */ \ struct type **tqh_last; /* addr of last next element */ \ } #define TAILQ_ENTRY(type) \ struct { \ struct type *tqe_next; /* next element */ \ struct type **tqe_prev; /* address of previous next element */ \ } /* * Tail queue functions. */ #define TAILQ_INIT(head) { \ (head)->tqh_first = NULL; \ (head)->tqh_last = &(head)->tqh_first; \ } #define TAILQ_INSERT_HEAD(head, elm, field) { \ if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \ (head)->tqh_first->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (head)->tqh_first = (elm); \ (elm)->field.tqe_prev = &(head)->tqh_first; \ } #define TAILQ_INSERT_TAIL(head, elm, field) { \ (elm)->field.tqe_next = NULL; \ (elm)->field.tqe_prev = (head)->tqh_last; \ *(head)->tqh_last = (elm); \ (head)->tqh_last = &(elm)->field.tqe_next; \ } #define TAILQ_INSERT_AFTER(head, listelm, elm, field) { \ if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\ (elm)->field.tqe_next->field.tqe_prev = \ &(elm)->field.tqe_next; \ else \ (head)->tqh_last = &(elm)->field.tqe_next; \ (listelm)->field.tqe_next = (elm); \ (elm)->field.tqe_prev = &(listelm)->field.tqe_next; \ } #define TAILQ_INSERT_BEFORE(listelm, elm, field) { \ (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \ (elm)->field.tqe_next = (listelm); \ *(listelm)->field.tqe_prev = (elm); \ (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \ } #define TAILQ_REMOVE(head, elm, field) { \ if (((elm)->field.tqe_next) != NULL) \ (elm)->field.tqe_next->field.tqe_prev = \ (elm)->field.tqe_prev; \ else \ (head)->tqh_last = (elm)->field.tqe_prev; \ *(elm)->field.tqe_prev = (elm)->field.tqe_next; \ } /* * Circular queue definitions. */ #define CIRCLEQ_HEAD(name, type) \ struct name { \ struct type *cqh_first; /* first element */ \ struct type *cqh_last; /* last element */ \ } #define CIRCLEQ_ENTRY(type) \ struct { \ struct type *cqe_next; /* next element */ \ struct type *cqe_prev; /* previous element */ \ } /* * Circular queue functions. */ #define CIRCLEQ_INIT(head) { \ (head)->cqh_first = (void *)(head); \ (head)->cqh_last = (void *)(head); \ } #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) { \ (elm)->field.cqe_next = (listelm)->field.cqe_next; \ (elm)->field.cqe_prev = (listelm); \ if ((listelm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (listelm)->field.cqe_next->field.cqe_prev = (elm); \ (listelm)->field.cqe_next = (elm); \ } #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) { \ (elm)->field.cqe_next = (listelm); \ (elm)->field.cqe_prev = (listelm)->field.cqe_prev; \ if ((listelm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (listelm)->field.cqe_prev->field.cqe_next = (elm); \ (listelm)->field.cqe_prev = (elm); \ } #define CIRCLEQ_INSERT_HEAD(head, elm, field) { \ (elm)->field.cqe_next = (head)->cqh_first; \ (elm)->field.cqe_prev = (void *)(head); \ if ((head)->cqh_last == (void *)(head)) \ (head)->cqh_last = (elm); \ else \ (head)->cqh_first->field.cqe_prev = (elm); \ (head)->cqh_first = (elm); \ } #define CIRCLEQ_INSERT_TAIL(head, elm, field) { \ (elm)->field.cqe_next = (void *)(head); \ (elm)->field.cqe_prev = (head)->cqh_last; \ if ((head)->cqh_first == (void *)(head)) \ (head)->cqh_first = (elm); \ else \ (head)->cqh_last->field.cqe_next = (elm); \ (head)->cqh_last = (elm); \ } #define CIRCLEQ_REMOVE(head, elm, field) { \ if ((elm)->field.cqe_next == (void *)(head)) \ (head)->cqh_last = (elm)->field.cqe_prev; \ else \ (elm)->field.cqe_next->field.cqe_prev = \ (elm)->field.cqe_prev; \ if ((elm)->field.cqe_prev == (void *)(head)) \ (head)->cqh_first = (elm)->field.cqe_next; \ else \ (elm)->field.cqe_prev->field.cqe_next = \ (elm)->field.cqe_next; \ } #endif /* !_SYS_QUEUE_H_ */ nvi-1.81.6/ip/0040755000076400001440000000000010720065712012064 5ustar skimousersnvi-1.81.6/ip/ip_funcs.c0100644000076400001440000002241010720065506014033 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_funcs.c,v 8.23 2001/06/25 15:19:23 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:23 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "../vi/vi.h" #include "../ipc/ip.h" #include "extern.h" /* * ip_addstr -- * Add len bytes from the string at the cursor, advancing the cursor. * * PUBLIC: int ip_waddstr __P((SCR *, const CHAR_T *, size_t)); */ int ip_waddstr(SCR *sp, const CHAR_T *str, size_t len) { IP_BUF ipb; IP_PRIVATE *ipp; int iv, rval; ipp = IPP(sp); ipb.code = SI_WADDSTR; ipb.len1 = len * sizeof(CHAR_T); ipb.str1 = (char *)str; rval = vi_send(ipp->o_fd, "a", &ipb); /* XXXX */ ipp->col += len; return (rval); } /* * ip_addstr -- * Add len bytes from the string at the cursor, advancing the cursor. * * PUBLIC: int ip_addstr __P((SCR *, const char *, size_t)); */ int ip_addstr(SCR *sp, const char *str, size_t len) { IP_BUF ipb; IP_PRIVATE *ipp; int iv, rval; ipp = IPP(sp); /* * If ex isn't in control, it's the last line of the screen and * it's a split screen, use inverse video. */ iv = 0; if (!F_ISSET(sp, SC_SCR_EXWROTE) && ipp->row == LASTLINE(sp) && IS_SPLIT(sp)) { iv = 1; ip_attr(sp, SA_INVERSE, 1); } ipb.code = SI_ADDSTR; ipb.len1 = len; ipb.str1 = str; rval = vi_send(ipp->o_fd, "a", &ipb); /* XXXX */ ipp->col += len; if (iv) ip_attr(sp, SA_INVERSE, 0); return (rval); } /* * ip_attr -- * Toggle a screen attribute on/off. * * PUBLIC: int ip_attr __P((SCR *, scr_attr_t, int)); */ int ip_attr(SCR *sp, scr_attr_t attribute, int on) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); if (attribute == SA_ALTERNATE) { if (on) F_SET(ipp, IP_ON_ALTERNATE); else F_CLR(ipp, IP_ON_ALTERNATE); } ipb.code = SI_ATTRIBUTE; ipb.val1 = attribute; ipb.val2 = on; return (vi_send(ipp->o_fd, "12", &ipb)); } /* * ip_baud -- * Return the baud rate. * * PUBLIC: int ip_baud __P((SCR *, u_long *)); */ int ip_baud(SCR *sp, u_long *ratep) { *ratep = 9600; /* XXX: Translation: fast. */ return (0); } /* * ip_bell -- * Ring the bell/flash the screen. * * PUBLIC: int ip_bell __P((SCR *)); */ int ip_bell(SCR *sp) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); ipb.code = SI_BELL; return (vi_send(ipp->o_fd, NULL, &ipb)); } /* * ip_busy -- * Display a busy message. * * PUBLIC: void ip_busy __P((SCR *, const char *, busy_t)); */ void ip_busy(SCR *sp, const char *str, busy_t bval) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); switch (bval) { case BUSY_ON: ipb.code = SI_BUSY_ON; ipb.str1 = str; ipb.len1 = strlen(str); (void)vi_send(ipp->o_fd, "a", &ipb); break; case BUSY_OFF: ipb.code = SI_BUSY_OFF; (void)vi_send(ipp->o_fd, NULL, &ipb); break; case BUSY_UPDATE: break; } return; } /* * ip_child -- * Prepare child. * * PUBLIC: int ip_child __P((SCR *)); */ int ip_child(SCR *sp) { IP_PRIVATE *ipp = IPP(sp); if (ipp->t_fd != -1) { dup2(ipp->t_fd, 0); dup2(ipp->t_fd, 1); dup2(ipp->t_fd, 2); close(ipp->t_fd); } return 0; } /* * ip_clrtoeol -- * Clear from the current cursor to the end of the line. * * PUBLIC: int ip_clrtoeol __P((SCR *)); */ int ip_clrtoeol(SCR *sp) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); /* Temporary hack until we can pass screen pointers * or name screens */ if (IS_VSPLIT(sp)) { size_t x, y, spcnt; IP_PRIVATE *ipp; int error; ipp = IPP(sp); y = ipp->row; x = ipp->col; error = 0; for (spcnt = sp->cols - x; spcnt > 0 && ! error; --spcnt) error = ip_addstr(sp, " ", 1); if (sp->coff == 0) error |= ip_addstr(sp, "|", 1); error |= ip_move(sp, y, x); return error; } ipb.code = SI_CLRTOEOL; return (vi_send(ipp->o_fd, NULL, &ipb)); } /* * ip_cursor -- * Return the current cursor position. * * PUBLIC: int ip_cursor __P((SCR *, size_t *, size_t *)); */ int ip_cursor(SCR *sp, size_t *yp, size_t *xp) { IP_PRIVATE *ipp; ipp = IPP(sp); *yp = ipp->row; *xp = ipp->col; return (0); } /* * ip_deleteln -- * Delete the current line, scrolling all lines below it. * * PUBLIC: int ip_deleteln __P((SCR *)); */ int ip_deleteln(SCR *sp) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); /* * This clause is required because the curses screen uses reverse * video to delimit split screens. If the screen does not do this, * this code won't be necessary. * * If the bottom line was in reverse video, rewrite it in normal * video before it's scrolled. */ if (!F_ISSET(sp, SC_SCR_EXWROTE) && IS_SPLIT(sp)) { ipb.code = SI_REWRITE; ipb.val1 = RLNO(sp, LASTLINE(sp)); if (vi_send(ipp->o_fd, "1", &ipb)) return (1); } /* * The bottom line is expected to be blank after this operation, * and other screens must support that semantic. */ ipb.code = SI_DELETELN; return (vi_send(ipp->o_fd, NULL, &ipb)); } /* * ip_discard -- * Discard a screen. * * PUBLIC: int ip_discard __P((SCR *, SCR **)); */ int ip_discard(SCR *discardp, SCR **acquirep) { return (0); } /* * ip_ex_adjust -- * Adjust the screen for ex. * * PUBLIC: int ip_ex_adjust __P((SCR *, exadj_t)); */ int ip_ex_adjust(SCR *sp, exadj_t action) { abort(); /* NOTREACHED */ } /* * ip_insertln -- * Push down the current line, discarding the bottom line. * * PUBLIC: int ip_insertln __P((SCR *)); */ int ip_insertln(SCR *sp) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); ipb.code = SI_INSERTLN; return (vi_send(ipp->o_fd, NULL, &ipb)); } /* * ip_keyval -- * Return the value for a special key. * * PUBLIC: int ip_keyval __P((SCR *, scr_keyval_t, CHAR_T *, int *)); */ int ip_keyval(SCR *sp, scr_keyval_t val, CHAR_T *chp, int *dnep) { /* * VEOF, VERASE and VKILL are required by POSIX 1003.1-1990, * VWERASE is a 4BSD extension. */ switch (val) { case KEY_VEOF: *dnep = '\004'; /* ^D */ break; case KEY_VERASE: *dnep = '\b'; /* ^H */ break; case KEY_VKILL: *dnep = '\025'; /* ^U */ break; #ifdef VWERASE case KEY_VWERASE: *dnep = '\027'; /* ^W */ break; #endif default: *dnep = 1; break; } return (0); } /* * ip_move -- * Move the cursor. * * PUBLIC: int ip_move __P((SCR *, size_t, size_t)); */ int ip_move(SCR *sp, size_t lno, size_t cno) { IP_PRIVATE *ipp; IP_BUF ipb; ipp = IPP(sp); ipp->row = lno; ipp->col = cno; ipb.code = SI_MOVE; ipb.val1 = RLNO(sp, lno); ipb.val2 = RCNO(sp, cno); return (vi_send(ipp->o_fd, "12", &ipb)); } /* * PUBLIC: void ip_msg __P((SCR *, mtype_t, char *, size_t)); */ void ip_msg(SCR *sp, mtype_t mtype, char *line, size_t len) { IP_PRIVATE *ipp = IPP(sp); if (F_ISSET(ipp, IP_ON_ALTERNATE)) vs_msg(sp, mtype, line, len); else { write(ipp->t_fd, line, len); F_CLR(sp, SC_EX_WAIT_NO); } } /* * ip_refresh -- * Refresh the screen. * * PUBLIC: int ip_refresh __P((SCR *, int)); */ int ip_refresh(SCR *sp, int repaint) { IP_BUF ipb; IP_PRIVATE *ipp; db_recno_t total; ipp = IPP(sp); /* * If the scroll bar information has changed since we last sent * it, resend it. Currently, we send three values: * * top The line number of the first line in the screen. * num The number of lines visible on the screen. * total The number of lines in the file. * * XXX * This is a gross violation of layering... we're looking at data * structures at which we have absolutely no business whatsoever * looking... */ ipb.val1 = HMAP->lno; ipb.val2 = TMAP->lno - HMAP->lno; if (sp->ep != NULL && sp->ep->db != NULL) (void)db_last(sp, &total); ipb.val3 = total == 0 ? 1 : total; if (ipb.val1 != ipp->sb_top || ipb.val2 != ipp->sb_num || ipb.val3 != ipp->sb_total) { ipb.code = SI_SCROLLBAR; (void)vi_send(ipp->o_fd, "123", &ipb); ipp->sb_top = ipb.val1; ipp->sb_num = ipb.val2; ipp->sb_total = ipb.val3; } /* Refresh/repaint the screen. */ ipb.code = repaint ? SI_REDRAW : SI_REFRESH; return (vi_send(ipp->o_fd, NULL, &ipb)); } /* * ip_rename -- * Rename the file. * * PUBLIC: int ip_rename __P((SCR *, char *, int)); */ int ip_rename(SCR *sp, char *name, int on) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); ipb.code = SI_RENAME; ipb.str1 = name; ipb.len1 = name ? strlen(name) : 0; return (vi_send(ipp->o_fd, "a", &ipb)); } /* * ip_reply -- * Reply to a message. * * PUBLIC: int ip_reply __P((SCR *, int, char *)); */ int ip_reply(SCR *sp, int status, char *msg) { IP_BUF ipb; IP_PRIVATE *ipp = IPP(sp); ipb.code = SI_REPLY; ipb.val1 = status; ipb.str1 = msg == NULL ? "" : msg; ipb.len1 = strlen(ipb.str1); return (vi_send(ipp->o_fd, "1a", &ipb)); } /* * ip_split -- * Split a screen. * * PUBLIC: int ip_split __P((SCR *, SCR *)); */ int ip_split(SCR *origp, SCR *newp) { return (0); } /* * ip_suspend -- * Suspend a screen. * * PUBLIC: int ip_suspend __P((SCR *, int *)); */ int ip_suspend(SCR *sp, int *allowedp) { *allowedp = 0; return (0); } /* * ip_usage -- * Print out the ip usage messages. * * PUBLIC: void ip_usage __P((void)); */ void ip_usage(void) { #define USAGE "\ usage: vi [-eFlRrSv] [-c command] [-I ifd.ofd] [-t tag] [-w size] [file ...]\n" (void)fprintf(stderr, "%s", USAGE); #undef USAGE } nvi-1.81.6/ip/ip_main.c0100644000076400001440000001514610720065506013651 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_main.c,v 8.24 2001/07/29 19:07:30 skimo Exp $ (Berkeley) $Date: 2001/07/29 19:07:30 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #include "extern.h" GS *__global_list; /* GLOBAL: List of screens. */ static void ip_func_std __P((WIN *)); static IP_PRIVATE *ip_init __P((WIN *wp, int i_fd, int o_fd, int, int argc, char *argv[])); static void perr __P((char *, char *)); static int get_fds __P((char *ip_arg, int *i_fd, int *o_fd)); static int get_connection __P((WIN *wp, int main_ifd, int main_ofd, int *i_fd, int *o_fd, int *, int can_pass)); static void *run_editor __P((void * vp)); /* * ip_main -- * This is the main loop for the vi-as-library editor. */ int main(int argc, char **argv) { IP_PRIVATE *ipp; int rval; char *ip_arg; char **p_av, **t_av; GS *gp; WIN *wp; int i_fd, o_fd, t_fd, main_ifd, main_ofd; /* Create and initialize the global structure. */ __global_list = gp = gs_init(argv[0]); /* * Strip out any arguments that vi isn't going to understand. There's * no way to portably call getopt twice, so arguments parsed here must * be removed from the argument list. */ ip_arg = NULL; for (p_av = t_av = argv;;) { if (*t_av == NULL) { *p_av = NULL; break; } if (!strcmp(*t_av, "--")) { while ((*p_av++ = *t_av++) != NULL); break; } if (!memcmp(*t_av, "-I", sizeof("-I") - 1)) { if (t_av[0][2] != '\0') { ip_arg = t_av[0] + 2; ++t_av; --argc; continue; } else if (t_av[1] != NULL) { ip_arg = t_av[1]; t_av += 2; argc -= 2; continue; } } *p_av++ = *t_av++; } if (get_fds(ip_arg, &main_ifd, &main_ofd)) return 1; wp = NULL; while (get_connection(wp, main_ifd, main_ofd, &i_fd, &o_fd, &t_fd, 1) == 0) { /* Create new window */ wp = gs_new_win(gp); /* Create and partially initialize the IP structure. */ if ((ipp = ip_init(wp, i_fd, o_fd, t_fd, argc, argv)) == NULL) return (1); gp->run(wp, run_editor, (void *)wp); } /* Clean out the global structure. */ gs_end(gp); /* Free the global and IP private areas. */ #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) free(gp); #endif exit (rval); } static void * run_editor(void * vp) { GS *gp; IP_PRIVATE *ipp; WIN *wp; EVENT ev; int rval; IP_BUF ipb; wp = (WIN *) vp; gp = wp->gp; ipp = wp->ip_private; /* Add the terminal type to the global structure. */ if ((OG_D_STR(gp, GO_TERM) = OG_STR(gp, GO_TERM) = strdup("ip_curses")) == NULL) perr(gp->progname, NULL); /* * Figure out how big the screen is -- read events until we get * the rows and columns. */ for (;;) { if (ip_wevent(wp, NULL, &ev, 0, 0)) return; if (ev.e_event == E_WRESIZE) break; if (ev.e_event == E_EOF || ev.e_event == E_ERR || ev.e_event == E_SIGHUP || ev.e_event == E_SIGTERM) return; if (ev.e_event == E_IPCOMMAND && ev.e_ipcom == VI_QUIT) return; } /* Run ex/vi. */ rval = editor(wp, ipp->argc, ipp->argv); /* Clean up the screen. */ (void)ip_quit(wp); /* Send the quit message. */ ipb.code = SI_QUIT; (void)vi_send(ipp->o_fd, NULL, &ipb); /* Give the screen a couple of seconds to deal with it. */ sleep(2); /* Remove window; correct place ? */ win_end(wp); #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) free(ipp); #endif return NULL; } /* * ip_init -- * Create and partially initialize the GS structure. */ static IP_PRIVATE * ip_init(WIN *wp, int i_fd, int o_fd, int t_fd, int argc, char *argv[]) { IP_PRIVATE *ipp; /* Allocate the IP private structure. */ CALLOC_NOMSG(NULL, ipp, IP_PRIVATE *, 1, sizeof(IP_PRIVATE)); if (ipp == NULL) perr(wp->gp->progname, NULL); wp->ip_private = ipp; ipp->i_fd = i_fd; ipp->o_fd = o_fd; ipp->t_fd = t_fd; ipp->argc = argc; ipp->argv = argv; /* Initialize the list of ip functions. */ ip_func_std(wp); return (ipp); } static int get_fds(char *ip_arg, int *i_fd, int *o_fd) { char *ep; /* * Crack ip_arg -- it's of the form #.#, where the first number is the * file descriptor from the screen, the second is the file descriptor * to the screen. */ if (!ip_arg || !isdigit(ip_arg[0])) goto usage; *i_fd = strtol(ip_arg, &ep, 10); if (ep[0] != '.' || !isdigit(ep[1])) goto usage; *o_fd = strtol(++ep, &ep, 10); if (ep[0] != '\0') { usage: ip_usage(); return 1; } return 0; } static int get_connection(WIN *wp, int main_ifd, int main_ofd, int *i_fd, int *o_fd, int *t_fd, int can_pass) { *t_fd = -1; if (!can_pass) { if (wp == NULL) { /* First call */ *i_fd = main_ifd; *o_fd = main_ofd; } else { return 1; } } else { struct msghdr mh; IPCMSGHDR ch; char dummy; struct iovec iov; mh.msg_namelen = 0; mh.msg_iovlen = 1; mh.msg_iov = &iov; mh.msg_controllen = sizeof(ch); mh.msg_control = (void *)&ch; iov.iov_len = 1; iov.iov_base = &dummy; if (recvmsg(main_ifd, &mh, 0) != 1) return 1; *i_fd = *(int *)CMSG_DATA(&ch.header); if (recvmsg(*i_fd, &mh, 0) != 1) return 1; *o_fd = *(int *)CMSG_DATA(&ch.header); if (dummy == 'F') { if (recvmsg(*i_fd, &mh, 0) != 1) return 1; *t_fd = *(int *)CMSG_DATA(&ch.header); } } return 0; } /* * ip_func_std -- * Initialize the standard ip functions. */ static void ip_func_std(WIN *wp) { GS *gp; gp = wp->gp; gp->scr_addstr = ip_addstr; gp->scr_waddstr = ip_waddstr; gp->scr_attr = ip_attr; gp->scr_baud = ip_baud; gp->scr_bell = ip_bell; gp->scr_busy = ip_busy; gp->scr_child = ip_child; gp->scr_clrtoeol = ip_clrtoeol; gp->scr_cursor = ip_cursor; gp->scr_deleteln = ip_deleteln; gp->scr_discard = ip_discard; gp->scr_event = ip_event; gp->scr_ex_adjust = ip_ex_adjust; gp->scr_fmap = ip_fmap; gp->scr_insertln = ip_insertln; gp->scr_keyval = ip_keyval; gp->scr_move = ip_move; wp->scr_msg = ip_msg; gp->scr_optchange = ip_optchange; gp->scr_refresh = ip_refresh; gp->scr_rename = ip_rename; gp->scr_reply = ip_reply; gp->scr_screen = ip_screen; gp->scr_split = ip_split; gp->scr_suspend = ip_suspend; gp->scr_usage = ip_usage; } /* * perr -- * Print system error. */ static void perr(char *name, char *msg) { (void)fprintf(stderr, "%s:", name); if (msg != NULL) (void)fprintf(stderr, "%s:", msg); (void)fprintf(stderr, "%s\n", strerror(errno)); exit(1); } nvi-1.81.6/ip/ip_read.c0100644000076400001440000002152210720065506013633 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_read.c,v 8.23 2001/06/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:24 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ex/script.h" #include "../ipc/ip.h" #include "extern.h" extern GS *__global_list; VIPFUNLIST const vipfuns[] = { /* VI_C_BOL Cursor to start of line. */ {"", E_IPCOMMAND}, /* VI_C_BOTTOM 2 /* Cursor to bottom. */ {"", E_IPCOMMAND}, /* VI_C_DEL 3 /* Cursor delete. */ {"", E_IPCOMMAND}, /* VI_C_DOWN Cursor down N lines: IPO_INT. */ {"1", E_IPCOMMAND}, /* VI_C_EOL 5 /* Cursor to end of line. */ {"", E_IPCOMMAND}, /* VI_C_INSERT 6 /* Cursor: enter insert mode. */ {"", E_IPCOMMAND}, /* VI_C_LEFT 7 /* Cursor left. */ {"", E_IPCOMMAND}, /* VI_C_PGDOWN 8 /* Cursor down N pages: IPO_INT. */ {"1", E_IPCOMMAND}, /* VI_C_PGUP 9 /* Cursor up N lines: IPO_INT. */ {"1", E_IPCOMMAND}, /* VI_C_RIGHT 10 /* Cursor right. */ {"", E_IPCOMMAND}, /* VI_C_SEARCH 11 /* Cursor: search: IPO_INT, IPO_STR. */ {"a1", E_IPCOMMAND}, /* VI_C_SETTOP 12 /* Cursor: set screen top line: IPO_INT. */ {"1", E_IPCOMMAND}, /* VI_C_TOP 13 /* Cursor to top. */ {"", E_IPCOMMAND}, /* VI_C_UP 14 /* Cursor up N lines: IPO_INT. */ {"1", E_IPCOMMAND}, /* VI_EDIT 15 /* Edit a file: IPO_STR. */ {"a", E_IPCOMMAND}, /* VI_EDITOPT 16 /* Edit option: 2 * IPO_STR, IPO_INT. */ {"ab1", E_IPCOMMAND}, /* VI_EDITSPLIT 17 /* Split to a file: IPO_STR. */ {"a", E_IPCOMMAND}, /* VI_EOF 18 /* End of input (NOT ^D). */ {"", E_EOF}, /* VI_ERR 19 /* Input error. */ {"", E_ERR}, /* VI_FLAGS Flags */ {"1", E_FLAGS}, /* VI_INTERRUPT 20 /* Interrupt. */ {"", E_INTERRUPT}, /* VI_MOUSE_MOVE 21 /* Mouse click move: IPO_INT, IPO_INT. */ {"12", E_IPCOMMAND}, /* VI_QUIT 22 /* Quit. */ {"", E_IPCOMMAND}, /* VI_RESIZE Screen resize: IPO_INT, IPO_INT. */ {"12", E_WRESIZE}, /* VI_SEL_END 24 /* Select end: IPO_INT, IPO_INT. */ {"12", E_IPCOMMAND}, /* VI_SEL_START 25 /* Select start: IPO_INT, IPO_INT. */ {"12", E_IPCOMMAND}, /* VI_SIGHUP 26 /* SIGHUP. */ {"", E_SIGHUP}, /* VI_SIGTERM 27 /* SIGTERM. */ {"", E_SIGTERM}, /* VI_STRING Input string: IPO_STR. */ {"a", E_STRING}, /* VI_TAG 29 /* Tag. */ {"", E_IPCOMMAND}, /* VI_TAGAS 30 /* Tag to a string: IPO_STR. */ {"a", E_IPCOMMAND}, /* VI_TAGSPLIT 31 /* Split to a tag. */ {"", E_IPCOMMAND}, /* VI_UNDO 32 /* Undo. */ {"", E_IPCOMMAND}, /* VI_WQ 33 /* Write and quit. */ {"", E_IPCOMMAND}, /* VI_WRITE 34 /* Write. */ {"", E_IPCOMMAND}, /* VI_WRITEAS 35 /* Write as another file: IPO_STR. */ {"a", E_IPCOMMAND}, /* VI_EVENT_SUP */ }; typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_TIMEOUT } input_t; static input_t ip_read __P((SCR *, IP_PRIVATE *, struct timeval *, int, int*)); static int ip_resize __P((SCR *, u_int32_t, u_int32_t)); static int ip_trans __P((SCR *, IP_PRIVATE *, EVENT *)); /* * ip_event -- * Return a single event. * * PUBLIC: int ip_event __P((SCR *, EVENT *, u_int32_t, int)); */ int ip_event(SCR *sp, EVENT *evp, u_int32_t flags, int ms) { return ip_wevent(sp->wp, sp, evp, flags, ms); } /* * XXX probably better to require new_window to send size * so we never have to call ip_wevent with sp == NULL * * ip_wevent -- * Return a single event. * * PUBLIC: int ip_wevent __P((WIN *, SCR *, EVENT *, u_int32_t, int)); */ int ip_wevent(WIN *wp, SCR *sp, EVENT *evp, u_int32_t flags, int ms) { IP_PRIVATE *ipp; struct timeval t, *tp; int termread; int nr; if (LF_ISSET(EC_INTERRUPT)) { /* XXX */ evp->e_event = E_TIMEOUT; return (0); } ipp = sp == NULL ? WIPP(wp) : IPP(sp); /* Discard the last command. */ if (ipp->iskip != 0) { ipp->iblen -= ipp->iskip; memmove(ipp->ibuf, ipp->ibuf + ipp->iskip, ipp->iblen); ipp->iskip = 0; } termread = F_ISSET(ipp, IP_IN_EX) || (sp && F_ISSET(sp, SC_SCR_EXWROTE)); /* Process possible remaining commands */ if (!termread && ipp->iblen >= IPO_CODE_LEN && ip_trans(sp, ipp, evp)) return 0; /* Set timer. */ if (ms == 0) tp = NULL; else { t.tv_sec = ms / 1000; t.tv_usec = (ms % 1000) * 1000; tp = &t; } /* Read input events. */ for (;;) { switch (ip_read(sp, ipp, tp, termread, &nr)) { case INP_OK: if (termread) { evp->e_csp = ipp->tbuf; evp->e_len = nr; evp->e_event = E_STRING; } else if (!ip_trans(sp, ipp, evp)) continue; break; case INP_EOF: evp->e_event = E_EOF; break; case INP_ERR: evp->e_event = E_ERR; break; case INP_TIMEOUT: evp->e_event = E_TIMEOUT; break; default: abort(); } break; } return (0); } /* * ip_read -- * Read characters from the input. */ static input_t ip_read(SCR *sp, IP_PRIVATE *ipp, struct timeval *tp, int termread, int *nr) { struct timeval poll; GS *gp; fd_set rdfd; input_t rval; size_t blen; int maxfd; char *bp; int fd; CHAR_T *wp; size_t wlen; gp = sp == NULL ? __global_list : sp->gp; bp = ipp->ibuf + ipp->iblen; blen = sizeof(ipp->ibuf) - ipp->iblen; fd = termread ? ipp->t_fd : ipp->i_fd; /* * 1: A read with an associated timeout, e.g., trying to complete * a map sequence. If input exists, we fall into #2. */ FD_ZERO(&rdfd); poll.tv_sec = 0; poll.tv_usec = 0; if (tp != NULL) { FD_SET(fd, &rdfd); switch (select(fd + 1, &rdfd, NULL, NULL, tp == NULL ? &poll : tp)) { case 0: return (INP_TIMEOUT); case -1: goto err; default: break; } } /* * 2: Wait for input. * * Select on the command input and scripting window file descriptors. * It's ugly that we wait on scripting file descriptors here, but it's * the only way to keep from locking out scripting windows. */ if (sp != NULL && F_ISSET(gp, G_SCRWIN)) { FD_ZERO(&rdfd); FD_SET(fd, &rdfd); maxfd = fd; if (sscr_check_input(sp, &rdfd, maxfd)) goto err; } /* * 3: Read the input. */ switch (*nr = read(fd, termread ? (char *)ipp->tbuf : bp, termread ? sizeof(ipp->tbuf)/sizeof(CHAR_T) : blen)) { case 0: /* EOF. */ rval = INP_EOF; break; case -1: /* Error or interrupt. */ err: rval = INP_ERR; msgq(sp, M_SYSERR, "input"); break; default: /* Input characters. */ if (!termread) ipp->iblen += *nr; else { CHAR2INT(sp, (char *)ipp->tbuf, *nr, wp, wlen); MEMMOVEW(ipp->tbuf, wp, wlen); } rval = INP_OK; break; } return (rval); } /* * ip_trans -- * Translate messages into events. */ static int ip_trans(SCR *sp, IP_PRIVATE *ipp, EVENT *evp) { u_int32_t skip, val; char *fmt; CHAR_T *wp; size_t wlen; if (ipp->ibuf[0] == CODE_OOB || ipp->ibuf[0] >= VI_EVENT_SUP) { /* * XXX: Protocol is out of sync? */ abort(); } fmt = vipfuns[ipp->ibuf[0]-1].format; evp->e_event = vipfuns[ipp->ibuf[0]-1].e_event; evp->e_ipcom = ipp->ibuf[0]; for (skip = IPO_CODE_LEN; *fmt != '\0'; ++fmt) switch (*fmt) { case '1': case '2': if (ipp->iblen < skip + IPO_INT_LEN) return (0); memcpy(&val, ipp->ibuf + skip, IPO_INT_LEN); val = ntohl(val); if (*fmt == '1') evp->e_val1 = val; else evp->e_val2 = val; skip += IPO_INT_LEN; break; case 'a': case 'b': if (ipp->iblen < skip + IPO_INT_LEN) return (0); memcpy(&val, ipp->ibuf + skip, IPO_INT_LEN); val = ntohl(val); skip += IPO_INT_LEN; if (ipp->iblen < skip + val) return (0); if (*fmt == 'a') { CHAR2INT(sp, ipp->ibuf + skip, val, wp, wlen); MEMCPYW(ipp->tbuf, wp, wlen); evp->e_str1 = ipp->tbuf; evp->e_len1 = wlen; } else { CHAR2INT(sp, ipp->ibuf + skip, val, wp, wlen); MEMCPYW(ipp->tbuf, wp, wlen); evp->e_str2 = ipp->tbuf; evp->e_len2 = wlen; } skip += val; break; } ipp->iskip = skip; if (evp->e_event == E_WRESIZE) (void)ip_resize(sp, evp->e_val1, evp->e_val2); return (1); } /* * ip_resize -- * Reset the options for a resize event. */ static int ip_resize(SCR *sp, u_int32_t lines, u_int32_t columns) { GS *gp; int rval; /* * XXX * The IP screen has to know the lines and columns before anything * else happens. So, we may not have a valid SCR pointer, and we * have to deal with that. */ if (sp == NULL) { gp = __global_list; OG_VAL(gp, GO_LINES) = OG_D_VAL(gp, GO_LINES) = lines; OG_VAL(gp, GO_COLUMNS) = OG_D_VAL(gp, GO_COLUMNS) = columns; return (0); } rval = api_opts_set(sp, L("lines"), NULL, lines, 0); if (api_opts_set(sp, L("columns"), NULL, columns, 0)) rval = 1; return (rval); } nvi-1.81.6/ip/ip_screen.c0100644000076400001440000000325610720065506014203 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_screen.c,v 8.8 2001/06/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:24 $"; #endif /* not lint */ #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #include "extern.h" /* * ip_screen -- * Initialize/shutdown the IP screen. * * PUBLIC: int ip_screen __P((SCR *, u_int32_t)); */ int ip_screen(SCR *sp, u_int32_t flags) { GS *gp; IP_PRIVATE *ipp; gp = sp->gp; ipp = IPP(sp); /* See if the current information is incorrect. */ if (F_ISSET(gp, G_SRESTART)) { if (ip_quit(sp->wp)) return (1); F_CLR(gp, G_SRESTART); } /* See if we're already in the right mode. */ if (LF_ISSET(SC_EX) && F_ISSET(sp, SC_SCR_EX) || LF_ISSET(SC_VI) && F_ISSET(sp, SC_SCR_VI)) return (0); /* Ex isn't possible if there is no terminal. */ if (LF_ISSET(SC_EX) && ipp->t_fd == -1) return (1); if (F_ISSET(sp, SC_SCR_EX)) F_CLR(sp, SC_SCR_EX); if (F_ISSET(sp, SC_SCR_VI)) F_CLR(sp, SC_SCR_VI); if (LF_ISSET(SC_EX)) { F_SET(ipp, IP_IN_EX); } else { /* Initialize terminal based information. */ if (ip_term_init(sp)) return (1); F_CLR(ipp, IP_IN_EX); F_SET(ipp, IP_SCR_VI_INIT); } return (0); } /* * ip_quit -- * Shutdown the screens. * * PUBLIC: int ip_quit __P((WIN *)); */ int ip_quit(WIN *wp) { IP_PRIVATE *ipp; int rval; /* Clean up the terminal mappings. */ rval = ip_term_end(wp->gp); ipp = WIPP(wp); F_CLR(ipp, IP_SCR_VI_INIT); return (rval); } nvi-1.81.6/ip/ip_term.c0100644000076400001440000000512710720065506013672 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_term.c,v 8.9 2001/06/25 15:19:24 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:24 $"; #endif /* not lint */ #include #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #include "extern.h" /* * ip_term_init -- * Initialize the terminal special keys. * * PUBLIC: int ip_term_init __P((SCR *)); */ int ip_term_init(SCR *sp) { SEQ *qp; /* * Rework any function key mappings that were set before the * screen was initialized. */ for (qp = sp->gp->seqq.lh_first; qp != NULL; qp = qp->q.le_next) if (F_ISSET(qp, SEQ_FUNCMAP)) (void)ip_fmap(sp, qp->stype, qp->input, qp->ilen, qp->output, qp->olen); return (0); } /* * ip_term_end -- * End the special keys defined by the termcap/terminfo entry. * * PUBLIC: int ip_term_end __P((GS *)); */ int ip_term_end(GS *gp) { SEQ *qp, *nqp; /* Delete screen specific mappings. */ for (qp = gp->seqq.lh_first; qp != NULL; qp = nqp) { nqp = qp->q.le_next; if (F_ISSET(qp, SEQ_SCREEN)) (void)seq_mdel(qp); } return (0); } /* * ip_fmap -- * Map a function key. * * PUBLIC: int ip_fmap __P((SCR *, seq_t, CHAR_T *, size_t, CHAR_T *, size_t)); */ int ip_fmap(SCR *sp, seq_t stype, CHAR_T *from, size_t flen, CHAR_T *to, size_t tlen) { /* Bind a function key to a string sequence. */ return (1); } /* * ip_optchange -- * IP screen specific "option changed" routine. * * PUBLIC: int ip_optchange __P((SCR *, int, char *, u_long *)); */ int ip_optchange(SCR *sp, int offset, char *str, u_long *valp) { IP_BUF ipb; OPTLIST const *opt; IP_PRIVATE *ipp = IPP(sp); char *np; size_t nlen; switch (offset) { case O_COLUMNS: case O_LINES: F_SET(sp->gp, G_SRESTART); F_CLR(sp, SC_SCR_EX | SC_SCR_VI); break; case O_TERM: /* Called with "ip_curses"; previously wasn't shown * because switching to EX wasn't allowed msgq(sp, M_ERR, "The screen type may not be changed"); */ return (1); } opt = optlist + offset; switch (opt->type) { case OPT_0BOOL: case OPT_1BOOL: case OPT_NUM: ipb.val1 = *valp; ipb.len2 = 0; break; case OPT_STR: if (str == NULL) { ipb.str2 = ""; ipb.len2 = 1; } else { ipb.str2 = str; ipb.len2 = strlen(str) + 1; } break; } ipb.code = SI_EDITOPT; ipb.str1 = (char*)opt->name; ipb.len1 = STRLEN(opt->name) * sizeof(CHAR_T); (void)vi_send(ipp->o_fd, "ab1", &ipb); return (0); } nvi-1.81.6/ip/vipc.pl0100644000076400001440000000102210720065506013353 0ustar skimousers# @(#)vipc.pl 10.1 (Berkeley) 6/8/95 if (/^\/\* (VI_[0-9A-Z_]*)/) { $cmd = $1; $name = lc $1; $_ = <>; next unless /"([^"]*)"/; @fpars = "IPVIWIN *ipvi"; @pars = $cmd; for (split "", $1) { if (/\d/) { push @fpars, "u_int32_t val$_"; push @pars, "val$_"; } if (/[a-z]/) { push @fpars, "const char *str$_, u_int32_t len$_"; push @pars, "str$_, len$_"; } } $fpars = join ', ', @fpars; $pars = join ', ', @pars; print < #include "ipc_def.h" typedef struct ipcmsghdr { struct cmsghdr header; int __room_for_fd; } IPCMSGHDR; struct _ip_vi_win; typedef struct _ip_private { int i_fd; /* Input file descriptor. */ int o_fd; /* Output file descriptor. */ int t_fd; /* Terminal file descriptor. */ int argc; char **argv; size_t row; /* Current row. */ size_t col; /* Current column. */ db_recno_t sb_total; /* scrollbar: total lines in file. */ db_recno_t sb_top; /* scrollbar: top line on screen. */ size_t sb_num; /* scrollbar: number of lines on screen. */ size_t iblen; /* Input buffer length. */ size_t iskip; /* Returned input buffer. */ char ibuf[256]; /* Input buffer. */ CHAR_T tbuf[256]; /* Input keys. */ #define IP_IN_EX 0x0001 /* Currently running ex. */ #define IP_ON_ALTERNATE 0x0002 /* Alternate on. */ #define IP_SCR_VI_INIT 0x0004 /* Vi screen initialized. */ u_int32_t flags; } IP_PRIVATE; #define IPP(sp) ((IP_PRIVATE *)((sp)->wp->ip_private)) #define WIPP(wp) ((IP_PRIVATE *)((wp)->ip_private)) /* The screen line relative to a specific window. */ #define RLNO(sp, lno) (sp)->roff + (lno) #define RCNO(sp, cno) (sp)->coff + (cno) #define IPO_CODE_LEN 1 /* Length of a code value. */ #define IPO_INT_LEN 4 /* Length of an integer. */ /* A structure that can hold the information for any frame. */ typedef struct _ip_buf { int code; /* Event code. */ const char *str1; /* String #1. */ u_int32_t len1; /* String #1 length. */ const char *str2; /* String #1. */ u_int32_t len2; /* String #1 length. */ u_int32_t val1; /* Value #1. */ u_int32_t val2; /* Value #2. */ u_int32_t val3; /* Value #3. */ } IP_BUF; typedef int (*IPFunc) (struct _ip_vi_win *); typedef int (*IPFunc_1) (struct _ip_vi_win *, u_int32_t); typedef int (*IPFunc_1a) (struct _ip_vi_win *, u_int32_t, const char *, u_int32_t); typedef int (*IPFunc_a) (struct _ip_vi_win *, const char *, u_int32_t); typedef int (*IPFunc_ab1) (struct _ip_vi_win *, const char *, u_int32_t, const char *, u_int32_t, u_int32_t); typedef int (*IPFunc_12) (struct _ip_vi_win *, u_int32_t, u_int32_t); typedef int (*IPFunc_123) (struct _ip_vi_win *, u_int32_t, u_int32_t, u_int32_t); typedef int (*IPUnmarshall) (struct _ip_vi_win *, IP_BUF *, IPFunc); typedef struct _ipfunlist { char *format; IPUnmarshall unmarshall; size_t offset; } IPFUNLIST; typedef struct _vipfunlist { char *format; e_event_t e_event; } VIPFUNLIST; typedef struct ip_si_operations { IPFunc_a addstr; IPFunc_12 attribute; IPFunc bell; IPFunc busy_off; IPFunc_a busy_on; IPFunc clrtoeol; IPFunc deleteln; IPFunc discard; IPFunc_ab1 editopt; IPFunc insertln; IPFunc_12 move; IPFunc quit; IPFunc redraw; IPFunc refresh; IPFunc_a rename; IPFunc_1 rewrite; IPFunc_123 scrollbar; IPFunc_a select; IPFunc split; IPFunc_a waddstr; } IPSIOPS; struct _ip_vi; typedef struct _ip_vi IPVI; struct _ip_vi_win; typedef struct _ip_vi_win IPVIWIN; struct _ip_vi { int ifd; /* Input file descriptor. */ int ofd; /* Output file descriptor. */ pid_t pid; void *private_data; u_int32_t flags; int (*run) __P((IPVI*, int, char*[])); int (*new_window) __P((IPVI *, IPVIWIN **, int)); int (*close) __P((IPVI*)); }; struct _ip_vi_win { int ifd; /* Input file descriptor. */ int ofd; /* Output file descriptor. */ void *private_data; IPSIOPS *si_ops; int (*c_bol) __P((IPVIWIN*)); int (*c_bottom) __P((IPVIWIN*)); int (*c_del) __P((IPVIWIN*)); int (*c_eol) __P((IPVIWIN*)); int (*c_insert) __P((IPVIWIN*)); int (*c_left) __P((IPVIWIN*)); int (*c_right) __P((IPVIWIN*)); int (*c_top) __P((IPVIWIN*)); int (*c_settop) __P((IPVIWIN*, u_int32_t)); int (*string) __P((IPVIWIN*, const char*, u_int32_t)); int (*wq) __P((IPVIWIN*)); int (*quit) __P((IPVIWIN*)); int (*resize) __P((IPVIWIN*, u_int32_t, u_int32_t)); int (*input) __P((IPVIWIN*, int)); int (*close) __P((IPVIWIN*)); int (*set_ops) __P((IPVIWIN*, IPSIOPS*)); }; /* * Screen/editor IP_CODE's. * * The program structure depends on the event loop being able to return * IPO_EOF/IPO_ERR multiple times -- eventually enough things will end * due to the events that vi will reach the command level for the screen, * at which point the exit flags will be set and vi will exit. * * IP events sent from the screen to vi. */ #define CODE_OOB 0 /* Illegal code. */ #if 0 #define VI_C_BOL 1 /* Cursor to start of line. */ #define VI_C_BOTTOM 2 /* Cursor to bottom. */ #define VI_C_DEL 3 /* Cursor delete. */ #define VI_C_DOWN 4 /* Cursor down N lines: IPO_INT. */ #define VI_C_EOL 5 /* Cursor to end of line. */ #define VI_C_INSERT 6 /* Cursor: enter insert mode. */ #define VI_C_LEFT 7 /* Cursor left. */ #define VI_C_PGDOWN 8 /* Cursor down N pages: IPO_INT. */ #define VI_C_PGUP 9 /* Cursor up N lines: IPO_INT. */ #define VI_C_RIGHT 10 /* Cursor right. */ #define VI_C_SEARCH 11 /* Cursor: search: IPO_INT, IPO_STR. */ #define VI_C_SETTOP 12 /* Cursor: set screen top line: IPO_INT. */ #define VI_C_TOP 13 /* Cursor to top. */ #define VI_C_UP 14 /* Cursor up N lines: IPO_INT. */ #define VI_EDIT 15 /* Edit a file: IPO_STR. */ #define VI_EDITOPT 16 /* Edit option: 2 * IPO_STR, IPO_INT. */ #define VI_EDITSPLIT 17 /* Split to a file: IPO_STR. */ #define VI_EOF 18 /* End of input (NOT ^D). */ #define VI_ERR 19 /* Input error. */ #define VI_INTERRUPT 20 /* Interrupt. */ #define VI_MOUSE_MOVE 21 /* Mouse click move: IPO_INT, IPO_INT. */ #define VI_QUIT 22 /* Quit. */ #define VI_RESIZE 23 /* Screen resize: IPO_INT, IPO_INT. */ #define VI_SEL_END 24 /* Select end: IPO_INT, IPO_INT. */ #define VI_SEL_START 25 /* Select start: IPO_INT, IPO_INT. */ #define VI_SIGHUP 26 /* SIGHUP. */ #define VI_SIGTERM 27 /* SIGTERM. */ #define VI_STRING 28 /* Input string: IPO_STR. */ #define VI_TAG 29 /* Tag. */ #define VI_TAGAS 30 /* Tag to a string: IPO_STR. */ #define VI_TAGSPLIT 31 /* Split to a tag. */ #define VI_UNDO 32 /* Undo. */ #define VI_WQ 33 /* Write and quit. */ #define VI_WRITE 34 /* Write. */ #define VI_WRITEAS 35 /* Write as another file: IPO_STR. */ #define VI_FLAGS 36 /* Flags passed to nvi_create */ #endif #define VI_SEARCH_EXT 0x001 /* VI_C_SEARCH: ignore case. */ #define VI_SEARCH_IC 0x002 /* VI_C_SEARCH: ignore case. */ #define VI_SEARCH_ICL 0x004 /* VI_C_SEARCH: ignore case if lower-case. */ #define VI_SEARCH_INCR 0x008 /* VI_C_SEARCH: incremental search. */ #define VI_SEARCH_LIT 0x010 /* VI_C_SEARCH: literal string. */ #define VI_SEARCH_REV 0x020 /* VI_C_SEARCH: reverse direction. */ #define VI_SEARCH_WR 0x040 /* VI_C_SEARCH: wrap at sof/eof. */ /* * IP events sent from vi to the screen. */ #if 0 #define SI_ADDSTR 1 /* Add a string: IPO_STR. */ #define SI_ATTRIBUTE 2 /* Set screen attribute: 2 * IPO_INT. */ #define SI_BELL 3 /* Beep/bell/flash the terminal. */ #define SI_BUSY_OFF 4 /* Display a busy message: IPO_STR. */ #define SI_BUSY_ON 5 /* Display a busy message: IPO_STR. */ #define SI_CLRTOEOL 6 /* Clear to the end of the line. */ #define SI_DELETELN 7 /* Delete a line. */ #define SI_DISCARD 8 /* Discard the screen. */ #define SI_EDITOPT 9 /* Edit option: 2 * IPO_STR, IPO_INT. */ #define SI_INSERTLN 10 /* Insert a line. */ #define SI_MOVE 11 /* Move the cursor: 2 * IPO_INT. */ #define SI_QUIT 12 /* Quit. */ #define SI_REDRAW 13 /* Redraw the screen. */ #define SI_REFRESH 14 /* Refresh the screen. */ #define SI_RENAME 15 /* Rename the screen: IPO_STR. */ #define SI_REPLY 16 /* Reply: IPO_INT (0/1), IPO_STR. */ #define SI_REWRITE 17 /* Rewrite a line: IPO_INT. */ #define SI_SCROLLBAR 18 /* Reset the scrollbar: 3 * IPO_INT. */ #define SI_SELECT 19 /* Select area: IPO_STR. */ #define SI_SPLIT 20 /* Split the screen. */ #define SI_EVENT_MAX 20 #endif #include "extern.h" nvi-1.81.6/ipc/ip_run.c0100644000076400001440000001244410720065506013672 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_run.c,v 8.17 2000/07/04 21:48:54 skimo Exp $ (Berkeley) $Date: 2000/07/04 21:48:54 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "ip.h" #include "pathnames.h" static void arg_format __P((char *, int *, char **[], int, int)); static void fatal __P((void)); #ifdef DEBUG static void attach __P((void)); #endif static int channel(int rpipe[2], int wpipe[2]); char *vi_progname = "vi"; /* Global: program name. */ /* * vi_run -- * Run the vi program. * * PUBLIC: int vi_run __P((IPVI *, int, char *[])); */ int vi_run(ipvi, argc, argv) IPVI *ipvi; int argc; char *argv[]; { struct stat sb; int pflag, rpipe[2], wpipe[2]; char *execp, **p_av, **t_av; pflag = 0; execp = VI; /* Strip out any arguments that vi isn't going to understand. */ for (p_av = t_av = argv;;) { if (*t_av == NULL) { *p_av = NULL; break; } if (!strcmp(*t_av, "--")) { while ((*p_av++ = *++t_av) != NULL); break; } #ifdef DEBUG if (!memcmp(*t_av, "-D", sizeof("-D") - 1)) { attach(); ++t_av; --argc; continue; } #endif #ifdef TRACE if (!memcmp(*t_av, "-T", sizeof("-T") - 1)) { char *p = &t_av[0][sizeof("-T") - 1]; if (*p == '\0') { --argc; p = *++t_av; } vtrace_init(p); ++t_av; --argc; continue; } #endif if (!memcmp(*t_av, "-P", sizeof("-P") - 1)) { if (t_av[0][2] != '\0') { pflag = 1; execp = t_av[0] + 2; ++t_av; --argc; continue; } if (t_av[1] != NULL) { pflag = 1; execp = t_av[1]; t_av += 2; argc -= 2; continue; } } *p_av++ = *t_av++; } /* * Open the communications channels. The pipes are named from the * parent's viewpoint, meaning the screen reads from rpipe[0] and * writes to wpipe[1]. The vi process reads from wpipe[0], and it * writes to rpipe[1]. */ if (channel(rpipe, wpipe) == -1) fatal(); ipvi->ifd = rpipe[0]; ipvi->ofd = wpipe[1]; /* * Reformat our arguments, adding a -I to the list. The first file * descriptor for the -I argument is vi's input, and the second is * vi's output. */ arg_format(execp, &argc, &argv, wpipe[0], rpipe[1]); /* Run vi. */ switch (ipvi->pid = fork()) { case -1: /* Error. */ fatal(); /* NOTREACHED */ case 0: /* Child: Vi. */ (void)close(rpipe[0]); (void)close(wpipe[1]); /* * If the user didn't override the path and there's a local * (debugging) nvi, run it, otherwise run the user's path, * if specified, else run the compiled in path. */ if (!pflag && stat("vi-ipc", &sb) == 0) execv("vi-ipc", argv); execv(execp, argv); (void)fprintf(stderr, "%s: %s %s\n", vi_progname, execp, strerror(errno)); (void)fprintf(stderr, #ifdef DEBUG "usage: %s [-D] [-P vi_program] [-T trace] [vi arguments]\n", #else "usage: %s [-P vi_program] [vi arguments]\n", #endif vi_progname); _exit (1); default: /* Parent: Screen. */ (void)close(rpipe[1]); (void)close(wpipe[0]); break; } return (0); } /* * fatal -- * Fatal error. */ static void fatal() { (void)fprintf(stderr, "%s: %s\n", vi_progname, strerror(errno)); exit (1); } static int channel(int rpipe[2], int wpipe[2]) { if (0) { if (pipe(rpipe) == -1 || pipe(wpipe) == -1) return -1; } else { int sockets[2]; if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sockets) == -1) return -1; rpipe[0] = sockets[0]; wpipe[0] = sockets[1]; if (((rpipe[1] = dup(sockets[1])) == -1) || ((wpipe[1] = dup(sockets[0])) == -1)) return -1; } } /* * arg_format -- * Reformat our arguments to add the -I argument for vi. */ static void arg_format(execp, argcp, argvp, i_fd, o_fd) char *execp, **argvp[]; int *argcp, i_fd, o_fd; { char *iarg, **largv, *p, **p_av, **t_av; /* Get space for the argument array and the -I argument. */ if ((iarg = malloc(64)) == NULL || (largv = malloc((*argcp + 3) * sizeof(char *))) == NULL) fatal(); memcpy(largv + 2, *argvp, *argcp * sizeof(char *) + 1); /* Reset argv[0] to be the exec'd program. */ if ((p = strrchr(execp, '/')) == NULL) largv[0] = execp; else largv[0] = p + 1; /* Create the -I argument. */ (void)sprintf(iarg, "-I%d%s%d", i_fd, ".", o_fd); largv[1] = iarg; /* Copy any remaining arguments into the array. */ for (p_av = (*argvp) + 1, t_av = largv + 2;;) if ((*t_av++ = *p_av++) == NULL) break; /* Reset the argument array. */ *argvp = largv; } #ifdef DEBUG /* * attach -- * Pause and let the user attach a debugger. */ static void attach() { int fd; char ch; (void)printf("process %lu waiting, enter to continue: ", (u_long)getpid()); (void)fflush(stdout); if ((fd = open(_PATH_TTY, O_RDONLY, 0)) < 0) { (void)fprintf(stderr, "%s: %s, %s\n", vi_progname, _PATH_TTY, strerror(errno)); exit (1);; } do { if (read(fd, &ch, 1) != 1) { (void)close(fd); return; } } while (ch != '\n' && ch != '\r'); (void)close(fd); } #endif nvi-1.81.6/ipc/ip_send.c0100644000076400001440000000442510720065506014017 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_send.c,v 8.10 2001/06/25 15:19:25 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:25 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "ip.h" /* * vi_send -- * Construct and send an IP buffer. * * PUBLIC: int vi_send __P((int, char *, IP_BUF *)); */ int vi_send(int ofd, char *fmt, IP_BUF *ipbp) { static char *bp; static size_t blen; size_t off; u_int32_t ilen; int nlen, n, nw; char *p; /* * Have not created the channel to vi yet? -- RAZ * * XXX * How is that possible!?!? * * We'll soon find out. */ if (ofd == 0) { fprintf(stderr, "No channel\n"); abort(); } if (blen == 0 && (bp = malloc(blen = 512)) == NULL) return (1); p = bp; nlen = 0; *p++ = ipbp->code; nlen += IPO_CODE_LEN; if (fmt != NULL) for (; *fmt != '\0'; ++fmt) switch (*fmt) { case '1': /* Value #1. */ ilen = htonl(ipbp->val1); goto value; case '2': /* Value #2. */ ilen = htonl(ipbp->val2); goto value; case '3': /* Value #3. */ ilen = htonl(ipbp->val3); value: nlen += IPO_INT_LEN; if (nlen >= blen) { blen = blen * 2 + nlen; off = p - bp; if ((bp = realloc(bp, blen)) == NULL) return (1); p = bp + off; } memcpy(p, &ilen, IPO_INT_LEN); p += IPO_INT_LEN; break; case 'a': /* String #1. */ case 'b': /* String #2. */ ilen = *fmt == 'a' ? ipbp->len1 : ipbp->len2; nlen += IPO_INT_LEN + ilen; if (nlen >= blen) { blen = blen * 2 + nlen; off = p - bp; if ((bp = realloc(bp, blen)) == NULL) return (1); p = bp + off; } ilen = htonl(ilen); memcpy(p, &ilen, IPO_INT_LEN); p += IPO_INT_LEN; if (*fmt == 'a') { memcpy(p, ipbp->str1, ipbp->len1); p += ipbp->len1; } else { memcpy(p, ipbp->str2, ipbp->len2); p += ipbp->len2; } break; } for (n = p - bp, p = bp; n > 0; n -= nw, p += nw) if ((nw = write(ofd, p, n)) < 0) return (1); return (0); } nvi-1.81.6/ipc/ip_trans.c0100644000076400001440000001014310720065506014207 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: ip_trans.c,v 8.18 2001/06/25 15:19:25 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:25 $"; #endif /* not lint */ #include #include #ifdef HAVE_SYS_SELECT_H #include #endif #include #include #include #include #include #ifdef __STDC__ #include #else #include #endif #include "../common/common.h" #include "ip.h" #include "ipc_def.h" static char ibuf[2048]; /* Input buffer. */ static size_t ibuf_len; /* Length of current input. */ extern IPFUNLIST const ipfuns[]; /* * vi_input -- * Read from the vi message queue. * * PUBLIC: int vi_input __P((IPVIWIN *, int)); */ int vi_input(IPVIWIN *ipviwin, int fd) { ssize_t nr; /* Read waiting vi messages and translate to X calls. */ switch (nr = read(fd, ibuf + ibuf_len, sizeof(ibuf) - ibuf_len)) { case 0: return (0); case -1: return (-1); default: break; } ibuf_len += nr; /* Parse to data end or partial message. */ (void)vi_translate(ipviwin, ibuf, &ibuf_len, NULL); return (ibuf_len > 0); } /* * vi_wsend -- * Construct and send an IP buffer, and wait for an answer. * * PUBLIC: int vi_wsend __P((IPVIWIN*, char *, IP_BUF *)); */ int vi_wsend(IPVIWIN *ipviwin, char *fmt, IP_BUF *ipbp) { fd_set rdfd; ssize_t nr; if (vi_send(ipviwin->ofd, fmt, ipbp)) return (1); FD_ZERO(&rdfd); ipbp->code = CODE_OOB; for (;;) { FD_SET(ipviwin->ifd, &rdfd); if (select(ipviwin->ifd + 1, &rdfd, NULL, NULL, NULL) != 0) return (-1); /* Read waiting vi messages and translate to X calls. */ switch (nr = read(ipviwin->ifd, ibuf + ibuf_len, sizeof(ibuf) - ibuf_len)) { case 0: return (0); case -1: return (-1); default: break; } ibuf_len += nr; /* Parse to data end or partial message. */ (void)vi_translate(ipviwin, ibuf, &ibuf_len, ipbp); if (ipbp->code != CODE_OOB) break; } return (0); } /* * vi_translate -- * Translate vi messages into function calls. * * PUBLIC: int vi_translate __P((IPVIWIN *, char *, size_t *, IP_BUF *)); */ int vi_translate(IPVIWIN *ipviwin, char *bp, size_t *lenp, IP_BUF *ipbp) { IP_BUF ipb; size_t len, needlen; u_int32_t *vp; char *fmt, *p, *s_bp; const char **vsp; IPFunc fun; for (s_bp = bp, len = *lenp; len > 0;) { fmt = ipfuns[(ipb.code = bp[0])-1].format; p = bp + IPO_CODE_LEN; needlen = IPO_CODE_LEN; for (; *fmt != '\0'; ++fmt) switch (*fmt) { case '1': /* Value #1. */ vp = &ipb.val1; goto value; case '2': /* Value #2. */ vp = &ipb.val2; goto value; case '3': /* Value #3. */ vp = &ipb.val3; value: needlen += IPO_INT_LEN; if (len < needlen) goto partial; memcpy(vp, p, IPO_INT_LEN); *vp = ntohl(*vp); p += IPO_INT_LEN; break; case 'a': /* String #1. */ vp = &ipb.len1; vsp = &ipb.str1; goto string; case 'b': /* String #2. */ vp = &ipb.len2; vsp = &ipb.str2; string: needlen += IPO_INT_LEN; if (len < needlen) goto partial; memcpy(vp, p, IPO_INT_LEN); *vp = ntohl(*vp); p += IPO_INT_LEN; needlen += *vp; if (len < needlen) goto partial; *vsp = p; p += *vp; break; } bp += needlen; len -= needlen; /* * XXX * Protocol error!?!? */ if (ipb.code >= SI_EVENT_SUP) { len = 0; break; } /* * If we're waiting for a reply and we got it, return it, and * leave any unprocessed data in the buffer. If we got a reply * and we're not waiting for one, discard it -- callers wait * for responses. */ if (ipb.code == SI_REPLY) { if (ipbp == NULL) continue; *ipbp = ipb; break; } /* Call the underlying routine. */ fun = *(IPFunc *) (((char *)ipviwin->si_ops)+ipfuns[ipb.code - 1].offset); if (fun != NULL && ipfuns[ipb.code - 1].unmarshall(ipviwin, &ipb, fun)) break; } partial: if ((*lenp = len) != 0) memmove(s_bp, bp, len); return (0); } nvi-1.81.6/ipc/ipc.awk0100644000076400001440000000016510720065506013506 0ustar skimousers# @(#)ipc.awk 10.1 (Berkeley) 6/8/95 /^\/\* SI_[0-9A-Z_]* \*\/$/ { printf("#define %s %d\n", $2, ++cnt); next; } nvi-1.81.6/ipc/ipc_cmd.c0100644000076400001440000000611310720065506013770 0ustar skimousers#include "config.h" #include #include #include #include #include #include "../common/common.h" #include "ip.h" static int ipc_unmarshall_a __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall_12 __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall_ab1 __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall_1a __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall_1 __P((IPVIWIN *, IP_BUF*, IPFunc)); static int ipc_unmarshall_123 __P((IPVIWIN *, IP_BUF*, IPFunc)); #define OFFSET(t,m) ((size_t)&((t *)0)->m) IPFUNLIST const ipfuns[] = { /* SI_ADDSTR */ {"a", ipc_unmarshall_a, OFFSET(IPSIOPS, addstr)}, /* SI_ATTRIBUTE */ {"12", ipc_unmarshall_12, OFFSET(IPSIOPS, attribute)}, /* SI_BELL */ {"", ipc_unmarshall, OFFSET(IPSIOPS, bell)}, /* SI_BUSY_OFF */ {"", ipc_unmarshall, OFFSET(IPSIOPS, busy_off)}, /* SI_BUSY_ON */ {"a", ipc_unmarshall_a, OFFSET(IPSIOPS, busy_on)}, /* SI_CLRTOEOL */ {"", ipc_unmarshall, OFFSET(IPSIOPS, clrtoeol)}, /* SI_DELETELN */ {"", ipc_unmarshall, OFFSET(IPSIOPS, deleteln)}, /* SI_DISCARD */ {"", ipc_unmarshall, OFFSET(IPSIOPS, discard)}, /* SI_EDITOPT */ {"ab1", ipc_unmarshall_ab1, OFFSET(IPSIOPS, editopt)}, /* SI_INSERTLN */ {"", ipc_unmarshall, OFFSET(IPSIOPS, insertln)}, /* SI_MOVE */ {"12", ipc_unmarshall_12, OFFSET(IPSIOPS, move)}, /* SI_QUIT */ {"", ipc_unmarshall, OFFSET(IPSIOPS, quit)}, /* SI_REDRAW */ {"", ipc_unmarshall, OFFSET(IPSIOPS, redraw)}, /* SI_REFRESH */ {"", ipc_unmarshall, OFFSET(IPSIOPS, refresh)}, /* SI_RENAME */ {"a", ipc_unmarshall_a, OFFSET(IPSIOPS, rename)}, /* SI_REPLY */ {"1a", NULL, 0}, /* SI_REWRITE */ {"1", ipc_unmarshall_1, OFFSET(IPSIOPS, rewrite)}, /* SI_SCROLLBAR */ {"123", ipc_unmarshall_123, OFFSET(IPSIOPS, scrollbar)}, /* SI_SELECT */ {"a", ipc_unmarshall_a, OFFSET(IPSIOPS, select)}, /* SI_SPLIT */ {"", ipc_unmarshall, OFFSET(IPSIOPS, split)}, /* SI_WADDSTR */ {"a", ipc_unmarshall_a, OFFSET(IPSIOPS, waddstr)}, /* SI_EVENT_SUP */ }; static int ipc_unmarshall_a(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_a)func)(ipvi, ipb->str1, ipb->len1); } static int ipc_unmarshall_12(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_12)func)(ipvi, ipb->val1, ipb->val2); } static int ipc_unmarshall(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return func(ipvi); } static int ipc_unmarshall_ab1(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_ab1)func)(ipvi, ipb->str1, ipb->len1, ipb->str2, ipb->len2, ipb->val1); } static int ipc_unmarshall_1a(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_1a)func)(ipvi, ipb->val1, ipb->str1, ipb->len1); } static int ipc_unmarshall_1(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_1)func)(ipvi, ipb->val1); } static int ipc_unmarshall_123(IPVIWIN *ipvi, IP_BUF *ipb, IPFunc func) { return ((IPFunc_123)func)(ipvi, ipb->val1, ipb->val2, ipb->val3); } nvi-1.81.6/ipc/ipc_method.c0100644000076400001440000001073710720065506014514 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "ip.h" static int vi_send_ __P((IPVIWIN *, int)); static int vi_send_1 __P((IPVIWIN *, int, u_int32_t )); static int vi_send_12 __P((IPVIWIN *ipvi, int code, u_int32_t val1, u_int32_t val2)); static int vi_send_ab1 __P((IPVIWIN *ipvi, int code, const char *str1, u_int32_t len1, const char *str2, u_int32_t len2, u_int32_t val)); static int vi_send_a1 __P((IPVIWIN *ipvi, int code, const char *str, u_int32_t len, u_int32_t val)); static int vi_send_a __P((IPVIWIN *ipvi, int code, const char *str, u_int32_t len)); #include "ipc_gen.c" static int vi_set_ops __P((IPVIWIN *, IPSIOPS *)); static int vi_win_close __P((IPVIWIN *)); static int vi_close __P((IPVI *)); static int vi_new_window __P((IPVI *, IPVIWIN **, int)); /* * vi_create * * PUBLIC: int vi_create __P((IPVI **, u_int32_t)); */ int vi_create(IPVI **ipvip, u_int32_t flags) { IPVI *ipvi; MALLOC_GOTO(NULL, ipvi, IPVI*, sizeof(IPVI)); memset(ipvi, 0, sizeof(IPVI)); ipvi->flags = flags; ipvi->run = vi_run; ipvi->new_window = vi_new_window; ipvi->close = vi_close; *ipvip = ipvi; return 0; alloc_err: return 1; } static int vi_new_window (IPVI *ipvi, IPVIWIN **ipviwinp, int fd) { IPVIWIN *ipviwin; MALLOC_GOTO(NULL, ipviwin, IPVIWIN*, sizeof(IPVIWIN)); memset(ipviwin, 0, sizeof(IPVIWIN)); if (0) { ipviwin->ifd = ipvi->ifd; ipviwin->ofd = ipvi->ofd; } else { int sockets[2]; struct msghdr mh; IPCMSGHDR ch; char dummy; struct iovec iov; socketpair(AF_LOCAL, SOCK_STREAM, 0, sockets); mh.msg_namelen = 0; mh.msg_iovlen = 1; mh.msg_iov = &iov; mh.msg_controllen = sizeof(ch); mh.msg_control = (void *)&ch; iov.iov_len = 1; iov.iov_base = &dummy; ch.header.cmsg_level = SOL_SOCKET; ch.header.cmsg_type = SCM_RIGHTS; ch.header.cmsg_len = sizeof(ch); *(int *)CMSG_DATA(&ch.header) = sockets[1]; sendmsg(ipvi->ofd, &mh, 0); dummy = (fd == -1) ? ' ' : 'F'; *(int *)CMSG_DATA(&ch.header) = sockets[1]; sendmsg(sockets[0], &mh, 0); close(sockets[1]); if (fd != -1) { *(int *)CMSG_DATA(&ch.header) = fd; sendmsg(sockets[0], &mh, 0); close(fd); } ipviwin->ifd = sockets[0]; ipviwin->ofd = sockets[0]; } #define IPVISET(func) \ ipviwin->func = vi_##func; IPVISET(c_bol); IPVISET(c_bottom); IPVISET(c_del); IPVISET(c_eol); IPVISET(c_insert); IPVISET(c_left); IPVISET(c_right); IPVISET(c_top); IPVISET(c_settop); IPVISET(resize); IPVISET(string); IPVISET(quit); IPVISET(wq); IPVISET(input); /* IPVISET(close); */ ipviwin->close = vi_win_close; IPVISET(set_ops); *ipviwinp = ipviwin; return 0; alloc_err: return 1; } static int vi_set_ops(IPVIWIN *ipvi, IPSIOPS *ops) { ipvi->si_ops = ops; return 0; } static int vi_close(IPVI *ipvi) { memset(ipvi, 6, sizeof(IPVI)); free(ipvi); return 0; } static int vi_win_close(IPVIWIN *ipviwin) { memset(ipviwin, 6, sizeof(IPVIWIN)); free(ipviwin); return 0; } static int vi_send_(IPVIWIN *ipvi, int code) { IP_BUF ipb; ipb.code = code; return vi_send(ipvi->ofd, NULL, &ipb); } static int vi_send_1(IPVIWIN *ipvi, int code, u_int32_t val) { IP_BUF ipb; ipb.code = code; ipb.val1 = val; return vi_send(ipvi->ofd, "1", &ipb); } static int vi_send_12(IPVIWIN *ipvi, int code, u_int32_t val1, u_int32_t val2) { IP_BUF ipb; ipb.val1 = val1; ipb.val2 = val2; ipb.code = code; return vi_send(ipvi->ofd, "12", &ipb); } static int vi_send_a(IPVIWIN *ipvi, int code, const char *str, u_int32_t len) { IP_BUF ipb; ipb.str1 = str; ipb.len1 = len; ipb.code = code; return vi_send(ipvi->ofd, "a", &ipb); } static int vi_send_a1(IPVIWIN *ipvi, int code, const char *str, u_int32_t len, u_int32_t val) { IP_BUF ipb; ipb.str1 = str; ipb.len1 = len; ipb.val1 = val; ipb.code = code; return vi_send(ipvi->ofd, "a1", &ipb); } static int vi_send_ab1(IPVIWIN *ipvi, int code, const char *str1, u_int32_t len1, const char *str2, u_int32_t len2, u_int32_t val) { IP_BUF ipb; ipb.str1 = str1; ipb.len1 = len1; ipb.str2 = str2; ipb.len2 = len2; ipb.val1 = val; ipb.code = code; return vi_send(ipvi->ofd, "ab1", &ipb); } nvi-1.81.6/ipc/vipc.awk0100644000076400001440000000016010720065506013667 0ustar skimousers# @(#)vipc.awk 10.1 (Berkeley) 6/8/95 /^\/\* VI_[0-9A-Z_]*/ { printf("#define %s %d\n", $2, ++cnt); next; } nvi-1.81.6/ipc/ipc_def.h0100444000076400001440000000242210720065712013764 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ #define SI_ADDSTR 1 #define SI_ATTRIBUTE 2 #define SI_BELL 3 #define SI_BUSY_OFF 4 #define SI_BUSY_ON 5 #define SI_CLRTOEOL 6 #define SI_DELETELN 7 #define SI_DISCARD 8 #define SI_EDITOPT 9 #define SI_INSERTLN 10 #define SI_MOVE 11 #define SI_QUIT 12 #define SI_REDRAW 13 #define SI_REFRESH 14 #define SI_RENAME 15 #define SI_REPLY 16 #define SI_REWRITE 17 #define SI_SCROLLBAR 18 #define SI_SELECT 19 #define SI_SPLIT 20 #define SI_WADDSTR 21 #define SI_EVENT_SUP 22 #define VI_C_BOL 1 #define VI_C_BOTTOM 2 #define VI_C_DEL 3 #define VI_C_DOWN 4 #define VI_C_EOL 5 #define VI_C_INSERT 6 #define VI_C_LEFT 7 #define VI_C_PGDOWN 8 #define VI_C_PGUP 9 #define VI_C_RIGHT 10 #define VI_C_SEARCH 11 #define VI_C_SETTOP 12 #define VI_C_TOP 13 #define VI_C_UP 14 #define VI_EDIT 15 #define VI_EDITOPT 16 #define VI_EDITSPLIT 17 #define VI_EOF 18 #define VI_ERR 19 #define VI_FLAGS 20 #define VI_INTERRUPT 21 #define VI_MOUSE_MOVE 22 #define VI_QUIT 23 #define VI_RESIZE 24 #define VI_SEL_END 25 #define VI_SEL_START 26 #define VI_SIGHUP 27 #define VI_SIGTERM 28 #define VI_STRING 29 #define VI_TAG 30 #define VI_TAGAS 31 #define VI_TAGSPLIT 32 #define VI_UNDO 33 #define VI_WQ 34 #define VI_WRITE 35 #define VI_WRITEAS 36 #define VI_EVENT_SUP 37 nvi-1.81.6/ipc/ipc_gen.c0100444000076400001440000000672510720065712014004 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ static int vi_c_bol(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_BOL); } static int vi_c_bottom(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_BOTTOM); } static int vi_c_del(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_DEL); } static int vi_c_down(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_C_DOWN, val1); } static int vi_c_eol(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_EOL); } static int vi_c_insert(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_INSERT); } static int vi_c_left(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_LEFT); } static int vi_c_pgdown(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_C_PGDOWN, val1); } static int vi_c_pgup(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_C_PGUP, val1); } static int vi_c_right(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_RIGHT); } static int vi_c_search(IPVIWIN *ipvi, const char *stra, u_int32_t lena, u_int32_t val1) { return vi_send_a1(ipvi, VI_C_SEARCH, stra, lena, val1); } static int vi_c_settop(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_C_SETTOP, val1); } static int vi_c_top(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_C_TOP); } static int vi_c_up(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_C_UP, val1); } static int vi_edit(IPVIWIN *ipvi, const char *stra, u_int32_t lena) { return vi_send_a(ipvi, VI_EDIT, stra, lena); } static int vi_editopt(IPVIWIN *ipvi, const char *stra, u_int32_t lena, const char *strb, u_int32_t lenb, u_int32_t val1) { return vi_send_ab1(ipvi, VI_EDITOPT, stra, lena, strb, lenb, val1); } static int vi_editsplit(IPVIWIN *ipvi, const char *stra, u_int32_t lena) { return vi_send_a(ipvi, VI_EDITSPLIT, stra, lena); } static int vi_eof(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_EOF); } static int vi_err(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_ERR); } static int vi_flags(IPVIWIN *ipvi, u_int32_t val1) { return vi_send_1(ipvi, VI_FLAGS, val1); } static int vi_interrupt(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_INTERRUPT); } static int vi_mouse_move(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2) { return vi_send_12(ipvi, VI_MOUSE_MOVE, val1, val2); } static int vi_quit(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_QUIT); } static int vi_resize(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2) { return vi_send_12(ipvi, VI_RESIZE, val1, val2); } static int vi_sel_end(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2) { return vi_send_12(ipvi, VI_SEL_END, val1, val2); } static int vi_sel_start(IPVIWIN *ipvi, u_int32_t val1, u_int32_t val2) { return vi_send_12(ipvi, VI_SEL_START, val1, val2); } static int vi_sighup(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_SIGHUP); } static int vi_sigterm(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_SIGTERM); } static int vi_string(IPVIWIN *ipvi, const char *stra, u_int32_t lena) { return vi_send_a(ipvi, VI_STRING, stra, lena); } static int vi_tag(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_TAG); } static int vi_tagas(IPVIWIN *ipvi, const char *stra, u_int32_t lena) { return vi_send_a(ipvi, VI_TAGAS, stra, lena); } static int vi_tagsplit(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_TAGSPLIT); } static int vi_undo(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_UNDO); } static int vi_wq(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_WQ); } static int vi_write(IPVIWIN *ipvi) { return vi_send_(ipvi, VI_WRITE); } static int vi_writeas(IPVIWIN *ipvi, const char *stra, u_int32_t lena) { return vi_send_a(ipvi, VI_WRITEAS, stra, lena); } nvi-1.81.6/ipc/extern.h0100444000076400001440000000051010720065712013674 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int vi_run __P((IPVI *, int, char *[])); int vi_send __P((int, char *, IP_BUF *)); int vi_input __P((IPVIWIN *, int)); int vi_wsend __P((IPVIWIN*, char *, IP_BUF *)); int vi_translate __P((IPVIWIN *, char *, size_t *, IP_BUF *)); int vi_create __P((IPVI **, u_int32_t)); nvi-1.81.6/motif/0040755000076400001440000000000010720065712012572 5ustar skimousersnvi-1.81.6/motif/m_cde.c0100644000076400001440000000614410720065506014010 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_cde.c,v 8.11 2003/11/05 17:09:58 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:58 $"; #endif /* not lint */ #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "extern.h" #if SelfTest #define _TRACE( x ) printf x #else #define _TRACE( x ) #endif #define Required 10 #define Useful 3 #define Present (Required+Useful) static struct { char *name; int value; } Atoms[] = { { "_VUE_SM_WINDOW_INFO", Required, /* "vue" */ }, { "_DT_SM_WINDOW_INFO", Required, /* "dtwm" */ }, { "_SUN_WM_PROTOCOLS", Useful, /* "olwm" */ }, { "_MOTIF_WM_INFO", Useful, /* "mwm/dtwm" */ }, }; /* * is_cde -- * * When running under CDE (or VUE on HPUX) applications should not define * fallback colors (or fonts). The only way to tell is to check the atoms * attached to the server. This routine does that. * * PUBLIC: int is_cde __P((Display *)); */ int is_cde(Display *d) { int i, r, format; unsigned long nitems, remaining; unsigned char *prop; Window root = DefaultRootWindow( d ); Atom atom, type; int retval = 0; _TRACE( ( "Root window is 0x%x\n", root ) ); /* create our atoms */ for (i=0; i< (sizeof(Atoms)/sizeof(Atoms[0])); i++ ) { atom = XInternAtom( d, Atoms[i].name, True ); if ( atom == None ) { _TRACE( ( "Atom \"%s\" does not exist\n", Atoms[i].name ) ); continue; } /* what is the value of the atom? */ r = XGetWindowProperty( d, root, atom, 0, 1024, False, /* do not delete */ AnyPropertyType, /* request type */ &type, /* actual type */ &format, /* byte size */ &nitems, /* number of items */ &remaining, /* anything left over? */ &prop /* the data itself */ ); if ( r != Success ) { _TRACE( ( "Atom \"%s\" cannot be converted to string\n", Atoms[i].name ) ); continue; } retval += Atoms[i].value; #if SelfTest _TRACE( ( "Atom \"%s\"\n", Atoms[i].name ) ); switch ( type ) { case 0: _TRACE( ( "\t does not exist on the root window\n", Atoms[i].name ) ); case XA_ATOM: for (j=0; j= Present; } #if SelfTest main () { Display *d = XOpenDisplay( 0 ); if ( d == 0 ) printf ( "Could not open display\n" ); else { printf ( "_vi_is_cde() == %d\n", _vi_is_cde( d ) ); XCloseDisplay( d ); } } #endif nvi-1.81.6/motif/m_main.c0100644000076400001440000002327610720065506014206 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_main.c,v 8.40 2003/11/05 17:09:58 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:58 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "../motif_l/m_motif.h" #include "../motif_l/vi_mextern.h" #include "extern.h" int vi_ifd = -1; int vi_ofd = -1; IPVIWIN *ipvi_motif; #if XtSpecificationRelease == 4 #define ArgcType Cardinal * #else #define ArgcType int * #endif #if defined(ColorIcon) #if XT_REVISION >= 6 #include #else #include "xpm.h" #endif #include "nvi.xpm" /* Icon pixmap. */ #else #include "nvi.xbm" /* Icon bitmap. */ #endif static pid_t pid; static Pixel icon_fg, icon_bg; static Pixmap icon_pm; static Widget top_level; static XtAppContext ctx; static void XutInstallColormap __P((String, Widget)); static void XutSetIcon __P((Widget, int, int, Pixmap)); static void onchld __P((int)); static void onexit __P((void)); #if ! defined(ColorIcon) static XutResource resource[] = { { "iconForeground", XutRKpixel, &icon_fg }, { "iconBackground", XutRKpixel, &icon_bg }, }; #endif /* resources for the vi widgets unless the user overrides them */ String fallback_rsrcs[] = { "*font: -*-*-*-r-*--14-*-*-*-m-*-*-*", "*text*fontList: -*-*-*-r-*--14-*-*-*-m-*-*-*", "*Menu*fontList: -*-helvetica-bold-r-normal--14-*-*-*-*-*-*-*", "*fontList: -*-helvetica-medium-r-normal--14-*-*-*-*-*-*-*", "*pointerShape: xterm", "*busyShape: watch", "*iconName: vi", #if ! defined(ColorIcon) /* coloring for the icons */ "*iconForeground: XtDefaultForeground", "*iconBackground: XtDefaultBackground", #endif /* layout for the tag stack dialog */ "*Tags*visibleItemCount: 5", /* for the text ruler */ "*rulerFont: -*-helvetica-medium-r-normal--14-*-*-*-*-*-*-*", "*rulerBorder: 5", /* layout for the new, temporary preferences page */ "*toggleOptions.numColumns: 6", /* also used by Find */ "*Preferences*tabWidthPercentage: 0", "*Preferences*tabs.shadowThickness: 2", "*Preferences*tabs.font: -*-helvetica-bold-r-normal--14-*-*-*-*-*-*-*", /* --------------------------------------------------------------------- * * anything below this point is only defined when we are not running CDE * * --------------------------------------------------------------------- */ /* Do not define default colors when running under CDE * (e.g. VUE on HPUX). The result is that you don't look * like a normal desktop application */ "?background: gray75", "?screen.background: wheat", "?highlightColor: red", "?Preferences*options.background: gray90", }; #if defined(__STDC__) static String *get_fallback_rsrcs( String name ) #else static String *get_fallback_rsrcs( name ) String name; #endif { String *copy = (String *) malloc( (1+XtNumber(fallback_rsrcs))*sizeof(String) ); int i, running_cde; Display *d; /* connect to server and see if the CDE atoms are present */ d = XOpenDisplay(0); running_cde = is_cde( d ); XCloseDisplay(d); for ( i=0; irun(ipvi, argc, argv); ipvi->new_window(ipvi,&ipvi_motif,-1); ipvi_motif->set_ops(ipvi_motif, &ipsi_ops_motif); /* Run vi: the parent returns, the child is the vi process. */ vi_ifd = ipvi_motif->ifd; vi_ofd = ipvi_motif->ofd; pid = ipvi->pid; /* Tell X that we are interested in input on the pipe. */ XtAppAddInput(ctx, vi_ifd, (XtPointer)XtInputReadMask, vi_input_func, NULL); /* Main loop. */ XtAppMainLoop(ctx); /* NOTREACHED */ abort(); } static void XutSetIcon(Widget wid, int height, int width, Pixmap p) { Display *display = XtDisplay(wid); Window win; /* best bet is to set the icon window */ XtVaGetValues( wid, XtNiconWindow, &win, 0 ); if ( win == None ) { win = XCreateSimpleWindow( display, RootWindow( display, DefaultScreen( display ) ), 0, 0, width, height, 0, CopyFromParent, CopyFromParent ); } if ( win != None ) { XtVaSetValues( wid, XtNiconWindow, win, 0 ); XSetWindowBackgroundPixmap( display, win, p ); } else { /* do it the old fashioned way */ XtVaSetValues( wid, XtNiconPixmap, p, 0 ); } } /* Support for multiple colormaps * * XutInstallColormap( String name, Widget wid ) * The first time called, this routine checks to see if the * resource "name*installColormap" is "True". If so, the * widget is assigned a newly allocated colormap. * * Subsequent calls ignore the "name" parameter and use the * same colormap. * * Future versions of this routine may handle multiple colormaps * by name. */ static enum { cmap_look, cmap_use, cmap_ignore } cmap_state = cmap_look; static Boolean use_colormap = False; static XutResource colormap_resources[] = { { "installColormap", XutRKboolean, &use_colormap } }; static void XutInstallColormap(String name, Widget wid) { static Colormap cmap = 0; static Display *cmap_display = 0; Display *display = XtDisplay(wid); /* what is the current finite state? */ if ( cmap_state == cmap_look ) { /* what does the resource say? */ __XutConvertResources( wid, name, colormap_resources, XtNumber(colormap_resources) ); /* was the result "True"? */ if ( ! use_colormap ) { cmap_state = cmap_ignore; return; } /* yes it was */ cmap_state = cmap_use; cmap_display = display; cmap = XCopyColormapAndFree( display, DefaultColormap( display, DefaultScreen( display ) ) ); } /* use the private colormap? */ if ( cmap_state == cmap_use ) { XtVaSetValues( wid, XtNcolormap, cmap, 0 ); } } /* * onchld -- * Handle SIGCHLD. */ static void onchld(int signo) { /* If the vi process goes away, we exit as well. */ if (kill(pid, 0)) vi_fatal_message(top_level, "The vi process died. Exiting."); } /* * onexit -- * Function called when the editor "quits". */ static void onexit(void) { exit (0); } nvi-1.81.6/motif/nvi.xbm0100644000076400001440000000353010720065506014075 0ustar skimousers#define nvi_width 48 #define nvi_height 48 static unsigned char nvi_bits[] = { 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xab, 0x55, 0x55, 0x55, 0x55, 0x15, 0x56, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 0xac, 0x55, 0x55, 0x55, 0x55, 0x05, 0x5c, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 0xac, 0x55, 0x55, 0x55, 0x55, 0x05, 0x5c, 0xaa, 0xaa, 0xaa, 0xaa, 0x0a, 0xac, 0x55, 0x55, 0x55, 0x55, 0x15, 0x57, 0xaa, 0xaa, 0xaa, 0xaa, 0xea, 0xab, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xff, 0x57, 0x55, 0xff, 0xfd, 0x5f, 0x82, 0xab, 0xaa, 0xea, 0x2a, 0xae, 0x85, 0x55, 0x55, 0x65, 0x15, 0x56, 0x82, 0xab, 0xaa, 0xf2, 0x2a, 0xae, 0x05, 0x57, 0x55, 0x75, 0x15, 0x56, 0x0a, 0xab, 0xaa, 0xb2, 0x2a, 0xae, 0x05, 0x57, 0x55, 0x79, 0x15, 0x56, 0x0a, 0xae, 0xaa, 0xba, 0x2a, 0xae, 0x15, 0x56, 0x55, 0x59, 0x15, 0x56, 0x0a, 0xae, 0xaa, 0xbc, 0x2a, 0xae, 0x15, 0x5c, 0x55, 0x5d, 0x15, 0x56, 0x2a, 0xac, 0xaa, 0xac, 0x2a, 0xae, 0x15, 0x5c, 0x55, 0x5e, 0x15, 0x56, 0x2a, 0xb8, 0xaa, 0xae, 0x2a, 0xae, 0x55, 0x58, 0x55, 0x56, 0x15, 0x56, 0x2a, 0xb8, 0x2a, 0xaf, 0x2a, 0xae, 0x55, 0x70, 0x55, 0x57, 0x15, 0x56, 0xaa, 0xb0, 0x2a, 0xab, 0x2a, 0xae, 0x55, 0x70, 0x95, 0x57, 0x15, 0x56, 0xaa, 0xe0, 0xaa, 0xab, 0x2a, 0xae, 0x55, 0x61, 0x95, 0x55, 0x15, 0x56, 0xaa, 0xe0, 0xca, 0xab, 0x2a, 0xae, 0x55, 0xc1, 0xd5, 0x55, 0x15, 0x56, 0xaa, 0xc2, 0xca, 0xaa, 0x2a, 0xae, 0x55, 0xc1, 0xe5, 0x55, 0x15, 0x56, 0xaa, 0x82, 0xeb, 0xaa, 0x2a, 0xae, 0x55, 0x85, 0x65, 0x55, 0x15, 0x56, 0xaa, 0x82, 0xf3, 0xaa, 0x2a, 0xae, 0x55, 0x05, 0x77, 0x55, 0x15, 0x56, 0xaa, 0x0a, 0xb3, 0xaa, 0x2a, 0xae, 0x55, 0x05, 0x79, 0x55, 0x15, 0x56, 0xaa, 0x0a, 0xba, 0xaa, 0x2a, 0xae, 0x55, 0x15, 0x58, 0x55, 0x15, 0x56, 0xaa, 0x0a, 0xac, 0xaa, 0x2a, 0xae, 0x55, 0xf5, 0x5f, 0x55, 0xfd, 0x5f, 0xaa, 0xea, 0xaf, 0xaa, 0xfa, 0xaf}; nvi-1.81.6/motif/nvi.xpm0100644000076400001440000000513510720065506014116 0ustar skimousers/* XPM */ static char * nvi_xpm[] = { "48 48 5 1", " c #000000000000", ". c #FFFF00000000", "X c #FFFFFFFF0000", "o c #00000000FFFF", "O c #FFFFFFFFFFFF", " ....XXXXoXXXXXXXXXXXXXXXXXXXXXXXX", " ...XXXooXXXXXXXXXXXXXXXXXoXXXXXXX", " ....XXXooXXXoo.ooooXXXXXXXXoXXXXXX", " ...XXXo. oooo..oooooooXXXXXooXXXXX", " ....XXXo.. o....o.. . ooXXXXooXXXXX", " ...XXXXo. o..OO...OO . ooXXo..oXXXX", " ....XXXXo ...OOO.oOOOO...ooo. .oXXXX", " ...XXXXXXo... O.O OOo... . . oXXXX", " ....XXXXXXXo. O O. O Oo . . . oXXXXX", " ...XXXXXXXXX. O Oo O Oo. . . oXXXXXX", " ....XXXXXXXXXoo o.o Oo . . oXXXXXXX", " ...XX XXXXXXo..oo..o Oo.. . oXXXXXXXX", " ....XXX XXo.. o....ooo . . oXXXXXXXXX", " ...XXXXX Xo. .o.. o ... . .oXXXXXXXXX", " ....XXXXXXX Xo. .ooo ... . .ooXXXXXXXXX", " ...XX XX XXoo .. . o . .ooXXXXXXXXXX", " ....XXXX O XX XXXoo .oo . .ooXXXXXXXXXXX", " ...XXXXX XXXXXooo. . ooXXXXXXXXXXXXX", " ....XXXXXXXXX ooXXXooooooXXXXXXXXXXXXXX", " ...XXX X XXX X ..oo. . ..ooXXXXXXXXXXXX", " ....XXXX XX XXXo.. ..... .oooXXXXXXXXXXX", " ...XXXXXXX XXXXo o. ooo .o.ooXXXXXXXXXXX", " ....XXXXXXXXXXXXXXXo.. .o..ooo oooXXXXXXXXXX", " ...XXXXXXXXXXXXXXXXXo .o.o. . ..ooXXXXXXXXXX", " ....XXXXXXXXXXXXXXXXXXooo.. . . .ooXXXXXXXXXX", " ...XXXXXXXXXXXXXXXXXXXXo . . . .oooXXXXXXXXXX", " ....XXXXXXXXXXXXXXXXXXXXoooo . .o.oXXXXXXXXXXX", " ...XXXXXXXXXXXXXXXXXXXXXo.. oooo. ooXXXXXXXXXX", " ....XXXXXXXXXXXXXXXXXXXXXo... . . .ooXXXXXXXXXX", " ...XXXXXXXXXXXXXXXXXXXXXXo...... . . oXXXXXXXXX", ".....XXXXXXXXXXXXXXXXXXXXXXo . . . . .ooXXXXXXXX", " ......XXXXXXXXXXXXXXXXXXXXo. . . . . oooXXXXXXX", " ......XXXXXXXXXXXXXXXXXXo o o o ooooXXXXX", " ......XXXXXXXXXXXXXX .O..O.O.. o . ooXXXX", " ......XXXXXXXXXXooO O .... OoX o oooXX", " ......XXXXXXXo O O O O .. ..oXXXo .ooX", " ......XXXXXoO O O O O ooXXXXX .o ", " ......XXXXooooo O O OOooXXXXXXXX o ", " ......XXXXXXXoooooooXXXXXoXXXXX.o", " ......XXXXXXXXXXXXXXooooXXXXXo.", " ......XXXXXXXXXXoo...oXXXoo. ", " ......XXXXX o.o o o.ooo . o", " ......XXXXXXXXXooooo o oX", " ......XXXXXXXXXXXXXXXXX", " ......XXXXXXXXXXXXXXX", " ......XXXXXXXXXXXXX", " ......XXXXXXXXXXX", " ......XXXXXXXXX"}; nvi-1.81.6/motif/extern.h0100444000076400001440000000012610720065712014242 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int is_cde __P((Display *)); nvi-1.81.6/motif_l/0040755000076400001440000000000010720065712013105 5ustar skimousersnvi-1.81.6/motif_l/TODO0100644000076400001440000000645710720065506013607 0ustar skimousersTop priority would be the mouse. We need to get cut&paste working. (Including extend beyond the visible screen. I believe I'm sending the correct mouse events for that, but I haven't tested it.) =-=-=-= Find a tool to convert the reference doc to html, and just point a browser at it for the help screen. Have "novice", "fast lookup" and an "everything" version. =-=-=-= Disassociate scrollbar actions from the cursor, i.e. when you scroll the screen moves but the cursor doesn't. >> However, it seems to me that the cursor should disappear from >> the screen as soon as it's no longer positioned on a line that's >> on the screen. Does that make sense? And, if so, how do we >> make that happen? > > I'd add a message: > IPO_DISPLAY_CARET( boolean ) > since the caret is also used for the current drawing position, we > really can't move it 'off the screen'. =-=-=-= >> BTW, this may be a bug, I can't seem to erase characters in the >> colon command line. > > It's a bug that I reported earlier. Core is not (correctly) reading the > tty options for the terminal. Since we have not bound magic > characters (VI_BACKSPACE) to BackSpace and Delete keys, the > editing here is counter-intuitive. I'd guess that you use > Delete for Tty Erase. Try ^H in the colon line and see what happens. =-=-=-= Implement a "word search" button for the search dialog -- it's not trivial, the ex/ex_subst.c/re_compile() routine is going to have to allocate memory for the pattern which isn't going to make it happy. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /* TODO List: * scrollbars Need protocol messages that tell us what to display * in the scrollbars. Suggestion: * scrollbar( bottom, lines, home ) * bottom is $ * lines is lines shown in the window * (takes wrap into account) * home is the line number ot the top visible line * * On the way back send scroll( top ) * * User should be able to enable/disable bar display * * horizontal scrollbar * * expose_func * insert/delete When we have a partially obscured window, we only * refresh a single line after scrolling. I believe this * is due to the exposure events all showing up after * the scrolling is completed (pipe_input_func does all * of the scrolling and then we get back to XtMainLoop) * * split Ought to be able to put a title on each pane * Need protocol messages to shift focus * * bell user settable visible bell * * busy don't understand the protocol * * mouse need to send IPO_MOVE_CARET( row, column ) * (note that screen code does not know about tabs or * line wraps) * Connect to window manager cut buffer * need to send IPO_EXTEND_SELECT( r1, c1, r2, c1 ) * otherwise core and screen duplicate selection logic * Need to determine correct screen for event. Not * needed until split is implemented. * * arrow keys need to define a protocol. I can easily send * the vt100 sequences (and currently do). * In general, we need to define what special keys * do (for example PageUp) and what happens when we * are in Insert mode. * * Suggestion: IPO_COMMAND( string ). vi core can * take it as a command even when in insert mode. * * icon Is currently B&W. To get a color icon, would * require a lot of work or that bostic pick up * the xpm library. */ nvi-1.81.6/motif_l/m_copypaste.c0100644000076400001440000001160610720065506015576 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_copypaste.c,v 8.10 2003/11/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:59 $"; #endif /* not lint */ /* ICCCM Cut and paste Utilities: */ #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" typedef int (*PFI)(); static PFI icccm_paste, icccm_copy, icccm_clear, icccm_error; /* * InitCopyPaste -- * * PUBLIC: void __vi_InitCopyPaste * PUBLIC: __P((int (*)(), int (*)(), int (*)(), int (*)())); */ void __vi_InitCopyPaste(PFI f_copy, PFI f_paste, PFI f_clear, PFI f_error) { icccm_paste = f_paste; icccm_clear = f_clear; icccm_copy = f_copy; icccm_error = f_error; } #if defined(__STDC__) static void peekProc( Widget widget, void *data, Atom *selection, Atom *type, void *value, unsigned long *length, int *format ) #else static void peekProc( widget, data, selection, type, value, length, format ) Widget widget; void *data; Atom *selection, *type; void *value; unsigned long *length; int *format; #endif { if ( *type == 0 ) (*icccm_error)( stderr, "Nothing in the primary selection buffer"); else if ( *type != XA_STRING ) (*icccm_error)( stderr, "Unknown type return from selection"); else XtFree( value ); } #if 0 #if defined(__STDC__) void _vi_AcquireClipboard( Widget wid ) #else void _vi_AcquireClipboard( wid ) Widget wid; #endif { XtGetSelectionValue( wid, XA_PRIMARY, XA_STRING, (XtSelectionCallbackProc) peekProc, NULL, XtLastTimestampProcessed( XtDisplay(wid) ) ); } #endif #if defined(__STDC__) static void loseProc( Widget widget ) #else static void loseProc( widget ) Widget widget; #endif { /* we have lost ownership of the selection. clear it */ (*icccm_clear)( widget ); /* also participate in the protocols */ XtDisownSelection( widget, XA_PRIMARY, XtLastTimestampProcessed( XtDisplay(widget) ) ); } #if defined(__STDC__) static int convertProc( Widget widget, Atom *selection, Atom *target, Atom *type, void **value, int *length, int *format ) #else static int convertProc( widget, selection, target, type, value, length, format ) Widget widget; Atom *selection, *target, *type; void **value; int *length; int *format; #endif { String buffer; int len; /* someone wants a copy of the selection. is there one? */ (*icccm_copy)( &buffer, &len ); if ( len == 0 ) return False; /* do they want the string? */ if ( *target == XA_STRING ) { *length = len; *value = (void *) XtMalloc( len ); *type = XA_STRING; *format = 8; memcpy( (char *) *value, buffer, *length ); return True; } /* do they want the length? */ if ( *target == XInternAtom( XtDisplay(widget), "LENGTH", FALSE) ) { *length = 1; *value = (void *) XtMalloc( sizeof(int) ); *type = *target; *format = 32; * ((int *) *value) = len; return True; } /* we lose */ return False; } /* * __vi_AcquirePrimary -- * * PUBLIC: void __vi_AcquirePrimary __P((Widget)); */ void __vi_AcquirePrimary(Widget widget) { /* assert we own the primary selection */ XtOwnSelection( widget, XA_PRIMARY, XtLastTimestampProcessed( XtDisplay(widget) ), (XtConvertSelectionProc) convertProc, (XtLoseSelectionProc) loseProc, NULL ); #if defined(OPENLOOK) /* assert we also own the clipboard */ XtOwnSelection( widget, XA_CLIPBOARD( XtDisplay(widget) ), XtLastTimestampProcessed( XtDisplay(widget) ), convertProc, loseProc, NULL ); #endif } #if defined(__STDC__) static void gotProc( Widget widget, void *data, Atom *selection, Atom *type, void *value, unsigned long *length, int *format ) #else static void gotProc( widget, data, selection, type, value, length, format ) Widget widget; void *data; Atom *selection, *type; void *value; unsigned long *length; int *format; #endif { if ( *type == 0 ) (*icccm_error)( stderr, "Nothing in the primary selection buffer"); else if ( *type != XA_STRING ) (*icccm_error)( stderr, "Unknown type return from selection"); else { (*icccm_paste)( widget, value, *length ); XtFree( value ); } } /* * __vi_PasteFromClipboard -- * * PUBLIC: void __vi_PasteFromClipboard __P((Widget)); */ void __vi_PasteFromClipboard(Widget widget) { XtGetSelectionValue( widget, XA_PRIMARY, XA_STRING, (XtSelectionCallbackProc) gotProc, NULL, XtLastTimestampProcessed( XtDisplay(widget) ) ); } nvi-1.81.6/motif_l/m_func.c0100644000076400001440000001764510720065506014533 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_func.c,v 8.28 2003/11/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:59 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" static int vi_addstr(int ipvi, char *str1, u_int32_t len1) { #ifdef TRACE vtrace("addstr() {%.*s}\n", ipbp->len1, ipbp->str1); #endif /* Add to backing store. */ memcpy(CharAt(__vi_screen, __vi_screen->cury, __vi_screen->curx), str1, len1); memset(FlagAt(__vi_screen, __vi_screen->cury, __vi_screen->curx), __vi_screen->color, len1); /* Draw from backing store. */ __vi_draw_text(__vi_screen, __vi_screen->cury, __vi_screen->curx, len1); /* Advance the caret. */ __vi_move_caret(__vi_screen, __vi_screen->cury, __vi_screen->curx + len1); return (0); } static int vi_attribute(int ipvi, u_int32_t val1, u_int32_t val2) { switch (val1) { case SA_ALTERNATE: /* XXX: Nothing. */ break; case SA_INVERSE: __vi_screen->color = val2; break; } return (0); } static int vi_bell(int ipvi) { /* * XXX * Future... implement visible bell. */ XBell(XtDisplay(__vi_screen->area), 0); return (0); } static int vi_busyon(int ipvi, char *str1, u_int32_t len1) { __vi_set_cursor(__vi_screen, 1); return (0); } static int vi_busyoff(int ipvi) { __vi_set_cursor(__vi_screen, 0); return (0); } static int vi_clrtoeol(int ipvi) { int len; char *ptr; len = __vi_screen->cols - __vi_screen->curx; ptr = CharAt(__vi_screen, __vi_screen->cury, __vi_screen->curx); /* Clear backing store. */ memset(ptr, ' ', len); memset(FlagAt(__vi_screen, __vi_screen->cury, __vi_screen->curx), COLOR_STANDARD, len); /* Draw from backing store. */ __vi_draw_text(__vi_screen, __vi_screen->cury, __vi_screen->curx, len); return (0); } static int vi_deleteln(int ipvi) { int y, rows, len, height, width; y = __vi_screen->cury; rows = __vi_screen->rows - (y+1); len = __vi_screen->cols * rows; /* Don't want to copy the caret! */ __vi_erase_caret(__vi_screen); /* Adjust backing store and the flags. */ memmove(CharAt(__vi_screen, y, 0), CharAt(__vi_screen, y+1, 0), len); memmove(FlagAt(__vi_screen, y, 0), FlagAt(__vi_screen, y+1, 0), len); /* Move the bits on the screen. */ width = __vi_screen->ch_width * __vi_screen->cols; height = __vi_screen->ch_height * rows; XCopyArea(XtDisplay(__vi_screen->area), /* display */ XtWindow(__vi_screen->area), /* src */ XtWindow(__vi_screen->area), /* dest */ __vi_copy_gc, /* context */ 0, YTOP(__vi_screen, y+1), /* srcx, srcy */ width, height, 0, YTOP(__vi_screen, y) /* dstx, dsty */ ); /* Need to let X take over. */ XmUpdateDisplay(__vi_screen->area); return (0); } static int vi_discard(int ipvi) { /* XXX: Nothing. */ return (0); } static int vi_insertln(int ipvi) { int y, rows, height, width; char *from, *to; y = __vi_screen->cury; rows = __vi_screen->rows - (1+y); from = CharAt(__vi_screen, y, 0), to = CharAt(__vi_screen, y+1, 0); /* Don't want to copy the caret! */ __vi_erase_caret(__vi_screen); /* Adjust backing store. */ memmove(to, from, __vi_screen->cols * rows); memset(from, ' ', __vi_screen->cols); /* And the backing store. */ from = FlagAt(__vi_screen, y, 0), to = FlagAt(__vi_screen, y+1, 0); memmove(to, from, __vi_screen->cols * rows); memset(from, COLOR_STANDARD, __vi_screen->cols); /* Move the bits on the screen. */ width = __vi_screen->ch_width * __vi_screen->cols; height = __vi_screen->ch_height * rows; XCopyArea(XtDisplay(__vi_screen->area), /* display */ XtWindow(__vi_screen->area), /* src */ XtWindow(__vi_screen->area), /* dest */ __vi_copy_gc, /* context */ 0, YTOP(__vi_screen, y), /* srcx, srcy */ width, height, 0, YTOP(__vi_screen, y+1) /* dstx, dsty */ ); /* clear out the new space */ XClearArea(XtDisplay(__vi_screen->area), /* display */ XtWindow(__vi_screen->area), /* window */ 0, YTOP(__vi_screen, y), /* srcx, srcy */ 0, __vi_screen->ch_height, /* w=full, height */ True /* no exposures */ ); /* Need to let X take over. */ XmUpdateDisplay(__vi_screen->area); return (0); } static int vi_move(int ipvi, u_int32_t val1, u_int32_t val2) { __vi_move_caret(__vi_screen, val1, val2); return (0); } static int vi_redraw(int ipvi) { __vi_expose_func(0, __vi_screen, 0); return (0); } static int vi_refresh(int ipvi) { /* probably ok to scroll again */ __vi_clear_scroll_block(); /* if the tag stack widget is active, set the text field there * to agree with the current caret position. * Note that this really ought to be done by core due to wrapping issues */ __vi_set_word_at_caret( __vi_screen ); /* similarly, the text ruler... */ __vi_set_text_ruler( __vi_screen->cury, __vi_screen->curx ); return (0); } static int vi_quit(int ipvi) { if (__vi_exitp != NULL) __vi_exitp(); return (0); } static int vi_rename(int ipvi, char *str1, u_int32_t len1) { Widget shell; size_t len; const char *tail, *p; /* For the icon, use the tail. */ for (p = str1, len = len1; len > 1; ++p, --len) if (p[0] == '/') tail = p + 1; /* * XXX * Future: Attach a title to each screen. For now, we change * the title of the shell. */ shell = __vi_screen->area; while ( ! XtIsShell(shell) ) shell = XtParent(shell); XtVaSetValues(shell, XmNiconName, tail, XmNtitle, str1, 0 ); return (0); } static int vi_rewrite(int ipvi, u_int32_t val1) { /* XXX: Nothing. */ return (0); } static int vi_scrollbar(int ipvi, u_int32_t val1, u_int32_t val2, u_int32_t val3) { int top, size, maximum, old_max; /* in the buffer, * val1 contains the top visible line number * val2 contains the number of visible lines * val3 contains the number of lines in the file */ top = val1; size = val2; maximum = val3; #if 0 fprintf( stderr, "Setting scrollbar\n" ); fprintf( stderr, "\tvalue\t\t%d\n", top ); fprintf( stderr, "\tsize\t\t%d\n", size ); fprintf( stderr, "\tmaximum\t\t%d\n", maximum ); #endif /* armor plating. core thinks there are no lines in an * empty file, but says we are on line 1 */ if ( top >= maximum ) { #if 0 fprintf( stderr, "Correcting for top >= maximum\n" ); #endif maximum = top + 1; size = 1; } /* armor plating. core may think there are more * lines visible than remain in the file */ if ( top+size >= maximum ) { #if 0 fprintf( stderr, "Correcting for top+size >= maximum\n" ); #endif size = maximum - top; } /* need to increase the maximum before changing the values */ XtVaGetValues( __vi_screen->scroll, XmNmaximum, &old_max, 0 ); if ( maximum > old_max ) XtVaSetValues( __vi_screen->scroll, XmNmaximum, maximum, 0 ); /* change the rest of the values without generating a callback */ XmScrollBarSetValues( __vi_screen->scroll, top, size, 1, /* increment */ size, /* page_increment */ False /* do not notify me */ ); /* need to decrease the maximum after changing the values */ if ( maximum < old_max ) XtVaSetValues( __vi_screen->scroll, XmNmaximum, maximum, 0 ); /* done */ return (0); } static int vi_select(int ipvi, char *str1, u_int32_t len1) { /* XXX: Nothing. */ return (0); } static int vi_split(int ipvi) { /* XXX: Nothing. */ return (0); } IPSIOPS ipsi_ops_motif = { vi_addstr, vi_attribute, vi_bell, vi_busyoff, vi_busyon, vi_clrtoeol, vi_deleteln, vi_discard, __vi_editopt, vi_insertln, vi_move, vi_quit, vi_redraw, vi_refresh, vi_rename, vi_rewrite, vi_scrollbar, vi_select, vi_split, vi_addstr, }; nvi-1.81.6/motif_l/m_menu.c0100644000076400001440000002725710720065506014544 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_menu.c,v 8.26 2003/11/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:59 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" extern int vi_ofd; /* save this for creation of children */ static Widget main_widget = NULL; /* This module defines the menu structure for vi. Each menu * item has an action routine associated with it. For the most * part, those actions will simply call vi_send with vi commands. * others will pop up file selection dialogs and use them for * vi commands, and other will have to have special actions. * * Future: * vi core will have to let us know when to be sensitive * change VI_STRING to VI_COMMAND so that menu actions cannot * be confusing when in insert mode * need VI_CUT, VI_COPY, and VI_PASTE to perform the appropriate * operations on the visible text of yank buffer. VI_COPY * is likely a NOP, but it will make users happy * add mnemonics * add accelerators * implement file selection dialog boxes * implement string prompt dialog boxes (e.g. for 'find') * * Interface: * Widget create_menubar( Widget parent ) creates and returns the * X menu structure. The caller can place this * anywhere in the widget heirarchy. */ #define BufferSize 1024 /* * __vi_send_command_string -- * Utility: Send a menu command to vi * * Future: * Change VI_STRING to VI_COMMAND so that menu actions cannot be confusing * when in insert mode. * * XXX * THIS SHOULD GO AWAY -- WE SHOULDN'T SEND UNINTERPRETED STRINGS TO THE * CORE. * * PUBLIC: void __vi_send_command_string __P((String)); */ void __vi_send_command_string(String str) { IP_BUF ipb; char buffer[BufferSize]; /* Future: Need VI_COMMAND so vi knows this is not text to insert * At that point, appending a cr/lf will not be necessary. For now, * append iff we are a colon or slash command. Of course, if we are in * insert mode, all bets are off. */ strcpy( buffer, str ); switch ( *str ) { case ':': case '/': strcat( buffer, "\n" ); break; } ipb.code = VI_STRING; ipb.str1 = buffer; ipb.len1 = strlen(buffer); vi_send(vi_ofd, "a", &ipb); } /* Utility: beep for unimplemented command */ #if defined(__STDC__) static void send_beep( Widget w ) #else static void send_beep( w ) Widget w; #endif { XBell( XtDisplay(w), 0 ); } /* * __vi_cancel_cb -- * Utility: make a dialog box go Modal * * PUBLIC: void __vi_cancel_cb __P((Widget, XtPointer, XtPointer)); */ static Bool have_answer; void __vi_cancel_cb(Widget w, XtPointer client_data, XtPointer call_data) { have_answer = True; } /* * PUBLIC: void __vi_modal_dialog __P((Widget)); */ void __vi_modal_dialog(Widget db) { XtAppContext ctx; /* post the dialog */ XtManageChild( db ); XtPopup( XtParent(db), XtGrabExclusive ); /* wait for a response */ ctx = XtWidgetToApplicationContext(db); XtAddGrab( XtParent(db), TRUE, FALSE ); for ( have_answer = False; ! have_answer; ) XtAppProcessEvent( ctx, XtIMAll ); /* done with db */ XtPopdown( XtParent(db) ); XtRemoveGrab( XtParent(db) ); } /* Utility: Get a file (using standard File Selection Dialog Box) */ static String file_name; #if defined(__STDC__) static void ok_file_name( Widget w, XtPointer client_data, XtPointer call_data ) #else static void ok_file_name( w, client_data, call_data ) Widget w; XtPointer client_data; XtPointer call_data; #endif { XmFileSelectionBoxCallbackStruct *cbs; cbs = (XmFileSelectionBoxCallbackStruct *) call_data; XmStringGetLtoR( cbs->value, XmSTRING_DEFAULT_CHARSET, &file_name ); have_answer = True; } #if defined(__STDC__) static String get_file( Widget w, String prompt ) #else static String get_file( w, prompt ) Widget w; String prompt; #endif { /* make it static so we can reuse it */ static Widget db; /* our return parameter */ if ( file_name != NULL ) { XtFree( file_name ); file_name = NULL; } /* create one? */ if ( db == NULL ){ db = XmCreateFileSelectionDialog( main_widget, "file", NULL, 0 ); XtAddCallback( db, XmNokCallback, ok_file_name, NULL ); XtAddCallback( db, XmNcancelCallback, __vi_cancel_cb, NULL ); } /* use the title as a prompt */ XtVaSetValues( XtParent(db), XmNtitle, prompt, 0 ); /* wait for a response */ __vi_modal_dialog( db ); /* done */ return file_name; } /* * file_command -- * Get a file name and send it with the command to the core. */ static void file_command(Widget w, int code, String prompt) { IP_BUF ipb; char *file; if ((file = get_file(w, prompt)) != NULL) { ipb.code = code; ipb.str1 = file; ipb.len1 = strlen(file); vi_send(vi_ofd, "a", &ipb); } } /* * Menu action routines (one per menu entry) * * These are in the order in which they appear in the menu structure. */ static void ma_edit_file(Widget w, XtPointer call_data, XtPointer client_data) { file_command(w, VI_EDIT, "Edit"); } static void ma_split(Widget w, XtPointer call_data, XtPointer client_data) { file_command(w, VI_EDITSPLIT, "Edit"); } static void ma_save(Widget w, XtPointer call_data, XtPointer client_data) { IP_BUF ipb; ipb.code = VI_WRITE; (void)vi_send(vi_ofd, NULL, &ipb); } static void ma_save_as(Widget w, XtPointer call_data, XtPointer client_data) { file_command(w, VI_WRITEAS, "Save As"); } static void ma_wq(Widget w, XtPointer call_data, XtPointer client_data) { IP_BUF ipb; ipb.code = VI_WQ; (void)vi_send(vi_ofd, NULL, &ipb); } static void ma_quit(Widget w, XtPointer call_data, XtPointer client_data) { IP_BUF ipb; ipb.code = VI_QUIT; (void)vi_send(vi_ofd, NULL, &ipb); } static void ma_undo(Widget w, XtPointer call_data, XtPointer client_data) { IP_BUF ipb; ipb.code = VI_UNDO; (void)vi_send(vi_ofd, NULL, &ipb); } #if defined(__STDC__) static void ma_cut( Widget w, XtPointer call_data, XtPointer client_data ) #else static void ma_cut( w, call_data, client_data ) Widget w; XtPointer call_data; XtPointer client_data; #endif { /* future */ send_beep( w ); } #if defined(__STDC__) static void ma_copy( Widget w, XtPointer call_data, XtPointer client_data ) #else static void ma_copy( w, call_data, client_data ) Widget w; XtPointer call_data; XtPointer client_data; #endif { /* future */ send_beep( w ); } #if defined(__STDC__) static void ma_paste( Widget w, XtPointer call_data, XtPointer client_data ) #else static void ma_paste( w, call_data, client_data ) Widget w; XtPointer call_data; XtPointer client_data; #endif { /* future */ send_beep( w ); } static void ma_find(Widget w, XtPointer call_data, XtPointer client_data) { __vi_show_search_dialog( main_widget, "Find" ); } static void ma_find_next(Widget w, XtPointer call_data, XtPointer client_data) { __vi_search( w ); } static void ma_tags(Widget w, XtPointer call_data, XtPointer client_data) { __vi_show_tags_dialog( main_widget, "Tag Stack" ); } static void ma_tagpop(Widget w, XtPointer call_data, XtPointer client_data) { __vi_send_command_string( "\024" ); } static void ma_tagtop(Widget w, XtPointer call_data, XtPointer client_data) { __vi_send_command_string( ":tagtop" ); } #if defined(__STDC__) static void ma_preferences( Widget w, XtPointer call_data, XtPointer client_data ) #else static void ma_preferences( w, call_data, client_data ) Widget w; XtPointer call_data; XtPointer client_data; #endif { __vi_show_options_dialog( main_widget, "Preferences" ); } /* Menu construction routines */ typedef struct { String title; void (*action)(); String accel; /* for Motif */ String accel_text; /* for the user */ } pull_down; typedef struct { char mnemonic; String title; pull_down *actions; } menu_bar; static pull_down file_menu[] = { { "Edit File...", ma_edit_file, "Alte", "Alt+E" }, { "", NULL, NULL, NULL }, { "Split Window...", ma_split, NULL, NULL }, { "", NULL, NULL, NULL }, { "Save ", ma_save, "Alts", "Alt+S" }, { "Save As...", ma_save_as, "Shift Alts", "Shift+Alt+S" }, { "", NULL, NULL, NULL }, { "Write and Quit", ma_wq, "Shift Altq", "Shift+Alt+Q" }, { "Quit", ma_quit, "Altq", "Alt+Q" }, { NULL, NULL, NULL, NULL }, }; static pull_down edit_menu[] = { { "Undo", ma_undo, NULL, NULL }, { "", NULL, NULL, NULL }, { "Cut", ma_cut, "Altx", "Alt+X" }, { "Copy", ma_copy, "Altc", "Alt+C" }, { "Paste", ma_paste, "Altv", "Alt+V" }, { "", NULL, NULL, NULL }, { "Find", ma_find, "Altf", "Alt+F" }, { "Find Next", ma_find_next, "Altg", "Alt+G" }, { NULL, NULL, NULL, NULL }, }; static pull_down options_menu[] = { { "Preferences", ma_preferences, NULL, NULL }, { "Command Mode Maps", NULL, NULL, NULL }, { "Insert Mode Maps", NULL, NULL, NULL }, { NULL, NULL, NULL, NULL }, }; static pull_down tag_menu[] = { { "Show Tag Stack", ma_tags, "Altt", "Alt+T" }, { "", NULL, NULL, NULL }, { "Pop Tag", ma_tagpop, NULL, NULL }, { "Clear Stack", ma_tagtop, NULL, NULL }, { NULL, NULL, NULL, NULL }, }; static pull_down help_menu[] = { { NULL, NULL, NULL, NULL }, }; static menu_bar main_menu[] = { { 'F', "File", file_menu }, { 'E', "Edit", edit_menu }, { 'O', "Options", options_menu }, { 'T', "Tag", tag_menu }, { 'H', "Help", help_menu }, { 0, NULL, NULL }, }; #if defined(__STDC__) static void add_entries( Widget parent, pull_down *actions ) #else static void add_entries( parent, actions ) Widget parent; pull_down *actions; #endif { Widget w; XmString str; for ( ; actions->title != NULL; actions++ ) { /* a separator? */ if ( *actions->title != '\0' ) { w = XmCreatePushButton( parent, actions->title, NULL, 0 ); if ( actions->action == NULL ) XtSetSensitive( w, False ); else XtAddCallback( w, XmNactivateCallback, (XtCallbackProc) actions->action, actions ); if ( actions->accel != NULL ) { str = XmStringCreateSimple( actions->accel_text ); XtVaSetValues( w, XmNaccelerator, actions->accel, XmNacceleratorText, str, 0 ); XmStringFree( str ); } } else { w = XmCreateSeparator( parent, "separator", NULL, 0 ); } XtManageChild( w ); } } /* * vi_create_menubar -- * * PUBLIC: Widget vi_create_menubar __P((Widget)); */ Widget vi_create_menubar(Widget parent) { Widget menu, pull, button; menu_bar *ptr; /* save this for creation of children */ main_widget = parent; menu = XmCreateMenuBar( parent, "Menu", NULL, 0 ); for ( ptr=main_menu; ptr->title != NULL; ptr++ ) { pull = XmCreatePulldownMenu( menu, "pull", NULL, 0 ); add_entries( pull, ptr->actions ); button = XmCreateCascadeButton( menu, ptr->title, NULL, 0 ); XtVaSetValues( button, XmNsubMenuId, pull, 0 ); if ( strcmp( ptr->title, "Help" ) == 0 ) XtVaSetValues( menu, XmNmenuHelpWidget, button, 0 ); #if 0 /* These screw up accelerator processing. Punt for now */ if ( ptr->mnemonic ) XtVaSetValues( button, XmNmnemonic, ptr->mnemonic, 0 ); #endif XtManageChild( button ); } return menu; } nvi-1.81.6/motif_l/m_motif.h0100644000076400001440000000552510720065506014715 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * "$Id: m_motif.h,v 8.11 1996/12/20 10:26:59 bostic Exp $ (Berkeley) $Date: 1996/12/20 10:26:59 $"; */ /* * Color support */ #define COLOR_INVALID 0xff /* force color change */ /* * These are color indices. When vi passes color info, we can do 2..0x3f * in the 8 bits I've allocated. */ #define COLOR_STANDARD 0x00 /* standard video */ #define COLOR_INVERSE 0x01 /* reverse video */ /* These are flag bits, they override the above colors. */ #define COLOR_CARET 0x80 /* draw the caret */ #define COLOR_SELECT 0x40 /* draw the selection */ #define ToRowCol( scr, lin, r, c ) \ r = (lin) / scr->cols; \ c = ((lin) - r * (scr->cols)) % scr->cols; #define Linear( scr, y, x ) \ ( (y) * scr->cols + (x) ) #define CharAt( scr, y, x ) \ ( scr->characters + Linear( scr, y, x ) ) #define FlagAt( scr, y, x ) \ ( scr->flags + Linear( scr, y, x ) ) #define XPOS( scr, x ) \ scr->ch_width * (x) #define YTOP( scr, y ) \ scr->ch_height * (y) #define YPOS( scr, y ) \ YTOP( scr, ((y)+1) ) - scr->ch_descent #define ROW( scr, y ) \ ( (y) / scr->ch_height ) #define COLUMN( scr, x ) \ ( (x) / scr->ch_width ) /* Describes a single 'screen' implemented in X widgetry. */ typedef struct { Widget parent, /* the pane */ area, /* text goes here */ form, /* holds text and scrollbar */ scroll; /* not connected yet */ Region clip; int color; int rows, cols; int ch_width, ch_height, ch_descent; int curx, cury; char *characters; char *flags; Boolean init; } xvi_screen; /* Option type. */ typedef enum { optToggle, optInteger, optString, optFile, optTerminator } optKind; /* Option entry. */ typedef struct { optKind kind; /* Option type. */ String name; /* Option name. */ void *value; /* Current option value. */ u_int flags; /* Associated flags. */ } optData; /* Option page. */ typedef struct { String name; String description; Widget holder; optData *toggles; optData *ints; optData *others; } optSheet; /* Utilities for converting X resources... * * __XutConvertResources( Widget, String root, XutResource *, int count ) * The resource block is loaded with converted values * If the X resource does not exist, no change is made to the value * 'root' should be the application name. */ typedef enum { XutRKinteger, XutRKboolean, XutRKpixel, XutRKpixelBackup, /* if XutRKpixel fails */ XutRKfont, XutRKcursor } XutResourceKind; typedef struct { String name; XutResourceKind kind; void *value; } XutResource; /* Internal use: */ extern GC __vi_copy_gc; extern void (*__vi_exitp) __P((void)); extern xvi_screen *__vi_screen; #include "extern.h" nvi-1.81.6/motif_l/m_options.c0100644000076400001440000004065710720065506015272 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_options.c,v 8.22 2003/11/05 17:09:59 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:09:59 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" extern int vi_ofd; static void set_opt __P((Widget, XtPointer, XtPointer)); /* constants */ #if defined(SelfTest) /* in production, get these from the resource list */ #define toggleColumns 6 #endif /* * global data */ static Widget preferences = NULL; static optData display[] = { { optToggle, "comment", }, { optToggle, "flash", }, { optToggle, "leftright", }, { optToggle, "list", }, { optToggle, "number", }, { optToggle, "octal", }, { optToggle, "ruler", }, { optToggle, "showmode", }, { optToggle, "slowopen", }, { optToggle, "verbose", }, { optToggle, "windowname", }, { optTerminator, }, }, display_int[] = { { optInteger, "report", }, { optInteger, "scroll", }, { optInteger, "shiftwidth", }, { optInteger, "sidescroll", }, { optInteger, "tabstop", }, { optInteger, "window", }, { optTerminator, }, }, display_str[] = { { optString, "noprint", }, { optString, "print", }, { optTerminator, }, }, files[] = { { optToggle, "autowrite", }, { optToggle, "lock", }, { optToggle, "readonly", }, { optToggle, "writeany", }, { optTerminator, }, }, files_str[] = { { optString, "backup", }, { optString, "path", }, { optTerminator, }, }, general[] = { { optToggle, "exrc", }, { optToggle, "lisp", }, { optToggle, "modeline", }, { optToggle, "sourceany", }, { optToggle, "tildeop", }, { optTerminator, }, }, general_int[] = { { optInteger, "taglength", }, { optTerminator, }, }, general_str[] = { { optString, "cdpath", }, { optString, "directory", }, { optString, "msgcat", }, { optString, "recdir", }, { optString, "shell", }, { optString, "shellmeta", }, { optString, "tags", }, { optTerminator, }, }, input[] = { { optToggle, "altwerase", }, { optToggle, "autoindent", }, { optToggle, "remap", }, { optToggle, "showmatch", }, { optToggle, "ttywerase", }, { optTerminator, }, }, input_int[] = { { optInteger, "escapetime", }, { optInteger, "keytime", }, { optInteger, "matchtime", }, { optInteger, "timeout", }, { optInteger, "wraplen", }, { optInteger, "wrapmargin", }, { optTerminator, }, }, input_str[] = { { optString, "cedit", }, { optString, "filec", }, { optTerminator, }, }, search[] = { { optToggle, "extended", }, { optToggle, "iclower", }, { optToggle, "ignorecase", }, { optToggle, "magic", }, { optToggle, "searchincr", }, { optToggle, "wrapscan", }, { optTerminator, }, }, search_str[] = { { optString, "paragraphs", }, { optString, "sections", }, { optTerminator, }, }; /* ********* NOTE *********** * Sheet 0 will always be shown first. It does not matter to the Xt code * which sheet that is, so it ought to be the one users interact with most. * Best guess is that's general editor options, but it might be Search/re. * ********* NOTE *********** */ static optSheet sheets[] = { { "Display", "These options control how text is displayed on the screen", NULL, display, display_int, display_str, }, { "Files", "These options control how the editor handles files", NULL, files, NULL, files_str, }, { "Input", "These options control text input behavior", NULL, input, input_int, input_str, }, { "Search/RE", "These options control searching and Regular Expression behavior", NULL, search, NULL, search_str, }, { "Editor", "These options control general editor configuration", NULL, general, general_int, general_str, }, }; /* callbacks */ #if defined(SelfTest) void __vi_cancel_cb() { puts( "cancelled" ); } #endif static void destroyed(void) { int i; puts( "destroyed" ); /* some window managers destroy us upon popdown */ for (i=0; itype == UnmapNotify ) { #if defined(SelfTest) puts( "unmapped" ); #endif XtPopdown( XtParent( preferences ) ); } } /* * __vi_editopt -- * Set an edit option based on a core message. * * PUBLIC: int __vi_editopt __P((IPVI *, const char *, u_int32_t, const char *, u_int32_t, u_int32_t)); */ int __vi_editopt(IPVI *ipvi, const char *str1, u_int32_t len1, const char *str2, u_int32_t len2, u_int32_t val1) { optData *opt; #undef NSEARCH #define NSEARCH(list) { \ for (opt = list; opt->kind != optTerminator; ++opt) \ if (!strcmp(opt->name, str1)) \ goto found; \ } NSEARCH(display); NSEARCH(display_int); NSEARCH(display_str); NSEARCH(files); NSEARCH(files_str); NSEARCH(general); NSEARCH(general_int); NSEARCH(general_str); NSEARCH(input); NSEARCH(input_int); NSEARCH(input_str); NSEARCH(search); NSEARCH(search_str); return (0); found: switch (opt->kind) { case optToggle: opt->value = (void *)val1; break; case optInteger: if (opt->value != NULL) free(opt->value); if ((opt->value = malloc(8)) != NULL) (void)snprintf(opt->value, 8, "%lu", (u_long)val1); break; case optString: case optFile: if (opt->value != NULL) free(opt->value); if ((opt->value = malloc(len2)) != NULL) memcpy(opt->value, str2, len2); break; case optTerminator: abort(); } return (0); } /* * set_opt -- * Send a set-edit-option message to core. */ static void set_opt(Widget w, XtPointer closure, XtPointer call_data) { optData *opt; Boolean set; IP_BUF ipb; String str; extern IPVI ipvi_motif; opt = closure; ipb.code = VI_EDITOPT; ipb.str1 = opt->name; ipb.len1 = strlen(opt->name); switch (opt->kind) { case optToggle: XtVaGetValues(w, XmNset, &set, 0); ipb.val1 = set; ipb.len2 = 0; vi_wsend(&ipvi_motif, "ab1", &ipb); if (ipb.val1) { opt->value = (void *)!set; /* * RAZ: * How do we turn off the button? We don't want to * go recursive where we set it and it calls set_opt * to tell the core. Is that possible? */ XtVaSetValues(w, XmNset, &set, 0); break; } if (strcmp(opt->name, "ruler") == 0) if (set) __vi_show_text_ruler_dialog( __vi_screen->area, "Ruler"); else __vi_clear_text_ruler_dialog(); break; case optInteger: str = XmTextFieldGetString(w); ipb.val1 = atoi(str); ipb.len2 = 0; vi_send(vi_ofd, "ab1", &ipb); break; case optFile: case optString: ipb.str2 = XmTextFieldGetString(w); ipb.len2 = strlen(ipb.str2); vi_send(vi_ofd, "ab1", &ipb); break; case optTerminator: abort(); } } /* add toggles to the property sheet */ #if defined(__STDC__) static void add_toggle( Widget parent, optData *option ) #else static void add_toggle( parent, option ) Widget parent; optData *option; #endif { Widget w; w = XtVaCreateManagedWidget( option->name, xmToggleButtonGadgetClass, parent, XmNset, (Boolean) option->value, 0 ); XtAddCallback( w, XmNvalueChangedCallback, set_opt, option ); } static Widget create_toggles(Widget outer, optData *toggles) { Widget inner; int i; inner = XtVaCreateWidget( "toggleOptions", xmRowColumnWidgetClass, outer, XmNpacking, XmPACK_COLUMN, XmNnumColumns, 4, XmNtopAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, 0 ); /* first the booleans */ for (i=0; toggles[i].kind != optTerminator; i++) { add_toggle( inner, &toggles[i] ); } XtManageChild( inner ); return inner; } /* draw text fields and their labels */ #if defined(__STDC__) static void add_string_options( Widget parent, optData *options ) #else static void add_string_options( parent, options ) Widget parent; optData *options; #endif { int i; Widget f, w; for ( i=0; options[i].kind != optTerminator; i++ ) { f = XtVaCreateWidget( "form", xmFormWidgetClass, parent, 0 ); XtVaCreateManagedWidget( options[i].name, xmLabelGadgetClass, f, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 20, XmNalignment, XmALIGNMENT_END, 0 ); w = XtVaCreateManagedWidget( "text", xmTextFieldWidgetClass, f, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, 20, 0 ); XmTextFieldSetString( w, (char *) options[i].value ); XtAddCallback( w, XmNactivateCallback, set_opt, &options[i] ); XtManageChild( f ); } } /* draw and display a single page of properties */ #if defined(__STDC__) static Widget create_sheet( Widget parent, optSheet *sheet ) #else static Widget create_sheet( parent, sheet ) Widget parent; optSheet *sheet; #endif { Widget outer, inner, frame; Dimension height; XmString str; outer = XtVaCreateWidget( sheet->name, xmFormWidgetClass, parent, XmNtopAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNshadowType, XmSHADOW_ETCHED_IN, XmNshadowThickness, 2, XmNverticalSpacing, 4, XmNhorizontalSpacing, 4, 0 ); /* add descriptive text */ frame = XtVaCreateManagedWidget( "frame", xmFrameWidgetClass, outer, XmNtopAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, 0 ); str = XmStringCreateLtoR( sheet->description, XmSTRING_DEFAULT_CHARSET ); XtVaCreateManagedWidget( "description", xmLabelGadgetClass, frame, XmNlabelString, str, 0 ); XmStringFree( str ); /* Add the toggles. */ inner = create_toggles( outer, sheet->toggles ); XtVaSetValues( inner, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, frame, 0 ); /* the string options go here */ inner = XtVaCreateWidget( "otherOptions", xmRowColumnWidgetClass, outer, XmNpacking, XmPACK_COLUMN, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, inner, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, 0 ); /* Optionally, the ints. */ if ( sheet->ints != NULL ) add_string_options( inner, sheet->ints ); /* Optionally, the rest. */ if ( sheet->others != NULL ) add_string_options( inner, sheet->others ); XtManageChild( inner ); /* finally, force resize of the parent */ XtVaGetValues( outer, XmNheight, &height, 0 ); XtVaSetValues( parent, XmNheight, height, 0 ); return outer; } /* change preferences to another sheet */ static void change_sheet(Widget parent, int current) { static int current_sheet = -1; /* create a new one? */ if ( sheets[current].holder == NULL ) sheets[current].holder = create_sheet( parent, &sheets[current] ); /* done with the old one? */ if ( current_sheet != -1 && sheets[current_sheet].holder != NULL ) XtUnmanageChild( sheets[current_sheet].holder ); current_sheet = current; XtManageChild( sheets[current].holder ); XtManageChild( parent ); } /* Draw and display a dialog the describes vi options */ #if defined(__STDC__) static Widget create_options_dialog( Widget parent, String title ) #else static Widget create_options_dialog( parent, title ) Widget parent; String title; #endif { Widget box, form, inner; int i; char buffer[1024]; /* already built? */ if ( preferences != NULL ) return preferences; box = XtVaCreatePopupShell( title, xmDialogShellWidgetClass, parent, XmNtitle, title, XmNallowShellResize, False, 0 ); XtAddCallback( box, XmNpopdownCallback, __vi_cancel_cb, 0 ); XtAddCallback( box, XmNdestroyCallback, destroyed, 0 ); XtAddEventHandler( box, SubstructureNotifyMask, False, window_unmapped, NULL ); form = XtVaCreateWidget( "options", xmFormWidgetClass, box, 0 ); /* copy the pointers to the sheet names */ *buffer = '\0'; for (i=0; ikind != optTerminator; ++opt) \ if (!strcmp(opt->name, name)) \ return ((int)opt->value); \ } NSEARCH(display); NSEARCH(files); NSEARCH(general); NSEARCH(input); NSEARCH(search); return (0); } /* * __vi_create_search_toggles -- * Creates the search toggles. This is so the options and search widgets * share their appearance. * * PUBLIC: Widget __vi_create_search_toggles __P((Widget, optData[])); */ Widget __vi_create_search_toggles(Widget parent, optData *list) { optData *opt; /* * Copy current options information into the search table. * * XXX * This is an O(M*N) loop, but I don't think it matters. */ for (opt = list; opt->kind != optTerminator; ++opt) opt->value = (void *)__vi_toggle(opt->name); return (create_toggles(parent, list)); } #if defined(SelfTest) #if defined(__STDC__) static void show_options( Widget w, XtPointer data, XtPointer cbs ) #else static void show_options( w, data, cbs ) Widget w; XtPointer data; XtPointer cbs; #endif { __vi_show_options_dialog( data, "Preferences" ); } main( int argc, char *argv[] ) { XtAppContext ctx; Widget top_level, rc, button; extern exit(); /* create a top-level shell for the window manager */ top_level = XtVaAppInitialize( &ctx, argv[0], NULL, 0, /* options */ (ArgcType) &argc, argv, /* might get modified */ NULL, NULL ); rc = XtVaCreateManagedWidget( "rc", xmRowColumnWidgetClass, top_level, 0 ); button = XtVaCreateManagedWidget( "Pop up options dialog", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, show_options, rc ); button = XtVaCreateManagedWidget( "Quit", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, exit, 0 ); XtRealizeWidget(top_level); XtAppMainLoop(ctx); } #endif nvi-1.81.6/motif_l/m_prompt.c0100644000076400001440000000351410720065506015107 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_prompt.c,v 8.8 2003/11/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:10:00 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" void vi_fatal_message(Widget parent, String str) { Widget db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 ); XmString msg = XmStringCreateSimple( str ); XtVaSetValues( XtParent(db), XmNtitle, "Fatal", 0 ); XtVaSetValues( db, XmNmessageString, msg, 0 ); XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 ); XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) ); XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) ); __vi_modal_dialog( db ); exit(0); } void vi_info_message(Widget parent, String str) { static Widget db = NULL; XmString msg = XmStringCreateSimple( str ); if ( db == NULL ) db = XmCreateInformationDialog( parent, "Information", NULL, 0 ); XtVaSetValues( XtParent(db), XmNtitle, "Information", 0 ); XtVaSetValues( db, XmNmessageString, msg, 0 ); XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 ); XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) ); XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) ); __vi_modal_dialog( db ); } nvi-1.81.6/motif_l/m_ruler.c0100644000076400001440000001624510720065506014724 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_ruler.c,v 8.6 2003/11/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:10:00 $"; #endif /* not lint */ /* This module implements a dialog for the text ruler * * Interface: * void __vi_show_text_ruler_dialog( Widget parent, String title ) * Pops up a text ruler dialog. * We allow one per session. It is not modal. * * void __vi_clear_text_ruler_dialog( Widget parent, String title ) * Pops down the text ruler dialog. * * void __vi_set_text_ruler( int row, int col ) * Changes the displayed position */ #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" #include "vi_mextern.h" /* globals */ static Widget db_ruler = NULL; static Boolean active = False; static int ruler_border = 5, ruler_asc; static GC gc_ruler; static XFontStruct *ruler_font; static char text[256]; #if ! defined(SelfTest) static XutResource resource[] = { { "rulerFont", XutRKfont, &ruler_font }, { "rulerBorder", XutRKinteger, &ruler_border }, }; #endif /* change the displayed position */ static void set_ruler_text(int row, int col, int *h, int *w, int *asc) { int dir, des; XCharStruct over; /* format the data */ sprintf( text, "%9.d,%-9.d", row+1, col+1 ); /* how big will it be? */ XTextExtents( ruler_font, text, strlen(text), &dir, asc, &des, &over ); /* how big a window will we need? */ *h = 2*ruler_border + over.ascent + over.descent; *w = 2*ruler_border + over.width; } static void redraw_text(void) { XClearArea( XtDisplay(db_ruler), XtWindow(db_ruler), 0, 0, 0, 0, False ); XDrawString( XtDisplay(db_ruler), XtWindow(db_ruler), gc_ruler, ruler_border, ruler_border + ruler_asc, text, strlen(text) ); } /* * PUBLIC: void __vi_set_text_ruler __P((int, int)); */ void __vi_set_text_ruler(int row, int col) { int h, w; if ( ! active ) return; set_ruler_text( row, col, &h, &w, &ruler_asc ); redraw_text(); } /* callbacks */ static void cancel_cb(void) { #if defined(SelfTest) puts( "cancelled" ); #endif active = False; } static void destroyed(void) { #if defined(SelfTest) puts( "destroyed" ); #endif /* some window managers destroy us upon popdown */ db_ruler = NULL; active = False; } /* Draw and display a dialog the describes nvi options */ #if defined(__STDC__) static Widget create_text_ruler_dialog( Widget parent, String title ) #else static Widget create_text_ruler_dialog( parent, title ) Widget parent; String title; #endif { Widget box; int h, w, asc; Pixel fg, bg; /* already built? */ if ( db_ruler != NULL ) return db_ruler; #if defined(SelfTest) ruler_font = XLoadQueryFont( XtDisplay(parent), "9x15" ); #else /* check the resource database for interesting resources */ __XutConvertResources( parent, vi_progname, resource, XtNumber(resource) ); #endif gc_ruler = XCreateGC( XtDisplay(parent), XtWindow(parent), 0, NULL ); XSetFont( XtDisplay(parent), gc_ruler, ruler_font->fid ); box = XtVaCreatePopupShell( title, transientShellWidgetClass, parent, XmNallowShellResize, False, 0 ); XtAddCallback( box, XmNpopdownCallback, cancel_cb, 0 ); XtAddCallback( box, XmNdestroyCallback, destroyed, 0 ); /* should be ok to use the font now */ active = True; /* how big a window? */ set_ruler_text( 0, 0, &h, &w, &asc ); /* keep this global, we might destroy it later */ db_ruler = XtVaCreateManagedWidget( "Ruler", xmDrawingAreaWidgetClass, box, XmNheight, h, XmNwidth, w, 0 ); /* this callback is for when the drawing area is exposed */ XtAddCallback( db_ruler, XmNexposeCallback, redraw_text, 0 ); /* what colors are selected for the drawing area? */ XtVaGetValues( db_ruler, XmNbackground, &bg, XmNforeground, &fg, 0 ); XSetForeground( XtDisplay(db_ruler), gc_ruler, fg ); XSetBackground( XtDisplay(db_ruler), gc_ruler, bg ); /* done */ return db_ruler; } /* module entry point * __vi_show_text_ruler_dialog( parent, title ) * __vi_clear_text_ruler_dialog( parent, title ) */ #if defined(__STDC__) void __vi_show_text_ruler_dialog( Widget parent, String title ) #else void __vi_show_text_ruler_dialog( parent, title ) Widget parent; String title; #endif { Widget db = create_text_ruler_dialog( parent, title ), shell = XtParent(db); Dimension height, width; /* this guy does not resize */ XtVaGetValues( db, XmNheight, &height, XmNwidth, &width, 0 ); XtVaSetValues( shell, XmNmaxWidth, width, XmNminWidth, width, XmNmaxHeight, height, XmNminHeight, height, 0 ); XtManageChild( db ); /* leave this guy up */ XtPopup( shell, XtGrabNone ); active = True; /* ask vi core for the current r,c now */ #if ! defined(SelfTest) __vi_set_text_ruler( __vi_screen->cury, __vi_screen->curx ); #else __vi_set_text_ruler( rand(), rand() ); #endif } #if defined(__STDC__) void __vi_clear_text_ruler_dialog() #else void __vi_clear_text_ruler_dialog(void) #endif { if ( active ) XtPopdown( XtParent(db_ruler) ); } #if defined(SelfTest) #if XtSpecificationRelease == 4 #define ArgcType Cardinal * #else #define ArgcType int * #endif static void change_pos( Widget w ) { __vi_set_text_ruler( rand(), rand() ); } #if defined(__STDC__) static void show_text_ruler( Widget w, XtPointer data, XtPointer cbs ) #else static void show_text_ruler( w, data, cbs ) Widget w; XtPointer data; XtPointer cbs; #endif { __vi_show_text_ruler_dialog( data, "Ruler" ); } main( int argc, char *argv[] ) { XtAppContext ctx; Widget top_level, rc, button; extern exit(); /* create a top-level shell for the window manager */ top_level = XtVaAppInitialize( &ctx, argv[0], NULL, 0, /* options */ (ArgcType) &argc, argv, /* might get modified */ NULL, NULL ); rc = XtVaCreateManagedWidget( "rc", xmRowColumnWidgetClass, top_level, 0 ); button = XtVaCreateManagedWidget( "Pop up text ruler dialog", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, show_text_ruler, rc ); button = XtVaCreateManagedWidget( "Change Position", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, change_pos, rc ); button = XtVaCreateManagedWidget( "Quit", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, exit, 0 ); XtRealizeWidget(top_level); XtAppMainLoop(ctx); } #endif nvi-1.81.6/motif_l/m_search.c0100644000076400001440000003041710720065506015035 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_search.c,v 8.14 2003/11/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:10:00 $"; #endif /* not lint */ #include /* context */ #include #include #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" extern int vi_ofd; /* types */ typedef struct sds { struct sds *next; Widget shell; } save_dialog; static save_dialog *dialogs = NULL; typedef struct { String name; void (*cb)(); } ButtonData; /* globals and constants */ static String PatternWidget = "text"; static String pattern = NULL; static optData search_toggles[] = { { optToggle, "extended", NULL, VI_SEARCH_EXT }, { optToggle, "iclower", NULL, VI_SEARCH_ICL }, { optToggle, "ignorecase", NULL, VI_SEARCH_IC }, { optToggle, "literal", NULL, VI_SEARCH_LIT }, { optToggle, "searchincr", NULL, VI_SEARCH_INCR }, { optToggle, "wrapscan", NULL, VI_SEARCH_WR }, { optTerminator, }, }; static void done_func __P((Widget)); static void next_func __P((Widget)); static void prev_func __P((Widget)); static void search __P((Widget, int)); static ButtonData button_data[] = { { "Next", next_func }, { "Previous", prev_func }, { "Cancel", done_func } /* always last */ }; /* Xt utilities */ #if defined(__STDC__) static Widget get_child_widget( Widget parent, String name ) #else static Widget get_child_widget( parent, name ) Widget parent; String name; #endif { char buffer[1024]; strcpy( buffer, "*" ); strcat( buffer, name ); return XtNameToWidget( parent, buffer ); } /* sync the global state */ #if defined(__STDC__) static void get_state( Widget w ) #else static void get_state( w ) Widget w; #endif { #if defined(SelfTest) int i; #endif Widget shell = w; /* get all the data from the root of the widget tree */ while ( ! XtIsShell(shell) ) shell = XtParent(shell); #if defined(SelfTest) /* which flags? */ for (i=0; ikind != optTerminator; ++opt) if (opt->value != NULL) ipb.val1 |= opt->flags; ipb.code = VI_C_SEARCH; vi_send(vi_ofd, "a1", &ipb); } #if defined(__STDC__) static void done_func( Widget w ) #else static void done_func( w ) Widget w; #endif { save_dialog *ptr; #if defined(SelfTest) puts( XtName(w) ); #endif while ( ! XtIsShell(w) ) w = XtParent(w); XtPopdown( w ); /* save it for later */ ptr = (save_dialog *) malloc( sizeof(save_dialog) ); ptr->next = dialogs; ptr->shell = w; dialogs = ptr; } /* create a set of push buttons */ #define SpacingRatio 4 /* 3:1 button to spaces */ #if defined(__STDC__) static Widget create_push_buttons( Widget parent, ButtonData *data, int count ) #else static Widget create_push_buttons( parent, data, count ) Widget parent; ButtonData *data; int count; #endif { Widget w, form; int pos = 1, base; base = SpacingRatio*count + 1; form = XtVaCreateManagedWidget( "buttons", xmFormWidgetClass, parent, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNfractionBase, base, XmNshadowType, XmSHADOW_ETCHED_IN, XmNshadowThickness, 2, XmNverticalSpacing, 4, 0 ); while ( count-- > 0 ) { w = XtVaCreateManagedWidget(data->name, xmPushButtonGadgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment,XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, pos, XmNshowAsDefault, False, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, pos+SpacingRatio-1, 0 ); XtAddCallback( w, XmNactivateCallback, data->cb, 0 ); pos += SpacingRatio; data++; } /* last button is 'cancel' */ XtVaSetValues( XtParent(form), XmNcancelButton, w, 0 ); return form; } /* create a set of check boxes */ #if defined(SelfTest) #if defined(__STDC__) static Widget create_check_boxes( Widget parent, ToggleData *toggles, int count ) #else static Widget create_check_boxes( parent, toggles, count ) Widget parent; ToggleData *toggles; int count; #endif { Widget form; int pos = 1, base; base = SpacingRatio*count +1; form = XtVaCreateManagedWidget( "toggles", xmFormWidgetClass, parent, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNfractionBase, base, XmNverticalSpacing, 4, 0 ); while ( count-- > 0 ) { XtVaCreateManagedWidget(toggles->name, xmToggleButtonWidgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, pos, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, pos+SpacingRatio-1, 0 ); pos += SpacingRatio; ++toggles; } return form; } #endif /* Routines to handle the text field widget */ /* when the user hits 'CR' in a text widget, fire the default pushbutton */ #if defined(__STDC__) static void text_cr( Widget w, void *ptr, void *ptr2 ) #else static void text_cr( w, ptr, ptr2 ) Widget w; void *ptr; void *ptr2; #endif { next_func( w ); } #ifdef notdef /* * when the user hits any other character, if we are doing incremental * search, send the updated string to nvi * * XXX * I don't currently see any way to make this work -- incremental search * is going to be really nasty. What makes it worse is that the dialog * box almost certainly obscured a chunk of the text file, so there's no * way to use it even if it works. */ #if defined(__STDC__) static void value_changed( Widget w, void *ptr, void *ptr2 ) #else static void value_changed( w, ptr, ptr2 ) Widget w; void *ptr; void *ptr2; #endif { /* get all the data from the root of the widget tree */ get_state( w ); /* send it along? */ #if defined(SelfTest) if ( incremental_search ) send_command( w ); #else if ( __vi_incremental_search() ) send_command( w ); #endif } #endif /* notdef */ /* Draw and display a dialog the describes nvi search capability */ #if defined(__STDC__) static Widget create_search_dialog( Widget parent, String title ) #else static Widget create_search_dialog( parent, title ) Widget parent; String title; #endif { Widget box, form, label, text, checks, buttons, form2; save_dialog *ptr; /* use an existing one? */ if ( dialogs != NULL ) { box = dialogs->shell; ptr = dialogs->next; free( dialogs ); dialogs = ptr; return box; } box = XtVaCreatePopupShell( title, xmDialogShellWidgetClass, parent, XmNtitle, title, XmNallowShellResize, False, 0 ); form = XtVaCreateWidget( "form", xmFormWidgetClass, box, XmNverticalSpacing, 4, XmNhorizontalSpacing, 4, 0 ); form2 = XtVaCreateManagedWidget( "form", xmFormWidgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, 0 ); label = XtVaCreateManagedWidget( "Pattern:", xmLabelWidgetClass, form2, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment,XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, 0 ); text = XtVaCreateManagedWidget( PatternWidget, xmTextFieldWidgetClass, form2, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment,XmATTACH_FORM, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, label, XmNrightAttachment, XmATTACH_FORM, 0 ); #ifdef notdef XtAddCallback( text, XmNvalueChangedCallback, value_changed, 0 ); #endif XtAddCallback( text, XmNactivateCallback, text_cr, 0 ); buttons = create_push_buttons( form, button_data, XtNumber(button_data) ); XtVaSetValues( buttons, XmNbottomAttachment, XmATTACH_FORM, 0 ); #if defined(SelfTest) checks = create_check_boxes( form, toggle_data, XtNumber(toggle_data) ); #else checks = (Widget) __vi_create_search_toggles( form, search_toggles ); #endif XtVaSetValues( checks, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, form2, XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, buttons, 0 ); XtManageChild( form ); return box; } /* Module interface to the outside world * * xip_show_search_dialog( parent, title ) * pops up a search dialog * * xip_next_search() * simulates a 'next' assuming that a search has been done */ #if defined(__STDC__) void __vi_show_search_dialog( Widget parent, String title ) #else void __vi_show_search_dialog( parent, data, cbs ) Widget parent; String title; #endif { Widget db = create_search_dialog( parent, title ); Dimension height; /* we can handle getting taller and wider or narrower, but not shorter */ XtVaGetValues( db, XmNheight, &height, 0 ); XtVaSetValues( db, XmNmaxHeight, height, XmNminHeight, height, 0 ); /* post the dialog */ XtPopup( db, XtGrabNone ); /* request initial focus to the text widget */ XmProcessTraversal( get_child_widget( db, PatternWidget ), XmTRAVERSE_CURRENT ); } /* * __vi_search -- * * PUBLIC: void __vi_search __P((Widget)); */ void __vi_search(Widget w) { next_func( w ); } #if defined(SelfTest) #if defined(__STDC__) static void show_search( Widget w, XtPointer data, XtPointer cbs ) #else static void show_search( w, data, cbs ) Widget w; XtPointer data; XtPointer cbs; #endif { __vi_show_search_dialog( data, "Search" ); } main( int argc, char *argv[] ) { XtAppContext ctx; Widget top_level, rc, button; extern exit(); /* create a top-level shell for the window manager */ top_level = XtVaAppInitialize( &ctx, argv[0], NULL, 0, /* options */ (ArgcType) &argc, argv, /* might get modified */ NULL, NULL ); rc = XtVaCreateManagedWidget( "rc", xmRowColumnWidgetClass, top_level, 0 ); button = XtVaCreateManagedWidget( "Pop up search dialog", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, show_search, rc ); button = XtVaCreateManagedWidget( "Quit", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, exit, 0 ); XtRealizeWidget(top_level); XtAppMainLoop(ctx); } #endif nvi-1.81.6/motif_l/m_tags.c0100644000076400001440000002731010720065506014524 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_tags.c,v 8.9 2003/11/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:10:00 $"; #endif /* not lint */ /* * This module implements a dialog for navigating the tag stack * * Interface: * void __vi_show_tags_dialog( Widget parent, String title ) * Pops up a Tags dialog. We allow one per session. It is not modal. * * void __vi_push_tag( String text ) * void __vi_pop_tag() * void __vi_clear_tag() * When core changes the tag stack we will change our representation * of it. When this dialog appears, we need core to send a slew of * messages so we can display the current tag stack. * * void __vi_set_tag_text( String text ) * the text field in the dialog is set to the string. ideally, * this should be kept in sync with the word following the caret * in the current editor window * * To Do: * The push-buttons should activate and deactivate according to * the state of the tag stack and the text field. * * Need to send VI commands rather than strings * * Need IPO command to start/stop asking for the current tag stack */ /* context */ #include #include #include #include #include #include #include #include #include #if ! defined(SelfTest) #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" #endif extern int vi_ofd; /* globals */ static Widget db_tabs = NULL, db_text, db_list; static Boolean active = False; typedef struct { String name; Boolean is_default; void (*cb)(); } ButtonData; static void go_to_tag(Widget w); static void split_to_tag(Widget w); static void pop_tag(Widget w); static ButtonData button_data[] = { { "Go To Tag", True, go_to_tag }, { "Split To Tag", False, split_to_tag }, { "Pop Tag", False, pop_tag }, }; /* manage the tags stack list */ void __vi_pop_tag(void) { if ( ! active ) return; XmListDeletePos( db_list, 1 ); } void __vi_clear_tag(void) { if ( ! active ) return; XmListDeleteAllItems( db_list ); } void __vi_push_tag(String text) { XmString str; if ( ! active ) return; str = XmStringCreateSimple( text ); XmListAddItem( db_list, str, 1 ); XmStringFree( str ); } /* create a set of push buttons */ #define SpacingRatio 4 /* 3:1 button to spaces */ #if defined(__STDC__) static Widget create_push_buttons( Widget parent, ButtonData *data, int count ) #else static Widget create_push_buttons( parent, data, count ) Widget parent; ButtonData *data; int count; #endif { Widget w, form; int pos = 1, base; base = SpacingRatio*count + 1; form = XtVaCreateManagedWidget( "buttons", xmFormWidgetClass, parent, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNfractionBase, base, XmNshadowType, XmSHADOW_ETCHED_IN, XmNshadowThickness, 2, XmNverticalSpacing, 4, 0 ); while ( count-- > 0 ) { w = XtVaCreateManagedWidget(data->name, xmPushButtonGadgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment,XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, pos, XmNshowAsDefault, data->is_default, XmNdefaultButtonShadowThickness, data->is_default, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, pos+SpacingRatio-1, 0 ); if ( data->is_default ) XtVaSetValues( form, XmNdefaultButton, w, 0 ); XtAddCallback( w, XmNactivateCallback, data->cb, 0 ); pos += SpacingRatio; data++; } return form; } /* callbacks */ static void cancel_cb(void) { #if defined(SelfTest) puts( "cancelled" ); #endif active = False; } static void set_text_field(Widget w, XtPointer ptr, XmListCallbackStruct *cbs) { String str; XmStringGetLtoR( cbs->item, XmSTRING_DEFAULT_CHARSET, &str ); XmTextFieldSetString( db_text, str ); XtFree( str ); } void __vi_set_tag_text(String text) { if ( active ) XmTextFieldSetString( db_text, text ); } static void destroyed(void) { #if defined(SelfTest) puts( "destroyed" ); #endif /* some window managers destroy us upon popdown */ db_tabs = NULL; active = False; } #if defined(__STDC__) static void pop_tag( Widget w ) #else static void pop_tag( w ) Widget w; #endif { static String buffer = ":tagpop"; #if defined(SelfTest) printf( "sending command <<%s>>\n", buffer ); __vi_pop_tag(); #else __vi_send_command_string( buffer ); #endif } #if defined(__STDC__) static void split_to_tag( Widget w ) #else static void split_to_tag( w ) Widget w; #endif { IP_BUF ipb; String str; str = XmTextFieldGetString( db_text ); #if defined(SelfTest) printf( "sending command <<:Tag %s>>\n", str ); #else /* * XXX * This is REALLY sleazy. We pass the nul along with the * string so that the core editor doesn't have to copy the * string to get a nul termination. This should be fixed * as part of making the editor fully 8-bit clean. */ ipb.code = VI_TAGSPLIT; ipb.str1 = str; ipb.len1 = strlen(str) + 1; vi_send(vi_ofd, "a", &ipb); #endif XtFree( str ); } #if defined(__STDC__) static void go_to_tag( Widget w ) #else static void go_to_tag( w ) Widget w; #endif { IP_BUF ipb; String str; str = XmTextFieldGetString( db_text ); #if defined(SelfTest) printf( "sending command <<:tag %s>>\n", str ); #else /* * XXX * This is REALLY sleazy. We pass the nul along with the * string so that the core editor doesn't have to copy the * string to get a nul termination. This should be fixed * as part of making the editor fully 8-bit clean. */ ipb.code = VI_TAGAS; ipb.str1 = str; ipb.len1 = strlen(str) + 1; vi_send(vi_ofd, "a", &ipb); #endif XtFree( str ); } /* Draw and display a dialog the describes nvi options */ #if defined(__STDC__) static Widget create_tags_dialog( Widget parent, String title ) #else static Widget create_tags_dialog( parent, title ) Widget parent; String title; #endif { Widget box, form, form2, form3, buttons; /* already built? */ if ( db_tabs != NULL ) return db_tabs; box = XtVaCreatePopupShell( title, xmDialogShellWidgetClass, parent, XmNtitle, title, XmNallowShellResize, False, 0 ); XtAddCallback( box, XmNpopdownCallback, cancel_cb, 0 ); XtAddCallback( box, XmNdestroyCallback, destroyed, 0 ); form = XtVaCreateWidget( "Tags", xmFormWidgetClass, box, 0 ); buttons = create_push_buttons( form, button_data, XtNumber(button_data) ); XtVaSetValues( buttons, XmNbottomAttachment, XmATTACH_FORM, 0 ); form3 = XtVaCreateWidget( "form", xmFormWidgetClass, form, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, buttons, 0 ); form2 = XtVaCreateWidget( "form", xmFormWidgetClass, form, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, form3, 0 ); db_list = XtVaCreateManagedWidget( "list", xmListWidgetClass, form2, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, 20, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, #if defined(SelfTest) XmNvisibleItemCount, 5, #endif XmNselectionPolicy, XmSINGLE_SELECT, 0 ); XtAddCallback( db_list, XmNsingleSelectionCallback, set_text_field, 0 ); XtAddCallback( db_list, XmNdefaultActionCallback, go_to_tag, 0 ); XtVaCreateManagedWidget( "Tag Stack", xmLabelGadgetClass, form2, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 20, XmNalignment, XmALIGNMENT_END, 0 ); XtVaCreateManagedWidget( "Tag", xmLabelGadgetClass, form3, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 20, XmNalignment, XmALIGNMENT_END, 0 ); db_text = XtVaCreateManagedWidget( "text", xmTextFieldWidgetClass, form3, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_POSITION, XmNleftPosition, 20, 0 ); XtAddCallback( db_text, XmNactivateCallback, go_to_tag, 0 ); /* keep this global, we might destroy it later */ db_tabs = form; /* done */ XtManageChild( form3 ); XtManageChild( form2 ); return form; } /* module entry point * __vi_show_tags_dialog( parent, title ) */ #if defined(__STDC__) void __vi_show_tags_dialog( Widget parent, String title ) #else void __vi_show_tags_dialog( parent, title ) Widget parent; String title; #endif { Widget db = create_tags_dialog( parent, title ), shell = XtParent(db); XtManageChild( db ); /* get the current window's text */ __vi_set_tag_text( (String) __vi_get_word_at_caret( NULL ) ); /* TODO: ask vi core for the current tag stack now */ /* leave this guy up (or just raise it) */ XtPopup( shell, XtGrabNone ); XMapRaised( XtDisplay( shell ), XtWindow( shell ) ); active = True; } #if defined(SelfTest) #if XtSpecificationRelease == 4 #define ArgcType Cardinal * #else #define ArgcType int * #endif static void add_a_tag( Widget w ) { static String tags[] = { "first", "second", "this is the third" }; static int i = 0; __vi_push_tag( tags[i] ); i = (i+1) % XtNumber(tags); } #if defined(__STDC__) static void show_tags( Widget w, XtPointer data, XtPointer cbs ) #else static void show_tags( w, data, cbs ) Widget w; XtPointer data; XtPointer cbs; #endif { __vi_show_tags_dialog( data, "Tags" ); } main( int argc, char *argv[] ) { XtAppContext ctx; Widget top_level, rc, button; extern exit(); /* create a top-level shell for the window manager */ top_level = XtVaAppInitialize( &ctx, argv[0], NULL, 0, /* options */ (ArgcType) &argc, argv, /* might get modified */ NULL, NULL ); rc = XtVaCreateManagedWidget( "rc", xmRowColumnWidgetClass, top_level, 0 ); button = XtVaCreateManagedWidget( "Pop up tags dialog", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, show_tags, rc ); button = XtVaCreateManagedWidget( "Add a tag", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, add_a_tag, rc ); button = XtVaCreateManagedWidget( "Quit", xmPushButtonGadgetClass, rc, 0 ); XtAddCallback( button, XmNactivateCallback, exit, 0 ); XtRealizeWidget(top_level); XtAppMainLoop(ctx); } #endif nvi-1.81.6/motif_l/m_util.c0100644000076400001440000000667610720065506014557 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: m_util.c,v 8.12 2003/11/05 17:10:00 skimo Exp $ (Berkeley) $Date: 2003/11/05 17:10:00 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" /* Widget hierarchy routines * * void XutShowWidgetTree( FILE *fp, Widget root, int indent ) * prints the widgets and sub-widgets beneath the named root widget */ #ifdef DEBUG #if defined(__STDC__) void XutShowWidgetTree( FILE *fp, Widget root, int indent ) #else void XutShowWidgetTree( fp, root, indent ) FILE *fp; Widget root; int indent; #endif { #if ! defined(DECWINDOWS) WidgetList l, l2; int i, count = 0; /* print where we are right now */ fprintf( fp, "%*.*swidget => 0x%x name => \"%s\"\n\r", indent, indent, "", root, XtName(root) ); /* get the correct widget values */ XtVaGetValues( root, XtNchildren, &l, 0 ); XtVaGetValues( root, XtNchildren, &l2, 0 ); XtVaGetValues( root, XtNnumChildren, &count, 0 ); /* print the sub-widgets */ for ( i=0; i 0 ) { /* we may or may not have to free the children */ if ( l != l2 ) { XtFree( (char *) l ); XtFree( (char *) l2 ); } } #endif } #endif /* Utilities for converting X resources... * * __XutConvertResources( Widget, String root, XutResource *, int count ) * The resource block is loaded with converted values * If the X resource does not exist, no change is made to the value * 'root' should be the application name. * * PUBLIC: void __XutConvertResources __P((Widget, String, XutResource *, int)); */ void __XutConvertResources(Widget wid, String root, XutResource *resources, int count) { int i; XrmValue from, to; String kind; Boolean success = True; /* for each resource */ for (i=0; i #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #undef LOCK_SUCCESS #include "../common/common.h" #include "../ipc/ip.h" #include "m_motif.h" #include "vi_mextern.h" #include "pathnames.h" extern int vi_ofd; static void f_copy(String *buffer, int *len); static void f_paste(int widget, int buffer, int length); static void f_clear(Widget widget); /* * Globals and costants */ #define BufferSize 1024 static XFontStruct *font; static GC gc; GC __vi_copy_gc; static XtAppContext ctx; xvi_screen *__vi_screen = NULL; static Cursor std_cursor; static Cursor busy_cursor; static XtTranslations area_trans; static int multi_click_length; void (*__vi_exitp)(); /* Exit function. */ /* hack for drag scrolling... * I'm not sure why, but the current protocol gets out of sync when * a lot of drag messages get passed around. Likely, we need to wait * for core to finish repainting the screen before sending more drag * messages. * To that end, we set scroll_block when we receive input from the scrollbar, * and we clear it when we process the IPO_REFRESH message from core. * A specific SCROLL_COMPLETED message would be better, but this seems to work. */ static Boolean scroll_block = False; /* * PUBLIC: void __vi_set_scroll_block __P((void)); */ void __vi_set_scroll_block(void) { scroll_block = True; } /* * PUBLIC: void __vi_clear_scroll_block __P((void)); */ void __vi_clear_scroll_block(void) { scroll_block = False; } #if defined(__STDC__) static void set_gc_colors( xvi_screen *this_screen, int val ) #else static void set_gc_colors( this_screen, val ) xvi_screen *this_screen; int val; #endif { static Pixel fg, bg, hi, shade; static int prev = COLOR_INVALID; /* no change? */ if ( prev == val ) return; /* init? */ if ( gc == NULL ) { /* what colors are selected for the drawing area? */ XtVaGetValues( this_screen->area, XtNbackground, &bg, XtNforeground, &fg, XmNhighlightColor, &hi, XmNtopShadowColor, &shade, 0 ); gc = XCreateGC( XtDisplay(this_screen->area), DefaultRootWindow(XtDisplay(this_screen->area)), 0, 0 ); XSetFont( XtDisplay(this_screen->area), gc, font->fid ); } /* special colors? */ if ( val & COLOR_CARET ) { XSetForeground( XtDisplay(this_screen->area), gc, fg ); XSetBackground( XtDisplay(this_screen->area), gc, hi ); } else if ( val & COLOR_SELECT ) { XSetForeground( XtDisplay(this_screen->area), gc, fg ); XSetBackground( XtDisplay(this_screen->area), gc, shade ); } else switch (val) { case COLOR_STANDARD: XSetForeground( XtDisplay(this_screen->area), gc, fg ); XSetBackground( XtDisplay(this_screen->area), gc, bg ); break; case COLOR_INVERSE: XSetForeground( XtDisplay(this_screen->area), gc, bg ); XSetBackground( XtDisplay(this_screen->area), gc, fg ); break; default: /* implement color map later */ break; } } /* * Memory utilities */ #ifdef REALLOC #undef REALLOC #endif #define REALLOC( ptr, size ) \ ((ptr == NULL) ? malloc(size) : realloc(ptr,size)) /* X windows routines. * We currently create a single, top-level shell. In that is a * single drawing area into which we will draw text. This allows * us to put multi-color (and font, but we'll never build that) text * into the drawing area. In the future, we'll add scrollbars to the * drawing areas */ void select_start(); void select_extend(); void select_paste(); void key_press(); void insert_string(); void beep __P((Widget w)); void find(); void command(); static XtActionsRec area_actions[] = { { "select_start", select_start }, { "select_extend", select_extend }, { "select_paste", select_paste }, { "key_press", key_press }, { "insert_string", insert_string }, { "beep", beep }, { "find", find }, { "command", command }, }; char areaTrans[] = ": select_start() \n\ : select_extend() \n\ : select_paste() \n\ : select_extend() \n\ : select_extend() \n\ End: command(VI_C_BOTTOM) \n\ Escape: command(EINSERT) \n\ Find: find() \n\ Home: command(VI_C_TOP) \n\ Next: command(VI_C_PGDOWN) \n\ Prior: command(VI_C_PGUP) \n\ osfBackSpace: command(VI_C_LEFT) \n\ osfBeginLine: command(VI_C_BOL) \n\ osfCopy: beep() \n\ osfCut: beep() \n\ osfDelete: command(VI_C_DEL) \n\ osfDown: command(VI_C_DOWN) \n\ osfEndLine: command(VI_C_EOL) \n\ osfInsert: command(VI_C_INSERT) \n\ osfLeft: command(VI_C_LEFT) \n\ osfPageDown: command(VI_C_PGDOWN) \n\ osfPageUp: command(VI_C_PGUP) \n\ osfPaste: insert_string(p) \n\ osfRight: command(VI_C_RIGHT) \n\ osfUndo: command(VI_UNDO) \n\ osfUp: command(VI_C_UP) \n\ CtrlC: command(VI_INTERRUPT) \n\ : key_press()"; static XutResource resource[] = { { "font", XutRKfont, &font }, { "pointerShape", XutRKcursor, &std_cursor }, { "busyShape", XutRKcursor, &busy_cursor }, }; /* * vi_input_func -- * We've received input on the pipe from vi. * * PUBLIC: void vi_input_func __P((XtPointer, int *, XtInputId *)); */ void vi_input_func(XtPointer client_data, int *source, XtInputId *id) { /* Parse and dispatch on commands in the queue. */ (void)ipvi_motif->input(ipvi_motif, *source); #ifdef notdef /* Check the pipe for unused events when not busy. */ XtAppAddWorkProc(ctx, process_pipe_input, NULL); #endif } /* Send the window size. */ #if defined(__STDC__) static void send_resize( xvi_screen *this_screen ) #else static void send_resize( this_screen ) xvi_screen *this_screen; #endif { IP_BUF ipb; ipb.val1 = this_screen->rows; ipb.val2 = this_screen->cols; ipb.code = VI_RESIZE; #ifdef TRACE vtrace("resize_func ( %d x %d )\n", this_screen->rows, this_screen->cols); #endif /* send up the pipe */ vi_send(vi_ofd, "12", &ipb); } #if defined(__STDC__) static void resize_backing_store( xvi_screen *this_screen ) #else static void resize_backing_store( this_screen ) xvi_screen *this_screen; #endif { int total_chars = this_screen->rows * this_screen->cols; this_screen->characters = REALLOC( this_screen->characters, total_chars ); memset( this_screen->characters, ' ', total_chars ); this_screen->flags = REALLOC( this_screen->flags, total_chars ); memset( this_screen->flags, 0, total_chars ); } /* X will call this when we are resized */ #if defined(__STDC__) static void resize_func( Widget wid, XtPointer client_data, XtPointer call_data ) #else static void resize_func( wid, client_data, call_data ) Widget wid; XtPointer client_data; XtPointer call_data; #endif { xvi_screen *this_screen = (xvi_screen *) client_data; Dimension height, width; XtVaGetValues( wid, XmNheight, &height, XmNwidth, &width, 0 ); /* generate correct sizes when we have font metrics implemented */ this_screen->cols = width / this_screen->ch_width; this_screen->rows = height / this_screen->ch_height; resize_backing_store( this_screen ); send_resize( this_screen ); } /* * __vi_draw_text -- * Draw from backing store. * * PUBLIC: void __vi_draw_text __P((xvi_screen *, int, int, int)); */ void __vi_draw_text(xvi_screen *this_screen, int row, int start_col, int len) { int col, color, xpos; char *start, *end; start = CharAt( __vi_screen, row, start_col ); color = *FlagAt( __vi_screen, row, start_col ); xpos = XPOS( __vi_screen, start_col ); /* one column at a time */ for ( col=start_col; colcols && colarea), XtWindow(__vi_screen->area), gc, xpos, YPOS( __vi_screen, row ), start, end - start ); /* this is the new context */ color = *FlagAt( __vi_screen, row, col ); xpos = XPOS( __vi_screen, col ); start = end; } /* is there anything to write? */ end = CharAt( __vi_screen, row, col ); if ( end != start ) { /* yes. write in the previous color */ set_gc_colors( __vi_screen, color ); /* add to display */ XDrawImageString( XtDisplay(__vi_screen->area), XtWindow(__vi_screen->area), gc, xpos, YPOS( __vi_screen, row ), start, end - start ); } } /* set clipping rectangles accordingly */ #if defined(__STDC__) static void add_to_clip( xvi_screen *cur_screen, int x, int y, int width, int height ) #else static void add_to_clip( cur_screen, x, y, width, height ) xvi_screen *cur_screen; int x; int y; int width; int height; #endif { XRectangle rect; rect.x = x; rect.y = y; rect.height = height; rect.width = width; if ( cur_screen->clip == NULL ) cur_screen->clip = XCreateRegion(); XUnionRectWithRegion( &rect, cur_screen->clip, cur_screen->clip ); } /* * __vi_expose_func -- * Redraw the window's contents. * * NOTE: When vi wants to force a redraw, we are called with NULL widget * and call_data. * * PUBLIC: void __vi_expose_func __P((Widget, XtPointer, XtPointer)); */ void __vi_expose_func(Widget wid, XtPointer client_data, XtPointer call_data) { xvi_screen *this_screen; XmDrawingAreaCallbackStruct *cbs; XExposeEvent *xev; XGraphicsExposeEvent *gev; int row; /* convert pointers */ this_screen = (xvi_screen *) client_data; cbs = (XmDrawingAreaCallbackStruct *) call_data; /* first exposure? tell vi we are ready... */ if ( this_screen->init == False ) { /* what does the user want to see? */ __vi_set_cursor( __vi_screen, False ); /* vi wants a resize as the first event */ send_resize( __vi_screen ); /* fine for now. we'll be back */ this_screen->init = True; return; } if ( call_data == NULL ) { /* vi core calls this when it wants a full refresh */ #ifdef TRACE vtrace("expose_func: full refresh\n"); #endif XClearWindow( XtDisplay(this_screen->area), XtWindow(this_screen->area) ); } else { switch ( cbs->event->type ) { case GraphicsExpose: gev = (XGraphicsExposeEvent *) cbs->event; /* set clipping rectangles accordingly */ add_to_clip( this_screen, gev->x, gev->y, gev->width, gev->height ); /* X calls here when XCopyArea exposes new bits */ #ifdef TRACE vtrace("expose_func (X): (x=%d,y=%d,w=%d,h=%d), count=%d\n", gev->x, gev->y, gev->width, gev->height, gev->count); #endif /* more coming? do it then */ if ( gev->count > 0 ) return; /* set clipping region */ XSetRegion( XtDisplay(wid), gc, this_screen->clip ); break; case Expose: xev = (XExposeEvent *) cbs->event; /* set clipping rectangles accordingly */ add_to_clip( this_screen, xev->x, xev->y, xev->width, xev->height ); /* Motif calls here when DrawingArea is exposed */ #ifdef TRACE vtrace("expose_func (Motif): (x=%d,y=%d,w=%d,h=%d), count=%d\n", xev->x, xev->y, xev->width, xev->height, xev->count); #endif /* more coming? do it then */ if ( xev->count > 0 ) return; /* set clipping region */ XSetRegion( XtDisplay(wid), gc, this_screen->clip ); break; default: /* don't care? */ return; } } /* one row at a time */ for (row=0; rowrows; row++) { /* draw from the backing store */ __vi_draw_text( this_screen, row, 0, this_screen->cols ); } /* clear clipping region */ XSetClipMask( XtDisplay(this_screen->area), gc, None ); if ( this_screen->clip != NULL ) { XDestroyRegion( this_screen->clip ); this_screen->clip = NULL; } } #if defined(__STDC__) static void xexpose ( Widget w, XtPointer client_data, XEvent *ev, Boolean *cont ) #else static void xexpose ( w, client_data, ev, cont ) Widget w; XtPointer client_data; XEvent *ev; Boolean *cont; #endif { XmDrawingAreaCallbackStruct cbs; switch ( ev->type ) { case GraphicsExpose: cbs.event = ev; cbs.window = XtWindow(w); cbs.reason = XmCR_EXPOSE; __vi_expose_func( w, client_data, (XtPointer) &cbs ); *cont = False; /* we took care of it */ break; default: /* don't care */ break; } } /* unimplemented keystroke or command */ #if defined(__STDC__) static void beep( Widget w ) #else static void beep( w ) Widget w; #endif { XBell(XtDisplay(w),0); } /* give me a search dialog */ #if defined(__STDC__) static void find( Widget w ) #else static void find( w ) Widget w; #endif { __vi_show_search_dialog( w, "Find" ); } /* * command -- * Translate simple keyboard input into vi protocol commands. */ static void command(Widget widget, XKeyEvent *event, String *str, Cardinal *cardinal) { static struct { String name; int code; int count; } table[] = { { "VI_C_BOL", VI_C_BOL, 0 }, { "VI_C_BOTTOM", VI_C_BOTTOM, 0 }, { "VI_C_DEL", VI_C_DEL, 0 }, { "VI_C_DOWN", VI_C_DOWN, 1 }, { "VI_C_EOL", VI_C_EOL, 0 }, { "VI_C_INSERT", VI_C_INSERT, 0 }, { "VI_C_LEFT", VI_C_LEFT, 0 }, { "VI_C_PGDOWN", VI_C_PGDOWN, 1 }, { "VI_C_PGUP", VI_C_PGUP, 1 }, { "VI_C_RIGHT", VI_C_RIGHT, 0 }, { "VI_C_TOP", VI_C_TOP, 0 }, { "VI_C_UP", VI_C_UP, 1 }, { "VI_INTERRUPT", VI_INTERRUPT, 0 }, }; IP_BUF ipb; int i; /* * XXX * Do fast lookup based on character #6 -- sleazy, but I don't * want to do 10 strcmp's per keystroke. */ ipb.val1 = 1; for (i = 0; i < XtNumber(table); i++) if (table[i].name[6] == (*str)[6] && strcmp(table[i].name, *str) == 0) { ipb.code = table[i].code; vi_send(vi_ofd, table[i].count ? "1" : NULL, &ipb); return; } /* oops. */ beep(widget); } /* mouse or keyboard input. */ #if defined(__STDC__) static void insert_string( Widget widget, XKeyEvent *event, String *str, Cardinal *cardinal ) #else static void insert_string( widget, event, str, cardinal ) Widget widget; XKeyEvent *event; String *str; Cardinal *cardinal; #endif { IP_BUF ipb; ipb.len1 = strlen( *str ); if ( ipb.len1 != 0 ) { ipb.code = VI_STRING; ipb.str1 = *str; vi_send(vi_ofd, "a", &ipb); } #ifdef TRACE vtrace("insert_string {%.*s}\n", strlen( *str ), *str ); #endif } /* mouse or keyboard input. */ #if defined(__STDC__) static void key_press( Widget widget, XKeyEvent *event, String str, Cardinal *cardinal ) #else static void key_press( widget, event, str, cardinal ) Widget widget; XKeyEvent *event; String str; Cardinal *cardinal; #endif { IP_BUF ipb; char bp[BufferSize]; ipb.len1 = XLookupString( event, bp, BufferSize, NULL, NULL ); if ( ipb.len1 != 0 ) { ipb.code = VI_STRING; ipb.str1 = bp; #ifdef TRACE vtrace("key_press {%.*s}\n", ipb.len1, bp ); #endif vi_send(vi_ofd, "a", &ipb); } } #if defined(__STDC__) static void scrollbar_moved( Widget widget, XtPointer ptr, XmScrollBarCallbackStruct *cbs ) #else static void scrollbar_moved( widget, ptr, cbs ) Widget widget; XtPointer ptr; XmScrollBarCallbackStruct *cbs; #endif { /* Future: Need to scroll the correct screen! */ xvi_screen *cur_screen = (xvi_screen *) ptr; IP_BUF ipb; /* if we are still processing messages from core, skip this event * (see comments near __vi_set_scroll_block()) */ if ( scroll_block ) { return; } __vi_set_scroll_block(); #ifdef TRACE switch ( cbs->reason ) { case XmCR_VALUE_CHANGED: vtrace( "scrollbar VALUE_CHANGED %d\n", cbs->value ); break; case XmCR_DRAG: vtrace( "scrollbar DRAG %d\n", cbs->value ); break; default: vtrace( "scrollbar %d\n", cbs->value ); break; } vtrace("scrollto {%d}\n", cbs->value ); #endif /* Send the new cursor position. */ ipb.code = VI_C_SETTOP; ipb.val1 = cbs->value; (void)vi_send(vi_ofd, "1", &ipb); } #if defined(__STDC__) static xvi_screen *create_screen( Widget parent, int rows, int cols ) #else static xvi_screen *create_screen( parent, rows, cols ) Widget parent; int rows, cols; #endif { xvi_screen *new_screen = (xvi_screen *) calloc( 1, sizeof(xvi_screen) ); Widget frame; /* init... */ new_screen->color = COLOR_STANDARD; new_screen->parent = parent; /* figure out the sizes */ new_screen->rows = rows; new_screen->cols = cols; new_screen->ch_width = font->max_bounds.width; new_screen->ch_height = font->descent + font->ascent; new_screen->ch_descent = font->descent; new_screen->clip = NULL; /* allocate and init the backing stores */ resize_backing_store( new_screen ); /* set up a translation table for the X toolkit */ if ( area_trans == NULL ) area_trans = XtParseTranslationTable(areaTrans); /* future, new screen gets inserted into the parent sash * immediately after the current screen. Default Pane action is * to add it to the end */ /* use a form to hold the drawing area and the scrollbar */ new_screen->form = XtVaCreateManagedWidget( "form", xmFormWidgetClass, parent, XmNpaneMinimum, 2*new_screen->ch_height, XmNallowResize, True, NULL ); /* create a scrollbar. */ new_screen->scroll = XtVaCreateManagedWidget( "scroll", xmScrollBarWidgetClass, new_screen->form, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNminimum, 1, XmNmaximum, 2, XmNsliderSize, 1, NULL ); XtAddCallback( new_screen->scroll, XmNvalueChangedCallback, scrollbar_moved, new_screen ); XtAddCallback( new_screen->scroll, XmNdragCallback, scrollbar_moved, new_screen ); /* create a frame because they look nice */ frame = XtVaCreateManagedWidget( "frame", xmFrameWidgetClass, new_screen->form, XmNshadowType, XmSHADOW_ETCHED_IN, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_WIDGET, XmNrightWidget, new_screen->scroll, NULL ); /* create a drawing area into which we will put text */ new_screen->area = XtVaCreateManagedWidget( "screen", xmDrawingAreaWidgetClass, frame, XmNheight, new_screen->ch_height * new_screen->rows, XmNwidth, new_screen->ch_width * new_screen->cols, XmNtranslations, area_trans, XmNuserData, new_screen, XmNnavigationType, XmNONE, XmNtraversalOn, False, NULL ); /* this callback is for when the drawing area is resized */ XtAddCallback( new_screen->area, XmNresizeCallback, resize_func, new_screen ); /* this callback is for when the drawing area is exposed */ XtAddCallback( new_screen->area, XmNexposeCallback, __vi_expose_func, new_screen ); /* this callback is for when we expose obscured bits * (e.g. there is a window over part of our drawing area */ XtAddEventHandler( new_screen->area, 0, /* no standard events */ True, /* we *WANT* GraphicsExpose */ xexpose, /* what to do */ new_screen ); return new_screen; } static xvi_screen *split_screen(void) { Cardinal num; WidgetList c; int rows = __vi_screen->rows / 2; xvi_screen *new_screen; /* Note that (global) cur_screen needs to be correctly set so that * insert_here knows which screen to put the new one after */ new_screen = create_screen( __vi_screen->parent, rows, __vi_screen->cols ); /* what are the screens? */ XtVaGetValues( __vi_screen->parent, XmNnumChildren, &num, XmNchildren, &c, NULL ); /* unmanage all children in preparation for resizing */ XtUnmanageChildren( c, num ); /* force resize of the affected screens */ XtVaSetValues( new_screen->form, XmNheight, new_screen->ch_height * rows, NULL ); XtVaSetValues( __vi_screen->form, XmNheight, __vi_screen->ch_height * rows, NULL ); /* re-manage */ XtManageChildren( c, num ); /* done */ return new_screen; } /* Tell me where to insert the next subpane */ #if defined(__STDC__) static Cardinal insert_here( Widget wid ) #else static Cardinal insert_here( wid ) Widget wid; #endif { Cardinal i, num; WidgetList c; XtVaGetValues( XtParent(wid), XmNnumChildren, &num, XmNchildren, &c, NULL ); /* The default XmNinsertPosition procedure for PanedWindow * causes sashes to be inserted at the end of the list of children * and causes non-sash widgets to be inserted after other * non-sash children but before any sashes. */ if ( ! XmIsForm( wid ) ) return num; /* We will put the widget after the one with the current screen */ for (i=0; iform == c[i] ) return i+1; /* after the i-th */ } /* could not find it? this should never happen */ return num; } /* * vi_create_editor -- * Create the necessary widgetry. * * PUBLIC: Widget vi_create_editor __P((String, Widget, void (*)(void))); */ Widget vi_create_editor(String name, Widget parent, void (*exitp) (void)) { Widget pane_w; Display *display = XtDisplay( parent ); __vi_exitp = exitp; /* first time through? */ if ( ctx == NULL ) { /* save this for later */ ctx = XtWidgetToApplicationContext( parent ); /* add our own special actions */ XtAppAddActions( ctx, area_actions, XtNumber(area_actions) ); /* how long is double-click? */ multi_click_length = XtGetMultiClickTime( display ); /* check the resource database for interesting resources */ __XutConvertResources( parent, vi_progname, resource, XtNumber(resource) ); /* we need a context for moving bits around in the windows */ __vi_copy_gc = XCreateGC( display, DefaultRootWindow(display), 0, 0 ); /* routines for inter client communications conventions */ __vi_InitCopyPaste( f_copy, f_paste, f_clear, fprintf ); } /* create the paned window */ pane_w = XtVaCreateManagedWidget( "pane", xmPanedWindowWidgetClass, parent, XmNinsertPosition, insert_here, NULL ); /* allocate our data structure. in the future we will have several * screens running around at the same time */ __vi_screen = create_screen( pane_w, 24, 80 ); /* force creation of our color text context */ set_gc_colors( __vi_screen, COLOR_STANDARD ); /* done */ return pane_w; } /* These routines deal with the selection buffer */ static int selection_start, selection_end, selection_anchor; static enum select_enum { select_char, select_word, select_line } select_type = select_char; static int last_click; static char *clipboard = NULL; static int clipboard_size = 0, clipboard_length; #if defined(__STDC__) static void copy_to_clipboard( xvi_screen *cur_screen ) #else static void copy_to_clipboard( cur_screen ) xvi_screen *cur_screen; #endif { /* for now, copy from the backing store. in the future, * vi core will tell us exactly what the selection buffer contains */ clipboard_length = 1 + selection_end - selection_start; if ( clipboard == NULL ) clipboard = (char *) malloc( clipboard_length ); else if ( clipboard_size < clipboard_length ) clipboard = (char *) realloc( clipboard, clipboard_length ); memcpy( clipboard, cur_screen->characters + selection_start, clipboard_length ); } #if defined(__STDC__) static void mark_selection( xvi_screen *cur_screen, int start, int end ) #else static void mark_selection( cur_screen, start, end ) xvi_screen *cur_screen; int start; int end; #endif { int row, col, i; for ( i=start; i<=end; i++ ) { if ( !( cur_screen->flags[i] & COLOR_SELECT ) ) { cur_screen->flags[i] |= COLOR_SELECT; ToRowCol( cur_screen, i, row, col ); __vi_draw_text( cur_screen, row, col, 1 ); } } } #if defined(__STDC__) static void erase_selection( xvi_screen *cur_screen, int start, int end ) #else static void erase_selection( cur_screen, start, end ) xvi_screen *cur_screen; int start; int end; #endif { int row, col, i; for ( i=start; i<=end; i++ ) { if ( cur_screen->flags[i] & COLOR_SELECT ) { cur_screen->flags[i] &= ~COLOR_SELECT; ToRowCol( cur_screen, i, row, col ); __vi_draw_text( cur_screen, row, col, 1 ); } } } #if defined(__STDC__) static void left_expand_selection( xvi_screen *cur_screen, int *start ) #else static void left_expand_selection( cur_screen, start ) xvi_screen *cur_screen; int *start; #endif { int row, col; switch ( select_type ) { case select_word: if ( *start == 0 || isspace( cur_screen->characters[*start] ) ) return; for (;;) { if ( isspace( cur_screen->characters[*start-1] ) ) return; if ( --(*start) == 0 ) return; } case select_line: ToRowCol( cur_screen, *start, row, col ); col = 0; *start = Linear( cur_screen, row, col ); break; } } #if defined(__STDC__) static void right_expand_selection( xvi_screen *cur_screen, int *end ) #else static void right_expand_selection( cur_screen, end ) xvi_screen *cur_screen; int *end; #endif { int row, col, last = cur_screen->cols * cur_screen->rows - 1; switch ( select_type ) { case select_word: if ( *end == last || isspace( cur_screen->characters[*end] ) ) return; for (;;) { if ( isspace( cur_screen->characters[*end+1] ) ) return; if ( ++(*end) == last ) return; } case select_line: ToRowCol( cur_screen, *end, row, col ); col = cur_screen->cols -1; *end = Linear( cur_screen, row, col ); break; } } #if defined(__STDC__) static void select_start( Widget widget, XEvent *event, String str, Cardinal *cardinal ) #else static void select_start( widget, event, str, cardinal ) Widget widget; XEvent *event; String str; Cardinal *cardinal; #endif { IP_BUF ipb; int xpos, ypos; XPointerMovedEvent *ev = (XPointerMovedEvent *) event; static int last_click; /* * NOTE: when multiple panes are implemented, we need to find the correct * screen. For now, there is only one. */ xpos = COLUMN( __vi_screen, ev->x ); ypos = ROW( __vi_screen, ev->y ); /* Remove the old one. */ erase_selection( __vi_screen, selection_start, selection_end ); /* Send the new cursor position. */ ipb.code = VI_MOUSE_MOVE; ipb.val1 = ypos; ipb.val2 = xpos; (void)vi_send(vi_ofd, "12", &ipb); /* click-click, and we go for words, lines, etc */ if ( ev->time - last_click < multi_click_length ) select_type = (enum select_enum) ((((int)select_type)+1)%3); else select_type = select_char; last_click = ev->time; /* put the selection here */ selection_anchor = Linear( __vi_screen, ypos, xpos ); selection_start = selection_anchor; selection_end = selection_anchor; /* expand to include words, line, etc */ left_expand_selection( __vi_screen, &selection_start ); right_expand_selection( __vi_screen, &selection_end ); /* draw the new one */ mark_selection( __vi_screen, selection_start, selection_end ); /* and tell the window manager we own the selection */ if ( select_type != select_char ) { __vi_AcquirePrimary( widget ); copy_to_clipboard( __vi_screen ); } } #if defined(__STDC__) static void select_extend( Widget widget, XEvent *event, String str, Cardinal *cardinal ) #else static void select_extend( widget, event, str, cardinal ) Widget widget; XEvent *event; String str; Cardinal *cardinal; #endif { int xpos, ypos, pos; XPointerMovedEvent *ev = (XPointerMovedEvent *) event; /* NOTE: when multiple panes are implemented, we need to find * the correct screen. For now, there is only one. */ xpos = COLUMN( __vi_screen, ev->x ); ypos = ROW( __vi_screen, ev->y ); /* deal with words, lines, etc */ pos = Linear( __vi_screen, ypos, xpos ); if ( pos < selection_anchor ) left_expand_selection( __vi_screen, &pos ); else right_expand_selection( __vi_screen, &pos ); /* extend from before the start? */ if ( pos < selection_start ) { mark_selection( __vi_screen, pos, selection_start-1 ); selection_start = pos; } /* extend past the end? */ else if ( pos > selection_end ) { mark_selection( __vi_screen, selection_end+1, pos ); selection_end = pos; } /* between the anchor and the start? */ else if ( pos < selection_anchor ) { erase_selection( __vi_screen, selection_start, pos-1 ); selection_start = pos; } /* between the anchor and the end? */ else { erase_selection( __vi_screen, pos+1, selection_end ); selection_end = pos; } /* and tell the window manager we own the selection */ __vi_AcquirePrimary( widget ); copy_to_clipboard( __vi_screen ); } #if defined(__STDC__) static void select_paste( Widget widget, XEvent *event, String str, Cardinal *cardinal ) #else static void select_paste( widget, event, str, cardinal ) Widget widget; XEvent *event; String str; Cardinal *cardinal; #endif { __vi_PasteFromClipboard( widget ); } /* Interface to copy and paste * (a) callbacks from the window manager * f_copy - it wants our buffer * f_paste - it wants us to paste some text * f_clear - we've lost the selection, clear it */ #if defined(__STDC__) static void f_copy( String *buffer, int *len ) #else static void f_copy( buffer, len ) String *buffer; int *len; #endif { #ifdef TRACE vtrace("f_copy() called"); #endif *buffer = clipboard; *len = clipboard_length; } static void f_paste(int widget, int buffer, int length) { /* NOTE: when multiple panes are implemented, we need to find * the correct screen. For now, there is only one. */ #ifdef TRACE vtrace("f_paste() called with '%*.*s'\n", length, length, buffer); #endif } #if defined(__STDC__) static void f_clear( Widget widget ) #else static void f_clear( widget ) Widget widget; #endif { xvi_screen *cur_screen; #ifdef TRACE vtrace("f_clear() called"); #endif XtVaGetValues( widget, XmNuserData, &cur_screen, 0 ); erase_selection( cur_screen, selection_start, selection_end ); } /* * These routines deal with the cursor. * * PUBLIC: void __vi_set_cursor __P((xvi_screen *, int)); */ void __vi_set_cursor(xvi_screen *cur_screen, int is_busy) { XDefineCursor( XtDisplay(cur_screen->area), XtWindow(cur_screen->area), (is_busy) ? busy_cursor : std_cursor ); } /* hooks for the tags widget */ static String cur_word = NULL; /* * PUBLIC: void __vi_set_word_at_caret __P((xvi_screen *)); */ void __vi_set_word_at_caret(xvi_screen *this_screen) { char *start, *end, save; int newx, newy; newx = this_screen->curx; newy = this_screen->cury; /* Note that this really ought to be done by core due to wrapping issues */ for ( end = start = CharAt( this_screen, newy, newx ); (isalnum( *end ) || *end == '_') && (newx < this_screen->cols); end++, newx++ ); save = *end; *end = '\0'; if ( cur_word != NULL ) free( cur_word ); cur_word = strdup( start ); *end = save; /* if the tag stack widget is active, set the text field there * to agree with the current caret position. */ __vi_set_tag_text( cur_word ); } String __vi_get_word_at_caret(xvi_screen *this_screen) { return (cur_word) ? cur_word : ""; } /* * These routines deal with the caret. * * PUBLIC: void draw_caret __P((xvi_screen *)); */ static void draw_caret(xvi_screen *this_screen) { /* draw the caret by drawing the text in highlight color */ *FlagAt( this_screen, this_screen->cury, this_screen->curx ) |= COLOR_CARET; __vi_draw_text( this_screen, this_screen->cury, this_screen->curx, 1 ); } /* * PUBLIC: void __vi_erase_caret __P((xvi_screen *)); */ void __vi_erase_caret(xvi_screen *this_screen) { /* erase the caret by drawing the text in normal video */ *FlagAt( this_screen, this_screen->cury, this_screen->curx ) &= ~COLOR_CARET; __vi_draw_text( this_screen, this_screen->cury, this_screen->curx, 1 ); } /* * PUBLIC: void __vi_move_caret __P((xvi_screen *, int, int)); */ void __vi_move_caret(xvi_screen *this_screen, int newy, int newx) { /* remove the old caret */ __vi_erase_caret( this_screen ); /* caret is now here */ this_screen->curx = newx; this_screen->cury = newy; draw_caret( this_screen ); } nvi-1.81.6/motif_l/vi_mextern.h0100644000076400001440000000223410720065506015435 0ustar skimousers/*- * Copyright (c) 1996 * Rob Zimmermann. All rights reserved. * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * "$Id: vi_mextern.h,v 8.6 2000/07/05 11:33:19 skimo Exp $ (Berkeley) $Date: 2000/07/05 11:33:19 $"; */ /* * Globals, the list of names exposed to the outside world by the vi Motif * widget library. * * Applications using the Motif vi widget code will have to initialize these * or the library code will fail. */ extern char *vi_progname; /* Program name. */ extern int vi_ofd; /* Output file descriptor. */ extern IPVIWIN *ipvi_motif; extern IPSIOPS ipsi_ops_motif; /* * RAZ -- anyway we can get the library to do this setup? */ #if 0 #ifdef __STDC__ Widget vi_create_editor(String, Widget, void (*)(void)); Widget vi_create_menubar(Widget); void vi_input_func(XtPointer, int *, XtInputId *); int vi_run(int, char *[], int *, int *, pid_t *); int vi_send(char *, IP_BUF *); int vi_translate(char *, size_t *, IP_BUF *); #else Widget vi_create_editor(); Widget vi_create_menubar(); void vi_input_func(); void vi_run(); int vi_send(); int vi_translate(); #endif #endif nvi-1.81.6/motif_l/xtabbed.c0100644000076400001440000027305110720065506014670 0ustar skimousers/* *********************************************************************** * This module implements a motif tabbed window widget. * The source is copied from the Free Widget Foundation * This file is divided into thse parts * o - Conversion routines for the X resource manager * o - Routines for drawing rotated text * o - A motif widget for tabbed windows * o - A driver for the above in the flavor of the xt utilities module * *********************************************************************** */ #include #include #include #include #include #include #include #include #if defined(VMS_HOST) #include #else #include #endif #include #include #include #include /* *********************************************************************** * "rotated.h" * *********************************************************************** */ /* ************************************************************************ */ /* Header file for the `xvertext 5.0' routines. Copyright (c) 1993 Alan Richardson (mppa3@uk.ac.sussex.syma) */ /* ************************************************************************ */ #ifndef _XVERTEXT_INCLUDED_ #define _XVERTEXT_INCLUDED_ #define XV_VERSION 5.0 #define XV_COPYRIGHT \ "xvertext routines Copyright (c) 1993 Alan Richardson" /* ---------------------------------------------------------------------- */ /* text alignment */ #define NONE 0 #define TLEFT 1 #define TCENTRE 2 #define TRIGHT 3 #define MLEFT 4 #define MCENTRE 5 #define MRIGHT 6 #define BLEFT 7 #define BCENTRE 8 #define BRIGHT 9 /* ---------------------------------------------------------------------- */ /* this shoulf be C++ compliant, thanks to vlp@latina.inesc.pt (Vasco Lopes Paulo) */ #if defined(__cplusplus) || defined(c_plusplus) extern "C" { static float XRotVersion(char*, int); static void XRotSetMagnification(float); static void XRotSetBoundingBoxPad(int); static int XRotDrawString(Display*, XFontStruct*, float, Drawable, GC, int, int, char*); static int XRotDrawImageString(Display*, XFontStruct*, float, Drawable, GC, int, int, char*); static int XRotDrawAlignedString(Display*, XFontStruct*, float, Drawable, GC, int, int, char*, int); static int XRotDrawAlignedImageString(Display*, XFontStruct*, float, Drawable, GC, int, int, char*, int); static XPoint *XRotTextExtents(Display*, XFontStruct*, float, int, int, char*, int); } #else static float XRotVersion(char *str, int n); static void XRotSetMagnification(float m); static void XRotSetBoundingBoxPad(int p); static int XRotDrawString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str); static int XRotDrawImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str); static int XRotDrawAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align); static int XRotDrawAlignedImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align); static XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, float angle, int x, int y, char *text, int align); #endif /* __cplusplus */ /* ---------------------------------------------------------------------- */ #endif /* _XVERTEXT_INCLUDED_ */ /* *********************************************************************** * "strarray.h" * *********************************************************************** */ #ifndef _strarray_h_ #define _strarray_h_ /* StringArray =========== The type |StringArray| represents an array of |String|s, with the proviso that by convention the last member of a |StringArray| is always a |NULL| pointer. There is a converter that can construct a |StringArray| from a single string. cvtStringToStringArray ====================== The converter from |String| to |StringArray| makes a copy of the passed string and then replaces all occurences of the delimiter with a nul byte. The |StringArray| is filled with pointers to the parts of the string. The delimiter character is the first character in the string. newStringArray ============== The function |newStringArray| makes a copy of a |StringArray|. It allocates new space for the array itself and for the strings that it contains. freeStringArray =============== |freeStringArray| deallocates the array and all strings it contains. Note that this works for StringArrays produced with |newStringArray|, but not for those created by |cvtStringToStringArray|! */ typedef String * StringArray; static Boolean cvtStringToStringArray( #if NeedFunctionPrototypes Display *display, XrmValuePtr args, Cardinal *num_args, XrmValuePtr from, XrmValuePtr to, XtPointer *converter_data #endif ); StringArray newStringArray( #if NeedFunctionPrototypes StringArray a #endif ); void freeStringArray( #if NeedFunctionPrototypes StringArray a #endif ); #endif /* _strarray_h_ */ /* *********************************************************************** * "XmTabs.h" * *********************************************************************** */ /* Generated by wbuild from "XmTabs.w" ** (generator version $Revision: 8.5 $ of $Date: 2001/06/25 15:19:28 $) */ #ifndef _XmTabs_H_ #define _XmTabs_H_ typedef enum { XfwfUpTabs, XfwfDownTabs, XfwfLeftTabs, XfwfRightTabs, } TabsOrientation; #ifndef XtNorientation #define XtNorientation "orientation" #endif #ifndef XtCOrientation #define XtCOrientation "Orientation" #endif #ifndef XtRTabsOrientation #define XtRTabsOrientation "TabsOrientation" #endif #ifndef XtNlefttabs #define XtNlefttabs "lefttabs" #endif #ifndef XtCLefttabs #define XtCLefttabs "Lefttabs" #endif #ifndef XtRInt #define XtRInt "Int" #endif #ifndef XtNrighttabs #define XtNrighttabs "righttabs" #endif #ifndef XtCRighttabs #define XtCRighttabs "Righttabs" #endif #ifndef XtRInt #define XtRInt "Int" #endif #ifndef XtNlabels #define XtNlabels "labels" #endif #ifndef XtCLabels #define XtCLabels "Labels" #endif #ifndef XtRStringArray #define XtRStringArray "StringArray" #endif #ifndef XtNtabWidthPercentage #define XtNtabWidthPercentage "tabWidthPercentage" #endif #ifndef XtCTabWidthPercentage #define XtCTabWidthPercentage "TabWidthPercentage" #endif #ifndef XtRInt #define XtRInt "Int" #endif #ifndef XtNcornerwidth #define XtNcornerwidth "cornerwidth" #endif #ifndef XtCCornerwidth #define XtCCornerwidth "Cornerwidth" #endif #ifndef XtRCardinal #define XtRCardinal "Cardinal" #endif #ifndef XtNcornerheight #define XtNcornerheight "cornerheight" #endif #ifndef XtCCornerheight #define XtCCornerheight "Cornerheight" #endif #ifndef XtRCardinal #define XtRCardinal "Cardinal" #endif #ifndef XtNtextmargin #define XtNtextmargin "textmargin" #endif #ifndef XtCTextmargin #define XtCTextmargin "Textmargin" #endif #ifndef XtRInt #define XtRInt "Int" #endif #ifndef XtNtabcolor #define XtNtabcolor "tabcolor" #endif #ifndef XtCTabcolor #define XtCTabcolor "Tabcolor" #endif #ifndef XtRPixel #define XtRPixel "Pixel" #endif #ifndef XtNfont #define XtNfont "font" #endif #ifndef XtCFont #define XtCFont "Font" #endif #ifndef XtRFontStruct #define XtRFontStruct "FontStruct" #endif #ifndef XtNactivateCallback #define XtNactivateCallback "activateCallback" #endif #ifndef XtCActivateCallback #define XtCActivateCallback "ActivateCallback" #endif #ifndef XtRCallback #define XtRCallback "Callback" #endif typedef struct _XmTabsClassRec *XmTabsWidgetClass; typedef struct _XmTabsRec *XmTabsWidget; #endif /*_XmTabs_H_*/ /* *********************************************************************** * "XmTabsP.h" * *********************************************************************** */ /* Generated by wbuild from "XmTabs.w" ** (generator version $Revision: 8.5 $ of $Date: 2001/06/25 15:19:28 $) */ #ifndef _XmTabsP_H_ #define _XmTabsP_H_ /* raz modified 22 Jul 96 for bluestone */ #include #if ! defined(MGR_ShadowThickness) #include #endif typedef void (*border_highlight_Proc)( #if NeedFunctionPrototypes void #endif ); #define XtInherit_border_highlight ((border_highlight_Proc) _XtInherit) typedef void (*border_unhighlight_Proc)( #if NeedFunctionPrototypes void #endif ); #define XtInherit_border_unhighlight ((border_unhighlight_Proc) _XtInherit) typedef struct { /* Constraint resources */ /* Private constraint variables */ int dummy; } XmTabsConstraintPart; typedef struct _XmTabsConstraintRec { XmManagerConstraintPart xmManager; XmTabsConstraintPart xmTabs; } XmTabsConstraintRec; typedef struct { /* methods */ border_highlight_Proc border_highlight; border_unhighlight_Proc border_unhighlight; /* class variables */ } XmTabsClassPart; typedef struct _XmTabsClassRec { CoreClassPart core_class; CompositeClassPart composite_class; ConstraintClassPart constraint_class; XmManagerClassPart xmManager_class; XmTabsClassPart xmTabs_class; } XmTabsClassRec; typedef struct { /* resources */ TabsOrientation orientation; int lefttabs; int righttabs; StringArray labels; int tabWidthPercentage; Cardinal cornerwidth; Cardinal cornerheight; int textmargin; Pixel tabcolor; XFontStruct * font; XtCallbackList activateCallback; /* private state */ GC textgc; GC topgc; GC bottomgc; GC backgc; GC fillgc; int * tabwidths; int * offsets; } XmTabsPart; typedef struct _XmTabsRec { CorePart core; CompositePart composite; ConstraintPart constraint; XmManagerPart xmManager; XmTabsPart xmTabs; } XmTabsRec; #endif /* _XmTabsP_H_ */ /* *********************************************************************** * A motif widget for tabbed windows * *********************************************************************** */ static void activate( #if NeedFunctionPrototypes Widget,XEvent*,String*,Cardinal* #endif ); static XtActionsRec actionsList[] = { {"activate", activate}, }; static char defaultTranslations[] = "\ ,: activate() \n\ "; static void _resolve_inheritance( #if NeedFunctionPrototypes WidgetClass #endif ); static void class_initialize( #if NeedFunctionPrototypes void #endif ); static void initialize( #if NeedFunctionPrototypes Widget ,Widget,ArgList ,Cardinal * #endif ); static Boolean set_values( #if NeedFunctionPrototypes Widget ,Widget ,Widget,ArgList ,Cardinal * #endif ); static void realize( #if NeedFunctionPrototypes Widget,XtValueMask *,XSetWindowAttributes * #endif ); static void resize( #if NeedFunctionPrototypes Widget #endif ); static void expose( #if NeedFunctionPrototypes Widget,XEvent *,Region #endif ); static void border_highlight( #if NeedFunctionPrototypes void #endif ); static void border_unhighlight( #if NeedFunctionPrototypes void #endif ); static void destroy( #if NeedFunctionPrototypes Widget #endif ); #define min(a, b) ((a )<(b )?(a ):(b )) #define abs(x) ((x )<0 ?-(x ):(x )) static void compute_tabsizes( #if NeedFunctionPrototypes Widget #endif ); static void comp_hor_tab_shape( #if NeedFunctionPrototypes Widget,int ,XPoint p[12],int *,int *,int * #endif ); static void comp_ver_tab_shape( #if NeedFunctionPrototypes Widget,int ,XPoint p[12],int *,int *,int * #endif ); static void draw_border( #if NeedFunctionPrototypes Widget,XPoint poly[12] #endif ); static void draw_hor_tab( #if NeedFunctionPrototypes Widget,Region ,int #endif ); static void draw_ver_tab( #if NeedFunctionPrototypes Widget,Region ,int #endif ); static void create_topgc( #if NeedFunctionPrototypes Widget #endif ); static void create_bottomgc( #if NeedFunctionPrototypes Widget #endif ); static void create_textgc( #if NeedFunctionPrototypes Widget #endif ); static void create_fillgc( #if NeedFunctionPrototypes Widget #endif ); static void create_backgc( #if NeedFunctionPrototypes Widget #endif ); static void copy_bg( #if NeedFunctionPrototypes Widget,int ,XrmValue * #endif ); static void set_shape( #if NeedFunctionPrototypes Widget #endif ); #define done(type, value) do {\ if (to->addr != NULL) {\ if (to->size < sizeof(type)) {\ to->size = sizeof(type);\ return False;\ }\ *(type*)(to->addr) = (value);\ } else {\ static type static_val;\ static_val = (value);\ to->addr = (XtPointer)&static_val;\ }\ to->size = sizeof(type);\ return True;\ }while (0 ) static Boolean cvtStringToTabsOrientation( #if NeedFunctionPrototypes Display *,XrmValuePtr ,Cardinal *,XrmValuePtr ,XrmValuePtr ,XtPointer * #endif ); static Boolean cvtTabsOrientationToString( #if NeedFunctionPrototypes Display *,XrmValuePtr ,Cardinal *,XrmValuePtr ,XrmValuePtr ,XtPointer * #endif ); /*ARGSUSED*/ #if NeedFunctionPrototypes static void compute_tabsizes(Widget self) #else static void compute_tabsizes(self)Widget self; #endif { int maxwd, basewidth, delta, i, n = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs + 1; int sum, len, h, length, breadth, shad = ((XmTabsWidget)self)->xmManager.shadow_thickness; if (((XmTabsWidget)self)->xmTabs.offsets) XtFree((XtPointer) ((XmTabsWidget)self)->xmTabs.offsets); if (((XmTabsWidget)self)->xmTabs.tabwidths) XtFree((XtPointer) ((XmTabsWidget)self)->xmTabs.tabwidths); ((XmTabsWidget)self)->xmTabs.offsets = (XtPointer) XtMalloc(n * sizeof(*((XmTabsWidget)self)->xmTabs.offsets)); ((XmTabsWidget)self)->xmTabs.tabwidths = (XtPointer) XtMalloc(n * sizeof(*((XmTabsWidget)self)->xmTabs.tabwidths)); if (((XmTabsWidget)self)->xmTabs.orientation == XfwfUpTabs || ((XmTabsWidget)self)->xmTabs.orientation == XfwfDownTabs) { length = ((XmTabsWidget)self)->core.width; breadth = ((XmTabsWidget)self)->core.height; } else { length = ((XmTabsWidget)self)->core.height; breadth = ((XmTabsWidget)self)->core.width; } if (((XmTabsWidget)self)->xmTabs.tabWidthPercentage != 0) { /* Fixed width tabs */ basewidth = ((XmTabsWidget)self)->xmTabs.tabWidthPercentage * length/100; if (n > 1) delta = (length - basewidth)/(((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs); for (i = 0; i < n; i++) { ((XmTabsWidget)self)->xmTabs.tabwidths[i] = basewidth; ((XmTabsWidget)self)->xmTabs.offsets[i] = i * delta; } } else if (((XmTabsWidget)self)->xmTabs.labels == NULL) { /* Empty tabs */ basewidth = length/n; delta = (length - basewidth)/(((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs); for (i = 0; i < n; i++) { ((XmTabsWidget)self)->xmTabs.tabwidths[i] = basewidth; ((XmTabsWidget)self)->xmTabs.offsets[i] = i * delta; } } else { /* Variable width tabs */ sum = 0; h = 2 * (((XmTabsWidget)self)->xmTabs.cornerwidth + shad + ((XmTabsWidget)self)->xmTabs.textmargin); maxwd = length - n * (shad + ((XmTabsWidget)self)->xmTabs.textmargin); for (i = 0; i < n; i++) { len = strlen(((XmTabsWidget)self)->xmTabs.labels[i]); ((XmTabsWidget)self)->xmTabs.tabwidths[i] = min(maxwd, XTextWidth(((XmTabsWidget)self)->xmTabs.font,((XmTabsWidget)self)->xmTabs.labels[i],len) + h); sum += ((XmTabsWidget)self)->xmTabs.tabwidths[i]; } ((XmTabsWidget)self)->xmTabs.offsets[0] = 0; if (length >= sum) delta = (length - sum)/(n - 1); /* Between tabs */ else delta = -((sum - length + n - 2)/(n - 1)); /* Round down! */ for (i = 1; i < n; i++) ((XmTabsWidget)self)->xmTabs.offsets[i] = ((XmTabsWidget)self)->xmTabs.offsets[i-1] + ((XmTabsWidget)self)->xmTabs.tabwidths[i-1] + delta; } } /*ARGSUSED*/ #if NeedFunctionPrototypes static void comp_hor_tab_shape(Widget self,int i,XPoint p[12],int * x0,int * x1,int * midy) #else static void comp_hor_tab_shape(self,i,p,x0,x1,midy)Widget self;int i;XPoint p[12];int * x0;int * x1;int * midy; #endif { int shad = ((XmTabsWidget)self)->xmManager.shadow_thickness; int k = min(((XmTabsWidget)self)->xmTabs.cornerheight, (((XmTabsWidget)self)->core.height - shad)/2); /* * 4 o-------------o 5 * / \ * 3 o o 6 * | | * 2 o o 7 * 1 / \ 8 * 0 o--------o o--------o 9 * 11 o---------------------------------------o 10 * * 11 o---------------------------------------o 10 * 0 o--------o o--------o 9 * 1 \ / 8 * 2 o o 7 * | | * 3 o o 6 * \ / * 4 o-------------o 5 */ p[0].x = 0; p[1].x = ((XmTabsWidget)self)->xmTabs.offsets[i]; p[2].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.cornerwidth; p[3].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.cornerwidth; p[4].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + 2 * ((XmTabsWidget)self)->xmTabs.cornerwidth; p[5].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - 2 * ((XmTabsWidget)self)->xmTabs.cornerwidth; p[6].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - ((XmTabsWidget)self)->xmTabs.cornerwidth; p[7].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - ((XmTabsWidget)self)->xmTabs.cornerwidth; p[8].x = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i]; p[9].x = ((XmTabsWidget)self)->core.width; p[10].x = ((XmTabsWidget)self)->core.width; p[11].x = 0; if (((XmTabsWidget)self)->xmTabs.orientation == XfwfUpTabs) { p[0].y = ((XmTabsWidget)self)->core.height - shad; p[1].y = ((XmTabsWidget)self)->core.height - shad; p[2].y = ((XmTabsWidget)self)->core.height - shad - k; p[3].y = k; p[4].y = 0; p[5].y = 0; p[6].y = k; p[7].y = ((XmTabsWidget)self)->core.height - shad - k; p[8].y = ((XmTabsWidget)self)->core.height - shad; p[9].y = ((XmTabsWidget)self)->core.height - shad; p[10].y = ((XmTabsWidget)self)->core.height; p[11].y = ((XmTabsWidget)self)->core.height; } else { p[0].y = shad; p[1].y = shad; p[2].y = shad + k; p[3].y = ((XmTabsWidget)self)->core.height - k; p[4].y = ((XmTabsWidget)self)->core.height; p[5].y = ((XmTabsWidget)self)->core.height; p[6].y = ((XmTabsWidget)self)->core.height - k; p[7].y = shad + k; p[8].y = shad; p[9].y = shad; p[10].y = 0; p[11].y = 0; } *x0 = p[4].x; *x1 = p[5].x; *midy = (p[1].y + p[4].y)/2; } /*ARGSUSED*/ #if NeedFunctionPrototypes static void comp_ver_tab_shape(Widget self,int i,XPoint p[12],int * y0,int * y1,int * midx) #else static void comp_ver_tab_shape(self,i,p,y0,y1,midx)Widget self;int i;XPoint p[12];int * y0;int * y1;int * midx; #endif { int shad = ((XmTabsWidget)self)->xmManager.shadow_thickness; int k = min(((XmTabsWidget)self)->xmTabs.cornerheight, (((XmTabsWidget)self)->core.width - shad)/2); /* * 0 o_o 11 11 o_o 0 * | | | | * 1 o | | o 1 * 3 2/ | | \2 3 * o-o | | o-o * / | | \ * 4 o | | o 4 * | | | | * 5 o | | o 5 * \ | | / * o-o | | o-o * 6 7\ | | /7 6 * 8 o | | o 8 * | | | | * 9 o_o 10 10 o_o 9 */ if (((XmTabsWidget)self)->xmTabs.orientation == XfwfLeftTabs) { p[0].x = ((XmTabsWidget)self)->core.width - shad; p[1].x = ((XmTabsWidget)self)->core.width - shad; p[2].x = ((XmTabsWidget)self)->core.width - shad - k; p[3].x = k; p[4].x = 0; p[5].x = 0; p[6].x = k; p[7].x = ((XmTabsWidget)self)->core.width - shad - k; p[8].x = ((XmTabsWidget)self)->core.width - shad; p[9].x = ((XmTabsWidget)self)->core.width - shad; p[10].x = ((XmTabsWidget)self)->core.width; p[11].x = ((XmTabsWidget)self)->core.width; } else { p[0].x = shad; p[1].x = shad; p[2].x = shad + k; p[3].x = ((XmTabsWidget)self)->core.width - k; p[4].x = ((XmTabsWidget)self)->core.width; p[5].x = ((XmTabsWidget)self)->core.width; p[6].x = ((XmTabsWidget)self)->core.width - k; p[7].x = shad + k; p[8].x = shad; p[9].x = shad; p[10].x = 0; p[11].x = 0; } p[0].y = 0; p[1].y = ((XmTabsWidget)self)->xmTabs.offsets[i]; p[2].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.cornerwidth; p[3].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.cornerwidth; p[4].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + 2 * ((XmTabsWidget)self)->xmTabs.cornerwidth; p[5].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - 2 * ((XmTabsWidget)self)->xmTabs.cornerwidth; p[6].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - ((XmTabsWidget)self)->xmTabs.cornerwidth; p[7].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i] - ((XmTabsWidget)self)->xmTabs.cornerwidth; p[8].y = ((XmTabsWidget)self)->xmTabs.offsets[i] + ((XmTabsWidget)self)->xmTabs.tabwidths[i]; p[9].y = ((XmTabsWidget)self)->core.height; p[10].y = ((XmTabsWidget)self)->core.height; p[11].y = 0; *y0 = p[4].y; *y1 = p[5].y; *midx = (p[1].x + p[4].x)/2; } /*ARGSUSED*/ #if NeedFunctionPrototypes static void draw_border(Widget self,XPoint poly[12]) #else static void draw_border(self,poly)Widget self;XPoint poly[12]; #endif { Display *dpy = XtDisplay(self); Window win = XtWindow(self); if (((XmTabsWidget)self)->xmTabs.orientation == XfwfUpTabs) { XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.topgc, poly, 6, CoordModeOrigin); XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.bottomgc, poly + 5, 4, CoordModeOrigin); XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.topgc, poly + 8, 2, CoordModeOrigin); } else { XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.bottomgc, poly, 2, CoordModeOrigin); XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.topgc, poly + 1, 4, CoordModeOrigin); XDrawLines(dpy, win, ((XmTabsWidget)self)->xmTabs.bottomgc, poly + 4, 6, CoordModeOrigin); } } /*ARGSUSED*/ #if NeedFunctionPrototypes static void draw_hor_tab(Widget self,Region region,int i) #else static void draw_hor_tab(self,region,i)Widget self;Region region;int i; #endif { XPoint p[12]; Display *dpy = XtDisplay(self); Window win = XtWindow(self); Region clip; int x0, x1, midy; comp_hor_tab_shape(self, i, p, &x0, &x1, &midy); clip = XPolygonRegion(p, XtNumber(p), WindingRule); if (region) XIntersectRegion(clip, region, clip); if (XEmptyRegion(clip)) return; XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.textgc, clip); XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.topgc, clip); XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.bottomgc, clip); if (i == ((XmTabsWidget)self)->xmTabs.lefttabs) { XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.backgc, clip); XFillPolygon(dpy, win, ((XmTabsWidget)self)->xmTabs.backgc, p, XtNumber(p), Convex, CoordModeOrigin); } else { XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.fillgc, clip); XFillPolygon(dpy, win, ((XmTabsWidget)self)->xmTabs.fillgc, p, XtNumber(p), Convex, CoordModeOrigin); } if (((XmTabsWidget)self)->xmTabs.labels) { int w, y, x, len = strlen(((XmTabsWidget)self)->xmTabs.labels[i]); y = midy - (((XmTabsWidget)self)->xmTabs.font->ascent + ((XmTabsWidget)self)->xmTabs.font->descent)/2 + ((XmTabsWidget)self)->xmTabs.font->ascent; w = XTextWidth(((XmTabsWidget)self)->xmTabs.font, ((XmTabsWidget)self)->xmTabs.labels[i], len); if (i == ((XmTabsWidget)self)->xmTabs.lefttabs || ((XmTabsWidget)self)->xmTabs.tabWidthPercentage <= 100/(((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs + 1)) x = (x0 + x1 - w)/2; /* Centered text */ else if (i < ((XmTabsWidget)self)->xmTabs.lefttabs) x = x0 + ((XmTabsWidget)self)->xmTabs.textmargin; /* Left aligned text */ else x = x1 - ((XmTabsWidget)self)->xmTabs.textmargin - w; /* Right aligned text */ XDrawString(dpy, win, ((XmTabsWidget)self)->xmTabs.textgc, x, y, ((XmTabsWidget)self)->xmTabs.labels[i], len); } draw_border(self, p); XDestroyRegion(clip); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void draw_ver_tab(Widget self,Region region,int i) #else static void draw_ver_tab(self,region,i)Widget self;Region region;int i; #endif { Display *dpy = XtDisplay(self); Window win = XtWindow(self); XPoint p[12]; Region clip; int y0, y1, midx; comp_ver_tab_shape(self, i, p, &y0, &y1, &midx); clip = XPolygonRegion(p, XtNumber(p), WindingRule); if (region) XIntersectRegion(clip, region, clip); if (XEmptyRegion(clip)) return; XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.textgc, clip); XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.topgc, clip); XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.bottomgc, clip); if (i == ((XmTabsWidget)self)->xmTabs.lefttabs) { XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.backgc, clip); XFillPolygon(dpy, win, ((XmTabsWidget)self)->xmTabs.backgc, p, XtNumber(p), Convex, CoordModeOrigin); } else { XSetRegion(dpy, ((XmTabsWidget)self)->xmTabs.fillgc, clip); XFillPolygon(dpy, win, ((XmTabsWidget)self)->xmTabs.fillgc, p, XtNumber(p), Convex, CoordModeOrigin); } if (((XmTabsWidget)self)->xmTabs.labels) { int y, align; float angle = ((XmTabsWidget)self)->xmTabs.orientation == XfwfLeftTabs ? 90.0 : -90.0; if (i == ((XmTabsWidget)self)->xmTabs.lefttabs || ((XmTabsWidget)self)->xmTabs.tabWidthPercentage <= 100/(((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs + 1)) { y = (y0 + y1)/2; align = MCENTRE; } else if (i < ((XmTabsWidget)self)->xmTabs.lefttabs) { y = y0 + ((XmTabsWidget)self)->xmTabs.textmargin; align = ((XmTabsWidget)self)->xmTabs.orientation == XfwfLeftTabs ? MRIGHT : MLEFT; } else { y = y1 - ((XmTabsWidget)self)->xmTabs.textmargin; align = ((XmTabsWidget)self)->xmTabs.orientation == XfwfLeftTabs ? MLEFT : MRIGHT; } XRotDrawAlignedString (dpy, ((XmTabsWidget)self)->xmTabs.font, angle, win, ((XmTabsWidget)self)->xmTabs.textgc, midx, y, ((XmTabsWidget)self)->xmTabs.labels[i], align); } draw_border(self, p); XDestroyRegion(clip); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void create_topgc(Widget self) #else static void create_topgc(self)Widget self; #endif { XtGCMask mask = GCForeground | GCLineWidth; XGCValues values; if (((XmTabsWidget)self)->xmTabs.topgc != NULL) XFreeGC(XtDisplay(self), ((XmTabsWidget)self)->xmTabs.topgc); values.foreground = ((XmTabsWidget)self)->xmManager.top_shadow_color; values.line_width = 2 * ((XmTabsWidget)self)->xmManager.shadow_thickness; ((XmTabsWidget)self)->xmTabs.topgc = XCreateGC(XtDisplay(self), RootWindowOfScreen(XtScreen(self)), mask, &values); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void create_bottomgc(Widget self) #else static void create_bottomgc(self)Widget self; #endif { XtGCMask mask = GCForeground | GCLineWidth; XGCValues values; if (((XmTabsWidget)self)->xmTabs.bottomgc != NULL) XFreeGC(XtDisplay(self), ((XmTabsWidget)self)->xmTabs.bottomgc); values.foreground = ((XmTabsWidget)self)->xmManager.bottom_shadow_color; values.line_width = 2 * ((XmTabsWidget)self)->xmManager.shadow_thickness; ((XmTabsWidget)self)->xmTabs.bottomgc = XCreateGC(XtDisplay(self), RootWindowOfScreen(XtScreen(self)), mask, &values); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void create_textgc(Widget self) #else static void create_textgc(self)Widget self; #endif { XtGCMask mask = GCForeground | GCFont; XGCValues values; if (((XmTabsWidget)self)->xmTabs.textgc != NULL) XFreeGC(XtDisplay(self), ((XmTabsWidget)self)->xmTabs.textgc); values.foreground = ((XmTabsWidget)self)->xmManager.foreground; values.font = ((XmTabsWidget)self)->xmTabs.font->fid; ((XmTabsWidget)self)->xmTabs.textgc = XCreateGC(XtDisplay(self), RootWindowOfScreen(XtScreen(self)), mask, &values); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void create_fillgc(Widget self) #else static void create_fillgc(self)Widget self; #endif { XtGCMask mask = GCForeground; XGCValues values; if (((XmTabsWidget)self)->xmTabs.fillgc != NULL) XFreeGC(XtDisplay(self), ((XmTabsWidget)self)->xmTabs.fillgc); values.foreground = ((XmTabsWidget)self)->xmTabs.tabcolor; ((XmTabsWidget)self)->xmTabs.fillgc = XCreateGC(XtDisplay(self), RootWindowOfScreen(XtScreen(self)), mask, &values); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void create_backgc(Widget self) #else static void create_backgc(self)Widget self; #endif { XtGCMask mask = GCForeground; XGCValues values; if (((XmTabsWidget)self)->xmTabs.backgc != NULL) XFreeGC(XtDisplay(self), ((XmTabsWidget)self)->xmTabs.backgc); values.foreground = ((XmTabsWidget)self)->core.background_pixel; ((XmTabsWidget)self)->xmTabs.backgc = XCreateGC(XtDisplay(self), RootWindowOfScreen(XtScreen(self)), mask, &values); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void copy_bg(Widget self,int offset,XrmValue * value) #else static void copy_bg(self,offset,value)Widget self;int offset;XrmValue * value; #endif { value->addr = (XtPointer) &((XmTabsWidget)self)->core.background_pixel; } /*ARGSUSED*/ #if NeedFunctionPrototypes static void set_shape(Widget self) #else static void set_shape(self)Widget self; #endif { int x0, x1, midy, y0, y1, midx, i; Region region, clip; XPoint poly[12]; if (! XtIsRealized(self)) return; region = XCreateRegion(); switch (((XmTabsWidget)self)->xmTabs.orientation) { case XfwfUpTabs: case XfwfDownTabs: for (i = 0; i <= ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i++) { comp_hor_tab_shape(self, i, poly, &x0, &x1, &midy); clip = XPolygonRegion(poly, XtNumber(poly), WindingRule); XUnionRegion(region, clip, region); XDestroyRegion(clip); } break; case XfwfLeftTabs: case XfwfRightTabs: for (i = 0; i <= ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i++) { comp_ver_tab_shape(self, i, poly, &y0, &y1, &midx); clip = XPolygonRegion(poly, XtNumber(poly), WindingRule); XUnionRegion(region, clip, region); XDestroyRegion(clip); } break; } XShapeCombineRegion(XtDisplay(self), XtWindow(self), ShapeBounding, 0, 0, region, ShapeSet); XDestroyRegion(region); } /*ARGSUSED*/ #if NeedFunctionPrototypes static Boolean cvtStringToTabsOrientation(Display * display,XrmValuePtr args,Cardinal * num_args,XrmValuePtr from,XrmValuePtr to,XtPointer * converter_data) #else static Boolean cvtStringToTabsOrientation(display,args,num_args,from,to,converter_data)Display * display;XrmValuePtr args;Cardinal * num_args;XrmValuePtr from;XrmValuePtr to;XtPointer * converter_data; #endif { TabsOrientation a = XfwfUpTabs; char *s = (char*) from->addr; static struct { char *name; TabsOrientation orient; } strings[] = { { "up", XfwfUpTabs }, { "uptabs", XfwfUpTabs }, { "down", XfwfDownTabs }, { "downtabs", XfwfDownTabs }, { "left", XfwfLeftTabs }, { "lefttabs", XfwfLeftTabs }, { "right", XfwfRightTabs }, { "righttabs", XfwfRightTabs }, }; int i; if (*num_args != 0) XtAppErrorMsg (XtDisplayToApplicationContext(display), "cvtStringToTabsOrientation", "wrongParameters", "XtToolkitError", "String to TabsOrientation conversion needs no arguments", (String*) NULL, (Cardinal*) NULL); for (i=0; i= XtNumber(strings) ) XtDisplayStringConversionWarning(display, s, "TabsOrientation"); done(TabsOrientation, a); } /*ARGSUSED*/ #if NeedFunctionPrototypes static Boolean cvtTabsOrientationToString(Display * display,XrmValuePtr args,Cardinal * num_args,XrmValuePtr from,XrmValuePtr to,XtPointer * converter_data) #else static Boolean cvtTabsOrientationToString(display,args,num_args,from,to,converter_data)Display * display;XrmValuePtr args;Cardinal * num_args;XrmValuePtr from;XrmValuePtr to;XtPointer * converter_data; #endif { TabsOrientation *a = (TabsOrientation*) from->addr; if (*num_args != 0) XtAppErrorMsg (XtDisplayToApplicationContext(display), "cvtTabsOrientationToString", "wrongParameters", "XtToolkitError", "TabsOrientation to String conversion needs no arguments", (String*) NULL, (Cardinal*) NULL); switch (*a) { case XfwfUpTabs: done(String, "up"); case XfwfDownTabs: done(String, "down"); case XfwfLeftTabs: done(String, "left"); case XfwfRightTabs: done(String, "right"); } XtAppErrorMsg (XtDisplayToApplicationContext(display), "cvtTabsOrientationToString", "illParameters", "XtToolkitError", "TabsOrientation to String conversion got illegal argument", (String*) NULL, (Cardinal*) NULL); return TRUE; } static XtResource resources[] = { {XtNorientation,XtCOrientation,XtRTabsOrientation,sizeof(((XmTabsRec*)NULL)->xmTabs.orientation),XtOffsetOf(XmTabsRec,xmTabs.orientation),XtRImmediate,(XtPointer)XfwfUpTabs }, {XtNlefttabs,XtCLefttabs,XtRInt,sizeof(((XmTabsRec*)NULL)->xmTabs.lefttabs),XtOffsetOf(XmTabsRec,xmTabs.lefttabs),XtRImmediate,(XtPointer)0 }, {XtNrighttabs,XtCRighttabs,XtRInt,sizeof(((XmTabsRec*)NULL)->xmTabs.righttabs),XtOffsetOf(XmTabsRec,xmTabs.righttabs),XtRImmediate,(XtPointer)0 }, {XtNlabels,XtCLabels,XtRStringArray,sizeof(((XmTabsRec*)NULL)->xmTabs.labels),XtOffsetOf(XmTabsRec,xmTabs.labels),XtRImmediate,(XtPointer)NULL }, {XtNtabWidthPercentage,XtCTabWidthPercentage,XtRInt,sizeof(((XmTabsRec*)NULL)->xmTabs.tabWidthPercentage),XtOffsetOf(XmTabsRec,xmTabs.tabWidthPercentage),XtRImmediate,(XtPointer)50 }, {XtNcornerwidth,XtCCornerwidth,XtRCardinal,sizeof(((XmTabsRec*)NULL)->xmTabs.cornerwidth),XtOffsetOf(XmTabsRec,xmTabs.cornerwidth),XtRImmediate,(XtPointer)3 }, {XtNcornerheight,XtCCornerheight,XtRCardinal,sizeof(((XmTabsRec*)NULL)->xmTabs.cornerheight),XtOffsetOf(XmTabsRec,xmTabs.cornerheight),XtRImmediate,(XtPointer)3 }, {XtNtextmargin,XtCTextmargin,XtRInt,sizeof(((XmTabsRec*)NULL)->xmTabs.textmargin),XtOffsetOf(XmTabsRec,xmTabs.textmargin),XtRImmediate,(XtPointer)3 }, {XtNtabcolor,XtCTabcolor,XtRPixel,sizeof(((XmTabsRec*)NULL)->xmTabs.tabcolor),XtOffsetOf(XmTabsRec,xmTabs.tabcolor),XtRCallProc,(XtPointer)copy_bg }, {XtNfont,XtCFont,XtRFontStruct,sizeof(((XmTabsRec*)NULL)->xmTabs.font),XtOffsetOf(XmTabsRec,xmTabs.font),XtRString,(XtPointer)XtDefaultFont }, {XtNactivateCallback,XtCActivateCallback,XtRCallback,sizeof(((XmTabsRec*)NULL)->xmTabs.activateCallback),XtOffsetOf(XmTabsRec,xmTabs.activateCallback),XtRImmediate,(XtPointer)NULL }, }; XmTabsClassRec xmTabsClassRec = { { /* core_class part */ /* superclass */ (WidgetClass) &xmManagerClassRec, /* class_name */ "XmTabs", /* widget_size */ sizeof(XmTabsRec), /* class_initialize */ class_initialize, /* class_part_initialize*/ _resolve_inheritance, /* class_inited */ FALSE, /* initialize */ initialize, /* initialize_hook */ NULL, /* realize */ realize, /* actions */ actionsList, /* num_actions */ 1, /* resources */ resources, /* num_resources */ 11, /* xrm_class */ NULLQUARK, /* compres_motion */ True , /* compress_exposure */ XtExposeCompressMultiple , /* compress_enterleave */ True , /* visible_interest */ False , /* destroy */ destroy, /* resize */ resize, /* expose */ expose, /* set_values */ set_values, /* set_values_hook */ NULL, /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values+hook */ NULL, /* accept_focus */ XtInheritAcceptFocus, /* version */ XtVersion, /* callback_private */ NULL, /* tm_table */ defaultTranslations, /* query_geometry */ XtInheritQueryGeometry, /* display_acceleator */ XtInheritDisplayAccelerator, /* extension */ NULL }, { /* composite_class part */ XtInheritGeometryManager, XtInheritChangeManaged, XtInheritInsertChild, XtInheritDeleteChild, NULL }, { /* constraint_class part */ /* constraint_resources */ NULL, /* num_constraint_resources */ 0, /* constraint_size */ sizeof(XmTabsConstraintRec), /* constraint_initialize */ NULL, /* constraint_destroy */ NULL, /* constraint_set_values */ NULL, /* constraint_extension */ NULL }, { /* XmManager class part */ #define manager_extension extension /* translations */ XtInheritTranslations , /* syn_resources */ NULL , /* num_syn_resources */ 0 , /* syn_constraint_resources */ NULL , /* num_syn_constraint_resources */ 0 , /* parent_process */ XmInheritParentProcess, /* manager_extension */ NULL , }, { /* XmTabs_class part */ border_highlight, border_unhighlight, }, }; WidgetClass xmTabsWidgetClass = (WidgetClass) &xmTabsClassRec; /*ARGSUSED*/ static void activate(Widget self, XEvent *event, String *params, Cardinal *num_params) { int x0, x1, dummy, i, x, y; XPoint poly[12]; switch (((XmTabsWidget)self)->xmTabs.orientation) { case XfwfUpTabs: case XfwfDownTabs: x = event->xbutton.x; comp_hor_tab_shape(self, ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= x && x < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) 0); return; } for (i = -1; i >= -((XmTabsWidget)self)->xmTabs.lefttabs; i--) { comp_hor_tab_shape(self, i + ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= x && x < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) i); return; } } for (i = 1; i <= ((XmTabsWidget)self)->xmTabs.righttabs; i++) { comp_hor_tab_shape(self, i + ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= x && x < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) i); return; } } break; case XfwfLeftTabs: case XfwfRightTabs: y = event->xbutton.y; comp_ver_tab_shape(self, ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= y && y < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) 0); return; } for (i = -1; i >= -((XmTabsWidget)self)->xmTabs.lefttabs; i--) { comp_ver_tab_shape(self, i + ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= y && y < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) i); return; } } for (i = 1; i <= ((XmTabsWidget)self)->xmTabs.righttabs; i++) { comp_ver_tab_shape(self, i + ((XmTabsWidget)self)->xmTabs.lefttabs, poly, &x0, &x1, &dummy); if (x0 <= y && y < x1) { XtCallCallbackList(self, ((XmTabsWidget)self)->xmTabs.activateCallback, (XtPointer) i); return; } } break; } } static void _resolve_inheritance(WidgetClass class) { XmTabsWidgetClass c = (XmTabsWidgetClass) class; XmTabsWidgetClass super; static CompositeClassExtensionRec extension_rec = { NULL, NULLQUARK, XtCompositeExtensionVersion, sizeof(CompositeClassExtensionRec), True}; CompositeClassExtensionRec *ext; ext = (XtPointer)XtMalloc(sizeof(*ext)); *ext = extension_rec; ext->next_extension = c->composite_class.extension; c->composite_class.extension = ext; if (class == xmTabsWidgetClass) return; super = (XmTabsWidgetClass)class->core_class.superclass; if (c->xmTabs_class.border_highlight == XtInherit_border_highlight) c->xmTabs_class.border_highlight = super->xmTabs_class.border_highlight; if (c->xmTabs_class.border_unhighlight == XtInherit_border_unhighlight) c->xmTabs_class.border_unhighlight = super->xmTabs_class.border_unhighlight; } /*ARGSUSED*/ #if NeedFunctionPrototypes static void class_initialize(void) #else static void class_initialize(void) #endif { XtSetTypeConverter(XtRString, "StringArray", cvtStringToStringArray, NULL, 0, XtCacheNone, NULL); XtSetTypeConverter(XtRString, "TabsOrientation", cvtStringToTabsOrientation, NULL, 0, XtCacheNone, NULL); XtSetTypeConverter("TabsOrientation", XtRString, cvtTabsOrientationToString, NULL, 0, XtCacheNone, NULL); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void initialize(Widget request,Widget self,ArgList args,Cardinal * num_args) #else static void initialize(request,self,args,num_args)Widget request;Widget self;ArgList args;Cardinal * num_args; #endif { String *h; int i; ((XmTabsWidget)self)->xmManager.traversal_on = FALSE; ((XmTabsWidget)self)->xmTabs.topgc = NULL; create_topgc(self); ((XmTabsWidget)self)->xmTabs.bottomgc = NULL; create_bottomgc(self); ((XmTabsWidget)self)->xmTabs.textgc = NULL; create_textgc(self); ((XmTabsWidget)self)->xmTabs.fillgc = NULL; create_fillgc(self); ((XmTabsWidget)self)->xmTabs.backgc = NULL; create_backgc(self); if (((XmTabsWidget)self)->xmTabs.labels) { h = (String*) XtMalloc((((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs + 1) * sizeof(*h)); for (i = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i >= 0; i--) h[i] = XtNewString(((XmTabsWidget)self)->xmTabs.labels[i]); ((XmTabsWidget)self)->xmTabs.labels = h; } if (((XmTabsWidget)self)->xmTabs.tabWidthPercentage < 0 || ((XmTabsWidget)self)->xmTabs.tabWidthPercentage > 100) { XtAppWarning(XtWidgetToApplicationContext(self), "tabWidthPercentage out of range; reset to 50"); ((XmTabsWidget)self)->xmTabs.tabWidthPercentage = 50; } ((XmTabsWidget)self)->xmTabs.offsets = NULL; ((XmTabsWidget)self)->xmTabs.tabwidths = NULL; compute_tabsizes(self); } /*ARGSUSED*/ #if NeedFunctionPrototypes static Boolean set_values(Widget old,Widget request,Widget self,ArgList args,Cardinal * num_args) #else static Boolean set_values(old,request,self,args,num_args)Widget old;Widget request;Widget self;ArgList args;Cardinal * num_args; #endif { Bool redraw = FALSE, resize_labels = FALSE; String *h; int i; if (((XmTabsWidget)self)->core.background_pixel != ((XmTabsWidget)old)->core.background_pixel || ((XmTabsWidget)self)->core.background_pixmap != ((XmTabsWidget)old)->core.background_pixmap || ((XmTabsWidget)self)->xmManager.shadow_thickness != ((XmTabsWidget)old)->xmManager.shadow_thickness) { create_topgc(self); create_bottomgc(self); create_backgc(self); } if (((XmTabsWidget)self)->xmManager.foreground != ((XmTabsWidget)old)->xmManager.foreground || ((XmTabsWidget)self)->xmTabs.font != ((XmTabsWidget)old)->xmTabs.font) { create_textgc(self); redraw = TRUE; } if (((XmTabsWidget)self)->xmTabs.tabcolor != ((XmTabsWidget)old)->xmTabs.tabcolor) { create_fillgc(self); redraw = TRUE; } if ((((XmTabsWidget)self)->xmTabs.textmargin != ((XmTabsWidget)old)->xmTabs.textmargin && ((XmTabsWidget)self)->xmTabs.tabWidthPercentage == 0) || ((XmTabsWidget)self)->xmTabs.cornerwidth != ((XmTabsWidget)old)->xmTabs.cornerwidth || ((XmTabsWidget)self)->xmTabs.cornerheight != ((XmTabsWidget)old)->xmTabs.cornerheight) { resize_labels = TRUE; } if (((XmTabsWidget)self)->xmTabs.labels != ((XmTabsWidget)old)->xmTabs.labels) { if (((XmTabsWidget)self)->xmTabs.labels) { h = (String*) XtMalloc((((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs + 1) * sizeof(*h)); for (i = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i >= 0; i--) h[i] = XtNewString(((XmTabsWidget)self)->xmTabs.labels[i]); ((XmTabsWidget)self)->xmTabs.labels = h; } if (((XmTabsWidget)old)->xmTabs.labels) { for (i = ((XmTabsWidget)old)->xmTabs.lefttabs + ((XmTabsWidget)old)->xmTabs.righttabs; i >= 0; i--) XtFree(((XmTabsWidget)old)->xmTabs.labels[i]); XtFree((XtPointer) ((XmTabsWidget)old)->xmTabs.labels); } resize_labels = TRUE; } if (((XmTabsWidget)self)->xmTabs.tabWidthPercentage < 0 || ((XmTabsWidget)self)->xmTabs.tabWidthPercentage > 100) { XtAppWarning(XtWidgetToApplicationContext(self), "tabWidthPercentage out of range; reset to 50"); ((XmTabsWidget)self)->xmTabs.tabWidthPercentage = 50; } if (((XmTabsWidget)old)->xmTabs.tabWidthPercentage != ((XmTabsWidget)self)->xmTabs.tabWidthPercentage) resize_labels = TRUE; if (((XmTabsWidget)self)->xmTabs.lefttabs != ((XmTabsWidget)old)->xmTabs.lefttabs || ((XmTabsWidget)self)->xmTabs.righttabs != ((XmTabsWidget)old)->xmTabs.righttabs) redraw = TRUE; if (resize_labels) { compute_tabsizes(self); redraw = TRUE; } return redraw; } /*ARGSUSED*/ #if NeedFunctionPrototypes static void realize(Widget self,XtValueMask * mask,XSetWindowAttributes * attributes) #else static void realize(self,mask,attributes)Widget self;XtValueMask * mask;XSetWindowAttributes * attributes; #endif { *mask |= CWBitGravity; attributes->bit_gravity = ForgetGravity; xmManagerClassRec.core_class.realize(self, mask, attributes); set_shape(self); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void resize(Widget self) #else static void resize(self)Widget self; #endif { if (XtIsRealized(self)) XClearArea(XtDisplay(self), XtWindow(self), 0, 0, 0, 0, True); compute_tabsizes(self); set_shape(self); if ( xmManagerClassRec.core_class.resize ) xmManagerClassRec.core_class.resize(self); } /*ARGSUSED*/ #if NeedFunctionPrototypes static void expose(Widget self,XEvent * event,Region region) #else static void expose(self,event,region)Widget self;XEvent * event;Region region; #endif { int i; if (! XtIsRealized(self)) return; switch (((XmTabsWidget)self)->xmTabs.orientation) { case XfwfUpTabs: case XfwfDownTabs: for (i = 0; i < ((XmTabsWidget)self)->xmTabs.lefttabs; i++) draw_hor_tab(self, region, i); for (i = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i > ((XmTabsWidget)self)->xmTabs.lefttabs; i--) draw_hor_tab(self, region, i); draw_hor_tab(self, region, ((XmTabsWidget)self)->xmTabs.lefttabs); break; case XfwfLeftTabs: case XfwfRightTabs: for (i = 0; i < ((XmTabsWidget)self)->xmTabs.lefttabs; i++) draw_ver_tab(self, region, i); for (i = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i > ((XmTabsWidget)self)->xmTabs.lefttabs; i--) draw_ver_tab(self, region, i); draw_ver_tab(self, region, ((XmTabsWidget)self)->xmTabs.lefttabs); break; } /* Focus highlight? */ } /*ARGSUSED*/ #if NeedFunctionPrototypes static void border_highlight(void) #else static void border_highlight(void) #endif { } /*ARGSUSED*/ #if NeedFunctionPrototypes static void border_unhighlight(void) #else static void border_unhighlight(void) #endif { } /*ARGSUSED*/ #if NeedFunctionPrototypes static void destroy(Widget self) #else static void destroy(self)Widget self; #endif { int i; if (((XmTabsWidget)self)->xmTabs.labels) { for (i = ((XmTabsWidget)self)->xmTabs.lefttabs + ((XmTabsWidget)self)->xmTabs.righttabs; i >= 0; i--) XtFree(((XmTabsWidget)self)->xmTabs.labels[i]); XtFree((XtPointer) ((XmTabsWidget)self)->xmTabs.labels); } if (((XmTabsWidget)self)->xmTabs.offsets) XtFree((XtPointer) ((XmTabsWidget)self)->xmTabs.offsets); if (((XmTabsWidget)self)->xmTabs.tabwidths) XtFree((XtPointer) ((XmTabsWidget)self)->xmTabs.tabwidths); } /* *********************************************************************** * Routines for drawing rotated text * *********************************************************************** */ /* xvertext 5.0, Copyright (c) 1993 Alan Richardson (mppa3@uk.ac.sussex.syma) * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and that both the * copyright notice and this permission notice appear in supporting * documentation. All work developed as a consequence of the use of * this program should duly acknowledge such use. No representations are * made about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * 8 Jun '95: [Bert Bos] added GCClipXOrigin|GCClipYOrigin|GCClipMask * when calling XCopyGC() */ /* ********************************************************************** */ /* BETTER: xvertext now does rotation at any angle!! * * BEWARE: function arguments have CHANGED since version 2.0!! */ /* ********************************************************************** */ /* ---------------------------------------------------------------------- */ /* Make sure cache size is set */ #ifndef CACHE_SIZE_LIMIT #define CACHE_SIZE_LIMIT 0 #endif /*CACHE_SIZE_LIMIT */ /* Make sure a cache method is specified */ #ifndef CACHE_XIMAGES #ifndef CACHE_BITMAPS #define CACHE_BITMAPS #endif /*CACHE_BITMAPS*/ #endif /*CACHE_XIMAGES*/ /* ---------------------------------------------------------------------- */ /* Debugging macros */ #ifdef DEBUG static int debug=1; #else static int debug=0; #endif /*DEBUG*/ #define DEBUG_PRINT1(a) if (debug) printf (a) #define DEBUG_PRINT2(a, b) if (debug) printf (a, b) #define DEBUG_PRINT3(a, b, c) if (debug) printf (a, b, c) #define DEBUG_PRINT4(a, b, c, d) if (debug) printf (a, b, c, d) #define DEBUG_PRINT5(a, b, c, d, e) if (debug) printf (a, b, c, d, e) /* ---------------------------------------------------------------------- */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif /* ---------------------------------------------------------------------- */ /* A structure holding everything needed for a rotated string */ typedef struct rotated_text_item_template { Pixmap bitmap; XImage *ximage; char *text; char *font_name; Font fid; float angle; int align; float magnify; int cols_in; int rows_in; int cols_out; int rows_out; int nl; int max_width; float *corners_x; float *corners_y; long int size; int cached; struct rotated_text_item_template *next; } RotatedTextItem; RotatedTextItem *first_text_item=NULL; /* ---------------------------------------------------------------------- */ /* A structure holding current magnification and bounding box padding */ static struct style_template { float magnify; int bbx_pad; } style={ 1., 0 }; /* ---------------------------------------------------------------------- */ static char *my_strdup(char *str); static char *my_strtok(char *str1, char *str2); static float XRotVersion(char *str, int n); static void XRotSetMagnification(float m); static void XRotSetBoundingBoxPad(int p); static int XRotDrawString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str); static int XRotDrawImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str); static int XRotDrawAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align); static int XRotDrawAlignedImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align); static XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, float angle, int x, int y, char *text, int align); static XImage *MakeXImage(Display *dpy, int w, int h); static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg); static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg); static RotatedTextItem *XRotRetrieveFromCache(Display *dpy, XFontStruct *font, float angle, char *text, int align); static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font, float angle, char *text, int align); static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item); static void XRotFreeTextItem(Display *dpy, RotatedTextItem *item); static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage); /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Routine to mimic `strdup()' (some machines don't have it) */ /**************************************************************************/ static char *my_strdup(char *str) { char *s; if(str==NULL) return NULL; s=(char *)malloc((unsigned)(strlen(str)+1)); if(s!=NULL) strcpy(s, str); return s; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Routine to replace `strtok' : this one returns a zero length string if */ /* it encounters two consecutive delimiters */ /**************************************************************************/ static char *my_strtok(char *str1, char *str2) { char *ret; int i, j, stop; static int start, len; static char *stext; if(str2==NULL) return NULL; /* initialise if str1 not NULL */ if(str1!=NULL) { start=0; stext=str1; len=strlen(str1); } /* run out of tokens ? */ if(start>=len) return NULL; /* loop through characters */ for(i=start; i0.) style.magnify=m; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Set the padding used when calculating bounding boxes */ /**************************************************************************/ static void XRotSetBoundingBoxPad(int p) { if(p>=0) style.bbx_pad=p; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Create an XImage structure and allocate memory for it */ /**************************************************************************/ static XImage *MakeXImage(Display *dpy, int w, int h) { XImage *I; char *data; /* reserve memory for image */ data=(char *)calloc((unsigned)(((w-1)/8+1)*h), 1); if(data==NULL) return NULL; /* create the XImage */ I=XCreateImage(dpy, DefaultVisual(dpy, DefaultScreen(dpy)), 1, XYBitmap, 0, data, w, h, 8, 0); if(I==NULL) return NULL; I->byte_order=I->bitmap_bit_order=MSBFirst; return I; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* A front end to XRotPaintAlignedString: */ /* -no alignment, no background */ /**************************************************************************/ static int XRotDrawString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str) { return (XRotPaintAlignedString(dpy, font, angle, drawable, gc, x, y, str, NONE, 0)); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* A front end to XRotPaintAlignedString: */ /* -no alignment, paints background */ /**************************************************************************/ static int XRotDrawImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *str) { return(XRotPaintAlignedString(dpy, font, angle, drawable, gc, x, y, str, NONE, 1)); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* A front end to XRotPaintAlignedString: */ /* -does alignment, no background */ /**************************************************************************/ static int XRotDrawAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align) { return(XRotPaintAlignedString(dpy, font, angle, drawable, gc, x, y, text, align, 0)); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* A front end to XRotPaintAlignedString: */ /* -does alignment, paints background */ /**************************************************************************/ static int XRotDrawAlignedImageString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align) { return(XRotPaintAlignedString(dpy, font, angle, drawable, gc, x, y, text, align, 1)); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Aligns and paints a rotated string */ /**************************************************************************/ static int XRotPaintAlignedString(Display *dpy, XFontStruct *font, float angle, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg) { int i; GC my_gc; int xp, yp; float hot_x, hot_y; float hot_xp, hot_yp; float sin_angle, cos_angle; RotatedTextItem *item; Pixmap bitmap_to_paint; /* return early for NULL/empty strings */ if(text==NULL) return 0; if(strlen(text)==0) return 0; /* manipulate angle to 0<=angle<360 degrees */ while(angle<0) angle+=360; while(angle>=360) angle-=360; angle*=M_PI/180; /* horizontal text made easy */ if(angle==0. && style.magnify==1.) return(XRotDrawHorizontalString(dpy, font, drawable, gc, x, y, text, align, bg)); /* get a rotated bitmap */ item=XRotRetrieveFromCache(dpy, font, angle, text, align); if(item==NULL) return NULL; /* this gc has similar properties to the user's gc */ my_gc=XCreateGC(dpy, drawable, NULL, 0); XCopyGC(dpy, gc, GCForeground|GCBackground|GCFunction|GCPlaneMask |GCClipXOrigin|GCClipYOrigin|GCClipMask, my_gc); /* alignment : which point (hot_x, hot_y) relative to bitmap centre coincides with user's specified point? */ /* y position */ if(align==TLEFT || align==TCENTRE || align==TRIGHT) hot_y=(float)item->rows_in/2*style.magnify; else if(align==MLEFT || align==MCENTRE || align==MRIGHT) hot_y=0; else if(align==BLEFT || align==BCENTRE || align==BRIGHT) hot_y = -(float)item->rows_in/2*style.magnify; else hot_y = -((float)item->rows_in/2-(float)font->descent)*style.magnify; /* x position */ if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE) hot_x = -(float)item->max_width/2*style.magnify; else if(align==TCENTRE || align==MCENTRE || align==BCENTRE) hot_x=0; else hot_x=(float)item->max_width/2*style.magnify; /* pre-calculate sin and cos */ sin_angle=sin(angle); cos_angle=cos(angle); /* rotate hot_x and hot_y around bitmap centre */ hot_xp= hot_x*cos_angle - hot_y*sin_angle; hot_yp= hot_x*sin_angle + hot_y*cos_angle; /* text background will be drawn using XFillPolygon */ if(bg) { GC depth_one_gc; XPoint *xpoints; Pixmap empty_stipple; /* reserve space for XPoints */ xpoints=(XPoint *)malloc((unsigned)(4*item->nl*sizeof(XPoint))); if(!xpoints) return 1; /* rotate corner positions */ for(i=0; i<4*item->nl; i++) { xpoints[i].x=(float)x + ( (item->corners_x[i]-hot_x)*cos_angle + (item->corners_y[i]+hot_y)*sin_angle); xpoints[i].y=(float)y + (-(item->corners_x[i]-hot_x)*sin_angle + (item->corners_y[i]+hot_y)*cos_angle); } /* we want to swap foreground and background colors here; XGetGCValues() is only available in R4+ */ empty_stipple=XCreatePixmap(dpy, drawable, 1, 1, 1); depth_one_gc=XCreateGC(dpy, empty_stipple, NULL, 0); XSetForeground(dpy, depth_one_gc, 0); XFillRectangle(dpy, empty_stipple, depth_one_gc, 0, 0, 2, 2); XSetStipple(dpy, my_gc, empty_stipple); XSetFillStyle(dpy, my_gc, FillOpaqueStippled); XFillPolygon(dpy, drawable, my_gc, xpoints, 4*item->nl, Nonconvex, CoordModeOrigin); /* free our resources */ free((char *)xpoints); XFreeGC(dpy, depth_one_gc); XFreePixmap(dpy, empty_stipple); } /* where should top left corner of bitmap go ? */ xp=(float)x-((float)item->cols_out/2 +hot_xp); yp=(float)y-((float)item->rows_out/2 -hot_yp); /* by default we draw the rotated bitmap, solid */ bitmap_to_paint=item->bitmap; /* handle user stippling */ #ifndef X11R3 { GC depth_one_gc; XGCValues values; Pixmap new_bitmap, inverse; /* try and get some GC properties */ if(XGetGCValues(dpy, gc, GCStipple|GCFillStyle|GCForeground|GCBackground| GCTileStipXOrigin|GCTileStipYOrigin, &values)) { /* only do this if stippling requested */ if((values.fill_style==FillStippled || values.fill_style==FillOpaqueStippled) && !bg) { /* opaque stipple: draw rotated text in background colour */ if(values.fill_style==FillOpaqueStippled) { XSetForeground(dpy, my_gc, values.background); XSetFillStyle(dpy, my_gc, FillStippled); XSetStipple(dpy, my_gc, item->bitmap); XSetTSOrigin(dpy, my_gc, xp, yp); XFillRectangle(dpy, drawable, my_gc, xp, yp, item->cols_out, item->rows_out); XSetForeground(dpy, my_gc, values.foreground); } /* this will merge the rotated text and the user's stipple */ new_bitmap=XCreatePixmap(dpy, drawable, item->cols_out, item->rows_out, 1); /* create a GC */ depth_one_gc=XCreateGC(dpy, new_bitmap, NULL, 0); XSetForeground(dpy, depth_one_gc, 1); XSetBackground(dpy, depth_one_gc, 0); /* set the relative stipple origin */ XSetTSOrigin(dpy, depth_one_gc, values.ts_x_origin-xp, values.ts_y_origin-yp); /* fill the whole bitmap with the user's stipple */ XSetStipple(dpy, depth_one_gc, values.stipple); XSetFillStyle(dpy, depth_one_gc, FillOpaqueStippled); XFillRectangle(dpy, new_bitmap, depth_one_gc, 0, 0, item->cols_out, item->rows_out); /* set stipple origin back to normal */ XSetTSOrigin(dpy, depth_one_gc, 0, 0); /* this will contain an inverse copy of the rotated text */ inverse=XCreatePixmap(dpy, drawable, item->cols_out, item->rows_out, 1); /* invert text */ XSetFillStyle(dpy, depth_one_gc, FillSolid); XSetFunction(dpy, depth_one_gc, GXcopyInverted); XCopyArea(dpy, item->bitmap, inverse, depth_one_gc, 0, 0, item->cols_out, item->rows_out, 0, 0); /* now delete user's stipple everywhere EXCEPT on text */ XSetForeground(dpy, depth_one_gc, 0); XSetBackground(dpy, depth_one_gc, 1); XSetStipple(dpy, depth_one_gc, inverse); XSetFillStyle(dpy, depth_one_gc, FillStippled); XSetFunction(dpy, depth_one_gc, GXcopy); XFillRectangle(dpy, new_bitmap, depth_one_gc, 0, 0, item->cols_out, item->rows_out); /* free resources */ XFreePixmap(dpy, inverse); XFreeGC(dpy, depth_one_gc); /* this is the new bitmap */ bitmap_to_paint=new_bitmap; } } } #endif /*X11R3*/ /* paint text using stipple technique */ XSetFillStyle(dpy, my_gc, FillStippled); XSetStipple(dpy, my_gc, bitmap_to_paint); XSetTSOrigin(dpy, my_gc, xp, yp); XFillRectangle(dpy, drawable, my_gc, xp, yp, item->cols_out, item->rows_out); /* free our resources */ XFreeGC(dpy, my_gc); /* stippled bitmap no longer needed */ if(bitmap_to_paint!=item->bitmap) XFreePixmap(dpy, bitmap_to_paint); #ifdef CACHE_XIMAGES XFreePixmap(dpy, item->bitmap); #endif /*CACHE_XIMAGES*/ /* if item isn't cached, destroy it completely */ if(!item->cached) XRotFreeTextItem(dpy,item); /* we got to the end OK! */ return 0; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Draw a horizontal string in a quick fashion */ /**************************************************************************/ static int XRotDrawHorizontalString(Display *dpy, XFontStruct *font, Drawable drawable, GC gc, int x, int y, char *text, int align, int bg) { GC my_gc; int nl=1, i; int height; int xp, yp; char *str1, *str2, *str3; char *str2_a="\0", *str2_b="\n\0"; int dir, asc, desc; XCharStruct overall; DEBUG_PRINT1("**\nHorizontal text.\n"); /* this gc has similar properties to the user's gc (including stipple) */ my_gc=XCreateGC(dpy, drawable, NULL, 0); XCopyGC(dpy, gc, GCForeground|GCBackground|GCFunction|GCStipple|GCFillStyle| GCTileStipXOrigin|GCTileStipYOrigin|GCPlaneMask| GCClipXOrigin|GCClipYOrigin|GCClipMask, my_gc); XSetFont(dpy, my_gc, font->fid); /* count number of sections in string */ if(align!=NONE) for(i=0; iascent+font->descent; /* y position */ if(align==TLEFT || align==TCENTRE || align==TRIGHT) yp=y+font->ascent; else if(align==MLEFT || align==MCENTRE || align==MRIGHT) yp=y-nl*height/2+font->ascent; else if(align==BLEFT || align==BCENTRE || align==BRIGHT) yp=y-nl*height+font->ascent; else yp=y; str1=my_strdup(text); if(str1==NULL) return 1; str3=my_strtok(str1, str2); /* loop through each section in the string */ do { XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); /* where to draw section in x ? */ if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE) xp=x; else if(align==TCENTRE || align==MCENTRE || align==BCENTRE) xp=x-overall.rbearing/2; else xp=x-overall.rbearing; /* draw string onto bitmap */ if(!bg) XDrawString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3)); else XDrawImageString(dpy, drawable, my_gc, xp, yp, str3, strlen(str3)); /* move to next line */ yp+=height; str3=my_strtok((char *)NULL, str2); } while(str3!=NULL); free(str1); XFreeGC(dpy, my_gc); return 0; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Query cache for a match with this font/text/angle/alignment */ /* request, otherwise arrange for its creation */ /**************************************************************************/ static RotatedTextItem *XRotRetrieveFromCache(Display *dpy, XFontStruct *font, float angle, char *text, int align) { Font fid; char *font_name=NULL; unsigned long name_value; RotatedTextItem *item=NULL; RotatedTextItem *i1=first_text_item; /* get font name, if it exists */ if(XGetFontProperty(font, XA_FONT, &name_value)) { DEBUG_PRINT1("got font name OK\n"); font_name=XGetAtomName(dpy, name_value); fid=0; } #ifdef CACHE_FID /* otherwise rely (unreliably?) on font ID */ else { DEBUG_PRINT1("can't get fontname, caching FID\n"); font_name=NULL; fid=font->fid; } #else /* not allowed to cache font ID's */ else { DEBUG_PRINT1("can't get fontname, can't cache\n"); font_name=NULL; fid=0; } #endif /*CACHE_FID*/ /* look for a match in cache */ /* matching formula: identical text; identical fontname (if defined, font ID's if not); angles close enough (<0.00001 here, could be smaller); HORIZONTAL alignment matches, OR it's a one line string; magnifications the same */ while(i1 && !item) { /* match everything EXCEPT fontname/ID */ if(strcmp(text, i1->text)==0 && fabs(angle-i1->angle)<0.00001 && style.magnify==i1->magnify && (i1->nl==1 || ((align==0)?9:(align-1))%3== ((i1->align==0)?9:(i1->align-1))%3)) { /* now match fontname/ID */ if(font_name!=NULL && i1->font_name!=NULL) { if(strcmp(font_name, i1->font_name)==0) { item=i1; DEBUG_PRINT1("Matched against font names\n"); } else i1=i1->next; } #ifdef CACHE_FID else if(font_name==NULL && i1->font_name==NULL) { if(fid==i1->fid) { item=i1; DEBUG_PRINT1("Matched against FID's\n"); } else i1=i1->next; } #endif /*CACHE_FID*/ else i1=i1->next; } else i1=i1->next; } if(item) DEBUG_PRINT1("**\nFound target in cache.\n"); if(!item) DEBUG_PRINT1("**\nNo match in cache.\n"); /* no match */ if(!item) { /* create new item */ item=XRotCreateTextItem(dpy, font, angle, text, align); if(!item) return NULL; /* record what it shows */ item->text=my_strdup(text); /* fontname or ID */ if(font_name!=NULL) { item->font_name=my_strdup(font_name); item->fid=0; } else { item->font_name=NULL; item->fid=fid; } item->angle=angle; item->align=align; item->magnify=style.magnify; /* cache it */ XRotAddToLinkedList(dpy, item); } if(font_name) XFree(font_name); /* if XImage is cached, need to recreate the bitmap */ #ifdef CACHE_XIMAGES { GC depth_one_gc; /* create bitmap to hold rotated text */ item->bitmap=XCreatePixmap(dpy, DefaultRootWindow(dpy), item->cols_out, item->rows_out, 1); /* depth one gc */ depth_one_gc=XCreateGC(dpy, item->bitmap, NULL, 0); XSetBackground(dpy, depth_one_gc, 0); XSetForeground(dpy, depth_one_gc, 1); /* make the text bitmap from XImage */ XPutImage(dpy, item->bitmap, depth_one_gc, item->ximage, 0, 0, 0, 0, item->cols_out, item->rows_out); XFreeGC(dpy, depth_one_gc); } #endif /*CACHE_XIMAGES*/ return item; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Create a rotated text item */ /**************************************************************************/ static RotatedTextItem *XRotCreateTextItem(Display *dpy, XFontStruct *font, float angle, char *text, int align) { RotatedTextItem *item=NULL; Pixmap canvas; GC font_gc; XImage *I_in; register int i, j; char *str1, *str2, *str3; char *str2_a="\0", *str2_b="\n\0"; int height; int byte_w_in, byte_w_out; int xp, yp; float sin_angle, cos_angle; int it, jt; float di, dj; int ic=0; float xl, xr, xinc; int byte_out; int dir, asc, desc; XCharStruct overall; int old_cols_in=0, old_rows_in=0; /* allocate memory */ item=(RotatedTextItem *)malloc((unsigned)sizeof(RotatedTextItem)); if(!item) return NULL; /* count number of sections in string */ item->nl=1; if(align!=NONE) for(i=0; inl++; /* ignore newline characters if not doing alignment */ if(align==NONE) str2=str2_a; else str2=str2_b; /* find width of longest section */ str1=my_strdup(text); if(str1==NULL) return NULL; str3=my_strtok(str1, str2); XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); item->max_width=overall.rbearing; /* loop through each section */ do { str3=my_strtok((char *)NULL, str2); if(str3!=NULL) { XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); if(overall.rbearing>item->max_width) item->max_width=overall.rbearing; } } while(str3!=NULL); free(str1); /* overall font height */ height=font->ascent+font->descent; /* dimensions horizontal text will have */ item->cols_in=item->max_width; item->rows_in=item->nl*height; /* bitmap for drawing on */ canvas=XCreatePixmap(dpy, DefaultRootWindow(dpy), item->cols_in, item->rows_in, 1); /* create a GC for the bitmap */ font_gc=XCreateGC(dpy, canvas, NULL, 0); XSetBackground(dpy, font_gc, 0); XSetFont(dpy, font_gc, font->fid); /* make sure the bitmap is blank */ XSetForeground(dpy, font_gc, 0); XFillRectangle(dpy, canvas, font_gc, 0, 0, item->cols_in+1, item->rows_in+1); XSetForeground(dpy, font_gc, 1); /* pre-calculate sin and cos */ sin_angle=sin(angle); cos_angle=cos(angle); /* text background will be drawn using XFillPolygon */ item->corners_x= (float *)malloc((unsigned)(4*item->nl*sizeof(float))); if(!item->corners_x) return NULL; item->corners_y= (float *)malloc((unsigned)(4*item->nl*sizeof(float))); if(!item->corners_y) return NULL; /* draw text horizontally */ /* start at top of bitmap */ yp=font->ascent; str1=my_strdup(text); if(str1==NULL) return NULL; str3=my_strtok(str1, str2); /* loop through each section in the string */ do { XTextExtents(font, str3, strlen(str3), &dir, &asc, &desc, &overall); /* where to draw section in x ? */ if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE) xp=0; else if(align==TCENTRE || align==MCENTRE || align==BCENTRE) xp=(item->max_width-overall.rbearing)/2; else xp=item->max_width-overall.rbearing; /* draw string onto bitmap */ XDrawString(dpy, canvas, font_gc, xp, yp, str3, strlen(str3)); /* keep a note of corner positions of this string */ item->corners_x[ic]=((float)xp-(float)item->cols_in/2)*style.magnify; item->corners_y[ic]=((float)(yp-font->ascent)-(float)item->rows_in/2) *style.magnify; item->corners_x[ic+1]=item->corners_x[ic]; item->corners_y[ic+1]=item->corners_y[ic]+(float)height*style.magnify; item->corners_x[item->nl*4-1-ic]=item->corners_x[ic]+ (float)overall.rbearing*style.magnify; item->corners_y[item->nl*4-1-ic]=item->corners_y[ic]; item->corners_x[item->nl*4-2-ic]= item->corners_x[item->nl*4-1-ic]; item->corners_y[item->nl*4-2-ic]=item->corners_y[ic+1]; ic+=2; /* move to next line */ yp+=height; str3=my_strtok((char *)NULL, str2); } while(str3!=NULL); free(str1); /* create image to hold horizontal text */ I_in=MakeXImage(dpy, item->cols_in, item->rows_in); if(I_in==NULL) return NULL; /* extract horizontal text */ XGetSubImage(dpy, canvas, 0, 0, item->cols_in, item->rows_in, 1, XYPixmap, I_in, 0, 0); I_in->format=XYBitmap; /* magnify horizontal text */ if(style.magnify!=1.) { I_in=XRotMagnifyImage(dpy, I_in); old_cols_in=item->cols_in; old_rows_in=item->rows_in; item->cols_in=(float)item->cols_in*style.magnify; item->rows_in=(float)item->rows_in*style.magnify; } /* how big will rotated text be ? */ item->cols_out=fabs((float)item->rows_in*sin_angle) + fabs((float)item->cols_in*cos_angle) +0.99999 +2; item->rows_out=fabs((float)item->rows_in*cos_angle) + fabs((float)item->cols_in*sin_angle) +0.99999 +2; if(item->cols_out%2==0) item->cols_out++; if(item->rows_out%2==0) item->rows_out++; /* create image to hold rotated text */ item->ximage=MakeXImage(dpy, item->cols_out, item->rows_out); if(item->ximage==NULL) return NULL; byte_w_in=(item->cols_in-1)/8+1; byte_w_out=(item->cols_out-1)/8+1; /* we try to make this bit as fast as possible - which is why it looks a bit over-the-top */ /* vertical distance from centre */ dj=0.5-(float)item->rows_out/2; /* where abouts does text actually lie in rotated image? */ if(angle==0 || angle==M_PI/2 || angle==M_PI || angle==3*M_PI/2) { xl=0; xr=(float)item->cols_out; xinc=0; } else if(anglecols_out/2+ (dj-(float)item->rows_in/(2*cos_angle))/ tan(angle)-2; xr=(float)item->cols_out/2+ (dj+(float)item->rows_in/(2*cos_angle))/ tan(angle)+2; xinc=1./tan(angle); } else { xl=(float)item->cols_out/2+ (dj+(float)item->rows_in/(2*cos_angle))/ tan(angle)-2; xr=(float)item->cols_out/2+ (dj-(float)item->rows_in/(2*cos_angle))/ tan(angle)+2; xinc=1./tan(angle); } /* loop through all relevent bits in rotated image */ for(j=0; jrows_out; j++) { /* no point re-calculating these every pass */ di=(float)((xl<0)?0:(int)xl)+0.5-(float)item->cols_out/2; byte_out=(item->rows_out-j-1)*byte_w_out; /* loop through meaningful columns */ for(i=((xl<0)?0:(int)xl); i<((xr>=item->cols_out)?item->cols_out:(int)xr); i++) { /* rotate coordinates */ it=(float)item->cols_in/2 + ( di*cos_angle + dj*sin_angle); jt=(float)item->rows_in/2 - (-di*sin_angle + dj*cos_angle); /* set pixel if required */ if(it>=0 && itcols_in && jt>=0 && jtrows_in) if((I_in->data[jt*byte_w_in+it/8] & 128>>(it%8))>0) item->ximage->data[byte_out+i/8]|=128>>i%8; di+=1; } dj+=1; xl+=xinc; xr+=xinc; } XDestroyImage(I_in); if(style.magnify!=1.) { item->cols_in=old_cols_in; item->rows_in=old_rows_in; } #ifdef CACHE_BITMAPS /* create a bitmap to hold rotated text */ item->bitmap=XCreatePixmap(dpy, DefaultRootWindow(dpy), item->cols_out, item->rows_out, 1); /* make the text bitmap from XImage */ XPutImage(dpy, item->bitmap, font_gc, item->ximage, 0, 0, 0, 0, item->cols_out, item->rows_out); XDestroyImage(item->ximage); #endif /*CACHE_BITMAPS*/ XFreeGC(dpy, font_gc); XFreePixmap(dpy, canvas); return item; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Adds a text item to the end of the cache, removing as many items */ /* from the front as required to keep cache size below limit */ /**************************************************************************/ static void XRotAddToLinkedList(Display *dpy, RotatedTextItem *item) { static long int current_size=0; static RotatedTextItem *last=NULL; RotatedTextItem *i1=first_text_item, *i2=NULL; #ifdef CACHE_BITMAPS /* I don't know how much memory a pixmap takes in the server - probably this + a bit more we can't account for */ item->size=((item->cols_out-1)/8+1)*item->rows_out; #else /* this is pretty much the size of a RotatedTextItem */ item->size=((item->cols_out-1)/8+1)*item->rows_out + sizeof(XImage) + strlen(item->text) + item->nl*8*sizeof(float) + sizeof(RotatedTextItem); if(item->font_name!=NULL) item->size+=strlen(item->font_name); else item->size+=sizeof(Font); #endif /*CACHE_BITMAPS */ #ifdef DEBUG /* count number of items in cache, for debugging */ { int i=0; while(i1) { i++; i1=i1->next; } DEBUG_PRINT2("Cache has %d items.\n", i); i1=first_text_item; } #endif DEBUG_PRINT4("current cache size=%ld, new item=%ld, limit=%ld\n", current_size, item->size, CACHE_SIZE_LIMIT*1024); /* if this item is bigger than whole cache, forget it */ if(item->size>CACHE_SIZE_LIMIT*1024) { DEBUG_PRINT1("Too big to cache\n\n"); item->cached=0; return; } /* remove elements from cache as needed */ while(i1 && current_size+item->size>CACHE_SIZE_LIMIT*1024) { DEBUG_PRINT2("Removed %d bytes\n", i1->size); if(i1->font_name!=NULL) DEBUG_PRINT5(" (`%s'\n %s\n angle=%f align=%d)\n", i1->text, i1->font_name, i1->angle, i1->align); #ifdef CACHE_FID if(i1->font_name==NULL) DEBUG_PRINT5(" (`%s'\n FID=%ld\n angle=%f align=%d)\n", i1->text, i1->fid, i1->angle, i1->align); #endif /*CACHE_FID*/ current_size-=i1->size; i2=i1->next; /* free resources used by the unlucky item */ XRotFreeTextItem(dpy, i1); /* remove it from linked list */ first_text_item=i2; i1=i2; } /* add new item to end of linked list */ if(first_text_item==NULL) { item->next=NULL; first_text_item=item; last=item; } else { item->next=NULL; last->next=item; last=item; } /* new cache size */ current_size+=item->size; item->cached=1; DEBUG_PRINT1("Added item to cache.\n"); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Free the resources used by a text item */ /**************************************************************************/ static void XRotFreeTextItem(Display *dpy, RotatedTextItem *item) { free(item->text); if(item->font_name!=NULL) free(item->font_name); free((char *)item->corners_x); free((char *)item->corners_y); #ifdef CACHE_BITMAPS XFreePixmap(dpy, item->bitmap); #else XDestroyImage(item->ximage); #endif /* CACHE_BITMAPS */ free((char *)item); } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Magnify an XImage using bilinear interpolation */ /**************************************************************************/ static XImage *XRotMagnifyImage(Display *dpy, XImage *ximage) { int i, j; float x, y; float u,t; XImage *I_out; int cols_in, rows_in; int cols_out, rows_out; register int i2, j2; float z1, z2, z3, z4; int byte_width_in, byte_width_out; float mag_inv; /* size of input image */ cols_in=ximage->width; rows_in=ximage->height; /* size of final image */ cols_out=(float)cols_in*style.magnify; rows_out=(float)rows_in*style.magnify; /* this will hold final image */ I_out=MakeXImage(dpy, cols_out, rows_out); if(I_out==NULL) return NULL; /* width in bytes of input, output images */ byte_width_in=(cols_in-1)/8+1; byte_width_out=(cols_out-1)/8+1; /* for speed */ mag_inv=1./style.magnify; y=0.; /* loop over magnified image */ for(j2=0; j2data[j*byte_width_in+i/8] & 128>>(i%8))>0; z2=z1; z3=(ximage->data[(j+1)*byte_width_in+i/8] & 128>>(i%8))>0; z4=z3; } /* top edge */ else if(i!=cols_in-1 && j==rows_in-1) { t=x-(float)i; u=0; z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; z2=(ximage->data[j*byte_width_in+(i+1)/8] & 128>>((i+1)%8))>0; z3=z2; z4=z1; } /* top right corner */ else if(i==cols_in-1 && j==rows_in-1) { u=0; t=0; z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; z2=z1; z3=z1; z4=z1; } /* somewhere `safe' */ else { t=x-(float)i; u=y-(float)j; z1=(ximage->data[j*byte_width_in+i/8] & 128>>(i%8))>0; z2=(ximage->data[j*byte_width_in+(i+1)/8] & 128>>((i+1)%8))>0; z3=(ximage->data[(j+1)*byte_width_in+(i+1)/8] & 128>>((i+1)%8))>0; z4=(ximage->data[(j+1)*byte_width_in+i/8] & 128>>(i%8))>0; } /* if interpolated value is greater than 0.5, set bit */ if(((1-t)*(1-u)*z1 + t*(1-u)*z2 + t*u*z3 + (1-t)*u*z4)>0.5) I_out->data[j2*byte_width_out+i2/8]|=128>>i2%8; x+=mag_inv; } y+=mag_inv; } /* destroy original */ XDestroyImage(ximage); /* return big image */ return I_out; } /* ---------------------------------------------------------------------- */ /**************************************************************************/ /* Calculate the bounding box some text will have when painted */ /**************************************************************************/ static XPoint *XRotTextExtents(Display *dpy, XFontStruct *font, float angle, int x, int y, char *text, int align) { register int i; char *str1, *str2, *str3; char *str2_a="\0", *str2_b="\n\0"; int height; float sin_angle, cos_angle; int nl, max_width; int cols_in, rows_in; float hot_x, hot_y; XPoint *xp_in, *xp_out; int dir, asc, desc; XCharStruct overall; /* manipulate angle to 0<=angle<360 degrees */ while(angle<0) angle+=360; while(angle>360) angle-=360; angle*=M_PI/180; /* count number of sections in string */ nl=1; if(align!=NONE) for(i=0; imax_width) max_width=overall.rbearing; } } while(str3!=NULL); free(str1); /* overall font height */ height=font->ascent+font->descent; /* dimensions horizontal text will have */ cols_in=max_width; rows_in=nl*height; /* pre-calculate sin and cos */ sin_angle=sin(angle); cos_angle=cos(angle); /* y position */ if(align==TLEFT || align==TCENTRE || align==TRIGHT) hot_y=(float)rows_in/2*style.magnify; else if(align==MLEFT || align==MCENTRE || align==MRIGHT) hot_y=0; else if(align==BLEFT || align==BCENTRE || align==BRIGHT) hot_y = -(float)rows_in/2*style.magnify; else hot_y = -((float)rows_in/2-(float)font->descent)*style.magnify; /* x position */ if(align==TLEFT || align==MLEFT || align==BLEFT || align==NONE) hot_x = -(float)max_width/2*style.magnify; else if(align==TCENTRE || align==MCENTRE || align==BCENTRE) hot_x=0; else hot_x=(float)max_width/2*style.magnify; /* reserve space for XPoints */ xp_in=(XPoint *)malloc((unsigned)(5*sizeof(XPoint))); if(!xp_in) return NULL; xp_out=(XPoint *)malloc((unsigned)(5*sizeof(XPoint))); if(!xp_out) return NULL; /* bounding box when horizontal, relative to bitmap centre */ xp_in[0].x = -(float)cols_in*style.magnify/2-style.bbx_pad; xp_in[0].y= (float)rows_in*style.magnify/2+style.bbx_pad; xp_in[1].x= (float)cols_in*style.magnify/2+style.bbx_pad; xp_in[1].y= (float)rows_in*style.magnify/2+style.bbx_pad; xp_in[2].x= (float)cols_in*style.magnify/2+style.bbx_pad; xp_in[2].y = -(float)rows_in*style.magnify/2-style.bbx_pad; xp_in[3].x = -(float)cols_in*style.magnify/2-style.bbx_pad; xp_in[3].y = -(float)rows_in*style.magnify/2-style.bbx_pad; xp_in[4].x=xp_in[0].x; xp_in[4].y=xp_in[0].y; /* rotate and translate bounding box */ for(i=0; i<5; i++) { xp_out[i].x=(float)x + ( ((float)xp_in[i].x-hot_x)*cos_angle + ((float)xp_in[i].y+hot_y)*sin_angle); xp_out[i].y=(float)y + (-((float)xp_in[i].x-hot_x)*sin_angle + ((float)xp_in[i].y+hot_y)*cos_angle); } free((char *)xp_in); return xp_out; } /* *********************************************************************** * Conversion routines for the X resource manager * *********************************************************************** */ #if defined(__STDC__) static Boolean strtocard( Display *dsp, XrmValue *args, Cardinal *num_args, XrmValue *from, XrmValue *to, XtPointer *unused ) #else static Boolean strtocard( dsp, args, num_args, from, to, unused ) Display *dsp; XrmValue *args; Cardinal *num_args; XrmValue *from; XrmValue *to; XtPointer *unused; #endif { static Cardinal temp; if ( to->addr == NULL ) { to->addr = (XtPointer) &temp; to->size = sizeof(Cardinal); } *((Cardinal *) to->addr) = atoi( from->addr ); return True; } #define done_bert(type, value) \ do {\ if (to->addr != NULL) {\ if (to->size < sizeof(type)) {\ to->size = sizeof(type);\ return False;\ }\ *(type*)(to->addr) = (value);\ } else {\ static type static_val;\ static_val = (value);\ to->addr = (XtPointer)&static_val;\ }\ to->size = sizeof(type);\ return True;\ } while (0) static Boolean cvtStringToStringArray(Display *display, XrmValuePtr args, Cardinal *num_args, XrmValuePtr from, XrmValuePtr to, XtPointer *converter_data) { String t, s; StringArray a = NULL; Cardinal i; char delim; if (*num_args != 0) XtAppErrorMsg(XtDisplayToApplicationContext(display), "cvtStringToStringArray", "wrongParameters", "XtToolkitError", "String to StringArray conversion needs no arguments", (String*) NULL, (Cardinal*) NULL); delim = ((String) from->addr)[0]; s = XtNewString((String) from->addr + 1); i = 0; while (s && *s) { t = strchr(s, delim); if (t) *t = '\0'; a = (StringArray) XtRealloc((String) a, (i + 1) * sizeof(*a)); a[i] = s; i++; s = t ? t + 1 : NULL; } a = (StringArray) XtRealloc((String) a, (i + 1) * sizeof(*a)); a[i] = NULL; done_bert(StringArray, a); } /* *********************************************************************** * A driver for the above in the flavor of the xt utilities module * *********************************************************************** */ #define TABHT 25 typedef struct tab_data { Widget form; int cur, num_tabs; void (*activate_func)(); } *TabData; #if defined(__STDC__) static void handle_click( Widget w, TabData td, XtPointer call_data ) #else static void handle_click(w, td, call_data) Widget w; TabData td; XtPointer call_data; #endif { int tab = (int) call_data; /* note that the tab is relative to the current tab. * if tab is 0, the user clicked on the current one. * there is nothing to do */ if (tab == 0) return; td->cur += tab; /* Change tabs. We must manually inform the UI which tab is current */ XtVaSetValues( w, XtNlefttabs, td->cur, XtNrighttabs, td->num_tabs - td->cur - 1, NULL ); (*td->activate_func)( td->form, td->cur ); } /* * PUBLIC: Widget __vi_CreateTabbedFolder * PUBLIC: __P((String, Widget, String, int, void (*)(Widget, int))); */ #if defined(__STDC__) Widget __vi_CreateTabbedFolder( String name, Widget parent, String tab_labels, int num_tabs, void (*activate_func)() ) #else Widget __vi_CreateTabbedFolder( name, parent, tab_labels, num_tabs, activate_func ) String name; String tab_labels; Widget parent; int num_tabs; void (*activate_func)(); #endif { Widget tabs; TabData td = (TabData) malloc( sizeof(struct tab_data) ); int i; XtAppSetTypeConverter( XtDisplayToApplicationContext(XtDisplay(parent)), XtRString, XtRCardinal, strtocard, NULL, 0, XtCacheNone, NULL ); /* init our internal structure */ td->cur = 0; td->num_tabs = num_tabs; td->activate_func = activate_func; /* tabs go on the top */ tabs = XtVaCreateManagedWidget( "tabs", xmTabsWidgetClass, parent, XtNlefttabs, 0, XtNrighttabs, num_tabs-1, XtNorientation, XfwfUpTabs, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNleftOffset, TABHT/4, XmNrightAttachment,XmATTACH_FORM, XmNrightOffset, TABHT/4, XmNbottomAttachment,XmATTACH_OPPOSITE_FORM, XmNbottomOffset, -TABHT, XtNlabels, tab_labels, XtVaTypedArg, XtNlabels, XtRString, tab_labels, strlen(tab_labels) + 1, NULL ); /* add the callback */ XtAddCallback( tabs, XtNactivateCallback, (XtCallbackProc) handle_click, td ); /* another form to hold the controls */ td->form = XtVaCreateWidget( "form", xmFormWidgetClass, parent, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, tabs, XmNleftAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL ); /* done */ return td->form; } nvi-1.81.6/motif_l/extern.h0100444000076400001440000000261410720065712014561 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ void __vi_InitCopyPaste __P((int (*)(), int (*)(), int (*)(), int (*)())); void __vi_AcquirePrimary __P((Widget)); void __vi_PasteFromClipboard __P((Widget)); void __vi_send_command_string __P((String)); void __vi_cancel_cb __P((Widget, XtPointer, XtPointer)); void __vi_modal_dialog __P((Widget)); Widget vi_create_menubar __P((Widget)); int __vi_editopt __P((IPVI *, const char *, u_int32_t, const char *, u_int32_t, u_int32_t)); void __vi_show_options_dialog __P((Widget, String)); int __vi_toggle __P((char *)); Widget __vi_create_search_toggles __P((Widget, optData[])); void __vi_set_text_ruler __P((int, int)); void __vi_search __P((Widget)); void __XutConvertResources __P((Widget, String, XutResource *, int)); void __vi_set_scroll_block __P((void)); void __vi_clear_scroll_block __P((void)); void vi_input_func __P((XtPointer, int *, XtInputId *)); void __vi_draw_text __P((xvi_screen *, int, int, int)); void __vi_expose_func __P((Widget, XtPointer, XtPointer)); Widget vi_create_editor __P((String, Widget, void (*)(void))); void __vi_set_cursor __P((xvi_screen *, int)); void __vi_set_word_at_caret __P((xvi_screen *)); void draw_caret __P((xvi_screen *)); void __vi_erase_caret __P((xvi_screen *)); void __vi_move_caret __P((xvi_screen *, int, int)); Widget __vi_CreateTabbedFolder __P((String, Widget, String, int, void (*)(Widget, int))); nvi-1.81.6/perl_api/0040755000076400001440000000000010720065712013247 5ustar skimousersnvi-1.81.6/perl_api/VI.pod0100644000076400001440000001176610720065506014302 0ustar skimousers=head1 NAME VI - VI module within perl embedded nvi =head1 SYNOPSIS sub wc { my $words; $i = $VI::StartLine; while ($i <= $VI::StopLine) { $_ = $curscr->GetLine($i++); $words+=split; } $curscr->Msg("$words words"); } =head1 DESCRIPTION This pseudo module is available to perl programs run from within nvi and provides access to the files being edited and some internal data. Beware that you should not use this module from within a C or from within an C block or a C method. =head2 Variables These are set by nvi before starting each perl command. =over 8 =item * $curscr Object that represents the current screen. It can be used as the ScreenId parameter of the functions below, or you can use object oriented syntax. # the following two are equivalent $curscr->DelLine(57); VI::DelLine($curscr, 57); =item * $StartLine Line number of the first line of the selected range or of the file if no range was specified. =item * $StopLine Line number of the last line of the selected range or of the file if no range was specified. =back =head2 Functions =over 8 =item * AppendLine VI::AppendLine(screenId,lineNumber,text); Append the string text after the line in lineNumber. =item * DelLine VI::DelLine(screenId,lineNum); Delete lineNum. =item * EndScreen VI::EndScreen(screenId); End a screen. =item * FindScreen VI::FindScreen(file); Return the screen id associated with file name. =item * GetCursor ($line, $column) = VI::GetCursor(screenId); Return the current cursor position as a list with two elements. =item * GetLine VI::GetLine(screenId,lineNumber); Return lineNumber. =item * GetMark ($line, $column) = VI::GetMark(screenId,mark); Return the mark's cursor position as a list with two elements. =item * GetOpt VI::GetOpt(screenId,option); Return the value of an option. =item * InsertLine VI::InsertLine(screenId,lineNumber,text); Insert the string text before the line in lineNumber. =item * LastLine VI::LastLine(screenId); Return the last line in the screen. =item * MapKey VI::MapKey(screenId,key,perlproc); Associate a key with a perl procedure. =item * Msg VI::Msg(screenId,text); Set the message line to text. =item * NewScreen VI::NewScreen(screenId); VI::NewScreen(screenId,file); Create a new screen. If a filename is specified then the screen is opened with that file. =item * Run VI::Run(screenId,cmd); Run the ex command cmd. =item * SetCursor VI::SetCursor(screenId,line,column); Set the cursor to the line and column numbers supplied. =item * SetLine VI::SetLine(screenId,lineNumber,text); Set lineNumber to the text supplied. =item * SetMark VI::SetMark(screenId,mark,line,column); Set the mark to the line and column numbers supplied. =item * SetOpt VI::SetOpt(screenId,command); Set an option. =item * SwitchScreen VI::SwitchScreen(screenId,screenId); Change the current focus to screen. =item * TagQ $screen->TagQ("tag identification string") Creates a new tag queue object associated to $screen to which "tags" can be added. See further about methods you can use on tag queues. =item * UnmapKey VI::UnmmapKey(screenId,key); Unmap a key. =item * Warn This is the default warning handler. It adds any warnings to the error string. =item * Opt $screen->Opt; Returns a tied hash representing the options of the screen. Note that you can only retrieve and set hash elements. =item * Map $screen->Map; Returns a tied hash representing the mappings of the screen. Note that you can only retrieve, set and delete hash elements. =item * Mark $screen->Mark; Returns a tied hash representing the marks of the screen. =item * Line $screen->Line; Returns a tied array representing the lines of the screen. =back =head2 Tag queue methods =item * Add $tagq->Add($filename, $searchstring, $msg) Adds a tag to the tag queue. The $searchstring argument is (line)number or a string representing a regular expression. =item * Push $tagq->Push() Pushes the tag queue onto its associated screen. The result of the operation is as if the user had enter the tag command and nvi had found the locations that were added using the Add method. For an example, see the make.pl script. =back =head1 EXAMPLES sub showmarks { my ($mark, $all); for $mark ('a' .. 'z') { eval {VI::GetMark($VI::ScreenId, $mark)}; $all .= $mark unless ($@); } VI::Msg($VI::ScreenId,"Set marks: $all"); } sub forall { my ($code) = shift; my ($i) = $VI::StartLine-1; while (++$i <= $VI::StopLine) { $_ = VI::GetLine($VI::ScreenId, $i); VI::SetLine($VI::ScreenId, $i, $_) if(&$code); } } Now you can do :perl forall sub{s/perlre/substitution/} Although you'll probably use :perldo s/perlre/substitution/ instead. See L for perl regular expressions. =head1 SEE ALSO L =head1 AUTHOR Sven Verdoolaege nvi-1.81.6/perl_api/nviperl.pod0100644000076400001440000000175110720065506015434 0ustar skimousers=head1 NAME nviperl - nvi with embedded perl =head1 SYNOPSIS :perl require 'wc.pl' :perl wc :,$perldo $_=reverse($_) =head1 DESCRIPTION nvi with embedded perl allows you to run perl commands from within nvi. Two additional commands are made available when you enable the perl interpreter: =over 8 =item * perl cmd The perl command passes the specified commands to the perl interpreter. The C<$VI::ScreenId>, C<$VI::StartLine> and C<$VI::StopLine> are set. To find out how to maniplulate the nvi screens, see L. =item * perldo cmd The perldo command runs the specified commands on each line of the range (every line of the file if no range specified). Before running the command the line is copied into $_. If the command returns a true value the line is replaced by the new value of $_. The perldo commando does B set the C variables. (If you think this is a bad idea, tell me.) =back =head1 SEE ALSO L =head1 AUTHOR Sven Verdoolaege nvi-1.81.6/perl_api/perl.xs0100644000076400001440000007277610720065506014606 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1995 * George V. Neville-Neil. All rights reserved. * Copyright (c) 1996-2001 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #undef VI #ifndef lint static const char sccsid[] = "$Id: perl.xs,v 8.46 2001/08/28 11:33:42 skimo Exp $ (Berkeley) $Date: 2001/08/28 11:33:42 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* perl redefines them * avoid warnings */ #undef USE_DYNAMIC_LOADING #undef DEBUG #undef PACKAGE #undef ARGS #define ARGS ARGS #include "config.h" #include "../common/common.h" #include "../perl_api/extern.h" #ifndef DEFSV #define DEFSV GvSV(defgv) #endif #ifndef ERRSV #define ERRSV GvSV(errgv) #endif #ifndef dTHX #define dTHXs #else #define dTHXs dTHX; #endif static void msghandler __P((SCR *, mtype_t, char *, size_t)); typedef struct _perl_data { PerlInterpreter* interp; SV *svcurscr, *svstart, *svstop, *svid; CONVWIN cw; char *errmsg; } perl_data_t; #define PERLP(sp) ((perl_data_t *)sp->wp->perl_private) #define CHAR2INTP(sp,n,nlen,w,wlen) \ CHAR2INT5(sp,((perl_data_t *)sp->wp->perl_private)->cw,n,nlen,w,wlen) /* * INITMESSAGE -- * Macros to point messages at the Perl message handler. */ #define INITMESSAGE(sp) \ scr_msg = sp->wp->scr_msg; \ sp->wp->scr_msg = msghandler; #define ENDMESSAGE(sp) \ sp->wp->scr_msg = scr_msg; \ if (rval) croak(PERLP(sp)->errmsg); void xs_init __P((pTHXo)); /* * perl_end -- * Clean up perl interpreter * * PUBLIC: int perl_end __P((GS *)); */ int perl_end(gp) GS *gp; { /* * Call perl_run and perl_destuct to call END blocks and DESTROY * methods. */ if (gp->perl_interp) { perl_run(gp->perl_interp); perl_destruct(gp->perl_interp); #if defined(DEBUG) || defined(PURIFY) || defined(LIBRARY) perl_free(gp->perl_interp); #endif /* XXX rather make sure only one thread calls perl_end */ gp->perl_interp = 0; } } /* * perl_eval * Evaluate a string * We don't use mortal SVs because no one will clean up after us */ static void perl_eval(string) char *string; { dTHXs SV* sv = newSVpv(string, 0); /* G_KEEPERR to catch syntax error; better way ? */ sv_setpv(ERRSV,""); perl_eval_sv(sv, G_DISCARD | G_NOARGS | G_KEEPERR); SvREFCNT_dec(sv); } /* * perl_init -- * Create the perl commands used by nvi. * * PUBLIC: int perl_init __P((SCR *)); */ int perl_init(scrp) SCR *scrp; { AV * av; GS *gp; WIN *wp; char *bootargs[] = { "VI", NULL }; #ifndef USE_SFIO SV *svcurscr; #endif perl_data_t *pp; static char *args[] = { "", "-e", "" }; size_t length; char *file = __FILE__; gp = scrp->gp; wp = scrp->wp; if (gp->perl_interp == NULL) { gp->perl_interp = perl_alloc(); perl_construct(gp->perl_interp); if (perl_parse(gp->perl_interp, xs_init, 3, args, 0)) { perl_destruct(gp->perl_interp); perl_free(gp->perl_interp); gp->perl_interp = NULL; return 1; } { dTHXs perl_call_argv("VI::bootstrap", G_DISCARD, bootargs); perl_eval("$SIG{__WARN__}='VI::Warn'"); av_unshift(av = GvAVn(PL_incgv), 1); av_store(av, 0, newSVpv(_PATH_PERLSCRIPTS, sizeof(_PATH_PERLSCRIPTS)-1)); #ifdef USE_SFIO sfdisc(PerlIO_stdout(), sfdcnewnvi(scrp)); sfdisc(PerlIO_stderr(), sfdcnewnvi(scrp)); #else svcurscr = perl_get_sv("curscr", TRUE); sv_magic((SV *)gv_fetchpv("STDOUT",TRUE, SVt_PVIO), svcurscr, 'q', Nullch, 0); sv_magic((SV *)gv_fetchpv("STDERR",TRUE, SVt_PVIO), svcurscr, 'q', Nullch, 0); #endif /* USE_SFIO */ } } MALLOC(scrp, pp, perl_data_t *, sizeof(perl_data_t)); wp->perl_private = pp; memset(&pp->cw, 0, sizeof(pp->cw)); #ifdef USE_ITHREADS pp->interp = perl_clone(gp->perl_interp, 0); if (1) { /* hack for bug fixed in perl-current (5.6.1) */ dTHXa(pp->interp); if (PL_scopestack_ix == 0) { ENTER; } } #else pp->interp = gp->perl_interp; #endif pp->errmsg = 0; { dTHXs SvREADONLY_on(pp->svcurscr = perl_get_sv("curscr", TRUE)); SvREADONLY_on(pp->svstart = perl_get_sv("VI::StartLine", TRUE)); SvREADONLY_on(pp->svstop = perl_get_sv("VI::StopLine", TRUE)); SvREADONLY_on(pp->svid = perl_get_sv("VI::ScreenId", TRUE)); } return (0); } /* * perl_screen_end * Remove all refences to the screen to be destroyed * * PUBLIC: int perl_screen_end __P((SCR*)); */ int perl_screen_end(scrp) SCR *scrp; { dTHXs if (scrp->perl_private) { sv_setiv((SV*) scrp->perl_private, 0); } return 0; } static void my_sighandler(i) int i; { croak("Perl command interrupted by SIGINT"); } /* Create a new reference to an SV pointing to the SCR structure * The perl_private part of the SCR structure points to the SV, * so there can only be one such SV for a particular SCR structure. * When the last reference has gone (DESTROY is called), * perl_private is reset; When the screen goes away before * all references are gone, the value of the SV is reset; * any subsequent use of any of those reference will produce * a warning. (see typemap) */ static SV * newVIrv(rv, screen) SV *rv; SCR *screen; { dTHXs if (!screen) return sv_setsv(rv, &PL_sv_undef), rv; sv_upgrade(rv, SVt_RV); if (!screen->perl_private) { screen->perl_private = newSV(0); sv_setiv(screen->perl_private, (IV) screen); } else SvREFCNT_inc(screen->perl_private); SvRV(rv) = screen->perl_private; SvROK_on(rv); return sv_bless(rv, gv_stashpv("VI", TRUE)); } /* * perl_setenv * Use perl's setenv if perl interpreter has been started. * Perl uses its own setenv and gets confused if we change * the environment after it has started. * * PUBLIC: int perl_setenv __P((SCR* sp, const char *name, const char *value)); */ int perl_setenv(SCR* scrp, const char *name, const char *value) { if (scrp->wp->perl_private == NULL) { if (value == NULL) unsetenv(name); else setenv(name, value, 1); } else my_setenv(name, value); } /* * perl_ex_perl -- :[line [,line]] perl [command] * Run a command through the perl interpreter. * * PUBLIC: int perl_ex_perl __P((SCR*, CHAR_T *, size_t, db_recno_t, db_recno_t)); */ int perl_ex_perl(scrp, cmdp, cmdlen, f_lno, t_lno) SCR *scrp; CHAR_T *cmdp; size_t cmdlen; db_recno_t f_lno, t_lno; { WIN *wp; size_t length; size_t len; char *err; char *np; size_t nlen; Signal_t (*istat)(); perl_data_t *pp; /* Initialize the interpreter. */ if (scrp->wp->perl_private == NULL && perl_init(scrp)) return (1); pp = scrp->wp->perl_private; { dTHXs dSP; sv_setiv(pp->svstart, f_lno); sv_setiv(pp->svstop, t_lno); newVIrv(pp->svcurscr, scrp); /* Backwards compatibility. */ newVIrv(pp->svid, scrp); istat = signal(SIGINT, my_sighandler); INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen); perl_eval(np); signal(SIGINT, istat); SvREFCNT_dec(SvRV(pp->svcurscr)); SvROK_off(pp->svcurscr); SvREFCNT_dec(SvRV(pp->svid)); SvROK_off(pp->svid); err = SvPV(ERRSV, length); if (!length) return (0); err[length - 1] = '\0'; msgq(scrp, M_ERR, "perl: %s", err); return (1); } } /* * replace_line * replace a line with the contents of the perl variable $_ * lines are split at '\n's * if $_ is undef, the line is deleted * returns possibly adjusted linenumber */ static int replace_line(scrp, line, t_lno, defsv) SCR *scrp; db_recno_t line, *t_lno; SV *defsv; { char *str, *next; CHAR_T *wp; size_t len, wlen; dTHXs if (SvOK(defsv)) { str = SvPV(defsv,len); next = memchr(str, '\n', len); CHAR2INTP(scrp, str, next ? (next - str) : len, wp, wlen); api_sline(scrp, line, wp, wlen); while (next++) { len -= next - str; next = memchr(str = next, '\n', len); CHAR2INTP(scrp, str, next ? (next - str) : len, wp, wlen); api_iline(scrp, ++line, wp, wlen); (*t_lno)++; } } else { api_dline(scrp, line--); (*t_lno)--; } return line; } /* * perl_ex_perldo -- :[line [,line]] perl [command] * Run a set of lines through the perl interpreter. * * PUBLIC: int perl_ex_perldo __P((SCR*, CHAR_T *, size_t, db_recno_t, db_recno_t)); */ int perl_ex_perldo(scrp, cmdp, cmdlen, f_lno, t_lno) SCR *scrp; CHAR_T *cmdp; size_t cmdlen; db_recno_t f_lno, t_lno; { CHAR_T *p; WIN *wp; size_t length; size_t len; db_recno_t i; CHAR_T *str; char *estr; SV* cv; char *command; perl_data_t *pp; char *np; size_t nlen; /* Initialize the interpreter. */ if (scrp->wp->perl_private == NULL && perl_init(scrp)) return (1); pp = scrp->wp->perl_private; { dTHXs dSP; newVIrv(pp->svcurscr, scrp); /* Backwards compatibility. */ newVIrv(pp->svid, scrp); INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen); if (!(command = malloc(length = nlen - 1 + sizeof("sub {}")))) return 1; snprintf(command, length, "sub {%s}", np); ENTER; SAVETMPS; cv = perl_eval_pv(command, FALSE); free (command); estr = SvPV(ERRSV,length); if (length) goto err; for (i = f_lno; i <= t_lno && !api_gline(scrp, i, &str, &len); i++) { INT2CHAR(scrp, str, len, np, nlen); sv_setpvn(DEFSV,np,nlen); sv_setiv(pp->svstart, i); sv_setiv(pp->svstop, i); PUSHMARK(sp); perl_call_sv(cv, G_SCALAR | G_EVAL); estr = SvPV(ERRSV, length); if (length) break; SPAGAIN; if(SvTRUEx(POPs)) i = replace_line(scrp, i, &t_lno, DEFSV); PUTBACK; } FREETMPS; LEAVE; SvREFCNT_dec(SvRV(pp->svcurscr)); SvROK_off(pp->svcurscr); SvREFCNT_dec(SvRV(pp->svid)); SvROK_off(pp->svid); if (!length) return (0); err: estr[length - 1] = '\0'; msgq(scrp, M_ERR, "perl: %s", estr); return (1); } } /* * msghandler -- * Perl message routine so that error messages are processed in * Perl, not in nvi. */ static void msghandler(sp, mtype, msg, len) SCR *sp; mtype_t mtype; char *msg; size_t len; { char *errmsg; errmsg = PERLP(sp)->errmsg; /* Replace the trailing with an EOS. */ /* Let's do that later instead */ if (errmsg) free (errmsg); errmsg = malloc(len + 1); memcpy(errmsg, msg, len); errmsg[len] = '\0'; PERLP(sp)->errmsg = errmsg; } typedef SCR * VI; typedef SCR * VI__OPT; typedef SCR * VI__MAP; typedef SCR * VI__MARK; typedef SCR * VI__LINE; typedef AV * AVREF; typedef struct { SV *sprv; TAGQ *tqp; } perl_tagq; typedef perl_tagq * VI__TAGQ; typedef perl_tagq * VI__TAGQ2; MODULE = VI PACKAGE = VI # msg -- # Set the message line to text. # # Perl Command: VI::Msg # Usage: VI::Msg screenId text void Msg(screen, text) VI screen char * text ALIAS: PRINT = 1 CODE: api_imessage(screen, text); # XS_VI_escreen -- # End a screen. # # Perl Command: VI::EndScreen # Usage: VI::EndScreen screenId void EndScreen(screen) VI screen PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_escreen(screen); ENDMESSAGE(screen); # XS_VI_iscreen -- # Create a new screen. If a filename is specified then the screen # is opened with that file. # # Perl Command: VI::NewScreen # Usage: VI::NewScreen screenId [file] VI Edit(screen, ...) VI screen ALIAS: NewScreen = 1 PROTOTYPE: $;$ PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *file; SCR *nsp; CODE: file = (items == 1) ? NULL : (char *)SvPV(ST(1),PL_na); INITMESSAGE(screen); rval = api_edit(screen, file, &nsp, ix); ENDMESSAGE(screen); RETVAL = ix ? nsp : screen; OUTPUT: RETVAL # XS_VI_fscreen -- # Return the screen id associated with file name. # # Perl Command: VI::FindScreen # Usage: VI::FindScreen file VI FindScreen(file) char *file PREINIT: SCR *fsp; CODE: RETVAL = api_fscreen(0, file); OUTPUT: RETVAL # XS_VI_GetFileName -- # Return the file name of the screen # # Perl Command: VI::GetFileName # Usage: VI::GetFileName screenId char * GetFileName(screen) VI screen; PPCODE: EXTEND(sp,1); PUSHs(sv_2mortal(newSVpv(screen->frp->name, 0))); # XS_VI_aline -- # -- Append the string text after the line in lineNumber. # # Perl Command: VI::AppendLine # Usage: VI::AppendLine screenId lineNumber text void AppendLine(screen, linenumber, text) VI screen int linenumber char *text PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; size_t length; CODE: SvPV(ST(2), length); INITMESSAGE(screen); rval = api_aline(screen, linenumber, text, length); ENDMESSAGE(screen); # XS_VI_dline -- # Delete lineNum. # # Perl Command: VI::DelLine # Usage: VI::DelLine screenId lineNum void DelLine(screen, linenumber) VI screen int linenumber PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_dline(screen, (db_recno_t)linenumber); ENDMESSAGE(screen); # XS_VI_gline -- # Return lineNumber. # # Perl Command: VI::GetLine # Usage: VI::GetLine screenId lineNumber char * GetLine(screen, linenumber) VI screen int linenumber PREINIT: size_t len; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *line; CHAR_T *p; PPCODE: INITMESSAGE(screen); rval = api_gline(screen, (db_recno_t)linenumber, &p, &len); ENDMESSAGE(screen); EXTEND(sp,1); PUSHs(sv_2mortal(newSVpv(len ? (char *)p : "", len))); # XS_VI_sline -- # Set lineNumber to the text supplied. # # Perl Command: VI::SetLine # Usage: VI::SetLine screenId lineNumber text void SetLine(screen, linenumber, text) VI screen int linenumber char *text PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; size_t length; size_t len; CHAR_T *line; CODE: SvPV(ST(2), length); INITMESSAGE(screen); CHAR2INTP(screen, text, length, line, len); rval = api_sline(screen, linenumber, line, len); ENDMESSAGE(screen); # XS_VI_iline -- # Insert the string text before the line in lineNumber. # # Perl Command: VI::InsertLine # Usage: VI::InsertLine screenId lineNumber text void InsertLine(screen, linenumber, text) VI screen int linenumber char *text PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; size_t length; size_t len; CHAR_T *line; CODE: SvPV(ST(2), length); INITMESSAGE(screen); CHAR2INTP(screen, text, length, line, len); rval = api_iline(screen, linenumber, line, len); ENDMESSAGE(screen); # XS_VI_lline -- # Return the last line in the screen. # # Perl Command: VI::LastLine # Usage: VI::LastLine screenId int LastLine(screen) VI screen PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_lline(screen, &last); ENDMESSAGE(screen); RETVAL=last; OUTPUT: RETVAL # XS_VI_getmark -- # Return the mark's cursor position as a list with two elements. # {line, column}. # # Perl Command: VI::GetMark # Usage: VI::GetMark screenId mark void GetMark(screen, mark) VI screen char mark PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; PPCODE: INITMESSAGE(screen); rval = api_getmark(screen, (int)mark, &cursor); ENDMESSAGE(screen); EXTEND(sp,2); PUSHs(sv_2mortal(newSViv(cursor.lno))); PUSHs(sv_2mortal(newSViv(cursor.cno))); # XS_VI_setmark -- # Set the mark to the line and column numbers supplied. # # Perl Command: VI::SetMark # Usage: VI::SetMark screenId mark line column void SetMark(screen, mark, line, column) VI screen char mark int line int column PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); cursor.lno = line; cursor.cno = column; rval = api_setmark(screen, (int)mark, &cursor); ENDMESSAGE(screen); # XS_VI_getcursor -- # Return the current cursor position as a list with two elements. # {line, column}. # # Perl Command: VI::GetCursor # Usage: VI::GetCursor screenId void GetCursor(screen) VI screen PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; PPCODE: INITMESSAGE(screen); rval = api_getcursor(screen, &cursor); ENDMESSAGE(screen); EXTEND(sp,2); PUSHs(sv_2mortal(newSViv(cursor.lno))); PUSHs(sv_2mortal(newSViv(cursor.cno))); # XS_VI_setcursor -- # Set the cursor to the line and column numbers supplied. # # Perl Command: VI::SetCursor # Usage: VI::SetCursor screenId line column void SetCursor(screen, line, column) VI screen int line int column PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); cursor.lno = line; cursor.cno = column; rval = api_setcursor(screen, &cursor); ENDMESSAGE(screen); # XS_VI_swscreen -- # Change the current focus to screen. # # Perl Command: VI::SwitchScreen # Usage: VI::SwitchScreen screenId screenId void SwitchScreen(screenFrom, screenTo) VI screenFrom VI screenTo PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screenFrom); rval = api_swscreen(screenFrom, screenTo); ENDMESSAGE(screenFrom); # XS_VI_map -- # Associate a key with a perl procedure. # # Perl Command: VI::MapKey # Usage: VI::MapKey screenId key perlproc void MapKey(screen, key, commandsv) VI screen char *key SV *commandsv PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; int length; char *command; CODE: INITMESSAGE(screen); command = SvPV(commandsv, length); rval = api_map(screen, key, command, length); ENDMESSAGE(screen); # XS_VI_unmap -- # Unmap a key. # # Perl Command: VI::UnmapKey # Usage: VI::UnmmapKey screenId key void UnmapKey(screen, key) VI screen char *key PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_unmap(screen, key); ENDMESSAGE(screen); # XS_VI_opts_set -- # Set an option. # # Perl Command: VI::SetOpt # Usage: VI::SetOpt screenId setting void SetOpt(screen, setting) VI screen char *setting PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; SV *svc; CODE: INITMESSAGE(screen); svc = sv_2mortal(newSVpv(":set ", 5)); sv_catpv(svc, setting); rval = api_run_str(screen, SvPV(svc, PL_na)); ENDMESSAGE(screen); # XS_VI_opts_get -- # Return the value of an option. # # Perl Command: VI::GetOpt # Usage: VI::GetOpt screenId option void GetOpt(screen, option) VI screen char *option PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *value; CHAR_T *wp; size_t wlen; PPCODE: INITMESSAGE(screen); CHAR2INTP(screen, option, strlen(option)+1, wp, wlen); rval = api_opts_get(screen, wp, &value, NULL); ENDMESSAGE(screen); EXTEND(SP,1); PUSHs(sv_2mortal(newSVpv(value, 0))); free(value); # XS_VI_run -- # Run the ex command cmd. # # Perl Command: VI::Run # Usage: VI::Run screenId cmd void Run(screen, command) VI screen char *command; PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_run_str(screen, command); ENDMESSAGE(screen); void DESTROY(screensv) SV* screensv PREINIT: VI screen; CODE: if (sv_isa(screensv, "VI")) { IV tmp = SvIV((SV*)SvRV(screensv)); screen = (SCR *) tmp; } else croak("screen is not of type VI"); if (screen) screen->perl_private = 0; void Warn(warning) char *warning; CODE: sv_catpv(ERRSV,warning); #define TIED(kind,package) \ sv_magic((SV *) (var = \ (kind##V *)sv_2mortal((SV *)new##kind##V())), \ sv_setref_pv(sv_newmortal(), package, \ newVIrv(newSV(0), screen)),\ 'P', Nullch, 0);\ RETVAL = newRV((SV *)var) SV * Opt(screen) VI screen; PREINIT: HV *var; CODE: TIED(H,"VI::OPT"); OUTPUT: RETVAL SV * Map(screen) VI screen; PREINIT: HV *var; CODE: TIED(H,"VI::MAP"); OUTPUT: RETVAL SV * Mark(screen) VI screen PREINIT: HV *var; CODE: TIED(H,"VI::MARK"); OUTPUT: RETVAL SV * Line(screen) VI screen PREINIT: AV *var; CODE: TIED(A,"VI::LINE"); OUTPUT: RETVAL SV * TagQ(screen, tag) VI screen char *tag; PREINIT: perl_tagq *ptag; PPCODE: if ((ptag = malloc(sizeof(perl_tagq))) == NULL) goto err; ptag->sprv = newVIrv(newSV(0), screen); ptag->tqp = api_tagq_new(screen, tag); if (ptag->tqp != NULL) { EXTEND(SP,1); PUSHs(sv_2mortal(sv_setref_pv(newSV(0), "VI::TAGQ", ptag))); } else { err: ST(0) = &PL_sv_undef; return; } MODULE = VI PACKAGE = VI::OPT void DESTROY(screen) VI::OPT screen CODE: # typemap did all the checking SvREFCNT_dec((SV*)SvIV((SV*)SvRV(ST(0)))); void FETCH(screen, key) VI::OPT screen char *key PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *value; int boolvalue; CHAR_T *wp; size_t wlen; PPCODE: INITMESSAGE(screen); CHAR2INTP(screen, key, strlen(key)+1, wp, wlen); rval = api_opts_get(screen, wp, &value, &boolvalue); if (!rval) { EXTEND(SP,1); PUSHs(sv_2mortal((boolvalue == -1) ? newSVpv(value, 0) : newSViv(boolvalue))); free(value); } else ST(0) = &PL_sv_undef; rval = 0; ENDMESSAGE(screen); void STORE(screen, key, value) VI::OPT screen char *key SV *value PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CHAR_T *wp; size_t wlen; CODE: INITMESSAGE(screen); CHAR2INTP(screen, key, strlen(key)+1, wp, wlen); rval = api_opts_set(screen, wp, SvPV(value, PL_na), SvIV(value), SvTRUEx(value)); ENDMESSAGE(screen); MODULE = VI PACKAGE = VI::MAP void DESTROY(screen) VI::MAP screen CODE: # typemap did all the checking SvREFCNT_dec((SV*)SvIV((SV*)SvRV(ST(0)))); void STORE(screen, key, commandsv) VI::MAP screen char *key SV *commandsv PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; int length; char *command; CODE: INITMESSAGE(screen); command = SvPV(commandsv, length); rval = api_map(screen, key, command, length); ENDMESSAGE(screen); void DELETE(screen, key) VI::MAP screen char *key PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_unmap(screen, key); ENDMESSAGE(screen); MODULE = VI PACKAGE = VI::MARK void DESTROY(screen) VI::MARK screen CODE: # typemap did all the checking SvREFCNT_dec((SV*)SvIV((SV*)SvRV(ST(0)))); int EXISTS(screen, mark) VI::MARK screen char mark PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval = 0; /* never croak */ int missing; CODE: INITMESSAGE(screen); missing = api_getmark(screen, (int)mark, &cursor); ENDMESSAGE(screen); RETVAL = !missing; OUTPUT: RETVAL AV * FETCH(screen, mark) VI::MARK screen char mark PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_getmark(screen, (int)mark, &cursor); ENDMESSAGE(screen); RETVAL = newAV(); av_push(RETVAL, newSViv(cursor.lno)); av_push(RETVAL, newSViv(cursor.cno)); OUTPUT: RETVAL void STORE(screen, mark, pos) VI::MARK screen char mark AVREF pos PREINIT: struct _mark cursor; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: if (av_len(pos) < 1) croak("cursor position needs 2 elements"); INITMESSAGE(screen); cursor.lno = SvIV(*av_fetch(pos, 0, 0)); cursor.cno = SvIV(*av_fetch(pos, 1, 0)); rval = api_setmark(screen, (int)mark, &cursor); ENDMESSAGE(screen); void FIRSTKEY(screen, ...) VI::MARK screen ALIAS: NEXTKEY = 1 PROTOTYPE: $;$ PREINIT: int next; char key[] = {0, 0}; PPCODE: if (items == 2) { next = 1; *key = *(char *)SvPV(ST(1),PL_na); } else next = 0; if (api_nextmark(screen, next, key) != 1) { EXTEND(sp, 1); PUSHs(sv_2mortal(newSVpv(key, 1))); } else ST(0) = &PL_sv_undef; MODULE = VI PACKAGE = VI::LINE void DESTROY(screen) VI::LINE screen CODE: # typemap did all the checking SvREFCNT_dec((SV*)SvIV((SV*)SvRV(ST(0)))); # similar to SetLine void STORE(screen, linenumber, text) VI::LINE screen int linenumber char *text PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; size_t length; db_recno_t last; size_t len; CHAR_T *line; CODE: ++linenumber; /* vi 1 based ; perl 0 based */ SvPV(ST(2), length); INITMESSAGE(screen); rval = api_lline(screen, &last); if (!rval) { if (linenumber > last) rval = api_extend(screen, linenumber); if (!rval) CHAR2INTP(screen, text, length, line, len); rval = api_sline(screen, linenumber, line, len); } ENDMESSAGE(screen); # similar to GetLine char * FETCH(screen, linenumber) VI::LINE screen int linenumber PREINIT: size_t len; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *line; CHAR_T *p; PPCODE: ++linenumber; /* vi 1 based ; perl 0 based */ INITMESSAGE(screen); rval = api_gline(screen, (db_recno_t)linenumber, &p, &len); ENDMESSAGE(screen); EXTEND(sp,1); PUSHs(sv_2mortal(newSVpv(len ? (char*)p : "", len))); # similar to LastLine int FETCHSIZE(screen) VI::LINE screen PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_lline(screen, &last); ENDMESSAGE(screen); RETVAL=last; OUTPUT: RETVAL void STORESIZE(screen, count) VI::LINE screen int count PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_lline(screen, &last); if (!rval) { if (count > last) rval = api_extend(screen, count); else while(last && last > count) { rval = api_dline(screen, last--); if (rval) break; } } ENDMESSAGE(screen); void EXTEND(screen, count) VI::LINE screen int count CODE: void CLEAR(screen) VI::LINE screen PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; CODE: INITMESSAGE(screen); rval = api_lline(screen, &last); if (!rval) { while(last) { rval = api_dline(screen, last--); if (rval) break; } } ENDMESSAGE(screen); void PUSH(screen, ...) VI::LINE screen; PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval, i, len; char *line; CODE: INITMESSAGE(screen); rval = api_lline(screen, &last); if (!rval) for (i = 1; i < items; ++i) { line = SvPV(ST(i), len); if ((rval = api_aline(screen, last++, line, len))) break; } ENDMESSAGE(screen); SV * POP(screen) VI::LINE screen; PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval, i, len; CHAR_T *line; PPCODE: INITMESSAGE(screen); rval = api_lline(screen, &last); if (rval || last < 1) ST(0) = &PL_sv_undef; else { rval = api_gline(screen, last, &line, &len) || api_dline(screen, last); EXTEND(sp,1); PUSHs(sv_2mortal(newSVpv(len ? (char *)line : "", len))); } ENDMESSAGE(screen); SV * SHIFT(screen) VI::LINE screen; PREINIT: db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval, i, len; CHAR_T *line; PPCODE: INITMESSAGE(screen); rval = api_lline(screen, &last); if (rval || last < 1) ST(0) = &PL_sv_undef; else { rval = api_gline(screen, (db_recno_t)1, &line, &len) || api_dline(screen, (db_recno_t)1); EXTEND(sp,1); PUSHs(sv_2mortal(newSVpv(len ? (char *)line : "", len))); } ENDMESSAGE(screen); void UNSHIFT(screen, ...) VI::LINE screen; PREINIT: void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval, i, len; char *np; size_t nlen; CHAR_T *line; CODE: INITMESSAGE(screen); while (--items != 0) { np = SvPV(ST(items), nlen); CHAR2INTP(screen, np, nlen, line, len); if ((rval = api_iline(screen, (db_recno_t)1, line, len))) break; } ENDMESSAGE(screen); void SPLICE(screen, ...) VI::LINE screen; PREINIT: db_recno_t last, db_offset; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval, length, common, len, i, offset; CHAR_T *line; char *np; size_t nlen; PPCODE: INITMESSAGE(screen); rval = api_lline(screen, &last); offset = items > 1 ? (int)SvIV(ST(1)) : 0; if (offset < 0) offset += last; if (offset < 0) { ENDMESSAGE(screen); croak("Invalid offset"); } length = items > 2 ? (int)SvIV(ST(2)) : last - offset; if (length > last - offset) length = last - offset; db_offset = offset + 1; /* 1 based */ EXTEND(sp,length); for (common = MIN(length, items - 3), i = 3; common > 0; --common, ++db_offset, --length, ++i) { rval |= api_gline(screen, db_offset, &line, &len); INT2CHAR(screen, line, len, np, nlen); PUSHs(sv_2mortal(newSVpv(nlen ? np : "", nlen))); np = SvPV(ST(i), nlen); CHAR2INTP(screen, np, nlen, line, len); rval |= api_sline(screen, db_offset, line, len); } for (; length; --length) { rval |= api_gline(screen, db_offset, &line, &len); INT2CHAR(screen, line, len, np, nlen); PUSHs(sv_2mortal(newSVpv(len ? np : "", nlen))); rval |= api_dline(screen, db_offset); } for (; i < items; ++i) { np = SvPV(ST(i), len); CHAR2INTP(screen, np, len, line, nlen); rval |= api_iline(screen, db_offset, line, nlen); } ENDMESSAGE(screen); MODULE = VI PACKAGE = VI::TAGQ void Add(tagq, filename, search, msg) VI::TAGQ tagq; char *filename; char *search; char *msg; PREINIT: SCR *sp; CODE: sp = (SCR *)SvIV((SV*)SvRV(tagq->sprv)); if (!sp) croak("screen no longer exists"); api_tagq_add(sp, tagq->tqp, filename, search, msg); void Push(tagq) VI::TAGQ tagq; PREINIT: SCR *sp; CODE: sp = (SCR *)SvIV((SV*)SvRV(tagq->sprv)); if (!sp) croak("screen no longer exists"); api_tagq_push(sp, &tagq->tqp); void DESTROY(tagq) # Can already be invalidated by push VI::TAGQ2 tagq; PREINIT: SCR *sp; CODE: sp = (SCR *)SvIV((SV*)SvRV(tagq->sprv)); if (sp) api_tagq_free(sp, tagq->tqp); SvREFCNT_dec(tagq->sprv); free(tagq); nvi-1.81.6/perl_api/perlsfio.c0100644000076400001440000000331010720065506015231 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * Copyright (c) 1996 * Sven Verdoolaege. All rights reserved. * * See the LICENSE file for redistribution information. */ #ifndef lint static const char sccsid[] = "$Id: perlsfio.c,v 8.3 2000/04/30 17:00:15 skimo Exp $ (Berkeley) $Date: 2000/04/30 17:00:15 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* perl redefines them * avoid warnings */ #undef USE_DYNAMIC_LOADING #undef DEBUG #undef PACKAGE #undef ARGS #define ARGS ARGS #include "config.h" #include "../common/common.h" #include "extern.h" /* * PUBLIC: #ifdef USE_SFIO */ #ifdef USE_SFIO #define NIL(type) ((type)0) static int sfnviwrite(f, buf, n, disc) Sfio_t* f; /* stream involved */ char* buf; /* buffer to read into */ int n; /* number of bytes to read */ Sfdisc_t* disc; /* discipline */ { SCR *scrp; scrp = (SCR *)SvIV((SV*)SvRV(perl_get_sv("curscr", FALSE))); msgq(scrp, M_INFO, "%.*s", n, buf); return n; } /* * sfdcnewnvi -- * Create nvi discipline * * PUBLIC: Sfdisc_t* sfdcnewnvi __P((SCR*)); */ Sfdisc_t * sfdcnewnvi(scrp) SCR *scrp; { Sfdisc_t* disc; MALLOC(scrp, disc, Sfdisc_t*, sizeof(Sfdisc_t)); if (!disc) return disc; disc->readf = (Sfread_f)NULL; disc->writef = sfnviwrite; disc->seekf = (Sfseek_f)NULL; disc->exceptf = (Sfexcept_f)NULL; return disc; } /* * PUBLIC: #endif */ #endif /* USE_SFIO */ nvi-1.81.6/perl_api/typemap0100644000076400001440000000254510720065506014655 0ustar skimousersTYPEMAP # Grr can't let it end in OBJ 'cause xsubpp would # s/OBJ$/REF/ that for the DESTROY function VI T_VIOBJNOMUNGE VI::OPT T_VIOBJREF VI::MAP T_VIOBJREF VI::MARK T_VIOBJREF VI::LINE T_VIOBJREF VI::TAGQ T_VITAGQ VI::TAGQ2 T_VITAGQ2 AVREF T_AVREFREF INPUT T_AVREFREF if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVAV) $var = (AV *)SvRV($arg); else croak(\"$var is not a reference to an array\") T_VIOBJNOMUNGE if (sv_isa($arg, \"VI\")) { IV tmp = SvIV((SV*)SvRV($arg)); $var = ($type) tmp; if (!tmp) croak(\"screen no longer exists\"); } else croak(\"$var is not of type ${ntype}\") T_VIOBJREF if (sv_isa($arg, \"${ntype}\")) { IV tmp = SvIV((SV*)SvRV($arg)); if (sv_isa((SV *)tmp, \"VI\")) { IV tmp2 = SvIV((SV*)SvRV((SV *)tmp)); $var = ($type) tmp2; if (!tmp2) croak(\"screen no longer exists\"); } else croak(\"$var is not of type ${ntype}\"); } else croak(\"$var is not of type ${ntype}\") T_VITAGQ if (sv_isa($arg, \"VI::TAGQ\")) { $var = ($type) SvIV((SV*)SvRV($arg)); if ($var->tqp == 0) croak(\"Tag queue invalidated\"); } else croak(\"$var is not of type ${ntype}\") T_VITAGQ2 if (sv_isa($arg, \"VI::TAGQ\")) { $var = ($type) SvIV((SV*)SvRV($arg)); } else croak(\"$var is not of type ${ntype}\") OUTPUT T_VIOBJNOMUNGE newVIrv($arg, $var); nvi-1.81.6/perl_api/extern.h0100444000076400001440000000064010720065712014720 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ #ifdef USE_SFIO Sfdisc_t* sfdcnewnvi __P((SCR*)); #endif int perl_end __P((GS *)); int perl_init __P((SCR *)); int perl_screen_end __P((SCR*)); int perl_setenv __P((SCR* sp, const char *name, const char *value)); int perl_ex_perl __P((SCR*, CHAR_T *, size_t, db_recno_t, db_recno_t)); int perl_ex_perldo __P((SCR*, CHAR_T *, size_t, db_recno_t, db_recno_t)); nvi-1.81.6/perl_scripts/0040755000076400001440000000000010720065506014166 5ustar skimousersnvi-1.81.6/perl_scripts/forall.pl0100644000076400001440000000027710720065506016005 0ustar skimouserssub forall { my ($code) = shift; my ($i) = $VI::StartLine-1; while (++$i <= $VI::StopLine) { $_ = $curscr->GetLine($i); VI::SetLine($VI::ScreenId, $i, $_) if(&$code); } } 1; nvi-1.81.6/perl_scripts/make.pl0100644000076400001440000000052310720065506015435 0ustar skimouserssub push_tags { my ($fh) = shift; my ($tagq) = $curscr->TagQ("msg"); while(<$fh>) { my ($f, $l, $m); if ((($f, $l, $m) = split /:/) >= 2 && -f $f && $l =~ /^\d+$/) { $tagq->Add($f, $l, $m); } } $tagq->Push(); } sub make { local (*FH); open FH, "make 2>&1 |"; ::push_tags(\*FH); close FH; } 1; nvi-1.81.6/perl_scripts/tk.pl0100644000076400001440000000066010720065506015140 0ustar skimousers# make sure every subprocess has it's exit and that the main one # hasn't sub fun { unless ($pid = fork) { unless (fork) { use Tk; $MW = MainWindow->new; $hello = $MW->Button( -text => 'Hello, world', -command => sub {exit;}, ); $hello->pack; MainLoop; } exit 0; } waitpid($pid, 0); } 1; nvi-1.81.6/perl_scripts/wc.pl0100644000076400001440000000025310720065506015131 0ustar skimouserssub wc { my $words; $i = $VI::StartLine; while ($i <= $VI::StopLine) { $_ = $curscr->GetLine($i++); $words+=split; } $curscr->Msg("$words words"); } 1; nvi-1.81.6/regex/0040755000076400001440000000000010720065506012567 5ustar skimousersnvi-1.81.6/regex/COPYRIGHT0100644000076400001440000000551610720065506014066 0ustar skimousersCopyright 1992, 1993, 1994 Henry Spencer. All rights reserved. This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. Permission is granted to anyone to use this software for any purpose on any computer system, and to alter it and redistribute it, subject to the following restrictions: 1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from flaws in it. 2. The origin of this software must not be misrepresented, either by explicit claim or by omission. Since few users ever read sources, credits must appear in the documentation. 3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Since few users ever read sources, credits must appear in the documentation. 4. This notice may not be removed or altered. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= /*- * Copyright (c) 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94 */ nvi-1.81.6/regex/WHATSNEW0100644000076400001440000001232710720065506013754 0ustar skimousers# @(#)WHATSNEW 8.3 (Berkeley) 3/18/94 New in alpha3.4: The complex bug alluded to below has been fixed (in a slightly kludgey temporary way that may hurt efficiency a bit; this is another "get it out the door for 4.4" release). The tests at the end of the tests file have accordingly been uncommented. The primary sign of the bug was that something like a?b matching ab matched b rather than ab. (The bug was essentially specific to this exact situation, else it would have shown up earlier.) New in alpha3.3: The definition of word boundaries has been altered slightly, to more closely match the usual programming notion that "_" is an alphabetic. Stuff used for pre-ANSI systems is now in a subdir, and the makefile no longer alludes to it in mysterious ways. The makefile has generally been cleaned up some. Fixes have been made (again!) so that the regression test will run without -DREDEBUG, at the cost of weaker checking. A workaround for a bug in some folks' has been added. And some more things have been added to tests, including a couple right at the end which are commented out because the code currently flunks them (complex bug; fix coming). Plus the usual minor cleanup. New in alpha3.2: Assorted bits of cleanup and portability improvement (the development base is now a BSDI system using GCC instead of an ancient Sun system, and the newer compiler exposed some glitches). Fix for a serious bug that affected REs using many [] (including REG_ICASE REs because of the way they are implemented), *sometimes*, depending on memory-allocation patterns. The header-file prototypes no longer name the parameters, avoiding possible name conflicts. The possibility that some clot has defined CHAR_MIN as (say) `-128' instead of `(-128)' is now handled gracefully. "uchar" is no longer used as an internal type name (too many people have the same idea). Still the same old lousy performance, alas. New in alpha3.1: Basically nothing, this release is just a bookkeeping convenience. Stay tuned. New in alpha3.0: Performance is no better, alas, but some fixes have been made and some functionality has been added. (This is basically the "get it out the door in time for 4.4" release.) One bug fix: regfree() didn't free the main internal structure (how embarrassing). It is now possible to put NULs in either the RE or the target string, using (resp.) a new REG_PEND flag and the old REG_STARTEND flag. The REG_NOSPEC flag to regcomp() makes all characters ordinary, so you can match a literal string easily (this will become more useful when performance improves!). There are now primitives to match beginnings and ends of words, although the syntax is disgusting and so is the implementation. The REG_ATOI debugging interface has changed a bit. And there has been considerable internal cleanup of various kinds. New in alpha2.3: Split change list out of README, and moved flags notes into Makefile. Macro-ized the name of regex(7) in regex(3), since it has to change for 4.4BSD. Cleanup work in engine.c, and some new regression tests to catch tricky cases thereof. New in alpha2.2: Out-of-date manpages updated. Regerror() acquires two small extensions -- REG_ITOA and REG_ATOI -- which avoid debugging kludges in my own test program and might be useful to others for similar purposes. The regression test will now compile (and run) without REDEBUG. The BRE \$ bug is fixed. Most uses of "uchar" are gone; it's all chars now. Char/uchar parameters are now written int/unsigned, to avoid possible portability problems with unpromoted parameters. Some unsigned casts have been introduced to minimize portability problems with shifting into sign bits. New in alpha2.1: Lots of little stuff, cleanup and fixes. The one big thing is that regex.h is now generated, using mkh, rather than being supplied in the distribution; due to circularities in dependencies, you have to build regex.h explicitly by "make h". The two known bugs have been fixed (and the regression test now checks for them), as has a problem with assertions not being suppressed in the absence of REDEBUG. No performance work yet. New in alpha2: Backslash-anything is an ordinary character, not an error (except, of course, for the handful of backslashed metacharacters in BREs), which should reduce script breakage. The regression test checks *where* null strings are supposed to match, and has generally been tightened up somewhat. Small bug fixes in parameter passing (not harmful, but technically errors) and some other areas. Debugging invoked by defining REDEBUG rather than not defining NDEBUG. New in alpha+3: full prototyping for internal routines, using a little helper program, mkh, which extracts prototypes given in stylized comments. More minor cleanup. Buglet fix: it's CHAR_BIT, not CHAR_BITS. Simple pre-screening of input when a literal string is known to be part of the RE; this does wonders for performance. New in alpha+2: minor bits of cleanup. Notably, the number "32" for the word width isn't hardwired into regexec.c any more, the public header file prototypes the functions if __STDC__ is defined, and some small typos in the manpages have been fixed. New in alpha+1: improvements to the manual pages, and an important extension, the REG_STARTEND option to regexec(). nvi-1.81.6/regex/cclass.h0100644000076400001440000000660710720065506014216 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)cclass.h 8.2 (Berkeley) 3/16/94 */ RCHAR_T ALNUM[] = {'a','l','n','u','m',0}; RCHAR_T ALPHA[] = {'a','l','p','h','a',0}; RCHAR_T BLANK[] = {'b','l','a','n','k',0}; RCHAR_T CNTRL[] = {'c','n','t','r','l',0}; RCHAR_T DIGIT[] = {'d','i','g','i','t',0}; RCHAR_T GRAPH[] = {'g','r','a','p','h',0}; RCHAR_T LOWER[] = {'l','o','w','e','r',0}; RCHAR_T PRINT[] = {'p','r','i','n','t',0}; RCHAR_T PUNCT[] = {'p','u','n','c','t',0}; RCHAR_T SPACE[] = {'s','p','a','c','e',0}; RCHAR_T UPPER[] = {'u','p','p','e','r',0}; RCHAR_T XDIGIT[] = {'x','d','i','g','i','t',0}; /* character-class table */ static struct cclass { RCHAR_T *name; char *chars; char *multis; } cclasses[] = { ALNUM, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 0123456789", "", ALPHA, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", "", BLANK, " \t", "", CNTRL, "\007\b\t\n\v\f\r\1\2\3\4\5\6\16\17\20\21\22\23\24\ \25\26\27\30\31\32\33\34\35\36\37\177", "", DIGIT, "0123456789", "", GRAPH, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", "", LOWER, "abcdefghijklmnopqrstuvwxyz", "", PRINT, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\ 0123456789!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ ", "", PUNCT, "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~", "", SPACE, "\t\n\v\f\r ", "", UPPER, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "", XDIGIT, "0123456789ABCDEFabcdef", "", NULL, 0, "" }; nvi-1.81.6/regex/cname.h0100644000076400001440000001014610720065506014022 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)cname.h 8.2 (Berkeley) 3/16/94 */ /* character-name table */ static struct cname { RCHAR_T *name; char code; } cnames[] = { L("NUL"), '\0', L("SOH"), '\001', L("STX"), '\002', L("ETX"), '\003', L("EOT"), '\004', L("ENQ"), '\005', L("ACK"), '\006', L("BEL"), '\007', L("alert"), '\007', L("BS"), '\010', L("backspace"), '\b', L("HT"), '\011', L("tab"), '\t', L("LF"), '\012', L("newline"), '\n', L("VT"), '\013', L("vertical-tab"), '\v', L("FF"), '\014', L("form-feed"), '\f', L("CR"), '\015', L("carriage-return"), '\r', L("SO"), '\016', L("SI"), '\017', L("DLE"), '\020', L("DC1"), '\021', L("DC2"), '\022', L("DC3"), '\023', L("DC4"), '\024', L("NAK"), '\025', L("SYN"), '\026', L("ETB"), '\027', L("CAN"), '\030', L("EM"), '\031', L("SUB"), '\032', L("ESC"), '\033', L("IS4"), '\034', L("FS"), '\034', L("IS3"), '\035', L("GS"), '\035', L("IS2"), '\036', L("RS"), '\036', L("IS1"), '\037', L("US"), '\037', L("space"), ' ', L("exclamation-mark"), '!', L("quotation-mark"), '"', L("number-sign"), '#', L("dollar-sign"), '$', L("percent-sign"), '%', L("ampersand"), '&', L("apostrophe"), '\'', L("left-parenthesis"), '(', L("right-parenthesis"), ')', L("asterisk"), '*', L("plus-sign"), '+', L("comma"), ',', L("hyphen"), '-', L("hyphen-minus"), '-', L("period"), '.', L("full-stop"), '.', L("slash"), '/', L("solidus"), '/', L("zero"), '0', L("one"), '1', L("two"), '2', L("three"), '3', L("four"), '4', L("five"), '5', L("six"), '6', L("seven"), '7', L("eight"), '8', L("nine"), '9', L("colon"), ':', L("semicolon"), ';', L("less-than-sign"), '<', L("equals-sign"), '=', L("greater-than-sign"), '>', L("question-mark"), '?', L("commercial-at"), '@', L("left-square-bracket"), '[', L("backslash"), '\\', L("reverse-solidus"), '\\', L("right-square-bracket"), ']', L("circumflex"), '^', L("circumflex-accent"), '^', L("underscore"), '_', L("low-line"), '_', L("grave-accent"), '`', L("left-brace"), '{', L("left-curly-bracket"), '{', L("vertical-line"), '|', L("right-brace"), '}', L("right-curly-bracket"), '}', L("tilde"), '~', L("DEL"), '\177', NULL, 0, }; nvi-1.81.6/regex/engine.c0100644000076400001440000007064710720065506014213 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)engine.c 8.4 (Berkeley) 3/19/94 */ /* * The matching engine and friends. This file is #included by regexec.c * after suitable #defines of a variety of macros used herein, so that * different state representations can be used without duplicating masses * of code. */ #ifdef SNAMES #define matcher smatcher #define fast sfast #define slow sslow #define dissect sdissect #define backref sbackref #define step sstep #define print sprint #define at sat #define match smat #endif #ifdef LNAMES #define matcher lmatcher #define fast lfast #define slow lslow #define dissect ldissect #define backref lbackref #define step lstep #define print lprint #define at lat #define match lmat #endif /* another structure passed up and down to avoid zillions of parameters */ struct match { struct re_guts *g; int eflags; regmatch_t *pmatch; /* [nsub+1] (0 element unused) */ RCHAR_T *offp; /* offsets work from here */ RCHAR_T *beginp; /* start of string -- virtual NUL precedes */ RCHAR_T *endp; /* end of string -- virtual NUL here */ RCHAR_T *coldp; /* can be no match starting before here */ RCHAR_T **lastpos; /* [nplus+1] */ STATEVARS; states st; /* current states */ states fresh; /* states for a fresh start */ states tmp; /* temporary */ states empty; /* empty set of states */ }; /* ========= begin header generated by ./mkh ========= */ #ifdef __cplusplus extern "C" { #endif /* === engine.c === */ static int matcher __P((struct re_guts *g, RCHAR_T *string, size_t nmatch, regmatch_t pmatch[], int eflags)); static RCHAR_T *dissect __P((struct match *m, RCHAR_T *start, RCHAR_T *stop, sopno startst, sopno stopst)); static RCHAR_T *backref __P((struct match *m, RCHAR_T *start, RCHAR_T *stop, sopno startst, sopno stopst, sopno lev)); static RCHAR_T *fast __P((struct match *m, RCHAR_T *start, RCHAR_T *stop, sopno startst, sopno stopst)); static RCHAR_T *slow __P((struct match *m, RCHAR_T *start, RCHAR_T *stop, sopno startst, sopno stopst)); static states step __P((struct re_guts *g, sopno start, sopno stop, states bef, int ch, states aft)); #define BOL (OUT+1) #define EOL (BOL+1) #define BOLEOL (BOL+2) #define NOTHING (BOL+3) #define BOW (BOL+4) #define EOW (BOL+5) #define CODEMAX (BOL+5) /* highest code used */ #define NONCHAR(c) ((c) > RCHAR_T_MAX) #define NNONCHAR (CODEMAX-CHAR_MAX) #ifdef REDEBUG static void print __P((struct match *m, char *caption, states st, int ch, FILE *d)); #endif #ifdef REDEBUG static void at __P((struct match *m, char *title, char *start, char *stop, sopno startst, sopno stopst)); #endif #ifdef REDEBUG static char *pchar __P((int ch)); #endif #ifdef __cplusplus } #endif /* ========= end header generated by ./mkh ========= */ #ifdef REDEBUG #define SP(t, s, c) print(m, t, s, c, stdout) #define AT(t, p1, p2, s1, s2) at(m, t, p1, p2, s1, s2) #define NOTE(str) { if (m->eflags®_TRACE) printf("=%s\n", (str)); } #else #define SP(t, s, c) /* nothing */ #define AT(t, p1, p2, s1, s2) /* nothing */ #define NOTE(s) /* nothing */ #endif /* - matcher - the actual matching engine == static int matcher(register struct re_guts *g, RCHAR_T *string, \ == size_t nmatch, regmatch_t pmatch[], int eflags); */ static int /* 0 success, REG_NOMATCH failure */ matcher(g, string, nmatch, pmatch, eflags) register struct re_guts *g; RCHAR_T *string; size_t nmatch; regmatch_t pmatch[]; int eflags; { register RCHAR_T *endp; register int i; struct match mv; register struct match *m = &mv; register RCHAR_T *dp; const register sopno gf = g->firststate+1; /* +1 for OEND */ const register sopno gl = g->laststate; RCHAR_T *start; RCHAR_T *stop; /* simplify the situation where possible */ if (g->cflags®_NOSUB) nmatch = 0; if (eflags®_STARTEND) { start = string + pmatch[0].rm_so; stop = string + pmatch[0].rm_eo; } else { start = string; stop = start + STRLEN(start); } if (stop < start) return(REG_INVARG); /* prescreening; this does wonders for this rather slow code */ if (g->must != NULL) { for (dp = start; dp < stop; dp++) if (*dp == g->must[0] && stop - dp >= g->mlen && MEMCMP(dp, g->must, (size_t)g->mlen) == 0) break; if (dp == stop) /* we didn't find g->must */ return(REG_NOMATCH); } /* match struct setup */ m->g = g; m->eflags = eflags; m->pmatch = NULL; m->lastpos = NULL; m->offp = string; m->beginp = start; m->endp = stop; STATESETUP(m, 4); SETUP(m->st); SETUP(m->fresh); SETUP(m->tmp); SETUP(m->empty); CLEAR(m->empty); /* this loop does only one repetition except for backrefs */ for (;;) { endp = fast(m, start, stop, gf, gl); if (endp == NULL) { /* a miss */ STATETEARDOWN(m); return(REG_NOMATCH); } if (nmatch == 0 && !g->backrefs) break; /* no further info needed */ /* where? */ assert(m->coldp != NULL); for (;;) { NOTE("finding start"); endp = slow(m, m->coldp, stop, gf, gl); if (endp != NULL) break; assert(m->coldp < m->endp); m->coldp++; } if (nmatch == 1 && !g->backrefs) break; /* no further info needed */ /* oh my, he wants the subexpressions... */ if (m->pmatch == NULL) m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) * sizeof(regmatch_t)); if (m->pmatch == NULL) { STATETEARDOWN(m); return(REG_ESPACE); } for (i = 1; i <= m->g->nsub; i++) m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1; if (!g->backrefs && !(m->eflags®_BACKR)) { NOTE("dissecting"); dp = dissect(m, m->coldp, endp, gf, gl); } else { if (g->nplus > 0 && m->lastpos == NULL) m->lastpos = (RCHAR_T **)malloc((g->nplus+1) * sizeof(RCHAR_T *)); if (g->nplus > 0 && m->lastpos == NULL) { free(m->pmatch); STATETEARDOWN(m); return(REG_ESPACE); } NOTE("backref dissect"); dp = backref(m, m->coldp, endp, gf, gl, (sopno)0); } if (dp != NULL) break; /* uh-oh... we couldn't find a subexpression-level match */ assert(g->backrefs); /* must be back references doing it */ assert(g->nplus == 0 || m->lastpos != NULL); for (;;) { if (dp != NULL || endp <= m->coldp) break; /* defeat */ NOTE("backoff"); endp = slow(m, m->coldp, endp-1, gf, gl); if (endp == NULL) break; /* defeat */ /* try it on a shorter possibility */ #ifndef NDEBUG for (i = 1; i <= m->g->nsub; i++) { assert(m->pmatch[i].rm_so == -1); assert(m->pmatch[i].rm_eo == -1); } #endif NOTE("backoff dissect"); dp = backref(m, m->coldp, endp, gf, gl, (sopno)0); } assert(dp == NULL || dp == endp); if (dp != NULL) /* found a shorter one */ break; /* despite initial appearances, there is no match here */ NOTE("false alarm"); start = m->coldp + 1; /* recycle starting later */ assert(start <= stop); } /* fill in the details if requested */ if (nmatch > 0) { pmatch[0].rm_so = m->coldp - m->offp; pmatch[0].rm_eo = endp - m->offp; } if (nmatch > 1) { assert(m->pmatch != NULL); for (i = 1; i < nmatch; i++) if (i <= m->g->nsub) pmatch[i] = m->pmatch[i]; else { pmatch[i].rm_so = -1; pmatch[i].rm_eo = -1; } } if (m->pmatch != NULL) free((char *)m->pmatch); if (m->lastpos != NULL) free((char *)m->lastpos); STATETEARDOWN(m); return(0); } /* - dissect - figure out what matched what, no back references == static RCHAR_T *dissect(register struct match *m, RCHAR_T *start, \ == RCHAR_T *stop, sopno startst, sopno stopst); */ static RCHAR_T * /* == stop (success) always */ dissect(m, start, stop, startst, stopst) register struct match *m; RCHAR_T *start; RCHAR_T *stop; sopno startst; sopno stopst; { register int i; register sopno ss; /* start sop of current subRE */ register sopno es; /* end sop of current subRE */ register RCHAR_T *sp; /* start of string matched by it */ register RCHAR_T *stp; /* string matched by it cannot pass here */ register RCHAR_T *rest; /* start of rest of string */ register RCHAR_T *tail; /* string unmatched by rest of RE */ register sopno ssub; /* start sop of subsubRE */ register sopno esub; /* end sop of subsubRE */ register RCHAR_T *ssp; /* start of string matched by subsubRE */ register RCHAR_T *sep; /* end of string matched by subsubRE */ register RCHAR_T *oldssp; /* previous ssp */ register RCHAR_T *dp; AT("diss", start, stop, startst, stopst); sp = start; for (ss = startst; ss < stopst; ss = es) { /* identify end of subRE */ es = ss; switch (OP(m->g->strip[es])) { case OPLUS_: case OQUEST_: es += OPND(m->g->strip[es]); break; case OCH_: while (OP(m->g->strip[es]) != O_CH) es += OPND(m->g->strip[es]); break; } es++; /* figure out what it matched */ switch (OP(m->g->strip[ss])) { case OEND: assert(nope); break; case OCHAR: sp++; break; case OBOL: case OEOL: case OBOW: case OEOW: break; case OANY: case OANYOF: sp++; break; case OBACK_: case O_BACK: assert(nope); break; /* cases where length of match is hard to find */ case OQUEST_: stp = stop; for (;;) { /* how long could this one be? */ rest = slow(m, sp, stp, ss, es); assert(rest != NULL); /* it did match */ /* could the rest match the rest? */ tail = slow(m, rest, stop, es, stopst); if (tail == stop) break; /* yes! */ /* no -- try a shorter match for this one */ stp = rest - 1; assert(stp >= sp); /* it did work */ } ssub = ss + 1; esub = es - 1; /* did innards match? */ if (slow(m, sp, rest, ssub, esub) != NULL) { dp = dissect(m, sp, rest, ssub, esub); assert(dp == rest); } else /* no */ assert(sp == rest); sp = rest; break; case OPLUS_: stp = stop; for (;;) { /* how long could this one be? */ rest = slow(m, sp, stp, ss, es); assert(rest != NULL); /* it did match */ /* could the rest match the rest? */ tail = slow(m, rest, stop, es, stopst); if (tail == stop) break; /* yes! */ /* no -- try a shorter match for this one */ stp = rest - 1; assert(stp >= sp); /* it did work */ } ssub = ss + 1; esub = es - 1; ssp = sp; oldssp = ssp; for (;;) { /* find last match of innards */ sep = slow(m, ssp, rest, ssub, esub); if (sep == NULL || sep == ssp) break; /* failed or matched null */ oldssp = ssp; /* on to next try */ ssp = sep; } if (sep == NULL) { /* last successful match */ sep = ssp; ssp = oldssp; } assert(sep == rest); /* must exhaust substring */ assert(slow(m, ssp, sep, ssub, esub) == rest); dp = dissect(m, ssp, sep, ssub, esub); assert(dp == sep); sp = rest; break; case OCH_: stp = stop; for (;;) { /* how long could this one be? */ rest = slow(m, sp, stp, ss, es); assert(rest != NULL); /* it did match */ /* could the rest match the rest? */ tail = slow(m, rest, stop, es, stopst); if (tail == stop) break; /* yes! */ /* no -- try a shorter match for this one */ stp = rest - 1; assert(stp >= sp); /* it did work */ } ssub = ss + 1; esub = ss + OPND(m->g->strip[ss]) - 1; assert(OP(m->g->strip[esub]) == OOR1); for (;;) { /* find first matching branch */ if (slow(m, sp, rest, ssub, esub) == rest) break; /* it matched all of it */ /* that one missed, try next one */ assert(OP(m->g->strip[esub]) == OOR1); esub++; assert(OP(m->g->strip[esub]) == OOR2); ssub = esub + 1; esub += OPND(m->g->strip[esub]); if (OP(m->g->strip[esub]) == OOR2) esub--; else assert(OP(m->g->strip[esub]) == O_CH); } dp = dissect(m, sp, rest, ssub, esub); assert(dp == rest); sp = rest; break; case O_PLUS: case O_QUEST: case OOR1: case OOR2: case O_CH: assert(nope); break; case OLPAREN: i = OPND(m->g->strip[ss]); assert(0 < i && i <= m->g->nsub); m->pmatch[i].rm_so = sp - m->offp; break; case ORPAREN: i = OPND(m->g->strip[ss]); assert(0 < i && i <= m->g->nsub); m->pmatch[i].rm_eo = sp - m->offp; break; default: /* uh oh */ assert(nope); break; } } assert(sp == stop); return(sp); } /* - backref - figure out what matched what, figuring in back references == static RCHAR_T *backref(register struct match *m, RCHAR_T *start, \ == RCHAR_T *stop, sopno startst, sopno stopst, sopno lev); */ static RCHAR_T * /* == stop (success) or NULL (failure) */ backref(m, start, stop, startst, stopst, lev) register struct match *m; RCHAR_T *start; RCHAR_T *stop; sopno startst; sopno stopst; sopno lev; /* PLUS nesting level */ { register int i; register sopno ss; /* start sop of current subRE */ register RCHAR_T *sp; /* start of string matched by it */ register sopno ssub; /* start sop of subsubRE */ register sopno esub; /* end sop of subsubRE */ register RCHAR_T *ssp; /* start of string matched by subsubRE */ register RCHAR_T *dp; register size_t len; register int hard; register sop s; register regoff_t offsave; register cset *cs; AT("back", start, stop, startst, stopst); sp = start; /* get as far as we can with easy stuff */ hard = 0; for (ss = startst; !hard && ss < stopst; ss++) switch (OP(s = m->g->strip[ss])) { case OCHAR: if (sp == stop || *sp++ != (RCHAR_T)OPND(s)) return(NULL); break; case OANY: if (sp == stop) return(NULL); sp++; break; case OANYOF: cs = &m->g->sets[OPND(s)]; if (sp == stop || !CHIN(cs, *sp++)) return(NULL); break; case OBOL: if ( (sp == m->beginp && !(m->eflags®_NOTBOL)) || (sp < m->endp && *(sp-1) == '\n' && (m->g->cflags®_NEWLINE)) ) { /* yes */ } else return(NULL); break; case OEOL: if ( (sp == m->endp && !(m->eflags®_NOTEOL)) || (sp < m->endp && *sp == '\n' && (m->g->cflags®_NEWLINE)) ) { /* yes */ } else return(NULL); break; case OBOW: if (( (sp == m->beginp && !(m->eflags®_NOTBOL)) || (sp < m->endp && *(sp-1) == '\n' && (m->g->cflags®_NEWLINE)) || (sp > m->beginp && !ISWORD(*(sp-1))) ) && (sp < m->endp && ISWORD(*sp)) ) { /* yes */ } else return(NULL); break; case OEOW: if (( (sp == m->endp && !(m->eflags®_NOTEOL)) || (sp < m->endp && *sp == '\n' && (m->g->cflags®_NEWLINE)) || (sp < m->endp && !ISWORD(*sp)) ) && (sp > m->beginp && ISWORD(*(sp-1))) ) { /* yes */ } else return(NULL); break; case O_QUEST: break; case OOR1: /* matches null but needs to skip */ ss++; s = m->g->strip[ss]; do { assert(OP(s) == OOR2); ss += OPND(s); } while (OP(s = m->g->strip[ss]) != O_CH); /* note that the ss++ gets us past the O_CH */ break; default: /* have to make a choice */ hard = 1; break; } if (!hard) { /* that was it! */ if (sp != stop) return(NULL); return(sp); } ss--; /* adjust for the for's final increment */ /* the hard stuff */ AT("hard", sp, stop, ss, stopst); s = m->g->strip[ss]; switch (OP(s)) { case OBACK_: /* the vilest depths */ i = OPND(s); assert(0 < i && i <= m->g->nsub); if (m->pmatch[i].rm_eo == -1) return(NULL); assert(m->pmatch[i].rm_so != -1); len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so; assert(stop - m->beginp >= len); if (sp > stop - len) return(NULL); /* not enough left to match */ ssp = m->offp + m->pmatch[i].rm_so; if (memcmp(sp, ssp, len) != 0) return(NULL); while (m->g->strip[ss] != SOP(O_BACK, i)) ss++; return(backref(m, sp+len, stop, ss+1, stopst, lev)); break; case OQUEST_: /* to null or not */ dp = backref(m, sp, stop, ss+1, stopst, lev); if (dp != NULL) return(dp); /* not */ return(backref(m, sp, stop, ss+OPND(s)+1, stopst, lev)); break; case OPLUS_: assert(m->lastpos != NULL); assert(lev+1 <= m->g->nplus); m->lastpos[lev+1] = sp; return(backref(m, sp, stop, ss+1, stopst, lev+1)); break; case O_PLUS: if (sp == m->lastpos[lev]) /* last pass matched null */ return(backref(m, sp, stop, ss+1, stopst, lev-1)); /* try another pass */ m->lastpos[lev] = sp; dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev); if (dp == NULL) return(backref(m, sp, stop, ss+1, stopst, lev-1)); else return(dp); break; case OCH_: /* find the right one, if any */ ssub = ss + 1; esub = ss + OPND(s) - 1; assert(OP(m->g->strip[esub]) == OOR1); for (;;) { /* find first matching branch */ dp = backref(m, sp, stop, ssub, esub, lev); if (dp != NULL) return(dp); /* that one missed, try next one */ if (OP(m->g->strip[esub]) == O_CH) return(NULL); /* there is none */ esub++; assert(OP(m->g->strip[esub]) == OOR2); ssub = esub + 1; esub += OPND(m->g->strip[esub]); if (OP(m->g->strip[esub]) == OOR2) esub--; else assert(OP(m->g->strip[esub]) == O_CH); } break; case OLPAREN: /* must undo assignment if rest fails */ i = OPND(s); assert(0 < i && i <= m->g->nsub); offsave = m->pmatch[i].rm_so; m->pmatch[i].rm_so = sp - m->offp; dp = backref(m, sp, stop, ss+1, stopst, lev); if (dp != NULL) return(dp); m->pmatch[i].rm_so = offsave; return(NULL); break; case ORPAREN: /* must undo assignment if rest fails */ i = OPND(s); assert(0 < i && i <= m->g->nsub); offsave = m->pmatch[i].rm_eo; m->pmatch[i].rm_eo = sp - m->offp; dp = backref(m, sp, stop, ss+1, stopst, lev); if (dp != NULL) return(dp); m->pmatch[i].rm_eo = offsave; return(NULL); break; default: /* uh oh */ assert(nope); break; } /* "can't happen" */ assert(nope); /* NOTREACHED */ } /* - fast - step through the string at top speed == static RCHAR_T *fast(register struct match *m, RCHAR_T *start, \ == RCHAR_T *stop, sopno startst, sopno stopst); */ static RCHAR_T * /* where tentative match ended, or NULL */ fast(m, start, stop, startst, stopst) register struct match *m; RCHAR_T *start; RCHAR_T *stop; sopno startst; sopno stopst; { register states st = m->st; register states fresh = m->fresh; register states tmp = m->tmp; register RCHAR_T *p = start; register int c = (start == m->beginp) ? OUT : *(start-1); register int lastc; /* previous c */ register int flagch; register int i; register RCHAR_T *coldp; /* last p after which no match was underway */ CLEAR(st); SET1(st, startst); st = step(m->g, startst, stopst, st, NOTHING, st); ASSIGN(fresh, st); SP("start", st, *p); coldp = NULL; for (;;) { /* next character */ lastc = c; c = (p == m->endp) ? OUT : *p; if (EQ(st, fresh)) coldp = p; /* is there an EOL and/or BOL between lastc and c? */ flagch = '\0'; i = 0; if ( (lastc == '\n' && m->g->cflags®_NEWLINE) || (lastc == OUT && !(m->eflags®_NOTBOL)) ) { flagch = BOL; i = m->g->nbol; } if ( (c == '\n' && m->g->cflags®_NEWLINE) || (c == OUT && !(m->eflags®_NOTEOL)) ) { flagch = (flagch == BOL) ? BOLEOL : EOL; i += m->g->neol; } if (i != 0) { for (; i > 0; i--) st = step(m->g, startst, stopst, st, flagch, st); SP("boleol", st, c); } /* how about a word boundary? */ if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) && (c != OUT && ISWORD(c)) ) { flagch = BOW; } if ( (lastc != OUT && ISWORD(lastc)) && (flagch == EOL || (c != OUT && !ISWORD(c))) ) { flagch = EOW; } if (flagch == BOW || flagch == EOW) { st = step(m->g, startst, stopst, st, flagch, st); SP("boweow", st, c); } /* are we done? */ if (ISSET(st, stopst) || p == stop) break; /* NOTE BREAK OUT */ /* no, we must deal with this character */ ASSIGN(tmp, st); ASSIGN(st, fresh); assert(c != OUT); st = step(m->g, startst, stopst, tmp, c, st); SP("aft", st, c); assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); p++; } assert(coldp != NULL); m->coldp = coldp; if (ISSET(st, stopst)) return(p+1); else return(NULL); } /* - slow - step through the string more deliberately == static RCHAR_T *slow(register struct match *m, RCHAR_T *start, \ == RCHAR_T *stop, sopno startst, sopno stopst); */ static RCHAR_T * /* where it ended */ slow(m, start, stop, startst, stopst) register struct match *m; RCHAR_T *start; RCHAR_T *stop; sopno startst; sopno stopst; { register states st = m->st; register states empty = m->empty; register states tmp = m->tmp; register RCHAR_T *p = start; register int c = (start == m->beginp) ? OUT : *(start-1); register int lastc; /* previous c */ register int flagch; register int i; register RCHAR_T *matchp; /* last p at which a match ended */ AT("slow", start, stop, startst, stopst); CLEAR(st); SET1(st, startst); SP("sstart", st, *p); st = step(m->g, startst, stopst, st, NOTHING, st); matchp = NULL; for (;;) { /* next character */ lastc = c; c = (p == m->endp) ? OUT : *p; /* is there an EOL and/or BOL between lastc and c? */ flagch = '\0'; i = 0; if ( (lastc == '\n' && m->g->cflags®_NEWLINE) || (lastc == OUT && !(m->eflags®_NOTBOL)) ) { flagch = BOL; i = m->g->nbol; } if ( (c == '\n' && m->g->cflags®_NEWLINE) || (c == OUT && !(m->eflags®_NOTEOL)) ) { flagch = (flagch == BOL) ? BOLEOL : EOL; i += m->g->neol; } if (i != 0) { for (; i > 0; i--) st = step(m->g, startst, stopst, st, flagch, st); SP("sboleol", st, c); } /* how about a word boundary? */ if ( (flagch == BOL || (lastc != OUT && !ISWORD(lastc))) && (c != OUT && ISWORD(c)) ) { flagch = BOW; } if ( (lastc != OUT && ISWORD(lastc)) && (flagch == EOL || (c != OUT && !ISWORD(c))) ) { flagch = EOW; } if (flagch == BOW || flagch == EOW) { st = step(m->g, startst, stopst, st, flagch, st); SP("sboweow", st, c); } /* are we done? */ if (ISSET(st, stopst)) matchp = p; if (EQ(st, empty) || p == stop) break; /* NOTE BREAK OUT */ /* no, we must deal with this character */ ASSIGN(tmp, st); ASSIGN(st, empty); assert(c != OUT); st = step(m->g, startst, stopst, tmp, c, st); SP("saft", st, c); assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); p++; } return(matchp); } /* - step - map set of states reachable before char to set reachable after == static states step(register struct re_guts *g, sopno start, sopno stop, \ == register states bef, int ch, register states aft); == #define BOL (OUT+1) == #define EOL (BOL+1) == #define BOLEOL (BOL+2) == #define NOTHING (BOL+3) == #define BOW (BOL+4) == #define EOW (BOL+5) == #define CODEMAX (BOL+5) // highest code used == #define NONCHAR(c) ((c) > CHAR_MAX) == #define NNONCHAR (CODEMAX-CHAR_MAX) */ static states step(g, start, stop, bef, ch, aft) register struct re_guts *g; sopno start; /* start state within strip */ sopno stop; /* state after stop state within strip */ register states bef; /* states reachable before */ int ch; /* character or NONCHAR code */ register states aft; /* states already known reachable after */ { register cset *cs; register sop s; register sopno pc; register onestate here; /* note, macros know this name */ register sopno look; register int i; for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) { s = g->strip[pc]; switch (OP(s)) { case OEND: assert(pc == stop-1); break; case OCHAR: /* only characters can match */ assert(!NONCHAR(ch) || ch != (RCHAR_T)OPND(s)); if (ch == (RCHAR_T)OPND(s)) FWD(aft, bef, 1); break; case OBOL: if (ch == BOL || ch == BOLEOL) FWD(aft, bef, 1); break; case OEOL: if (ch == EOL || ch == BOLEOL) FWD(aft, bef, 1); break; case OBOW: if (ch == BOW) FWD(aft, bef, 1); break; case OEOW: if (ch == EOW) FWD(aft, bef, 1); break; case OANY: if (!NONCHAR(ch)) FWD(aft, bef, 1); break; case OANYOF: cs = &g->sets[OPND(s)]; if (!NONCHAR(ch) && CHIN(cs, ch)) FWD(aft, bef, 1); break; case OBACK_: /* ignored here */ case O_BACK: FWD(aft, aft, 1); break; case OPLUS_: /* forward, this is just an empty */ FWD(aft, aft, 1); break; case O_PLUS: /* both forward and back */ FWD(aft, aft, 1); i = ISSETBACK(aft, OPND(s)); BACK(aft, aft, OPND(s)); if (!i && ISSETBACK(aft, OPND(s))) { /* oho, must reconsider loop body */ pc -= OPND(s) + 1; INIT(here, pc); } break; case OQUEST_: /* two branches, both forward */ FWD(aft, aft, 1); FWD(aft, aft, OPND(s)); break; case O_QUEST: /* just an empty */ FWD(aft, aft, 1); break; case OLPAREN: /* not significant here */ case ORPAREN: FWD(aft, aft, 1); break; case OCH_: /* mark the first two branches */ FWD(aft, aft, 1); assert(OP(g->strip[pc+OPND(s)]) == OOR2); FWD(aft, aft, OPND(s)); break; case OOR1: /* done a branch, find the O_CH */ if (ISSTATEIN(aft, here)) { for (look = 1; OP(s = g->strip[pc+look]) != O_CH; look += OPND(s)) assert(OP(s) == OOR2); FWD(aft, aft, look); } break; case OOR2: /* propagate OCH_'s marking */ FWD(aft, aft, 1); if (OP(g->strip[pc+OPND(s)]) != O_CH) { assert(OP(g->strip[pc+OPND(s)]) == OOR2); FWD(aft, aft, OPND(s)); } break; case O_CH: /* just empty */ FWD(aft, aft, 1); break; default: /* ooooops... */ assert(nope); break; } } return(aft); } #ifdef REDEBUG /* - print - print a set of states == #ifdef REDEBUG == static void print(struct match *m, char *caption, states st, \ == int ch, FILE *d); == #endif */ static void print(m, caption, st, ch, d) struct match *m; char *caption; states st; int ch; FILE *d; { register struct re_guts *g = m->g; register int i; register int first = 1; if (!(m->eflags®_TRACE)) return; fprintf(d, "%s", caption); if (ch != '\0') fprintf(d, " %s", pchar(ch)); for (i = 0; i < g->nstates; i++) if (ISSET(st, i)) { fprintf(d, "%s%d", (first) ? "\t" : ", ", i); first = 0; } fprintf(d, "\n"); } /* - at - print current situation == #ifdef REDEBUG == static void at(struct match *m, char *title, char *start, char *stop, \ == sopno startst, sopno stopst); == #endif */ static void at(m, title, start, stop, startst, stopst) struct match *m; char *title; char *start; char *stop; sopno startst; sopno stopst; { if (!(m->eflags®_TRACE)) return; printf("%s %s-", title, pchar(*start)); printf("%s ", pchar(*stop)); printf("%ld-%ld\n", (long)startst, (long)stopst); } #ifndef PCHARDONE #define PCHARDONE /* never again */ /* - pchar - make a character printable == #ifdef REDEBUG == static char *pchar(int ch); == #endif * * Is this identical to regchar() over in debug.c? Well, yes. But a * duplicate here avoids having a debugging-capable regexec.o tied to * a matching debug.o, and this is convenient. It all disappears in * the non-debug compilation anyway, so it doesn't matter much. */ static char * /* -> representation */ pchar(ch) int ch; { static char pbuf[10]; if (isprint(ch) || ch == ' ') sprintf(pbuf, "%c", ch); else sprintf(pbuf, "\\%o", ch); return(pbuf); } #endif #endif #undef matcher #undef fast #undef slow #undef dissect #undef backref #undef step #undef print #undef at #undef match nvi-1.81.6/regex/re_format.70100644000076400001440000002676710720065506014654 0ustar skimousers.\" Copyright (c) 1992, 1993, 1994 Henry Spencer. .\" Copyright (c) 1992, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Henry Spencer of the University of Toronto. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)re_format.7 8.2 (Berkeley) 3/16/94 .\" .TH RE_FORMAT 7 "March 16, 1994" .SH NAME re_format \- POSIX 1003.2 regular expressions .SH DESCRIPTION Regular expressions (``RE''s), as defined in POSIX 1003.2, come in two forms: modern REs (roughly those of .IR egrep ; 1003.2 calls these ``extended'' REs) and obsolete REs (roughly those of .IR ed ; 1003.2 ``basic'' REs). Obsolete REs mostly exist for backward compatibility in some old programs; they will be discussed at the end. 1003.2 leaves some aspects of RE syntax and semantics open; `\(dg' marks decisions on these aspects that may not be fully portable to other 1003.2 implementations. .PP A (modern) RE is one\(dg or more non-empty\(dg \fIbranches\fR, separated by `|'. It matches anything that matches one of the branches. .PP A branch is one\(dg or more \fIpieces\fR, concatenated. It matches a match for the first, followed by a match for the second, etc. .PP A piece is an \fIatom\fR possibly followed by a single\(dg `*', `+', `?', or \fIbound\fR. An atom followed by `*' matches a sequence of 0 or more matches of the atom. An atom followed by `+' matches a sequence of 1 or more matches of the atom. An atom followed by `?' matches a sequence of 0 or 1 matches of the atom. .PP A \fIbound\fR is `{' followed by an unsigned decimal integer, possibly followed by `,' possibly followed by another unsigned decimal integer, always followed by `}'. The integers must lie between 0 and RE_DUP_MAX (255\(dg) inclusive, and if there are two of them, the first may not exceed the second. An atom followed by a bound containing one integer \fIi\fR and no comma matches a sequence of exactly \fIi\fR matches of the atom. An atom followed by a bound containing one integer \fIi\fR and a comma matches a sequence of \fIi\fR or more matches of the atom. An atom followed by a bound containing two integers \fIi\fR and \fIj\fR matches a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom. .PP An atom is a regular expression enclosed in `()' (matching a match for the regular expression), an empty set of `()' (matching the null string)\(dg, a \fIbracket expression\fR (see below), `.' (matching any single character), `^' (matching the null string at the beginning of a line), `$' (matching the null string at the end of a line), a `\e' followed by one of the characters `^.[$()|*+?{\e' (matching that character taken as an ordinary character), a `\e' followed by any other character\(dg (matching that character taken as an ordinary character, as if the `\e' had not been present\(dg), or a single character with no other significance (matching that character). A `{' followed by a character other than a digit is an ordinary character, not the beginning of a bound\(dg. It is illegal to end an RE with `\e'. .PP A \fIbracket expression\fR is a list of characters enclosed in `[]'. It normally matches any single character from the list (but see below). If the list begins with `^', it matches any single character (but see below) \fInot\fR from the rest of the list. If two characters in the list are separated by `\-', this is shorthand for the full \fIrange\fR of characters between those two (inclusive) in the collating sequence, e.g. `[0-9]' in ASCII matches any decimal digit. It is illegal\(dg for two ranges to share an endpoint, e.g. `a-c-e'. Ranges are very collating-sequence-dependent, and portable programs should avoid relying on them. .PP To include a literal `]' in the list, make it the first character (following a possible `^'). To include a literal `\-', make it the first or last character, or the second endpoint of a range. To use a literal `\-' as the first endpoint of a range, enclose it in `[.' and `.]' to make it a collating element (see below). With the exception of these and some combinations using `[' (see next paragraphs), all other special characters, including `\e', lose their special significance within a bracket expression. .PP Within a bracket expression, a collating element (a character, a multi-character sequence that collates as if it were a single character, or a collating-sequence name for either) enclosed in `[.' and `.]' stands for the sequence of characters of that collating element. The sequence is a single element of the bracket expression's list. A bracket expression containing a multi-character collating element can thus match more than one character, e.g. if the collating sequence includes a `ch' collating element, then the RE `[[.ch.]]*c' matches the first five characters of `chchcc'. .PP Within a bracket expression, a collating element enclosed in `[=' and `=]' is an equivalence class, standing for the sequences of characters of all collating elements equivalent to that one, including itself. (If there are no other equivalent collating elements, the treatment is as if the enclosing delimiters were `[.' and `.]'.) For example, if o and \o'o^' are the members of an equivalence class, then `[[=o=]]', `[[=\o'o^'=]]', and `[o\o'o^']' are all synonymous. An equivalence class may not\(dg be an endpoint of a range. .PP Within a bracket expression, the name of a \fIcharacter class\fR enclosed in `[:' and `:]' stands for the list of all characters belonging to that class. Standard character class names are: .PP .RS .nf .ta 3c 6c 9c alnum digit punct alpha graph space blank lower upper cntrl print xdigit .fi .RE .PP These stand for the character classes defined in .IR ctype (3). A locale may provide others. A character class may not be used as an endpoint of a range. .PP There are two special cases\(dg of bracket expressions: the bracket expressions `[[:<:]]' and `[[:>:]]' match the null string at the beginning and end of a word respectively. A word is defined as a sequence of word characters which is neither preceded nor followed by word characters. A word character is an .I alnum character (as defined by .IR ctype (3)) or an underscore. This is an extension, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other systems. .PP In the event that an RE could match more than one substring of a given string, the RE matches the one starting earliest in the string. If the RE could match more than one substring starting at that point, it matches the longest. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the RE taking priority over ones starting later. Note that higher-level subexpressions thus take priority over their lower-level component subexpressions. .PP Match lengths are measured in characters, not collating elements. A null string is considered longer than no match at all. For example, `bb*' matches the three middle characters of `abbbc', `(wee|week)(knights|nights)' matches all ten characters of `weeknights', when `(.*).*' is matched against `abc' the parenthesized subexpression matches all three characters, and when `(a*)*' is matched against `bc' both the whole RE and the parenthesized subexpression match the null string. .PP If case-independent matching is specified, the effect is much as if all case distinctions had vanished from the alphabet. When an alphabetic that exists in multiple cases appears as an ordinary character outside a bracket expression, it is effectively transformed into a bracket expression containing both cases, e.g. `x' becomes `[xX]'. When it appears inside a bracket expression, all case counterparts of it are added to the bracket expression, so that (e.g.) `[x]' becomes `[xX]' and `[^x]' becomes `[^xX]'. .PP No particular limit is imposed on the length of REs\(dg. Programs intended to be portable should not employ REs longer than 256 bytes, as an implementation can refuse to accept such REs and remain POSIX-compliant. .PP Obsolete (``basic'') regular expressions differ in several respects. `|', `+', and `?' are ordinary characters and there is no equivalent for their functionality. The delimiters for bounds are `\e{' and `\e}', with `{' and `}' by themselves ordinary characters. The parentheses for nested subexpressions are `\e(' and `\e)', with `(' and `)' by themselves ordinary characters. `^' is an ordinary character except at the beginning of the RE or\(dg the beginning of a parenthesized subexpression, `$' is an ordinary character except at the end of the RE or\(dg the end of a parenthesized subexpression, and `*' is an ordinary character if it appears at the beginning of the RE or the beginning of a parenthesized subexpression (after a possible leading `^'). Finally, there is one new type of atom, a \fIback reference\fR: `\e' followed by a non-zero decimal digit \fId\fR matches the same sequence of characters matched by the \fId\fRth parenthesized subexpression (numbering subexpressions by the positions of their opening parentheses, left to right), so that (e.g.) `\e([bc]\e)\e1' matches `bb' or `cc' but not `bc'. .SH SEE ALSO regex(3) .PP POSIX 1003.2, section 2.8 (Regular Expression Notation). .SH BUGS Having two kinds of REs is a botch. .PP The current 1003.2 spec says that `)' is an ordinary character in the absence of an unmatched `('; this was an unintentional result of a wording error, and change is likely. Avoid relying on it. .PP Back references are a dreadful botch, posing major problems for efficient implementations. They are also somewhat vaguely defined (does `a\e(\e(b\e)*\e2\e)*d' match `abbbd'?). Avoid using them. .PP 1003.2's specification of case-independent matching is vague. The ``one case implies all cases'' definition given above is current consensus among implementors as to the right interpretation. .PP The syntax for word boundaries is incredibly ugly. nvi-1.81.6/regex/regcomp.c0100644000076400001440000012202710720065506014370 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regcomp.c 8.4 (Berkeley) 3/19/94 */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)regcomp.c 8.4 (Berkeley) 3/19/94"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include #include #include #include "utils.h" #include "regex2.h" #include "cclass.h" #include "cname.h" /* * parse structure, passed up and down to avoid global variables and * other clumsinesses */ struct parse { RCHAR_T *next; /* next character in RE */ RCHAR_T *end; /* end of string (-> NUL normally) */ int error; /* has an error been seen? */ sop *strip; /* malloced strip */ sopno ssize; /* malloced strip size (allocated) */ sopno slen; /* malloced strip length (used) */ int ncsalloc; /* number of csets allocated */ struct re_guts *g; # define NPAREN 10 /* we need to remember () 1-9 for back refs */ sopno pbegin[NPAREN]; /* -> ( ([0] unused) */ sopno pend[NPAREN]; /* -> ) ([0] unused) */ }; /* ========= begin header generated by ./mkh ========= */ #ifdef __cplusplus extern "C" { #endif /* === regcomp.c === */ static void p_ere __P((struct parse *p, int stop)); static void p_ere_exp __P((struct parse *p)); static void p_str __P((struct parse *p)); static void p_bre __P((struct parse *p, int end1, int end2)); static int p_simp_re __P((struct parse *p, int starordinary)); static int p_count __P((struct parse *p)); static void p_bracket __P((struct parse *p)); static void p_b_term __P((struct parse *p, cset *cs)); static void p_b_cclass __P((struct parse *p, cset *cs)); static void p_b_eclass __P((struct parse *p, cset *cs)); static char p_b_symbol __P((struct parse *p)); static char p_b_coll_elem __P((struct parse *p, int endc)); static char othercase __P((int ch)); static void bothcases __P((struct parse *p, int ch)); static void ordinary __P((struct parse *p, int ch)); static void nonnewline __P((struct parse *p)); static void repeat __P((struct parse *p, sopno start, int from, int to)); static int seterr __P((struct parse *p, int e)); static cset *allocset __P((struct parse *p)); static void freeset __P((struct parse *p, cset *cs)); static int freezeset __P((struct parse *p, cset *cs)); static int firstch __P((struct parse *p, cset *cs)); static int nch __P((struct parse *p, cset *cs)); static void mcadd __P((struct parse *p, cset *cs, char *cp)); static void mcsub __P((cset *cs, char *cp)); static int mcin __P((cset *cs, char *cp)); static char *mcfind __P((cset *cs, char *cp)); static void mcinvert __P((struct parse *p, cset *cs)); static void mccase __P((struct parse *p, cset *cs)); static int isinsets __P((struct re_guts *g, int c)); static int samesets __P((struct re_guts *g, int c1, int c2)); static void categorize __P((struct parse *p, struct re_guts *g)); static sopno dupl __P((struct parse *p, sopno start, sopno finish)); static void doemit __P((struct parse *p, sop op, size_t opnd)); static void doinsert __P((struct parse *p, sop op, size_t opnd, sopno pos)); static void dofwd __P((struct parse *p, sopno pos, sop value)); static void enlarge __P((struct parse *p, sopno size)); static void stripsnug __P((struct parse *p, struct re_guts *g)); static void findmust __P((struct parse *p, struct re_guts *g)); static sopno pluscount __P((struct parse *p, struct re_guts *g)); #ifdef __cplusplus } #endif /* ========= end header generated by ./mkh ========= */ static RCHAR_T nuls[10]; /* place to point scanner in event of error */ /* * macros for use with parse structure * BEWARE: these know that the parse structure is named `p' !!! */ #define PEEK() (*p->next) #define PEEK2() (*(p->next+1)) #define MORE() (p->next < p->end) #define MORE2() (p->next+1 < p->end) #define SEE(c) (MORE() && PEEK() == (c)) #define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b)) #define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0) #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0) #define NEXT() (p->next++) #define NEXT2() (p->next += 2) #define NEXTn(n) (p->next += (n)) #define GETNEXT() (*p->next++) #define SETERROR(e) seterr(p, (e)) #define REQUIRE(co, e) ((co) || SETERROR(e)) #define MUSTSEE(c, e) (REQUIRE(MORE() && PEEK() == (c), e)) #define MUSTEAT(c, e) (REQUIRE(MORE() && GETNEXT() == (c), e)) #define MUSTNOTSEE(c, e) (REQUIRE(!MORE() || PEEK() != (c), e)) #define EMIT(op, sopnd) doemit(p, (sop)(op), (size_t)(sopnd)) #define INSERT(op, pos) doinsert(p, (sop)(op), HERE()-(pos)+1, pos) #define AHEAD(pos) dofwd(p, pos, HERE()-(pos)) #define ASTERN(sop, pos) EMIT(sop, HERE()-pos) #define HERE() (p->slen) #define THERE() (p->slen - 1) #define THERETHERE() (p->slen - 2) #define DROP(n) (p->slen -= (n)) #ifndef NDEBUG static int never = 0; /* for use in asserts; shuts lint up */ #else #define never 0 /* some s have bugs too */ #endif /* - regcomp - interface for parser and compilation = extern int regcomp(regex_t *, const RCHAR_T *, int); = #define REG_BASIC 0000 = #define REG_EXTENDED 0001 = #define REG_ICASE 0002 = #define REG_NOSUB 0004 = #define REG_NEWLINE 0010 = #define REG_NOSPEC 0020 = #define REG_PEND 0040 = #define REG_DUMP 0200 */ int /* 0 success, otherwise REG_something */ regcomp(regex_t *preg, const RCHAR_T *pattern, int cflags) { struct parse pa; register struct re_guts *g; register struct parse *p = &pa; register int i; register size_t len; #ifdef REDEBUG # define GOODFLAGS(f) (f) #else # define GOODFLAGS(f) ((f)&~REG_DUMP) #endif cflags = GOODFLAGS(cflags); if ((cflags®_EXTENDED) && (cflags®_NOSPEC)) return(REG_INVARG); if (cflags®_PEND) { if (preg->re_endp < pattern) return(REG_INVARG); len = preg->re_endp - pattern; } else len = STRLEN(pattern); /* do the mallocs early so failure handling is easy */ g = (struct re_guts *)malloc(sizeof(struct re_guts) + (NC-1)*sizeof(cat_t)); if (g == NULL) return(REG_ESPACE); p->ssize = len/(size_t)2*(size_t)3 + (size_t)1; /* ugh */ p->strip = (sop *)malloc(p->ssize * sizeof(sop)); p->slen = 0; if (p->strip == NULL) { free((char *)g); return(REG_ESPACE); } /* set things up */ p->g = g; p->next = (RCHAR_T *)pattern; /* convenience; we do not modify it */ p->end = p->next + len; p->error = 0; p->ncsalloc = 0; for (i = 0; i < NPAREN; i++) { p->pbegin[i] = 0; p->pend[i] = 0; } g->csetsize = NC; g->sets = NULL; g->setbits = NULL; g->ncsets = 0; g->cflags = cflags; g->iflags = 0; g->nbol = 0; g->neol = 0; g->must = NULL; g->mlen = 0; g->nsub = 0; #if 0 g->ncategories = 1; /* category 0 is "everything else" */ g->categories = &g->catspace[-(CHAR_MIN)]; (void) memset((char *)g->catspace, 0, NC*sizeof(cat_t)); #endif g->backrefs = 0; /* do it */ EMIT(OEND, 0); g->firststate = THERE(); if (cflags®_EXTENDED) p_ere(p, OUT); else if (cflags®_NOSPEC) p_str(p); else p_bre(p, OUT, OUT); EMIT(OEND, 0); g->laststate = THERE(); /* tidy up loose ends and fill things in */ categorize(p, g); stripsnug(p, g); findmust(p, g); g->nplus = pluscount(p, g); g->magic = MAGIC2; preg->re_nsub = g->nsub; preg->re_g = g; preg->re_magic = MAGIC1; #ifndef REDEBUG /* not debugging, so can't rely on the assert() in regexec() */ if (g->iflags&BAD) SETERROR(REG_ASSERT); #endif /* win or lose, we're done */ if (p->error != 0) /* lose */ regfree(preg); return(p->error); } /* - p_ere - ERE parser top level, concatenation and alternation == static void p_ere(register struct parse *p, int stop); */ static void p_ere(register struct parse *p, int stop) /* character this ERE should end at */ { register char c; register sopno prevback; register sopno prevfwd; register sopno conc; register int first = 1; /* is this the first alternative? */ for (;;) { /* do a bunch of concatenated expressions */ conc = HERE(); while (MORE() && (c = PEEK()) != '|' && c != stop) p_ere_exp(p); REQUIRE(HERE() != conc, REG_EMPTY); /* require nonempty */ if (!EAT('|')) break; /* NOTE BREAK OUT */ if (first) { INSERT(OCH_, conc); /* offset is wrong */ prevfwd = conc; prevback = conc; first = 0; } ASTERN(OOR1, prevback); prevback = THERE(); AHEAD(prevfwd); /* fix previous offset */ prevfwd = HERE(); EMIT(OOR2, 0); /* offset is very wrong */ } if (!first) { /* tail-end fixups */ AHEAD(prevfwd); ASTERN(O_CH, prevback); } assert(!MORE() || SEE(stop)); } /* - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op == static void p_ere_exp(register struct parse *p); */ static void p_ere_exp(register struct parse *p) { register char c; register sopno pos; register int count; register int count2; register sopno subno; int wascaret = 0; assert(MORE()); /* caller should have ensured this */ c = GETNEXT(); pos = HERE(); switch (c) { case '(': REQUIRE(MORE(), REG_EPAREN); p->g->nsub++; subno = p->g->nsub; if (subno < NPAREN) p->pbegin[subno] = HERE(); EMIT(OLPAREN, subno); if (!SEE(')')) p_ere(p, ')'); if (subno < NPAREN) { p->pend[subno] = HERE(); assert(p->pend[subno] != 0); } EMIT(ORPAREN, subno); MUSTEAT(')', REG_EPAREN); break; #ifndef POSIX_MISTAKE case ')': /* happens only if no current unmatched ( */ /* * You may ask, why the ifndef? Because I didn't notice * this until slightly too late for 1003.2, and none of the * other 1003.2 regular-expression reviewers noticed it at * all. So an unmatched ) is legal POSIX, at least until * we can get it fixed. */ SETERROR(REG_EPAREN); break; #endif case '^': EMIT(OBOL, 0); p->g->iflags |= USEBOL; p->g->nbol++; wascaret = 1; break; case '$': EMIT(OEOL, 0); p->g->iflags |= USEEOL; p->g->neol++; break; case '|': SETERROR(REG_EMPTY); break; case '*': case '+': case '?': SETERROR(REG_BADRPT); break; case '.': if (p->g->cflags®_NEWLINE) nonnewline(p); else EMIT(OANY, 0); break; case '[': p_bracket(p); break; case '\\': REQUIRE(MORE(), REG_EESCAPE); c = GETNEXT(); ordinary(p, c); break; case '{': /* okay as ordinary except if digit follows */ REQUIRE(!MORE() || !isdigit(PEEK()), REG_BADRPT); /* FALLTHROUGH */ default: ordinary(p, c); break; } if (!MORE()) return; c = PEEK(); /* we call { a repetition if followed by a digit */ if (!( c == '*' || c == '+' || c == '?' || (c == '{' && MORE2() && isdigit(PEEK2())) )) return; /* no repetition, we're done */ NEXT(); REQUIRE(!wascaret, REG_BADRPT); switch (c) { case '*': /* implemented as +? */ /* this case does not require the (y|) trick, noKLUDGE */ INSERT(OPLUS_, pos); ASTERN(O_PLUS, pos); INSERT(OQUEST_, pos); ASTERN(O_QUEST, pos); break; case '+': INSERT(OPLUS_, pos); ASTERN(O_PLUS, pos); break; case '?': /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ INSERT(OCH_, pos); /* offset slightly wrong */ ASTERN(OOR1, pos); /* this one's right */ AHEAD(pos); /* fix the OCH_ */ EMIT(OOR2, 0); /* offset very wrong... */ AHEAD(THERE()); /* ...so fix it */ ASTERN(O_CH, THERETHERE()); break; case '{': count = p_count(p); if (EAT(',')) { if (isdigit(PEEK())) { count2 = p_count(p); REQUIRE(count <= count2, REG_BADBR); } else /* single number with comma */ count2 = INFINITY; } else /* just a single number */ count2 = count; repeat(p, pos, count, count2); if (!EAT('}')) { /* error heuristics */ while (MORE() && PEEK() != '}') NEXT(); REQUIRE(MORE(), REG_EBRACE); SETERROR(REG_BADBR); } break; } if (!MORE()) return; c = PEEK(); if (!( c == '*' || c == '+' || c == '?' || (c == '{' && MORE2() && isdigit(PEEK2())) ) ) return; SETERROR(REG_BADRPT); } /* - p_str - string (no metacharacters) "parser" == static void p_str(register struct parse *p); */ static void p_str(register struct parse *p) { REQUIRE(MORE(), REG_EMPTY); while (MORE()) ordinary(p, GETNEXT()); } /* - p_bre - BRE parser top level, anchoring and concatenation == static void p_bre(register struct parse *p, register int end1, \ == register int end2); * Giving end1 as OUT essentially eliminates the end1/end2 check. * * This implementation is a bit of a kludge, in that a trailing $ is first * taken as an ordinary character and then revised to be an anchor. The * only undesirable side effect is that '$' gets included as a character * category in such cases. This is fairly harmless; not worth fixing. * The amount of lookahead needed to avoid this kludge is excessive. */ static void p_bre(register struct parse *p, register int end1, register int end2) /* first terminating character */ /* second terminating character */ { register sopno start = HERE(); register int first = 1; /* first subexpression? */ register int wasdollar = 0; if (EAT('^')) { EMIT(OBOL, 0); p->g->iflags |= USEBOL; p->g->nbol++; } while (MORE() && !SEETWO(end1, end2)) { wasdollar = p_simp_re(p, first); first = 0; } if (wasdollar) { /* oops, that was a trailing anchor */ DROP(1); EMIT(OEOL, 0); p->g->iflags |= USEEOL; p->g->neol++; } REQUIRE(HERE() != start, REG_EMPTY); /* require nonempty */ } /* - p_simp_re - parse a simple RE, an atom possibly followed by a repetition == static int p_simp_re(register struct parse *p, int starordinary); */ static int /* was the simple RE an unbackslashed $? */ p_simp_re(register struct parse *p, int starordinary) /* is a leading * an ordinary character? */ { register int c; register int count; register int count2; register sopno pos; register int i; register sopno subno; # define BACKSL (1<g->cflags®_NEWLINE) nonnewline(p); else EMIT(OANY, 0); break; case '[': p_bracket(p); break; case BACKSL|'{': SETERROR(REG_BADRPT); break; case BACKSL|'(': p->g->nsub++; subno = p->g->nsub; if (subno < NPAREN) p->pbegin[subno] = HERE(); EMIT(OLPAREN, subno); /* the MORE here is an error heuristic */ if (MORE() && !SEETWO('\\', ')')) p_bre(p, '\\', ')'); if (subno < NPAREN) { p->pend[subno] = HERE(); assert(p->pend[subno] != 0); } EMIT(ORPAREN, subno); REQUIRE(EATTWO('\\', ')'), REG_EPAREN); break; case BACKSL|')': /* should not get here -- must be user */ case BACKSL|'}': SETERROR(REG_EPAREN); break; case BACKSL|'1': case BACKSL|'2': case BACKSL|'3': case BACKSL|'4': case BACKSL|'5': case BACKSL|'6': case BACKSL|'7': case BACKSL|'8': case BACKSL|'9': i = (c&~BACKSL) - '0'; assert(i < NPAREN); if (p->pend[i] != 0) { assert(i <= p->g->nsub); EMIT(OBACK_, i); assert(p->pbegin[i] != 0); assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); assert(OP(p->strip[p->pend[i]]) == ORPAREN); (void) dupl(p, p->pbegin[i]+1, p->pend[i]); EMIT(O_BACK, i); } else SETERROR(REG_ESUBREG); p->g->backrefs = 1; break; case '*': REQUIRE(starordinary, REG_BADRPT); /* FALLTHROUGH */ default: ordinary(p, c &~ BACKSL); break; } if (EAT('*')) { /* implemented as +? */ /* this case does not require the (y|) trick, noKLUDGE */ INSERT(OPLUS_, pos); ASTERN(O_PLUS, pos); INSERT(OQUEST_, pos); ASTERN(O_QUEST, pos); } else if (EATTWO('\\', '{')) { count = p_count(p); if (EAT(',')) { if (MORE() && isdigit(PEEK())) { count2 = p_count(p); REQUIRE(count <= count2, REG_BADBR); } else /* single number with comma */ count2 = INFINITY; } else /* just a single number */ count2 = count; repeat(p, pos, count, count2); if (!EATTWO('\\', '}')) { /* error heuristics */ while (MORE() && !SEETWO('\\', '}')) NEXT(); REQUIRE(MORE(), REG_EBRACE); SETERROR(REG_BADBR); } } else if (c == (unsigned char)'$') /* $ (but not \$) ends it */ return(1); return(0); } /* - p_count - parse a repetition count == static int p_count(register struct parse *p); */ static int /* the value */ p_count(register struct parse *p) { register int count = 0; register int ndigits = 0; while (MORE() && isdigit(PEEK()) && count <= DUPMAX) { count = count*10 + (GETNEXT() - '0'); ndigits++; } REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR); return(count); } /* - p_bracket - parse a bracketed character list == static void p_bracket(register struct parse *p); * * Note a significant property of this code: if the allocset() did SETERROR, * no set operations are done. */ static void p_bracket(register struct parse *p) { register char c; register cset *cs = allocset(p); register int invert = 0; static RCHAR_T bow[] = { '[', ':', '<', ':', ']', ']' }; static RCHAR_T eow[] = { '[', ':', '>', ':', ']', ']' }; /* Dept of Truly Sickening Special-Case Kludges */ if (p->next + 5 < p->end && MEMCMP(p->next, bow, 6) == 0) { EMIT(OBOW, 0); NEXTn(6); return; } if (p->next + 5 < p->end && MEMCMP(p->next, eow, 6) == 0) { EMIT(OEOW, 0); NEXTn(6); return; } if (EAT('^')) invert++; /* make note to invert set at end */ if (EAT(']')) CHadd(cs, ']'); else if (EAT('-')) CHadd(cs, '-'); while (MORE() && PEEK() != ']' && !SEETWO('-', ']')) p_b_term(p, cs); if (EAT('-')) CHadd(cs, '-'); MUSTEAT(']', REG_EBRACK); if (p->error != 0) /* don't mess things up further */ return; if (p->g->cflags®_ICASE) { register int i; register int ci; for (i = p->g->csetsize - 1; i >= 0; i--) if (CHIN(cs, i) && isalpha(i)) { ci = othercase(i); if (ci != i) CHadd(cs, ci); } if (cs->multis != NULL) mccase(p, cs); } if (invert) { register int i; for (i = p->g->csetsize - 1; i >= 0; i--) if (CHIN(cs, i)) CHsub(cs, i); else CHadd(cs, i); if (p->g->cflags®_NEWLINE) CHsub(cs, '\n'); if (cs->multis != NULL) mcinvert(p, cs); } assert(cs->multis == NULL); /* xxx */ if (nch(p, cs) == 1) { /* optimize singleton sets */ ordinary(p, firstch(p, cs)); freeset(p, cs); } else EMIT(OANYOF, freezeset(p, cs)); } /* - p_b_term - parse one term of a bracketed character list == static void p_b_term(register struct parse *p, register cset *cs); */ static void p_b_term(register struct parse *p, register cset *cs) { register char c; register char start, finish; register int i; /* classify what we've got */ switch ((MORE()) ? PEEK() : '\0') { case '[': c = (MORE2()) ? PEEK2() : '\0'; break; case '-': SETERROR(REG_ERANGE); return; /* NOTE RETURN */ break; default: c = '\0'; break; } switch (c) { case ':': /* character class */ NEXT2(); REQUIRE(MORE(), REG_EBRACK); c = PEEK(); REQUIRE(c != '-' && c != ']', REG_ECTYPE); p_b_cclass(p, cs); REQUIRE(MORE(), REG_EBRACK); REQUIRE(EATTWO(':', ']'), REG_ECTYPE); break; case '=': /* equivalence class */ NEXT2(); REQUIRE(MORE(), REG_EBRACK); c = PEEK(); REQUIRE(c != '-' && c != ']', REG_ECOLLATE); p_b_eclass(p, cs); REQUIRE(MORE(), REG_EBRACK); REQUIRE(EATTWO('=', ']'), REG_ECOLLATE); break; default: /* symbol, ordinary character, or range */ /* xxx revision needed for multichar stuff */ start = p_b_symbol(p); if (SEE('-') && MORE2() && PEEK2() != ']') { /* range */ NEXT(); if (EAT('-')) finish = '-'; else finish = p_b_symbol(p); } else finish = start; /* xxx what about signed chars here... */ REQUIRE(start <= finish, REG_ERANGE); for (i = start; i <= finish; i++) CHadd(cs, i); break; } } /* - p_b_cclass - parse a character-class name and deal with it == static void p_b_cclass(register struct parse *p, register cset *cs); */ static void p_b_cclass(register struct parse *p, register cset *cs) { register RCHAR_T *sp = p->next; register struct cclass *cp; register size_t len; register char *u; register char c; while (MORE() && isalpha(PEEK())) NEXT(); len = p->next - sp; for (cp = cclasses; cp->name != NULL; cp++) if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) break; if (cp->name == NULL) { /* oops, didn't find it */ SETERROR(REG_ECTYPE); return; } u = cp->chars; while ((c = *u++) != '\0') CHadd(cs, c); for (u = cp->multis; *u != '\0'; u += strlen(u) + 1) MCadd(p, cs, u); } /* - p_b_eclass - parse an equivalence-class name and deal with it == static void p_b_eclass(register struct parse *p, register cset *cs); * * This implementation is incomplete. xxx */ static void p_b_eclass(register struct parse *p, register cset *cs) { register char c; c = p_b_coll_elem(p, '='); CHadd(cs, c); } /* - p_b_symbol - parse a character or [..]ed multicharacter collating symbol == static char p_b_symbol(register struct parse *p); */ static char /* value of symbol */ p_b_symbol(register struct parse *p) { register char value; REQUIRE(MORE(), REG_EBRACK); if (!EATTWO('[', '.')) return(GETNEXT()); /* collating symbol */ value = p_b_coll_elem(p, '.'); REQUIRE(EATTWO('.', ']'), REG_ECOLLATE); return(value); } /* - p_b_coll_elem - parse a collating-element name and look it up == static char p_b_coll_elem(register struct parse *p, int endc); */ static char /* value of collating element */ p_b_coll_elem(register struct parse *p, int endc) /* name ended by endc,']' */ { register RCHAR_T *sp = p->next; register struct cname *cp; register int len; register char c; while (MORE() && !SEETWO(endc, ']')) NEXT(); if (!MORE()) { SETERROR(REG_EBRACK); return(0); } len = p->next - sp; for (cp = cnames; cp->name != NULL; cp++) if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) return(cp->code); /* known name */ if (len == 1) return(*sp); /* single character */ SETERROR(REG_ECOLLATE); /* neither */ return(0); } /* - othercase - return the case counterpart of an alphabetic == static char othercase(int ch); */ static char /* if no counterpart, return ch */ othercase(int ch) { assert(isalpha(ch)); if (isupper(ch)) return(tolower(ch)); else if (islower(ch)) return(toupper(ch)); else /* peculiar, but could happen */ return(ch); } /* - bothcases - emit a dualcase version of a two-case character == static void bothcases(register struct parse *p, int ch); * * Boy, is this implementation ever a kludge... */ static void bothcases(register struct parse *p, int ch) { register RCHAR_T *oldnext = p->next; register RCHAR_T *oldend = p->end; RCHAR_T bracket[3]; assert(othercase(ch) != ch); /* p_bracket() would recurse */ p->next = bracket; p->end = bracket+2; bracket[0] = ch; bracket[1] = ']'; bracket[2] = '\0'; p_bracket(p); assert(p->next == bracket+2); p->next = oldnext; p->end = oldend; } /* - ordinary - emit an ordinary character == static void ordinary(register struct parse *p, register int ch); */ static void ordinary(register struct parse *p, register int ch) { /* register cat_t *cap = p->g->categories; */ if ((p->g->cflags®_ICASE) && isalpha(ch) && othercase(ch) != ch) bothcases(p, ch); else { EMIT(OCHAR, (UCHAR_T)ch); /* if (cap[ch] == 0) cap[ch] = p->g->ncategories++; */ } } /* - nonnewline - emit REG_NEWLINE version of OANY == static void nonnewline(register struct parse *p); * * Boy, is this implementation ever a kludge... */ static void nonnewline(register struct parse *p) { register RCHAR_T *oldnext = p->next; register RCHAR_T *oldend = p->end; RCHAR_T bracket[4]; p->next = bracket; p->end = bracket+3; bracket[0] = '^'; bracket[1] = '\n'; bracket[2] = ']'; bracket[3] = '\0'; p_bracket(p); assert(p->next == bracket+3); p->next = oldnext; p->end = oldend; } /* - repeat - generate code for a bounded repetition, recursively if needed == static void repeat(register struct parse *p, sopno start, int from, int to); */ static void repeat(register struct parse *p, sopno start, int from, int to) /* operand from here to end of strip */ /* repeated from this number */ /* to this number of times (maybe INFINITY) */ { register sopno finish = HERE(); # define N 2 # define INF 3 # define REP(f, t) ((f)*8 + (t)) # define MAP(n) (((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N) register sopno copy; if (p->error != 0) /* head off possible runaway recursion */ return; assert(from <= to); switch (REP(MAP(from), MAP(to))) { case REP(0, 0): /* must be user doing this */ DROP(finish-start); /* drop the operand */ break; case REP(0, 1): /* as x{1,1}? */ case REP(0, N): /* as x{1,n}? */ case REP(0, INF): /* as x{1,}? */ /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ INSERT(OCH_, start); /* offset is wrong... */ repeat(p, start+1, 1, to); ASTERN(OOR1, start); AHEAD(start); /* ... fix it */ EMIT(OOR2, 0); AHEAD(THERE()); ASTERN(O_CH, THERETHERE()); break; case REP(1, 1): /* trivial case */ /* done */ break; case REP(1, N): /* as x?x{1,n-1} */ /* KLUDGE: emit y? as (y|) until subtle bug gets fixed */ INSERT(OCH_, start); ASTERN(OOR1, start); AHEAD(start); EMIT(OOR2, 0); /* offset very wrong... */ AHEAD(THERE()); /* ...so fix it */ ASTERN(O_CH, THERETHERE()); copy = dupl(p, start+1, finish+1); assert(copy == finish+4); repeat(p, copy, 1, to-1); break; case REP(1, INF): /* as x+ */ INSERT(OPLUS_, start); ASTERN(O_PLUS, start); break; case REP(N, N): /* as xx{m-1,n-1} */ copy = dupl(p, start, finish); repeat(p, copy, from-1, to-1); break; case REP(N, INF): /* as xx{n-1,INF} */ copy = dupl(p, start, finish); repeat(p, copy, from-1, to); break; default: /* "can't happen" */ SETERROR(REG_ASSERT); /* just in case */ break; } } /* - seterr - set an error condition == static int seterr(register struct parse *p, int e); */ static int /* useless but makes type checking happy */ seterr(register struct parse *p, int e) { if (p->error == 0) /* keep earliest error condition */ p->error = e; p->next = nuls; /* try to bring things to a halt */ p->end = nuls; return(0); /* make the return value well-defined */ } /* - allocset - allocate a set of characters for [] == static cset *allocset(register struct parse *p); */ static cset * allocset(register struct parse *p) { register int no = p->g->ncsets++; register size_t nc; register size_t nbytes; register cset *cs; register size_t css = (size_t)p->g->csetsize; register int i; if (no >= p->ncsalloc) { /* need another column of space */ p->ncsalloc += CHAR_BIT; nc = p->ncsalloc; assert(nc % CHAR_BIT == 0); nbytes = nc / CHAR_BIT * css; if (p->g->sets == NULL) p->g->sets = (cset *)malloc(nc * sizeof(cset)); else p->g->sets = (cset *)realloc((char *)p->g->sets, nc * sizeof(cset)); if (p->g->setbits == NULL) p->g->setbits = (uch *)malloc(nbytes); else { p->g->setbits = (uch *)realloc((char *)p->g->setbits, nbytes); /* xxx this isn't right if setbits is now NULL */ for (i = 0; i < no; i++) p->g->sets[i].ptr = p->g->setbits + css*(i/CHAR_BIT); } if (p->g->sets != NULL && p->g->setbits != NULL) (void) memset((char *)p->g->setbits + (nbytes - css), 0, css); else { no = 0; SETERROR(REG_ESPACE); /* caller's responsibility not to do set ops */ } } assert(p->g->sets != NULL); /* xxx */ cs = &p->g->sets[no]; cs->ptr = p->g->setbits + css*((no)/CHAR_BIT); cs->mask = 1 << ((no) % CHAR_BIT); cs->hash = 0; cs->smultis = 0; cs->multis = NULL; return(cs); } /* - freeset - free a now-unused set == static void freeset(register struct parse *p, register cset *cs); */ static void freeset(register struct parse *p, register cset *cs) { register int i; register cset *top = &p->g->sets[p->g->ncsets]; register size_t css = (size_t)p->g->csetsize; for (i = 0; i < css; i++) CHsub(cs, i); if (cs == top-1) /* recover only the easy case */ p->g->ncsets--; } /* - freezeset - final processing on a set of characters == static int freezeset(register struct parse *p, register cset *cs); * * The main task here is merging identical sets. This is usually a waste * of time (although the hash code minimizes the overhead), but can win * big if REG_ICASE is being used. REG_ICASE, by the way, is why the hash * is done using addition rather than xor -- all ASCII [aA] sets xor to * the same value! */ static int /* set number */ freezeset(register struct parse *p, register cset *cs) { register uch h = cs->hash; register int i; register cset *top = &p->g->sets[p->g->ncsets]; register cset *cs2; register size_t css = (size_t)p->g->csetsize; /* look for an earlier one which is the same */ for (cs2 = &p->g->sets[0]; cs2 < top; cs2++) if (cs2->hash == h && cs2 != cs) { /* maybe */ for (i = 0; i < css; i++) if (!!CHIN(cs2, i) != !!CHIN(cs, i)) break; /* no */ if (i == css) break; /* yes */ } if (cs2 < top) { /* found one */ freeset(p, cs); cs = cs2; } return((int)(cs - p->g->sets)); } /* - firstch - return first character in a set (which must have at least one) == static int firstch(register struct parse *p, register cset *cs); */ static int /* character; there is no "none" value */ firstch(register struct parse *p, register cset *cs) { register int i; register size_t css = (size_t)p->g->csetsize; for (i = 0; i < css; i++) if (CHIN(cs, i)) return((char)i); assert(never); return(0); /* arbitrary */ } /* - nch - number of characters in a set == static int nch(register struct parse *p, register cset *cs); */ static int nch(register struct parse *p, register cset *cs) { register int i; register size_t css = (size_t)p->g->csetsize; register int n = 0; for (i = 0; i < css; i++) if (CHIN(cs, i)) n++; return(n); } /* - mcadd - add a collating element to a cset == static void mcadd(register struct parse *p, register cset *cs, \ == register char *cp); */ static void mcadd(register struct parse *p, register cset *cs, register char *cp) { register size_t oldend = cs->smultis; cs->smultis += strlen(cp) + 1; if (cs->multis == NULL) cs->multis = malloc(cs->smultis); else cs->multis = realloc(cs->multis, cs->smultis); if (cs->multis == NULL) { SETERROR(REG_ESPACE); return; } (void) strcpy(cs->multis + oldend - 1, cp); cs->multis[cs->smultis - 1] = '\0'; } /* - mcsub - subtract a collating element from a cset == static void mcsub(register cset *cs, register char *cp); */ static void mcsub(register cset *cs, register char *cp) { register char *fp = mcfind(cs, cp); register size_t len = strlen(fp); assert(fp != NULL); (void) memmove(fp, fp + len + 1, cs->smultis - (fp + len + 1 - cs->multis)); cs->smultis -= len; if (cs->smultis == 0) { free(cs->multis); cs->multis = NULL; return; } cs->multis = realloc(cs->multis, cs->smultis); assert(cs->multis != NULL); } /* - mcin - is a collating element in a cset? == static int mcin(register cset *cs, register char *cp); */ static int mcin(register cset *cs, register char *cp) { return(mcfind(cs, cp) != NULL); } /* - mcfind - find a collating element in a cset == static char *mcfind(register cset *cs, register char *cp); */ static char * mcfind(register cset *cs, register char *cp) { register char *p; if (cs->multis == NULL) return(NULL); for (p = cs->multis; *p != '\0'; p += strlen(p) + 1) if (strcmp(cp, p) == 0) return(p); return(NULL); } /* - mcinvert - invert the list of collating elements in a cset == static void mcinvert(register struct parse *p, register cset *cs); * * This would have to know the set of possibilities. Implementation * is deferred. */ static void mcinvert(register struct parse *p, register cset *cs) { assert(cs->multis == NULL); /* xxx */ } /* - mccase - add case counterparts of the list of collating elements in a cset == static void mccase(register struct parse *p, register cset *cs); * * This would have to know the set of possibilities. Implementation * is deferred. */ static void mccase(register struct parse *p, register cset *cs) { assert(cs->multis == NULL); /* xxx */ } /* - isinsets - is this character in any sets? == static int isinsets(register struct re_guts *g, int c); */ static int /* predicate */ isinsets(register struct re_guts *g, int c) { register uch *col; register int i; register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT; register unsigned uc = (unsigned char)c; for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize) if (col[uc] != 0) return(1); return(0); } /* - samesets - are these two characters in exactly the same sets? == static int samesets(register struct re_guts *g, int c1, int c2); */ static int /* predicate */ samesets(register struct re_guts *g, int c1, int c2) { register uch *col; register int i; register int ncols = (g->ncsets+(CHAR_BIT-1)) / CHAR_BIT; register unsigned uc1 = (unsigned char)c1; register unsigned uc2 = (unsigned char)c2; for (i = 0, col = g->setbits; i < ncols; i++, col += g->csetsize) if (col[uc1] != col[uc2]) return(0); return(1); } /* - categorize - sort out character categories == static void categorize(struct parse *p, register struct re_guts *g); */ static void categorize(struct parse *p, register struct re_guts *g) { /* register cat_t *cats = g->categories; */ register int c; register int c2; register cat_t cat; /* avoid making error situations worse */ if (p->error != 0) return; /* for (c = CHAR_MIN; c <= CHAR_MAX; c++) if (cats[c] == 0 && isinsets(g, c)) { cat = g->ncategories++; cats[c] = cat; for (c2 = c+1; c2 <= CHAR_MAX; c2++) if (cats[c2] == 0 && samesets(g, c, c2)) cats[c2] = cat; } */ } /* - dupl - emit a duplicate of a bunch of sops == static sopno dupl(register struct parse *p, sopno start, sopno finish); */ static sopno /* start of duplicate */ dupl(register struct parse *p, sopno start, sopno finish) /* from here */ /* to this less one */ { register sopno ret = HERE(); register sopno len = finish - start; assert(finish >= start); if (len == 0) return(ret); enlarge(p, p->ssize + len); /* this many unexpected additions */ assert(p->ssize >= p->slen + len); (void) memcpy((char *)(p->strip + p->slen), (char *)(p->strip + start), (size_t)len*sizeof(sop)); p->slen += len; return(ret); } /* - doemit - emit a strip operator == static void doemit(register struct parse *p, sop op, size_t opnd); * * It might seem better to implement this as a macro with a function as * hard-case backup, but it's just too big and messy unless there are * some changes to the data structures. Maybe later. */ static void doemit(register struct parse *p, sop op, size_t opnd) { /* avoid making error situations worse */ if (p->error != 0) return; /* deal with oversize operands ("can't happen", more or less) */ assert(opnd < 1<slen >= p->ssize) enlarge(p, (p->ssize+1) / 2 * 3); /* +50% */ assert(p->slen < p->ssize); /* finally, it's all reduced to the easy case */ p->strip[p->slen++] = SOP(op, opnd); } /* - doinsert - insert a sop into the strip == static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos); */ static void doinsert(register struct parse *p, sop op, size_t opnd, sopno pos) { register sopno sn; register sop s; register int i; /* avoid making error situations worse */ if (p->error != 0) return; sn = HERE(); EMIT(op, opnd); /* do checks, ensure space */ assert(HERE() == sn+1); s = p->strip[sn]; /* adjust paren pointers */ assert(pos > 0); for (i = 1; i < NPAREN; i++) { if (p->pbegin[i] >= pos) { p->pbegin[i]++; } if (p->pend[i] >= pos) { p->pend[i]++; } } memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos], (HERE()-pos-1)*sizeof(sop)); p->strip[pos] = s; } /* - dofwd - complete a forward reference == static void dofwd(register struct parse *p, sopno pos, sop value); */ static void dofwd(register struct parse *p, register sopno pos, sop value) { /* avoid making error situations worse */ if (p->error != 0) return; assert(value < 1<strip[pos] = OP(p->strip[pos]) | value; } /* - enlarge - enlarge the strip == static void enlarge(register struct parse *p, sopno size); */ static void enlarge(register struct parse *p, register sopno size) { register sop *sp; if (p->ssize >= size) return; sp = (sop *)realloc(p->strip, size*sizeof(sop)); if (sp == NULL) { SETERROR(REG_ESPACE); return; } p->strip = sp; p->ssize = size; } /* - stripsnug - compact the strip == static void stripsnug(register struct parse *p, register struct re_guts *g); */ static void stripsnug(register struct parse *p, register struct re_guts *g) { g->nstates = p->slen; g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof(sop)); if (g->strip == NULL) { SETERROR(REG_ESPACE); g->strip = p->strip; } } /* - findmust - fill in must and mlen with longest mandatory literal string == static void findmust(register struct parse *p, register struct re_guts *g); * * This algorithm could do fancy things like analyzing the operands of | * for common subsequences. Someday. This code is simple and finds most * of the interesting cases. * * Note that must and mlen got initialized during setup. */ static void findmust(struct parse *p, register struct re_guts *g) { register sop *scan; sop *start; register sop *newstart; register sopno newlen; register sop s; register RCHAR_T *cp; register sopno i; /* avoid making error situations worse */ if (p->error != 0) return; /* find the longest OCHAR sequence in strip */ newlen = 0; scan = g->strip + 1; do { s = *scan++; switch (OP(s)) { case OCHAR: /* sequence member */ if (newlen == 0) /* new sequence */ newstart = scan - 1; newlen++; break; case OPLUS_: /* things that don't break one */ case OLPAREN: case ORPAREN: break; case OQUEST_: /* things that must be skipped */ case OCH_: scan--; do { scan += OPND(s); s = *scan; /* assert() interferes w debug printouts */ if (OP(s) != O_QUEST && OP(s) != O_CH && OP(s) != OOR2) { g->iflags |= BAD; return; } } while (OP(s) != O_QUEST && OP(s) != O_CH); /* fallthrough */ default: /* things that break a sequence */ if (newlen > g->mlen) { /* ends one */ start = newstart; g->mlen = newlen; } newlen = 0; break; } } while (OP(s) != OEND); if (g->mlen == 0) /* there isn't one */ return; /* turn it into a character string */ g->must = malloc(((size_t)g->mlen + 1) * sizeof(RCHAR_T)); if (g->must == NULL) { /* argh; just forget it */ g->mlen = 0; return; } cp = g->must; scan = start; for (i = g->mlen; i > 0; i--) { while (OP(s = *scan++) != OCHAR) continue; assert(cp < g->must + g->mlen); *cp++ = (RCHAR_T)OPND(s); } assert(cp == g->must + g->mlen); *cp++ = '\0'; /* just on general principles */ } /* - pluscount - count + nesting == static sopno pluscount(register struct parse *p, register struct re_guts *g); */ static sopno /* nesting depth */ pluscount(struct parse *p, register struct re_guts *g) { register sop *scan; register sop s; register sopno plusnest = 0; register sopno maxnest = 0; if (p->error != 0) return(0); /* there may not be an OEND */ scan = g->strip + 1; do { s = *scan++; switch (OP(s)) { case OPLUS_: plusnest++; break; case O_PLUS: if (plusnest > maxnest) maxnest = plusnest; plusnest--; break; } } while (OP(s) != OEND); if (plusnest != 0) g->iflags |= BAD; return(maxnest); } nvi-1.81.6/regex/regerror.c0100644000076400001440000001277710720065506014575 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regerror.c 8.3 (Berkeley) 3/19/94 */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)regerror.c 8.3 (Berkeley) 3/19/94"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include #include #include #include "utils.h" /* ========= begin header generated by ./mkh ========= */ #ifdef __cplusplus extern "C" { #endif /* === regerror.c === */ static char *regatoi __P((const regex_t *preg, char *localbuf)); #ifdef __cplusplus } #endif /* ========= end header generated by ./mkh ========= */ /* = #define REG_NOMATCH 1 = #define REG_BADPAT 2 = #define REG_ECOLLATE 3 = #define REG_ECTYPE 4 = #define REG_EESCAPE 5 = #define REG_ESUBREG 6 = #define REG_EBRACK 7 = #define REG_EPAREN 8 = #define REG_EBRACE 9 = #define REG_BADBR 10 = #define REG_ERANGE 11 = #define REG_ESPACE 12 = #define REG_BADRPT 13 = #define REG_EMPTY 14 = #define REG_ASSERT 15 = #define REG_INVARG 16 = #define REG_ATOI 255 // convert name to number (!) = #define REG_ITOA 0400 // convert number to name (!) */ static struct rerr { int code; char *name; char *explain; } rerrs[] = { REG_NOMATCH, "REG_NOMATCH", "regexec() failed to match", REG_BADPAT, "REG_BADPAT", "invalid regular expression", REG_ECOLLATE, "REG_ECOLLATE", "invalid collating element", REG_ECTYPE, "REG_ECTYPE", "invalid character class", REG_EESCAPE, "REG_EESCAPE", "trailing backslash (\\)", REG_ESUBREG, "REG_ESUBREG", "invalid backreference number", REG_EBRACK, "REG_EBRACK", "brackets ([ ]) not balanced", REG_EPAREN, "REG_EPAREN", "parentheses not balanced", REG_EBRACE, "REG_EBRACE", "braces not balanced", REG_BADBR, "REG_BADBR", "invalid repetition count(s)", REG_ERANGE, "REG_ERANGE", "invalid character range", REG_ESPACE, "REG_ESPACE", "out of memory", REG_BADRPT, "REG_BADRPT", "repetition-operator operand invalid", REG_EMPTY, "REG_EMPTY", "empty (sub)expression", REG_ASSERT, "REG_ASSERT", "\"can't happen\" -- you found a bug", REG_INVARG, "REG_INVARG", "invalid argument to regex routine", 0, "", "*** unknown regexp error code ***", }; /* - regerror - the interface to error numbers = extern size_t regerror(int, const regex_t *, char *, size_t); */ /* ARGSUSED */ size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) { register struct rerr *r; register size_t len; register int target = errcode &~ REG_ITOA; register char *s; char convbuf[50]; if (errcode == REG_ATOI) s = regatoi(preg, convbuf); else { for (r = rerrs; r->code != 0; r++) if (r->code == target) break; if (errcode®_ITOA) { if (r->code != 0) (void) strcpy(convbuf, r->name); else sprintf(convbuf, "REG_0x%x", target); assert(strlen(convbuf) < sizeof(convbuf)); s = convbuf; } else s = r->explain; } len = strlen(s) + 1; if (errbuf_size > 0) { if (errbuf_size > len) (void) strcpy(errbuf, s); else { (void) strncpy(errbuf, s, errbuf_size-1); errbuf[errbuf_size-1] = '\0'; } } return(len); } /* - regatoi - internal routine to implement REG_ATOI == static char *regatoi(const regex_t *preg, char *localbuf); */ static char * regatoi(const regex_t *preg, char *localbuf) { #if 0 /* we don't seem to use this and it gives a warning. */ register struct rerr *r; register size_t siz; register char *p; for (r = rerrs; r->code != 0; r++) if (strcmp(r->name, preg->re_endp) == 0) break; if (r->code == 0) return("0"); sprintf(localbuf, "%d", r->code); #else *localbuf = '\0'; #endif return(localbuf); } nvi-1.81.6/regex/regex.30100644000076400001440000004066010720065506013770 0ustar skimousers.\" Copyright (c) 1992, 1993, 1994 Henry Spencer. .\" Copyright (c) 1992, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Henry Spencer of the University of Toronto. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)regex.3 8.2 (Berkeley) 3/16/94 .\" .TH REGEX 3 "March 16, 1994" .de ZR .\" one other place knows this name: the SEE ALSO section .IR re_format (7) \\$1 .. .SH NAME regcomp, regexec, regerror, regfree \- regular-expression library .SH SYNOPSIS .ft B .\".na #include .br #include .HP 10 int regcomp(regex_t\ *preg, const\ char\ *pattern, int\ cflags); .HP int\ regexec(const\ regex_t\ *preg, const\ char\ *string, size_t\ nmatch, regmatch_t\ pmatch[], int\ eflags); .HP size_t\ regerror(int\ errcode, const\ regex_t\ *preg, char\ *errbuf, size_t\ errbuf_size); .HP void\ regfree(regex_t\ *preg); .\".ad .ft .SH DESCRIPTION These routines implement POSIX 1003.2 regular expressions (``RE''s); see .ZR . .I Regcomp compiles an RE written as a string into an internal form, .I regexec matches that internal form against a string and reports results, .I regerror transforms error codes from either into human-readable messages, and .I regfree frees any dynamically-allocated storage used by the internal form of an RE. .PP The header .I declares two structure types, .I regex_t and .IR regmatch_t , the former for compiled internal forms and the latter for match reporting. It also declares the four functions, a type .IR regoff_t , and a number of constants with names starting with ``REG_''. .PP .I Regcomp compiles the regular expression contained in the .I pattern string, subject to the flags in .IR cflags , and places the results in the .I regex_t structure pointed to by .IR preg . .I Cflags is the bitwise OR of zero or more of the following flags: .IP REG_EXTENDED \w'REG_EXTENDED'u+2n Compile modern (``extended'') REs, rather than the obsolete (``basic'') REs that are the default. .IP REG_BASIC This is a synonym for 0, provided as a counterpart to REG_EXTENDED to improve readability. .IP REG_NOSPEC Compile with recognition of all special characters turned off. All characters are thus considered ordinary, so the ``RE'' is a literal string. This is an extension, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other systems. REG_EXTENDED and REG_NOSPEC may not be used in the same call to .IR regcomp . .IP REG_ICASE Compile for matching that ignores upper/lower case distinctions. See .ZR . .IP REG_NOSUB Compile for matching that need only report success or failure, not what was matched. .IP REG_NEWLINE Compile for newline-sensitive matching. By default, newline is a completely ordinary character with no special meaning in either REs or strings. With this flag, `[^' bracket expressions and `.' never match newline, a `^' anchor matches the null string after any newline in the string in addition to its normal function, and the `$' anchor matches the null string before any newline in the string in addition to its normal function. .IP REG_PEND The regular expression ends, not at the first NUL, but just before the character pointed to by the .I re_endp member of the structure pointed to by .IR preg . The .I re_endp member is of type .IR const\ char\ * . This flag permits inclusion of NULs in the RE; they are considered ordinary characters. This is an extension, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other systems. .PP When successful, .I regcomp returns 0 and fills in the structure pointed to by .IR preg . One member of that structure (other than .IR re_endp ) is publicized: .IR re_nsub , of type .IR size_t , contains the number of parenthesized subexpressions within the RE (except that the value of this member is undefined if the REG_NOSUB flag was used). If .I regcomp fails, it returns a non-zero error code; see DIAGNOSTICS. .PP .I Regexec matches the compiled RE pointed to by .I preg against the .IR string , subject to the flags in .IR eflags , and reports results using .IR nmatch , .IR pmatch , and the returned value. The RE must have been compiled by a previous invocation of .IR regcomp . The compiled form is not altered during execution of .IR regexec , so a single compiled RE can be used simultaneously by multiple threads. .PP By default, the NUL-terminated string pointed to by .I string is considered to be the text of an entire line, minus any terminating newline. The .I eflags argument is the bitwise OR of zero or more of the following flags: .IP REG_NOTBOL \w'REG_STARTEND'u+2n The first character of the string is not the beginning of a line, so the `^' anchor should not match before it. This does not affect the behavior of newlines under REG_NEWLINE. .IP REG_NOTEOL The NUL terminating the string does not end a line, so the `$' anchor should not match before it. This does not affect the behavior of newlines under REG_NEWLINE. .IP REG_STARTEND The string is considered to start at \fIstring\fR\ + \fIpmatch\fR[0].\fIrm_so\fR and to have a terminating NUL located at \fIstring\fR\ + \fIpmatch\fR[0].\fIrm_eo\fR (there need not actually be a NUL at that location), regardless of the value of .IR nmatch . See below for the definition of .IR pmatch and .IR nmatch . This is an extension, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other systems. Note that a non-zero \fIrm_so\fR does not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not how it is matched. .PP See .ZR for a discussion of what is matched in situations where an RE or a portion thereof could match any of several substrings of .IR string . .PP Normally, .I regexec returns 0 for success and the non-zero code REG_NOMATCH for failure. Other non-zero error codes may be returned in exceptional situations; see DIAGNOSTICS. .PP If REG_NOSUB was specified in the compilation of the RE, or if .I nmatch is 0, .I regexec ignores the .I pmatch argument (but see below for the case where REG_STARTEND is specified). Otherwise, .I pmatch points to an array of .I nmatch structures of type .IR regmatch_t . Such a structure has at least the members .I rm_so and .IR rm_eo , both of type .I regoff_t (a signed arithmetic type at least as large as an .I off_t and a .IR ssize_t ), containing respectively the offset of the first character of a substring and the offset of the first character after the end of the substring. Offsets are measured from the beginning of the .I string argument given to .IR regexec . An empty substring is denoted by equal offsets, both indicating the character following the empty substring. .PP The 0th member of the .I pmatch array is filled in to indicate what substring of .I string was matched by the entire RE. Remaining members report what substring was matched by parenthesized subexpressions within the RE; member .I i reports subexpression .IR i , with subexpressions counted (starting at 1) by the order of their opening parentheses in the RE, left to right. Unused entries in the array\(emcorresponding either to subexpressions that did not participate in the match at all, or to subexpressions that do not exist in the RE (that is, \fIi\fR\ > \fIpreg\fR\->\fIre_nsub\fR)\(emhave both .I rm_so and .I rm_eo set to \-1. If a subexpression participated in the match several times, the reported substring is the last one it matched. (Note, as an example in particular, that when the RE `(b*)+' matches `bbb', the parenthesized subexpression matches each of the three `b's and then an infinite number of empty strings following the last `b', so the reported substring is one of the empties.) .PP If REG_STARTEND is specified, .I pmatch must point to at least one .I regmatch_t (even if .I nmatch is 0 or REG_NOSUB was specified), to hold the input offsets for REG_STARTEND. Use for output is still entirely controlled by .IR nmatch ; if .I nmatch is 0 or REG_NOSUB was specified, the value of .IR pmatch [0] will not be changed by a successful .IR regexec . .PP .I Regerror maps a non-zero .I errcode from either .I regcomp or .I regexec to a human-readable, printable message. If .I preg is non-NULL, the error code should have arisen from use of the .I regex_t pointed to by .IR preg , and if the error code came from .IR regcomp , it should have been the result from the most recent .I regcomp using that .IR regex_t . .RI ( Regerror may be able to supply a more detailed message using information from the .IR regex_t .) .I Regerror places the NUL-terminated message into the buffer pointed to by .IR errbuf , limiting the length (including the NUL) to at most .I errbuf_size bytes. If the whole message won't fit, as much of it as will fit before the terminating NUL is supplied. In any case, the returned value is the size of buffer needed to hold the whole message (including terminating NUL). If .I errbuf_size is 0, .I errbuf is ignored but the return value is still correct. .PP If the .I errcode given to .I regerror is first ORed with REG_ITOA, the ``message'' that results is the printable name of the error code, e.g. ``REG_NOMATCH'', rather than an explanation thereof. If .I errcode is REG_ATOI, then .I preg shall be non-NULL and the .I re_endp member of the structure it points to must point to the printable name of an error code; in this case, the result in .I errbuf is the decimal digits of the numeric value of the error code (0 if the name is not recognized). REG_ITOA and REG_ATOI are intended primarily as debugging facilities; they are extensions, compatible with but not specified by POSIX 1003.2, and should be used with caution in software intended to be portable to other systems. Be warned also that they are considered experimental and changes are possible. .PP .I Regfree frees any dynamically-allocated storage associated with the compiled RE pointed to by .IR preg . The remaining .I regex_t is no longer a valid compiled RE and the effect of supplying it to .I regexec or .I regerror is undefined. .PP None of these functions references global variables except for tables of constants; all are safe for use from multiple threads if the arguments are safe. .SH IMPLEMENTATION CHOICES There are a number of decisions that 1003.2 leaves up to the implementor, either by explicitly saying ``undefined'' or by virtue of them being forbidden by the RE grammar. This implementation treats them as follows. .PP See .ZR for a discussion of the definition of case-independent matching. .PP There is no particular limit on the length of REs, except insofar as memory is limited. Memory usage is approximately linear in RE size, and largely insensitive to RE complexity, except for bounded repetitions. See BUGS for one short RE using them that will run almost any system out of memory. .PP A backslashed character other than one specifically given a magic meaning by 1003.2 (such magic meanings occur only in obsolete [``basic''] REs) is taken as an ordinary character. .PP Any unmatched [ is a REG_EBRACK error. .PP Equivalence classes cannot begin or end bracket-expression ranges. The endpoint of one range cannot begin another. .PP RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255. .PP A repetition operator (?, *, +, or bounds) cannot follow another repetition operator. A repetition operator cannot begin an expression or subexpression or follow `^' or `|'. .PP `|' cannot appear first or last in a (sub)expression or after another `|', i.e. an operand of `|' cannot be an empty subexpression. An empty parenthesized subexpression, `()', is legal and matches an empty (sub)string. An empty string is not a legal RE. .PP A `{' followed by a digit is considered the beginning of bounds for a bounded repetition, which must then follow the syntax for bounds. A `{' \fInot\fR followed by a digit is considered an ordinary character. .PP `^' and `$' beginning and ending subexpressions in obsolete (``basic'') REs are anchors, not ordinary characters. .SH SEE ALSO grep(1), re_format(7) .PP POSIX 1003.2, sections 2.8 (Regular Expression Notation) and B.5 (C Binding for Regular Expression Matching). .SH DIAGNOSTICS Non-zero error codes from .I regcomp and .I regexec include the following: .PP .nf .ta \w'REG_ECOLLATE'u+3n REG_NOMATCH regexec() failed to match REG_BADPAT invalid regular expression REG_ECOLLATE invalid collating element REG_ECTYPE invalid character class REG_EESCAPE \e applied to unescapable character REG_ESUBREG invalid backreference number REG_EBRACK brackets [ ] not balanced REG_EPAREN parentheses ( ) not balanced REG_EBRACE braces { } not balanced REG_BADBR invalid repetition count(s) in { } REG_ERANGE invalid character range in [ ] REG_ESPACE ran out of memory REG_BADRPT ?, *, or + operand invalid REG_EMPTY empty (sub)expression REG_ASSERT ``can't happen''\(emyou found a bug REG_INVARG invalid argument, e.g. negative-length string .fi .SH HISTORY Originally written by Henry Spencer at University of Toronto. Altered for inclusion in the 4.4BSD distribution. .SH BUGS This is an alpha release with known defects. Please report problems. .PP There is one known functionality bug. The implementation of internationalization is incomplete: the locale is always assumed to be the default one of 1003.2, and only the collating elements etc. of that locale are available. .PP The back-reference code is subtle and doubts linger about its correctness in complex cases. .PP .I Regexec performance is poor. This will improve with later releases. .I Nmatch exceeding 0 is expensive; .I nmatch exceeding 1 is worse. .I Regexec is largely insensitive to RE complexity \fIexcept\fR that back references are massively expensive. RE length does matter; in particular, there is a strong speed bonus for keeping RE length under about 30 characters, with most special characters counting roughly double. .PP .I Regcomp implements bounded repetitions by macro expansion, which is costly in time and space if counts are large or bounded repetitions are nested. An RE like, say, `((((a{1,100}){1,100}){1,100}){1,100}){1,100}' will (eventually) run almost any existing machine out of swap space. .PP There are suspected problems with response to obscure error conditions. Notably, certain kinds of internal overflow, produced only by truly enormous REs or by multiply nested bounded repetitions, are probably not handled well. .PP Due to a mistake in 1003.2, things like `a)b' are legal REs because `)' is a special character only in the presence of a previous unmatched `('. This can't be fixed until the spec is fixed. .PP The standard's definition of back references is vague. For example, does `a\e(\e(b\e)*\e2\e)*d' match `abbbd'? Until the standard is clarified, behavior in such cases should not be relied on. .PP The implementation of word-boundary matching is a bit of a kludge, and bugs may lurk in combinations of word-boundary matching and anchoring. nvi-1.81.6/regex/regex.h0100644000076400001440000000724110720065506014053 0ustar skimousers/*- * Copyright (c) 1992 Henry Spencer. * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regex.h 8.1 (Berkeley) 6/2/93 */ #ifndef _REGEX_H_ #define _REGEX_H_ #ifdef __REGEX_PRIVATE #include "config.h" #include "port.h" #include "../common/multibyte.h" #endif /* types */ typedef off_t regoff_t; typedef struct { int re_magic; size_t re_nsub; /* number of parenthesized subexpressions */ const RCHAR_T *re_endp; /* end pointer for REG_PEND */ struct re_guts *re_g; /* none of your business :-) */ } regex_t; typedef struct { regoff_t rm_so; /* start of match */ regoff_t rm_eo; /* end of match */ } regmatch_t; /* regcomp() flags */ #define REG_BASIC 0000 #define REG_EXTENDED 0001 #define REG_ICASE 0002 #define REG_NOSUB 0004 #define REG_NEWLINE 0010 #define REG_NOSPEC 0020 #define REG_PEND 0040 #define REG_DUMP 0200 /* regerror() flags */ #define REG_NOMATCH 1 #define REG_BADPAT 2 #define REG_ECOLLATE 3 #define REG_ECTYPE 4 #define REG_EESCAPE 5 #define REG_ESUBREG 6 #define REG_EBRACK 7 #define REG_EPAREN 8 #define REG_EBRACE 9 #define REG_BADBR 10 #define REG_ERANGE 11 #define REG_ESPACE 12 #define REG_BADRPT 13 #define REG_EMPTY 14 #define REG_ASSERT 15 #define REG_INVARG 16 #define REG_ATOI 255 /* convert name to number (!) */ #define REG_ITOA 0400 /* convert number to name (!) */ /* regexec() flags */ #define REG_NOTBOL 00001 #define REG_NOTEOL 00002 #define REG_STARTEND 00004 #define REG_TRACE 00400 /* tracing of execution */ #define REG_LARGE 01000 /* force large representation */ #define REG_BACKR 02000 /* force use of backref code */ int regcomp __P((regex_t *, const RCHAR_T *, int)); size_t regerror __P((int, const regex_t *, char *, size_t)); int regexec __P((const regex_t *, const RCHAR_T *, size_t, regmatch_t [], int)); void regfree __P((regex_t *)); #endif /* !_REGEX_H_ */ nvi-1.81.6/regex/regex2.h0100644000076400001440000001652410720065506014141 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regex2.h 8.3 (Berkeley) 3/16/94 */ /* * First, the stuff that ends up in the outside-world include file = typedef off_t regoff_t; = typedef struct { = int re_magic; = size_t re_nsub; // number of parenthesized subexpressions = const char *re_endp; // end pointer for REG_PEND = struct re_guts *re_g; // none of your business :-) = } regex_t; = typedef struct { = regoff_t rm_so; // start of match = regoff_t rm_eo; // end of match = } regmatch_t; */ /* * internals of regex_t */ #define MAGIC1 ((('r'^0200)<<8) | 'e') /* * The internal representation is a *strip*, a sequence of * operators ending with an endmarker. (Some terminology etc. is a * historical relic of earlier versions which used multiple strips.) * Certain oddities in the representation are there to permit running * the machinery backwards; in particular, any deviation from sequential * flow must be marked at both its source and its destination. Some * fine points: * * - OPLUS_ and O_PLUS are *inside* the loop they create. * - OQUEST_ and O_QUEST are *outside* the bypass they create. * - OCH_ and O_CH are *outside* the multi-way branch they create, while * OOR1 and OOR2 are respectively the end and the beginning of one of * the branches. Note that there is an implicit OOR2 following OCH_ * and an implicit OOR1 preceding O_CH. * * In state representations, an operator's bit is on to signify a state * immediately *preceding* "execution" of that operator. */ typedef unsigned long sop; /* strip operator */ typedef int sopno; #define OPRMASK 0xf8000000 #define OPDMASK 0x07ffffff #define OPSHIFT ((unsigned)27) #define OP(n) ((n)&OPRMASK) #define OPND(n) ((n)&OPDMASK) #define SOP(op, opnd) ((op)|(opnd)) /* operators meaning operand */ /* (back, fwd are offsets) */ #define OEND (1UL< uch [csetsize] */ uch mask; /* bit within array */ uch hash; /* hash code */ size_t smultis; char *multis; /* -> char[smulti] ab\0cd\0ef\0\0 */ } cset; /* note that CHadd and CHsub are unsafe, and CHIN doesn't yield 0/1 */ #define CHadd(cs, c) ((cs)->ptr[(uch)(c)] |= (cs)->mask, (cs)->hash += (c)) #define CHsub(cs, c) ((cs)->ptr[(uch)(c)] &= ~(cs)->mask, (cs)->hash -= (c)) #define CHIN(cs, c) ((cs)->ptr[(uch)(c)] & (cs)->mask) #define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */ #define MCsub(p, cs, cp) mcsub(p, cs, cp) #define MCin(p, cs, cp) mcin(p, cs, cp) /* stuff for character categories */ typedef RCHAR_T cat_t; /* * main compiled-expression structure */ struct re_guts { int magic; # define MAGIC2 ((('R'^0200)<<8)|'E') sop *strip; /* malloced area for strip */ int csetsize; /* number of bits in a cset vector */ int ncsets; /* number of csets in use */ cset *sets; /* -> cset [ncsets] */ uch *setbits; /* -> uch[csetsize][ncsets/CHAR_BIT] */ int cflags; /* copy of regcomp() cflags argument */ sopno nstates; /* = number of sops */ sopno firststate; /* the initial OEND (normally 0) */ sopno laststate; /* the final OEND */ int iflags; /* internal flags */ # define USEBOL 01 /* used ^ */ # define USEEOL 02 /* used $ */ # define BAD 04 /* something wrong */ int nbol; /* number of ^ used */ int neol; /* number of $ used */ #if 0 int ncategories; /* how many character categories */ cat_t *categories; /* ->catspace[-CHAR_MIN] */ #endif RCHAR_T *must; /* match must contain this string */ int mlen; /* length of must */ size_t nsub; /* copy of re_nsub */ int backrefs; /* does it use back references? */ sopno nplus; /* how deep does it nest +s? */ /* catspace must be last */ #if 0 cat_t catspace[1]; /* actually [NC] */ #endif }; /* misc utilities */ #define OUT (RCHAR_T_MAX+1) /* a non-character value */ #define ISWORD(c) ((c <= 0xFF && isalnum(c)) || (c) == '_') nvi-1.81.6/regex/regexec.c0100644000076400001440000001432210720065506014354 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regexec.c 8.2 (Berkeley) 3/16/94 */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)regexec.c 8.2 (Berkeley) 3/16/94"; #endif /* LIBC_SCCS and not lint */ /* * the outer shell of regexec() * * This file includes engine.c *twice*, after muchos fiddling with the * macros that code uses. This lets the same code operate on two different * representations for state sets. */ #include #include #include #include #include #include #include #include "utils.h" #include "regex2.h" static int nope = 0; /* for use in asserts; shuts lint up */ /* macros for manipulating states, small version */ #define states int #define states1 states /* for later use in regexec() decision */ #define CLEAR(v) ((v) = 0) #define SET0(v, n) ((v) &= ~(1 << (n))) #define SET1(v, n) ((v) |= 1 << (n)) #define ISSET(v, n) ((v) & (1 << (n))) #define ASSIGN(d, s) ((d) = (s)) #define EQ(a, b) ((a) == (b)) #define STATEVARS int dummy /* dummy version */ #define STATESETUP(m, n) /* nothing */ #define STATETEARDOWN(m) /* nothing */ #define SETUP(v) ((v) = 0) #define onestate int #define INIT(o, n) ((o) = (unsigned)1 << (n)) #define INC(o) ((o) <<= 1) #define ISSTATEIN(v, o) ((v) & (o)) /* some abbreviations; note that some of these know variable names! */ /* do "if I'm here, I can also be there" etc without branches */ #define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n)) #define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n)) #define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n))) /* function names */ #define SNAMES /* engine.c looks after details */ #include "engine.c" /* now undo things */ #undef states #undef CLEAR #undef SET0 #undef SET1 #undef ISSET #undef ASSIGN #undef EQ #undef STATEVARS #undef STATESETUP #undef STATETEARDOWN #undef SETUP #undef onestate #undef INIT #undef INC #undef ISSTATEIN #undef FWD #undef BACK #undef ISSETBACK #undef SNAMES /* macros for manipulating states, large version */ #define states char * #define CLEAR(v) memset(v, 0, m->g->nstates) #define SET0(v, n) ((v)[n] = 0) #define SET1(v, n) ((v)[n] = 1) #define ISSET(v, n) ((v)[n]) #define ASSIGN(d, s) memcpy(d, s, m->g->nstates) #define EQ(a, b) (memcmp(a, b, m->g->nstates) == 0) #define STATEVARS int vn; char *space #define STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \ if ((m)->space == NULL) return(REG_ESPACE); \ (m)->vn = 0; } #define STATETEARDOWN(m) { free((m)->space); } #define SETUP(v) ((v) = &m->space[m->vn++ * m->g->nstates]) #define onestate int #define INIT(o, n) ((o) = (n)) #define INC(o) ((o)++) #define ISSTATEIN(v, o) ((v)[o]) /* some abbreviations; note that some of these know variable names! */ /* do "if I'm here, I can also be there" etc without branches */ #define FWD(dst, src, n) ((dst)[here+(n)] |= (src)[here]) #define BACK(dst, src, n) ((dst)[here-(n)] |= (src)[here]) #define ISSETBACK(v, n) ((v)[here - (n)]) /* function names */ #define LNAMES /* flag */ #include "engine.c" /* - regexec - interface for matching = extern int regexec(const regex_t *, const char *, size_t, \ = regmatch_t [], int); = #define REG_NOTBOL 00001 = #define REG_NOTEOL 00002 = #define REG_STARTEND 00004 = #define REG_TRACE 00400 // tracing of execution = #define REG_LARGE 01000 // force large representation = #define REG_BACKR 02000 // force use of backref code * * We put this here so we can exploit knowledge of the state representation * when choosing which matcher to call. Also, by this point the matchers * have been prototyped. */ int /* 0 success, REG_NOMATCH failure */ regexec(const regex_t *preg, const RCHAR_T *string, size_t nmatch, regmatch_t *pmatch, int eflags) { register struct re_guts *g = preg->re_g; #ifdef REDEBUG # define GOODFLAGS(f) (f) #else # define GOODFLAGS(f) ((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND)) #endif if (preg->re_magic != MAGIC1 || g->magic != MAGIC2) return(REG_BADPAT); assert(!(g->iflags&BAD)); if (g->iflags&BAD) /* backstop for no-debug case */ return(REG_BADPAT); eflags = GOODFLAGS(eflags); if (g->nstates <= CHAR_BIT*sizeof(states1) && !(eflags®_LARGE)) return(smatcher(g, (RCHAR_T *)string, nmatch, pmatch, eflags)); else return(lmatcher(g, (RCHAR_T *)string, nmatch, pmatch, eflags)); } nvi-1.81.6/regex/regfree.c0100644000076400001440000000552610720065506014357 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)regfree.c 8.2 (Berkeley) 3/16/94 */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)regfree.c 8.2 (Berkeley) 3/16/94"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include "utils.h" #include "regex2.h" /* - regfree - free everything = extern void regfree(regex_t *); */ void regfree(regex_t *preg) { register struct re_guts *g; if (preg->re_magic != MAGIC1) /* oops */ return; /* nice to complain, but hard */ g = preg->re_g; if (g == NULL || g->magic != MAGIC2) /* oops again */ return; preg->re_magic = 0; /* mark it invalid */ g->magic = 0; /* mark it invalid */ if (g->strip != NULL) free((char *)g->strip); if (g->sets != NULL) free((char *)g->sets); if (g->setbits != NULL) free((char *)g->setbits); if (g->must != NULL) free(g->must); free((char *)g); } nvi-1.81.6/regex/utils.h0100644000076400001440000000472010720065506014100 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 Henry Spencer. * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Henry Spencer of the University of Toronto. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)utils.h 8.2 (Berkeley) 3/16/94 */ /* utility definitions */ #define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ #define INFINITY (DUPMAX + 1) #define NC (CHAR_MAX - CHAR_MIN + 1) typedef unsigned char uch; /* switch off assertions (if not already off) if no REDEBUG */ #ifndef REDEBUG #ifndef NDEBUG #define NDEBUG /* no assertions please */ #endif #endif #include /* for old systems with bcopy() but no memmove() */ #ifdef USEBCOPY #define memmove(d, s, c) bcopy(s, d, c) #endif nvi-1.81.6/tcl_api/0040755000076400001440000000000010720065712013067 5ustar skimousersnvi-1.81.6/tcl_api/tcl.c0100644000076400001440000004300710720065506014017 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995 * Keith Bostic. All rights reserved. * Copyright (c) 1995 * George V. Neville-Neil. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: tcl.c,v 8.19 2001/08/24 12:17:27 skimo Exp $ (Berkeley) $Date: 2001/08/24 12:17:27 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "extern.h" static int getint __P((Tcl_Interp *, char *, char *, int *)); static int getscreenid __P((Tcl_Interp *, SCR **, char *, char *)); static void msghandler __P((SCR *, mtype_t, char *, size_t)); extern GS *__global_list; /* XXX */ /* * INITMESSAGE -- * Macros to point messages at the Tcl message handler. */ #define INITMESSAGE(sp) \ scr_msg = sp->wp->scr_msg; \ sp->wp->scr_msg = msghandler; #define ENDMESSAGE(sp) \ sp->wp->scr_msg = scr_msg; /* * tcl_fscreen -- * Return the screen id associated with file name. * * Tcl Command: viFindScreen * Usage: viFindScreen file */ static int tcl_fscreen(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; if (argc != 2) { Tcl_SetResult(interp, "Usage: viFindScreen file", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, NULL, argv[1])) return (TCL_ERROR); (void)sprintf(interp->result, "%d", sp->id); return (TCL_OK); } /* * tcl_aline -- * -- Append the string text after the line in lineNumber. * * Tcl Command: viAppendLine * Usage: viAppendLine screenId lineNumber text */ static int tcl_aline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int lno, rval; if (argc != 4) { Tcl_SetResult(interp, "Usage: viAppendLine screenId lineNumber text", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL) || getint(interp, "line number", argv[2], &lno)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_aline(sp, (db_recno_t)lno, argv[3], strlen(argv[3])); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_dline -- * Delete lineNum. * * Tcl Command: viDelLine * Usage: viDelLine screenId lineNum */ static int tcl_dline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int lno, rval; if (argc != 3) { Tcl_SetResult(interp, "Usage: viDelLine screenId lineNumber", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL) || getint(interp, "line number", argv[2], &lno)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_dline(sp, (db_recno_t)lno); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_gline -- * Return lineNumber. * * Tcl Command: viGetLine * Usage: viGetLine screenId lineNumber */ static int tcl_gline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; size_t len; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int lno, rval; char *line, *p; if (argc != 3) { Tcl_SetResult(interp, "Usage: viGetLine screenId lineNumber", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL) || getint(interp, "line number", argv[2], &lno)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_gline(sp, (db_recno_t)lno, &p, &len); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); if ((line = malloc(len + 1)) == NULL) exit(1); /* XXX */ memmove(line, p, len); line[len] = '\0'; Tcl_SetResult(interp, line, TCL_DYNAMIC); return (TCL_OK); } /* * tcl_iline -- * Insert the string text after the line in lineNumber. * * Tcl Command: viInsertLine * Usage: viInsertLine screenId lineNumber text */ static int tcl_iline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int lno, rval; if (argc != 4) { Tcl_SetResult(interp, "Usage: viInsertLine screenId lineNumber text", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL) || getint(interp, "line number", argv[2], &lno)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_iline(sp, (db_recno_t)lno, argv[3], strlen(argv[3])); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_lline -- * Return the last line in the screen. * * Tcl Command: viLastLine * Usage: viLastLine screenId */ static int tcl_lline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; db_recno_t last; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; if (argc != 2) { Tcl_SetResult(interp, "Usage: viLastLine screenId", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_lline(sp, &last); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); (void)sprintf(interp->result, "%lu", (unsigned long)last); return (TCL_OK); } /* * tcl_sline -- * Set lineNumber to the text supplied. * * Tcl Command: viSetLine * Usage: viSetLine screenId lineNumber text */ static int tcl_sline(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int lno, rval; if (argc != 4) { Tcl_SetResult(interp, "Usage: viSetLine screenId lineNumber text", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL) || getint(interp, "line number", argv[2], &lno)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_sline(sp, (db_recno_t)lno, argv[3], strlen(argv[3])); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_getmark -- * Return the mark's cursor position as a list with two elements. * {line, column}. * * Tcl Command: viGetMark * Usage: viGetMark screenId mark */ static int tcl_getmark(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { MARK cursor; SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char buf[20]; if (argc != 3) { Tcl_SetResult(interp, "Usage: viGetMark screenId mark", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_getmark(sp, (int)argv[2][0], &cursor); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); (void)snprintf(buf, sizeof(buf), "%lu", (u_long)cursor.lno); Tcl_AppendElement(interp, buf); (void)snprintf(buf, sizeof(buf), "%lu", (u_long)cursor.cno); Tcl_AppendElement(interp, buf); return (TCL_OK); } /* * tcl_setmark -- * Set the mark to the line and column numbers supplied. * * Tcl Command: viSetMark * Usage: viSetMark screenId mark line column */ static int tcl_setmark(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { MARK cursor; SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int i, rval; if (argc != 5) { Tcl_SetResult(interp, "Usage: viSetMark screenId mark line column", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); if (getint(interp, "line number", argv[3], &i)) return (TCL_ERROR); cursor.lno = i; if (getint(interp, "column number", argv[4], &i)) return (TCL_ERROR); cursor.cno = i; INITMESSAGE(sp); rval = api_setmark(sp, (int)argv[2][0], &cursor); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_getcursor -- * Return the current cursor position as a list with two elements. * {line, column}. * * Tcl Command: viGetCursor * Usage: viGetCursor screenId */ static int tcl_getcursor(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { MARK cursor; SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char buf[20]; if (argc != 2) { Tcl_SetResult(interp, "Usage: viGetCursor screenId", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_getcursor(sp, &cursor); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); (void)snprintf(buf, sizeof(buf), "%lu", (u_long)cursor.lno); Tcl_AppendElement(interp, buf); (void)snprintf(buf, sizeof(buf), "%lu", (u_long)cursor.cno); Tcl_AppendElement(interp, buf); return (TCL_OK); } /* * tcl_setcursor -- * Set the cursor to the line and column numbers supplied. * * Tcl Command: viSetCursor * Usage: viSetCursor screenId line column */ static int tcl_setcursor(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { MARK cursor; SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int i, rval; if (argc != 4) { Tcl_SetResult(interp, "Usage: viSetCursor screenId line column", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); if (getint(interp, "screen id", argv[2], &i)) return (TCL_ERROR); cursor.lno = i; if (getint(interp, "screen id", argv[3], &i)) return (TCL_ERROR); cursor.cno = i; INITMESSAGE(sp); rval = api_setcursor(sp, &cursor); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_msg -- * Set the message line to text. * * Tcl Command: viMsg * Usage: viMsg screenId text */ static int tcl_msg(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; if (argc != 3) { Tcl_SetResult(interp, "Usage: viMsg screenId text", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); api_imessage(sp, argv[2]); return (TCL_OK); } /* * tcl_iscreen -- * Create a new screen. If a filename is specified then the screen * is opened with that file. * * Tcl Command: viNewScreen * Usage: viNewScreen screenId [file] */ static int tcl_iscreen(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp, *nsp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; if (argc != 2 && argc != 3) { Tcl_SetResult(interp, "Usage: viNewScreen screenId [file]", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_edit(sp, argv[2], &nsp, 1); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); (void)sprintf(interp->result, "%d", nsp->id); return (TCL_OK); } /* * tcl_escreen -- * End a screen. * * Tcl Command: viEndScreen * Usage: viEndScreen screenId */ static int tcl_escreen(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; if (argc != 2) { Tcl_SetResult(interp, "Usage: viEndScreen screenId", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_escreen(sp); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_swscreen -- * Change the current focus to screen. * * Tcl Command: viSwitchScreen * Usage: viSwitchScreen screenId screenId */ static int tcl_swscreen(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp, *new; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; if (argc != 3) { Tcl_SetResult(interp, "Usage: viSwitchScreen cur_screenId new_screenId", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); if (getscreenid(interp, &new, argv[2], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_swscreen(sp, new); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_map -- * Associate a key with a tcl procedure. * * Tcl Command: viMapKey * Usage: viMapKey screenId key tclproc */ static int tcl_map(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char command[256]; if (argc != 4) { Tcl_SetResult(interp, "Usage: viMapKey screenId key tclproc", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); (void)snprintf(command, sizeof(command), ":tcl %s\n", argv[3]); rval = api_map(sp, argv[2], command, strlen(command)); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_unmap -- * Unmap a key. * * Tcl Command: viUnmapKey * Usage: viUnmMapKey screenId key */ static int tcl_unmap(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; if (argc != 3) { Tcl_SetResult(interp, "Usage: viUnmapKey screenId key", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_unmap(sp, argv[2]); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_opts_set -- * Set an option. * * Tcl Command: viSetOpt * Usage: viSetOpt screenId command */ static int tcl_opts_set(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *setting; if (argc != 3) { Tcl_SetResult(interp, "Usage: viSetOpt screenId command", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); /*rval = api_opts_set(sp, argv[2]);*/ MALLOC(sp, setting, char *, strlen(argv[2])+6); strcpy(setting, ":set "); strcpy(setting+5, argv[2]); rval=api_run_str(sp, setting); free(setting); ENDMESSAGE(sp); return (rval ? TCL_ERROR : TCL_OK); } /* * tcl_opts_get -- Return the value of an option. * * Tcl Command: viGetOpt * Usage: viGetOpt screenId option */ static int tcl_opts_get(clientData, interp, argc, argv) ClientData clientData; Tcl_Interp *interp; int argc; char **argv; { SCR *sp; void (*scr_msg) __P((SCR *, mtype_t, char *, size_t)); int rval; char *value; if (argc != 3) { Tcl_SetResult(interp, "Usage: viGetOpt screenId option", TCL_STATIC); return (TCL_ERROR); } if (getscreenid(interp, &sp, argv[1], NULL)) return (TCL_ERROR); INITMESSAGE(sp); rval = api_opts_get(sp, argv[2], &value, NULL); ENDMESSAGE(sp); if (rval) return (TCL_ERROR); Tcl_SetResult(interp, value, TCL_DYNAMIC); return (TCL_OK); } /* * tcl_init -- * Create the TCL commands used by nvi. * * PUBLIC: int tcl_init __P((GS *)); */ int tcl_init(gp) GS *gp; { gp->tcl_interp = Tcl_CreateInterp(); if (Tcl_Init(gp->tcl_interp) == TCL_ERROR) return (1); #define TCC(name, function) { \ Tcl_CreateCommand(gp->tcl_interp, name, function, \ (ClientData)NULL, (Tcl_CmdDeleteProc *)NULL); \ } TCC("viAppendLine", tcl_aline); TCC("viDelLine", tcl_dline); TCC("viEndScreen", tcl_escreen); TCC("viFindScreen", tcl_fscreen); TCC("viGetCursor", tcl_getcursor); TCC("viGetLine", tcl_gline); TCC("viGetMark", tcl_getmark); TCC("viGetOpt", tcl_opts_get); TCC("viInsertLine", tcl_iline); TCC("viLastLine", tcl_lline); TCC("viMapKey", tcl_map); TCC("viMsg", tcl_msg); TCC("viNewScreen", tcl_iscreen); TCC("viSetCursor", tcl_setcursor); TCC("viSetLine", tcl_sline); TCC("viSetMark", tcl_setmark); TCC("viSetOpt", tcl_opts_set); TCC("viSwitchScreen", tcl_swscreen); TCC("viUnmapKey", tcl_unmap); return (0); } /* * getscreenid -- * Get the specified screen pointer. * * XXX * This is fatal. We can't post a message into vi that we're unable to find * the screen without first finding the screen... So, this must be the first * thing a Tcl routine does, and, if it fails, the last as well. */ static int getscreenid(interp, spp, id, name) Tcl_Interp *interp; SCR **spp; char *id, *name; { int scr_no; char buf[64]; if (id != NULL && getint(interp, "screen id", id, &scr_no)) return (1); if ((*spp = api_fscreen(scr_no, name)) == NULL) { (void)snprintf(buf, sizeof(buf), "unknown screen id: %s", name == NULL ? id : name); Tcl_SetResult(interp, buf, TCL_VOLATILE); return (1); } return (0); } /* * getint -- * Get a Tcl integer. * * XXX * This code assumes that both db_recno_t and size_t are larger than ints. */ static int getint(interp, msg, s, intp) Tcl_Interp *interp; char *msg, *s; int *intp; { char buf[64]; if (Tcl_GetInt(interp, s, intp) == TCL_ERROR) return (1); if (*intp < 0) { (void)snprintf(buf, sizeof(buf), "illegal %s %s: may not be negative", msg, s); Tcl_SetResult(interp, buf, TCL_VOLATILE); return (1); } return (0); } /* * msghandler -- * Tcl message routine so that error messages are processed in * Tcl, not in nvi. */ static void msghandler(sp, mtype, msg, len) SCR *sp; mtype_t mtype; char *msg; size_t len; { /* Replace the trailing with an EOS. */ msg[len - 1] = '\0'; Tcl_SetResult(sp->gp->tcl_interp, msg, TCL_VOLATILE); } nvi-1.81.6/tcl_api/extern.h0100444000076400001440000000012310720065712014534 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int tcl_init __P((GS *)); nvi-1.81.6/tcl_scripts/0040755000076400001440000000000010720065506014006 5ustar skimousersnvi-1.81.6/tcl_scripts/errors.tcl0100644000076400001440000000234610720065506016030 0ustar skimousers# $Id: errors.tcl,v 8.2 1995/11/18 12:59:07 bostic Exp $ (Berkeley) $Date: 1995/11/18 12:59:07 $ # # File: errors.tcl # # Author: George V. Neville-Neil # # Purpose: This file contains vi/tcl code that allows a vi user to parse # compiler errors and warnings from a make.out file. proc findErr {} { global errScreen global currFile global fileScreen set errLine [lindex [viGetCursor $errScreen] 0] set currLine [split [viGetLine $errScreen $errLine] :] set currFile [lindex $currLine 0] set fileScreen [viNewScreen $errScreen $currFile] viSetCursor $fileScreen [lindex $currLine 1] 1 viMapKey $viScreenId  nextErr } proc nextErr {} { global errScreen global fileScreen global currFile set errLine [lindex [viGetCursor $errScreen] 0] set currLine [split [viGetLine $errScreen $errLine] :] if {[string match $currFile [lindex $currLine 0]]} { viSetCursor $fileScreen [lindex $currLine 1] 0 viSwitchScreen $fileScreen } else { viEndScreen $fileScreen set currFile [lindex $currLine 0] set fileScreen[viNewScreen $errScreen $currFile] viSetCursor $fileScreen [lindex $currLine 1] 0 } } proc initErr {} { global viScreenId global errScreen set errScreen [viNewScreen $viScreenId make.out] viMapKey $viScreenId  findErr } nvi-1.81.6/tcl_scripts/gnats.tcl0100644000076400001440000000522610720065506015630 0ustar skimousers# $Id: gnats.tcl,v 8.2 1995/11/18 12:59:07 bostic Exp $ (Berkeley) $Date: 1995/11/18 12:59:07 $ # proc init {catFile} { global viScreenId global categories set categories {} set categoriesFile [open $catFile r] while {[gets $categoriesFile line] >= 0} { lappend categories $line } close $categoriesFile viMsg $viScreenId $categories viMapKey $viScreenId  next } proc next {} { global viScreenId set cursor [viGetCursor $viScreenId] set lineNum [lindex $cursor 0] set line [viGetLine $viScreenId $lineNum] viMsg $viScreenId [lindex $line 0] if {[lindex $line 0] == ">Confidential:"} { confNext $lineNum $line } elseif {[lindex $line 0] == ">Severity:"} { sevNext $lineNum $line } elseif {[lindex $line 0] == ">Priority:"} { priNext $lineNum $line } elseif {[lindex $line 0] == ">Class:"} { classNext $lineNum $line } elseif {[lindex $line 0] == ">Category:"} { catNext $lineNum $line } } proc confNext {lineNum line} { global viScreenId viMsg $viScreenId [lindex $line 1] if {[lindex $line 1] == "yes"} { viSetLine $viScreenId $lineNum ">Confidential: no" } else { viSetLine $viScreenId $lineNum ">Confidential: yes" } } proc sevNext {lineNum line} { global viScreenId viMsg $viScreenId [lindex $line 1] if {[lindex $line 1] == "non-critical"} { viSetLine $viScreenId $lineNum ">Severity: serious" } elseif {[lindex $line 1] == "serious"} { viSetLine $viScreenId $lineNum ">Severity: critical" } elseif {[lindex $line 1] == "critical"} { viSetLine $viScreenId $lineNum ">Severity: non-critical" } } proc priNext {lineNum line} { global viScreenId viMsg $viScreenId [lindex $line 1] if {[lindex $line 1] == "low"} { viSetLine $viScreenId $lineNum ">Priority: medium" } elseif {[lindex $line 1] == "medium"} { viSetLine $viScreenId $lineNum ">Priority: high" } elseif {[lindex $line 1] == "high"} { viSetLine $viScreenId $lineNum ">Priority: low" } } proc classNext {lineNum line} { global viScreenId viMsg $viScreenId [lindex $line 1] if {[lindex $line 1] == "sw-bug"} { viSetLine $viScreenId $lineNum ">Class: doc-bug" } elseif {[lindex $line 1] == "doc-bug"} { viSetLine $viScreenId $lineNum ">Class: change-request" } elseif {[lindex $line 1] == "change-request"} { viSetLine $viScreenId $lineNum ">Class: support" } elseif {[lindex $line 1] == "support"} { viSetLine $viScreenId $lineNum ">Class: sw-bug" } } proc catNext {lineNum line} { global viScreenId global categories viMsg $viScreenId [lindex $line 1] set curr [lsearch -exact $categories [lindex $line 1]] if {$curr == -1} { set curr 0 } viMsg $viScreenId $curr viSetLine $viScreenId $lineNum ">Class: [lindex $categories $curr]" } init abekas nvi-1.81.6/tcl_scripts/mailprocs.tcl0100644000076400001440000000510110720065506016475 0ustar skimousers# $Id: mailprocs.tcl,v 8.3 1996/04/29 12:31:35 bostic Exp $ (Berkeley) $Date: 1996/04/29 12:31:35 $ # proc validLine {} { global viScreenId set line [viGetLine $viScreenId [lindex [viGetCursor $viScreenId] 0]] if {[string compare [lindex [split $line :] 0] "To"] == 0} { set addrs [lindex [split $line :] 1] foreach name [split $addrs ,] { isValid [string trim $name] } } } proc valid {target} { set found 0 set aliasFile [open "~/Mail/aliases" r] while {[gets $aliasFile line] >= 0} { set name [lindex [split $line :] 0] set address [lindex [split $line :] 1] if {[string compare $target $name] == 0} { set found 1 break } } close $aliasFile if {$found == 1} { return $address } else { return $found } } proc isValid {target} { global viScreenId set address [valid $target] if {$address != 0} { viMsg $viScreenId "$target is [string trim $address]" } else { viMsg $viScreenId "$target not found" } } proc isAliasedLine {} { global viScreenId set line [viGetLine $viScreenId [lindex [viGetCursor $viScreenId] 0]] if {[string match [lindex [split $line :] 0] "*To"] == 0} { set addrs [lindex [split $line :] 1] foreach name [split $addrs ,] { isAliased [string trim $name] } } } proc aliased {target} { set found 0 set aliasFile [open "~/Mail/aliases" r] while {[gets $aliasFile line] >= 0} { set name [lindex [split $line :] 0] set address [lindex [split $line :] 1] if {[string compare $target [string trim $address]] == 0} { set found 1 break } } close $aliasFile return $found } proc isAliased {target} { global viScreenId set found [aliased $target] if {$found} { viMsg $viScreenId "$target is aliased to [string trim $name]" } else { viMsg $viScreenId "$target not aliased" } } proc appendAlias {target address} { if {![aliased $target]} { set aliasFile [open "~/Mail/aliases" a] puts $aliasFile "$target: $address" } close $aliasFile } proc expand {} { global viScreenId set row [lindex [viGetCursor $viScreenId] 0]] set column [lindex [viGetCursor $viScreenId] 1]] set line [viGetLine $viScreenId $row] while {$column < [string length $line] && \ [string index $line $column] != ' '} { append $target [string index $line $column] incr $column } set found [isValid $target] } proc cite {} { global viScreenId global viStartLine global viStopLine for {set i $viStartLine} {$i <= $viStopLine} {incr i} { set newLine "> " append newLine [viGetLine $viScreenId $i] viSetLine $viScreenId $i $newLine } } global viScreenId viMapKey $viScreenId  isAliasedLine viMapKey $viScreenId  validLine nvi-1.81.6/tcl_scripts/wc.tcl0100644000076400001440000000066510720065506015127 0ustar skimousers# $Id: wc.tcl,v 8.2 1995/11/18 12:59:12 bostic Exp $ (Berkeley) $Date: 1995/11/18 12:59:12 $ # proc wc {} { global viScreenId global viStartLine global viStopLine set lines [viLastLine $viScreenId] set output "" set words 0 for {set i $viStartLine} {$i <= $viStopLine} {incr i} { set outLine [split [string trim [viGetLine $viScreenId $i]]] set words [expr $words + [llength $outLine]] } viMsg $viScreenId "$words words" } nvi-1.81.6/vi/0040755000076400001440000000000010720065712012072 5ustar skimousersnvi-1.81.6/vi/getc.c0100644000076400001440000001124010720065506013154 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: getc.c,v 10.12 2001/06/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:30 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * Character stream routines -- * These routines return the file a character at a time. There are two * special cases. First, the end of a line, end of a file, start of a * file and empty lines are returned as special cases, and no character * is returned. Second, empty lines include lines that have only white * space in them, because the vi search functions don't care about white * space, and this makes it easier for them to be consistent. */ /* * cs_init -- * Initialize character stream routines. * * PUBLIC: int cs_init __P((SCR *, VCS *)); */ int cs_init(SCR *sp, VCS *csp) { int isempty; if (db_eget(sp, csp->cs_lno, &csp->cs_bp, &csp->cs_len, &isempty)) { if (isempty) msgq(sp, M_BERR, "177|Empty file"); return (1); } if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) { csp->cs_cno = 0; csp->cs_flags = CS_EMP; } else { csp->cs_flags = 0; csp->cs_ch = csp->cs_bp[csp->cs_cno]; } return (0); } /* * cs_next -- * Retrieve the next character. * * PUBLIC: int cs_next __P((SCR *, VCS *)); */ int cs_next(SCR *sp, VCS *csp) { CHAR_T *p; switch (csp->cs_flags) { case CS_EMP: /* EMP; get next line. */ case CS_EOL: /* EOL; get next line. */ if (db_get(sp, ++csp->cs_lno, 0, &p, &csp->cs_len)) { --csp->cs_lno; csp->cs_flags = CS_EOF; } else { csp->cs_bp = p; if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) { csp->cs_cno = 0; csp->cs_flags = CS_EMP; } else { csp->cs_flags = 0; csp->cs_ch = csp->cs_bp[csp->cs_cno = 0]; } } break; case 0: if (csp->cs_cno == csp->cs_len - 1) csp->cs_flags = CS_EOL; else csp->cs_ch = csp->cs_bp[++csp->cs_cno]; break; case CS_EOF: /* EOF. */ break; default: abort(); /* NOTREACHED */ } return (0); } /* * cs_fspace -- * If on a space, eat forward until something other than a * whitespace character. * * XXX * Semantics of checking the current character were coded for the fword() * function -- once the other word routines are converted, they may have * to change. * * PUBLIC: int cs_fspace __P((SCR *, VCS *)); */ int cs_fspace(SCR *sp, VCS *csp) { if (csp->cs_flags != 0 || !isblank(csp->cs_ch)) return (0); for (;;) { if (cs_next(sp, csp)) return (1); if (csp->cs_flags != 0 || !isblank(csp->cs_ch)) break; } return (0); } /* * cs_fblank -- * Eat forward to the next non-whitespace character. * * PUBLIC: int cs_fblank __P((SCR *, VCS *)); */ int cs_fblank(SCR *sp, VCS *csp) { for (;;) { if (cs_next(sp, csp)) return (1); if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP || csp->cs_flags == 0 && isblank(csp->cs_ch)) continue; break; } return (0); } /* * cs_prev -- * Retrieve the previous character. * * PUBLIC: int cs_prev __P((SCR *, VCS *)); */ int cs_prev(SCR *sp, VCS *csp) { switch (csp->cs_flags) { case CS_EMP: /* EMP; get previous line. */ case CS_EOL: /* EOL; get previous line. */ if (csp->cs_lno == 1) { /* SOF. */ csp->cs_flags = CS_SOF; break; } if (db_get(sp, /* The line should exist. */ --csp->cs_lno, DBG_FATAL, &csp->cs_bp, &csp->cs_len)) { ++csp->cs_lno; return (1); } if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) { csp->cs_cno = 0; csp->cs_flags = CS_EMP; } else { csp->cs_flags = 0; csp->cs_cno = csp->cs_len - 1; csp->cs_ch = csp->cs_bp[csp->cs_cno]; } break; case CS_EOF: /* EOF: get previous char. */ case 0: if (csp->cs_cno == 0) if (csp->cs_lno == 1) csp->cs_flags = CS_SOF; else csp->cs_flags = CS_EOL; else csp->cs_ch = csp->cs_bp[--csp->cs_cno]; break; case CS_SOF: /* SOF. */ break; default: abort(); /* NOTREACHED */ } return (0); } /* * cs_bblank -- * Eat backward to the next non-whitespace character. * * PUBLIC: int cs_bblank __P((SCR *, VCS *)); */ int cs_bblank(SCR *sp, VCS *csp) { for (;;) { if (cs_prev(sp, csp)) return (1); if (csp->cs_flags == CS_EOL || csp->cs_flags == CS_EMP || csp->cs_flags == 0 && isblank(csp->cs_ch)) continue; break; } return (0); } nvi-1.81.6/vi/v_at.c0100644000076400001440000000556510720065506013200 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_at.c,v 10.11 2001/06/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:30 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_at -- @ * Execute a buffer. * * PUBLIC: int v_at __P((SCR *, VICMD *)); */ int v_at(SCR *sp, VICMD *vp) { CB *cbp; CHAR_T name; TEXT *tp; size_t len; char nbuf[20]; CHAR_T wbuf[20]; CHAR_T *wp; size_t wlen; /* * !!! * Historically, [@*] and [@*][@*] executed the most * recently executed buffer in ex mode. In vi mode, only @@ repeated * the last buffer. We change historic practice and make @* work from * vi mode as well, it's simpler and more consistent. * * My intent is that *[buffer] will, in the future, pass the buffer to * whatever interpreter is loaded. */ name = F_ISSET(vp, VC_BUFFER) ? vp->buffer : '@'; if (name == '@' || name == '*') { if (!F_ISSET(sp, SC_AT_SET)) { ex_emsg(sp, NULL, EXM_NOPREVBUF); return (1); } name = sp->at_lbuf; } F_SET(sp, SC_AT_SET); CBNAME(sp, cbp, name); if (cbp == NULL) { ex_emsg(sp, KEY_NAME(sp, name), EXM_EMPTYBUF); return (1); } /* Save for reuse. */ sp->at_lbuf = name; /* * The buffer is executed in vi mode, while in vi mode, so simply * push it onto the terminal queue and continue. * * !!! * Historic practice is that if the buffer was cut in line mode, * were appended to each line as it was pushed onto * the stack. If the buffer was cut in character mode, * were appended to all lines but the last one. * * XXX * Historic practice is that execution of an @ buffer could be * undone by a single 'u' command, i.e. the changes were grouped * together. We don't get this right; I'm waiting for the new DB * logging code to be available. */ for (tp = cbp->textq.cqh_last; tp != (void *)&cbp->textq; tp = tp->q.cqe_prev) { static CHAR_T nl[] = { '\n', 0 }; if ((F_ISSET(cbp, CB_LMODE) || tp->q.cqe_next != (void *)&cbp->textq) && v_event_push(sp, NULL, nl, 1, 0) || v_event_push(sp, NULL, tp->lb, tp->len, 0)) return (1); } /* * !!! * If any count was supplied, it applies to the first command in the * at buffer. */ if (F_ISSET(vp, VC_C1SET)) { len = snprintf(nbuf, sizeof(nbuf), "%lu", vp->count); CHAR2INT(sp, nbuf, len, wp, wlen); MEMCPYW(wbuf, wp, wlen); if (v_event_push(sp, NULL, wp, wlen, 0)) return (1); } return (0); } nvi-1.81.6/vi/v_ch.c0100644000076400001440000001256210720065506013161 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_ch.c,v 10.10 2001/06/25 15:19:30 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:30 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static void notfound __P((SCR *, ARG_CHAR_T)); static void noprev __P((SCR *)); /* * v_chrepeat -- [count]; * Repeat the last F, f, T or t search. * * PUBLIC: int v_chrepeat __P((SCR *, VICMD *)); */ int v_chrepeat(SCR *sp, VICMD *vp) { vp->character = VIP(sp)->lastckey; switch (VIP(sp)->csearchdir) { case CNOTSET: noprev(sp); return (1); case FSEARCH: return (v_chF(sp, vp)); case fSEARCH: return (v_chf(sp, vp)); case TSEARCH: return (v_chT(sp, vp)); case tSEARCH: return (v_cht(sp, vp)); default: abort(); } /* NOTREACHED */ } /* * v_chrrepeat -- [count], * Repeat the last F, f, T or t search in the reverse direction. * * PUBLIC: int v_chrrepeat __P((SCR *, VICMD *)); */ int v_chrrepeat(SCR *sp, VICMD *vp) { cdir_t savedir; int rval; vp->character = VIP(sp)->lastckey; savedir = VIP(sp)->csearchdir; switch (VIP(sp)->csearchdir) { case CNOTSET: noprev(sp); return (1); case FSEARCH: rval = v_chf(sp, vp); break; case fSEARCH: rval = v_chF(sp, vp); break; case TSEARCH: rval = v_cht(sp, vp); break; case tSEARCH: rval = v_chT(sp, vp); break; default: abort(); } VIP(sp)->csearchdir = savedir; return (rval); } /* * v_cht -- [count]tc * Search forward in the line for the character before the next * occurrence of the specified character. * * PUBLIC: int v_cht __P((SCR *, VICMD *)); */ int v_cht(SCR *sp, VICMD *vp) { if (v_chf(sp, vp)) return (1); /* * v_chf places the cursor on the character, where the 't' * command wants it to its left. We know this is safe since * we had to move right for v_chf() to have succeeded. */ --vp->m_stop.cno; /* * Make any necessary correction to the motion decision made * by the v_chf routine. */ if (!ISMOTION(vp)) vp->m_final = vp->m_stop; VIP(sp)->csearchdir = tSEARCH; return (0); } /* * v_chf -- [count]fc * Search forward in the line for the next occurrence of the * specified character. * * PUBLIC: int v_chf __P((SCR *, VICMD *)); */ int v_chf(SCR *sp, VICMD *vp) { size_t len; u_long cnt; int isempty, key; CHAR_T *endp, *p, *startp; /* * !!! * If it's a dot command, it doesn't reset the key for which we're * searching, e.g. in "df1|f2|.|;", the ';' searches for a '2'. */ key = vp->character; if (!F_ISSET(vp, VC_ISDOT)) VIP(sp)->lastckey = key; VIP(sp)->csearchdir = fSEARCH; if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (isempty) goto empty; return (1); } if (len == 0) { empty: notfound(sp, key); return (1); } endp = (startp = p) + len; p += vp->m_start.cno; for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { while (++p < endp && *p != key); if (p == endp) { notfound(sp, key); return (1); } } vp->m_stop.cno = p - startp; /* * Non-motion commands move to the end of the range. * Delete and yank stay at the start, ignore others. */ vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } /* * v_chT -- [count]Tc * Search backward in the line for the character after the next * occurrence of the specified character. * * PUBLIC: int v_chT __P((SCR *, VICMD *)); */ int v_chT(SCR *sp, VICMD *vp) { if (v_chF(sp, vp)) return (1); /* * v_chF places the cursor on the character, where the 'T' * command wants it to its right. We know this is safe since * we had to move left for v_chF() to have succeeded. */ ++vp->m_stop.cno; vp->m_final = vp->m_stop; VIP(sp)->csearchdir = TSEARCH; return (0); } /* * v_chF -- [count]Fc * Search backward in the line for the next occurrence of the * specified character. * * PUBLIC: int v_chF __P((SCR *, VICMD *)); */ int v_chF(SCR *sp, VICMD *vp) { size_t len; u_long cnt; int isempty, key; CHAR_T *endp, *p; /* * !!! * If it's a dot command, it doesn't reset the key for which * we're searching, e.g. in "df1|f2|.|;", the ';' searches * for a '2'. */ key = vp->character; if (!F_ISSET(vp, VC_ISDOT)) VIP(sp)->lastckey = key; VIP(sp)->csearchdir = FSEARCH; if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (isempty) goto empty; return (1); } if (len == 0) { empty: notfound(sp, key); return (1); } endp = p - 1; p += vp->m_start.cno; for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { while (--p > endp && *p != key); if (p == endp) { notfound(sp, key); return (1); } } vp->m_stop.cno = (p - endp) - 1; /* * All commands move to the end of the range. Motion commands * adjust the starting point to the character before the current * one. */ vp->m_final = vp->m_stop; if (ISMOTION(vp)) --vp->m_start.cno; return (0); } static void noprev(SCR *sp) { msgq(sp, M_BERR, "178|No previous F, f, T or t search"); } static void notfound(SCR *sp, ARG_CHAR_T ch) { msgq(sp, M_BERR, "179|%s not found", KEY_NAME(sp, ch)); } nvi-1.81.6/vi/v_cmd.c0100644000076400001440000003027610720065506013334 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_cmd.c,v 10.9 1996/03/28 15:18:39 bostic Exp $ (Berkeley) $Date: 1996/03/28 15:18:39 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * This array maps keystrokes to vi command functions. It is known * in ex/ex_usage.c that it takes four columns to name a vi character. */ VIKEYS const vikeys [MAXVIKEY + 1] = { /* 000 NUL -- The code in vi.c expects key 0 to be undefined. */ {NULL}, /* 001 ^A */ {v_searchw, V_ABS|V_CNT|V_MOVE|V_KEYW|VM_CUTREQ|VM_RCM_SET, "[count]^A", "^A search forward for cursor word"}, /* 002 ^B */ {v_pageup, V_CNT|VM_RCM_SET, "[count]^B", "^B scroll up by screens"}, /* 003 ^C */ {NULL, 0, "^C", "^C interrupt an operation (e.g. read, write, search)"}, /* 004 ^D */ {v_hpagedown, V_CNT|VM_RCM_SET, "[count]^D", "^D scroll down by half screens (setting count)"}, /* 005 ^E */ {v_linedown, V_CNT, "[count]^E", "^E scroll down by lines"}, /* 006 ^F */ {v_pagedown, V_CNT|VM_RCM_SET, "[count]^F", "^F scroll down by screens"}, /* 007 ^G */ {v_status, 0, "^G", "^G file status"}, /* 010 ^H */ {v_left, V_CNT|V_MOVE|VM_RCM_SET, "[count]^H", "^H move left by characters"}, /* 011 ^I */ {NULL}, /* 012 ^J */ {v_down, V_CNT|V_MOVE|VM_LMODE|VM_RCM, "[count]^J", "^J move down by lines"}, /* 013 ^K */ {NULL}, /* 014 ^L */ {v_redraw, 0, "^L", "^L redraw screen"}, /* 015 ^M */ {v_cr, V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETFNB, "[count]^M", "^M move down by lines (to first non-blank)"}, /* 016 ^N */ {v_down, V_CNT|V_MOVE|VM_LMODE|VM_RCM, "[count]^N", "^N move down by lines"}, /* 017 ^O */ {NULL}, /* 020 ^P */ {v_up, V_CNT|V_MOVE|VM_LMODE|VM_RCM, "[count]^P", "^P move up by lines"}, /* 021 ^Q -- same as ^V if not used for hardware flow control. */ {NULL}, /* 022 ^R */ {v_redraw, 0, "^R", "^R redraw screen"}, /* 023 ^S -- not available, used for hardware flow control. */ {NULL}, /* 024 ^T */ {v_tagpop, V_ABS|VM_RCM_SET, "^T", "^T tag pop"}, /* 025 ^U */ {v_hpageup, V_CNT|VM_RCM_SET, "[count]^U", "^U half page up (set count)"}, /* 026 ^V */ {NULL, 0, "^V", "^V input a literal character"}, /* 027 ^W */ {v_screen, 0, "^W", "^W move to next screen"}, /* 030 ^X */ {NULL}, /* 031 ^Y */ {v_lineup, V_CNT, "[count]^Y", "^Y page up by lines"}, /* 032 ^Z */ {v_suspend, V_SECURE, "^Z", "^Z suspend editor"}, /* 033 ^[ */ {NULL, 0, "^[ ", "^[ exit input mode, cancel partial commands"}, /* 034 ^\ */ {v_exmode, 0, "^\\", " ^\\ switch to ex mode"}, /* 035 ^] */ {v_tagpush, V_ABS|V_KEYW|VM_RCM_SET, "^]", "^] tag push cursor word"}, /* 036 ^^ */ {v_switch, 0, "^^", "^^ switch to previous file"}, /* 037 ^_ */ {NULL}, /* 040 ' ' */ {v_right, V_CNT|V_MOVE|VM_RCM_SET, "[count]' '", " move right by columns"}, /* 041 ! */ {v_filter, V_CNT|V_DOT|V_MOTION|V_SECURE|VM_RCM_SET, "[count]![count]motion command(s)", " ! filter through command(s) to motion"}, /* 042 " */ {NULL}, /* 043 # */ {v_increment, V_CHAR|V_CNT|V_DOT|VM_RCM_SET, "[count]# +|-|#", " # number increment/decrement"}, /* 044 $ */ {v_dollar, V_CNT|V_MOVE|VM_RCM_SETLAST, " [count]$", " $ move to last column"}, /* 045 % */ {v_match, V_ABS|V_CNT|V_MOVE|VM_CUTREQ|VM_RCM_SET, "%", " % move to match"}, /* 046 & */ {v_again, 0, "&", " & repeat substitution"}, /* 047 ' */ {v_fmark, V_ABS_L|V_CHAR|V_MOVE|VM_LMODE|VM_RCM_SET, "'['a-z]", " ' move to mark (to first non-blank)"}, /* 050 ( */ {v_sentenceb, V_ABS|V_CNT|V_MOVE|VM_CUTREQ|VM_RCM_SET, "[count](", " ( move back sentence"}, /* 051 ) */ {v_sentencef, V_ABS|V_CNT|V_MOVE|VM_CUTREQ|VM_RCM_SET, "[count])", " ) move forward sentence"}, /* 052 * */ {NULL}, /* 053 + */ {v_down, V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETFNB, "[count]+", " + move down by lines (to first non-blank)"}, /* 054 , */ {v_chrrepeat, V_CNT|V_MOVE|VM_RCM_SET, "[count],", " , reverse last F, f, T or t search"}, /* 055 - */ {v_up, V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETFNB, "[count]-", " - move up by lines (to first non-blank)"}, /* 056 . */ {NULL, 0, ".", " . repeat the last command"}, /* 057 / */ {v_searchf, V_ABS_C|V_MOVE|VM_CUTREQ|VM_RCM_SET, "/RE[/ offset]", " / search forward"}, /* 060 0 */ {v_zero, V_MOVE|VM_RCM_SET, "0", " 0 move to first character"}, /* 061 1 */ {NULL}, /* 062 2 */ {NULL}, /* 063 3 */ {NULL}, /* 064 4 */ {NULL}, /* 065 5 */ {NULL}, /* 066 6 */ {NULL}, /* 067 7 */ {NULL}, /* 070 8 */ {NULL}, /* 071 9 */ {NULL}, /* 072 : */ {v_ex, 0, ":command [| command] ...", " : ex command"}, /* 073 ; */ {v_chrepeat, V_CNT|V_MOVE|VM_RCM_SET, "[count];", " ; repeat last F, f, T or t search"}, /* 074 < */ {v_shiftl, V_CNT|V_DOT|V_MOTION|VM_RCM_SET, "[count]<[count]motion", " < shift lines left to motion"}, /* 075 = */ {NULL}, /* 076 > */ {v_shiftr, V_CNT|V_DOT|V_MOTION|VM_RCM_SET, "[count]>[count]motion", " > shift lines right to motion"}, /* 077 ? */ {v_searchb, V_ABS_C|V_MOVE|VM_CUTREQ|VM_RCM_SET, "?RE[? offset]", " ? search backward"}, /* 100 @ */ {v_at, V_CNT|V_RBUF|VM_RCM_SET, "@buffer", " @ execute buffer"}, /* 101 A */ {v_iA, V_CNT|V_DOT|VM_RCM_SET, "[count]A", " A append to the line"}, /* 102 B */ {v_wordB, V_CNT|V_MOVE|VM_RCM_SET, "[count]B", " B move back bigword"}, /* 103 C */ {NULL, 0, "[buffer][count]C", " C change to end-of-line"}, /* 104 D */ {NULL, 0, "[buffer]D", " D delete to end-of-line"}, /* 105 E */ {v_wordE, V_CNT|V_MOVE|VM_RCM_SET, "[count]E", " E move to end of bigword"}, /* 106 F */ {v_chF, V_CHAR|V_CNT|V_MOVE|VM_RCM_SET, "[count]F character", " F character in line backward search"}, /* 107 G */ {v_lgoto, V_ABS_L|V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETFNB, "[count]G", " G move to line"}, /* 110 H */ {v_home, V_ABS_L|V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETNNB, "[count]H", " H move to count lines from screen top"}, /* 111 I */ {v_iI, V_CNT|V_DOT|VM_RCM_SET, "[count]I", " I insert before first nonblank"}, /* 112 J */ {v_join, V_CNT|V_DOT|VM_RCM_SET, "[count]J", " J join lines"}, /* 113 K */ {NULL}, /* 114 L */ {v_bottom, V_ABS_L|V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETNNB, "[count]L", " L move to screen bottom"}, /* 115 M */ {v_middle, V_ABS_L|V_CNT|V_MOVE|VM_LMODE|VM_RCM_SETNNB, "M", " M move to screen middle"}, /* 116 N */ {v_searchN, V_ABS_C|V_MOVE|VM_CUTREQ|VM_RCM_SET, "n", " N reverse last search"}, /* 117 O */ {v_iO, V_CNT|V_DOT|VM_RCM_SET, "[count]O", " O insert above line"}, /* 120 P */ {v_Put, V_CNT|V_DOT|V_OBUF|VM_RCM_SET, "[buffer]P", " P insert before cursor from buffer"}, /* 121 Q */ {v_exmode, 0, "Q", " Q switch to ex mode"}, /* 122 R */ {v_Replace, V_CNT|V_DOT|VM_RCM_SET, "[count]R", " R replace characters"}, /* 123 S */ {NULL, 0, "[buffer][count]S", " S substitute for the line(s)"}, /* 124 T */ {v_chT, V_CHAR|V_CNT|V_MOVE|VM_RCM_SET, "[count]T character", " T before character in line backward search"}, /* 125 U */ {v_Undo, VM_RCM_SET, "U", " U Restore the current line"}, /* 126 V */ {NULL}, /* 127 W */ {v_wordW, V_CNT|V_MOVE|VM_RCM_SET, "[count]W", " W move to next bigword"}, /* 130 X */ {v_Xchar, V_CNT|V_DOT|V_OBUF|VM_RCM_SET, "[buffer][count]X", " X delete character before cursor"}, /* 131 Y */ {NULL, 0, "[buffer][count]Y", " Y copy line"}, /* 132 Z */ {v_zexit, 0, "ZZ", "ZZ save file and exit"}, /* 133 [ */ {v_sectionb, V_ABS|V_CNT|V_MOVE|VM_RCM_SET, "[[", "[[ move back section"}, /* 134 \ */ {NULL}, /* 135 ] */ {v_sectionf, V_ABS|V_CNT|V_MOVE|VM_RCM_SET, "]]", "]] move forward section"}, /* 136 ^ */ /* * DON'T set the VM_RCM_SETFNB flag, the function has to do the work * anyway, in case it's a motion component. DO set VM_RCM_SET, so * that any motion that's part of a command is preserved. */ {v_first, V_CNT|V_MOVE|VM_RCM_SET, "^", " ^ move to first non-blank"}, /* 137 _ */ /* * Needs both to set the VM_RCM_SETFNB flag, and to do the work * in the function, in case it's a delete. */ {v_cfirst, V_CNT|V_MOVE|VM_RCM_SETFNB, "_", " _ move to first non-blank"}, /* 140 ` */ {v_bmark, V_ABS_C|V_CHAR|V_MOVE|VM_CUTREQ|VM_RCM_SET, "`[`a-z]", " ` move to mark"}, /* 141 a */ {v_ia, V_CNT|V_DOT|VM_RCM_SET, "[count]a", " a append after cursor"}, /* 142 b */ {v_wordb, V_CNT|V_MOVE|VM_RCM_SET, "[count]b", " b move back word"}, /* 143 c */ {v_change, V_CNT|V_DOT|V_MOTION|V_OBUF|VM_RCM_SET, "[buffer][count]c[count]motion", " c change to motion"}, /* 144 d */ {v_delete, V_CNT|V_DOT|V_MOTION|V_OBUF|VM_RCM_SET, "[buffer][count]d[count]motion", " d delete to motion"}, /* 145 e */ {v_worde, V_CNT|V_MOVE|VM_RCM_SET, "[count]e", " e move to end of word"}, /* 146 f */ {v_chf, V_CHAR|V_CNT|V_MOVE|VM_RCM_SET, "[count]f character", " f character in line forward search"}, /* 147 g */ {NULL}, /* 150 h */ {v_left, V_CNT|V_MOVE|VM_RCM_SET, "[count]h", " h move left by columns"}, /* 151 i */ {v_ii, V_CNT|V_DOT|VM_RCM_SET, "[count]i", " i insert before cursor"}, /* 152 j */ {v_down, V_CNT|V_MOVE|VM_LMODE|VM_RCM, "[count]j", " j move down by lines"}, /* 153 k */ {v_up, V_CNT|V_MOVE|VM_LMODE|VM_RCM, "[count]k", " k move up by lines"}, /* 154 l */ {v_right, V_CNT|V_MOVE|VM_RCM_SET, "[count]l", " l move right by columns"}, /* 155 m */ {v_mark, V_CHAR, "m[a-z]", " m set mark"}, /* 156 n */ {v_searchn, V_ABS_C|V_MOVE|VM_CUTREQ|VM_RCM_SET, "n", " n repeat last search"}, /* 157 o */ {v_io, V_CNT|V_DOT|VM_RCM_SET, "[count]o", " o append after line"}, /* 160 p */ {v_put, V_CNT|V_DOT|V_OBUF|VM_RCM_SET, "[buffer]p", " p insert after cursor from buffer"}, /* 161 q */ {NULL}, /* 162 r */ {v_replace, V_CNT|V_DOT|VM_RCM_SET, "[count]r character", " r replace character"}, /* 163 s */ {v_subst, V_CNT|V_DOT|V_OBUF|VM_RCM_SET, "[buffer][count]s", " s substitute character"}, /* 164 t */ {v_cht, V_CHAR|V_CNT|V_MOVE|VM_RCM_SET, "[count]t character", " t before character in line forward search"}, /* 165 u */ /* * DON'T set the V_DOT flag, it' more complicated than that. * See vi/vi.c for details. */ {v_undo, VM_RCM_SET, "u", " u undo last change"}, /* 166 v */ {NULL}, /* 167 w */ {v_wordw, V_CNT|V_MOVE|VM_RCM_SET, "[count]w", " w move to next word"}, /* 170 x */ {v_xchar, V_CNT|V_DOT|V_OBUF|VM_RCM_SET, "[buffer][count]x", " x delete character"}, /* 171 y */ {v_yank, V_CNT|V_DOT|V_MOTION|V_OBUF|VM_RCM_SET, "[buffer][count]y[count]motion", " y copy text to motion into a cut buffer"}, /* 172 z */ /* * DON'T set the V_CHAR flag, the char isn't required, * so it's handled specially in getcmd(). */ {v_z, V_ABS_L|V_CNT|VM_RCM_SETFNB, "[line]z[window_size][-|.|+|^|]", " z reposition the screen"}, /* 173 { */ {v_paragraphb, V_ABS|V_CNT|V_MOVE|VM_CUTREQ|VM_RCM_SET, "[count]{", " { move back paragraph"}, /* 174 | */ {v_ncol, V_CNT|V_MOVE|VM_RCM_SET, "[count]|", " | move to column"}, /* 175 } */ {v_paragraphf, V_ABS|V_CNT|V_MOVE|VM_CUTREQ|VM_RCM_SET, "[count]}", " } move forward paragraph"}, /* 176 ~ */ {v_ulcase, V_CNT|V_DOT|VM_RCM_SET, "[count]~", " ~ reverse case"}, }; nvi-1.81.6/vi/v_delete.c0100644000076400001440000000471610720065506014033 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_delete.c,v 10.11 2001/06/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:31 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_delete -- [buffer][count]d[count]motion * [buffer][count]D * Delete a range of text. * * PUBLIC: int v_delete __P((SCR *, VICMD *)); */ int v_delete(SCR *sp, VICMD *vp) { db_recno_t nlines; size_t len; int lmode; lmode = F_ISSET(vp, VM_LMODE) ? CUT_LINEMODE : 0; /* Yank the lines. */ if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, lmode | (F_ISSET(vp, VM_CUTREQ) ? CUT_NUMREQ : CUT_NUMOPT))) return (1); /* Delete the lines. */ if (del(sp, &vp->m_start, &vp->m_stop, lmode)) return (1); /* * Check for deletion of the entire file. Try to check a close * by line so we don't go to the end of the file unnecessarily. */ if (!db_exist(sp, vp->m_final.lno + 1)) { if (db_last(sp, &nlines)) return (1); if (nlines == 0) { vp->m_final.lno = 1; vp->m_final.cno = 0; return (0); } } /* * One special correction, in case we've deleted the current line or * character. We check it here instead of checking in every command * that can be a motion component. */ if (db_get(sp, vp->m_final.lno, 0, NULL, &len)) { if (db_get(sp, nlines, DBG_FATAL, NULL, &len)) return (1); vp->m_final.lno = nlines; } /* * !!! * Cursor movements, other than those caused by a line mode command * moving to another line, historically reset the relative position. * * This currently matches the check made in v_yank(), I'm hoping that * they should be consistent... */ if (!F_ISSET(vp, VM_LMODE)) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SET); /* Make sure the set cursor position exists. */ if (vp->m_final.cno >= len) vp->m_final.cno = len ? len - 1 : 0; } /* * !!! * The "dd" command moved to the first non-blank; "d" * didn't. */ if (F_ISSET(vp, VM_LDOUBLE)) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SETFNB); } return (0); } nvi-1.81.6/vi/v_event.c0100644000076400001440000002027610720065506013711 0ustar skimousers/*- * Copyright (c) 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_event.c,v 8.21 2001/06/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:31 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "../ipc/ip.h" #include "vi.h" /* * v_c_settop -- * Scrollbar position. */ static int v_c_settop(SCR *sp, VICMD *vp) { SMAP *smp; size_t x = 0, y = LASTLINE(sp); /* Future: change to -1 to not * display the cursor */ size_t tx, ty = -1; /* * We want to scroll the screen, without changing the cursor position. * So, we fill the screen map and then flush it to the screen. Then, * set the VIP_S_REFRESH flag so the main vi loop doesn't update the * screen. When the next real command happens, the refresh code will * notice that the screen map is way wrong and fix it. * * XXX * There may be a serious performance problem here -- we're doing no * optimization whatsoever, which means that we're copying the entire * screen out to the X11 screen code on each change. */ if (vs_sm_fill(sp, vp->ev.e_lno, P_TOP)) return (1); for (smp = HMAP; smp <= TMAP; ++smp) { SMAP_FLUSH(smp); if (vs_line(sp, smp, &ty, &tx)) return (1); if (ty != -1) { y = ty; x = tx; } } (void)sp->gp->scr_move(sp, y, x); F_SET(VIP(sp), VIP_S_REFRESH); return (sp->gp->scr_refresh(sp, 0)); } /* * v_edit -- * Edit command. */ static int v_edit(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_EDIT, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, vp->ev.e_csp, vp->ev.e_len); return (v_exec_ex(sp, vp, &cmd)); } /* * v_editopt -- * Set an option value. */ static int v_editopt(SCR *sp, VICMD *vp) { int rval; char *np; size_t nlen; char *p2; INT2CHAR(sp, vp->ev.e_str2, STRLEN(vp->ev.e_str2)+1, np, nlen); p2 = strdup(np); rval = api_opts_set(sp, vp->ev.e_str1, p2, vp->ev.e_val1, vp->ev.e_val1); if (sp->gp->scr_reply != NULL) (void)sp->gp->scr_reply(sp, rval, NULL); free(p2); return (rval); } /* * v_editsplit -- * Edit in a split screen. */ static int v_editsplit(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_EDIT, 0, OOBLNO, OOBLNO, 0); F_SET(&cmd, E_NEWSCREEN); argv_exp0(sp, &cmd, vp->ev.e_csp, vp->ev.e_len); return (v_exec_ex(sp, vp, &cmd)); } /* * v_tag -- * Tag command. */ static int v_tag(SCR *sp, VICMD *vp) { EXCMD cmd; if (v_curword(sp)) return (1); ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw)); return (v_exec_ex(sp, vp, &cmd)); } /* * v_tagas -- * Tag on the supplied string. */ static int v_tagas(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, vp->ev.e_csp, vp->ev.e_len); return (v_exec_ex(sp, vp, &cmd)); } /* * v_tagsplit -- * Tag in a split screen. */ static int v_tagsplit(SCR *sp, VICMD *vp) { EXCMD cmd; if (v_curword(sp)) return (1); ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); F_SET(&cmd, E_NEWSCREEN); argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw)); return (v_exec_ex(sp, vp, &cmd)); } /* * v_quit -- * Quit command. */ static int v_quit(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_QUIT, 0, OOBLNO, OOBLNO, 0); return (v_exec_ex(sp, vp, &cmd)); } /* * v_erepaint -- * Repaint selected lines from the screen. * * PUBLIC: int v_erepaint __P((SCR *, EVENT *)); */ int v_erepaint(SCR *sp, EVENT *evp) { SMAP *smp; for (; evp->e_flno <= evp->e_tlno; ++evp->e_flno) { smp = HMAP + evp->e_flno - 1; SMAP_FLUSH(smp); if (vs_line(sp, smp, NULL, NULL)) return (1); } return (0); } /* * v_sel_end -- * End selection. */ int v_sel_end(SCR *sp, EVENT *evp) { SMAP *smp; VI_PRIVATE *vip; smp = HMAP + evp->e_lno; if (smp > TMAP) { /* XXX */ return (1); } vip = VIP(sp); vip->sel.lno = smp->lno; vip->sel.cno = vs_colpos(sp, smp->lno, evp->e_cno + (smp->soff - 1) * sp->cols); return (0); } /* * v_sel_start -- * Start selection. */ int v_sel_start(SCR *sp, EVENT *evp) { SMAP *smp; VI_PRIVATE *vip; smp = HMAP + evp->e_lno; if (smp > TMAP) { /* XXX */ return (1); } vip = VIP(sp); vip->sel.lno = smp->lno; vip->sel.cno = vs_colpos(sp, smp->lno, evp->e_cno + (smp->soff - 1) * sp->cols); return (0); } /* * v_wq -- * Write and quit command. */ static int v_wq(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_WQ, 0, OOBLNO, OOBLNO, 0); cmd.addr1.lno = 1; if (db_last(sp, &cmd.addr2.lno)) return (1); return (v_exec_ex(sp, vp, &cmd)); } /* * v_write -- * Write command. */ static int v_write(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_WRITE, 0, OOBLNO, OOBLNO, 0); cmd.addr1.lno = 1; if (db_last(sp, &cmd.addr2.lno)) return (1); return (v_exec_ex(sp, vp, &cmd)); } /* * v_writeas -- * Write command. */ static int v_writeas(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_WRITE, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, vp->ev.e_csp, vp->ev.e_len); cmd.addr1.lno = 1; if (db_last(sp, &cmd.addr2.lno)) return (1); return (v_exec_ex(sp, vp, &cmd)); } /* * v_event -- * Find the event associated with a function. * * PUBLIC: int v_event __P((SCR *, VICMD *)); */ int v_event(SCR *sp, VICMD *vp) { /* This array maps events to vi command functions. */ static VIKEYS const vievents[] = { #define V_C_SETTOP 0 /* VI_C_SETTOP */ {v_c_settop, 0}, #define V_EDIT 1 /* VI_EDIT */ {v_edit, 0}, #define V_EDITOPT 2 /* VI_EDITOPT */ {v_editopt, 0}, #define V_EDITSPLIT 3 /* VI_EDITSPLIT */ {v_editsplit, 0}, #define V_EMARK 4 /* VI_MOUSE_MOVE */ {v_emark, V_ABS_L|V_MOVE}, #define V_QUIT 5 /* VI_QUIT */ {v_quit, 0}, #define V_SEARCH 6 /* VI_SEARCH */ {v_esearch, V_ABS_L|V_MOVE}, #define V_TAG 7 /* VI_TAG */ {v_tag, 0}, #define V_TAGAS 8 /* VI_TAGAS */ {v_tagas, 0}, #define V_TAGSPLIT 9 /* VI_TAGSPLIT */ {v_tagsplit, 0}, #define V_WQ 10 /* VI_WQ */ {v_wq, 0}, #define V_WRITE 11 /* VI_WRITE */ {v_write, 0}, #define V_WRITEAS 12 /* VI_WRITEAS */ {v_writeas, 0}, }; switch (vp->ev.e_ipcom) { case VI_C_BOL: vp->kp = &vikeys['0']; break; case VI_C_BOTTOM: vp->kp = &vikeys['G']; break; case VI_C_DEL: vp->kp = &vikeys['x']; break; case VI_C_DOWN: F_SET(vp, VC_C1SET); vp->count = vp->ev.e_lno; vp->kp = &vikeys['\012']; break; case VI_C_EOL: vp->kp = &vikeys['$']; break; case VI_C_INSERT: vp->kp = &vikeys['i']; break; case VI_C_LEFT: vp->kp = &vikeys['\010']; break; case VI_C_PGDOWN: F_SET(vp, VC_C1SET); vp->count = vp->ev.e_lno; vp->kp = &vikeys['\006']; break; case VI_C_PGUP: F_SET(vp, VC_C1SET); vp->count = vp->ev.e_lno; vp->kp = &vikeys['\002']; break; case VI_C_RIGHT: vp->kp = &vikeys['\040']; break; case VI_C_SEARCH: vp->kp = &vievents[V_SEARCH]; break; case VI_C_SETTOP: vp->kp = &vievents[V_C_SETTOP]; break; case VI_C_TOP: F_SET(vp, VC_C1SET); vp->count = 1; vp->kp = &vikeys['G']; break; case VI_C_UP: F_SET(vp, VC_C1SET); vp->count = vp->ev.e_lno; vp->kp = &vikeys['\020']; break; case VI_EDIT: vp->kp = &vievents[V_EDIT]; break; case VI_EDITOPT: vp->kp = &vievents[V_EDITOPT]; break; case VI_EDITSPLIT: vp->kp = &vievents[V_EDITSPLIT]; break; case VI_MOUSE_MOVE: vp->kp = &vievents[V_EMARK]; break; case VI_SEL_END: v_sel_end(sp, &vp->ev); /* XXX RETURN IGNORE */ break; case VI_SEL_START: v_sel_start(sp, &vp->ev); /* XXX RETURN IGNORE */ break; case VI_QUIT: vp->kp = &vievents[V_QUIT]; break; case VI_TAG: vp->kp = &vievents[V_TAG]; break; case VI_TAGAS: vp->kp = &vievents[V_TAGAS]; break; case VI_TAGSPLIT: vp->kp = &vievents[V_TAGSPLIT]; break; case VI_UNDO: vp->kp = &vikeys['u']; break; case VI_WQ: vp->kp = &vievents[V_WQ]; break; case VI_WRITE: vp->kp = &vievents[V_WRITE]; break; case VI_WRITEAS: vp->kp = &vievents[V_WRITEAS]; break; default: return (1); } return (0); } nvi-1.81.6/vi/v_ex.c0100644000076400001440000003433010720065506013200 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_ex.c,v 10.60 2003/07/19 21:04:00 skimo Exp $ (Berkeley) $Date: 2003/07/19 21:04:00 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static int v_ecl __P((SCR *)); static int v_ecl_init __P((SCR *)); static int v_ecl_log __P((SCR *, TEXT *)); static int v_ex_done __P((SCR *, VICMD *)); /* * v_again -- & * Repeat the previous substitution. * * PUBLIC: int v_again __P((SCR *, VICMD *)); */ int v_again(SCR *sp, VICMD *vp) { EXCMD cmd; static CHAR_T nul[] = { 0 }; ex_cinit(sp, &cmd, C_SUBAGAIN, 2, vp->m_start.lno, vp->m_start.lno, 1); argv_exp0(sp, &cmd, nul, 1); return (v_exec_ex(sp, vp, &cmd)); } /* * v_exmode -- Q * Switch the editor into EX mode. * * PUBLIC: int v_exmode __P((SCR *, VICMD *)); */ int v_exmode(SCR *sp, VICMD *vp) { GS *gp; gp = sp->gp; /* Try and switch screens -- the screen may not permit it. */ if (gp->scr_screen(sp, SC_EX)) { msgq(sp, M_ERR, "207|The Q command requires the ex terminal interface"); return (1); } (void)gp->scr_attr(sp, SA_ALTERNATE, 0); /* Save the current cursor position. */ sp->frp->lno = sp->lno; sp->frp->cno = sp->cno; F_SET(sp->frp, FR_CURSORSET); /* Switch to ex mode. */ F_CLR(sp, SC_VI | SC_SCR_VI); F_SET(sp, SC_EX); /* Move out of the vi screen. */ (void)ex_puts(sp, "\n"); return (0); } /* * v_join -- [count]J * Join lines together. * * PUBLIC: int v_join __P((SCR *, VICMD *)); */ int v_join(SCR *sp, VICMD *vp) { EXCMD cmd; int lno; /* * YASC. * The general rule is that '#J' joins # lines, counting the current * line. However, 'J' and '1J' are the same as '2J', i.e. join the * current and next lines. This doesn't map well into the ex command * (which takes two line numbers), so we handle it here. Note that * we never test for EOF -- historically going past the end of file * worked just fine. */ lno = vp->m_start.lno + 1; if (F_ISSET(vp, VC_C1SET) && vp->count > 2) lno = vp->m_start.lno + (vp->count - 1); ex_cinit(sp, &cmd, C_JOIN, 2, vp->m_start.lno, lno, 0); return (v_exec_ex(sp, vp, &cmd)); } /* * v_shiftl -- [count]m_start.lno, vp->m_stop.lno, 0); argv_exp0(sp, &cmd, lt, 2); return (v_exec_ex(sp, vp, &cmd)); } /* * v_shiftr -- [count]>motion * Shift lines right. * * PUBLIC: int v_shiftr __P((SCR *, VICMD *)); */ int v_shiftr(SCR *sp, VICMD *vp) { EXCMD cmd; static CHAR_T gt[] = {'>', 0}; ex_cinit(sp, &cmd, C_SHIFTR, 2, vp->m_start.lno, vp->m_stop.lno, 0); argv_exp0(sp, &cmd, gt, 2); return (v_exec_ex(sp, vp, &cmd)); } /* * v_suspend -- ^Z * Suspend vi. * * PUBLIC: int v_suspend __P((SCR *, VICMD *)); */ int v_suspend(SCR *sp, VICMD *vp) { EXCMD cmd; static CHAR_T suspend[] = {'s', 'u', 's', 'p', 'e', 'n', 'd', 0}; ex_cinit(sp, &cmd, C_STOP, 0, OOBLNO, OOBLNO, 0); argv_exp0(sp, &cmd, suspend, sizeof(suspend)/sizeof(CHAR_T)); return (v_exec_ex(sp, vp, &cmd)); } /* * v_switch -- ^^ * Switch to the previous file. * * PUBLIC: int v_switch __P((SCR *, VICMD *)); */ int v_switch(SCR *sp, VICMD *vp) { EXCMD cmd; char *name; CHAR_T *wp; size_t wlen; /* * Try the alternate file name, then the previous file * name. Use the real name, not the user's current name. */ if ((name = sp->alt_name) == NULL) { msgq(sp, M_ERR, "180|No previous file to edit"); return (1); } /* If autowrite is set, write out the file. */ if (file_m1(sp, 0, FS_ALL)) return (1); ex_cinit(sp, &cmd, C_EDIT, 0, OOBLNO, OOBLNO, 0); CHAR2INT(sp, name, strlen(name) + 1, wp, wlen); argv_exp0(sp, &cmd, wp, wlen); return (v_exec_ex(sp, vp, &cmd)); } /* * v_tagpush -- ^[ * Do a tag search on the cursor keyword. * * PUBLIC: int v_tagpush __P((SCR *, VICMD *)); */ int v_tagpush(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, 0, 0); argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw) + 1); return (v_exec_ex(sp, vp, &cmd)); } /* * v_tagpop -- ^T * Pop the tags stack. * * PUBLIC: int v_tagpop __P((SCR *, VICMD *)); */ int v_tagpop(SCR *sp, VICMD *vp) { EXCMD cmd; ex_cinit(sp, &cmd, C_TAGPOP, 0, OOBLNO, 0, 0); return (v_exec_ex(sp, vp, &cmd)); } /* * v_filter -- [count]!motion command(s) * Run range through shell commands, replacing text. * * PUBLIC: int v_filter __P((SCR *, VICMD *)); */ int v_filter(SCR *sp, VICMD *vp) { EXCMD cmd; TEXT *tp; /* * !!! * Historical vi permitted "!!" in an empty file, and it's handled * as a special case in the ex_bang routine. Don't modify this setup * without understanding that one. In particular, note that we're * manipulating the ex argument structures behind ex's back. * * !!! * Historical vi did not permit the '!' command to be associated with * a non-line oriented motion command, in general, although it did * with search commands. So, !f; and !w would fail, but !/; * would succeed, even if they all moved to the same location in the * current line. I don't see any reason to disallow '!' using any of * the possible motion commands. * * !!! * Historical vi ran the last bang command if N or n was used as the * search motion. */ if (F_ISSET(vp, VC_ISDOT) || ISCMD(vp->rkp, 'N') || ISCMD(vp->rkp, 'n')) { static CHAR_T bang[] = {'!', 0}; ex_cinit(sp, &cmd, C_BANG, 2, vp->m_start.lno, vp->m_stop.lno, 0); EXP(sp)->argsoff = 0; /* XXX */ if (argv_exp1(sp, &cmd, bang, 1, 1)) return (1); cmd.argc = EXP(sp)->argsoff; /* XXX */ cmd.argv = EXP(sp)->args; /* XXX */ return (v_exec_ex(sp, vp, &cmd)); } /* Get the command from the user. */ if (v_tcmd(sp, vp, '!', TXT_BS | TXT_CR | TXT_ESCAPE | TXT_FILEC | TXT_PROMPT)) return (1); /* * Check to see if the user changed their mind. * * !!! * Entering on an empty line was historically an error, * this implementation doesn't bother. */ tp = sp->tiq.cqh_first; if (tp->term != TERM_OK) { vp->m_final.lno = sp->lno; vp->m_final.cno = sp->cno; return (0); } /* Home the cursor. */ vs_home(sp); ex_cinit(sp, &cmd, C_BANG, 2, vp->m_start.lno, vp->m_stop.lno, 0); EXP(sp)->argsoff = 0; /* XXX */ if (argv_exp1(sp, &cmd, tp->lb + 1, tp->len - 1, 1)) return (1); cmd.argc = EXP(sp)->argsoff; /* XXX */ cmd.argv = EXP(sp)->args; /* XXX */ return (v_exec_ex(sp, vp, &cmd)); } /* * v_exec_ex -- * Execute an ex command. * * PUBLIC: int v_exec_ex __P((SCR *, VICMD *, EXCMD *)); */ int v_exec_ex(SCR *sp, VICMD *vp, EXCMD *exp) { int rval; rval = exp->cmd->fn(sp, exp); return (v_ex_done(sp, vp) || rval); } /* * v_ex -- : * Execute a colon command line. * * PUBLIC: int v_ex __P((SCR *, VICMD *)); */ int v_ex(SCR *sp, VICMD *vp) { WIN *wp; TEXT *tp; int do_cedit, do_resolution, ifcontinue; wp = sp->wp; /* * !!! * If we put out more than a single line of messages, or ex trashes * the screen, the user may continue entering ex commands. We find * this out when we do the screen/message resolution. We can't enter * completely into ex mode however, because the user can elect to * return into vi mode by entering any key, i.e. we have to be in raw * mode. */ for (do_cedit = do_resolution = 0;;) { /* * !!! * There may already be an ex command waiting to run. If * so, we continue with it. */ if (!EXCMD_RUNNING(wp)) { /* Get a command. */ if (v_tcmd(sp, vp, ':', TXT_BS | TXT_CEDIT | TXT_FILEC | TXT_PROMPT)) return (1); tp = sp->tiq.cqh_first; /* * If the user entered a single , they want to * edit their colon command history. If they already * entered some text, move it into the edit history. */ if (tp->term == TERM_CEDIT) { if (tp->len > 1 && v_ecl_log(sp, tp)) return (1); do_cedit = 1; break; } /* If the user didn't enter anything, return. */ if (tp->term == TERM_BS) break; /* Log the command. */ if (O_STR(sp, O_CEDIT) != NULL) (void)v_ecl_log(sp, tp); /* Push a command on the command stack. */ if (ex_run_str(sp, NULL, tp->lb, tp->len, 0, 1)) return (1); } /* Home the cursor. */ vs_home(sp); /* * !!! * If the editor wrote the screen behind curses back, put out * a so that we don't overwrite the user's command * with its output or the next want-to-continue? message. This * doesn't belong here, but I can't find another place to put * it. See, we resolved the output from the last ex command, * and the user entered another one. This is the only place * where we have control before the ex command writes output. * We could get control in vs_msg(), but we have no way to know * if command didn't put out any output when we try and resolve * this command. This fixes a bug where combinations of ex * commands, e.g. ":set:!date:set" didn't look right. */ if (F_ISSET(sp, SC_SCR_EXWROTE)) (void)putchar('\n'); /* Call the ex parser. */ (void)ex_cmd(sp); /* Flush ex messages. */ (void)ex_fflush(sp); /* Resolve any messages. */ if (vs_ex_resolve(sp, &ifcontinue)) return (1); /* * Continue or return. If continuing, make sure that we * eventually do resolution. */ if (!ifcontinue) break; do_resolution = 1; /* If we're continuing, it's a new command. */ ++sp->ccnt; } /* * If the user previously continued an ex command, we have to do * resolution to clean up the screen. Don't wait, we already did * that. */ if (do_resolution) { F_SET(sp, SC_EX_WAIT_NO); if (vs_ex_resolve(sp, &ifcontinue)) return (1); } /* Cleanup from the ex command. */ if (v_ex_done(sp, vp)) return (1); /* The user may want to edit their colon command history. */ if (do_cedit) return (v_ecl(sp)); return (0); } /* * v_ex_done -- * Cleanup from an ex command. */ static int v_ex_done(SCR *sp, VICMD *vp) { size_t len; /* * The only cursor modifications are real, however, the underlying * line may have changed; don't trust anything. This code has been * a remarkably fertile place for bugs. Do a reality check on a * cursor value, and make sure it's okay. If necessary, change it. * Ex keeps track of the line number, but it cares less about the * column and it may have disappeared. * * Don't trust ANYTHING. * * XXX * Ex will soon have to start handling the column correctly; see * the POSIX 1003.2 standard. */ if (db_eget(sp, sp->lno, NULL, &len, NULL)) { sp->lno = 1; sp->cno = 0; } else if (sp->cno >= len) sp->cno = len ? len - 1 : 0; vp->m_final.lno = sp->lno; vp->m_final.cno = sp->cno; /* * Don't re-adjust the cursor after executing an ex command, * and ex movements are permanent. */ F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SET); return (0); } /* * v_ecl -- * Start an edit window on the colon command-line commands. */ static int v_ecl(SCR *sp) { GS *gp; WIN *wp; SCR *new; /* Initialize the screen, if necessary. */ gp = sp->gp; wp = sp->wp; if (wp->ccl_sp == NULL && v_ecl_init(sp)) return (1); /* Get a new screen. */ if (screen_init(gp, sp, &new)) return (1); if (vs_split(sp, new, 1)) { (void)screen_end(new); return (1); } /* Attach to the screen. */ new->ep = wp->ccl_sp->ep; ++new->ep->refcnt; CIRCLEQ_INSERT_HEAD(&new->ep->scrq, new, eq); new->frp = wp->ccl_sp->frp; new->frp->flags = sp->frp->flags; /* Move the cursor to the end. */ (void)db_last(new, &new->lno); if (new->lno == 0) new->lno = 1; /* Remember the originating window. */ sp->ccl_parent = sp; /* It's a special window. */ F_SET(new, SC_COMEDIT); /* Don't encode on writing to DB. */ o_set(new, O_FILEENCODING, OS_STRDUP, "WCHAR_T", 0); /* Set up the switch. */ sp->nextdisp = new; F_SET(sp, SC_SSWITCH); return (0); } /* * v_ecl_exec -- * Execute a command from a colon command-line window. * * PUBLIC: int v_ecl_exec __P((SCR *)); */ int v_ecl_exec(SCR *sp) { size_t len; CHAR_T *p; if (db_get(sp, sp->lno, 0, &p, &len) && sp->lno == 1) { v_emsg(sp, NULL, VIM_EMPTY); return (1); } if (len == 0) { msgq(sp, M_BERR, "307|No ex command to execute"); return (1); } /* Push the command on the command stack. */ if (ex_run_str(sp, NULL, p, len, 0, 0)) return (1); /* Set up the switch. */ sp->nextdisp = sp->ccl_parent; F_SET(sp, SC_EXIT); return (0); } /* * v_ecl_log -- * Log a command into the colon command-line log file. */ static int v_ecl_log(SCR *sp, TEXT *tp) { db_recno_t lno; int rval; CHAR_T *p; size_t len; SCR *ccl_sp; /* Initialize the screen, if necessary. */ if (sp->wp->ccl_sp == NULL && v_ecl_init(sp)) return (1); ccl_sp = sp->wp->ccl_sp; /* * Don't log colon command window commands into the colon command * window... */ if (sp->ep == ccl_sp->ep) return (0); if (db_last(ccl_sp, &lno)) { return (1); } /* Don't log line that is identical to previous one */ if (lno > 0 && !db_get(ccl_sp, lno, 0, &p, &len) && len == tp->len && !MEMCMP(tp->lb, p, len)) rval = 0; else { rval = db_append(ccl_sp, 0, lno, tp->lb, tp->len); /* XXXX end "transaction" on ccl */ /* Is this still necessary now that we no longer hijack sp ? */ log_cursor(ccl_sp); } return (rval); } /* * v_ecl_init -- * Initialize the colon command-line log file. */ static int v_ecl_init(SCR *sp) { FREF *frp; GS *gp; WIN *wp; gp = sp->gp; wp = sp->wp; /* Get a temporary file. */ if ((frp = file_add(sp, NULL)) == NULL) return (1); /* * XXX * Create a screen -- the file initialization code wants one. */ if (screen_init(gp, sp, &wp->ccl_sp)) return (1); conv_enc(wp->ccl_sp, O_FILEENCODING, "WCHAR_T"); if (file_init(wp->ccl_sp, frp, NULL, 0)) { (void)screen_end(wp->ccl_sp); wp->ccl_sp = 0; return (1); } /* The underlying file isn't recoverable. */ F_CLR(wp->ccl_sp->ep, F_RCV_ON); return (0); } nvi-1.81.6/vi/v_increment.c0100644000076400001440000001316510720065506014553 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_increment.c,v 10.16 2001/06/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:31 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static char * const fmt[] = { #define DEC 0 "%ld", #define SDEC 1 "%+ld", #define HEXC 2 "0X%0*lX", #define HEXL 3 "0x%0*lx", #define OCTAL 4 "%#0*lo", }; static void inc_err __P((SCR *, enum nresult)); /* * v_increment -- [count]#[#+-] * Increment/decrement a keyword number. * * PUBLIC: int v_increment __P((SCR *, VICMD *)); */ int v_increment(SCR *sp, VICMD *vp) { enum nresult nret; u_long ulval; long change, ltmp, lval; size_t beg, blen, end, len, nlen, wlen; int base, isempty, rval; char *ntype, nbuf[100]; CHAR_T *bp, *p, *t; /* Validate the operator. */ if (vp->character == '#') vp->character = '+'; if (vp->character != '+' && vp->character != '-') { v_emsg(sp, vp->kp->usage, VIM_USAGE); return (1); } /* If new value set, save it off, but it has to fit in a long. */ if (F_ISSET(vp, VC_C1SET)) { if (vp->count > LONG_MAX) { inc_err(sp, NUM_OVER); return (1); } change = vp->count; } else change = 1; /* Get the line. */ if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (isempty) goto nonum; return (1); } /* * Skip any leading space before the number. Getting a cursor word * implies moving the cursor to its beginning, if we moved, refresh * now. */ for (beg = vp->m_start.cno; beg < len && isspace(p[beg]); ++beg); if (beg >= len) goto nonum; if (beg != vp->m_start.cno) { sp->cno = beg; (void)vs_refresh(sp, 0); } #undef ishex #define ishex(c) (isdigit(c) || strchr("abcdefABCDEF", c)) #undef isoctal #define isoctal(c) (isdigit(c) && (c) != '8' && (c) != '9') /* * Look for 0[Xx], or leading + or - signs, guess at the base. * The character after that must be a number. Wlen is set to * the remaining characters in the line that could be part of * the number. */ wlen = len - beg; if (p[beg] == '0' && wlen > 2 && (p[beg + 1] == 'X' || p[beg + 1] == 'x')) { base = 16; end = beg + 2; if (!ishex(p[end])) goto decimal; ntype = p[beg + 1] == 'X' ? fmt[HEXC] : fmt[HEXL]; } else if (p[beg] == '0' && wlen > 1) { base = 8; end = beg + 1; if (!isoctal(p[end])) goto decimal; ntype = fmt[OCTAL]; } else if (wlen >= 1 && (p[beg] == '+' || p[beg] == '-')) { base = 10; end = beg + 1; ntype = fmt[SDEC]; if (!isdigit(p[end])) goto nonum; } else { decimal: base = 10; end = beg; ntype = fmt[DEC]; if (!isdigit(p[end])) { nonum: msgq(sp, M_ERR, "181|Cursor not in a number"); return (1); } } /* Find the end of the word, possibly correcting the base. */ while (++end < len) { switch (base) { case 8: if (isoctal(p[end])) continue; if (p[end] == '8' || p[end] == '9') { base = 10; ntype = fmt[DEC]; continue; } break; case 10: if (isdigit(p[end])) continue; break; case 16: if (ishex(p[end])) continue; break; default: abort(); /* NOTREACHED */ } break; } wlen = (end - beg); /* * XXX * If the line was at the end of the buffer, we have to copy it * so we can guarantee that it's NULL-terminated. We make the * buffer big enough to fit the line changes as well, and only * allocate once. */ GET_SPACE_RETW(sp, bp, blen, len + 50); if (end == len) { MEMMOVEW(bp, &p[beg], wlen); bp[wlen] = '\0'; t = bp; } else t = &p[beg]; /* * Octal or hex deal in unsigned longs, everything else is done * in signed longs. */ if (base == 10) { if ((nret = nget_slong(sp, &lval, t, NULL, 10)) != NUM_OK) goto err; ltmp = vp->character == '-' ? -change : change; if (lval > 0 && ltmp > 0 && !NPFITS(LONG_MAX, lval, ltmp)) { nret = NUM_OVER; goto err; } if (lval < 0 && ltmp < 0 && !NNFITS(LONG_MIN, lval, ltmp)) { nret = NUM_UNDER; goto err; } lval += ltmp; /* If we cross 0, signed numbers lose their sign. */ if (lval == 0 && ntype == fmt[SDEC]) ntype = fmt[DEC]; nlen = snprintf(nbuf, sizeof(nbuf), ntype, lval); } else { if ((nret = nget_uslong(sp, &ulval, t, NULL, base)) != NUM_OK) goto err; if (vp->character == '+') { if (!NPFITS(ULONG_MAX, ulval, change)) { nret = NUM_OVER; goto err; } ulval += change; } else { if (ulval < change) { nret = NUM_UNDER; goto err; } ulval -= change; } /* Correct for literal "0[Xx]" in format. */ if (base == 16) wlen -= 2; nlen = snprintf(nbuf, sizeof(nbuf), ntype, wlen, ulval); } /* Build the new line. */ MEMMOVEW(bp, p, beg); MEMMOVEW(bp + beg, nbuf, nlen); MEMMOVEW(bp + beg + nlen, p + end, len - beg - (end - beg)); len = beg + nlen + (len - beg - (end - beg)); nret = NUM_OK; rval = db_set(sp, vp->m_start.lno, bp, len); if (0) { err: rval = 1; inc_err(sp, nret); } if (bp != NULL) FREE_SPACEW(sp, bp, blen); return (rval); } static void inc_err(SCR *sp, enum nresult nret) { switch (nret) { case NUM_ERR: break; case NUM_OK: abort(); /* NOREACHED */ case NUM_OVER: msgq(sp, M_ERR, "182|Resulting number too large"); break; case NUM_UNDER: msgq(sp, M_ERR, "183|Resulting number too small"); break; } } nvi-1.81.6/vi/v_init.c0100644000076400001440000000461310720065506013530 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_init.c,v 10.9 2001/06/25 15:19:31 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:31 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_screen_copy -- * Copy vi screen. * * PUBLIC: int v_screen_copy __P((SCR *, SCR *)); */ int v_screen_copy(SCR *orig, SCR *sp) { VI_PRIVATE *ovip, *nvip; /* Create the private vi structure. */ CALLOC_RET(orig, nvip, VI_PRIVATE *, 1, sizeof(VI_PRIVATE)); sp->vi_private = nvip; /* Invalidate the line size cache. */ VI_SCR_CFLUSH(nvip); if (orig == NULL) { nvip->csearchdir = CNOTSET; } else { ovip = VIP(orig); /* User can replay the last input, but nothing else. */ if (ovip->rep_len != 0) { MALLOC_RET(orig, nvip->rep, EVENT *, ovip->rep_len); memmove(nvip->rep, ovip->rep, ovip->rep_len); nvip->rep_len = ovip->rep_len; } /* Copy the paragraph/section information. */ if (ovip->ps != NULL && (nvip->ps = v_strdup(sp, ovip->ps, strlen(ovip->ps))) == NULL) return (1); nvip->lastckey = ovip->lastckey; nvip->csearchdir = ovip->csearchdir; nvip->srows = ovip->srows; } return (0); } /* * v_screen_end -- * End a vi screen. * * PUBLIC: int v_screen_end __P((SCR *)); */ int v_screen_end(SCR *sp) { VI_PRIVATE *vip; if ((vip = VIP(sp)) == NULL) return (0); if (vip->keyw != NULL) free(vip->keyw); if (vip->rep != NULL) free(vip->rep); if (vip->ps != NULL) free(vip->ps); if (HMAP != NULL) free(HMAP); free(vip); sp->vi_private = NULL; return (0); } /* * v_optchange -- * Handle change of options for vi. * * PUBLIC: int v_optchange __P((SCR *, int, char *, u_long *)); */ int v_optchange(SCR *sp, int offset, char *str, u_long *valp) { switch (offset) { case O_PARAGRAPHS: return (v_buildps(sp, str, O_STR(sp, O_SECTIONS))); case O_SECTIONS: return (v_buildps(sp, O_STR(sp, O_PARAGRAPHS), str)); case O_WINDOW: return (vs_crel(sp, *valp)); } return (0); } nvi-1.81.6/vi/v_itxt.c0100644000076400001440000003053510720065506013557 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_itxt.c,v 10.21 2001/06/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:32 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * !!! * Repeated input in the historic vi is mostly wrong and this isn't very * backward compatible. For example, if the user entered "3Aab\ncd" in * the historic vi, the "ab" was repeated 3 times, and the "\ncd" was then * appended to the result. There was also a hack which I don't remember * right now, where "3o" would open 3 lines and then let the user fill them * in, to make screen movements on 300 baud modems more tolerable. I don't * think it's going to be missed. * * !!! * There's a problem with the way that we do logging for change commands with * implied motions (e.g. A, I, O, cc, etc.). Since the main vi loop logs the * starting cursor position before the change command "moves" the cursor, the * cursor position to which we return on undo will be where the user entered * the change command, not the start of the change. Several of the following * routines re-log the cursor to make this work correctly. Historic vi tried * to do the same thing, and mostly got it right. (The only spectacular way * it fails is if the user entered 'o' from anywhere but the last character of * the line, the undo returned the cursor to the start of the line. If the * user was on the last character of the line, the cursor returned to that * position.) We also check for mapped keys waiting, i.e. if we're in the * middle of a map, don't bother logging the cursor. */ #define LOG_CORRECT { \ if (!MAPPED_KEYS_WAITING(sp)) \ (void)log_cursor(sp); \ } static u_int32_t set_txt_std __P((SCR *, VICMD *, u_int32_t)); /* * v_iA -- [count]A * Append text to the end of the line. * * PUBLIC: int v_iA __P((SCR *, VICMD *)); */ int v_iA(SCR *sp, VICMD *vp) { size_t len; if (!db_get(sp, vp->m_start.lno, 0, NULL, &len)) sp->cno = len == 0 ? 0 : len - 1; LOG_CORRECT; return (v_ia(sp, vp)); } /* * v_ia -- [count]a * [count]A * Append text to the cursor position. * * PUBLIC: int v_ia __P((SCR *, VICMD *)); */ int v_ia(SCR *sp, VICMD *vp) { size_t len; u_int32_t flags; int isempty; CHAR_T *p; flags = set_txt_std(sp, vp, 0); sp->showmode = SM_APPEND; sp->lno = vp->m_start.lno; /* Move the cursor one column to the right and repaint the screen. */ if (db_eget(sp, sp->lno, &p, &len, &isempty)) { if (!isempty) return (1); len = 0; LF_SET(TXT_APPENDEOL); } else if (len) { if (len == sp->cno + 1) { sp->cno = len; LF_SET(TXT_APPENDEOL); } else ++sp->cno; } else LF_SET(TXT_APPENDEOL); return (v_txt(sp, vp, NULL, p, len, 0, OOBLNO, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags)); } /* * v_iI -- [count]I * Insert text at the first nonblank. * * PUBLIC: int v_iI __P((SCR *, VICMD *)); */ int v_iI(SCR *sp, VICMD *vp) { sp->cno = 0; if (nonblank(sp, vp->m_start.lno, &sp->cno)) return (1); LOG_CORRECT; return (v_ii(sp, vp)); } /* * v_ii -- [count]i * [count]I * Insert text at the cursor position. * * PUBLIC: int v_ii __P((SCR *, VICMD *)); */ int v_ii(SCR *sp, VICMD *vp) { size_t len; u_int32_t flags; int isempty; CHAR_T *p; flags = set_txt_std(sp, vp, 0); sp->showmode = SM_INSERT; sp->lno = vp->m_start.lno; if (db_eget(sp, sp->lno, &p, &len, &isempty)) { if (!isempty) return (1); len = 0; } if (len == 0) LF_SET(TXT_APPENDEOL); return (v_txt(sp, vp, NULL, p, len, 0, OOBLNO, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags)); } enum which { o_cmd, O_cmd }; static int io __P((SCR *, VICMD *, enum which)); /* * v_iO -- [count]O * Insert text above this line. * * PUBLIC: int v_iO __P((SCR *, VICMD *)); */ int v_iO(SCR *sp, VICMD *vp) { return (io(sp, vp, O_cmd)); } /* * v_io -- [count]o * Insert text after this line. * * PUBLIC: int v_io __P((SCR *, VICMD *)); */ int v_io(SCR *sp, VICMD *vp) { return (io(sp, vp, o_cmd)); } static int io(SCR *sp, VICMD *vp, enum which cmd) { db_recno_t ai_line, lno; size_t len; u_int32_t flags; CHAR_T *p; flags = set_txt_std(sp, vp, TXT_ADDNEWLINE | TXT_APPENDEOL); sp->showmode = SM_INSERT; if (sp->lno == 1) { if (db_last(sp, &lno)) return (1); if (lno != 0) goto insert; p = NULL; len = 0; ai_line = OOBLNO; } else { static CHAR_T nul = 0; insert: p = &nul; sp->cno = 0; LOG_CORRECT; if (cmd == O_cmd) { if (db_insert(sp, sp->lno, p, 0)) return (1); if (db_get(sp, sp->lno, DBG_FATAL, &p, &len)) return (1); ai_line = sp->lno + 1; } else { if (db_append(sp, 1, sp->lno, p, 0)) return (1); if (db_get(sp, ++sp->lno, DBG_FATAL, &p, &len)) return (1); ai_line = sp->lno - 1; } } return (v_txt(sp, vp, NULL, p, len, 0, ai_line, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags)); } /* * v_change -- [buffer][count]c[count]motion * [buffer][count]C * [buffer][count]S * Change command. * * PUBLIC: int v_change __P((SCR *, VICMD *)); */ int v_change(SCR *sp, VICMD *vp) { size_t blen, len; u_int32_t flags; int isempty, lmode, rval; CHAR_T *bp; CHAR_T *p; /* * 'c' can be combined with motion commands that set the resulting * cursor position, i.e. "cG". Clear the VM_RCM flags and make the * resulting cursor position stick, inserting text has its own rules * for cursor positioning. */ F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SET); /* * Find out if the file is empty, it's easier to handle it as a * special case. */ if (vp->m_start.lno == vp->m_stop.lno && db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (!isempty) return (1); return (v_ia(sp, vp)); } flags = set_txt_std(sp, vp, 0); sp->showmode = SM_CHANGE; /* * Move the cursor to the start of the change. Note, if autoindent * is turned on, the cc command in line mode changes from the first * *non-blank* character of the line, not the first character. And, * to make it just a bit more exciting, the initial space is handled * as auto-indent characters. */ lmode = F_ISSET(vp, VM_LMODE) ? CUT_LINEMODE : 0; if (lmode) { vp->m_start.cno = 0; if (O_ISSET(sp, O_AUTOINDENT)) { if (nonblank(sp, vp->m_start.lno, &vp->m_start.cno)) return (1); LF_SET(TXT_AICHARS); } } sp->lno = vp->m_start.lno; sp->cno = vp->m_start.cno; LOG_CORRECT; /* * If not in line mode and changing within a single line, copy the * text and overwrite it. */ if (!lmode && vp->m_start.lno == vp->m_stop.lno) { /* * !!! * Historic practice, c did not cut into the numeric buffers, * only the unnamed one. */ if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, lmode)) return (1); if (len == 0) LF_SET(TXT_APPENDEOL); LF_SET(TXT_EMARK | TXT_OVERWRITE); return (v_txt(sp, vp, &vp->m_stop, p, len, 0, OOBLNO, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags)); } /* * It's trickier if in line mode or changing over multiple lines. If * we're in line mode delete all of the lines and insert a replacement * line which the user edits. If there was leading whitespace in the * first line being changed, we copy it and use it as the replacement. * If we're not in line mode, we delete the text and start inserting. * * !!! * Copy the text. Historic practice, c did not cut into the numeric * buffers, only the unnamed one. */ if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, lmode)) return (1); /* If replacing entire lines and there's leading text. */ if (lmode && vp->m_start.cno) { /* * Get a copy of the first line changed, and copy out the * leading text. */ if (db_get(sp, vp->m_start.lno, DBG_FATAL, &p, &len)) return (1); GET_SPACE_RETW(sp, bp, blen, vp->m_start.cno); MEMMOVEW(bp, p, vp->m_start.cno); } else bp = NULL; /* Delete the text. */ if (del(sp, &vp->m_start, &vp->m_stop, lmode)) return (1); /* If replacing entire lines, insert a replacement line. */ if (lmode) { if (db_insert(sp, vp->m_start.lno, bp, vp->m_start.cno)) return (1); sp->lno = vp->m_start.lno; len = sp->cno = vp->m_start.cno; } /* Get the line we're editing. */ if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (!isempty) return (1); len = 0; } /* Check to see if we're appending to the line. */ if (vp->m_start.cno >= len) LF_SET(TXT_APPENDEOL); rval = v_txt(sp, vp, NULL, p, len, 0, OOBLNO, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags); if (bp != NULL) FREE_SPACEW(sp, bp, blen); return (rval); } /* * v_Replace -- [count]R * Overwrite multiple characters. * * PUBLIC: int v_Replace __P((SCR *, VICMD *)); */ int v_Replace(SCR *sp, VICMD *vp) { size_t len; u_int32_t flags; int isempty; CHAR_T *p; flags = set_txt_std(sp, vp, 0); sp->showmode = SM_REPLACE; if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (!isempty) return (1); len = 0; LF_SET(TXT_APPENDEOL); } else { if (len == 0) LF_SET(TXT_APPENDEOL); LF_SET(TXT_OVERWRITE | TXT_REPLACE); } vp->m_stop.lno = vp->m_start.lno; vp->m_stop.cno = len ? len - 1 : 0; return (v_txt(sp, vp, &vp->m_stop, p, len, 0, OOBLNO, F_ISSET(vp, VC_C1SET) ? vp->count : 1, flags)); } /* * v_subst -- [buffer][count]s * Substitute characters. * * PUBLIC: int v_subst __P((SCR *, VICMD *)); */ int v_subst(SCR *sp, VICMD *vp) { size_t len; u_int32_t flags; int isempty; CHAR_T *p; flags = set_txt_std(sp, vp, 0); sp->showmode = SM_CHANGE; if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (!isempty) return (1); len = 0; LF_SET(TXT_APPENDEOL); } else { if (len == 0) LF_SET(TXT_APPENDEOL); LF_SET(TXT_EMARK | TXT_OVERWRITE); } vp->m_stop.lno = vp->m_start.lno; vp->m_stop.cno = vp->m_start.cno + (F_ISSET(vp, VC_C1SET) ? vp->count - 1 : 0); if (vp->m_stop.cno > len - 1) vp->m_stop.cno = len - 1; if (p != NULL && cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, 0)) return (1); return (v_txt(sp, vp, &vp->m_stop, p, len, 0, OOBLNO, 1, flags)); } /* * set_txt_std -- * Initialize text processing flags. */ static u_int32_t set_txt_std(SCR *sp, VICMD *vp, u_int32_t flags) { LF_SET(TXT_CNTRLT | TXT_ESCAPE | TXT_MAPINPUT | TXT_RECORD | TXT_RESOLVE); if (F_ISSET(vp, VC_ISDOT)) LF_SET(TXT_REPLAY); if (O_ISSET(sp, O_ALTWERASE)) LF_SET(TXT_ALTWERASE); if (O_ISSET(sp, O_AUTOINDENT)) LF_SET(TXT_AUTOINDENT); if (O_ISSET(sp, O_BEAUTIFY)) LF_SET(TXT_BEAUTIFY); if (O_ISSET(sp, O_SHOWMATCH)) LF_SET(TXT_SHOWMATCH); if (F_ISSET(sp, SC_SCRIPT)) LF_SET(TXT_CR); if (O_ISSET(sp, O_TTYWERASE)) LF_SET(TXT_TTYWERASE); /* * !!! * Mapped keys were sometimes unaffected by the wrapmargin option * in the historic 4BSD vi. Consider the following commands, where * each is executed on an empty line, in an 80 column screen, with * the wrapmargin value set to 60. * * aABC DEF .... * :map K aABC DEF ^VKKKKK * :map K 5aABC DEF ^VK * * The first and second commands are affected by wrapmargin. The * third is not. (If the inserted text is itself longer than the * wrapmargin value, i.e. if the "ABC DEF " string is replaced by * something that's longer than 60 columns from the beginning of * the line, the first two commands behave as before, but the third * command gets fairly strange.) The problem is that people wrote * macros that depended on the third command NOT being affected by * wrapmargin, as in this gem which centers lines: * * map #c $mq81a ^V^[81^V^V|D`qld0:s/ / /g^V^M$p * * For compatibility reasons, we try and make it all work here. I * offer no hope that this is right, but it's probably pretty close. * * XXX * Once I work my courage up, this is all gonna go away. It's too * evil to survive. */ if ((O_ISSET(sp, O_WRAPLEN) || O_ISSET(sp, O_WRAPMARGIN)) && (!MAPPED_KEYS_WAITING(sp) || !F_ISSET(vp, VC_C1SET))) LF_SET(TXT_WRAPMARGIN); return (flags); } nvi-1.81.6/vi/v_left.c0100644000076400001440000001470410720065506013521 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_left.c,v 10.9 2001/06/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:32 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_left -- [count]^H, [count]h * Move left by columns. * * PUBLIC: int v_left __P((SCR *, VICMD *)); */ int v_left(SCR *sp, VICMD *vp) { db_recno_t cnt; /* * !!! * The ^H and h commands always failed in the first column. */ if (vp->m_start.cno == 0) { v_sol(sp); return (1); } /* Find the end of the range. */ cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; if (vp->m_start.cno > cnt) vp->m_stop.cno = vp->m_start.cno - cnt; else vp->m_stop.cno = 0; /* * All commands move to the end of the range. Motion commands * adjust the starting point to the character before the current * one. */ if (ISMOTION(vp)) --vp->m_start.cno; vp->m_final = vp->m_stop; return (0); } /* * v_cfirst -- [count]_ * Move to the first non-blank character in a line. * * PUBLIC: int v_cfirst __P((SCR *, VICMD *)); */ int v_cfirst(SCR *sp, VICMD *vp) { db_recno_t cnt, lno; /* * !!! * If the _ is a motion component, it makes the command a line motion * e.g. "d_" deletes the line. It also means that the cursor doesn't * move. * * The _ command never failed in the first column. */ if (ISMOTION(vp)) F_SET(vp, VM_LMODE); /* * !!! * Historically a specified count makes _ move down count - 1 * rows, so, "3_" is the same as "2j_". */ cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; if (cnt != 1) { --vp->count; return (v_down(sp, vp)); } /* * Move to the first non-blank. * * Can't just use RCM_SET_FNB, in case _ is used as the motion * component of another command. */ vp->m_stop.cno = 0; if (nonblank(sp, vp->m_stop.lno, &vp->m_stop.cno)) return (1); /* * !!! * The _ command has to fail if the file is empty and we're doing * a delete. If deleting line 1, and 0 is the first nonblank, * make the check. */ if (vp->m_stop.lno == 1 && vp->m_stop.cno == 0 && ISCMD(vp->rkp, 'd')) { if (db_last(sp, &lno)) return (1); if (lno == 0) { v_sol(sp); return (1); } } /* * Delete and non-motion commands move to the end of the range, * yank stays at the start. Ignore others. */ vp->m_final = ISMOTION(vp) && ISCMD(vp->rkp, 'y') ? vp->m_start : vp->m_stop; return (0); } /* * v_first -- ^ * Move to the first non-blank character in this line. * * PUBLIC: int v_first __P((SCR *, VICMD *)); */ int v_first(SCR *sp, VICMD *vp) { /* * !!! * Yielding to none in our quest for compatibility with every * historical blemish of vi, no matter how strange it might be, * we permit the user to enter a count and then ignore it. */ /* * Move to the first non-blank. * * Can't just use RCM_SET_FNB, in case ^ is used as the motion * component of another command. */ vp->m_stop.cno = 0; if (nonblank(sp, vp->m_stop.lno, &vp->m_stop.cno)) return (1); /* * !!! * The ^ command succeeded if used as a command when the cursor was * on the first non-blank in the line, but failed if used as a motion * component in the same situation. */ if (ISMOTION(vp) && vp->m_start.cno == vp->m_stop.cno) { v_sol(sp); return (1); } /* * If moving right, non-motion commands move to the end of the range. * Delete and yank stay at the start. Motion commands adjust the * ending point to the character before the current ending charcter. * * If moving left, all commands move to the end of the range. Motion * commands adjust the starting point to the character before the * current starting character. */ if (vp->m_start.cno < vp->m_stop.cno) if (ISMOTION(vp)) { --vp->m_stop.cno; vp->m_final = vp->m_start; } else vp->m_final = vp->m_stop; else { if (ISMOTION(vp)) --vp->m_start.cno; vp->m_final = vp->m_stop; } return (0); } /* * v_ncol -- [count]| * Move to column count or the first column on this line. If the * requested column is past EOL, move to EOL. The nasty part is * that we have to know character column widths to make this work. * * PUBLIC: int v_ncol __P((SCR *, VICMD *)); */ int v_ncol(SCR *sp, VICMD *vp) { if (F_ISSET(vp, VC_C1SET) && vp->count > 1) { --vp->count; vp->m_stop.cno = vs_colpos(sp, vp->m_start.lno, (size_t)vp->count); /* * !!! * The | command succeeded if used as a command and the cursor * didn't move, but failed if used as a motion component in the * same situation. */ if (ISMOTION(vp) && vp->m_stop.cno == vp->m_start.cno) { v_nomove(sp); return (1); } } else { /* * !!! * The | command succeeded if used as a command in column 0 * without a count, but failed if used as a motion component * in the same situation. */ if (ISMOTION(vp) && vp->m_start.cno == 0) { v_sol(sp); return (1); } vp->m_stop.cno = 0; } /* * If moving right, non-motion commands move to the end of the range. * Delete and yank stay at the start. Motion commands adjust the * ending point to the character before the current ending charcter. * * If moving left, all commands move to the end of the range. Motion * commands adjust the starting point to the character before the * current starting character. */ if (vp->m_start.cno < vp->m_stop.cno) if (ISMOTION(vp)) { --vp->m_stop.cno; vp->m_final = vp->m_start; } else vp->m_final = vp->m_stop; else { if (ISMOTION(vp)) --vp->m_start.cno; vp->m_final = vp->m_stop; } return (0); } /* * v_zero -- 0 * Move to the first column on this line. * * PUBLIC: int v_zero __P((SCR *, VICMD *)); */ int v_zero(SCR *sp, VICMD *vp) { /* * !!! * The 0 command succeeded if used as a command in the first column * but failed if used as a motion component in the same situation. */ if (ISMOTION(vp) && vp->m_start.cno == 0) { v_sol(sp); return (1); } /* * All commands move to the end of the range. Motion commands * adjust the starting point to the character before the current * one. */ vp->m_stop.cno = 0; if (ISMOTION(vp)) --vp->m_start.cno; vp->m_final = vp->m_stop; return (0); } nvi-1.81.6/vi/v_mark.c0100644000076400001440000001366110720065506013522 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_mark.c,v 10.12 2001/06/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:32 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" enum which {BQMARK, FQMARK}; static int mark __P((SCR *, VICMD *, int, enum which)); /* * v_mark -- m[a-z] * Set a mark. * * PUBLIC: int v_mark __P((SCR *, VICMD *)); */ int v_mark(SCR *sp, VICMD *vp) { return (mark_set(sp, vp->character, &vp->m_start, 1)); } /* * v_bmark -- `['`a-z] * Move to a mark. * * Moves to a mark, setting both row and column. * * !!! * Although not commonly known, the "'`" and "'`" forms are historically * valid. The behavior is determined by the first character, so "`'" is * the same as "``". Remember this fact -- you'll be amazed at how many * people don't know it and will be delighted that you are able to tell * them. * * PUBLIC: int v_bmark __P((SCR *, VICMD *)); */ int v_bmark(SCR *sp, VICMD *vp) { return (mark(sp, vp, 1, BQMARK)); } /* * v_fmark -- '['`a-z] * Move to a mark. * * Move to the first nonblank character of the line containing the mark. * * PUBLIC: int v_fmark __P((SCR *, VICMD *)); */ int v_fmark(SCR *sp, VICMD *vp) { return (mark(sp, vp, 1, FQMARK)); } /* * v_emark -- * Mouse mark. * * PUBLIC: int v_emark __P((SCR *, VICMD *)); */ int v_emark(SCR *sp, VICMD *vp) { SMAP *smp; smp = HMAP + vp->ev.e_lno; if (smp > TMAP) { msgq(sp, M_BERR, "320|Unknown cursor position."); return (1); } vp->m_stop.lno = smp->lno; vp->m_stop.cno = vs_colpos(sp, smp->lno, vp->ev.e_cno + (smp->soff - 1) * sp->cols); return (mark(sp, vp, 0, BQMARK)); } /* * mark -- * Mark commands. */ static int mark(SCR *sp, VICMD *vp, int getmark, enum which cmd) { dir_t dir; MARK m; size_t len; if (getmark && mark_get(sp, vp->character, &vp->m_stop, M_BERR)) return (1); /* * !!! * Historically, BQMARKS for character positions that no longer * existed acted as FQMARKS. * * FQMARKS move to the first non-blank. */ switch (cmd) { case BQMARK: if (db_get(sp, vp->m_stop.lno, DBG_FATAL, NULL, &len)) return (1); if (vp->m_stop.cno < len || vp->m_stop.cno == len && len == 0) break; if (ISMOTION(vp)) F_SET(vp, VM_LMODE); cmd = FQMARK; /* FALLTHROUGH */ case FQMARK: vp->m_stop.cno = 0; if (nonblank(sp, vp->m_stop.lno, &vp->m_stop.cno)) return (1); break; default: abort(); } /* Non-motion commands move to the end of the range. */ if (!ISMOTION(vp)) { vp->m_final = vp->m_stop; return (0); } /* * !!! * If a motion component to a BQMARK, the cursor has to move. */ if (cmd == BQMARK && vp->m_stop.lno == vp->m_start.lno && vp->m_stop.cno == vp->m_start.cno) { v_nomove(sp); return (1); } /* * If the motion is in the reverse direction, switch the start and * stop MARK's so that it's in a forward direction. (There's no * reason for this other than to make the tests below easier. The * code in vi.c:vi() would have done the switch.) Both forward * and backward motions can happen for any kind of search command. */ if (vp->m_start.lno > vp->m_stop.lno || vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno > vp->m_stop.cno) { m = vp->m_start; vp->m_start = vp->m_stop; vp->m_stop = m; dir = BACKWARD; } else dir = FORWARD; /* * Yank cursor motion, when associated with marks as motion commands, * historically behaved as follows: * * ` motion ' motion * Line change? Line change? * Y N Y N * -------------- --------------- * FORWARD: | NM NM | NM NM * | | * BACKWARD: | M M | M NM(1) * * where NM means the cursor didn't move, and M means the cursor * moved to the mark. * * As the cursor was usually moved for yank commands associated * with backward motions, this implementation regularizes it by * changing the NM at position (1) to be an M. This makes mark * motions match search motions, which is probably A Good Thing. * * Delete cursor motion was always to the start of the text region, * regardless. Ignore other motion commands. */ #ifdef HISTORICAL_PRACTICE if (ISCMD(vp->rkp, 'y')) { if ((cmd == BQMARK || cmd == FQMARK && vp->m_start.lno != vp->m_stop.lno) && (vp->m_start.lno > vp->m_stop.lno || vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno > vp->m_stop.cno)) vp->m_final = vp->m_stop; } else if (ISCMD(vp->rkp, 'd')) if (vp->m_start.lno > vp->m_stop.lno || vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno > vp->m_stop.cno) vp->m_final = vp->m_stop; #else vp->m_final = vp->m_start; #endif /* * Forward marks are always line oriented, and it's set in the * vcmd.c table. */ if (cmd == FQMARK) return (0); /* * BQMARK'S moving backward and starting at column 0, and ones moving * forward and ending at column 0 are corrected to the last column of * the previous line. Otherwise, adjust the starting/ending point to * the character before the current one (this is safe because we know * the search had to move to succeed). * * Mark motions become line mode opertions if they start at the first * nonblank and end at column 0 of another line. */ if (vp->m_start.lno < vp->m_stop.lno && vp->m_stop.cno == 0) { if (db_get(sp, --vp->m_stop.lno, DBG_FATAL, NULL, &len)) return (1); vp->m_stop.cno = len ? len - 1 : 0; len = 0; if (nonblank(sp, vp->m_start.lno, &len)) return (1); if (vp->m_start.cno <= len) F_SET(vp, VM_LMODE); } else --vp->m_stop.cno; return (0); } nvi-1.81.6/vi/v_match.c0100644000076400001440000000720410720065506013660 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_match.c,v 10.10 2001/06/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:32 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_match -- % * Search to matching character. * * PUBLIC: int v_match __P((SCR *, VICMD *)); */ int v_match(SCR *sp, VICMD *vp) { VCS cs; MARK *mp; size_t cno, len, off; int cnt, isempty, matchc, startc, (*gc)__P((SCR *, VCS *)); CHAR_T *p; /* * !!! * Historic practice; ignore the count. * * !!! * Historical practice was to search for the initial character in the * forward direction only. */ if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (isempty) goto nomatch; return (1); } for (off = vp->m_start.cno;; ++off) { if (off >= len) { nomatch: msgq(sp, M_BERR, "184|No match character on this line"); return (1); } switch (startc = p[off]) { case '(': matchc = ')'; gc = cs_next; break; case ')': matchc = '('; gc = cs_prev; break; case '[': matchc = ']'; gc = cs_next; break; case ']': matchc = '['; gc = cs_prev; break; case '{': matchc = '}'; gc = cs_next; break; case '}': matchc = '{'; gc = cs_prev; break; case '<': matchc = '>'; gc = cs_next; break; case '>': matchc = '<'; gc = cs_prev; break; default: continue; } break; } cs.cs_lno = vp->m_start.lno; cs.cs_cno = off; if (cs_init(sp, &cs)) return (1); for (cnt = 1;;) { if (gc(sp, &cs)) return (1); if (cs.cs_flags != 0) { if (cs.cs_flags == CS_EOF || cs.cs_flags == CS_SOF) break; continue; } if (cs.cs_ch == startc) ++cnt; else if (cs.cs_ch == matchc && --cnt == 0) break; } if (cnt) { msgq(sp, M_BERR, "185|Matching character not found"); return (1); } vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; /* * If moving right, non-motion commands move to the end of the range. * Delete and yank stay at the start. * * If moving left, all commands move to the end of the range. * * !!! * Don't correct for leftward movement -- historic vi deleted the * starting cursor position when deleting to a match. */ if (vp->m_start.lno < vp->m_stop.lno || vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno < vp->m_stop.cno) vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; else vp->m_final = vp->m_stop; /* * !!! * If the motion is across lines, and the earliest cursor position * is at or before any non-blank characters in the line, i.e. the * movement is cutting all of the line's text, and the later cursor * position has nothing other than whitespace characters between it * and the end of its line, the buffer is in line mode. */ if (!ISMOTION(vp) || vp->m_start.lno == vp->m_stop.lno) return (0); mp = vp->m_start.lno < vp->m_stop.lno ? &vp->m_start : &vp->m_stop; if (mp->cno != 0) { cno = 0; if (nonblank(sp, mp->lno, &cno)) return (1); if (cno < mp->cno) return (0); } mp = vp->m_start.lno < vp->m_stop.lno ? &vp->m_stop : &vp->m_start; if (db_get(sp, mp->lno, DBG_FATAL, &p, &len)) return (1); for (p += mp->cno + 1, len -= mp->cno; --len; ++p) if (!isblank(*p)) return (0); F_SET(vp, VM_LMODE); return (0); } nvi-1.81.6/vi/v_paragraph.c0100644000076400001440000002002710720065506014527 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_paragraph.c,v 10.10 2001/06/25 15:19:32 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:32 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" #define INTEXT_CHECK { \ if (len == 0 || v_isempty(p, len)) { \ if (!--cnt) \ goto found; \ pstate = P_INBLANK; \ } \ /* \ * !!! \ * Historic documentation (USD:15-11, 4.2) said that formfeed \ * characters (^L) in the first column delimited paragraphs. \ * The historic vi code mentions formfeed characters, but never \ * implements them. It seems reasonable, do it. \ */ \ if (p[0] == '\014') { \ if (!--cnt) \ goto found; \ continue; \ } \ if (p[0] != '.' || len < 2) \ continue; \ for (lp = VIP(sp)->ps; *lp != '\0'; lp += 2) \ if (lp[0] == p[1] && \ (lp[1] == ' ' && len == 2 || lp[1] == p[2]) && \ !--cnt) \ goto found; \ } /* * v_paragraphf -- [count]} * Move forward count paragraphs. * * Paragraphs are empty lines after text, formfeed characters, or values * from the paragraph or section options. * * PUBLIC: int v_paragraphf __P((SCR *, VICMD *)); */ int v_paragraphf(SCR *sp, VICMD *vp) { enum { P_INTEXT, P_INBLANK } pstate; size_t lastlen, len; db_recno_t cnt, lastlno, lno; int isempty; CHAR_T *p; char *lp; /* * !!! * If the starting cursor position is at or before any non-blank * characters in the line, i.e. the movement is cutting all of the * line's text, the buffer is in line mode. It's a lot easier to * check here, because we know that the end is going to be the start * or end of a line. * * This was historical practice in vi, with a single exception. If * the paragraph movement was from the start of the last line to EOF, * then all the characters were deleted from the last line, but the * line itself remained. If somebody complains, don't pause, don't * hesitate, just hit them. */ if (ISMOTION(vp)) if (vp->m_start.cno == 0) F_SET(vp, VM_LMODE); else { vp->m_stop = vp->m_start; vp->m_stop.cno = 0; if (nonblank(sp, vp->m_stop.lno, &vp->m_stop.cno)) return (1); if (vp->m_start.cno <= vp->m_stop.cno) F_SET(vp, VM_LMODE); } /* Figure out what state we're currently in. */ lno = vp->m_start.lno; if (db_get(sp, lno, 0, &p, &len)) goto eof; /* * If we start in text, we want to switch states * (2 * N - 1) times, in non-text, (2 * N) times. */ cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt *= 2; if (len == 0 || v_isempty(p, len)) pstate = P_INBLANK; else { --cnt; pstate = P_INTEXT; } for (;;) { lastlno = lno; lastlen = len; if (db_get(sp, ++lno, 0, &p, &len)) goto eof; switch (pstate) { case P_INTEXT: INTEXT_CHECK; break; case P_INBLANK: if (len == 0 || v_isempty(p, len)) break; if (--cnt) { pstate = P_INTEXT; break; } /* * !!! * Non-motion commands move to the end of the range, * delete and yank stay at the start. Ignore others. * Adjust the end of the range for motion commands; * historically, a motion component was to the end of * the previous line, whereas the movement command was * to the start of the new "paragraph". */ found: if (ISMOTION(vp)) { vp->m_stop.lno = lastlno; vp->m_stop.cno = lastlen ? lastlen - 1 : 0; vp->m_final = vp->m_start; } else { vp->m_stop.lno = lno; vp->m_stop.cno = 0; vp->m_final = vp->m_stop; } return (0); default: abort(); } } /* * !!! * Adjust end of the range for motion commands; EOF is a movement * sink. The } command historically moved to the end of the last * line, not the beginning, from any position before the end of the * last line. It also historically worked on empty files, so we * have to make it okay. */ eof: if (vp->m_start.lno == lno || vp->m_start.lno == lno - 1) { if (db_eget(sp, vp->m_start.lno, &p, &len, &isempty)) { if (!isempty) return (1); vp->m_start.cno = 0; return (0); } if (vp->m_start.cno == (len ? len - 1 : 0)) { v_eof(sp, NULL); return (1); } } /* * !!! * Non-motion commands move to the end of the range, delete * and yank stay at the start. Ignore others. * * If deleting the line (which happens if deleting to EOF), then * cursor movement is to the first nonblank. */ if (ISMOTION(vp) && ISCMD(vp->rkp, 'd')) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SETFNB); } vp->m_stop.lno = lno - 1; vp->m_stop.cno = len ? len - 1 : 0; vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } /* * v_paragraphb -- [count]{ * Move backward count paragraphs. * * PUBLIC: int v_paragraphb __P((SCR *, VICMD *)); */ int v_paragraphb(SCR *sp, VICMD *vp) { enum { P_INTEXT, P_INBLANK } pstate; size_t len; db_recno_t cnt, lno; CHAR_T *p; char *lp; /* * !!! * Check for SOF. The historic vi didn't complain if users hit SOF * repeatedly, unless it was part of a motion command. There is no * question but that Emerson's editor of choice was vi. * * The { command historically moved to the beginning of the first * line if invoked on the first line. * * !!! * If the starting cursor position is in the first column (backward * paragraph movements did NOT historically pay attention to non-blank * characters) i.e. the movement is cutting the entire line, the buffer * is in line mode. Cuts from the beginning of the line also did not * cut the current line, but started at the previous EOL. * * Correct for a left motion component while we're thinking about it. */ lno = vp->m_start.lno; if (ISMOTION(vp)) if (vp->m_start.cno == 0) { if (vp->m_start.lno == 1) { v_sof(sp, &vp->m_start); return (1); } else --vp->m_start.lno; F_SET(vp, VM_LMODE); } else --vp->m_start.cno; if (vp->m_start.lno <= 1) goto sof; /* Figure out what state we're currently in. */ if (db_get(sp, lno, 0, &p, &len)) goto sof; /* * If we start in text, we want to switch states * (2 * N - 1) times, in non-text, (2 * N) times. */ cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt *= 2; if (len == 0 || v_isempty(p, len)) pstate = P_INBLANK; else { --cnt; pstate = P_INTEXT; /* * !!! * If the starting cursor is past the first column, * the current line is checked for a paragraph. */ if (vp->m_start.cno > 0) ++lno; } for (;;) { if (db_get(sp, --lno, 0, &p, &len)) goto sof; switch (pstate) { case P_INTEXT: INTEXT_CHECK; break; case P_INBLANK: if (len != 0 && !v_isempty(p, len)) { if (!--cnt) goto found; pstate = P_INTEXT; } break; default: abort(); } } /* SOF is a movement sink. */ sof: lno = 1; found: vp->m_stop.lno = lno; vp->m_stop.cno = 0; /* * All commands move to the end of the range. (We already * adjusted the start of the range for motion commands). */ vp->m_final = vp->m_stop; return (0); } /* * v_buildps -- * Build the paragraph command search pattern. * * PUBLIC: int v_buildps __P((SCR *, char *, char *)); */ int v_buildps(SCR *sp, char *p_p, char *s_p) { VI_PRIVATE *vip; size_t p_len, s_len; char *p; /* * The vi paragraph command searches for either a paragraph or * section option macro. */ p_len = p_p == NULL ? 0 : strlen(p_p); s_len = s_p == NULL ? 0 : strlen(s_p); if (p_len == 0 && s_len == 0) return (0); MALLOC_RET(sp, p, char *, p_len + s_len + 1); vip = VIP(sp); if (vip->ps != NULL) free(vip->ps); if (p_p != NULL) memmove(p, p_p, p_len + 1); if (s_p != NULL) memmove(p + p_len, s_p, s_len + 1); vip->ps = p; return (0); } nvi-1.81.6/vi/v_put.c0100644000076400001440000000576310720065506013404 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_put.c,v 10.6 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static void inc_buf __P((SCR *, VICMD *)); /* * v_Put -- [buffer]P * Insert the contents of the buffer before the cursor. * * PUBLIC: int v_Put __P((SCR *, VICMD *)); */ int v_Put(SCR *sp, VICMD *vp) { u_long cnt; if (F_ISSET(vp, VC_ISDOT)) inc_buf(sp, vp); /* * !!! * Historic vi did not support a count with the 'p' and 'P' * commands. It's useful, so we do. */ for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { if (put(sp, NULL, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_final, 0)) return (1); vp->m_start = vp->m_final; if (INTERRUPTED(sp)) return (1); } return (0); } /* * v_put -- [buffer]p * Insert the contents of the buffer after the cursor. * * PUBLIC: int v_put __P((SCR *, VICMD *)); */ int v_put(SCR *sp, VICMD *vp) { u_long cnt; if (F_ISSET(vp, VC_ISDOT)) inc_buf(sp, vp); /* * !!! * Historic vi did not support a count with the 'p' and 'P' * commands. It's useful, so we do. */ for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt--;) { if (put(sp, NULL, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_final, 1)) return (1); vp->m_start = vp->m_final; if (INTERRUPTED(sp)) return (1); } return (0); } /* * !!! * Historical whackadoo. The dot command `puts' the numbered buffer * after the last one put. For example, `"4p.' would put buffer #4 * and buffer #5. If the user continued to enter '.', the #9 buffer * would be repeatedly output. This was not documented, and is a bit * tricky to reconstruct. Historical versions of vi also dropped the * contents of the default buffer after each put, so after `"4p' the * default buffer would be empty. This makes no sense to me, so we * don't bother. Don't assume sequential order of numeric characters. * * And, if that weren't exciting enough, failed commands don't normally * set the dot command. Well, boys and girls, an exception is that * the buffer increment gets done regardless of the success of the put. */ static void inc_buf(SCR *sp, VICMD *vp) { CHAR_T v; switch (vp->buffer) { case '1': v = '2'; break; case '2': v = '3'; break; case '3': v = '4'; break; case '4': v = '5'; break; case '5': v = '6'; break; case '6': v = '7'; break; case '7': v = '8'; break; case '8': v = '9'; break; default: return; } VIP(sp)->sdot.buffer = vp->buffer = v; } nvi-1.81.6/vi/v_redraw.c0100644000076400001440000000143410720065506014047 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_redraw.c,v 10.7 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_redraw -- ^L, ^R * Redraw the screen. * * PUBLIC: int v_redraw __P((SCR *, VICMD *)); */ int v_redraw(SCR *sp, VICMD *vp) { return (sp->gp->scr_refresh(sp, 1)); } nvi-1.81.6/vi/v_replace.c0100644000076400001440000001275410720065506014205 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_replace.c,v 10.24 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_replace -- [count]r * * !!! * The r command in historic vi was almost beautiful in its badness. For * example, "r" and "r" beeped the terminal and deleted * a single character. "Nr", where N was greater than 1, * inserted a single carriage return. "r" did cancel the command, * but "r" erased a single character. To enter a literal * character, it required three characters after the * command. This may not be right, but at least it's not insane. * * PUBLIC: int v_replace __P((SCR *, VICMD *)); */ int v_replace(SCR *sp, VICMD *vp) { EVENT ev; VI_PRIVATE *vip; TEXT *tp; size_t blen, len; u_long cnt; int quote, rval; CHAR_T *bp; CHAR_T *p; vip = VIP(sp); /* * If the line doesn't exist, or it's empty, replacement isn't * allowed. It's not hard to implement, but: * * 1: It's historic practice (vi beeped before the replacement * character was even entered). * 2: For consistency, this change would require that the more * general case, "Nr", when the user is < N characters from * the end of the line, also work, which would be a bit odd. * 3: Replacing with a has somewhat odd semantics. */ if (db_get(sp, vp->m_start.lno, DBG_FATAL, &p, &len)) return (1); if (len == 0) { msgq(sp, M_BERR, "186|No characters to replace"); return (1); } /* * Figure out how many characters to be replace. For no particular * reason (other than that the semantics of replacing the newline * are confusing) only permit the replacement of the characters in * the current line. I suppose we could append replacement characters * to the line, but I see no compelling reason to do so. Check this * before we get the character to match historic practice, where Nr * failed immediately if there were less than N characters from the * cursor to the end of the line. */ cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; vp->m_stop.lno = vp->m_start.lno; vp->m_stop.cno = vp->m_start.cno + cnt - 1; if (vp->m_stop.cno > len - 1) { v_eol(sp, &vp->m_start); return (1); } /* * If it's not a repeat, reset the current mode and get a replacement * character. */ quote = 0; if (!F_ISSET(vp, VC_ISDOT)) { sp->showmode = SM_REPLACE; if (vs_refresh(sp, 0)) return (1); next: if (v_event_get(sp, &ev, 0, 0)) return (1); switch (ev.e_event) { case E_CHARACTER: /* * means escape the next character. * means they changed their minds. */ if (!quote) { if (ev.e_value == K_VLNEXT) { quote = 1; goto next; } if (ev.e_value == K_ESCAPE) return (0); } vip->rlast = ev.e_c; vip->rvalue = ev.e_value; break; case E_ERR: case E_EOF: F_SET(sp, SC_EXIT_FORCE); return (1); case E_INTERRUPT: /* means they changed their minds. */ return (0); case E_WRESIZE: /* interrupts the input mode. */ v_emsg(sp, NULL, VIM_WRESIZE); return (0); case E_REPAINT: if (v_erepaint(sp, &ev)) return (1); goto next; default: v_event_err(sp, &ev); return (0); } } /* Copy the line. */ GET_SPACE_RETW(sp, bp, blen, len); MEMMOVE(bp, p, len); p = bp; /* * Versions of nvi before 1.57 created N new lines when they replaced * N characters with or characters. This * is different from the historic vi, which replaced N characters with * a single new line. Users complained, so we match historic practice. */ if (!quote && vip->rvalue == K_CR || vip->rvalue == K_NL) { /* Set return line. */ vp->m_stop.lno = vp->m_start.lno + 1; vp->m_stop.cno = 0; /* The first part of the current line. */ if (db_set(sp, vp->m_start.lno, p, vp->m_start.cno)) goto err_ret; /* * The rest of the current line. And, of course, now it gets * tricky. If there are characters left in the line and if * the autoindent edit option is set, white space after the * replaced character is discarded, autoindent is applied, and * the cursor moves to the last indent character. */ p += vp->m_start.cno + cnt; len -= vp->m_start.cno + cnt; if (len != 0 && O_ISSET(sp, O_AUTOINDENT)) for (; len && isblank(*p); --len, ++p); if ((tp = text_init(sp, p, len, len)) == NULL) goto err_ret; if (len != 0 && O_ISSET(sp, O_AUTOINDENT)) { if (v_txt_auto(sp, vp->m_start.lno, NULL, 0, tp)) goto err_ret; vp->m_stop.cno = tp->ai ? tp->ai - 1 : 0; } else vp->m_stop.cno = 0; vp->m_stop.cno = tp->ai ? tp->ai - 1 : 0; if (db_append(sp, 1, vp->m_start.lno, tp->lb, tp->len)) err_ret: rval = 1; else { text_free(tp); rval = 0; } } else { STRSET(bp + vp->m_start.cno, vip->rlast, cnt); rval = db_set(sp, vp->m_start.lno, bp, len); } FREE_SPACEW(sp, bp, blen); vp->m_final = vp->m_stop; return (rval); } nvi-1.81.6/vi/v_right.c0100644000076400001440000000627610720065506013711 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_right.c,v 10.8 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_right -- [count]' ', [count]l * Move right by columns. * * PUBLIC: int v_right __P((SCR *, VICMD *)); */ int v_right(SCR *sp, VICMD *vp) { size_t len; int isempty; if (db_eget(sp, vp->m_start.lno, NULL, &len, &isempty)) { if (isempty) goto eol; return (1); } /* It's always illegal to move right on empty lines. */ if (len == 0) { eol: v_eol(sp, NULL); return (1); } /* * Non-motion commands move to the end of the range. Delete and * yank stay at the start. Ignore others. Adjust the end of the * range for motion commands. * * !!! * Historically, "[cdsy]l" worked at the end of a line. Also, * EOL is a count sink. */ vp->m_stop.cno = vp->m_start.cno + (F_ISSET(vp, VC_C1SET) ? vp->count : 1); if (vp->m_start.cno == len - 1 && !ISMOTION(vp)) { v_eol(sp, NULL); return (1); } if (vp->m_stop.cno >= len) { vp->m_stop.cno = len - 1; vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; } else if (ISMOTION(vp)) { --vp->m_stop.cno; vp->m_final = vp->m_start; } else vp->m_final = vp->m_stop; return (0); } /* * v_dollar -- [count]$ * Move to the last column. * * PUBLIC: int v_dollar __P((SCR *, VICMD *)); */ int v_dollar(SCR *sp, VICMD *vp) { size_t len; int isempty; /* * !!! * A count moves down count - 1 rows, so, "3$" is the same as "2j$". */ if ((F_ISSET(vp, VC_C1SET) ? vp->count : 1) != 1) { /* * !!! * Historically, if the $ is a motion, and deleting from * at or before the first non-blank of the line, it's a * line motion, and the line motion flag is set. */ vp->m_stop.cno = 0; if (nonblank(sp, vp->m_start.lno, &vp->m_stop.cno)) return (1); if (ISMOTION(vp) && vp->m_start.cno <= vp->m_stop.cno) F_SET(vp, VM_LMODE); --vp->count; if (v_down(sp, vp)) return (1); } /* * !!! * Historically, it was illegal to use $ as a motion command on * an empty line. Unfortunately, even though C was historically * aliased to c$, it (and not c$) was special cased to work on * empty lines. Since we alias C to c$ too, we have a problem. * To fix it, we let c$ go through, on the assumption that it's * not a problem for it to work. */ if (db_eget(sp, vp->m_stop.lno, NULL, &len, &isempty)) { if (!isempty) return (1); len = 0; } if (len == 0) { if (ISMOTION(vp) && !ISCMD(vp->rkp, 'c')) { v_eol(sp, NULL); return (1); } return (0); } /* * Non-motion commands move to the end of the range. Delete * and yank stay at the start. Ignore others. */ vp->m_stop.cno = len ? len - 1 : 0; vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } nvi-1.81.6/vi/v_screen.c0100644000076400001440000000302310720065506014036 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_screen.c,v 10.12 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_screen -- ^W * Switch screens. * * PUBLIC: int v_screen __P((SCR *, VICMD *)); */ int v_screen(SCR *sp, VICMD *vp) { /* * You can't leave a colon command-line edit window -- it's not that * it won't work, but it gets real weird, real fast when you execute * a colon command out of a window that was forked from a window that's * now backgrounded... You get the idea. */ if (F_ISSET(sp, SC_COMEDIT)) { msgq(sp, M_ERR, "308|Enter to execute a command, :q to exit"); return (1); } /* * Try for the next lower screen, or, go back to the first * screen on the stack. */ if (sp->q.cqe_next != (void *)&sp->wp->scrq) sp->nextdisp = sp->q.cqe_next; else if (sp->wp->scrq.cqh_first == sp) { msgq(sp, M_ERR, "187|No other screen to switch to"); return (1); } else sp->nextdisp = sp->wp->scrq.cqh_first; F_SET(sp->nextdisp, SC_STATUS); F_SET(sp, SC_SSWITCH | SC_STATUS); return (0); } nvi-1.81.6/vi/v_scroll.c0100644000076400001440000002752610720065506014073 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_scroll.c,v 10.12 2001/06/25 15:19:34 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:34 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static void goto_adjust __P((VICMD *)); /* * The historic vi had a problem in that all movements were by physical * lines, not by logical, or screen lines. Arguments can be made that this * is the right thing to do. For example, single line movements, such as * 'j' or 'k', should probably work on physical lines. Commands like "dj", * or "j.", where '.' is a change command, make more sense for physical lines * than they do for logical lines. * * These arguments, however, don't apply to scrolling commands like ^D and * ^F -- if the window is fairly small, using physical lines can result in * a half-page scroll repainting the entire screen, which is not what the * user wanted. Second, if the line is larger than the screen, using physical * lines can make it impossible to display parts of the line -- there aren't * any commands that don't display the beginning of the line in historic vi, * and if both the beginning and end of the line can't be on the screen at * the same time, you lose. This is even worse in the case of the H, L, and * M commands -- for large lines, they may all refer to the same line and * will result in no movement at all. * * Another issue is that page and half-page scrolling commands historically * moved to the first non-blank character in the new line. If the line is * approximately the same size as the screen, this loses because the cursor * before and after a ^D, may refer to the same location on the screen. In * this implementation, scrolling commands set the cursor to the first non- * blank character if the line changes because of the scroll. Otherwise, * the cursor is left alone. * * This implementation does the scrolling (^B, ^D, ^F, ^U, ^Y, ^E), and the * cursor positioning commands (H, L, M) commands using logical lines, not * physical. */ /* * v_lgoto -- [count]G * Go to first non-blank character of the line count, the last line * of the file by default. * * PUBLIC: int v_lgoto __P((SCR *, VICMD *)); */ int v_lgoto(SCR *sp, VICMD *vp) { db_recno_t nlines; if (F_ISSET(vp, VC_C1SET)) { if (!db_exist(sp, vp->count)) { /* * !!! * Historically, 1G was legal in an empty file. */ if (vp->count == 1) { if (db_last(sp, &nlines)) return (1); if (nlines == 0) return (0); } v_eof(sp, &vp->m_start); return (1); } vp->m_stop.lno = vp->count; } else { if (db_last(sp, &nlines)) return (1); vp->m_stop.lno = nlines ? nlines : 1; } goto_adjust(vp); return (0); } /* * v_home -- [count]H * Move to the first non-blank character of the logical line * count - 1 from the top of the screen, 0 by default. * * PUBLIC: int v_home __P((SCR *, VICMD *)); */ int v_home(SCR *sp, VICMD *vp) { if (vs_sm_position(sp, &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count - 1 : 0, P_TOP)) return (1); goto_adjust(vp); return (0); } /* * v_middle -- M * Move to the first non-blank character of the logical line * in the middle of the screen. * * PUBLIC: int v_middle __P((SCR *, VICMD *)); */ int v_middle(SCR *sp, VICMD *vp) { /* * Yielding to none in our quest for compatibility with every * historical blemish of vi, no matter how strange it might be, * we permit the user to enter a count and then ignore it. */ if (vs_sm_position(sp, &vp->m_stop, 0, P_MIDDLE)) return (1); goto_adjust(vp); return (0); } /* * v_bottom -- [count]L * Move to the first non-blank character of the logical line * count - 1 from the bottom of the screen, 0 by default. * * PUBLIC: int v_bottom __P((SCR *, VICMD *)); */ int v_bottom(SCR *sp, VICMD *vp) { if (vs_sm_position(sp, &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count - 1 : 0, P_BOTTOM)) return (1); goto_adjust(vp); return (0); } static void goto_adjust(VICMD *vp) { /* Guess that it's the end of the range. */ vp->m_final = vp->m_stop; /* * Non-motion commands move the cursor to the end of the range, and * then to the NEXT nonblank of the line. Historic vi always moved * to the first nonblank in the line; since the H, M, and L commands * are logical motions in this implementation, we do the next nonblank * so that it looks approximately the same to the user. To make this * happen, the VM_RCM_SETNNB flag is set in the vcmd.c command table. * * If it's a motion, it's more complicated. The best possible solution * is probably to display the first nonblank of the line the cursor * will eventually rest on. This is tricky, particularly given that if * the associated command is a delete, we don't yet know what line that * will be. So, we clear the VM_RCM_SETNNB flag, and set the first * nonblank flag (VM_RCM_SETFNB). Note, if the lines are sufficiently * long, this can cause the cursor to warp out of the screen. It's too * hard to fix. * * XXX * The G command is always first nonblank, so it's okay to reset it. */ if (ISMOTION(vp)) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SETFNB); } else return; /* * If moving backward in the file, delete and yank move to the end * of the range, unless the line didn't change, in which case yank * doesn't move. If moving forward in the file, delete and yank * stay at the start of the range. Ignore others. */ if (vp->m_stop.lno < vp->m_start.lno || vp->m_stop.lno == vp->m_start.lno && vp->m_stop.cno < vp->m_start.cno) { if (ISCMD(vp->rkp, 'y') && vp->m_stop.lno == vp->m_start.lno) vp->m_final = vp->m_start; } else vp->m_final = vp->m_start; } /* * v_up -- [count]^P, [count]k, [count]- * Move up by lines. * * PUBLIC: int v_up __P((SCR *, VICMD *)); */ int v_up(SCR *sp, VICMD *vp) { db_recno_t lno; lno = F_ISSET(vp, VC_C1SET) ? vp->count : 1; if (vp->m_start.lno <= lno) { v_sof(sp, &vp->m_start); return (1); } vp->m_stop.lno = vp->m_start.lno - lno; vp->m_final = vp->m_stop; return (0); } /* * v_cr -- [count]^M * In a script window, send the line to the shell. * In a regular window, move down by lines. * * PUBLIC: int v_cr __P((SCR *, VICMD *)); */ int v_cr(SCR *sp, VICMD *vp) { /* If it's a colon command-line edit window, it's an ex command. */ if (F_ISSET(sp, SC_COMEDIT)) return (v_ecl_exec(sp)); /* If it's a script window, exec the line. */ if (F_ISSET(sp, SC_SCRIPT)) return (sscr_exec(sp, vp->m_start.lno)); /* Otherwise, it's the same as v_down(). */ return (v_down(sp, vp)); } /* * v_down -- [count]^J, [count]^N, [count]j, [count]^M, [count]+ * Move down by lines. * * PUBLIC: int v_down __P((SCR *, VICMD *)); */ int v_down(SCR *sp, VICMD *vp) { db_recno_t lno; lno = vp->m_start.lno + (F_ISSET(vp, VC_C1SET) ? vp->count : 1); if (!db_exist(sp, lno)) { v_eof(sp, &vp->m_start); return (1); } vp->m_stop.lno = lno; vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } /* * v_hpageup -- [count]^U * Page up half screens. * * PUBLIC: int v_hpageup __P((SCR *, VICMD *)); */ int v_hpageup(SCR *sp, VICMD *vp) { /* * Half screens always succeed unless already at SOF. * * !!! * Half screens set the scroll value, even if the command * ultimately failed, in historic vi. Probably a don't care. */ if (F_ISSET(vp, VC_C1SET)) sp->defscroll = vp->count; if (vs_sm_scroll(sp, &vp->m_stop, sp->defscroll, CNTRL_U)) return (1); vp->m_final = vp->m_stop; return (0); } /* * v_hpagedown -- [count]^D * Page down half screens. * * PUBLIC: int v_hpagedown __P((SCR *, VICMD *)); */ int v_hpagedown(SCR *sp, VICMD *vp) { /* * Half screens always succeed unless already at EOF. * * !!! * Half screens set the scroll value, even if the command * ultimately failed, in historic vi. Probably a don't care. */ if (F_ISSET(vp, VC_C1SET)) sp->defscroll = vp->count; if (vs_sm_scroll(sp, &vp->m_stop, sp->defscroll, CNTRL_D)) return (1); vp->m_final = vp->m_stop; return (0); } /* * v_pagedown -- [count]^F * Page down full screens. * !!! * Historic vi did not move to the EOF if the screen couldn't move, i.e. * if EOF was already displayed on the screen. This implementation does * move to EOF in that case, making ^F more like the the historic ^D. * * PUBLIC: int v_pagedown __P((SCR *, VICMD *)); */ int v_pagedown(SCR *sp, VICMD *vp) { db_recno_t offset; /* * !!! * The calculation in IEEE Std 1003.2-1992 (POSIX) is: * * top_line = top_line + count * (window - 2); * * which was historically wrong. The correct one is: * * top_line = top_line + count * window - 2; * * i.e. the two line "overlap" was only subtracted once. Which * makes no sense, but then again, an overlap makes no sense for * any screen but the "next" one anyway. We do it the historical * way as there's no good reason to change it. * * If the screen has been split horizontally, use the smaller of * the current window size and the window option value. * * It possible for this calculation to be less than 1; move at * least one line. */ offset = (F_ISSET(vp, VC_C1SET) ? vp->count : 1) * (IS_HSPLIT(sp) ? MIN(sp->t_maxrows, O_VAL(sp, O_WINDOW)) : O_VAL(sp, O_WINDOW)); offset = offset <= 2 ? 1 : offset - 2; if (vs_sm_scroll(sp, &vp->m_stop, offset, CNTRL_F)) return (1); vp->m_final = vp->m_stop; return (0); } /* * v_pageup -- [count]^B * Page up full screens. * * !!! * Historic vi did not move to the SOF if the screen couldn't move, i.e. * if SOF was already displayed on the screen. This implementation does * move to SOF in that case, making ^B more like the the historic ^U. * * PUBLIC: int v_pageup __P((SCR *, VICMD *)); */ int v_pageup(SCR *sp, VICMD *vp) { db_recno_t offset; /* * !!! * The calculation in IEEE Std 1003.2-1992 (POSIX) is: * * top_line = top_line - count * (window - 2); * * which was historically wrong. The correct one is: * * top_line = (top_line - count * window) + 2; * * A simpler expression is that, as with ^F, we scroll exactly: * * count * window - 2 * * lines. * * Bizarre. As with ^F, an overlap makes no sense for anything * but the first screen. We do it the historical way as there's * no good reason to change it. * * If the screen has been split horizontally, use the smaller of * the current window size and the window option value. * * It possible for this calculation to be less than 1; move at * least one line. */ offset = (F_ISSET(vp, VC_C1SET) ? vp->count : 1) * (IS_HSPLIT(sp) ? MIN(sp->t_maxrows, O_VAL(sp, O_WINDOW)) : O_VAL(sp, O_WINDOW)); offset = offset <= 2 ? 1 : offset - 2; if (vs_sm_scroll(sp, &vp->m_stop, offset, CNTRL_B)) return (1); vp->m_final = vp->m_stop; return (0); } /* * v_lineup -- [count]^Y * Page up by lines. * * PUBLIC: int v_lineup __P((SCR *, VICMD *)); */ int v_lineup(SCR *sp, VICMD *vp) { /* * The cursor moves down, staying with its original line, unless it * reaches the bottom of the screen. */ if (vs_sm_scroll(sp, &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count : 1, CNTRL_Y)) return (1); vp->m_final = vp->m_stop; return (0); } /* * v_linedown -- [count]^E * Page down by lines. * * PUBLIC: int v_linedown __P((SCR *, VICMD *)); */ int v_linedown(SCR *sp, VICMD *vp) { /* * The cursor moves up, staying with its original line, unless it * reaches the top of the screen. */ if (vs_sm_scroll(sp, &vp->m_stop, F_ISSET(vp, VC_C1SET) ? vp->count : 1, CNTRL_E)) return (1); vp->m_final = vp->m_stop; return (0); } nvi-1.81.6/vi/v_search.c0100644000076400001440000003272310720065506014035 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_search.c,v 10.30 2001/09/11 20:52:46 skimo Exp $ (Berkeley) $Date: 2001/09/11 20:52:46 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" #include "../ipc/ip.h" static int v_exaddr __P((SCR *, VICMD *, dir_t)); static int v_search __P((SCR *, VICMD *, CHAR_T *, size_t, u_int, dir_t)); /* * v_srch -- [count]?RE[? offset] * Ex address search backward. * * PUBLIC: int v_searchb __P((SCR *, VICMD *)); */ int v_searchb(SCR *sp, VICMD *vp) { return (v_exaddr(sp, vp, BACKWARD)); } /* * v_searchf -- [count]/RE[/ offset] * Ex address search forward. * * PUBLIC: int v_searchf __P((SCR *, VICMD *)); */ int v_searchf(SCR *sp, VICMD *vp) { return (v_exaddr(sp, vp, FORWARD)); } /* * v_exaddr -- * Do a vi search (which is really an ex address). */ static int v_exaddr(SCR *sp, VICMD *vp, dir_t dir) { static EXCMDLIST fake = { L("search") }; EXCMD *cmdp; WIN *wp; TEXT *tp; db_recno_t s_lno; size_t len, s_cno, tlen; int err, nb, type; char buf[20]; CHAR_T *cmd, *t; CHAR_T *w; size_t wlen; /* * !!! * If using the search command as a motion, any addressing components * are lost, i.e. y/ptrn/+2, when repeated, is the same as y/ptrn/. */ if (F_ISSET(vp, VC_ISDOT)) return (v_search(sp, vp, NULL, 0, SEARCH_PARSE | SEARCH_MSG | SEARCH_SET, dir)); /* Get the search pattern. */ if (v_tcmd(sp, vp, dir == BACKWARD ? CH_BSEARCH : CH_FSEARCH, TXT_BS | TXT_CR | TXT_ESCAPE | TXT_PROMPT | (O_ISSET(sp, O_SEARCHINCR) ? TXT_SEARCHINCR : 0))) return (1); tp = sp->tiq.cqh_first; /* If the user backspaced over the prompt, do nothing. */ if (tp->term == TERM_BS) return (1); /* * If the user was doing an incremental search, then we've already * updated the cursor and moved to the right location. Return the * correct values, we're done. */ if (tp->term == TERM_SEARCH) { vp->m_stop.lno = sp->lno; vp->m_stop.cno = sp->cno; if (ISMOTION(vp)) return (v_correct(sp, vp, 0)); vp->m_final = vp->m_stop; return (0); } /* * If the user entered or , the length is * 1 and the right thing will happen, i.e. the prompt will be used * as a command character. * * Build a fake ex command structure. */ wp = sp->wp; wp->excmd.cp = tp->lb; wp->excmd.clen = tp->len; F_INIT(&wp->excmd, E_VISEARCH); /* * XXX * Warn if the search wraps. This is a pretty special case, but it's * nice feature that wasn't in the original implementations of ex/vi. * (It was added at some point to System V's version.) This message * is only displayed if there are no keys in the queue. The problem is * the command is going to succeed, and the message is informational, * not an error. If a macro displays it repeatedly, e.g., the pattern * only occurs once in the file and wrapscan is set, you lose big. For * example, if the macro does something like: * * :map K /pattern/^MjK * * Each search will display the message, but the following "/pattern/" * will immediately overwrite it, with strange results. The System V * vi displays the "wrapped" message multiple times, but because it's * overwritten each time, it's not as noticeable. As we don't discard * messages, it's a real problem for us. */ if (!KEYS_WAITING(sp)) F_SET(&wp->excmd, E_SEARCH_WMSG); /* Save the current line/column. */ s_lno = sp->lno; s_cno = sp->cno; /* * !!! * Historically, vi / and ? commands were full-blown ex addresses, * including ';' delimiters, trailing 's, multiple search * strings (separated by semi-colons) and, finally, full-blown z * commands after the / and ? search strings. (If the search was * being used as a motion, the trailing z command was ignored. * Also, we do some argument checking on the z command, to be sure * that it's not some other random command.) For multiple search * strings, leading 's at the second and subsequent strings * were eaten as well. This has some (unintended?) side-effects: * the command /ptrn/;3 is legal and results in moving to line 3. * I suppose you could use it to optionally move to line 3... * * !!! * Historically, if any part of the search command failed, the cursor * remained unmodified (even if ; was used). We have to play games * because the underlying ex parser thinks we're modifying the cursor * as we go, but I think we're compatible with historic practice. * * !!! * Historically, the command "/STRING/; " failed, apparently it * confused the parser. We're not that compatible. */ cmdp = &wp->excmd; if (ex_range(sp, cmdp, &err)) return (1); /* * Remember where any remaining command information is, and clean * up the fake ex command. */ cmd = cmdp->cp; len = cmdp->clen; wp->excmd.clen = 0; if (err) goto err2; /* Copy out the new cursor position and make sure it's okay. */ switch (cmdp->addrcnt) { case 1: vp->m_stop = cmdp->addr1; break; case 2: vp->m_stop = cmdp->addr2; break; } if (!db_exist(sp, vp->m_stop.lno)) { ex_badaddr(sp, &fake, vp->m_stop.lno == 0 ? A_ZERO : A_EOF, NUM_OK); goto err2; } /* * !!! * Historic practice is that a trailing 'z' was ignored if it was a * motion command. Should probably be an error, but not worth the * effort. */ if (ISMOTION(vp)) return (v_correct(sp, vp, F_ISSET(cmdp, E_DELTA))); /* * !!! * Historically, if it wasn't a motion command, a delta in the search * pattern turns it into a first nonblank movement. */ nb = F_ISSET(cmdp, E_DELTA); /* Check for the 'z' command. */ if (len != 0) { if (*cmd != 'z') goto err1; /* No blanks, just like the z command. */ for (t = cmd + 1, tlen = len - 1; tlen > 0; ++t, --tlen) if (!isdigit(*t)) break; if (tlen && (*t == '-' || *t == '.' || *t == '+' || *t == '^')) { ++t; --tlen; type = 1; } else type = 0; if (tlen) goto err1; /* The z command will do the nonblank for us. */ nb = 0; /* Default to z+. */ if (!type && v_event_push(sp, NULL, L("+"), 1, CH_NOMAP | CH_QUOTED)) return (1); /* Push the user's command. */ if (v_event_push(sp, NULL, cmd, len, CH_NOMAP | CH_QUOTED)) return (1); /* Push line number so get correct z display. */ tlen = snprintf(buf, sizeof(buf), "%lu", (u_long)vp->m_stop.lno); CHAR2INT(sp, buf, tlen, w, wlen); if (v_event_push(sp, NULL, w, wlen, CH_NOMAP | CH_QUOTED)) return (1); /* Don't refresh until after 'z' happens. */ F_SET(VIP(sp), VIP_S_REFRESH); } /* Non-motion commands move to the end of the range. */ vp->m_final = vp->m_stop; if (nb) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SETFNB); } return (0); err1: msgq(sp, M_ERR, "188|Characters after search string, line offset and/or z command"); err2: vp->m_final.lno = s_lno; vp->m_final.cno = s_cno; return (1); } /* * v_searchN -- N * Reverse last search. * * PUBLIC: int v_searchN __P((SCR *, VICMD *)); */ int v_searchN(SCR *sp, VICMD *vp) { dir_t dir; switch (sp->searchdir) { case BACKWARD: dir = FORWARD; break; case FORWARD: dir = BACKWARD; break; default: dir = sp->searchdir; break; } return (v_search(sp, vp, NULL, 0, SEARCH_PARSE, dir)); } /* * v_searchn -- n * Repeat last search. * * PUBLIC: int v_searchn __P((SCR *, VICMD *)); */ int v_searchn(SCR *sp, VICMD *vp) { return (v_search(sp, vp, NULL, 0, SEARCH_PARSE, sp->searchdir)); } /* * v_searchw -- [count]^A * Search for the word under the cursor. * * PUBLIC: int v_searchw __P((SCR *, VICMD *)); */ int v_searchw(SCR *sp, VICMD *vp) { size_t blen, len; int rval; CHAR_T *bp, *p; len = VIP(sp)->klen + RE_WSTART_LEN + RE_WSTOP_LEN; GET_SPACE_RETW(sp, bp, blen, len); MEMCPY(bp, RE_WSTART, RE_WSTART_LEN); p = bp + RE_WSTART_LEN; MEMCPY(p, VIP(sp)->keyw, VIP(sp)->klen); p += VIP(sp)->klen; MEMCPY(p, RE_WSTOP, RE_WSTOP_LEN); rval = v_search(sp, vp, bp, len, SEARCH_SET, FORWARD); FREE_SPACEW(sp, bp, blen); return (rval); } /* * v_esearch -- * Search command from the screen. * * PUBLIC: int v_esearch __P((SCR *, VICMD *)); */ int v_esearch(SCR *sp, VICMD *vp) { MARK m; int flags; m.lno = sp->lno; m.cno = sp->cno; LF_INIT(SEARCH_NOOPT); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_EXT)) LF_SET(SEARCH_EXTEND); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_IC)) LF_SET(SEARCH_IC); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_ICL)) LF_SET(SEARCH_ICL); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_INCR)) LF_SET(SEARCH_INCR); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_LIT)) LF_SET(SEARCH_LITERAL); if (FL_ISSET(vp->ev.e_flags, VI_SEARCH_WR)) LF_SET(SEARCH_WRAP); return (v_search(sp, vp, vp->ev.e_csp, vp->ev.e_len, flags, FL_ISSET(vp->ev.e_flags, VI_SEARCH_REV) ? BACKWARD : FORWARD)); } /* * v_search -- * The search commands. */ static int v_search(SCR *sp, VICMD *vp, CHAR_T *ptrn, size_t plen, u_int flags, dir_t dir) { /* Display messages. */ LF_SET(SEARCH_MSG); /* If it's a motion search, offset past end-of-line is okay. */ if (ISMOTION(vp)) LF_SET(SEARCH_EOL); /* * XXX * Warn if the search wraps. See the comment above, in v_exaddr(). */ if (!KEYS_WAITING(sp)) LF_SET(SEARCH_WMSG); switch (dir) { case BACKWARD: if (b_search(sp, &vp->m_start, &vp->m_stop, ptrn, plen, NULL, flags)) return (1); break; case FORWARD: if (f_search(sp, &vp->m_start, &vp->m_stop, ptrn, plen, NULL, flags)) return (1); break; case NOTSET: msgq(sp, M_ERR, "189|No previous search pattern"); return (1); default: abort(); } /* Correct motion commands, otherwise, simply move to the location. */ if (ISMOTION(vp)) { if (v_correct(sp, vp, 0)) return(1); } else vp->m_final = vp->m_stop; return (0); } /* * v_correct -- * Handle command with a search as the motion. * * !!! * Historically, commands didn't affect the line searched to/from if the * motion command was a search and the final position was the start/end * of the line. There were some special cases and vi was not consistent; * it was fairly easy to confuse it. For example, given the two lines: * * abcdefghi * ABCDEFGHI * * placing the cursor on the 'A' and doing y?$ would so confuse it that 'h' * 'k' and put would no longer work correctly. In any case, we try to do * the right thing, but it's not going to exactly match historic practice. * * PUBLIC: int v_correct __P((SCR *, VICMD *, int)); */ int v_correct(SCR *sp, VICMD *vp, int isdelta) { dir_t dir; MARK m; size_t len; /* * !!! * We may have wrapped if wrapscan was set, and we may have returned * to the position where the cursor started. Historic vi didn't cope * with this well. Yank wouldn't beep, but the first put after the * yank would move the cursor right one column (without adding any * text) and the second would put a copy of the current line. The * change and delete commands would beep, but would leave the cursor * on the colon command line. I believe that there are macros that * depend on delete, at least, failing. For now, commands that use * search as a motion component fail when the search returns to the * original cursor position. */ if (vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno == vp->m_stop.cno) { msgq(sp, M_BERR, "190|Search wrapped to original position"); return (1); } /* * !!! * Searches become line mode operations if there was a delta specified * to the search pattern. */ if (isdelta) F_SET(vp, VM_LMODE); /* * If the motion is in the reverse direction, switch the start and * stop MARK's so that it's in a forward direction. (There's no * reason for this other than to make the tests below easier. The * code in vi.c:vi() would have done the switch.) Both forward * and backward motions can happen for any kind of search command * because of the wrapscan option. */ if (vp->m_start.lno > vp->m_stop.lno || vp->m_start.lno == vp->m_stop.lno && vp->m_start.cno > vp->m_stop.cno) { m = vp->m_start; vp->m_start = vp->m_stop; vp->m_stop = m; dir = BACKWARD; } else dir = FORWARD; /* * BACKWARD: * Delete and yank commands move to the end of the range. * Ignore others. * * FORWARD: * Delete and yank commands don't move. Ignore others. */ vp->m_final = vp->m_start; /* * !!! * Delta'd searches don't correct based on column positions. */ if (isdelta) return (0); /* * !!! * Backward searches starting at column 0, and forward searches ending * at column 0 are corrected to the last column of the previous line. * Otherwise, adjust the starting/ending point to the character before * the current one (this is safe because we know the search had to move * to succeed). * * Searches become line mode operations if they start at the first * nonblank and end at column 0 of another line. */ if (vp->m_start.lno < vp->m_stop.lno && vp->m_stop.cno == 0) { if (db_get(sp, --vp->m_stop.lno, DBG_FATAL, NULL, &len)) return (1); vp->m_stop.cno = len ? len - 1 : 0; len = 0; if (nonblank(sp, vp->m_start.lno, &len)) return (1); if (vp->m_start.cno <= len) F_SET(vp, VM_LMODE); } else --vp->m_stop.cno; return (0); } nvi-1.81.6/vi/v_section.c0100644000076400001440000001460610720065506014234 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_section.c,v 10.10 2001/06/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:35 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * !!! * In historic vi, the section commands ignored empty lines, unlike the * paragraph commands, which was probably okay. However, they also moved * to the start of the last line when there where no more sections instead * of the end of the last line like the paragraph commands. I've changed * the latter behavior to match the paragraph commands. * * In historic vi, a section was defined as the first character(s) of the * line matching, which could be followed by anything. This implementation * follows that historic practice. * * !!! * The historic vi documentation (USD:15-10) claimed: * The section commands interpret a preceding count as a different * window size in which to redraw the screen at the new location, * and this window size is the base size for newly drawn windows * until another size is specified. This is very useful if you are * on a slow terminal ... * * I can't get the 4BSD vi to do this, it just beeps at me. For now, a * count to the section commands simply repeats the command. */ /* * v_sectionf -- [count]]] * Move forward count sections/functions. * * !!! * Using ]] as a motion command was a bit special, historically. It could * match } as well as the usual { and section values. If it matched a { or * a section, it did NOT include the matched line. If it matched a }, it * did include the line. No clue why. * * PUBLIC: int v_sectionf __P((SCR *, VICMD *)); */ int v_sectionf(SCR *sp, VICMD *vp) { db_recno_t cnt, lno; size_t len; CHAR_T *p; char *list, *lp; /* Get the macro list. */ if ((list = O_STR(sp, O_SECTIONS)) == NULL) return (1); /* * !!! * If the starting cursor position is at or before any non-blank * characters in the line, i.e. the movement is cutting all of the * line's text, the buffer is in line mode. It's a lot easier to * check here, because we know that the end is going to be the start * or end of a line. */ if (ISMOTION(vp)) if (vp->m_start.cno == 0) F_SET(vp, VM_LMODE); else { vp->m_stop = vp->m_start; vp->m_stop.cno = 0; if (nonblank(sp, vp->m_stop.lno, &vp->m_stop.cno)) return (1); if (vp->m_start.cno <= vp->m_stop.cno) F_SET(vp, VM_LMODE); } cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; for (lno = vp->m_start.lno; !db_get(sp, ++lno, 0, &p, &len);) { if (len == 0) continue; if (p[0] == '{' || ISMOTION(vp) && p[0] == '}') { if (!--cnt) { if (p[0] == '{') goto adjust1; goto adjust2; } continue; } /* * !!! * Historic documentation (USD:15-11, 4.2) said that formfeed * characters (^L) in the first column delimited sections. * The historic code mentions formfeed characters, but never * implements them. Seems reasonable, do it. */ if (p[0] == '\014') { if (!--cnt) goto adjust1; continue; } if (p[0] != '.' || len < 2) continue; for (lp = list; *lp != '\0'; lp += 2 * sizeof(*lp)) if (lp[0] == p[1] && (lp[1] == ' ' && len == 2 || lp[1] == p[2]) && !--cnt) { /* * !!! * If not cutting this line, adjust to the end * of the previous one. Otherwise, position to * column 0. */ adjust1: if (ISMOTION(vp)) goto ret1; adjust2: vp->m_stop.lno = lno; vp->m_stop.cno = 0; goto ret2; } } /* If moving forward, reached EOF, check to see if we started there. */ if (vp->m_start.lno == lno - 1) { v_eof(sp, NULL); return (1); } ret1: if (db_get(sp, --lno, DBG_FATAL, NULL, &len)) return (1); vp->m_stop.lno = lno; vp->m_stop.cno = len ? len - 1 : 0; /* * Non-motion commands go to the end of the range. Delete and * yank stay at the start of the range. Ignore others. */ ret2: if (ISMOTION(vp)) { vp->m_final = vp->m_start; if (F_ISSET(vp, VM_LMODE)) vp->m_final.cno = 0; } else vp->m_final = vp->m_stop; return (0); } /* * v_sectionb -- [count][[ * Move backward count sections/functions. * * PUBLIC: int v_sectionb __P((SCR *, VICMD *)); */ int v_sectionb(SCR *sp, VICMD *vp) { size_t len; db_recno_t cnt, lno; CHAR_T *p; char *list, *lp; /* An empty file or starting from line 1 is always illegal. */ if (vp->m_start.lno <= 1) { v_sof(sp, NULL); return (1); } /* Get the macro list. */ if ((list = O_STR(sp, O_SECTIONS)) == NULL) return (1); cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; for (lno = vp->m_start.lno; !db_get(sp, --lno, 0, &p, &len);) { if (len == 0) continue; if (p[0] == '{') { if (!--cnt) goto adjust1; continue; } /* * !!! * Historic documentation (USD:15-11, 4.2) said that formfeed * characters (^L) in the first column delimited sections. * The historic code mentions formfeed characters, but never * implements them. Seems reasonable, do it. */ if (p[0] == '\014') { if (!--cnt) goto adjust1; continue; } if (p[0] != '.' || len < 2) continue; for (lp = list; *lp != '\0'; lp += 2 * sizeof(*lp)) if (lp[0] == p[1] && (lp[1] == ' ' && len == 2 || lp[1] == p[2]) && !--cnt) { adjust1: vp->m_stop.lno = lno; vp->m_stop.cno = 0; goto ret1; } } /* * If moving backward, reached SOF, which is a movement sink. * We already checked for starting there. */ vp->m_stop.lno = 1; vp->m_stop.cno = 0; /* * All commands move to the end of the range. * * !!! * Historic practice is the section cut was in line mode if it started * from column 0 and was in the backward direction. Otherwise, left * motion commands adjust the starting point to the character before * the current one. What makes this worse is that if it cut to line * mode it also went to the first non-. */ ret1: if (vp->m_start.cno == 0) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SETFNB); --vp->m_start.lno; F_SET(vp, VM_LMODE); } else --vp->m_start.cno; vp->m_final = vp->m_stop; return (0); } nvi-1.81.6/vi/v_sentence.c0100644000076400001440000002060210720065506014365 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_sentence.c,v 10.9 2001/06/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:35 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * !!! * In historic vi, a sentence was delimited by a '.', '?' or '!' character * followed by TWO spaces or a newline. One or more empty lines was also * treated as a separate sentence. The Berkeley documentation for historical * vi states that any number of ')', ']', '"' and '\'' characters can be * between the delimiter character and the spaces or end of line, however, * the historical implementation did not handle additional '"' characters. * We follow the documentation here, not the implementation. * * Once again, historical vi didn't do sentence movements associated with * counts consistently, mostly in the presence of lines containing only * white-space characters. * * This implementation also permits a single tab to delimit sentences, and * treats lines containing only white-space characters as empty lines. * Finally, tabs are eaten (along with spaces) when skipping to the start * of the text following a "sentence". */ /* * v_sentencef -- [count]) * Move forward count sentences. * * PUBLIC: int v_sentencef __P((SCR *, VICMD *)); */ int v_sentencef(SCR *sp, VICMD *vp) { enum { BLANK, NONE, PERIOD } state; VCS cs; size_t len; u_long cnt; cs.cs_lno = vp->m_start.lno; cs.cs_cno = vp->m_start.cno; if (cs_init(sp, &cs)) return (1); cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; /* * !!! * If in white-space, the next start of sentence counts as one. * This may not handle " . " correctly, but it's real unclear * what correctly means in that case. */ if (cs.cs_flags == CS_EMP || cs.cs_flags == 0 && isblank(cs.cs_ch)) { if (cs_fblank(sp, &cs)) return (1); if (--cnt == 0) { if (vp->m_start.lno != cs.cs_lno || vp->m_start.cno != cs.cs_cno) goto okret; return (1); } } for (state = NONE;;) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) break; if (cs.cs_flags == CS_EOL) { if ((state == PERIOD || state == BLANK) && --cnt == 0) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == 0 && isblank(cs.cs_ch) && cs_fblank(sp, &cs)) return (1); goto okret; } state = NONE; continue; } if (cs.cs_flags == CS_EMP) { /* An EMP is two sentences. */ if (--cnt == 0) goto okret; if (cs_fblank(sp, &cs)) return (1); if (--cnt == 0) goto okret; state = NONE; continue; } switch (cs.cs_ch) { case '.': case '?': case '!': state = PERIOD; break; case ')': case ']': case '"': case '\'': if (state != PERIOD) state = NONE; break; case '\t': if (state == PERIOD) state = BLANK; /* FALLTHROUGH */ case ' ': if (state == PERIOD) { state = BLANK; break; } if (state == BLANK && --cnt == 0) { if (cs_fblank(sp, &cs)) return (1); goto okret; } /* FALLTHROUGH */ default: state = NONE; break; } } /* EOF is a movement sink, but it's an error not to have moved. */ if (vp->m_start.lno == cs.cs_lno && vp->m_start.cno == cs.cs_cno) { v_eof(sp, NULL); return (1); } okret: vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; /* * !!! * Historic, uh, features, yeah, that's right, call 'em features. * If the starting and ending cursor positions are at the first * column in their lines, i.e. the movement is cutting entire lines, * the buffer is in line mode, and the ending position is the last * character of the previous line. Note check to make sure that * it's not within a single line. * * Non-motion commands move to the end of the range. Delete and * yank stay at the start. Ignore others. Adjust the end of the * range for motion commands. */ if (ISMOTION(vp)) { if (vp->m_start.cno == 0 && (cs.cs_flags != 0 || vp->m_stop.cno == 0)) { if (vp->m_start.lno < vp->m_stop.lno) { if (db_get(sp, --vp->m_stop.lno, DBG_FATAL, NULL, &len)) return (1); vp->m_stop.cno = len ? len - 1 : 0; } F_SET(vp, VM_LMODE); } else --vp->m_stop.cno; vp->m_final = vp->m_start; } else vp->m_final = vp->m_stop; return (0); } /* * v_sentenceb -- [count]( * Move backward count sentences. * * PUBLIC: int v_sentenceb __P((SCR *, VICMD *)); */ int v_sentenceb(SCR *sp, VICMD *vp) { VCS cs; db_recno_t slno; size_t len, scno; u_long cnt; int last; /* * !!! * Historic vi permitted the user to hit SOF repeatedly. */ if (vp->m_start.lno == 1 && vp->m_start.cno == 0) return (0); cs.cs_lno = vp->m_start.lno; cs.cs_cno = vp->m_start.cno; if (cs_init(sp, &cs)) return (1); cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; /* * !!! * In empty lines, skip to the previous non-white-space character. * If in text, skip to the prevous white-space character. Believe * it or not, in the paragraph: * ab cd. * AB CD. * if the cursor is on the 'A' or 'B', ( moves to the 'a'. If it * is on the ' ', 'C' or 'D', it moves to the 'A'. Yes, Virginia, * Berkeley was once a major center of drug activity. */ if (cs.cs_flags == CS_EMP) { if (cs_bblank(sp, &cs)) return (1); for (;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags != CS_EOL) break; } } else if (cs.cs_flags == 0 && !isblank(cs.cs_ch)) for (;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; } for (last = 0;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags == CS_SOF) /* SOF is a movement sink. */ break; if (cs.cs_flags == CS_EOL) { last = 1; continue; } if (cs.cs_flags == CS_EMP) { if (--cnt == 0) goto ret; if (cs_bblank(sp, &cs)) return (1); last = 0; continue; } switch (cs.cs_ch) { case '.': case '?': case '!': if (!last || --cnt != 0) { last = 0; continue; } ret: slno = cs.cs_lno; scno = cs.cs_cno; /* * Move to the start of the sentence, skipping blanks * and special characters. */ do { if (cs_next(sp, &cs)) return (1); } while (!cs.cs_flags && (cs.cs_ch == ')' || cs.cs_ch == ']' || cs.cs_ch == '"' || cs.cs_ch == '\'')); if ((cs.cs_flags || isblank(cs.cs_ch)) && cs_fblank(sp, &cs)) return (1); /* * If it was ". xyz", with the cursor on the 'x', or * "end. ", with the cursor in the spaces, or the * beginning of a sentence preceded by an empty line, * we can end up where we started. Fix it. */ if (vp->m_start.lno != cs.cs_lno || vp->m_start.cno != cs.cs_cno) goto okret; /* * Well, if an empty line preceded possible blanks * and the sentence, it could be a real sentence. */ for (;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags == CS_EOL) continue; if (cs.cs_flags == 0 && isblank(cs.cs_ch)) continue; break; } if (cs.cs_flags == CS_EMP) goto okret; /* But it wasn't; try again. */ ++cnt; cs.cs_lno = slno; cs.cs_cno = scno; last = 0; break; case '\t': last = 1; break; default: last = cs.cs_flags == CS_EOL || isblank(cs.cs_ch) || cs.cs_ch == ')' || cs.cs_ch == ']' || cs.cs_ch == '"' || cs.cs_ch == '\'' ? 1 : 0; } } okret: vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; /* * !!! * If the starting and stopping cursor positions are at the first * columns in the line, i.e. the movement is cutting an entire line, * the buffer is in line mode, and the starting position is the last * character of the previous line. * * All commands move to the end of the range. Adjust the start of * the range for motion commands. */ if (ISMOTION(vp)) if (vp->m_start.cno == 0 && (cs.cs_flags != 0 || vp->m_stop.cno == 0)) { if (db_get(sp, --vp->m_start.lno, DBG_FATAL, NULL, &len)) return (1); vp->m_start.cno = len ? len - 1 : 0; F_SET(vp, VM_LMODE); } else --vp->m_start.cno; vp->m_final = vp->m_stop; return (0); } nvi-1.81.6/vi/v_status.c0100644000076400001440000000152210720065506014104 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_status.c,v 10.10 2001/06/25 15:19:35 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:35 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_status -- ^G * Show the file status. * * PUBLIC: int v_status __P((SCR *, VICMD *)); */ int v_status(SCR *sp, VICMD *vp) { (void)msgq_status(sp, vp->m_start.lno, MSTAT_SHOWLAST); return (0); } nvi-1.81.6/vi/v_txt.c0100644000076400001440000023374410720065506013415 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_txt.c,v 10.108 2003/07/18 21:27:42 skimo Exp $ (Berkeley) $Date: 2003/07/18 21:27:42 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static int txt_abbrev __P((SCR *, TEXT *, CHAR_T *, int, int *, int *)); static void txt_ai_resolve __P((SCR *, TEXT *, int *)); static TEXT *txt_backup __P((SCR *, TEXTH *, TEXT *, u_int32_t *)); static int txt_dent __P((SCR *, TEXT *, int)); static int txt_emark __P((SCR *, TEXT *, size_t)); static void txt_err __P((SCR *, TEXTH *)); static int txt_fc __P((SCR *, TEXT *, int *)); static int txt_fc_col __P((SCR *, int, ARGS **)); static int txt_hex __P((SCR *, TEXT *)); static int txt_insch __P((SCR *, TEXT *, CHAR_T *, u_int)); static int txt_isrch __P((SCR *, VICMD *, TEXT *, u_int8_t *)); static int txt_map_end __P((SCR *)); static int txt_map_init __P((SCR *)); static int txt_margin __P((SCR *, TEXT *, TEXT *, int *, u_int32_t)); static void txt_nomorech __P((SCR *)); static void txt_Rresolve __P((SCR *, TEXTH *, TEXT *, const size_t)); static int txt_resolve __P((SCR *, TEXTH *, u_int32_t)); static int txt_showmatch __P((SCR *, TEXT *)); static void txt_unmap __P((SCR *, TEXT *, u_int32_t *)); /* Cursor character (space is hard to track on the screen). */ #if defined(DEBUG) && 0 #undef CH_CURSOR #define CH_CURSOR '+' #endif /* * v_tcmd -- * Fill a buffer from the terminal for vi. * * PUBLIC: int v_tcmd __P((SCR *, VICMD *, ARG_CHAR_T, u_int)); */ int v_tcmd(SCR *sp, VICMD *vp, ARG_CHAR_T prompt, u_int flags) { /* Normally, we end up where we started. */ vp->m_final.lno = sp->lno; vp->m_final.cno = sp->cno; /* Initialize the map. */ if (txt_map_init(sp)) return (1); /* Move to the last line. */ sp->lno = TMAP[0].lno; sp->cno = 0; /* Don't update the modeline for now. */ F_SET(sp, SC_TINPUT_INFO); /* Set the input flags. */ LF_SET(TXT_APPENDEOL | TXT_CR | TXT_ESCAPE | TXT_INFOLINE | TXT_MAPINPUT); if (O_ISSET(sp, O_ALTWERASE)) LF_SET(TXT_ALTWERASE); if (O_ISSET(sp, O_TTYWERASE)) LF_SET(TXT_TTYWERASE); /* Do the input thing. */ if (v_txt(sp, vp, NULL, NULL, 0, prompt, 0, 1, flags)) return (1); /* Reenable the modeline updates. */ F_CLR(sp, SC_TINPUT_INFO); /* Clean up the map. */ if (txt_map_end(sp)) return (1); if (IS_ONELINE(sp)) F_SET(sp, SC_SCR_REDRAW); /* XXX */ /* Set the cursor to the resulting position. */ sp->lno = vp->m_final.lno; sp->cno = vp->m_final.cno; return (0); } /* * txt_map_init * Initialize the screen map for colon command-line input. */ static int txt_map_init(SCR *sp) { SMAP *esmp; VI_PRIVATE *vip; vip = VIP(sp); if (!IS_ONELINE(sp)) { /* * Fake like the user is doing input on the last line of the * screen. This makes all of the scrolling work correctly, * and allows us the use of the vi text editing routines, not * to mention practically infinite length ex commands. * * Save the current location. */ vip->sv_tm_lno = TMAP->lno; vip->sv_tm_soff = TMAP->soff; vip->sv_tm_coff = TMAP->coff; vip->sv_t_maxrows = sp->t_maxrows; vip->sv_t_minrows = sp->t_minrows; vip->sv_t_rows = sp->t_rows; /* * If it's a small screen, TMAP may be small for the screen. * Fix it, filling in fake lines as we go. */ if (IS_SMALL(sp)) for (esmp = HMAP + (sp->t_maxrows - 1); TMAP < esmp; ++TMAP) { TMAP[1].lno = TMAP[0].lno + 1; TMAP[1].coff = HMAP->coff; TMAP[1].soff = 1; } /* Build the fake entry. */ TMAP[1].lno = TMAP[0].lno + 1; TMAP[1].soff = 1; TMAP[1].coff = 0; SMAP_FLUSH(&TMAP[1]); ++TMAP; /* Reset the screen information. */ sp->t_rows = sp->t_minrows = ++sp->t_maxrows; } return (0); } /* * txt_map_end * Reset the screen map for colon command-line input. */ static int txt_map_end(SCR *sp) { VI_PRIVATE *vip; size_t cnt; vip = VIP(sp); if (!IS_ONELINE(sp)) { /* Restore the screen information. */ sp->t_rows = vip->sv_t_rows; sp->t_minrows = vip->sv_t_minrows; sp->t_maxrows = vip->sv_t_maxrows; /* * If it's a small screen, TMAP may be wrong. Clear any * lines that might have been overwritten. */ if (IS_SMALL(sp)) { for (cnt = sp->t_rows; cnt <= sp->t_maxrows; ++cnt) { (void)sp->gp->scr_move(sp, cnt, 0); (void)sp->gp->scr_clrtoeol(sp); } TMAP = HMAP + (sp->t_rows - 1); } else --TMAP; /* * The map may be wrong if the user entered more than one * (logical) line. Fix it. If the user entered a whole * screen, this will be slow, but we probably don't care. */ if (!O_ISSET(sp, O_LEFTRIGHT)) while (vip->sv_tm_lno != TMAP->lno || vip->sv_tm_soff != TMAP->soff) if (vs_sm_1down(sp)) return (1); } /* * Invalidate the cursor and the line size cache, the line never * really existed. This fixes bugs where the user searches for * the last line on the screen + 1 and the refresh routine thinks * that's where we just were. */ VI_SCR_CFLUSH(vip); F_SET(vip, VIP_CUR_INVALID); return (0); } /* * If doing input mapping on the colon command line, may need to unmap * based on the command. */ #define UNMAP_TST \ FL_ISSET(ec_flags, EC_MAPINPUT) && LF_ISSET(TXT_INFOLINE) /* * Internally, we maintain tp->lno and tp->cno, externally, everyone uses * sp->lno and sp->cno. Make them consistent as necessary. */ #define UPDATE_POSITION(sp, tp) { \ (sp)->lno = (tp)->lno; \ (sp)->cno = (tp)->cno; \ } /* * v_txt -- * Vi text input. * * PUBLIC: int v_txt __P((SCR *, VICMD *, MARK *, * PUBLIC: const CHAR_T *, size_t, ARG_CHAR_T, db_recno_t, u_long, u_int32_t)); */ int v_txt(SCR *sp, VICMD *vp, MARK *tm, const CHAR_T *lp, size_t len, ARG_CHAR_T prompt, db_recno_t ai_line, u_long rcount, u_int32_t flags) /* To MARK. */ /* Input line. */ /* Input line length. */ /* Prompt to display. */ /* Line number to use for autoindent count. */ /* Replay count. */ /* TXT_* flags. */ { EVENT ev, *evp; /* Current event. */ EVENT fc; /* File name completion event. */ GS *gp; TEXT *ntp, *tp; /* Input text structures. */ TEXT ait; /* Autoindent text structure. */ TEXT wmt; /* Wrapmargin text structure. */ TEXTH *tiqh; VI_PRIVATE *vip; abb_t abb; /* State of abbreviation checks. */ carat_t carat; /* State of the "[^0]^D" sequences. */ quote_t quote; /* State of quotation. */ size_t owrite, insert; /* Temporary copies of TEXT fields. */ size_t margin; /* Wrapmargin value. */ size_t rcol; /* 0-N: insert offset in the replay buffer. */ size_t tcol; /* Temporary column. */ u_int32_t ec_flags; /* Input mapping flags. */ #define IS_RESTART 0x01 /* Reset the incremental search. */ #define IS_RUNNING 0x02 /* Incremental search turned on. */ u_int8_t is_flags; int abcnt, ab_turnoff; /* Abbreviation character count, switch. */ int filec_redraw; /* Redraw after the file completion routine. */ int hexcnt; /* Hex character count. */ int showmatch; /* Showmatch set on this character. */ int wm_set, wm_skip; /* Wrapmargin happened, blank skip flags. */ int max, tmp; CHAR_T *p; gp = sp->gp; vip = VIP(sp); /* * Set the input flag, so tabs get displayed correctly * and everyone knows that the text buffer is in use. */ F_SET(sp, SC_TINPUT); /* * Get one TEXT structure with some initial buffer space, reusing * the last one if it's big enough. (All TEXT bookkeeping fields * default to 0 -- text_init() handles this.) If changing a line, * copy it into the TEXT buffer. */ tiqh = &sp->tiq; if (tiqh->cqh_first != (void *)tiqh) { tp = tiqh->cqh_first; if (tp->q.cqe_next != (void *)tiqh || tp->lb_len < len + 32) { text_lfree(tiqh); goto newtp; } tp->ai = tp->insert = tp->offset = tp->owrite = 0; if (lp != NULL) { tp->len = len; BINC_RETW(sp, tp->lb, tp->lb_len, len); MEMMOVEW(tp->lb, lp, len); } else tp->len = 0; } else { newtp: if ((tp = text_init(sp, lp, len, len + 32)) == NULL) return (1); CIRCLEQ_INSERT_HEAD(tiqh, tp, q); } /* Set default termination condition. */ tp->term = TERM_OK; /* Set the starting line, column. */ tp->lno = sp->lno; tp->cno = sp->cno; /* * Set the insert and overwrite counts. If overwriting characters, * do insertion afterward. If not overwriting characters, assume * doing insertion. If change is to a mark, emphasize it with an * CH_ENDMARK character. */ if (len) { if (LF_ISSET(TXT_OVERWRITE)) { tp->owrite = (tm->cno - tp->cno) + 1; tp->insert = (len - tm->cno) - 1; } else tp->insert = len - tp->cno; if (LF_ISSET(TXT_EMARK) && txt_emark(sp, tp, tm->cno)) return (1); } /* * Many of the special cases in text input are to handle autoindent * support. Somebody decided that it would be a good idea if "^^D" * and "0^D" deleted all of the autoindented characters. In an editor * that takes single character input from the user, this beggars the * imagination. Note also, "^^D" resets the next lines' autoindent, * but "0^D" doesn't. * * We assume that autoindent only happens on empty lines, so insert * and overwrite will be zero. If doing autoindent, figure out how * much indentation we need and fill it in. Update input column and * screen cursor as necessary. */ if (LF_ISSET(TXT_AUTOINDENT) && ai_line != OOBLNO) { if (v_txt_auto(sp, ai_line, NULL, 0, tp)) return (1); tp->cno = tp->ai; } else { /* * The cc and S commands have a special feature -- leading * characters are handled as autoindent characters. * Beauty! */ if (LF_ISSET(TXT_AICHARS)) { tp->offset = 0; tp->ai = tp->cno; } else tp->offset = tp->cno; } /* If getting a command buffer from the user, there may be a prompt. */ if (LF_ISSET(TXT_PROMPT)) { tp->lb[tp->cno++] = prompt; ++tp->len; ++tp->offset; } /* * If appending after the end-of-line, add a space into the buffer * and move the cursor right. This space is inserted, i.e. pushed * along, and then deleted when the line is resolved. Assumes that * the cursor is already positioned at the end of the line. This * avoids the nastiness of having the cursor reside on a magical * column, i.e. a column that doesn't really exist. The only down * side is that we may wrap lines or scroll the screen before it's * strictly necessary. Not a big deal. */ if (LF_ISSET(TXT_APPENDEOL)) { tp->lb[tp->cno] = CH_CURSOR; ++tp->len; ++tp->insert; (void)vs_change(sp, tp->lno, LINE_RESET); } /* * Historic practice is that the wrapmargin value was a distance * from the RIGHT-HAND margin, not the left. It's more useful to * us as a distance from the left-hand margin, i.e. the same as * the wraplen value. The wrapmargin option is historic practice. * Nvi added the wraplen option so that it would be possible to * edit files with consistent margins without knowing the number of * columns in the window. * * XXX * Setting margin causes a significant performance hit. Normally * we don't update the screen if there are keys waiting, but we * have to if margin is set, otherwise the screen routines don't * know where the cursor is. * * !!! * Abbreviated keys were affected by the wrapmargin option in the * historic 4BSD vi. Mapped keys were usually, but sometimes not. * See the comment in vi/v_text():set_txt_std for more information. * * !!! * One more special case. If an inserted character causes * wrapmargin to split the line, the next user entered character is * discarded if it's a character. */ wm_set = wm_skip = 0; if (LF_ISSET(TXT_WRAPMARGIN)) if ((margin = O_VAL(sp, O_WRAPMARGIN)) != 0) margin = sp->cols - margin; else margin = O_VAL(sp, O_WRAPLEN); else margin = 0; /* Initialize abbreviation checks. */ abcnt = ab_turnoff = 0; abb = F_ISSET(gp, G_ABBREV) && LF_ISSET(TXT_MAPINPUT) ? AB_INWORD : AB_NOTSET; /* * Set up the dot command. Dot commands are done by saving the actual * characters and then reevaluating them so that things like wrapmargin * can change between the insert and the replay. * * !!! * Historically, vi did not remap or reabbreviate replayed input. (It * did beep at you if you changed an abbreviation and then replayed the * input. We're not that compatible.) We don't have to do anything to * avoid remapping, as we're not getting characters from the terminal * routines. Turn the abbreviation check off. * * XXX * It would be nice if we could swallow backspaces and such, but it's * not all that easy to do. What we can do is turn off the common * error messages during the replay. Otherwise, when the user enters * an illegal command, e.g., "Iab", * and then does a '.', they get a list of error messages after command * completion. */ rcol = 0; if (LF_ISSET(TXT_REPLAY)) { abb = AB_NOTSET; LF_CLR(TXT_RECORD); } /* Other text input mode setup. */ quote = Q_NOTSET; carat = C_NOTSET; FL_INIT(is_flags, LF_ISSET(TXT_SEARCHINCR) ? IS_RESTART | IS_RUNNING : 0); filec_redraw = hexcnt = showmatch = 0; /* Initialize input flags. */ ec_flags = LF_ISSET(TXT_MAPINPUT) ? EC_MAPINPUT : 0; /* Refresh the screen. */ UPDATE_POSITION(sp, tp); if (vs_refresh(sp, 1)) return (1); /* If it's dot, just do it now. */ if (F_ISSET(vp, VC_ISDOT)) goto replay; /* Get an event. */ evp = &ev; next: if (v_event_get(sp, evp, 0, ec_flags)) return (1); /* * If file completion overwrote part of the screen and nothing else has * been displayed, clean up. We don't do this as part of the normal * message resolution because we know the user is on the colon command * line and there's no reason to enter explicit characters to continue. */ if (filec_redraw && !F_ISSET(sp, SC_SCR_EXWROTE)) { filec_redraw = 0; fc.e_event = E_REPAINT; fc.e_flno = vip->totalcount >= sp->rows ? 1 : sp->rows - vip->totalcount; fc.e_tlno = sp->rows; vip->linecount = vip->lcontinue = vip->totalcount = 0; (void)v_erepaint(sp, &fc); (void)vs_refresh(sp, 1); } /* Deal with all non-character events. */ switch (evp->e_event) { case E_CHARACTER: break; case E_ERR: case E_EOF: F_SET(sp, SC_EXIT_FORCE); return (1); case E_INTERRUPT: /* * !!! * Historically, exited the user from text input * mode or cancelled a colon command, and returned to command * mode. It also beeped the terminal, but that seems a bit * excessive. */ goto k_escape; case E_REPAINT: if (v_erepaint(sp, &ev)) return (1); goto next; case E_WRESIZE: /* interrupts the input mode. */ v_emsg(sp, NULL, VIM_WRESIZE); goto k_escape; default: v_event_err(sp, evp); goto k_escape; } /* * !!! * If the first character of the input is a nul, replay the previous * input. (Historically, it's okay to replay non-existent input.) * This was not documented as far as I know, and is a great test of vi * clones. */ if (rcol == 0 && !LF_ISSET(TXT_REPLAY) && evp->e_c == '\0') { if (vip->rep == NULL) goto done; abb = AB_NOTSET; LF_CLR(TXT_RECORD); LF_SET(TXT_REPLAY); goto replay; } /* * File name completion and colon command-line editing. We don't * have enough meta characters, so we expect people to overload * them. If the two characters are the same, then we do file name * completion if the cursor is past the first column, and do colon * command-line editing if it's not. */ if (quote == Q_NOTSET) { int L__cedit, L__filec; L__cedit = L__filec = 0; if (LF_ISSET(TXT_CEDIT) && O_STR(sp, O_CEDIT) != NULL && O_STR(sp, O_CEDIT)[0] == evp->e_c) L__cedit = 1; if (LF_ISSET(TXT_FILEC) && O_STR(sp, O_FILEC) != NULL && O_STR(sp, O_FILEC)[0] == evp->e_c) L__filec = 1; if (L__cedit == 1 && (L__filec == 0 || tp->cno == tp->offset)) { tp->term = TERM_CEDIT; goto k_escape; } if (L__filec == 1) { if (txt_fc(sp, tp, &filec_redraw)) goto err; goto resolve; } } /* Abbreviation overflow check. See comment in txt_abbrev(). */ #define MAX_ABBREVIATION_EXPANSION 256 if (FL_ISSET(evp->e_flags, CH_ABBREVIATED)) { if (++abcnt > MAX_ABBREVIATION_EXPANSION) { if (v_event_flush(sp, CH_ABBREVIATED)) msgq(sp, M_ERR, "191|Abbreviation exceeded expansion limit: characters discarded"); abcnt = 0; if (LF_ISSET(TXT_REPLAY)) goto done; goto resolve; } } else abcnt = 0; /* Check to see if the character fits into the replay buffers. */ if (LF_ISSET(TXT_RECORD)) { BINC_GOTO(sp, EVENT, vip->rep, vip->rep_len, (rcol + 1) * sizeof(EVENT)); vip->rep[rcol++] = *evp; } replay: if (LF_ISSET(TXT_REPLAY)) { if (rcol == vip->rep_cnt) goto k_escape; evp = vip->rep + rcol++; } /* Wrapmargin check for leading space. */ if (wm_skip) { wm_skip = 0; if (evp->e_c == ' ') goto resolve; } /* If quoted by someone else, simply insert the character. */ if (FL_ISSET(evp->e_flags, CH_QUOTED)) goto insq_ch; /* * !!! * If this character was quoted by a K_VLNEXT or a backslash, replace * the placeholder (a carat or a backslash) with the new character. * If it was quoted by a K_VLNEXT, we've already adjusted the cursor * because it has to appear on top of the placeholder character. If * it was quoted by a backslash, adjust the cursor now, the cursor * doesn't appear on top of it. Historic practice in both cases. * * Skip tests for abbreviations; ":ab xa XA" followed by "ixa^V" * doesn't perform an abbreviation. Special case, ^V^J (not ^V^M) is * the same as ^J, historically. */ if (quote == Q_BTHIS || quote == Q_VTHIS) { FL_CLR(ec_flags, EC_QUOTED); if (LF_ISSET(TXT_MAPINPUT)) FL_SET(ec_flags, EC_MAPINPUT); if (quote == Q_BTHIS && (evp->e_value == K_VERASE || evp->e_value == K_VKILL)) { quote = Q_NOTSET; --tp->cno; ++tp->owrite; goto insl_ch; } if (quote == Q_VTHIS && evp->e_value != K_NL) { quote = Q_NOTSET; goto insl_ch; } quote = Q_NOTSET; } /* * !!! * Translate "[isxdigit()]*" to a character with a hex value: * this test delimits the value by any non-hex character. Offset by * one, we use 0 to mean that we've found . */ if (hexcnt > 1 && !isxdigit(evp->e_c)) { hexcnt = 0; if (txt_hex(sp, tp)) goto err; } switch (evp->e_value) { case K_CR: /* Carriage return. */ case K_NL: /* New line. */ /* Return in script windows and the command line. */ k_cr: if (LF_ISSET(TXT_CR)) { static CHAR_T cr[] = { '\r', 0 }; /* * If this was a map, we may have not displayed * the line. Display it, just in case. * * If a script window and not the colon line, * push a so it gets executed. */ if (LF_ISSET(TXT_INFOLINE)) { if (vs_change(sp, tp->lno, LINE_RESET)) goto err; } else if (F_ISSET(sp, SC_SCRIPT)) (void)v_event_push(sp, NULL, cr, 1, CH_NOMAP); /* Set term condition: if empty. */ if (tp->cno <= tp->offset) tp->term = TERM_CR; /* * Set term condition: if searching incrementally and * the user entered a pattern, return a completed * search, regardless if the entire pattern was found. */ if (FL_ISSET(is_flags, IS_RUNNING) && tp->cno >= tp->offset + 1) tp->term = TERM_SEARCH; goto k_escape; } #define LINE_RESOLVE { \ /* \ * Handle abbreviations. If there was one, discard the \ * replay characters. \ */ \ if (abb == AB_INWORD && \ !LF_ISSET(TXT_REPLAY) && F_ISSET(gp, G_ABBREV)) { \ if (txt_abbrev(sp, tp, &evp->e_c, \ LF_ISSET(TXT_INFOLINE), &tmp, \ &ab_turnoff)) \ goto err; \ if (tmp) { \ if (LF_ISSET(TXT_RECORD)) \ rcol -= tmp + 1; \ goto resolve; \ } \ } \ if (abb != AB_NOTSET) \ abb = AB_NOTWORD; \ if (UNMAP_TST) \ txt_unmap(sp, tp, &ec_flags); \ /* \ * Delete any appended cursor. It's possible to get in \ * situations where TXT_APPENDEOL is set but tp->insert \ * is 0 when using the R command and all the characters \ * are tp->owrite characters. \ */ \ if (LF_ISSET(TXT_APPENDEOL) && tp->insert > 0) { \ --tp->len; \ --tp->insert; \ } \ } LINE_RESOLVE; /* * Save the current line information for restoration in * txt_backup(), and set the line final length. */ tp->sv_len = tp->len; tp->sv_cno = tp->cno; tp->len = tp->cno; /* Update the old line. */ if (vs_change(sp, tp->lno, LINE_RESET)) goto err; /* * Historic practice, when the autoindent edit option was set, * was to delete characters following the inserted * newline. This affected the 'R', 'c', and 's' commands; 'c' * and 's' retained the insert characters only, 'R' moved the * overwrite and insert characters into the next TEXT structure. * We keep track of the number of characters erased for the 'R' * command so that the final resolution of the line is correct. */ tp->R_erase = 0; owrite = tp->owrite; insert = tp->insert; if (LF_ISSET(TXT_REPLACE) && owrite != 0) { for (p = tp->lb + tp->cno; owrite > 0 && isblank(*p); ++p, --owrite, ++tp->R_erase); if (owrite == 0) for (; insert > 0 && isblank(*p); ++p, ++tp->R_erase, --insert); } else { p = tp->lb + tp->cno + owrite; if (O_ISSET(sp, O_AUTOINDENT)) for (; insert > 0 && isblank(*p); ++p, --insert); owrite = 0; } /* * !!! * Create a new line and insert the new TEXT into the queue. * DON'T insert until the old line has been updated, or the * inserted line count in line.c:db_get() will be wrong. */ if ((ntp = text_init(sp, p, insert + owrite, insert + owrite + 32)) == NULL) goto err; CIRCLEQ_INSERT_TAIL(&sp->tiq, ntp, q); /* Set up bookkeeping for the new line. */ ntp->insert = insert; ntp->owrite = owrite; ntp->lno = tp->lno + 1; /* * Reset the autoindent line value. 0^D keeps the autoindent * line from changing, ^D changes the level, even if there were * no characters in the old line. Note, if using the current * tp structure, use the cursor as the length, the autoindent * characters may have been erased. */ if (LF_ISSET(TXT_AUTOINDENT)) { if (carat == C_NOCHANGE) { if (v_txt_auto(sp, OOBLNO, &ait, ait.ai, ntp)) goto err; FREE_SPACEW(sp, ait.lb, ait.lb_len); } else if (v_txt_auto(sp, OOBLNO, tp, tp->cno, ntp)) goto err; carat = C_NOTSET; } /* Reset the cursor. */ ntp->cno = ntp->ai; /* * If we're here because wrapmargin was set and we've broken a * line, there may be additional information (i.e. the start of * a line) in the wmt structure. */ if (wm_set) { if (wmt.offset != 0 || wmt.owrite != 0 || wmt.insert != 0) { #define WMTSPACE wmt.offset + wmt.owrite + wmt.insert BINC_GOTOW(sp, ntp->lb, ntp->lb_len, ntp->len + WMTSPACE + 32); MEMMOVEW(ntp->lb + ntp->cno, wmt.lb, WMTSPACE); ntp->len += WMTSPACE; ntp->cno += wmt.offset; ntp->owrite = wmt.owrite; ntp->insert = wmt.insert; } wm_set = 0; } /* New lines are TXT_APPENDEOL. */ if (ntp->owrite == 0 && ntp->insert == 0) { BINC_GOTOW(sp, ntp->lb, ntp->lb_len, ntp->len + 1); LF_SET(TXT_APPENDEOL); ntp->lb[ntp->cno] = CH_CURSOR; ++ntp->insert; ++ntp->len; } /* Swap old and new TEXT's, and update the new line. */ tp = ntp; if (vs_change(sp, tp->lno, LINE_INSERT)) goto err; goto resolve; case K_ESCAPE: /* Escape. */ if (!LF_ISSET(TXT_ESCAPE)) goto ins_ch; /* If we have a count, start replaying the input. */ if (rcount > 1) { --rcount; vip->rep_cnt = rcol; rcol = 0; abb = AB_NOTSET; LF_CLR(TXT_RECORD); LF_SET(TXT_REPLAY); /* * Some commands (e.g. 'o') need a for each * repetition. */ if (LF_ISSET(TXT_ADDNEWLINE)) goto k_cr; /* * The R command turns into the 'a' command after the * first repetition. */ if (LF_ISSET(TXT_REPLACE)) { tp->insert = tp->owrite; tp->owrite = 0; LF_CLR(TXT_REPLACE); } goto replay; } /* Set term condition: if empty. */ if (tp->cno <= tp->offset) tp->term = TERM_ESC; /* * Set term condition: if searching incrementally and the user * entered a pattern, return a completed search, regardless if * the entire pattern was found. */ if (FL_ISSET(is_flags, IS_RUNNING) && tp->cno >= tp->offset + 1) tp->term = TERM_SEARCH; k_escape: LINE_RESOLVE; /* * Clean up for the 'R' command, restoring overwrite * characters, and making them into insert characters. */ if (LF_ISSET(TXT_REPLACE)) txt_Rresolve(sp, &sp->tiq, tp, len); /* * If there are any overwrite characters, copy down * any insert characters, and decrement the length. */ if (tp->owrite) { if (tp->insert) MEMMOVEW(tp->lb + tp->cno, tp->lb + tp->cno + tp->owrite, tp->insert); tp->len -= tp->owrite; } /* * Optionally resolve the lines into the file. If not * resolving the lines into the file, end the line with * a nul. If the line is empty, then set the length to * 0, the termination condition has already been set. * * XXX * This is wrong, should pass back a length. */ if (LF_ISSET(TXT_RESOLVE)) { if (txt_resolve(sp, &sp->tiq, flags)) goto err; } else { BINC_GOTOW(sp, tp->lb, tp->lb_len, tp->len + 1); tp->lb[tp->len] = '\0'; } /* * Set the return cursor position to rest on the last * inserted character. */ if (tp->cno != 0) --tp->cno; /* Update the last line. */ if (vs_change(sp, tp->lno, LINE_RESET)) return (1); goto done; case K_CARAT: /* Delete autoindent chars. */ if (tp->cno <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) carat = C_CARATSET; goto ins_ch; case K_ZERO: /* Delete autoindent chars. */ if (tp->cno <= tp->ai && LF_ISSET(TXT_AUTOINDENT)) carat = C_ZEROSET; goto ins_ch; case K_CNTRLD: /* Delete autoindent char. */ /* * If in the first column or no characters to erase, ignore * the ^D (this matches historic practice). If not doing * autoindent or already inserted non-ai characters, it's a * literal. The latter test is done in the switch, as the * CARAT forms are N + 1, not N. */ if (!LF_ISSET(TXT_AUTOINDENT)) goto ins_ch; if (tp->cno == 0) goto resolve; switch (carat) { case C_CARATSET: /* ^^D */ if (tp->ai == 0 || tp->cno > tp->ai + tp->offset + 1) goto ins_ch; /* Save the ai string for later. */ ait.lb = NULL; ait.lb_len = 0; BINC_GOTOW(sp, ait.lb, ait.lb_len, tp->ai); MEMMOVEW(ait.lb, tp->lb, tp->ai); ait.ai = ait.len = tp->ai; carat = C_NOCHANGE; goto leftmargin; case C_ZEROSET: /* 0^D */ if (tp->ai == 0 || tp->cno > tp->ai + tp->offset + 1) goto ins_ch; carat = C_NOTSET; leftmargin: tp->lb[tp->cno - 1] = ' '; tp->owrite += tp->cno - tp->offset; tp->ai = 0; tp->cno = tp->offset; break; case C_NOTSET: /* ^D */ if (tp->ai == 0 || tp->cno > tp->ai + tp->offset) goto ins_ch; (void)txt_dent(sp, tp, 0); break; default: abort(); } break; case K_VERASE: /* Erase the last character. */ /* If can erase over the prompt, return. */ if (tp->cno <= tp->offset && LF_ISSET(TXT_BS)) { tp->term = TERM_BS; goto done; } /* * If at the beginning of the line, try and drop back to a * previously inserted line. */ if (tp->cno == 0) { if ((ntp = txt_backup(sp, &sp->tiq, tp, &flags)) == NULL) goto err; tp = ntp; break; } /* If nothing to erase, bell the user. */ if (tp->cno <= tp->offset) { if (!LF_ISSET(TXT_REPLAY)) txt_nomorech(sp); break; } /* Drop back one character. */ --tp->cno; /* * Historically, vi didn't replace the erased characters with * s, presumably because it's easier to fix a minor * typing mistake and continue on if the previous letters are * already there. This is a problem for incremental searching, * because the user can no longer tell where they are in the * colon command line because the cursor is at the last search * point in the screen. So, if incrementally searching, erase * the erased characters from the screen. */ if (FL_ISSET(is_flags, IS_RUNNING)) tp->lb[tp->cno] = ' '; /* * Increment overwrite, decrement ai if deleted. * * !!! * Historic vi did not permit users to use erase characters * to delete autoindent characters. We do. Eat hot death, * POSIX. */ ++tp->owrite; if (tp->cno < tp->ai) --tp->ai; /* Reset if we deleted an incremental search character. */ if (FL_ISSET(is_flags, IS_RUNNING)) FL_SET(is_flags, IS_RESTART); break; case K_VWERASE: /* Skip back one word. */ /* * If at the beginning of the line, try and drop back to a * previously inserted line. */ if (tp->cno == 0) { if ((ntp = txt_backup(sp, &sp->tiq, tp, &flags)) == NULL) goto err; tp = ntp; } /* * If at offset, nothing to erase so bell the user. */ if (tp->cno <= tp->offset) { if (!LF_ISSET(TXT_REPLAY)) txt_nomorech(sp); break; } /* * The first werase goes back to any autoindent column and the * second werase goes back to the offset. * * !!! * Historic vi did not permit users to use erase characters to * delete autoindent characters. */ if (tp->ai && tp->cno > tp->ai) max = tp->ai; else { tp->ai = 0; max = tp->offset; } /* Skip over trailing space characters. */ while (tp->cno > max && isblank(tp->lb[tp->cno - 1])) { --tp->cno; ++tp->owrite; } if (tp->cno == max) break; /* * There are three types of word erase found on UNIX systems. * They can be identified by how the string /a/b/c is treated * -- as 1, 3, or 6 words. Historic vi had two classes of * characters, and strings were delimited by them and * 's, so, 6 words. The historic tty interface used * 's to delimit strings, so, 1 word. The algorithm * offered in the 4.4BSD tty interface (as stty altwerase) * treats it as 3 words -- there are two classes of * characters, and strings are delimited by them and * 's. The difference is that the type of the first * erased character erased is ignored, which is exactly right * when erasing pathname components. The edit options * TXT_ALTWERASE and TXT_TTYWERASE specify the 4.4BSD tty * interface and the historic tty driver behavior, * respectively, and the default is the same as the historic * vi behavior. * * Overwrite erased characters if doing incremental search; * see comment above. */ if (LF_ISSET(TXT_TTYWERASE)) while (tp->cno > max) { --tp->cno; ++tp->owrite; if (FL_ISSET(is_flags, IS_RUNNING)) tp->lb[tp->cno] = ' '; if (isblank(tp->lb[tp->cno - 1])) break; } else { if (LF_ISSET(TXT_ALTWERASE)) { --tp->cno; ++tp->owrite; if (FL_ISSET(is_flags, IS_RUNNING)) tp->lb[tp->cno] = ' '; if (isblank(tp->lb[tp->cno - 1])) break; } if (tp->cno > max) tmp = inword(tp->lb[tp->cno - 1]); while (tp->cno > max) { --tp->cno; ++tp->owrite; if (FL_ISSET(is_flags, IS_RUNNING)) tp->lb[tp->cno] = ' '; if (tmp != inword(tp->lb[tp->cno - 1]) || isblank(tp->lb[tp->cno - 1])) break; } } /* Reset if we deleted an incremental search character. */ if (FL_ISSET(is_flags, IS_RUNNING)) FL_SET(is_flags, IS_RESTART); break; case K_VKILL: /* Restart this line. */ /* * !!! * If at the beginning of the line, try and drop back to a * previously inserted line. Historic vi did not permit * users to go back to previous lines. */ if (tp->cno == 0) { if ((ntp = txt_backup(sp, &sp->tiq, tp, &flags)) == NULL) goto err; tp = ntp; } /* If at offset, nothing to erase so bell the user. */ if (tp->cno <= tp->offset) { if (!LF_ISSET(TXT_REPLAY)) txt_nomorech(sp); break; } /* * First kill goes back to any autoindent and second kill goes * back to the offset. * * !!! * Historic vi did not permit users to use erase characters to * delete autoindent characters. */ if (tp->ai && tp->cno > tp->ai) max = tp->ai; else { tp->ai = 0; max = tp->offset; } tp->owrite += tp->cno - max; /* * Overwrite erased characters if doing incremental search; * see comment above. */ if (FL_ISSET(is_flags, IS_RUNNING)) do { tp->lb[--tp->cno] = ' '; } while (tp->cno > max); else tp->cno = max; /* Reset if we deleted an incremental search character. */ if (FL_ISSET(is_flags, IS_RUNNING)) FL_SET(is_flags, IS_RESTART); break; case K_CNTRLT: /* Add autoindent characters. */ if (!LF_ISSET(TXT_CNTRLT)) goto ins_ch; if (txt_dent(sp, tp, 1)) goto err; goto ebuf_chk; case K_RIGHTBRACE: case K_RIGHTPAREN: if (LF_ISSET(TXT_SHOWMATCH)) showmatch = 1; goto ins_ch; case K_BACKSLASH: /* Quote next erase/kill. */ /* * !!! * Historic vi tried to make abbreviations after a backslash * escape work. If you did ":ab x y", and inserted "x\^H", * (assuming the erase character was ^H) you got "x^H", and * no abbreviation was done. If you inserted "x\z", however, * it tried to back up and do the abbreviation, i.e. replace * 'x' with 'y'. The problem was it got it wrong, and you * ended up with "zy\". * * This is really hard to do (you have to remember the * word/non-word state, for example), and doesn't make any * sense to me. Both backslash and the characters it * (usually) escapes will individually trigger the * abbreviation, so I don't see why the combination of them * wouldn't. I don't expect to get caught on this one, * particularly since it never worked right, but I've been * wrong before. * * Do the tests for abbreviations, so ":ab xa XA", * "ixa\" performs the abbreviation. */ quote = Q_BNEXT; goto insq_ch; case K_VLNEXT: /* Quote next character. */ evp->e_c = '^'; quote = Q_VNEXT; /* * Turn on the quote flag so that the underlying routines * quote the next character where it's possible. Turn off * the input mapbiting flag so that we don't remap the next * character. */ FL_SET(ec_flags, EC_QUOTED); FL_CLR(ec_flags, EC_MAPINPUT); /* * !!! * Skip the tests for abbreviations, so ":ab xa XA", * "ixa^V" doesn't perform the abbreviation. */ goto insl_ch; case K_HEXCHAR: hexcnt = 1; goto insq_ch; default: /* Insert the character. */ ins_ch: /* * Historically, vi eliminated nul's out of hand. If the * beautify option was set, it also deleted any unknown * ASCII value less than space (040) and the del character * (0177), except for tabs. Unknown is a key word here. * Most vi documentation claims that it deleted everything * but , and , as that's what the original * 4BSD documentation said. This is obviously wrong, * however, as would be included in that list. What * we do is eliminate any unquoted, iscntrl() character that * wasn't a replay and wasn't handled specially, except * or . */ if (LF_ISSET(TXT_BEAUTIFY) && ISCNTRL(evp->e_c) && evp->e_value != K_FORMFEED && evp->e_value != K_TAB) { msgq(sp, M_BERR, "192|Illegal character; quote to enter"); if (LF_ISSET(TXT_REPLAY)) goto done; break; } insq_ch: /* * If entering a non-word character after a word, check for * abbreviations. If there was one, discard replay characters. * If entering a blank character, check for unmap commands, * as well. */ if (!inword(evp->e_c)) { if (abb == AB_INWORD && !LF_ISSET(TXT_REPLAY) && F_ISSET(gp, G_ABBREV)) { if (txt_abbrev(sp, tp, &evp->e_c, LF_ISSET(TXT_INFOLINE), &tmp, &ab_turnoff)) goto err; if (tmp) { if (LF_ISSET(TXT_RECORD)) rcol -= tmp + 1; goto resolve; } } if (isblank(evp->e_c) && UNMAP_TST) txt_unmap(sp, tp, &ec_flags); } if (abb != AB_NOTSET) abb = inword(evp->e_c) ? AB_INWORD : AB_NOTWORD; insl_ch: if (txt_insch(sp, tp, &evp->e_c, flags)) goto err; /* * If we're using K_VLNEXT to quote the next character, then * we want the cursor to position itself on the ^ placeholder * we're displaying, to match historic practice. */ if (quote == Q_VNEXT) { --tp->cno; ++tp->owrite; } /* * !!! * Translate "[isxdigit()]*" to a character with * a hex value: this test delimits the value by the max * number of hex bytes. Offset by one, we use 0 to mean * that we've found . */ if (hexcnt != 0 && hexcnt++ == sizeof(CHAR_T) * 2 + 1) { hexcnt = 0; if (txt_hex(sp, tp)) goto err; } /* * Check to see if we've crossed the margin. * * !!! * In the historic vi, the wrapmargin value was figured out * using the display widths of the characters, i.e. * characters were counted as two characters if the list edit * option is set, but as the tabstop edit option number of * characters otherwise. That's what the vs_column() function * gives us, so we use it. */ if (margin != 0) { if (vs_column(sp, &tcol)) goto err; if (tcol >= margin) { if (txt_margin(sp, tp, &wmt, &tmp, flags)) goto err; if (tmp) { if (isblank(evp->e_c)) wm_skip = 1; wm_set = 1; goto k_cr; } } } /* * If we've reached the end of the buffer, then we need to * switch into insert mode. This happens when there's a * change to a mark and the user puts in more characters than * the length of the motion. */ ebuf_chk: if (tp->cno >= tp->len) { BINC_GOTOW(sp, tp->lb, tp->lb_len, tp->len + 1); LF_SET(TXT_APPENDEOL); tp->lb[tp->cno] = CH_CURSOR; ++tp->insert; ++tp->len; } /* Step the quote state forward. */ if (quote != Q_NOTSET) { if (quote == Q_BNEXT) quote = Q_BTHIS; if (quote == Q_VNEXT) quote = Q_VTHIS; } break; } #ifdef DEBUG if (tp->cno + tp->insert + tp->owrite != tp->len) { msgq(sp, M_ERR, "len %u != cno: %u ai: %u insert %u overwrite %u", tp->len, tp->cno, tp->ai, tp->insert, tp->owrite); if (LF_ISSET(TXT_REPLAY)) goto done; tp->len = tp->cno + tp->insert + tp->owrite; } #endif resolve:/* * 1: If we don't need to know where the cursor really is and we're * replaying text, keep going. */ if (margin == 0 && LF_ISSET(TXT_REPLAY)) goto replay; /* * 2: Reset the line. Don't bother unless we're about to wait on * a character or we need to know where the cursor really is. * We have to do this before showing matching characters so the * user can see what they're matching. */ if ((margin != 0 || !KEYS_WAITING(sp)) && vs_change(sp, tp->lno, LINE_RESET)) return (1); /* * 3: If there aren't keys waiting, display the matching character. * We have to do this before resolving any messages, otherwise * the error message from a missing match won't appear correctly. */ if (showmatch) { if (!KEYS_WAITING(sp) && txt_showmatch(sp, tp)) return (1); showmatch = 0; } /* * 4: If there have been messages and we're not editing on the colon * command line or doing file name completion, resolve them. */ if ((vip->totalcount != 0 || F_ISSET(gp, G_BELLSCHED)) && !F_ISSET(sp, SC_TINPUT_INFO) && !filec_redraw && vs_resolve(sp, NULL, 0)) return (1); /* * 5: Refresh the screen if we're about to wait on a character or we * need to know where the cursor really is. */ if (margin != 0 || !KEYS_WAITING(sp)) { UPDATE_POSITION(sp, tp); if (vs_refresh(sp, margin != 0)) return (1); } /* 6: Proceed with the incremental search. */ if (FL_ISSET(is_flags, IS_RUNNING) && txt_isrch(sp, vp, tp, &is_flags)) return (1); /* 7: Next character... */ if (LF_ISSET(TXT_REPLAY)) goto replay; goto next; done: /* Leave input mode. */ F_CLR(sp, SC_TINPUT); /* If recording for playback, save it. */ if (LF_ISSET(TXT_RECORD)) vip->rep_cnt = rcol; /* * If not working on the colon command line, set the final cursor * position. */ if (!F_ISSET(sp, SC_TINPUT_INFO)) { vp->m_final.lno = tp->lno; vp->m_final.cno = tp->cno; } return (0); err: alloc_err: F_CLR(sp, SC_TINPUT); txt_err(sp, &sp->tiq); return (1); } /* * txt_abbrev -- * Handle abbreviations. */ static int txt_abbrev(SCR *sp, TEXT *tp, CHAR_T *pushcp, int isinfoline, int *didsubp, int *turnoffp) { VI_PRIVATE *vip; CHAR_T ch, *p; SEQ *qp; size_t len, off; /* Check to make sure we're not at the start of an append. */ *didsubp = 0; if (tp->cno == tp->offset) return (0); vip = VIP(sp); /* * Find the start of the "word". * * !!! * We match historic practice, which, as far as I can tell, had an * off-by-one error. The way this worked was that when the inserted * text switched from a "word" character to a non-word character, * vi would check for possible abbreviations. It would then take the * type (i.e. word/non-word) of the character entered TWO characters * ago, and move backward in the text until reaching a character that * was not that type, or the beginning of the insert, the line, or * the file. For example, in the string "abc", when the * character triggered the abbreviation check, the type of the 'b' * character was used for moving through the string. Maybe there's a * reason for not using the first (i.e. 'c') character, but I can't * think of one. * * Terminate at the beginning of the insert or the character after the * offset character -- both can be tested for using tp->offset. */ off = tp->cno - 1; /* Previous character. */ p = tp->lb + off; len = 1; /* One character test. */ if (off == tp->offset || isblank(p[-1])) goto search; if (inword(p[-1])) /* Move backward to change. */ for (;;) { --off; --p; ++len; if (off == tp->offset || !inword(p[-1])) break; } else for (;;) { --off; --p; ++len; if (off == tp->offset || inword(p[-1]) || isblank(p[-1])) break; } /* * !!! * Historic vi exploded abbreviations on the command line. This has * obvious problems in that unabbreviating the string can be extremely * tricky, particularly if the string has, say, an embedded escape * character. Personally, I think it's a stunningly bad idea. Other * examples of problems this caused in historic vi are: * :ab foo bar * :ab foo baz * results in "bar" being abbreviated to "baz", which wasn't what the * user had in mind at all. Also, the commands: * :ab foo bar * :unab foo * resulted in an error message that "bar" wasn't mapped. Finally, * since the string was already exploded by the time the unabbreviate * command got it, all it knew was that an abbreviation had occurred. * Cleverly, it checked the replacement string for its unabbreviation * match, which meant that the commands: * :ab foo1 bar * :ab foo2 bar * :unab foo2 * unabbreviate "foo1", and the commands: * :ab foo bar * :ab bar baz * unabbreviate "foo"! * * Anyway, people neglected to first ask my opinion before they wrote * macros that depend on this stuff, so, we make this work as follows. * When checking for an abbreviation on the command line, if we get a * string which is terminated and which starts at the beginning * of the line, we check to see it is the abbreviate or unabbreviate * commands. If it is, turn abbreviations off and return as if no * abbreviation was found. Note also, minor trickiness, so that if * the user erases the line and starts another command, we turn the * abbreviations back on. * * This makes the layering look like a Nachos Supreme. */ search: if (isinfoline) if (off == tp->ai || off == tp->offset) if (ex_is_abbrev(sp, p, len)) { *turnoffp = 1; return (0); } else *turnoffp = 0; else if (*turnoffp) return (0); /* Check for any abbreviations. */ if ((qp = seq_find(sp, NULL, NULL, p, len, SEQ_ABBREV, NULL)) == NULL) return (0); /* * Push the abbreviation onto the tty stack. Historically, characters * resulting from an abbreviation expansion were themselves subject to * map expansions, O_SHOWMATCH matching etc. This means the expanded * characters will be re-tested for abbreviations. It's difficult to * know what historic practice in this case was, since abbreviations * were applied to :colon command lines, so entering abbreviations that * looped was tricky, although possible. In addition, obvious loops * didn't work as expected. (The command ':ab a b|ab b c|ab c a' will * silently only implement and/or display the last abbreviation.) * * This implementation doesn't recover well from such abbreviations. * The main input loop counts abbreviated characters, and, when it * reaches a limit, discards any abbreviated characters on the queue. * It's difficult to back up to the original position, as the replay * queue would have to be adjusted, and the line state when an initial * abbreviated character was received would have to be saved. */ ch = *pushcp; if (v_event_push(sp, NULL, &ch, 1, CH_ABBREVIATED)) return (1); if (v_event_push(sp, NULL, qp->output, qp->olen, CH_ABBREVIATED)) return (1); /* * If the size of the abbreviation is larger than or equal to the size * of the original text, move to the start of the replaced characters, * and add their length to the overwrite count. * * If the abbreviation is smaller than the original text, we have to * delete the additional overwrite characters and copy down any insert * characters. */ tp->cno -= len; if (qp->olen >= len) tp->owrite += len; else { if (tp->insert) MEMMOVEW(tp->lb + tp->cno + qp->olen, tp->lb + tp->cno + tp->owrite + len, tp->insert); tp->owrite += qp->olen; tp->len -= len - qp->olen; } /* * We return the length of the abbreviated characters. This is so * the calling routine can replace the replay characters with the * abbreviation. This means that subsequent '.' commands will produce * the same text, regardless of intervening :[un]abbreviate commands. * This is historic practice. */ *didsubp = len; return (0); } /* * txt_unmap -- * Handle the unmap command. */ static void txt_unmap(SCR *sp, TEXT *tp, u_int32_t *ec_flagsp) { size_t len, off; CHAR_T *p; /* Find the beginning of this "word". */ for (off = tp->cno - 1, p = tp->lb + off, len = 0;; --p, --off) { if (isblank(*p)) { ++p; break; } ++len; if (off == tp->ai || off == tp->offset) break; } /* * !!! * Historic vi exploded input mappings on the command line. See the * txt_abbrev() routine for an explanation of the problems inherent * in this. * * We make this work as follows. If we get a string which is * terminated and which starts at the beginning of the line, we check * to see it is the unmap command. If it is, we return that the input * mapping should be turned off. Note also, minor trickiness, so that * if the user erases the line and starts another command, we go ahead * an turn mapping back on. */ if ((off == tp->ai || off == tp->offset) && ex_is_unmap(sp, p, len)) FL_CLR(*ec_flagsp, EC_MAPINPUT); else FL_SET(*ec_flagsp, EC_MAPINPUT); } /* * txt_ai_resolve -- * When a line is resolved by , review autoindent characters. */ static void txt_ai_resolve(SCR *sp, TEXT *tp, int *changedp) { u_long ts; int del; size_t cno, len, new, old, scno, spaces, tab_after_sp, tabs; CHAR_T *p; *changedp = 0; /* * If the line is empty, has an offset, or no autoindent * characters, we're done. */ if (!tp->len || tp->offset || !tp->ai) return; /* * If the length is less than or equal to the autoindent * characters, delete them. */ if (tp->len <= tp->ai) { tp->ai = tp->cno = tp->len = 0; return; } /* * The autoindent characters plus any leading characters * in the line are resolved into the minimum number of characters. * Historic practice. */ ts = O_VAL(sp, O_TABSTOP); /* Figure out the last screen column. */ for (p = tp->lb, scno = 0, len = tp->len, spaces = tab_after_sp = 0; len-- && isblank(*p); ++p) if (*p == '\t') { if (spaces) tab_after_sp = 1; scno += COL_OFF(scno, ts); } else { ++spaces; ++scno; } /* * If there are no spaces, or no tabs after spaces and less than * ts spaces, it's already minimal. */ if (!spaces || !tab_after_sp && spaces < ts) return; /* Count up spaces/tabs needed to get to the target. */ for (cno = 0, tabs = 0; cno + COL_OFF(cno, ts) <= scno; ++tabs) cno += COL_OFF(cno, ts); spaces = scno - cno; /* * Figure out how many characters we're dropping -- if we're not * dropping any, it's already minimal, we're done. */ old = p - tp->lb; new = spaces + tabs; if (old == new) return; /* Shift the rest of the characters down, adjust the counts. */ del = old - new; MEMMOVEW(p - del, p, tp->len - old); tp->len -= del; tp->cno -= del; /* Fill in space/tab characters. */ for (p = tp->lb; tabs--;) *p++ = '\t'; while (spaces--) *p++ = ' '; *changedp = 1; } /* * v_txt_auto -- * Handle autoindent. If aitp isn't NULL, use it, otherwise, * retrieve the line. * * PUBLIC: int v_txt_auto __P((SCR *, db_recno_t, TEXT *, size_t, TEXT *)); */ int v_txt_auto(SCR *sp, db_recno_t lno, TEXT *aitp, size_t len, TEXT *tp) { size_t nlen; CHAR_T *p, *t; if (aitp == NULL) { /* * If the ex append command is executed with an address of 0, * it's possible to get here with a line number of 0. Return * an indent of 0. */ if (lno == 0) { tp->ai = 0; return (0); } if (db_get(sp, lno, DBG_FATAL, &t, &len)) return (1); } else t = aitp->lb; /* Count whitespace characters. */ for (p = t; len > 0; ++p, --len) if (!isblank(*p)) break; /* Set count, check for no indentation. */ if ((nlen = (p - t)) == 0) return (0); /* Make sure the buffer's big enough. */ BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + nlen); /* Copy the buffer's current contents up. */ if (tp->len != 0) MEMMOVEW(tp->lb + nlen, tp->lb, tp->len); tp->len += nlen; /* Copy the indentation into the new buffer. */ MEMMOVEW(tp->lb, t, nlen); /* Set the autoindent count. */ tp->ai = nlen; return (0); } /* * txt_backup -- * Back up to the previously edited line. */ static TEXT * txt_backup(SCR *sp, TEXTH *tiqh, TEXT *tp, u_int32_t *flagsp) { VI_PRIVATE *vip; TEXT *ntp; /* Get a handle on the previous TEXT structure. */ if ((ntp = tp->q.cqe_prev) == (void *)tiqh) { if (!FL_ISSET(*flagsp, TXT_REPLAY)) msgq(sp, M_BERR, "193|Already at the beginning of the insert"); return (tp); } /* Bookkeeping. */ ntp->len = ntp->sv_len; /* Handle appending to the line. */ vip = VIP(sp); if (ntp->owrite == 0 && ntp->insert == 0) { ntp->lb[ntp->len] = CH_CURSOR; ++ntp->insert; ++ntp->len; FL_SET(*flagsp, TXT_APPENDEOL); } else FL_CLR(*flagsp, TXT_APPENDEOL); /* Release the current TEXT. */ CIRCLEQ_REMOVE(tiqh, tp, q); text_free(tp); /* Update the old line on the screen. */ if (vs_change(sp, ntp->lno + 1, LINE_DELETE)) return (NULL); /* Return the new/current TEXT. */ return (ntp); } /* * Text indentation is truly strange. ^T and ^D do movements to the next or * previous shiftwidth value, i.e. for a 1-based numbering, with shiftwidth=3, * ^T moves a cursor on the 7th, 8th or 9th column to the 10th column, and ^D * moves it back. * * !!! * The ^T and ^D characters in historical vi had special meaning only when they * were the first characters entered after entering text input mode. As normal * erase characters couldn't erase autoindent characters (^T in this case), it * meant that inserting text into previously existing text was strange -- ^T * only worked if it was the first keystroke(s), and then could only be erased * using ^D. This implementation treats ^T specially anywhere it occurs in the * input, and permits the standard erase characters to erase the characters it * inserts. * * !!! * A fun test is to try: * :se sw=4 ai list * i^Tx^Tx^Tx^Dx^Dx^Dx * Historic vi loses some of the '$' marks on the line ends, but otherwise gets * it right. * * XXX * Technically, txt_dent should be part of the screen interface, as it requires * knowledge of character sizes, including s, on the screen. It's here * because it's a complicated little beast, and I didn't want to shove it down * into the screen. It's probable that KEY_LEN will call into the screen once * there are screens with different character representations. * * txt_dent -- * Handle ^T indents, ^D outdents. * * If anything changes here, check the ex version to see if it needs similar * changes. */ static int txt_dent(SCR *sp, TEXT *tp, int isindent) { CHAR_T ch; u_long sw, ts; size_t cno, current, spaces, target, tabs, off; int ai_reset; ts = O_VAL(sp, O_TABSTOP); sw = O_VAL(sp, O_SHIFTWIDTH); /* * Since we don't know what precedes the character(s) being inserted * (or deleted), the preceding whitespace characters must be resolved. * An example is a , which doesn't need a full shiftwidth number * of columns because it's preceded by s. This is easy to get * if the user sets shiftwidth to a value less than tabstop (or worse, * something for which tabstop isn't a multiple) and then uses ^T to * indent, and ^D to outdent. * * Figure out the current and target screen columns. In the historic * vi, the autoindent column was NOT determined using display widths * of characters as was the wrapmargin column. For that reason, we * can't use the vs_column() function, but have to calculate it here. * This is slow, but it's normally only on the first few characters of * a line. */ for (current = cno = 0; cno < tp->cno; ++cno) current += tp->lb[cno] == '\t' ? COL_OFF(current, ts) : KEY_COL(sp, tp->lb[cno]); target = current; if (isindent) target += COL_OFF(target, sw); else target -= --target % sw; /* * The AI characters will be turned into overwrite characters if the * cursor immediately follows them. We test both the cursor position * and the indent flag because there's no single test. (^T can only * be detected by the cursor position, and while we know that the test * is always true for ^D, the cursor can be in more than one place, as * "0^D" and "^D" are different.) */ ai_reset = !isindent || tp->cno == tp->ai + tp->offset; /* * Back up over any previous characters, changing them into * overwrite characters (including any ai characters). Then figure * out the current screen column. */ for (; tp->cno > tp->offset && (tp->lb[tp->cno - 1] == ' ' || tp->lb[tp->cno - 1] == '\t'); --tp->cno, ++tp->owrite); for (current = cno = 0; cno < tp->cno; ++cno) current += tp->lb[cno] == '\t' ? COL_OFF(current, ts) : KEY_COL(sp, tp->lb[cno]); /* * If we didn't move up to or past the target, it's because there * weren't enough characters to delete, e.g. the first character * of the line was a tp->offset character, and the user entered * ^D to move to the beginning of a line. An example of this is: * * :set ai sw=4iai^T^D * * Otherwise, count up the total spaces/tabs needed to get from the * beginning of the line (or the last non- character) to the * target. */ if (current >= target) spaces = tabs = 0; else { for (cno = current, tabs = 0; cno + COL_OFF(cno, ts) <= target; ++tabs) cno += COL_OFF(cno, ts); spaces = target - cno; } /* If we overwrote ai characters, reset the ai count. */ if (ai_reset) tp->ai = tabs + spaces; /* * Call txt_insch() to insert each character, so that we get the * correct effect when we add a to replace N . */ for (ch = '\t'; tabs > 0; --tabs) (void)txt_insch(sp, tp, &ch, 0); for (ch = ' '; spaces > 0; --spaces) (void)txt_insch(sp, tp, &ch, 0); return (0); } /* * txt_fc -- * File name completion. */ static int txt_fc(SCR *sp, TEXT *tp, int *redrawp) { struct stat sb; ARGS **argv; CHAR_T s_ch; EXCMD cmd; size_t indx, len, nlen, off; int argc, trydir; CHAR_T *p, *t; char *np; size_t nplen; trydir = 0; *redrawp = 0; /* * Find the beginning of this "word" -- if we're at the beginning * of the line, it's a special case. */ if (tp->cno == 1) { len = 0; p = tp->lb; } else retry: for (len = 0, off = tp->cno - 1, p = tp->lb + off;; --off, --p) { if (isblank(*p)) { ++p; break; } ++len; if (off == tp->ai || off == tp->offset) break; } /* * Get enough space for a wildcard character. * * XXX * This won't work for "foo\", since the \ will escape the expansion * character. I'm not sure if that's a bug or not... */ off = p - tp->lb; BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + 1); p = tp->lb + off; s_ch = p[len]; p[len] = '*'; /* Build an ex command, and call the ex expansion routines. */ ex_cinit(sp, &cmd, 0, 0, OOBLNO, OOBLNO, 0); if (argv_exp2(sp, &cmd, p, len + 1)) { p[len] = s_ch; return (0); } argc = cmd.argc; argv = cmd.argv; p[len] = s_ch; switch (argc) { case 0: /* No matches. */ if (!trydir) (void)sp->gp->scr_bell(sp); return (0); case 1: /* One match. */ /* If something changed, do the exchange. */ nlen = STRLEN(cmd.argv[0]->bp); if (len != nlen || MEMCMP(cmd.argv[0]->bp, p, len)) break; /* If haven't done a directory test, do it now. */ INT2CHAR(sp, cmd.argv[0]->bp, cmd.argv[0]->len + 1, np, nplen); if (!trydir && !stat(np, &sb) && S_ISDIR(sb.st_mode)) { p += len; goto isdir; } /* If nothing changed, period, ring the bell. */ if (!trydir) (void)sp->gp->scr_bell(sp); return (0); default: /* Multiple matches. */ *redrawp = 1; if (txt_fc_col(sp, argc, argv)) return (1); /* Find the length of the shortest match. */ for (nlen = cmd.argv[0]->len; --argc > 0;) { if (cmd.argv[argc]->len < nlen) nlen = cmd.argv[argc]->len; for (indx = 0; indx < nlen && cmd.argv[argc]->bp[indx] == cmd.argv[0]->bp[indx]; ++indx); nlen = indx; } break; } /* Overwrite the expanded text first. */ for (t = cmd.argv[0]->bp; len > 0 && nlen > 0; --len, --nlen) *p++ = *t++; /* If lost text, make the remaining old text overwrite characters. */ if (len) { tp->cno -= len; tp->owrite += len; } /* Overwrite any overwrite characters next. */ for (; nlen > 0 && tp->owrite > 0; --nlen, --tp->owrite, ++tp->cno) *p++ = *t++; /* Shift remaining text up, and move the cursor to the end. */ if (nlen) { off = p - tp->lb; BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + nlen); p = tp->lb + off; tp->cno += nlen; tp->len += nlen; if (tp->insert != 0) (void)MEMMOVEW(p + nlen, p, tp->insert); while (nlen--) *p++ = *t++; } /* If a single match and it's a directory, retry it. */ INT2CHAR(sp, cmd.argv[0]->bp, cmd.argv[0]->len + 1, np, nplen); if (argc == 1 && !stat(np, &sb) && S_ISDIR(sb.st_mode)) { isdir: if (tp->owrite == 0) { off = p - tp->lb; BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + 1); p = tp->lb + off; if (tp->insert != 0) (void)MEMMOVEW(p + 1, p, tp->insert); ++tp->len; } else --tp->owrite; ++tp->cno; *p++ = '/'; trydir = 1; goto retry; } return (0); } /* * txt_fc_col -- * Display file names for file name completion. */ static int txt_fc_col(SCR *sp, int argc, ARGS **argv) { ARGS **av; CHAR_T *p; GS *gp; size_t base, cnt, col, colwidth, numrows, numcols, prefix, row; int ac, nf, reset; char *np, *pp; size_t nlen; gp = sp->gp; /* Trim any directory prefix common to all of the files. */ INT2CHAR(sp, argv[0]->bp, argv[0]->len + 1, np, nlen); if ((pp = strrchr(np, '/')) == NULL) prefix = 0; else { prefix = (pp - np) + 1; for (ac = argc - 1, av = argv + 1; ac > 0; --ac, ++av) if (av[0]->len < prefix || MEMCMP(av[0]->bp, argv[0]->bp, prefix)) { prefix = 0; break; } } /* * Figure out the column width for the longest name. Output is done on * 6 character "tab" boundaries for no particular reason. (Since we * don't output tab characters, we ignore the terminal's tab settings.) * Ignore the user's tab setting because we have no idea how reasonable * it is. */ for (ac = argc, av = argv, colwidth = 0; ac > 0; --ac, ++av) { for (col = 0, p = av[0]->bp + prefix; *p != '\0'; ++p) col += KEY_LEN(sp, *p); if (col > colwidth) colwidth = col; } colwidth += COL_OFF(colwidth, 6); /* * Writing to the bottom line of the screen is always turned off when * SC_TINPUT_INFO is set. Turn it back on, we know what we're doing. */ if (F_ISSET(sp, SC_TINPUT_INFO)) { reset = 1; F_CLR(sp, SC_TINPUT_INFO); } else reset = 0; #define CHK_INTR \ if (F_ISSET(gp, G_INTERRUPTED)) \ goto intr; /* If the largest file name is too large, just print them. */ if (colwidth > sp->cols) { for (ac = argc, av = argv; ac > 0; --ac, ++av) { INT2CHAR(sp, av[0]->bp+prefix, av[0]->len+1-prefix, np, nlen); pp = msg_print(sp, np, &nf); (void)ex_printf(sp, "%s\n", pp); if (F_ISSET(gp, G_INTERRUPTED)) break; } if (nf) FREE_SPACE(sp, pp, 0); CHK_INTR; } else { /* Figure out the number of columns. */ numcols = (sp->cols - 1) / colwidth; if (argc > numcols) { numrows = argc / numcols; if (argc % numcols) ++numrows; } else numrows = 1; /* Display the files in sorted order. */ for (row = 0; row < numrows; ++row) { for (base = row, col = 0; col < numcols; ++col) { INT2CHAR(sp, argv[base]->bp+prefix, argv[base]->len+1-prefix, np, nlen); pp = msg_print(sp, np, &nf); cnt = ex_printf(sp, "%s", pp); if (nf) FREE_SPACE(sp, pp, 0); CHK_INTR; if ((base += numrows) >= argc) break; (void)ex_printf(sp, "%*s", (int)(colwidth - cnt), ""); CHK_INTR; } (void)ex_puts(sp, "\n"); CHK_INTR; } (void)ex_puts(sp, "\n"); CHK_INTR; } (void)ex_fflush(sp); if (0) { intr: F_CLR(gp, G_INTERRUPTED); } if (reset) F_SET(sp, SC_TINPUT_INFO); return (0); } /* * txt_emark -- * Set the end mark on the line. */ static int txt_emark(SCR *sp, TEXT *tp, size_t cno) { CHAR_T ch; char *kp; size_t chlen, nlen, olen; CHAR_T *p; ch = CH_ENDMARK; /* * The end mark may not be the same size as the current character. * Don't let the line shift. */ nlen = KEY_LEN(sp, ch); if (tp->lb[cno] == '\t') (void)vs_columns(sp, tp->lb, tp->lno, &cno, &olen); else olen = KEY_LEN(sp, tp->lb[cno]); /* * If the line got longer, well, it's weird, but it's easy. If * it's the same length, it's easy. If it got shorter, we have * to fix it up. */ if (olen > nlen) { BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + olen); chlen = olen - nlen; if (tp->insert != 0) MEMMOVEW(tp->lb + cno + 1 + chlen, tp->lb + cno + 1, tp->insert); tp->len += chlen; tp->owrite += chlen; p = tp->lb + cno; if (tp->lb[cno] == '\t') for (cno += chlen; chlen--;) *p++ = ' '; else for (kp = KEY_NAME(sp, tp->lb[cno]), cno += chlen; chlen--;) *p++ = *kp++; } tp->lb[cno] = ch; return (vs_change(sp, tp->lno, LINE_RESET)); } /* * txt_err -- * Handle an error during input processing. */ static void txt_err(SCR *sp, TEXTH *tiqh) { db_recno_t lno; /* * The problem with input processing is that the cursor is at an * indeterminate position since some input may have been lost due * to a malloc error. So, try to go back to the place from which * the cursor started, knowing that it may no longer be available. * * We depend on at least one line number being set in the text * chain. */ for (lno = tiqh->cqh_first->lno; !db_exist(sp, lno) && lno > 0; --lno); sp->lno = lno == 0 ? 1 : lno; sp->cno = 0; /* Redraw the screen, just in case. */ F_SET(sp, SC_SCR_REDRAW); } /* * txt_hex -- * Let the user insert any character value they want. * * !!! * This is an extension. The pattern "^X[0-9a-fA-F]*" is a way * for the user to specify a character value which their keyboard * may not be able to enter. */ static int txt_hex(SCR *sp, TEXT *tp) { CHAR_T savec; size_t len, off; u_long value; CHAR_T *p, *wp; /* * Null-terminate the string. Since nul isn't a legal hex value, * this should be okay, and lets us use a local routine, which * presumably understands the character set, to convert the value. */ savec = tp->lb[tp->cno]; tp->lb[tp->cno] = 0; /* Find the previous CH_HEX character. */ for (off = tp->cno - 1, p = tp->lb + off, len = 0;; --p, --off, ++len) { if (*p == CH_HEX) { wp = p + 1; break; } /* Not on this line? Shouldn't happen. */ if (off == tp->ai || off == tp->offset) goto nothex; } /* If length of 0, then it wasn't a hex value. */ if (len == 0) goto nothex; /* Get the value. */ errno = 0; value = STRTOL(wp, NULL, 16); if (errno || value > MAX_CHAR_T) { nothex: tp->lb[tp->cno] = savec; return (0); } /* Restore the original character. */ tp->lb[tp->cno] = savec; /* Adjust the bookkeeping. */ tp->cno -= len; tp->len -= len; tp->lb[tp->cno - 1] = value; /* Copy down any overwrite characters. */ if (tp->owrite) MEMMOVEW(tp->lb + tp->cno, tp->lb + tp->cno + len, tp->owrite); /* Copy down any insert characters. */ if (tp->insert) MEMMOVEW(tp->lb + tp->cno + tp->owrite, tp->lb + tp->cno + tp->owrite + len, tp->insert); return (0); } /* * txt_insch -- * * !!! * Historic vi did a special screen optimization for tab characters. As an * example, for the keystrokes "iabcd0C", the tab overwrote the * rest of the string when it was displayed. * * Because early versions of this implementation redisplayed the entire line * on each keystroke, the "bcd" was pushed to the right as it ignored that * the user had "promised" to change the rest of the characters. However, * the historic vi implementation had an even worse bug: given the keystrokes * "iabcd0R", the "bcd" disappears, and magically reappears * on the second key. * * POSIX 1003.2 requires (will require) that this be fixed, specifying that * vi overwrite characters the user has committed to changing, on the basis * of the screen space they require, but that it not overwrite other characters. */ static int txt_insch(SCR *sp, TEXT *tp, CHAR_T *chp, u_int flags) { char *kp; CHAR_T savech; size_t chlen, cno, copydown, olen, nlen; CHAR_T *p; /* * The 'R' command does one-for-one replacement, because there's * no way to know how many characters the user intends to replace. */ if (LF_ISSET(TXT_REPLACE)) { if (tp->owrite) { --tp->owrite; tp->lb[tp->cno++] = *chp; return (0); } } else if (tp->owrite) { /* Overwrite a character. */ cno = tp->cno; /* * If the old or new characters are tabs, then the length of the * display depends on the character position in the display. We * don't even try to handle this here, just ask the screen. */ if (*chp == '\t') { savech = tp->lb[cno]; tp->lb[cno] = '\t'; (void)vs_columns(sp, tp->lb, tp->lno, &cno, &nlen); tp->lb[cno] = savech; } else nlen = KEY_LEN(sp, *chp); /* * Eat overwrite characters until we run out of them or we've * handled the length of the new character. If we only eat * part of an overwrite character, break it into its component * elements and display the remaining components. */ for (copydown = 0; nlen != 0 && tp->owrite != 0;) { --tp->owrite; if (tp->lb[cno] == '\t') (void)vs_columns(sp, tp->lb, tp->lno, &cno, &olen); else olen = KEY_LEN(sp, tp->lb[cno]); if (olen == nlen) { nlen = 0; break; } if (olen < nlen) { ++copydown; nlen -= olen; } else { BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + olen); chlen = olen - nlen; MEMMOVEW(tp->lb + cno + 1 + chlen, tp->lb + cno + 1, tp->owrite + tp->insert); tp->len += chlen; tp->owrite += chlen; if (tp->lb[cno] == '\t') for (p = tp->lb + cno + 1; chlen--;) *p++ = ' '; else for (kp = KEY_NAME(sp, tp->lb[cno]) + nlen, p = tp->lb + cno + 1; chlen--;) *p++ = *kp++; nlen = 0; break; } } /* * If had to erase several characters, we adjust the total * count, and if there are any characters left, shift them * into position. */ if (copydown != 0 && (tp->len -= copydown) != 0) MEMMOVEW(tp->lb + cno, tp->lb + cno + copydown, tp->owrite + tp->insert + copydown); /* If we had enough overwrite characters, we're done. */ if (nlen == 0) { tp->lb[tp->cno++] = *chp; return (0); } } /* Check to see if the character fits into the input buffer. */ BINC_RETW(sp, tp->lb, tp->lb_len, tp->len + 1); ++tp->len; if (tp->insert) { /* Insert a character. */ if (tp->insert == 1) tp->lb[tp->cno + 1] = tp->lb[tp->cno]; else MEMMOVEW(tp->lb + tp->cno + 1, tp->lb + tp->cno, tp->owrite + tp->insert); } tp->lb[tp->cno++] = *chp; return (0); } /* * txt_isrch -- * Do an incremental search. */ static int txt_isrch(SCR *sp, VICMD *vp, TEXT *tp, u_int8_t *is_flagsp) { MARK start; db_recno_t lno; u_int sf; /* If it's a one-line screen, we don't do incrementals. */ if (IS_ONELINE(sp)) { FL_CLR(*is_flagsp, IS_RUNNING); return (0); } /* * If the user erases back to the beginning of the buffer, there's * nothing to search for. Reset the cursor to the starting point. */ if (tp->cno <= 1) { vp->m_final = vp->m_start; return (0); } /* * If it's an RE quote character, and not quoted, ignore it until * we get another character. */ if (tp->lb[tp->cno - 1] == '\\' && (tp->cno == 2 || tp->lb[tp->cno - 2] != '\\')) return (0); /* * If it's a magic shell character, and not quoted, reset the cursor * to the starting point. */ if (strchr(O_STR(sp, O_SHELLMETA), tp->lb[tp->cno - 1]) != NULL && (tp->cno == 2 || tp->lb[tp->cno - 2] != '\\')) vp->m_final = vp->m_start; /* * If we see the search pattern termination character, then quit doing * an incremental search. There may be more, e.g., ":/foo/;/bar/", * and we can't handle that incrementally. Also, reset the cursor to * the original location, the ex search routines don't know anything * about incremental searches. */ if (tp->lb[0] == tp->lb[tp->cno - 1] && (tp->cno == 2 || tp->lb[tp->cno - 2] != '\\')) { vp->m_final = vp->m_start; FL_CLR(*is_flagsp, IS_RUNNING); return (0); } /* * Remember the input line and discard the special input map, * but don't overwrite the input line on the screen. */ lno = tp->lno; F_SET(VIP(sp), VIP_S_MODELINE); F_CLR(sp, SC_TINPUT | SC_TINPUT_INFO); if (txt_map_end(sp)) return (1); /* * Specify a starting point and search. If we find a match, move to * it and refresh the screen. If we didn't find the match, then we * beep the screen. When searching from the original cursor position, * we have to move the cursor, otherwise, we don't want to move the * cursor in case the text at the current position continues to match. */ if (FL_ISSET(*is_flagsp, IS_RESTART)) { start = vp->m_start; sf = SEARCH_SET; } else { start = vp->m_final; sf = SEARCH_INCR | SEARCH_SET; } if (tp->lb[0] == '/' ? !f_search(sp, &start, &vp->m_final, tp->lb + 1, tp->cno - 1, NULL, sf) : !b_search(sp, &start, &vp->m_final, tp->lb + 1, tp->cno - 1, NULL, sf)) { sp->lno = vp->m_final.lno; sp->cno = vp->m_final.cno; FL_CLR(*is_flagsp, IS_RESTART); if (!KEYS_WAITING(sp) && vs_refresh(sp, 0)) return (1); } else FL_SET(*is_flagsp, IS_RESTART); /* Reinstantiate the special input map. */ if (txt_map_init(sp)) return (1); F_CLR(VIP(sp), VIP_S_MODELINE); F_SET(sp, SC_TINPUT | SC_TINPUT_INFO); /* Reset the line number of the input line. */ tp->lno = TMAP[0].lno; /* * If the colon command-line moved, i.e. the screen scrolled, * refresh the input line. * * XXX * We shouldn't be calling vs_line, here -- we need dirty bits * on entries in the SMAP array. */ if (lno != TMAP[0].lno) { if (vs_line(sp, &TMAP[0], NULL, NULL)) return (1); (void)sp->gp->scr_refresh(sp, 0); } return (0); } /* * txt_resolve -- * Resolve the input text chain into the file. */ static int txt_resolve(SCR *sp, TEXTH *tiqh, u_int32_t flags) { VI_PRIVATE *vip; TEXT *tp; db_recno_t lno; int changed; /* * The first line replaces a current line, and all subsequent lines * are appended into the file. Resolve autoindented characters for * each line before committing it. If the latter causes the line to * change, we have to redisplay it, otherwise the information cached * about the line will be wrong. */ vip = VIP(sp); tp = tiqh->cqh_first; if (LF_ISSET(TXT_AUTOINDENT)) txt_ai_resolve(sp, tp, &changed); else changed = 0; if (db_set(sp, tp->lno, tp->lb, tp->len) || changed && vs_change(sp, tp->lno, LINE_RESET)) return (1); for (lno = tp->lno; (tp = tp->q.cqe_next) != (void *)&sp->tiq; ++lno) { if (LF_ISSET(TXT_AUTOINDENT)) txt_ai_resolve(sp, tp, &changed); else changed = 0; if (db_append(sp, 0, lno, tp->lb, tp->len) || changed && vs_change(sp, tp->lno, LINE_RESET)) return (1); } /* * Clear the input flag, the look-aside buffer is no longer valid. * Has to be done as part of text resolution, or upon return we'll * be looking at incorrect data. */ F_CLR(sp, SC_TINPUT); return (0); } /* * txt_showmatch -- * Show a character match. * * !!! * Historic vi tried to display matches even in the :colon command line. * I think not. */ static int txt_showmatch(SCR *sp, TEXT *tp) { GS *gp; VCS cs; MARK m; int cnt, endc, startc; gp = sp->gp; /* * Do a refresh first, in case we haven't done one in awhile, * so the user can see what we're complaining about. */ UPDATE_POSITION(sp, tp); if (vs_refresh(sp, 1)) return (1); /* * We don't display the match if it's not on the screen. Find * out what the first character on the screen is. */ if (vs_sm_position(sp, &m, 0, P_TOP)) return (1); /* Initialize the getc() interface. */ cs.cs_lno = tp->lno; cs.cs_cno = tp->cno - 1; if (cs_init(sp, &cs)) return (1); startc = (endc = cs.cs_ch) == ')' ? '(' : '{'; /* Search for the match. */ for (cnt = 1;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags != 0) { if (cs.cs_flags == CS_EOF || cs.cs_flags == CS_SOF) { msgq(sp, M_BERR, "Unmatched %s", KEY_NAME(sp, endc)); return (0); } continue; } if (cs.cs_ch == endc) ++cnt; else if (cs.cs_ch == startc && --cnt == 0) break; } /* If the match is on the screen, move to it. */ if (cs.cs_lno < m.lno || cs.cs_lno == m.lno && cs.cs_cno < m.cno) return (0); sp->lno = cs.cs_lno; sp->cno = cs.cs_cno; if (vs_refresh(sp, 1)) return (1); /* Wait for timeout or character arrival. */ return (v_event_get(sp, NULL, O_VAL(sp, O_MATCHTIME) * 100, EC_TIMEOUT)); } /* * txt_margin -- * Handle margin wrap. */ static int txt_margin(SCR *sp, TEXT *tp, TEXT *wmtp, int *didbreak, u_int32_t flags) { VI_PRIVATE *vip; size_t len, off; CHAR_T *p, *wp; /* Find the nearest previous blank. */ for (off = tp->cno - 1, p = tp->lb + off, len = 0;; --off, --p, ++len) { if (isblank(*p)) { wp = p + 1; break; } /* * If reach the start of the line, there's nowhere to break. * * !!! * Historic vi belled each time a character was entered after * crossing the margin until a space was entered which could * be used to break the line. I don't as it tends to wake the * cats. */ if (off == tp->ai || off == tp->offset) { *didbreak = 0; return (0); } } /* * Store saved information about the rest of the line in the * wrapmargin TEXT structure. * * !!! * The offset field holds the length of the current characters * that the user entered, but which are getting split to the new * line -- it's going to be used to set the cursor value when we * move to the new line. */ vip = VIP(sp); wmtp->lb = p + 1; wmtp->offset = len; wmtp->insert = LF_ISSET(TXT_APPENDEOL) ? tp->insert - 1 : tp->insert; wmtp->owrite = tp->owrite; /* Correct current bookkeeping information. */ tp->cno -= len; if (LF_ISSET(TXT_APPENDEOL)) { tp->len -= len + tp->owrite + (tp->insert - 1); tp->insert = 1; } else { tp->len -= len + tp->owrite + tp->insert; tp->insert = 0; } tp->owrite = 0; /* * !!! * Delete any trailing whitespace from the current line. */ for (;; --p, --off) { if (!isblank(*p)) break; --tp->cno; --tp->len; if (off == tp->ai || off == tp->offset) break; } *didbreak = 1; return (0); } /* * txt_Rresolve -- * Resolve the input line for the 'R' command. */ static void txt_Rresolve(SCR *sp, TEXTH *tiqh, TEXT *tp, const size_t orig_len) { TEXT *ttp; size_t input_len, retain; CHAR_T *p; /* * Check to make sure that the cursor hasn't moved beyond * the end of the line. */ if (tp->owrite == 0) return; /* * Calculate how many characters the user has entered, * plus the blanks erased by /s. */ for (ttp = tiqh->cqh_first, input_len = 0;;) { input_len += ttp == tp ? tp->cno : ttp->len + ttp->R_erase; if ((ttp = ttp->q.cqe_next) == (void *)&sp->tiq) break; } /* * If the user has entered less characters than the original line * was long, restore any overwriteable characters to the original * characters. These characters are entered as "insert characters", * because they're after the cursor and we don't want to lose them. * (This is okay because the R command has no insert characters.) * We set owrite to 0 so that the insert characters don't get copied * to somewhere else, which means that the line and the length have * to be adjusted here as well. * * We have to retrieve the original line because the original pinned * page has long since been discarded. If it doesn't exist, that's * okay, the user just extended the file. */ if (input_len < orig_len) { retain = MIN(tp->owrite, orig_len - input_len); if (db_get(sp, tiqh->cqh_first->lno, DBG_FATAL | DBG_NOCACHE, &p, NULL)) return; MEMCPYW(tp->lb + tp->cno, p + input_len, retain); tp->len -= tp->owrite - retain; tp->owrite = 0; tp->insert += retain; } } /* * txt_nomorech -- * No more characters message. */ static void txt_nomorech(SCR *sp) { msgq(sp, M_BERR, "194|No more characters to erase"); } nvi-1.81.6/vi/v_ulcase.c0100644000076400001440000000710610720065506014041 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_ulcase.c,v 10.11 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static int ulcase __P((SCR *, db_recno_t, CHAR_T *, size_t, size_t, size_t)); /* * v_ulcase -- [count]~ * Toggle upper & lower case letters. * * !!! * Historic vi didn't permit ~ to cross newline boundaries. I can * think of no reason why it shouldn't, which at least lets the user * auto-repeat through a paragraph. * * !!! * In historic vi, the count was ignored. It would have been better * if there had been an associated motion, but it's too late to make * that the default now. * * PUBLIC: int v_ulcase __P((SCR *, VICMD *)); */ int v_ulcase(SCR *sp, VICMD *vp) { db_recno_t lno; size_t cno, lcnt, len; u_long cnt; CHAR_T *p; lno = vp->m_start.lno; cno = vp->m_start.cno; for (cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cnt > 0; cno = 0) { /* SOF is an error, EOF is an infinite count sink. */ if (db_get(sp, lno, 0, &p, &len)) { if (lno == 1) { v_emsg(sp, NULL, VIM_EMPTY); return (1); } --lno; break; } /* Empty lines decrement the count by one. */ if (len == 0) { --cnt; vp->m_final.cno = 0; continue; } if (cno + cnt >= len) { lcnt = len - 1; cnt -= len - cno; vp->m_final.cno = len - 1; } else { lcnt = cno + cnt - 1; cnt = 0; vp->m_final.cno = lcnt + 1; } if (ulcase(sp, lno, p, len, cno, lcnt)) return (1); if (cnt > 0) ++lno; } vp->m_final.lno = lno; return (0); } /* * v_mulcase -- [count]~[count]motion * Toggle upper & lower case letters over a range. * * PUBLIC: int v_mulcase __P((SCR *, VICMD *)); */ int v_mulcase(SCR *sp, VICMD *vp) { CHAR_T *p; size_t len; db_recno_t lno; for (lno = vp->m_start.lno;;) { if (db_get(sp, lno, DBG_FATAL, &p, &len)) return (1); if (len != 0 && ulcase(sp, lno, p, len, lno == vp->m_start.lno ? vp->m_start.cno : 0, !F_ISSET(vp, VM_LMODE) && lno == vp->m_stop.lno ? vp->m_stop.cno : len)) return (1); if (++lno > vp->m_stop.lno) break; } /* * XXX * I didn't create a new motion command when I added motion semantics * for ~. While that's the correct way to do it, that choice would * have required changes all over the vi directory for little gain. * Instead, we pretend it's a yank command. Note, this means that we * follow the cursor motion rules for yank commands, but that seems * reasonable to me. */ return (0); } /* * ulcase -- * Change part of a line's case. */ static int ulcase(SCR *sp, db_recno_t lno, CHAR_T *lp, size_t len, size_t scno, size_t ecno) { size_t blen; int change, rval; CHAR_T ch, *p, *t; CHAR_T *bp; GET_SPACE_RETW(sp, bp, blen, len); MEMMOVEW(bp, lp, len); change = rval = 0; for (p = bp + scno, t = bp + ecno + 1; p < t; ++p) { ch = *(u_char *)p; if (islower(ch)) { *p = toupper(ch); change = 1; } else if (isupper(ch)) { *p = tolower(ch); change = 1; } } if (change && db_set(sp, lno, bp, len)) rval = 1; FREE_SPACEW(sp, bp, blen); return (rval); } nvi-1.81.6/vi/v_undo.c0100644000076400001440000001056210720065506013532 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_undo.c,v 10.6 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_Undo -- U * Undo changes to this line. * * PUBLIC: int v_Undo __P((SCR *, VICMD *)); */ int v_Undo(SCR *sp, VICMD *vp) { /* * Historically, U reset the cursor to the first column in the line * (not the first non-blank). This seems a bit non-intuitive, but, * considering that we may have undone multiple changes, anything * else (including the cursor position stored in the logging records) * is going to appear random. */ vp->m_final.cno = 0; /* * !!! * Set up the flags so that an immediately subsequent 'u' will roll * forward, instead of backward. In historic vi, a 'u' following a * 'U' redid all of the changes to the line. Given that the user has * explicitly discarded those changes by entering 'U', it seems likely * that the user wants something between the original and end forms of * the line, so starting to replay the changes seems the best way to * get to there. */ F_SET(sp->ep, F_UNDO); sp->ep->lundo = BACKWARD; return (log_setline(sp)); } /* * v_undo -- u * Undo the last change. * * PUBLIC: int v_undo __P((SCR *, VICMD *)); */ int v_undo(SCR *sp, VICMD *vp) { EXF *ep; /* Set the command count. */ VIP(sp)->u_ccnt = sp->ccnt; /* * !!! * In historic vi, 'u' toggled between "undo" and "redo", i.e. 'u' * undid the last undo. However, if there has been a change since * the last undo/redo, we always do an undo. To make this work when * the user can undo multiple operations, we leave the old semantic * unchanged, but make '.' after a 'u' do another undo/redo operation. * This has two problems. * * The first is that 'u' didn't set '.' in historic vi. So, if a * user made a change, realized it was in the wrong place, does a * 'u' to undo it, moves to the right place and then does '.', the * change was reapplied. To make this work, we only apply the '.' * to the undo command if it's the command immediately following an * undo command. See vi/vi.c:getcmd() for the details. * * The second is that the traditional way to view the numbered cut * buffers in vi was to enter the commands "1pu.u.u.u. which will * no longer work because the '.' immediately follows the 'u' command. * Since we provide a much better method of viewing buffers, and * nobody can think of a better way of adding in multiple undo, this * remains broken. * * !!! * There is change to historic practice for the final cursor position * in this implementation. In historic vi, if an undo was isolated to * a single line, the cursor moved to the start of the change, and * then, subsequent 'u' commands would not move it again. (It has been * pointed out that users used multiple undo commands to get the cursor * to the start of the changed text.) Nvi toggles between the cursor * position before and after the change was made. One final issue is * that historic vi only did this if the user had not moved off of the * line before entering the undo command; otherwise, vi would move the * cursor to the most attractive position on the changed line. * * It would be difficult to match historic practice in this area. You * not only have to know that the changes were isolated to one line, * but whether it was the first or second undo command as well. And, * to completely match historic practice, we'd have to track users line * changes, too. This isn't worth the effort. */ ep = sp->ep; if (!F_ISSET(ep, F_UNDO)) { F_SET(ep, F_UNDO); ep->lundo = BACKWARD; } else if (!F_ISSET(vp, VC_ISDOT)) ep->lundo = ep->lundo == BACKWARD ? FORWARD : BACKWARD; switch (ep->lundo) { case BACKWARD: return (log_backward(sp, &vp->m_final)); case FORWARD: return (log_forward(sp, &vp->m_final)); default: abort(); } /* NOTREACHED */ } nvi-1.81.6/vi/v_util.c0100644000076400001440000000606210720065506013542 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_util.c,v 10.14 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_eof -- * Vi end-of-file error. * * PUBLIC: void v_eof __P((SCR *, MARK *)); */ void v_eof(SCR *sp, MARK *mp) { db_recno_t lno; if (mp == NULL) v_emsg(sp, NULL, VIM_EOF); else { if (db_last(sp, &lno)) return; if (mp->lno >= lno) v_emsg(sp, NULL, VIM_EOF); else msgq(sp, M_BERR, "195|Movement past the end-of-file"); } } /* * v_eol -- * Vi end-of-line error. * * PUBLIC: void v_eol __P((SCR *, MARK *)); */ void v_eol(SCR *sp, MARK *mp) { size_t len; if (mp == NULL) v_emsg(sp, NULL, VIM_EOL); else { if (db_get(sp, mp->lno, DBG_FATAL, NULL, &len)) return; if (mp->cno == len - 1) v_emsg(sp, NULL, VIM_EOL); else msgq(sp, M_BERR, "196|Movement past the end-of-line"); } } /* * v_nomove -- * Vi no cursor movement error. * * PUBLIC: void v_nomove __P((SCR *)); */ void v_nomove(SCR *sp) { msgq(sp, M_BERR, "197|No cursor movement made"); } /* * v_sof -- * Vi start-of-file error. * * PUBLIC: void v_sof __P((SCR *, MARK *)); */ void v_sof(SCR *sp, MARK *mp) { if (mp == NULL || mp->lno == 1) msgq(sp, M_BERR, "198|Already at the beginning of the file"); else msgq(sp, M_BERR, "199|Movement past the beginning of the file"); } /* * v_sol -- * Vi start-of-line error. * * PUBLIC: void v_sol __P((SCR *)); */ void v_sol(SCR *sp) { msgq(sp, M_BERR, "200|Already in the first column"); } /* * v_isempty -- * Return if the line contains nothing but white-space characters. * * PUBLIC: int v_isempty __P((CHAR_T *, size_t)); */ int v_isempty(CHAR_T *p, size_t len) { for (; len--; ++p) if (!isblank(*p)) return (0); return (1); } /* * v_emsg -- * Display a few common vi messages. * * PUBLIC: void v_emsg __P((SCR *, char *, vim_t)); */ void v_emsg(SCR *sp, char *p, vim_t which) { switch (which) { case VIM_COMBUF: msgq(sp, M_ERR, "201|Buffers should be specified before the command"); break; case VIM_EMPTY: msgq(sp, M_BERR, "209|The file is empty"); break; case VIM_EOF: msgq(sp, M_BERR, "202|Already at end-of-file"); break; case VIM_EOL: msgq(sp, M_BERR, "203|Already at end-of-line"); break; case VIM_NOCOM: case VIM_NOCOM_B: msgq(sp, which == VIM_NOCOM_B ? M_BERR : M_ERR, "204|%s isn't a vi command", p); break; case VIM_WRESIZE: msgq(sp, M_ERR, "Window resize interrupted text input mode"); break; case VIM_USAGE: msgq(sp, M_ERR, "205|Usage: %s", p); break; } } nvi-1.81.6/vi/v_word.c0100644000076400001440000003203710720065506013541 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_word.c,v 10.6 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * There are two types of "words". Bigwords are easy -- groups of anything * delimited by whitespace. Normal words are trickier. They are either a * group of characters, numbers and underscores, or a group of anything but, * delimited by whitespace. When for a word, if you're in whitespace, it's * easy, just remove the whitespace and go to the beginning or end of the * word. Otherwise, figure out if the next character is in a different group. * If it is, go to the beginning or end of that group, otherwise, go to the * beginning or end of the current group. The historic version of vi didn't * get this right, so, for example, there were cases where "4e" was not the * same as "eeee" -- in particular, single character words, and commands that * began in whitespace were almost always handled incorrectly. To get it right * you have to resolve the cursor after each search so that the look-ahead to * figure out what type of "word" the cursor is in will be correct. * * Empty lines, and lines that consist of only white-space characters count * as a single word, and the beginning and end of the file counts as an * infinite number of words. * * Movements associated with commands are different than movement commands. * For example, in "abc def", with the cursor on the 'a', "cw" is from * 'a' to 'c', while "w" is from 'a' to 'd'. In general, trailing white * space is discarded from the change movement. Another example is that, * in the same string, a "cw" on any white space character replaces that * single character, and nothing else. Ain't nothin' in here that's easy. * * One historic note -- in the original vi, the 'w', 'W' and 'B' commands * would treat groups of empty lines as individual words, i.e. the command * would move the cursor to each new empty line. The 'e' and 'E' commands * would treat groups of empty lines as a single word, i.e. the first use * would move past the group of lines. The 'b' command would just beep at * you, or, if you did it from the start of the line as part of a motion * command, go absolutely nuts. If the lines contained only white-space * characters, the 'w' and 'W' commands would just beep at you, and the 'B', * 'b', 'E' and 'e' commands would treat the group as a single word, and * the 'B' and 'b' commands will treat the lines as individual words. This * implementation treats all of these cases as a single white-space word. */ enum which {BIGWORD, LITTLEWORD}; static int bword __P((SCR *, VICMD *, enum which)); static int eword __P((SCR *, VICMD *, enum which)); static int fword __P((SCR *, VICMD *, enum which)); /* * v_wordW -- [count]W * Move forward a bigword at a time. * * PUBLIC: int v_wordW __P((SCR *, VICMD *)); */ int v_wordW(SCR *sp, VICMD *vp) { return (fword(sp, vp, BIGWORD)); } /* * v_wordw -- [count]w * Move forward a word at a time. * * PUBLIC: int v_wordw __P((SCR *, VICMD *)); */ int v_wordw(SCR *sp, VICMD *vp) { return (fword(sp, vp, LITTLEWORD)); } /* * fword -- * Move forward by words. */ static int fword(SCR *sp, VICMD *vp, enum which type) { enum { INWORD, NOTWORD } state; VCS cs; u_long cnt; cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cs.cs_lno = vp->m_start.lno; cs.cs_cno = vp->m_start.cno; if (cs_init(sp, &cs)) return (1); /* * If in white-space: * If the count is 1, and it's a change command, we're done. * Else, move to the first non-white-space character, which * counts as a single word move. If it's a motion command, * don't move off the end of the line. */ if (cs.cs_flags == CS_EMP || cs.cs_flags == 0 && isblank(cs.cs_ch)) { if (ISMOTION(vp) && cs.cs_flags != CS_EMP && cnt == 1) { if (ISCMD(vp->rkp, 'c')) return (0); if (ISCMD(vp->rkp, 'd') || ISCMD(vp->rkp, 'y')) { if (cs_fspace(sp, &cs)) return (1); goto ret; } } if (cs_fblank(sp, &cs)) return (1); --cnt; } /* * Cyclically move to the next word -- this involves skipping * over word characters and then any trailing non-word characters. * Note, for the 'w' command, the definition of a word keeps * switching. */ if (type == BIGWORD) while (cnt--) { for (;;) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; } /* * If a motion command and we're at the end of the * last word, we're done. Delete and yank eat any * trailing blanks, but we don't move off the end * of the line regardless. */ if (cnt == 0 && ISMOTION(vp)) { if ((ISCMD(vp->rkp, 'd') || ISCMD(vp->rkp, 'y')) && cs_fspace(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs_fblank(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; } else while (cnt--) { state = cs.cs_flags == 0 && inword(cs.cs_ch) ? INWORD : NOTWORD; for (;;) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; if (state == INWORD) { if (!inword(cs.cs_ch)) break; } else if (inword(cs.cs_ch)) break; } /* See comment above. */ if (cnt == 0 && ISMOTION(vp)) { if ((ISCMD(vp->rkp, 'd') || ISCMD(vp->rkp, 'y')) && cs_fspace(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs.cs_flags != 0 || isblank(cs.cs_ch)) if (cs_fblank(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; } /* * If we didn't move, we must be at EOF. * * !!! * That's okay for motion commands, however. */ ret: if (!ISMOTION(vp) && cs.cs_lno == vp->m_start.lno && cs.cs_cno == vp->m_start.cno) { v_eof(sp, &vp->m_start); return (1); } /* Adjust the end of the range for motion commands. */ vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; if (ISMOTION(vp) && cs.cs_flags == 0) --vp->m_stop.cno; /* * Non-motion commands move to the end of the range. Delete * and yank stay at the start, ignore others. */ vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } /* * v_wordE -- [count]E * Move forward to the end of the bigword. * * PUBLIC: int v_wordE __P((SCR *, VICMD *)); */ int v_wordE(SCR *sp, VICMD *vp) { return (eword(sp, vp, BIGWORD)); } /* * v_worde -- [count]e * Move forward to the end of the word. * * PUBLIC: int v_worde __P((SCR *, VICMD *)); */ int v_worde(SCR *sp, VICMD *vp) { return (eword(sp, vp, LITTLEWORD)); } /* * eword -- * Move forward to the end of the word. */ static int eword(SCR *sp, VICMD *vp, enum which type) { enum { INWORD, NOTWORD } state; VCS cs; u_long cnt; cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cs.cs_lno = vp->m_start.lno; cs.cs_cno = vp->m_start.cno; if (cs_init(sp, &cs)) return (1); /* * !!! * If in whitespace, or the next character is whitespace, move past * it. (This doesn't count as a word move.) Stay at the character * past the current one, it sets word "state" for the 'e' command. */ if (cs.cs_flags == 0 && !isblank(cs.cs_ch)) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == 0 && !isblank(cs.cs_ch)) goto start; } if (cs_fblank(sp, &cs)) return (1); /* * Cyclically move to the next word -- this involves skipping * over word characters and then any trailing non-word characters. * Note, for the 'e' command, the definition of a word keeps * switching. */ start: if (type == BIGWORD) while (cnt--) { for (;;) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; } /* * When we reach the start of the word after the last * word, we're done. If we changed state, back up one * to the end of the previous word. */ if (cnt == 0) { if (cs.cs_flags == 0 && cs_prev(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs_fblank(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; } else while (cnt--) { state = cs.cs_flags == 0 && inword(cs.cs_ch) ? INWORD : NOTWORD; for (;;) { if (cs_next(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; if (state == INWORD) { if (!inword(cs.cs_ch)) break; } else if (inword(cs.cs_ch)) break; } /* See comment above. */ if (cnt == 0) { if (cs.cs_flags == 0 && cs_prev(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs.cs_flags != 0 || isblank(cs.cs_ch)) if (cs_fblank(sp, &cs)) return (1); if (cs.cs_flags == CS_EOF) goto ret; } /* * If we didn't move, we must be at EOF. * * !!! * That's okay for motion commands, however. */ ret: if (!ISMOTION(vp) && cs.cs_lno == vp->m_start.lno && cs.cs_cno == vp->m_start.cno) { v_eof(sp, &vp->m_start); return (1); } /* Set the end of the range for motion commands. */ vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; /* * Non-motion commands move to the end of the range. * Delete and yank stay at the start, ignore others. */ vp->m_final = ISMOTION(vp) ? vp->m_start : vp->m_stop; return (0); } /* * v_WordB -- [count]B * Move backward a bigword at a time. * * PUBLIC: int v_wordB __P((SCR *, VICMD *)); */ int v_wordB(SCR *sp, VICMD *vp) { return (bword(sp, vp, BIGWORD)); } /* * v_wordb -- [count]b * Move backward a word at a time. * * PUBLIC: int v_wordb __P((SCR *, VICMD *)); */ int v_wordb(SCR *sp, VICMD *vp) { return (bword(sp, vp, LITTLEWORD)); } /* * bword -- * Move backward by words. */ static int bword(SCR *sp, VICMD *vp, enum which type) { enum { INWORD, NOTWORD } state; VCS cs; u_long cnt; cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; cs.cs_lno = vp->m_start.lno; cs.cs_cno = vp->m_start.cno; if (cs_init(sp, &cs)) return (1); /* * !!! * If in whitespace, or the previous character is whitespace, move * past it. (This doesn't count as a word move.) Stay at the * character before the current one, it sets word "state" for the * 'b' command. */ if (cs.cs_flags == 0 && !isblank(cs.cs_ch)) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags == 0 && !isblank(cs.cs_ch)) goto start; } if (cs_bblank(sp, &cs)) return (1); /* * Cyclically move to the beginning of the previous word -- this * involves skipping over word characters and then any trailing * non-word characters. Note, for the 'b' command, the definition * of a word keeps switching. */ start: if (type == BIGWORD) while (cnt--) { for (;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags == CS_SOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; } /* * When we reach the end of the word before the last * word, we're done. If we changed state, move forward * one to the end of the next word. */ if (cnt == 0) { if (cs.cs_flags == 0 && cs_next(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs_bblank(sp, &cs)) return (1); if (cs.cs_flags == CS_SOF) goto ret; } else while (cnt--) { state = cs.cs_flags == 0 && inword(cs.cs_ch) ? INWORD : NOTWORD; for (;;) { if (cs_prev(sp, &cs)) return (1); if (cs.cs_flags == CS_SOF) goto ret; if (cs.cs_flags != 0 || isblank(cs.cs_ch)) break; if (state == INWORD) { if (!inword(cs.cs_ch)) break; } else if (inword(cs.cs_ch)) break; } /* See comment above. */ if (cnt == 0) { if (cs.cs_flags == 0 && cs_next(sp, &cs)) return (1); break; } /* Eat whitespace characters. */ if (cs.cs_flags != 0 || isblank(cs.cs_ch)) if (cs_bblank(sp, &cs)) return (1); if (cs.cs_flags == CS_SOF) goto ret; } /* If we didn't move, we must be at SOF. */ ret: if (cs.cs_lno == vp->m_start.lno && cs.cs_cno == vp->m_start.cno) { v_sof(sp, &vp->m_start); return (1); } /* Set the end of the range for motion commands. */ vp->m_stop.lno = cs.cs_lno; vp->m_stop.cno = cs.cs_cno; /* * All commands move to the end of the range. Motion commands * adjust the starting point to the character before the current * one. * * !!! * The historic vi didn't get this right -- the `yb' command yanked * the right stuff and even updated the cursor value, but the cursor * was not actually updated on the screen. */ vp->m_final = vp->m_stop; if (ISMOTION(vp)) --vp->m_start.cno; return (0); } nvi-1.81.6/vi/v_xchar.c0100644000076400001440000000441110720065506013666 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_xchar.c,v 10.10 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_xchar -- [buffer] [count]x * Deletes the character(s) on which the cursor sits. * * PUBLIC: int v_xchar __P((SCR *, VICMD *)); */ int v_xchar(SCR *sp, VICMD *vp) { size_t len; int isempty; if (db_eget(sp, vp->m_start.lno, NULL, &len, &isempty)) { if (isempty) goto nodel; return (1); } if (len == 0) { nodel: msgq(sp, M_BERR, "206|No characters to delete"); return (1); } /* * Delete from the cursor toward the end of line, w/o moving the * cursor. * * !!! * Note, "2x" at EOL isn't the same as "xx" because the left movement * of the cursor as part of the 'x' command isn't taken into account. * Historically correct. */ if (F_ISSET(vp, VC_C1SET)) vp->m_stop.cno += vp->count - 1; if (vp->m_stop.cno >= len - 1) { vp->m_stop.cno = len - 1; vp->m_final.cno = vp->m_start.cno ? vp->m_start.cno - 1 : 0; } else vp->m_final.cno = vp->m_start.cno; if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, 0)) return (1); return (del(sp, &vp->m_start, &vp->m_stop, 0)); } /* * v_Xchar -- [buffer] [count]X * Deletes the character(s) immediately before the current cursor * position. * * PUBLIC: int v_Xchar __P((SCR *, VICMD *)); */ int v_Xchar(SCR *sp, VICMD *vp) { u_long cnt; if (vp->m_start.cno == 0) { v_sol(sp); return (1); } cnt = F_ISSET(vp, VC_C1SET) ? vp->count : 1; if (cnt >= vp->m_start.cno) vp->m_start.cno = 0; else vp->m_start.cno -= cnt; --vp->m_stop.cno; vp->m_final.cno = vp->m_start.cno; if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, 0)) return (1); return (del(sp, &vp->m_start, &vp->m_stop, 0)); } nvi-1.81.6/vi/v_yank.c0100644000076400001440000000456610720065506013536 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_yank.c,v 10.10 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_yank -- [buffer][count]y[count][motion] * [buffer][count]Y * Yank text (or lines of text) into a cut buffer. * * !!! * Historic vi moved the cursor to the from MARK if it was before the current * cursor and on a different line, e.g., "yk" moves the cursor but "yj" and * "yl" do not. Unfortunately, it's too late to change this now. Matching * the historic semantics isn't easy. The line number was always changed and * column movement was usually relative. However, "y'a" moved the cursor to * the first non-blank of the line marked by a, while "y`a" moved the cursor * to the line and column marked by a. Hopefully, the motion component code * got it right... Unlike delete, we make no adjustments here. * * PUBLIC: int v_yank __P((SCR *, VICMD *)); */ int v_yank(SCR *sp, VICMD *vp) { size_t len; if (cut(sp, F_ISSET(vp, VC_BUFFER) ? &vp->buffer : NULL, &vp->m_start, &vp->m_stop, F_ISSET(vp, VM_LMODE) ? CUT_LINEMODE : 0)) return (1); sp->rptlines[L_YANKED] += (vp->m_stop.lno - vp->m_start.lno) + 1; /* * One special correction, in case we've deleted the current line or * character. We check it here instead of checking in every command * that can be a motion component. */ if (db_get(sp, vp->m_final.lno, DBG_FATAL, NULL, &len)) return (1); /* * !!! * Cursor movements, other than those caused by a line mode command * moving to another line, historically reset the relative position. * * This currently matches the check made in v_delete(), I'm hoping * that they should be consistent... */ if (!F_ISSET(vp, VM_LMODE)) { F_CLR(vp, VM_RCM_MASK); F_SET(vp, VM_RCM_SET); /* Make sure the set cursor position exists. */ if (vp->m_final.cno >= len) vp->m_final.cno = len ? len - 1 : 0; } return (0); } nvi-1.81.6/vi/v_z.c0100644000076400001440000000706610720065506013043 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_z.c,v 10.12 2001/06/25 15:19:36 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:36 $"; #endif /* not lint */ #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_z -- [count]z[count][-.+^] * Move the screen. * * PUBLIC: int v_z __P((SCR *, VICMD *)); */ int v_z(SCR *sp, VICMD *vp) { db_recno_t lno; u_int value; /* * The first count is the line to use. If the value doesn't * exist, use the last line. */ if (F_ISSET(vp, VC_C1SET)) { lno = vp->count; if (!db_exist(sp, lno) && db_last(sp, &lno)) return (1); } else lno = vp->m_start.lno; /* Set default return cursor line. */ vp->m_final.lno = lno; vp->m_final.cno = vp->m_start.cno; /* * The second count is the displayed window size, i.e. the 'z' command * is another way to get artificially small windows. Note, you can't * grow beyond the size of the window. * * !!! * A window size of 0 was historically allowed, and simply ignored. * This could be much more simply done by modifying the value of the * O_WINDOW option, but that's not how it worked historically. */ if (F_ISSET(vp, VC_C2SET) && vp->count2 != 0) { if (vp->count2 > O_VAL(sp, O_WINDOW)) vp->count2 = O_VAL(sp, O_WINDOW); if (vs_crel(sp, vp->count2)) return (1); } switch (vp->character) { case '-': /* Put the line at the bottom. */ if (vs_sm_fill(sp, lno, P_BOTTOM)) return (1); break; case '.': /* Put the line in the middle. */ if (vs_sm_fill(sp, lno, P_MIDDLE)) return (1); break; case '+': /* * If the user specified a line number, put that line at the * top and move the cursor to it. Otherwise, scroll forward * a screen from the current screen. */ if (F_ISSET(vp, VC_C1SET)) { if (vs_sm_fill(sp, lno, P_TOP)) return (1); if (vs_sm_position(sp, &vp->m_final, 0, P_TOP)) return (1); } else if (vs_sm_scroll(sp, &vp->m_final, sp->t_rows, Z_PLUS)) return (1); break; case '^': /* * If the user specified a line number, put that line at the * bottom, move the cursor to it, and then display the screen * before that one. Otherwise, scroll backward a screen from * the current screen. * * !!! * Note, we match the off-by-one characteristics of historic * vi, here. */ if (F_ISSET(vp, VC_C1SET)) { if (vs_sm_fill(sp, lno, P_BOTTOM)) return (1); if (vs_sm_position(sp, &vp->m_final, 0, P_TOP)) return (1); if (vs_sm_fill(sp, vp->m_final.lno, P_BOTTOM)) return (1); } else if (vs_sm_scroll(sp, &vp->m_final, sp->t_rows, Z_CARAT)) return (1); break; default: /* Put the line at the top for . */ value = KEY_VAL(sp, vp->character); if (value != K_CR && value != K_NL) { v_emsg(sp, vp->kp->usage, VIM_USAGE); return (1); } if (vs_sm_fill(sp, lno, P_TOP)) return (1); break; } return (0); } /* * vs_crel -- * Change the relative size of the current screen. * * PUBLIC: int vs_crel __P((SCR *, long)); */ int vs_crel(SCR *sp, long int count) { sp->t_minrows = sp->t_rows = count; if (sp->t_rows > sp->rows - 1) sp->t_minrows = sp->t_rows = sp->rows - 1; TMAP = HMAP + (sp->t_rows - 1); F_SET(sp, SC_SCR_REDRAW); return (0); } nvi-1.81.6/vi/v_zexit.c0100644000076400001440000000212410720065506013723 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: v_zexit.c,v 10.7 2001/06/25 15:19:37 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:37 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * v_zexit -- ZZ * Save the file and exit. * * PUBLIC: int v_zexit __P((SCR *, VICMD *)); */ int v_zexit(SCR *sp, VICMD *vp) { /* Write back any modifications. */ if (F_ISSET(sp->ep, F_MODIFIED) && file_write(sp, NULL, NULL, NULL, FS_ALL)) return (1); /* Check to make sure it's not a temporary file. */ if (file_m3(sp, 0)) return (1); /* Check for more files to edit. */ if (ex_ncheck(sp, 0)) return (1); F_SET(sp, SC_EXIT); return (0); } nvi-1.81.6/vi/vi.c0100644000076400001440000007657610720065506012677 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vi.c,v 10.73 2002/04/11 19:49:30 skimo Exp $ (Berkeley) $Date: 2002/04/11 19:49:30 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" typedef enum { GC_ERR, GC_ERR_NOFLUSH, GC_EVENT, GC_FATAL, GC_INTERRUPT, GC_OK } gcret_t; static VIKEYS const *v_alias __P((SCR *, VICMD *, VIKEYS const *)); static gcret_t v_cmd __P((SCR *, VICMD *, VICMD *, VICMD *, int *, int *)); static int v_count __P((SCR *, VICMD *, ARG_CHAR_T, u_long *)); static void v_dtoh __P((SCR *)); static int v_init __P((SCR *)); static gcret_t v_key __P((SCR *, VICMD *, int, u_int32_t)); static int v_motion __P((SCR *, VICMD *, VICMD *, int *)); #if defined(DEBUG) && defined(COMLOG) static void v_comlog __P((SCR *, VICMD *)); #endif /* * Side-effect: * The dot structure can be set by the underlying vi functions, * see v_Put() and v_put(). */ #define DOT (&VIP(sp)->sdot) #define DOTMOTION (&VIP(sp)->sdotmotion) /* * vi -- * Main vi command loop. * * PUBLIC: int vi __P((SCR **)); */ int vi(SCR **spp) { GS *gp; WIN *wp; MARK abs; SCR *next, *sp; VICMD cmd, *vp; VI_PRIVATE *vip; int comcount, mapped, rval; /* Get the first screen. */ sp = *spp; wp = sp->wp; gp = sp->gp; /* Initialize the command structure. */ vp = &cmd; memset(vp, 0, sizeof(VICMD)); /* Reset strange attraction. */ F_SET(vp, VM_RCM_SET); /* Initialize the vi screen. */ if (v_init(sp)) return (1); /* Set the focus. */ (void)sp->gp->scr_rename(sp, sp->frp->name, 1); for (vip = VIP(sp), rval = 0;;) { /* Resolve messages. */ if (!MAPPED_KEYS_WAITING(sp) && vs_resolve(sp, NULL, 0)) goto ret; /* * If not skipping a refresh, return to command mode and * refresh the screen. */ if (F_ISSET(vip, VIP_S_REFRESH)) F_CLR(vip, VIP_S_REFRESH); else { sp->showmode = SM_COMMAND; if (vs_refresh(sp, 0)) goto ret; } /* Set the new favorite position. */ if (F_ISSET(vp, VM_RCM_SET | VM_RCM_SETFNB | VM_RCM_SETNNB)) { F_CLR(vip, VIP_RCM_LAST); (void)vs_column(sp, &sp->rcm); } /* * If not currently in a map, log the cursor position, * and set a flag so that this command can become the * DOT command. */ if (MAPPED_KEYS_WAITING(sp)) mapped = 1; else { if (log_cursor(sp)) goto err; mapped = 0; } /* * There may be an ex command waiting, and we returned here * only because we exited a screen or file. In this case, * we simply go back into the ex parser. */ if (EXCMD_RUNNING(wp)) { vp->kp = &vikeys[':']; goto ex_continue; } /* Refresh the command structure. */ memset(vp, 0, sizeof(VICMD)); /* * We get a command, which may or may not have an associated * motion. If it does, we get it too, calling its underlying * function to get the resulting mark. We then call the * command setting the cursor to the resulting mark. * * !!! * Vi historically flushed mapped characters on error, but * entering extra characters at the beginning of * a map wasn't considered an error -- in fact, users would * put leading characters in maps to clean up vi * state before the map was interpreted. Beauty! */ switch (v_cmd(sp, DOT, vp, NULL, &comcount, &mapped)) { case GC_ERR: goto err; case GC_ERR_NOFLUSH: goto gc_err_noflush; case GC_FATAL: goto ret; case GC_INTERRUPT: goto intr; case GC_EVENT: case GC_OK: break; } /* Check for security setting. */ if (F_ISSET(vp->kp, V_SECURE) && O_ISSET(sp, O_SECURE)) { ex_emsg(sp, KEY_NAME(sp, vp->key), EXM_SECURE); goto err; } /* * Historical practice: if a dot command gets a new count, * any motion component goes away, i.e. "d3w2." deletes a * total of 5 words. */ if (F_ISSET(vp, VC_ISDOT) && comcount) DOTMOTION->count = 1; /* Copy the key flags into the local structure. */ F_SET(vp, vp->kp->flags); /* Prepare to set the previous context. */ if (F_ISSET(vp, V_ABS | V_ABS_C | V_ABS_L)) { abs.lno = sp->lno; abs.cno = sp->cno; } /* * Set the three cursor locations to the current cursor. The * underlying routines don't bother if the cursor doesn't move. * This also handles line commands (e.g. Y) defaulting to the * current line. */ vp->m_start.lno = vp->m_stop.lno = vp->m_final.lno = sp->lno; vp->m_start.cno = vp->m_stop.cno = vp->m_final.cno = sp->cno; /* * Do any required motion; v_motion sets the from MARK and the * line mode flag, as well as the VM_RCM flags. */ if (F_ISSET(vp, V_MOTION) && v_motion(sp, DOTMOTION, vp, &mapped)) { if (INTERRUPTED(sp)) goto intr; goto err; } /* * If a count is set and the command is line oriented, set the * to MARK here relative to the cursor/from MARK. This is for * commands that take both counts and motions, i.e. "4yy" and * "y%". As there's no way the command can know which the user * did, we have to do it here. (There are commands that are * line oriented and that take counts ("#G", "#H"), for which * this calculation is either completely meaningless or wrong. * Each command must validate the value for itself. */ if (F_ISSET(vp, VC_C1SET) && F_ISSET(vp, VM_LMODE)) vp->m_stop.lno += vp->count - 1; /* Increment the command count. */ ++sp->ccnt; #if defined(DEBUG) && defined(COMLOG) v_comlog(sp, vp); #endif /* Call the function. */ ex_continue: if (vp->kp->func(sp, vp)) goto err; #ifdef DEBUG /* Make sure no function left the temporary space locked. */ if (F_ISSET(wp, W_TMP_INUSE)) { F_CLR(wp, W_TMP_INUSE); msgq(sp, M_ERR, "232|vi: temporary buffer not released"); } #endif /* * If we're exiting this screen, move to the next one, or, if * there aren't any more, return to the main editor loop. The * ordering is careful, don't discard the contents of sp until * the end. */ if (F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE)) { if (file_end(sp, NULL, F_ISSET(sp, SC_EXIT_FORCE))) goto ret; if (vs_discard(sp, &next)) goto ret; if (next == NULL && vs_swap(sp, &next, NULL)) goto ret; *spp = next; if (screen_end(sp)) goto ret; if (next == NULL) break; /* Switch screens, change focus. */ sp = next; vip = VIP(sp); (void)sp->gp->scr_rename(sp, sp->frp->name, 1); /* Don't trust the cursor. */ F_SET(vip, VIP_CUR_INVALID); continue; } /* * Set the dot command structure. * * !!! * Historically, commands which used mapped keys did not * set the dot command, with the exception of the text * input commands. */ if (F_ISSET(vp, V_DOT) && !mapped) { *DOT = cmd; F_SET(DOT, VC_ISDOT); /* * If a count was supplied for both the command and * its motion, the count was used only for the motion. * Turn the count back on for the dot structure. */ if (F_ISSET(vp, VC_C1RESET)) F_SET(DOT, VC_C1SET); /* VM flags aren't retained. */ F_CLR(DOT, VM_COMMASK | VM_RCM_MASK); } /* * Some vi row movements are "attracted" to the last position * set, i.e. the VM_RCM commands are moths to the VM_RCM_SET * commands' candle. If the movement is to the EOL the vi * command handles it. If it's to the beginning, we handle it * here. * * Note, some commands (e.g. _, ^) don't set the VM_RCM_SETFNB * flag, but do the work themselves. The reason is that they * have to modify the column in case they're being used as a * motion component. Other similar commands (e.g. +, -) don't * have to modify the column because they are always line mode * operations when used as motions, so the column number isn't * of any interest. * * Does this totally violate the screen and editor layering? * You betcha. As they say, if you think you understand it, * you don't. */ switch (F_ISSET(vp, VM_RCM_MASK)) { case 0: case VM_RCM_SET: break; case VM_RCM: vp->m_final.cno = vs_rcm(sp, vp->m_final.lno, F_ISSET(vip, VIP_RCM_LAST)); break; case VM_RCM_SETLAST: F_SET(vip, VIP_RCM_LAST); break; case VM_RCM_SETFNB: vp->m_final.cno = 0; /* FALLTHROUGH */ case VM_RCM_SETNNB: if (nonblank(sp, vp->m_final.lno, &vp->m_final.cno)) goto err; break; default: abort(); } /* Update the cursor. */ sp->lno = vp->m_final.lno; sp->cno = vp->m_final.cno; /* * Set the absolute mark -- set even if a tags or similar * command, since the tag may be moving to the same file. */ if ((F_ISSET(vp, V_ABS) || F_ISSET(vp, V_ABS_L) && sp->lno != abs.lno || F_ISSET(vp, V_ABS_C) && (sp->lno != abs.lno || sp->cno != abs.cno)) && mark_set(sp, ABSMARK1, &abs, 1)) goto err; if (0) { err: if (v_event_flush(sp, CH_MAPPED)) msgq(sp, M_BERR, "110|Vi command failed: mapped keys discarded"); } /* * Check and clear interrupts. There's an obvious race, but * it's not worth fixing. */ gc_err_noflush: if (INTERRUPTED(sp)) { intr: CLR_INTERRUPT(sp); if (v_event_flush(sp, CH_MAPPED)) msgq(sp, M_ERR, "231|Interrupted: mapped keys discarded"); else msgq(sp, M_ERR, "236|Interrupted"); } /* If the last command switched screens, update. */ if (F_ISSET(sp, SC_SSWITCH)) { F_CLR(sp, SC_SSWITCH); /* * If the current screen is still displayed, it will * need a new status line. */ F_SET(sp, SC_STATUS); /* Switch screens, change focus. */ sp = sp->nextdisp; vip = VIP(sp); (void)sp->gp->scr_rename(sp, sp->frp->name, 1); /* Don't trust the cursor. */ F_SET(vip, VIP_CUR_INVALID); /* Refresh so we can display messages. */ if (vs_refresh(sp, 1)) return (1); } /* If the last command switched files, change focus. */ if (F_ISSET(sp, SC_FSWITCH)) { F_CLR(sp, SC_FSWITCH); (void)sp->gp->scr_rename(sp, sp->frp->name, 1); } /* If leaving vi, return to the main editor loop. */ if (F_ISSET(gp, G_SRESTART) || F_ISSET(sp, SC_EX)) { *spp = sp; v_dtoh(sp); gp->scr_discard(sp, NULL); break; } } if (0) ret: rval = 1; return (rval); } #define KEY(key, ec_flags) { \ if ((gcret = v_key(sp, vp, 0, ec_flags)) != GC_OK) \ return (gcret); \ if (vp->ev.e_value == K_ESCAPE) \ goto esc; \ if (FL_ISSET(vp->ev.e_flags, CH_MAPPED)) \ *mappedp = 1; \ key = vp->ev.e_c; \ } /* * The O_TILDEOP option makes the ~ command take a motion instead * of a straight count. This is the replacement structure we use * instead of the one currently in the VIKEYS table. * * XXX * This should probably be deleted -- it's not all that useful, and * we get help messages wrong. */ VIKEYS const tmotion = { v_mulcase, V_CNT|V_DOT|V_MOTION|VM_RCM_SET, "[count]~[count]motion", " ~ change case to motion" }; /* * v_cmd -- * Get a vi command. */ static gcret_t v_cmd(SCR *sp, VICMD *dp, VICMD *vp, VICMD *ismotion, int *comcountp, int *mappedp) /* Previous key if getting motion component. */ { enum { COMMANDMODE, ISPARTIAL, NOTPARTIAL } cpart; CHAR_T key; VIKEYS const *kp; gcret_t gcret; u_int flags; char *s; /* * Get an event command or a key. Event commands are simple, and * don't have any additional information. */ cpart = ismotion == NULL ? COMMANDMODE : ISPARTIAL; gcret = v_key(sp, vp, 1, EC_MAPCOMMAND); if (gcret != GC_OK) { if (gcret != GC_EVENT) return (gcret); if (v_event(sp, vp)) return (GC_ERR); if (ismotion != NULL && !F_ISSET(vp->kp, V_MOVE)) v_event_err(sp, &vp->ev); return (GC_EVENT); } /* * Keys are not simple. (Although vi's command structure less complex * than ex (and don't think I'm not grateful!) The command syntax is: * * [count] [buffer] [count] key [[motion] | [buffer] [character]] * * and there are, of course, several special cases. The motion value * is itself a vi command, with the syntax: * * [count] key [character] * * cancels partial commands, i.e. a command where at least * one non-numeric character has been entered. Otherwise, it beeps * the terminal. * * !!! * POSIX 1003.2-1992 explicitly disallows cancelling commands where * all that's been entered is a number, requiring that the terminal * be alerted. */ if (vp->ev.e_value == K_ESCAPE) goto esc; /* * Commands that are mapped are treated differently (e.g., they * don't set the dot command. Pass that information back. */ if (FL_ISSET(vp->ev.e_flags, CH_MAPPED)) *mappedp = 1; key = vp->ev.e_c; if (ismotion == NULL) cpart = NOTPARTIAL; /* Pick up an optional buffer. */ if (key == '"') { cpart = ISPARTIAL; if (ismotion != NULL) { v_emsg(sp, NULL, VIM_COMBUF); return (GC_ERR); } KEY(vp->buffer, 0); F_SET(vp, VC_BUFFER); KEY(key, EC_MAPCOMMAND); } /* * Pick up an optional count, where a leading 0 isn't a count, it's * a command. When a count is specified, the dot command behaves * differently, pass the information back. */ if (ISDIGIT(key) && key != '0') { if (v_count(sp, vp, key, &vp->count)) return (GC_ERR); F_SET(vp, VC_C1SET); *comcountp = 1; KEY(key, EC_MAPCOMMAND); } else *comcountp = 0; /* Pick up optional buffer. */ if (key == '"') { cpart = ISPARTIAL; if (F_ISSET(vp, VC_BUFFER)) { msgq(sp, M_ERR, "234|Only one buffer may be specified"); return (GC_ERR); } if (ismotion != NULL) { v_emsg(sp, NULL, VIM_COMBUF); return (GC_ERR); } KEY(vp->buffer, 0); F_SET(vp, VC_BUFFER); KEY(key, EC_MAPCOMMAND); } /* Check for an OOB command key. */ cpart = ISPARTIAL; if (key > MAXVIKEY) { v_emsg(sp, KEY_NAME(sp, key), VIM_NOCOM); return (GC_ERR); } kp = &vikeys[vp->key = key]; /* * !!! * Historically, D accepted and then ignored a count. Match it. */ if (vp->key == 'D' && F_ISSET(vp, VC_C1SET)) { *comcountp = 0; vp->count = 0; F_CLR(vp, VC_C1SET); } /* * There are several commands that we implement as aliases, both * to match historic practice and to ensure consistency. Check * for command aliases. */ if (kp->func == NULL && (kp = v_alias(sp, vp, kp)) == NULL) return (GC_ERR); /* The tildeop option makes the ~ command take a motion. */ if (key == '~' && O_ISSET(sp, O_TILDEOP)) kp = &tmotion; vp->kp = kp; /* * Find the command. The only legal command with no underlying * function is dot. It's historic practice that doesn't * just erase the preceding number, it beeps the terminal as well. * It's a common problem, so just beep the terminal unless verbose * was set. */ if (kp->func == NULL) { if (key != '.') { v_emsg(sp, KEY_NAME(sp, key), vp->ev.e_value == K_ESCAPE ? VIM_NOCOM_B : VIM_NOCOM); return (GC_ERR); } /* If called for a motion command, stop now. */ if (dp == NULL) goto usage; /* * !!! * If a '.' is immediately entered after an undo command, we * replay the log instead of redoing the last command. This * is necessary because 'u' can't set the dot command -- see * vi/v_undo.c:v_undo for details. */ if (VIP(sp)->u_ccnt == sp->ccnt) { vp->kp = &vikeys['u']; F_SET(vp, VC_ISDOT); return (GC_OK); } /* Otherwise, a repeatable command must have been executed. */ if (!F_ISSET(dp, VC_ISDOT)) { msgq(sp, M_ERR, "208|No command to repeat"); return (GC_ERR); } /* Set new count/buffer, if any, and return. */ if (F_ISSET(vp, VC_C1SET)) { F_SET(dp, VC_C1SET); dp->count = vp->count; } if (F_ISSET(vp, VC_BUFFER)) dp->buffer = vp->buffer; *vp = *dp; return (GC_OK); } /* Set the flags based on the command flags. */ flags = kp->flags; /* Check for illegal count. */ if (F_ISSET(vp, VC_C1SET) && !LF_ISSET(V_CNT)) goto usage; /* Illegal motion command. */ if (ismotion == NULL) { /* Illegal buffer. */ if (!LF_ISSET(V_OBUF) && F_ISSET(vp, VC_BUFFER)) goto usage; /* Required buffer. */ if (LF_ISSET(V_RBUF)) { KEY(vp->buffer, 0); F_SET(vp, VC_BUFFER); } } /* * Special case: '[', ']' and 'Z' commands. Doesn't the fact that * the *single* characters don't mean anything but the *doubled* * characters do, just frost your shorts? */ if (vp->key == '[' || vp->key == ']' || vp->key == 'Z') { /* * Historically, half entered [[, ]] or Z commands weren't * cancelled by , the terminal was beeped instead. * POSIX.2-1992 probably didn't notice, and requires that * they be cancelled instead of beeping. Seems fine to me. * * Don't set the EC_MAPCOMMAND flag, apparently ] is a popular * vi meta-character, and we don't want the user to wait while * we time out a possible mapping. This *appears* to match * historic vi practice, but with mapping characters, You Just * Never Know. */ KEY(key, 0); if (vp->key != key) { usage: if (ismotion == NULL) s = kp->usage; else if (ismotion->key == '~' && O_ISSET(sp, O_TILDEOP)) s = tmotion.usage; else s = vikeys[ismotion->key].usage; v_emsg(sp, s, VIM_USAGE); return (GC_ERR); } } /* Special case: 'z' command. */ if (vp->key == 'z') { KEY(vp->character, 0); if (ISDIGIT(vp->character)) { if (v_count(sp, vp, vp->character, &vp->count2)) return (GC_ERR); F_SET(vp, VC_C2SET); KEY(vp->character, 0); } } /* * Commands that have motion components can be doubled to imply the * current line. */ if (ismotion != NULL && ismotion->key != key && !LF_ISSET(V_MOVE)) { msgq(sp, M_ERR, "210|%s may not be used as a motion command", KEY_NAME(sp, key)); return (GC_ERR); } /* Pick up required trailing character. */ if (LF_ISSET(V_CHAR)) KEY(vp->character, 0); /* Get any associated cursor word. */ if (F_ISSET(kp, V_KEYW) && v_curword(sp)) return (GC_ERR); return (GC_OK); esc: switch (cpart) { case COMMANDMODE: msgq(sp, M_BERR, "211|Already in command mode"); return (GC_ERR_NOFLUSH); case ISPARTIAL: break; case NOTPARTIAL: (void)sp->gp->scr_bell(sp); break; } return (GC_ERR); } /* * v_motion -- * * Get resulting motion mark. */ static int v_motion(SCR *sp, VICMD *dm, VICMD *vp, int *mappedp) { VICMD motion; gcret_t gcret; size_t len; u_long cnt; u_int flags; int tilde_reset, notused; /* * If '.' command, use the dot motion, else get the motion command. * Clear any line motion flags, the subsequent motion isn't always * the same, i.e. "/aaa" may or may not be a line motion. */ if (F_ISSET(vp, VC_ISDOT)) { motion = *dm; F_SET(&motion, VC_ISDOT); F_CLR(&motion, VM_COMMASK); gcret = GC_OK; } else { memset(&motion, 0, sizeof(VICMD)); gcret = v_cmd(sp, NULL, &motion, vp, ¬used, mappedp); if (gcret != GC_OK && gcret != GC_EVENT) return (1); } /* * A count may be provided both to the command and to the motion, in * which case the count is multiplicative. For example, "3y4y" is the * same as "12yy". This count is provided to the motion command and * not to the regular function. */ cnt = motion.count = F_ISSET(&motion, VC_C1SET) ? motion.count : 1; if (F_ISSET(vp, VC_C1SET)) { motion.count *= vp->count; F_SET(&motion, VC_C1SET); /* * Set flags to restore the original values of the command * structure so dot commands can change the count values, * e.g. "2dw" "3." deletes a total of five words. */ F_CLR(vp, VC_C1SET); F_SET(vp, VC_C1RESET); } /* * Some commands can be repeated to indicate the current line. In * this case, or if the command is a "line command", set the flags * appropriately. If not a doubled command, run the function to get * the resulting mark. */ if (gcret != GC_EVENT && vp->key == motion.key) { F_SET(vp, VM_LDOUBLE | VM_LMODE); /* Set the origin of the command. */ vp->m_start.lno = sp->lno; vp->m_start.cno = 0; /* * Set the end of the command. * * If the current line is missing, i.e. the file is empty, * historic vi permitted a "cc" or "!!" command to insert * text. */ vp->m_stop.lno = sp->lno + motion.count - 1; if (db_get(sp, vp->m_stop.lno, 0, NULL, &len)) { if (vp->m_stop.lno != 1 || vp->key != 'c' && vp->key != '!') { v_emsg(sp, NULL, VIM_EMPTY); return (1); } vp->m_stop.cno = 0; } else vp->m_stop.cno = len ? len - 1 : 0; } else { /* * Motion commands change the underlying movement (*snarl*). * For example, "l" is illegal at the end of a line, but "dl" * is not. Set flags so the function knows the situation. */ motion.rkp = vp->kp; /* * XXX * Use yank instead of creating a new motion command, it's a * lot easier for now. */ if (vp->kp == &tmotion) { tilde_reset = 1; vp->kp = &vikeys['y']; } else tilde_reset = 0; /* * Copy the key flags into the local structure, except for the * RCM flags -- the motion command will set the RCM flags in * the vp structure if necessary. This means that the motion * command is expected to determine where the cursor ends up! * However, we save off the current RCM mask and restore it if * it no RCM flags are set by the motion command, with a small * modification. * * We replace the VM_RCM_SET flag with the VM_RCM flag. This * is so that cursor movement doesn't set the relative position * unless the motion command explicitly specified it. This * appears to match historic practice, but I've never been able * to develop a hard-and-fast rule. */ flags = F_ISSET(vp, VM_RCM_MASK); if (LF_ISSET(VM_RCM_SET)) { LF_SET(VM_RCM); LF_CLR(VM_RCM_SET); } F_CLR(vp, VM_RCM_MASK); F_SET(&motion, motion.kp->flags & ~VM_RCM_MASK); /* * Set the three cursor locations to the current cursor. This * permits commands like 'j' and 'k', that are line oriented * motions and have special cursor suck semantics when they are * used as standalone commands, to ignore column positioning. */ motion.m_final.lno = motion.m_stop.lno = motion.m_start.lno = sp->lno; motion.m_final.cno = motion.m_stop.cno = motion.m_start.cno = sp->cno; /* Run the function. */ if ((motion.kp->func)(sp, &motion)) return (1); /* * If the current line is missing, i.e. the file is empty, * historic vi allowed "c" or "!" to insert * text. Otherwise fail -- most motion commands will have * already failed, but some, e.g. G, succeed in empty files. */ if (!db_exist(sp, vp->m_stop.lno)) { if (vp->m_stop.lno != 1 || vp->key != 'c' && vp->key != '!') { v_emsg(sp, NULL, VIM_EMPTY); return (1); } vp->m_stop.cno = 0; } /* * XXX * See above. */ if (tilde_reset) vp->kp = &tmotion; /* * Copy cut buffer, line mode and cursor position information * from the motion command structure, i.e. anything that the * motion command can set for us. The commands can flag the * movement as a line motion (see v_sentence) as well as set * the VM_RCM_* flags explicitly. */ F_SET(vp, F_ISSET(&motion, VM_COMMASK | VM_RCM_MASK)); /* * If the motion command set no relative motion flags, use * the (slightly) modified previous values. */ if (!F_ISSET(vp, VM_RCM_MASK)) F_SET(vp, flags); /* * Commands can change behaviors based on the motion command * used, for example, the ! command repeated the last bang * command if N or n was used as the motion. */ vp->rkp = motion.kp; /* * Motion commands can reset all of the cursor information. * If the motion is in the reverse direction, switch the * from and to MARK's so that it's in a forward direction. * Motions are from the from MARK to the to MARK (inclusive). */ if (motion.m_start.lno > motion.m_stop.lno || motion.m_start.lno == motion.m_stop.lno && motion.m_start.cno > motion.m_stop.cno) { vp->m_start = motion.m_stop; vp->m_stop = motion.m_start; } else { vp->m_start = motion.m_start; vp->m_stop = motion.m_stop; } vp->m_final = motion.m_final; } /* * If the command sets dot, save the motion structure. The motion * count was changed above and needs to be reset, that's why this * is done here, and not in the calling routine. */ if (F_ISSET(vp->kp, V_DOT)) { *dm = motion; dm->count = cnt; } return (0); } /* * v_init -- * Initialize the vi screen. */ static int v_init(SCR *sp) { GS *gp; VI_PRIVATE *vip; gp = sp->gp; vip = VIP(sp); /* Switch into vi. */ if (gp->scr_screen(sp, SC_VI)) return (1); (void)gp->scr_attr(sp, SA_ALTERNATE, 1); F_CLR(sp, SC_EX | SC_SCR_EX); F_SET(sp, SC_VI); /* * Initialize screen values. * * Small windows: see vs_refresh(), section 6a. * * Setup: * t_minrows is the minimum rows to display * t_maxrows is the maximum rows to display (rows - 1) * t_rows is the rows currently being displayed */ sp->rows = vip->srows = O_VAL(sp, O_LINES); sp->cols = O_VAL(sp, O_COLUMNS); sp->t_rows = sp->t_minrows = O_VAL(sp, O_WINDOW); if (sp->rows != 1) { if (sp->t_rows > sp->rows - 1) { sp->t_minrows = sp->t_rows = sp->rows - 1; msgq(sp, M_INFO, "214|Windows option value is too large, max is %u", sp->t_rows); } sp->t_maxrows = sp->rows - 1; } else sp->t_maxrows = 1; sp->roff = sp->coff = 0; /* Create a screen map. */ CALLOC_RET(sp, HMAP, SMAP *, SIZE_HMAP(sp), sizeof(SMAP)); TMAP = HMAP + (sp->t_rows - 1); HMAP->lno = sp->lno; HMAP->coff = 0; HMAP->soff = 1; /* * Fill the screen map from scratch -- try and center the line. That * way if we're starting with a file we've seen before, we'll put the * line in the middle, otherwise, it won't work and we'll end up with * the line at the top. */ F_CLR(sp, SC_SCR_TOP); F_SET(sp, SC_SCR_REFORMAT | SC_SCR_CENTER); /* Invalidate the cursor. */ F_SET(vip, VIP_CUR_INVALID); /* Paint the screen image from scratch. */ F_SET(vip, VIP_N_EX_PAINT); return (0); } /* * v_dtoh -- * Move all but the current screen to the hidden queue. */ static void v_dtoh(SCR *sp) { GS *gp; SCR *tsp; WIN *wp; int hidden; /* Move all screens to the hidden queue, tossing screen maps. */ for (hidden = 0, gp = sp->gp, wp = sp->wp; (tsp = wp->scrq.cqh_first) != (void *)&wp->scrq; ++hidden) { if (_HMAP(tsp) != NULL) { free(_HMAP(tsp)); _HMAP(tsp) = NULL; } CIRCLEQ_REMOVE(&wp->scrq, tsp, q); CIRCLEQ_INSERT_TAIL(&gp->hq, tsp, q); /* XXXX Change if hidden screens per window */ tsp->wp = 0; gp->scr_discard(tsp, NULL); } /* Move current screen back to the display queue. */ CIRCLEQ_REMOVE(&gp->hq, sp, q); CIRCLEQ_INSERT_TAIL(&wp->scrq, sp, q); sp->wp = wp; if (hidden > 1) msgq(sp, M_INFO, "319|%d screens backgrounded; use :display to list them", hidden - 1); } /* * v_curword -- * Get the word (or non-word) the cursor is on. * * PUBLIC: int v_curword __P((SCR *)); */ int v_curword(SCR *sp) { VI_PRIVATE *vip; size_t beg, end, len; int moved, state; CHAR_T *p; if (db_get(sp, sp->lno, DBG_FATAL, &p, &len)) return (1); /* * !!! * Historically, tag commands skipped over any leading whitespace * characters. Make this true in general when using cursor words. * If movement, getting a cursor word implies moving the cursor to * its beginning. Refresh now. * * !!! * Find the beginning/end of the keyword. Keywords are currently * used for cursor-word searching and for tags. Historical vi * only used the word in a tag search from the cursor to the end * of the word, i.e. if the cursor was on the 'b' in " abc ", the * tag was "bc". For consistency, we make cursor word searches * follow the same rule. */ for (moved = 0, beg = sp->cno; beg < len && isspace(p[beg]); moved = 1, ++beg); if (beg >= len) { msgq(sp, M_BERR, "212|Cursor not in a word"); return (1); } if (moved) { sp->cno = beg; (void)vs_refresh(sp, 0); } /* Find the end of the word. */ for (state = inword(p[beg]), end = beg; ++end < len && state == inword(p[end]);); vip = VIP(sp); len = (end - beg); BINC_RETW(sp, vip->keyw, vip->klen, len+1); MEMMOVEW(vip->keyw, p + beg, len); vip->keyw[len] = '\0'; /* XXX */ return (0); } /* * v_alias -- * Check for a command alias. */ static VIKEYS const * v_alias(SCR *sp, VICMD *vp, const VIKEYS *kp) { CHAR_T push; switch (vp->key) { case 'C': /* C -> c$ */ push = '$'; vp->key = 'c'; break; case 'D': /* D -> d$ */ push = '$'; vp->key = 'd'; break; case 'S': /* S -> c_ */ push = '_'; vp->key = 'c'; break; case 'Y': /* Y -> y_ */ push = '_'; vp->key = 'y'; break; default: return (kp); } return (v_event_push(sp, NULL, &push, 1, CH_NOMAP | CH_QUOTED) ? NULL : &vikeys[vp->key]); } /* * v_count -- * Return the next count. */ static int v_count(SCR *sp, VICMD *vp, ARG_CHAR_T fkey, u_long *countp) { u_long count, tc; vp->ev.e_c = fkey; count = tc = 0; do { /* * XXX * Assume that overflow results in a smaller number. */ tc = count * 10 + vp->ev.e_c - '0'; if (count > tc) { /* Toss to the next non-digit. */ do { if (v_key(sp, vp, 0, EC_MAPCOMMAND | EC_MAPNODIGIT) != GC_OK) return (1); } while (ISDIGIT(vp->ev.e_c)); msgq(sp, M_ERR, "235|Number larger than %lu", ULONG_MAX); return (1); } count = tc; if (v_key(sp, vp, 0, EC_MAPCOMMAND | EC_MAPNODIGIT) != GC_OK) return (1); } while (ISDIGIT(vp->ev.e_c)); *countp = count; return (0); } /* * v_key -- * Return the next event. */ static gcret_t v_key(SCR *sp, VICMD *vp, int events_ok, u_int32_t ec_flags) { EVENT *evp; u_int32_t quote; for (evp = &vp->ev, quote = 0;;) { if (v_event_get(sp, evp, 0, ec_flags | quote)) return (GC_FATAL); quote = 0; switch (evp->e_event) { case E_CHARACTER: /* * !!! * Historically, ^V was ignored in the command stream, * although it had a useful side-effect of interrupting * mappings. Adding a quoting bit to the call probably * extends historic practice, but it feels right. */ if (evp->e_value == K_VLNEXT) { quote = EC_QUOTED; break; } return (GC_OK); case E_ERR: case E_EOF: return (GC_FATAL); case E_INTERRUPT: /* * !!! * Historically, vi beeped on command level interrupts. * * Historically, vi exited to ex mode if no file was * named on the command line, and two interrupts were * generated in a row. (I figured you might want to * know that, just in case there's a quiz later.) */ (void)sp->gp->scr_bell(sp); return (GC_INTERRUPT); case E_REPAINT: if (v_erepaint(sp, evp)) return (GC_FATAL); break; case E_WRESIZE: /* * !!! * We don't do anything here, just return an error. * The vi loop will return because of this, and then * the main loop will realize that we had to restart * the world and will call the vi loop again. */ return (GC_ERR); case E_IPCOMMAND: if (events_ok) return (GC_EVENT); /* FALLTHROUGH */ default: v_event_err(sp, evp); return (GC_ERR); } } /* NOTREACHED */ } #if defined(DEBUG) && defined(COMLOG) /* * v_comlog -- * Log the contents of the command structure. */ static void v_comlog(sp, vp) SCR *sp; VICMD *vp; { vtrace(sp, "vcmd: %c", vp->key); if (F_ISSET(vp, VC_BUFFER)) vtrace(sp, " buffer: %c", vp->buffer); if (F_ISSET(vp, VC_C1SET)) vtrace(sp, " c1: %lu", vp->count); if (F_ISSET(vp, VC_C2SET)) vtrace(sp, " c2: %lu", vp->count2); vtrace(sp, " flags: 0x%x\n", vp->flags); } #endif nvi-1.81.6/vi/vi.h0100644000076400001440000003762110720065506012670 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. * * $Id: vi.h,v 10.27 2002/01/19 21:59:07 skimo Exp $ (Berkeley) $Date: 2002/01/19 21:59:07 $ */ /* Definition of a vi "word". */ #define inword(ch) ((UCHAR_T)ch <= 255 && (isalnum(ch) || (ch) == '_')) typedef struct _vikeys VIKEYS; /* Structure passed around to functions implementing vi commands. */ typedef struct _vicmd { CHAR_T key; /* Command key. */ CHAR_T buffer; /* Buffer. */ CHAR_T character; /* Character. */ u_long count; /* Count. */ u_long count2; /* Second count (only used by z). */ EVENT ev; /* Associated event. */ #define ISCMD(p, key) ((p) == &vikeys[key]) VIKEYS const *kp; /* Command/Motion VIKEYS entry. */ #define ISMOTION(vp) (vp->rkp != NULL && F_ISSET(vp->rkp, V_MOTION)) VIKEYS const *rkp; /* Related C/M VIKEYS entry. */ /* * Historic vi allowed "dl" when the cursor was on the last column, * deleting the last character, and similarly allowed "dw" when * the cursor was on the last column of the file. It didn't allow * "dh" when the cursor was on column 1, although these cases are * not strictly analogous. The point is that some movements would * succeed if they were associated with a motion command, and fail * otherwise. This is part of the off-by-1 schizophrenia that * plagued vi. Other examples are that "dfb" deleted everything * up to and including the next 'b' character, while "d/b" deleted * everything up to the next 'b' character. While this implementation * regularizes the interface to the extent possible, there are many * special cases that can't be fixed. The special cases are handled * by setting flags per command so that the underlying command and * motion routines know what's really going on. * * The VM_* flags are set in the vikeys array and by the underlying * functions (motion component or command) as well. For this reason, * the flags in the VICMD and VIKEYS structures live in the same name * space. */ #define VM_CMDFAILED 0x00000001 /* Command failed. */ #define VM_CUTREQ 0x00000002 /* Always cut into numeric buffers. */ #define VM_LDOUBLE 0x00000004 /* Doubled command for line mode. */ #define VM_LMODE 0x00000008 /* Motion is line oriented. */ #define VM_COMMASK 0x0000000f /* Mask for VM flags. */ /* * The VM_RCM_* flags are single usage, i.e. if you set one, you have * to clear the others. */ #define VM_RCM 0x00000010 /* Use relative cursor movment (RCM). */ #define VM_RCM_SET 0x00000020 /* RCM: set to current position. */ #define VM_RCM_SETFNB 0x00000040 /* RCM: set to first non-blank (FNB). */ #define VM_RCM_SETLAST 0x00000080 /* RCM: set to last character. */ #define VM_RCM_SETNNB 0x00000100 /* RCM: set to next non-blank. */ #define VM_RCM_MASK 0x000001f0 /* Mask for RCM flags. */ /* Flags for the underlying function. */ #define VC_BUFFER 0x00000200 /* The buffer was set. */ #define VC_C1RESET 0x00000400 /* Reset C1SET flag for dot commands. */ #define VC_C1SET 0x00000800 /* Count 1 was set. */ #define VC_C2SET 0x00001000 /* Count 2 was set. */ #define VC_ISDOT 0x00002000 /* Command was the dot command. */ u_int32_t flags; /* * There are four cursor locations that we worry about: the initial * cursor position, the start of the range, the end of the range, * and the final cursor position. The initial cursor position and * the start of the range are both m_start, and are always the same. * All locations are initialized to the starting cursor position by * the main vi routines, and the underlying functions depend on this. * * Commands that can be motion components set the end of the range * cursor position, m_stop. All commands must set the ending cursor * position, m_final. The reason that m_stop isn't the same as m_final * is that there are situations where the final position of the cursor * is outside of the cut/delete range (e.g. 'd[[' from the first column * of a line). The final cursor position often varies based on the * direction of the movement, as well as the command. The only special * case that the delete code handles is that it will make adjustments * if the final cursor position is deleted. * * The reason for all of this is that the historic vi semantics were * defined command-by-command. Every function has to roll its own * starting and stopping positions, and adjust them if it's being used * as a motion component. The general rules are as follows: * * 1: If not a motion component, the final cursor is at the end * of the range. * 2: If moving backward in the file, delete and yank move the * final cursor to the end of the range. * 3: If moving forward in the file, delete and yank leave the * final cursor at the start of the range. * * Usually, if moving backward in the file and it's a motion component, * the starting cursor is decremented by a single character (or, in a * few cases, to the end of the previous line) so that the starting * cursor character isn't cut or deleted. No cursor adjustment is * needed for moving forward, because the cut/delete routines handle * m_stop inclusively, i.e. the last character in the range is cut or * deleted. This makes cutting to the EOF/EOL reasonable. * * The 'c', '<', '>', and '!' commands are special cases. We ignore * the final cursor position for all of them: for 'c', the text input * routines set the cursor to the last character inserted; for '<', * '>' and '!', the underlying ex commands that do the operation will * set the cursor for us, usually to something related to the first * . */ MARK m_start; /* mark: initial cursor, range start. */ MARK m_stop; /* mark: range end. */ MARK m_final; /* mark: final cursor position. */ } VICMD; /* Vi command table structure. */ struct _vikeys { /* Underlying function. */ int (*func) __P((SCR *, VICMD *)); #define V_ABS 0x00004000 /* Absolute movement, set '' mark. */ #define V_ABS_C 0x00008000 /* V_ABS: if the line/column changed. */ #define V_ABS_L 0x00010000 /* V_ABS: if the line changed. */ #define V_CHAR 0x00020000 /* Character (required, trailing). */ #define V_CNT 0x00040000 /* Count (optional, leading). */ #define V_DOT 0x00080000 /* On success, sets dot command. */ #define V_KEYW 0x00100000 /* Cursor referenced word. */ #define V_MOTION 0x00200000 /* Motion (required, trailing). */ #define V_MOVE 0x00400000 /* Command defines movement. */ #define V_OBUF 0x00800000 /* Buffer (optional, leading). */ #define V_RBUF 0x01000000 /* Buffer (required, trailing). */ #define V_SECURE 0x02000000 /* Permission denied if O_SECURE set. */ u_int32_t flags; char *usage; /* Usage line. */ char *help; /* Help line. */ }; #define MAXVIKEY 126 /* List of vi commands. */ extern VIKEYS const vikeys[MAXVIKEY + 1]; extern VIKEYS const tmotion; /* XXX Hacked ~ command. */ /* Character stream structure, prototypes. */ typedef struct _vcs { db_recno_t cs_lno; /* Line. */ size_t cs_cno; /* Column. */ CHAR_T *cs_bp; /* Buffer. */ size_t cs_len; /* Length. */ CHAR_T cs_ch; /* Character. */ #define CS_EMP 1 /* Empty line. */ #define CS_EOF 2 /* End-of-file. */ #define CS_EOL 3 /* End-of-line. */ #define CS_SOF 4 /* Start-of-file. */ int cs_flags; /* Return flags. */ } VCS; int cs_bblank __P((SCR *, VCS *)); int cs_fblank __P((SCR *, VCS *)); int cs_fspace __P((SCR *, VCS *)); int cs_init __P((SCR *, VCS *)); int cs_next __P((SCR *, VCS *)); int cs_prev __P((SCR *, VCS *)); /* * We use a single "window" for each set of vi screens. The model would be * simpler with two windows (one for the text, and one for the modeline) * because scrolling the text window down would work correctly then, not * affecting the mode line. As it is we have to play games to make it look * right. The reason for this choice is that it would be difficult for * curses to optimize the movement, i.e. detect that the downward scroll * isn't going to change the modeline, set the scrolling region on the * terminal and only scroll the first part of the text window. * * Structure for mapping lines to the screen. An SMAP is an array, with one * structure element per screen line, which holds information describing the * physical line which is displayed in the screen line. The first two fields * (lno and off) are all that are necessary to describe a line. The rest of * the information is useful to keep information from being re-calculated. * * The SMAP always has an entry for each line of the physical screen, plus a * slot for the colon command line, so there is room to add any screen into * another one at screen exit. * * Lno is the line number. If doing the historic vi long line folding, soff * is the screen offset into the line. For example, the pair 2:1 would be * the first screen of line 2, and 2:2 would be the second. In the case of * long lines, the screen map will tend to be staggered, e.g., 1:1, 1:2, 1:3, * 2:1, 3:1, etc. If doing left-right scrolling, the coff field is the screen * column offset into the lines, and can take on any value, as it's adjusted * by the user set value O_SIDESCROLL. */ typedef struct _smap { db_recno_t lno; /* 1-N: Physical file line number. */ size_t coff; /* 0-N: Column offset in the line. */ size_t soff; /* 1-N: Screen offset in the line. */ /* vs_line() cache information. */ size_t c_sboff; /* 0-N: offset of first character on screen. */ size_t c_eboff; /* 0-N: offset of last character on screen. */ u_int8_t c_scoff; /* 0-N: offset into the first character. */ /* 255: no character of line visible. */ u_int8_t c_eclen; /* 1-N: columns from the last character. */ u_int8_t c_ecsize; /* 1-N: size of the last character. */ } SMAP; /* Macros to flush/test cached information. */ #define SMAP_CACHE(smp) ((smp)->c_ecsize != 0) #define SMAP_FLUSH(smp) ((smp)->c_ecsize = 0) /* Character search information. */ typedef enum { CNOTSET, FSEARCH, fSEARCH, TSEARCH, tSEARCH } cdir_t; typedef enum { AB_NOTSET, AB_NOTWORD, AB_INWORD } abb_t; typedef enum { Q_NOTSET, Q_BNEXT, Q_BTHIS, Q_VNEXT, Q_VTHIS } quote_t; /* Vi private, per-screen memory. */ typedef struct _vi_private { VICMD cmd; /* Current command, motion. */ VICMD motion; /* * !!! * The saved command structure can be modified by the underlying * vi functions, see v_Put() and v_put(). */ VICMD sdot; /* Saved dot, motion command. */ VICMD sdotmotion; CHAR_T *keyw; /* Keyword buffer. */ size_t klen; /* Keyword length. */ size_t keywlen; /* Keyword buffer length. */ CHAR_T rlast; /* Last 'r' replacement character. */ e_key_t rvalue; /* Value of last replacement character. */ EVENT *rep; /* Input replay buffer. */ size_t rep_len; /* Input replay buffer length. */ size_t rep_cnt; /* Input replay buffer characters. */ mtype_t mtype; /* Last displayed message type. */ size_t linecount; /* 1-N: Output overwrite count. */ size_t lcontinue; /* 1-N: Output line continue value. */ size_t totalcount; /* 1-N: Output overwrite count. */ /* Busy state. */ int busy_ref; /* Busy reference count. */ int busy_ch; /* Busy character. */ size_t busy_fx; /* Busy character x coordinate. */ size_t busy_oldy; /* Saved y coordinate. */ size_t busy_oldx; /* Saved x coordinate. */ struct timeval busy_tv; /* Busy timer. */ MARK sel; /* Select start position. */ char *ps; /* Paragraph plus section list. */ u_long u_ccnt; /* Undo command count. */ CHAR_T lastckey; /* Last search character. */ cdir_t csearchdir; /* Character search direction. */ SMAP *h_smap; /* First slot of the line map. */ SMAP *t_smap; /* Last slot of the line map. */ /* * One extra slot is always allocated for the map so that we can use * it to do vi :colon command input; see v_tcmd(). */ db_recno_t sv_tm_lno; /* tcmd: saved TMAP lno field. */ size_t sv_tm_coff; /* tcmd: saved TMAP coff field. */ size_t sv_tm_soff; /* tcmd: saved TMAP soff field. */ size_t sv_t_maxrows; /* tcmd: saved t_maxrows. */ size_t sv_t_minrows; /* tcmd: saved t_minrows. */ size_t sv_t_rows; /* tcmd: saved t_rows. */ #define SIZE_HMAP(sp) (VIP(sp)->srows + 1) /* * Macros to get to the head/tail of the smap. If the screen only has * one line, HMAP can be equal to TMAP, so the code has to understand * the off-by-one errors that can result. If stepping through an SMAP * and operating on each entry, use sp->t_rows as the count of slots, * don't use a loop that compares <= TMAP. */ #define _HMAP(sp) (VIP(sp)->h_smap) #define HMAP _HMAP(sp) #define _TMAP(sp) (VIP(sp)->t_smap) #define TMAP _TMAP(sp) db_recno_t ss_lno; /* 1-N: vi_opt_screens cached line number. */ size_t ss_screens; /* vi_opt_screens cached return value. */ #define VI_SCR_CFLUSH(vip) vip->ss_lno = OOBLNO size_t srows; /* 1-N: rows in the terminal/window. */ db_recno_t olno; /* 1-N: old cursor file line. */ size_t ocno; /* 0-N: old file cursor column. */ size_t sc_col; /* 0-N: LOGICAL screen column. */ SMAP *sc_smap; /* SMAP entry where sc_col occurs. */ #define VIP_CUR_INVALID 0x0001 /* Cursor position is unknown. */ #define VIP_DIVIDER 0x0002 /* Divider line was displayed. */ #define VIP_N_EX_PAINT 0x0004 /* Clear and repaint when ex finishes. */ #define VIP_N_EX_REDRAW 0x0008 /* Schedule SC_SCR_REDRAW when ex finishes. */ #define VIP_N_REFRESH 0x0010 /* Repaint (from SMAP) on the next refresh. */ #define VIP_N_RENUMBER 0x0020 /* Renumber screen on the next refresh. */ #define VIP_RCM_LAST 0x0040 /* Cursor drawn to the last column. */ #define VIP_S_MODELINE 0x0080 /* Skip next modeline refresh. */ #define VIP_S_REFRESH 0x0100 /* Skip next refresh. */ u_int16_t flags; } VI_PRIVATE; /* Vi private area. */ #define VIP(sp) ((VI_PRIVATE *)((sp)->vi_private)) #define O_NUMBER_FMT "%7lu " /* O_NUMBER format, length. */ #define O_NUMBER_LENGTH 8 #define SCREEN_COLS(sp) /* Screen columns. */ \ ((O_ISSET(sp, O_NUMBER) ? (sp)->cols - O_NUMBER_LENGTH : (sp)->cols)) /* * LASTLINE is the zero-based, last line in the screen. Note that it is correct * regardless of the changes in the screen to permit text input on the last line * of the screen, or the existence of small screens. */ #define LASTLINE(sp) \ ((sp)->t_maxrows < (sp)->rows ? (sp)->t_maxrows : (sp)->rows - 1) /* * Small screen (see vs_refresh.c, section 6a) and one-line screen test. * Note, both cannot be true for the same screen. */ #define IS_SMALL(sp) ((sp)->t_minrows != (sp)->t_maxrows) #define IS_ONELINE(sp) ((sp)->rows == 1) #define HALFTEXT(sp) /* Half text. */ \ ((sp)->t_rows == 1 ? 1 : (sp)->t_rows / 2) #define HALFSCREEN(sp) /* Half text screen. */ \ ((sp)->t_maxrows == 1 ? 1 : (sp)->t_maxrows / 2) /* * Next tab offset. * * !!! * There are problems with how the historical vi handled tabs. For example, * by doing "set ts=3" and building lines that fold, you can get it to step * through tabs as if they were spaces and move inserted characters to new * positions when is entered. I believe that nvi does tabs correctly, * but there are some historical incompatibilities. */ #define TAB_OFF(c) COL_OFF((c), O_VAL(sp, O_TABSTOP)) /* If more than one horizontal screen being shown. */ #define IS_HSPLIT(sp) \ ((sp)->rows != O_VAL(sp, O_LINES)) /* If more than one vertical screen being shown. */ #define IS_VSPLIT(sp) \ ((sp)->cols != O_VAL(sp, O_COLUMNS)) /* If more than one screen being shown. */ #define IS_SPLIT(sp) \ (IS_HSPLIT(sp) || IS_VSPLIT(sp)) /* Screen adjustment operations. */ typedef enum { A_DECREASE, A_INCREASE, A_SET } adj_t; /* Screen position operations. */ typedef enum { P_BOTTOM, P_FILL, P_MIDDLE, P_TOP } pos_t; /* Scrolling operations. */ typedef enum { CNTRL_B, CNTRL_D, CNTRL_E, CNTRL_F, CNTRL_U, CNTRL_Y, Z_CARAT, Z_PLUS } scroll_t; /* Vi common error messages. */ typedef enum { VIM_COMBUF, VIM_EMPTY, VIM_EOF, VIM_EOL, VIM_NOCOM, VIM_NOCOM_B, VIM_USAGE, VIM_WRESIZE } vim_t; #include "extern.h" nvi-1.81.6/vi/vs_line.c0100644000076400001440000003526710720065506013710 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_line.c,v 10.38 2002/01/19 21:59:07 skimo Exp $ (Berkeley) $Date: 2002/01/19 21:59:07 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" #ifdef VISIBLE_TAB_CHARS #define TABCH '-' #else #define TABCH ' ' #endif /* * vs_line -- * Update one line on the screen. * * PUBLIC: int vs_line __P((SCR *, SMAP *, size_t *, size_t *)); */ int vs_line(SCR *sp, SMAP *smp, size_t *yp, size_t *xp) { char *kp; GS *gp; SMAP *tsmp; size_t chlen, cno_cnt, cols_per_screen, len, nlen; size_t offset_in_char, offset_in_line, oldx, oldy; size_t scno, skip_cols, skip_screens; int dne, is_cached, is_partial, is_tab, no_draw; int list_tab, list_dollar; CHAR_T *p; CHAR_T *cbp, *ecbp, cbuf[128]; CHAR_T ch; #if defined(DEBUG) && 0 vtrace(sp, "vs_line: row %u: line: %u off: %u\n", smp - HMAP, smp->lno, smp->off); #endif /* * If ex modifies the screen after ex output is already on the screen, * don't touch it -- we'll get scrolling wrong, at best. */ no_draw = 0; if (!F_ISSET(sp, SC_TINPUT_INFO) && VIP(sp)->totalcount > 1) no_draw = 1; if (F_ISSET(sp, SC_SCR_EXWROTE) && smp - HMAP != LASTLINE(sp)) no_draw = 1; /* * Assume that, if the cache entry for the line is filled in, the * line is already on the screen, and all we need to do is return * the cursor position. If the calling routine doesn't need the * cursor position, we can just return. */ is_cached = SMAP_CACHE(smp); if (yp == NULL && (is_cached || no_draw)) return (0); /* * A nasty side effect of this routine is that it returns the screen * position for the "current" character. Not pretty, but this is the * only routine that really knows what's out there. * * Move to the line. This routine can be called by vs_sm_position(), * which uses it to fill in the cache entry so it can figure out what * the real contents of the screen are. Because of this, we have to * return to whereever we started from. */ gp = sp->gp; (void)gp->scr_cursor(sp, &oldy, &oldx); (void)gp->scr_move(sp, smp - HMAP, 0); /* Get the line. */ dne = db_get(sp, smp->lno, 0, &p, &len); /* * Special case if we're printing the info/mode line. Skip printing * the leading number, as well as other minor setup. The only time * this code paints the mode line is when the user is entering text * for a ":" command, so we can put the code here instead of dealing * with the empty line logic below. This is a kludge, but it's pretty * much confined to this module. * * Set the number of columns for this screen. * Set the number of chars or screens to skip until a character is to * be displayed. */ cols_per_screen = sp->cols; if (O_ISSET(sp, O_LEFTRIGHT)) { skip_screens = 0; skip_cols = smp->coff; } else { skip_screens = smp->soff - 1; skip_cols = skip_screens * cols_per_screen; } list_tab = O_ISSET(sp, O_LIST); if (F_ISSET(sp, SC_TINPUT_INFO)) list_dollar = 0; else { list_dollar = list_tab; /* * If O_NUMBER is set, the line doesn't exist and it's line * number 1, i.e., an empty file, display the line number. * * If O_NUMBER is set, the line exists and the first character * on the screen is the first character in the line, display * the line number. * * !!! * If O_NUMBER set, decrement the number of columns in the * first screen. DO NOT CHANGE THIS -- IT'S RIGHT! The * rest of the code expects this to reflect the number of * columns in the first screen, regardless of the number of * columns we're going to skip. */ if (O_ISSET(sp, O_NUMBER)) { cols_per_screen -= O_NUMBER_LENGTH; if ((!dne || smp->lno == 1) && skip_cols == 0) { nlen = snprintf((char*)cbuf, sizeof(cbuf), O_NUMBER_FMT, smp->lno); (void)gp->scr_addstr(sp, (char*)cbuf, nlen); } } } /* * Special case non-existent lines and the first line of an empty * file. In both cases, the cursor position is 0, but corrected * as necessary for the O_NUMBER field, if it was displayed. */ if (dne || len == 0) { /* Fill in the cursor. */ if (yp != NULL && smp->lno == sp->lno) { *yp = smp - HMAP; *xp = sp->cols - cols_per_screen; } /* If the line is on the screen, quit. */ if (is_cached || no_draw) goto ret1; /* Set line cache information. */ smp->c_sboff = smp->c_eboff = 0; smp->c_scoff = smp->c_eclen = 0; /* * Lots of special cases for empty lines, but they only apply * if we're displaying the first screen of the line. */ if (skip_cols == 0) if (dne) { if (smp->lno == 1) { if (list_dollar) { ch = L('$'); goto empty; } } else { ch = L('~'); goto empty; } } else if (list_dollar) { ch = L('$'); empty: (void)gp->scr_addstr(sp, KEY_NAME(sp, ch), KEY_LEN(sp, ch)); } (void)gp->scr_clrtoeol(sp); (void)gp->scr_move(sp, oldy, oldx); return (0); } /* If we shortened this line in another screen, the cursor * position may have fallen off. */ if (sp->lno == smp->lno && sp->cno >= len) sp->cno = len - 1; /* * If we just wrote this or a previous line, we cached the starting * and ending positions of that line. The way it works is we keep * information about the lines displayed in the SMAP. If we're * painting the screen in the forward direction, this saves us from * reformatting the physical line for every line on the screen. This * wins big on binary files with 10K lines. * * Test for the first screen of the line, then the current screen line, * then the line behind us, then do the hard work. Note, it doesn't * do us any good to have a line in front of us -- it would be really * hard to try and figure out tabs in the reverse direction, i.e. how * many spaces a tab takes up in the reverse direction depends on * what characters preceded it. * * Test for the first screen of the line. */ if (skip_cols == 0) { smp->c_sboff = offset_in_line = 0; smp->c_scoff = offset_in_char = 0; p = &p[offset_in_line]; goto display; } /* Test to see if we've seen this exact line before. */ if (is_cached) { offset_in_line = smp->c_sboff; offset_in_char = smp->c_scoff; p = &p[offset_in_line]; /* Set cols_per_screen to 2nd and later line length. */ if (O_ISSET(sp, O_LEFTRIGHT) || skip_cols > cols_per_screen) cols_per_screen = sp->cols; goto display; } /* Test to see if we saw an earlier part of this line before. */ if (smp != HMAP && SMAP_CACHE(tsmp = smp - 1) && tsmp->lno == smp->lno) { if (tsmp->c_eclen != tsmp->c_ecsize) { offset_in_line = tsmp->c_eboff; offset_in_char = tsmp->c_eclen; } else { offset_in_line = tsmp->c_eboff + 1; offset_in_char = 0; } /* Put starting info for this line in the cache. */ smp->c_sboff = offset_in_line; smp->c_scoff = offset_in_char; p = &p[offset_in_line]; /* Set cols_per_screen to 2nd and later line length. */ if (O_ISSET(sp, O_LEFTRIGHT) || skip_cols > cols_per_screen) cols_per_screen = sp->cols; goto display; } scno = 0; offset_in_line = 0; offset_in_char = 0; /* Do it the hard way, for leftright scrolling screens. */ if (O_ISSET(sp, O_LEFTRIGHT)) { for (; offset_in_line < len; ++offset_in_line) { chlen = (ch = *p++) == L('\t') && !list_tab ? TAB_OFF(scno) : KEY_COL(sp, ch); if ((scno += chlen) >= skip_cols) break; } /* Set cols_per_screen to 2nd and later line length. */ cols_per_screen = sp->cols; /* Put starting info for this line in the cache. */ if (offset_in_line >= len) { smp->c_sboff = offset_in_line; smp->c_scoff = 255; } else if (scno != skip_cols) { smp->c_sboff = offset_in_line; smp->c_scoff = offset_in_char = chlen - (scno - skip_cols); --p; } else { smp->c_sboff = ++offset_in_line; smp->c_scoff = 0; } } /* Do it the hard way, for historic line-folding screens. */ else { for (; offset_in_line < len; ++offset_in_line) { chlen = (ch = *p++) == L('\t') && !list_tab ? TAB_OFF(scno) : KEY_COL(sp, ch); if ((scno += chlen) < cols_per_screen) continue; scno -= cols_per_screen; /* Set cols_per_screen to 2nd and later line length. */ cols_per_screen = sp->cols; /* * If crossed the last skipped screen boundary, start * displaying the characters. */ if (--skip_screens == 0) break; } /* Put starting info for this line in the cache. */ if (scno != 0) { smp->c_sboff = offset_in_line; smp->c_scoff = offset_in_char = chlen - scno; --p; } else { smp->c_sboff = ++offset_in_line; smp->c_scoff = 0; } } display: /* * Set the number of characters to skip before reaching the cursor * character. Offset by 1 and use 0 as a flag value. Vs_line is * called repeatedly with a valid pointer to a cursor position. * Don't fill anything in unless it's the right line and the right * character, and the right part of the character... */ if (yp == NULL || smp->lno != sp->lno || sp->cno < offset_in_line || offset_in_line + cols_per_screen < sp->cno) { cno_cnt = 0; /* If the line is on the screen, quit. */ if (is_cached || no_draw) goto ret1; } else cno_cnt = (sp->cno - offset_in_line) + 1; /* This is the loop that actually displays characters. */ ecbp = (cbp = cbuf) + sizeof(cbuf)/sizeof(CHAR_T) - 1; for (is_partial = 0, scno = 0; offset_in_line < len; ++offset_in_line, offset_in_char = 0) { if ((ch = *p++) == L('\t') && !list_tab) { scno += chlen = TAB_OFF(scno) - offset_in_char; is_tab = 1; } else { scno += chlen = KEY_COL(sp, ch) - offset_in_char; is_tab = 0; } /* * Only display up to the right-hand column. Set a flag if * the entire character wasn't displayed for use in setting * the cursor. If reached the end of the line, set the cache * info for the screen. Don't worry about there not being * characters to display on the next screen, its lno/off won't * match up in that case. */ if (scno >= cols_per_screen) { if (is_tab == 1) { chlen -= scno - cols_per_screen; smp->c_ecsize = smp->c_eclen = chlen; scno = cols_per_screen; } else { smp->c_ecsize = chlen; chlen -= scno - cols_per_screen; smp->c_eclen = chlen; if (scno > cols_per_screen) is_partial = 1; } smp->c_eboff = offset_in_line; /* Terminate the loop. */ offset_in_line = len; } /* * If the caller wants the cursor value, and this was the * cursor character, set the value. There are two ways to * put the cursor on a character -- if it's normal display * mode, it goes on the last column of the character. If * it's input mode, it goes on the first. In normal mode, * set the cursor only if the entire character was displayed. */ if (cno_cnt && --cno_cnt == 0 && (F_ISSET(sp, SC_TINPUT) || !is_partial)) { *yp = smp - HMAP; if (F_ISSET(sp, SC_TINPUT)) if (is_partial) *xp = scno - smp->c_ecsize; else *xp = scno - chlen; else *xp = scno - 1; if (O_ISSET(sp, O_NUMBER) && !F_ISSET(sp, SC_TINPUT_INFO) && skip_cols == 0) *xp += O_NUMBER_LENGTH; /* If the line is on the screen, quit. */ if (is_cached || no_draw) goto ret1; } /* If the line is on the screen, don't display anything. */ if (is_cached || no_draw) continue; #define FLUSH { \ *cbp = '\0'; \ (void)gp->scr_waddstr(sp, cbuf, cbp - cbuf); \ cbp = cbuf; \ } /* * Display the character. We do tab expansion here because * the screen interface doesn't have any way to set the tab * length. Note, it's theoretically possible for chlen to * be larger than cbuf, if the user set a impossibly large * tabstop. */ if (is_tab) while (chlen--) { if (cbp >= ecbp) FLUSH; *cbp++ = TABCH; } else { if (cbp + chlen >= ecbp) FLUSH; /* don't display half a wide character */ if (is_partial && CHAR_WIDTH(sp, ch) > 1) { *cbp++ = ' '; break; } /* XXXX this needs some rethinking */ if (INTISWIDE(ch)) { /* Put a space before non-spacing char. */ if (!CHAR_WIDTH(sp, ch)) *cbp++ = L(' '); *cbp++ = ch; } else for (kp = KEY_NAME(sp, ch) + offset_in_char; chlen--;) *cbp++ = (u_char)*kp++; } } if (scno < cols_per_screen) { /* If didn't paint the whole line, update the cache. */ smp->c_ecsize = smp->c_eclen = KEY_LEN(sp, ch); smp->c_eboff = len - 1; /* * If not the info/mode line, and O_LIST set, and at the * end of the line, and the line ended on this screen, * add a trailing $. */ if (list_dollar) { ++scno; chlen = KEY_LEN(sp, '$'); if (cbp + chlen >= ecbp) FLUSH; for (kp = KEY_NAME(sp, '$'); chlen--;) *cbp++ = *kp++; } /* If still didn't paint the whole line, clear the rest. */ if (scno < cols_per_screen) (void)gp->scr_clrtoeol(sp); } /* Flush any buffered characters. */ if (cbp > cbuf) FLUSH; ret1: (void)gp->scr_move(sp, oldy, oldx); return (0); } /* * vs_number -- * Repaint the numbers on all the lines. * * PUBLIC: int vs_number __P((SCR *)); */ int vs_number(SCR *sp) { GS *gp; SMAP *smp; VI_PRIVATE *vip; size_t len, oldy, oldx; int exist; char nbuf[10]; gp = sp->gp; vip = VIP(sp); /* No reason to do anything if we're in input mode on the info line. */ if (F_ISSET(sp, SC_TINPUT_INFO)) return (0); /* * Try and avoid getting the last line in the file, by getting the * line after the last line in the screen -- if it exists, we know * we have to to number all the lines in the screen. Get the one * after the last instead of the last, so that the info line doesn't * fool us. (The problem is that file_lline will lie, and tell us * that the info line is the last line in the file.) If that test * fails, we have to check each line for existence. */ exist = db_exist(sp, TMAP->lno + 1); (void)gp->scr_cursor(sp, &oldy, &oldx); for (smp = HMAP; smp <= TMAP; ++smp) { /* Numbers are only displayed for the first screen line. */ if (O_ISSET(sp, O_LEFTRIGHT)) { if (smp->coff != 0) continue; } else if (smp->soff != 1) continue; /* * The first line of an empty file gets numbered, otherwise * number any existing line. */ if (smp->lno != 1 && !exist && !db_exist(sp, smp->lno)) break; (void)gp->scr_move(sp, smp - HMAP, 0); len = snprintf(nbuf, sizeof(nbuf), O_NUMBER_FMT, smp->lno); (void)gp->scr_addstr(sp, nbuf, len); } (void)gp->scr_move(sp, oldy, oldx); return (0); } nvi-1.81.6/vi/vs_msg.c0100644000076400001440000005362610720065506013546 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_msg.c,v 10.85 2001/07/29 19:07:31 skimo Exp $ (Berkeley) $Date: 2001/07/29 19:07:31 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" typedef enum { SCROLL_W, /* User wait. */ SCROLL_W_EX, /* User wait, or enter : to continue. */ SCROLL_W_QUIT /* User wait, or enter q to quit. */ /* * SCROLL_W_QUIT has another semantic * -- only wait if the screen is full */ } sw_t; static void vs_divider __P((SCR *)); static void vs_msgsave __P((SCR *, mtype_t, char *, size_t)); static void vs_output __P((SCR *, mtype_t, const char *, int)); static void vs_scroll __P((SCR *, int *, sw_t)); static void vs_wait __P((SCR *, int *, sw_t)); /* * vs_busy -- * Display, update or clear a busy message. * * This routine is the default editor interface for vi busy messages. It * implements a standard strategy of stealing lines from the bottom of the * vi text screen. Screens using an alternate method of displaying busy * messages, e.g. X11 clock icons, should set their scr_busy function to the * correct function before calling the main editor routine. * * PUBLIC: void vs_busy __P((SCR *, const char *, busy_t)); */ void vs_busy(SCR *sp, const char *msg, busy_t btype) { GS *gp; VI_PRIVATE *vip; static const char flagc[] = "|/-\\"; struct timeval tv; size_t len, notused; const char *p; /* Ex doesn't display busy messages. */ if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) return; gp = sp->gp; vip = VIP(sp); /* * Most of this routine is to deal with the screen sharing real estate * between the normal edit messages and the busy messages. Logically, * all that's needed is something that puts up a message, periodically * updates it, and then goes away. */ switch (btype) { case BUSY_ON: ++vip->busy_ref; if (vip->totalcount != 0 || vip->busy_ref != 1) break; /* Initialize state for updates. */ vip->busy_ch = 0; (void)gettimeofday(&vip->busy_tv, NULL); /* Save the current cursor. */ (void)gp->scr_cursor(sp, &vip->busy_oldy, &vip->busy_oldx); /* Display the busy message. */ p = msg_cat(sp, msg, &len); (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_addstr(sp, p, len); (void)gp->scr_cursor(sp, ¬used, &vip->busy_fx); (void)gp->scr_clrtoeol(sp); (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); break; case BUSY_OFF: if (vip->busy_ref == 0) break; --vip->busy_ref; /* * If the line isn't in use for another purpose, clear it. * Always return to the original position. */ if (vip->totalcount == 0 && vip->busy_ref == 0) { (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_clrtoeol(sp); } (void)gp->scr_move(sp, vip->busy_oldy, vip->busy_oldx); break; case BUSY_UPDATE: if (vip->totalcount != 0 || vip->busy_ref == 0) break; /* Update no more than every 1/8 of a second. */ (void)gettimeofday(&tv, NULL); if (((tv.tv_sec - vip->busy_tv.tv_sec) * 1000000 + (tv.tv_usec - vip->busy_tv.tv_usec)) < 125000) return; vip->busy_tv = tv; /* Display the update. */ if (vip->busy_ch == sizeof(flagc) - 1) vip->busy_ch = 0; (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); (void)gp->scr_addstr(sp, flagc + vip->busy_ch++, 1); (void)gp->scr_move(sp, LASTLINE(sp), vip->busy_fx); break; } (void)gp->scr_refresh(sp, 0); } /* * vs_home -- * Home the cursor to the bottom row, left-most column. * * PUBLIC: void vs_home __P((SCR *)); */ void vs_home(SCR *sp) { (void)sp->gp->scr_move(sp, LASTLINE(sp), 0); (void)sp->gp->scr_refresh(sp, 0); } /* * vs_update -- * Update a command. * * PUBLIC: void vs_update __P((SCR *, const char *, const CHAR_T *)); */ void vs_update(SCR *sp, const char *m1, const CHAR_T *m2) { GS *gp; size_t len, mlen, oldx, oldy; CONST char *np; size_t nlen; gp = sp->gp; /* * This routine displays a message on the bottom line of the screen, * without updating any of the command structures that would keep it * there for any period of time, i.e. it is overwritten immediately. * * It's used by the ex read and ! commands when the user's command is * expanded, and by the ex substitution confirmation prompt. */ if (F_ISSET(sp, SC_SCR_EXWROTE)) { if (m2 != NULL) INT2CHAR(sp, m2, STRLEN(m2) + 1, np, nlen); (void)ex_printf(sp, "%s\n", m1 == NULL? "" : m1, m2 == NULL ? "" : np); (void)ex_fflush(sp); } /* * Save the cursor position, the substitute-with-confirmation code * will have already set it correctly. */ (void)gp->scr_cursor(sp, &oldy, &oldx); /* Clear the bottom line. */ (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_clrtoeol(sp); /* * XXX * Don't let long file names screw up the screen. */ if (m1 != NULL) { mlen = len = strlen(m1); if (len > sp->cols - 2) mlen = len = sp->cols - 2; (void)gp->scr_addstr(sp, m1, mlen); } else len = 0; if (m2 != NULL) { mlen = STRLEN(m2); if (len + mlen > sp->cols - 2) mlen = (sp->cols - 2) - len; (void)gp->scr_waddstr(sp, m2, mlen); } (void)gp->scr_move(sp, oldy, oldx); (void)gp->scr_refresh(sp, 0); } /* * vs_msg -- * Display ex output or error messages for the screen. * * This routine is the default editor interface for all ex output, and all ex * and vi error/informational messages. It implements the standard strategy * of stealing lines from the bottom of the vi text screen. Screens using an * alternate method of displaying messages, e.g. dialog boxes, should set their * scr_msg function to the correct function before calling the editor. * * PUBLIC: void vs_msg __P((SCR *, mtype_t, char *, size_t)); */ void vs_msg(SCR *sp, mtype_t mtype, char *line, size_t len) { GS *gp; VI_PRIVATE *vip; size_t maxcols, oldx, oldy, padding; const char *e, *s, *t; gp = sp->gp; vip = VIP(sp); /* * Ring the bell if it's scheduled. * * XXX * Shouldn't we save this, too? */ if (F_ISSET(sp, SC_TINPUT_INFO) || F_ISSET(gp, G_BELLSCHED)) if (F_ISSET(sp, SC_SCR_VI)) { F_CLR(gp, G_BELLSCHED); (void)gp->scr_bell(sp); } else F_SET(gp, G_BELLSCHED); /* * If vi is using the error line for text input, there's no screen * real-estate for the error message. Nothing to do without some * information as to how important the error message is. */ if (F_ISSET(sp, SC_TINPUT_INFO)) return; /* * Ex or ex controlled screen output. * * If output happens during startup, e.g., a .exrc file, we may be * in ex mode but haven't initialized the screen. Initialize here, * and in this case, stay in ex mode. * * If the SC_SCR_EXWROTE bit is set, then we're switching back and * forth between ex and vi, but the screen is trashed and we have * to respect that. Switch to ex mode long enough to put out the * message. * * If the SC_EX_WAIT_NO bit is set, turn it off -- we're writing to * the screen, so previous opinions are ignored. */ if (F_ISSET(sp, SC_EX | SC_SCR_EXWROTE)) { if (!F_ISSET(sp, SC_SCR_EX)) if (F_ISSET(sp, SC_SCR_EXWROTE)) { if (sp->gp->scr_screen(sp, SC_EX)) return; } else if (ex_init(sp)) return; if (mtype == M_ERR) (void)gp->scr_attr(sp, SA_INVERSE, 1); (void)printf("%.*s", (int)len, line); if (mtype == M_ERR) (void)gp->scr_attr(sp, SA_INVERSE, 0); (void)fflush(stdout); F_CLR(sp, SC_EX_WAIT_NO); if (!F_ISSET(sp, SC_SCR_EX)) (void)sp->gp->scr_screen(sp, SC_VI); return; } /* If the vi screen isn't ready, save the message. */ if (!F_ISSET(sp, SC_SCR_VI)) { (void)vs_msgsave(sp, mtype, line, len); return; } /* Save the cursor position. */ (void)gp->scr_cursor(sp, &oldy, &oldx); /* If it's an ex output message, just write it out. */ if (mtype == M_NONE) { vs_output(sp, mtype, line, len); goto ret; } /* * If it's a vi message, strip the trailing so we can * try and paste messages together. */ if (line[len - 1] == '\n') --len; /* * If a message won't fit on a single line, try to split on a . * If a subsequent message fits on the same line, write a separator * and output it. Otherwise, put out a newline. * * Need up to two padding characters normally; a semi-colon and a * separating space. If only a single line on the screen, add some * more for the trailing continuation message. * * XXX * Assume that periods and semi-colons take up a single column on the * screen. * * XXX * There are almost certainly pathological cases that will break this * code. */ if (IS_ONELINE(sp)) (void)msg_cmsg(sp, CMSG_CONT_S, &padding); else padding = 0; padding += 2; maxcols = sp->cols - 1; if (vip->lcontinue != 0) if (len + vip->lcontinue + padding > maxcols) vs_output(sp, vip->mtype, ".\n", 2); else { vs_output(sp, vip->mtype, ";", 1); vs_output(sp, M_NONE, " ", 1); } vip->mtype = mtype; for (s = line;; s = t) { for (; len > 0 && isblank(*s); --len, ++s); if (len == 0) break; if (len + vip->lcontinue > maxcols) { for (e = s + (maxcols - vip->lcontinue); e > s && !isblank(*e); --e); if (e == s) e = t = s + (maxcols - vip->lcontinue); else for (t = e; isblank(e[-1]); --e); } else e = t = s + len; /* * If the message ends in a period, discard it, we want to * gang messages where possible. */ len -= t - s; if (len == 0 && (e - s) > 1 && s[(e - s) - 1] == '.') --e; vs_output(sp, mtype, s, e - s); if (len != 0) vs_output(sp, M_NONE, "\n", 1); if (INTERRUPTED(sp)) break; } ret: (void)gp->scr_move(sp, oldy, oldx); (void)gp->scr_refresh(sp, 0); } /* * vs_output -- * Output the text to the screen. */ static void vs_output(SCR *sp, mtype_t mtype, const char *line, int llen) { char *kp; GS *gp; VI_PRIVATE *vip; size_t chlen, notused; int ch, len, rlen, tlen; const char *p, *t; char *cbp, *ecbp, cbuf[128]; gp = sp->gp; vip = VIP(sp); for (p = line, rlen = llen; llen > 0;) { /* Get the next physical line. */ if ((p = memchr(line, '\n', llen)) == NULL) len = llen; else len = p - line; /* * The max is sp->cols characters, and we may have already * written part of the line. */ if (len + vip->lcontinue > sp->cols) len = sp->cols - vip->lcontinue; /* * If the first line output, do nothing. If the second line * output, draw the divider line. If drew a full screen, we * remove the divider line. If it's a continuation line, move * to the continuation point, else, move the screen up. */ if (vip->lcontinue == 0) { if (!IS_ONELINE(sp)) { if (vip->totalcount == 1) { (void)gp->scr_move(sp, LASTLINE(sp) - 1, 0); (void)gp->scr_clrtoeol(sp); (void)vs_divider(sp); F_SET(vip, VIP_DIVIDER); ++vip->totalcount; ++vip->linecount; } if (vip->totalcount == sp->t_maxrows && F_ISSET(vip, VIP_DIVIDER)) { --vip->totalcount; --vip->linecount; F_CLR(vip, VIP_DIVIDER); } } if (vip->totalcount != 0) vs_scroll(sp, NULL, SCROLL_W_QUIT); (void)gp->scr_move(sp, LASTLINE(sp), 0); ++vip->totalcount; ++vip->linecount; if (INTERRUPTED(sp)) break; } else (void)gp->scr_move(sp, LASTLINE(sp), vip->lcontinue); /* Error messages are in inverse video. */ if (mtype == M_ERR) (void)gp->scr_attr(sp, SA_INVERSE, 1); /* Display the line, doing character translation. */ #define FLUSH { \ *cbp = '\0'; \ (void)gp->scr_addstr(sp, cbuf, cbp - cbuf); \ cbp = cbuf; \ } ecbp = (cbp = cbuf) + sizeof(cbuf) - 1; for (t = line, tlen = len; tlen--; ++t) { ch = *t; /* * Replace tabs with spaces, there are places in * ex that do column calculations without looking * at -- and all routines that care about * do their own expansions. This catches * in things like tag search strings. */ if (ch == '\t') ch = ' '; chlen = KEY_LEN(sp, ch); if (cbp + chlen >= ecbp) FLUSH; for (kp = KEY_NAME(sp, ch); chlen--;) *cbp++ = *kp++; } if (cbp > cbuf) FLUSH; if (mtype == M_ERR) (void)gp->scr_attr(sp, SA_INVERSE, 0); /* Clear the rest of the line. */ (void)gp->scr_clrtoeol(sp); /* If we loop, it's a new line. */ vip->lcontinue = 0; /* Reset for the next line. */ line += len; llen -= len; if (p != NULL) { ++line; --llen; } } /* Set up next continuation line. */ if (p == NULL) gp->scr_cursor(sp, ¬used, &vip->lcontinue); } /* * vs_ex_resolve -- * Deal with ex message output. * * This routine is called when exiting a colon command to resolve any ex * output that may have occurred. * * PUBLIC: int vs_ex_resolve __P((SCR *, int *)); */ int vs_ex_resolve(SCR *sp, int *continuep) { EVENT ev; GS *gp; VI_PRIVATE *vip; sw_t wtype; gp = sp->gp; vip = VIP(sp); *continuep = 0; /* If we ran any ex command, we can't trust the cursor position. */ F_SET(vip, VIP_CUR_INVALID); /* Terminate any partially written message. */ if (vip->lcontinue != 0) { vs_output(sp, vip->mtype, ".", 1); vip->lcontinue = 0; vip->mtype = M_NONE; } /* * If we switched out of the vi screen into ex, switch back while we * figure out what to do with the screen and potentially get another * command to execute. * * If we didn't switch into ex, we're not required to wait, and less * than 2 lines of output, we can continue without waiting for the * wait. * * Note, all other code paths require waiting, so we leave the report * of modified lines until later, so that we won't wait for no other * reason than a threshold number of lines were modified. This means * we display cumulative line modification reports for groups of ex * commands. That seems right to me (well, at least not wrong). */ if (F_ISSET(sp, SC_SCR_EXWROTE)) { if (sp->gp->scr_screen(sp, SC_VI)) return (1); } else if (!F_ISSET(sp, SC_EX_WAIT_YES) && vip->totalcount < 2) { F_CLR(sp, SC_EX_WAIT_NO); return (0); } /* Clear the required wait flag, it's no longer needed. */ F_CLR(sp, SC_EX_WAIT_YES); /* * Wait, unless explicitly told not to wait or the user interrupted * the command. If the user is leaving the screen, for any reason, * they can't continue with further ex commands. */ if (!F_ISSET(sp, SC_EX_WAIT_NO) && !INTERRUPTED(sp)) { wtype = F_ISSET(sp, SC_EXIT | SC_EXIT_FORCE | SC_FSWITCH | SC_SSWITCH) ? SCROLL_W : SCROLL_W_EX; if (F_ISSET(sp, SC_SCR_EXWROTE)) vs_wait(sp, continuep, wtype); else vs_scroll(sp, continuep, wtype); if (*continuep) return (0); } /* If ex wrote on the screen, refresh the screen image. */ if (F_ISSET(sp, SC_SCR_EXWROTE)) F_SET(vip, VIP_N_EX_PAINT); /* * If we're not the bottom of the split screen stack, the screen * image itself is wrong, so redraw everything. */ if (sp->q.cqe_next != (void *)&sp->wp->scrq) F_SET(sp, SC_SCR_REDRAW); /* If ex changed the underlying file, the map itself is wrong. */ if (F_ISSET(vip, VIP_N_EX_REDRAW)) F_SET(sp, SC_SCR_REFORMAT); /* Ex may have switched out of the alternate screen, return. */ (void)gp->scr_attr(sp, SA_ALTERNATE, 1); /* * Whew. We're finally back home, after what feels like years. * Kiss the ground. */ F_CLR(sp, SC_SCR_EXWROTE | SC_EX_WAIT_NO); /* * We may need to repaint some of the screen, e.g.: * * :set * :!ls * * gives us a combination of some lines that are "wrong", and a need * for a full refresh. */ if (vip->totalcount > 1) { /* Set up the redraw of the overwritten lines. */ ev.e_event = E_REPAINT; ev.e_flno = vip->totalcount >= sp->rows ? 1 : sp->rows - vip->totalcount; ev.e_tlno = sp->rows; /* Reset the count of overwriting lines. */ vip->linecount = vip->lcontinue = vip->totalcount = 0; /* Redraw. */ (void)v_erepaint(sp, &ev); } else /* Reset the count of overwriting lines. */ vip->linecount = vip->lcontinue = vip->totalcount = 0; return (0); } /* * vs_resolve -- * Deal with message output. * * PUBLIC: int vs_resolve __P((SCR *, SCR *, int)); */ int vs_resolve(SCR *sp, SCR *csp, int forcewait) { EVENT ev; GS *gp; WIN *wp; MSGS *mp; VI_PRIVATE *vip; size_t oldy, oldx; int redraw; /* * Vs_resolve is called from the main vi loop and the refresh function * to periodically ensure that the user has seen any messages that have * been displayed and that any status lines are correct. The sp screen * is the screen we're checking, usually the current screen. When it's * not, csp is the current screen, used for final cursor positioning. */ gp = sp->gp; wp = sp->wp; vip = VIP(sp); if (csp == NULL) csp = sp; /* Save the cursor position. */ (void)gp->scr_cursor(csp, &oldy, &oldx); /* Ring the bell if it's scheduled. */ if (F_ISSET(gp, G_BELLSCHED)) { F_CLR(gp, G_BELLSCHED); (void)gp->scr_bell(sp); } /* Display new file status line. */ if (F_ISSET(sp, SC_STATUS)) { F_CLR(sp, SC_STATUS); msgq_status(sp, sp->lno, MSTAT_TRUNCATE); } /* Report on line modifications. */ mod_rpt(sp); /* * Flush any saved messages. If the screen isn't ready, refresh * it. (A side-effect of screen refresh is that we can display * messages.) Once this is done, don't trust the cursor. That * extra refresh screwed the pooch. */ if (gp->msgq.lh_first != NULL) { if (!F_ISSET(sp, SC_SCR_VI) && vs_refresh(sp, 1)) return (1); while ((mp = gp->msgq.lh_first) != NULL) { wp->scr_msg(sp, mp->mtype, mp->buf, mp->len); LIST_REMOVE(mp, q); free(mp->buf); free(mp); } F_SET(vip, VIP_CUR_INVALID); } switch (vip->totalcount) { case 0: redraw = 0; break; case 1: /* * If we're switching screens, we have to wait for messages, * regardless. If we don't wait, skip updating the modeline. */ if (forcewait) vs_scroll(sp, NULL, SCROLL_W); else F_SET(vip, VIP_S_MODELINE); redraw = 0; break; default: /* * If >1 message line in use, prompt the user to continue and * repaint overwritten lines. */ vs_scroll(sp, NULL, SCROLL_W); ev.e_event = E_REPAINT; ev.e_flno = vip->totalcount >= sp->rows ? 1 : sp->rows - vip->totalcount; ev.e_tlno = sp->rows; redraw = 1; break; } /* Reset the count of overwriting lines. */ vip->linecount = vip->lcontinue = vip->totalcount = 0; /* Redraw. */ if (redraw) (void)v_erepaint(sp, &ev); /* Restore the cursor position. */ (void)gp->scr_move(csp, oldy, oldx); return (0); } /* * vs_scroll -- * Scroll the screen for output. */ static void vs_scroll(SCR *sp, int *continuep, sw_t wtype) { GS *gp; VI_PRIVATE *vip; gp = sp->gp; vip = VIP(sp); if (!IS_ONELINE(sp)) { /* * Scroll the screen. Instead of scrolling the entire screen, * delete the line above the first line output so preserve the * maximum amount of the screen. */ (void)gp->scr_move(sp, vip->totalcount < sp->rows ? LASTLINE(sp) - vip->totalcount : 0, 0); (void)gp->scr_deleteln(sp); /* If there are screens below us, push them back into place. */ if (sp->q.cqe_next != (void *)&sp->wp->scrq) { (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_insertln(sp); } } if (wtype == SCROLL_W_QUIT && vip->linecount < sp->t_maxrows) return; vs_wait(sp, continuep, wtype); } /* * vs_wait -- * Prompt the user to continue. */ static void vs_wait(SCR *sp, int *continuep, sw_t wtype) { EVENT ev; VI_PRIVATE *vip; const char *p; GS *gp; size_t len; gp = sp->gp; vip = VIP(sp); (void)gp->scr_move(sp, LASTLINE(sp), 0); if (IS_ONELINE(sp)) p = msg_cmsg(sp, CMSG_CONT_S, &len); else switch (wtype) { case SCROLL_W_QUIT: p = msg_cmsg(sp, CMSG_CONT_Q, &len); break; case SCROLL_W_EX: p = msg_cmsg(sp, CMSG_CONT_EX, &len); break; case SCROLL_W: p = msg_cmsg(sp, CMSG_CONT, &len); break; default: abort(); /* NOTREACHED */ } (void)gp->scr_addstr(sp, p, len); ++vip->totalcount; vip->linecount = 0; (void)gp->scr_clrtoeol(sp); (void)gp->scr_refresh(sp, 0); /* Get a single character from the terminal. */ if (continuep != NULL) *continuep = 0; for (;;) { if (v_event_get(sp, &ev, 0, 0)) return; if (ev.e_event == E_CHARACTER) break; if (ev.e_event == E_INTERRUPT) { ev.e_c = CH_QUIT; F_SET(gp, G_INTERRUPTED); break; } (void)gp->scr_bell(sp); } switch (wtype) { case SCROLL_W_QUIT: if (ev.e_c == CH_QUIT) F_SET(gp, G_INTERRUPTED); break; case SCROLL_W_EX: if (ev.e_c == ':' && continuep != NULL) *continuep = 1; break; case SCROLL_W: break; } } /* * vs_divider -- * Draw a dividing line between the screen and the output. */ static void vs_divider(SCR *sp) { GS *gp; size_t len; #define DIVIDESTR "+=+=+=+=+=+=+=+" len = sizeof(DIVIDESTR) - 1 > sp->cols ? sp->cols : sizeof(DIVIDESTR) - 1; gp = sp->gp; (void)gp->scr_attr(sp, SA_INVERSE, 1); (void)gp->scr_addstr(sp, DIVIDESTR, len); (void)gp->scr_attr(sp, SA_INVERSE, 0); } /* * vs_msgsave -- * Save a message for later display. */ static void vs_msgsave(SCR *sp, mtype_t mt, char *p, size_t len) { GS *gp; MSGS *mp_c, *mp_n; /* * We have to handle messages before we have any place to put them. * If there's no screen support yet, allocate a msg structure, copy * in the message, and queue it on the global structure. If we can't * allocate memory here, we're genuinely screwed, dump the message * to stderr in the (probably) vain hope that someone will see it. */ CALLOC_GOTO(sp, mp_n, MSGS *, 1, sizeof(MSGS)); MALLOC_GOTO(sp, mp_n->buf, char *, len); memmove(mp_n->buf, p, len); mp_n->len = len; mp_n->mtype = mt; gp = sp->gp; if ((mp_c = gp->msgq.lh_first) == NULL) { LIST_INSERT_HEAD(&gp->msgq, mp_n, q); } else { for (; mp_c->q.le_next != NULL; mp_c = mp_c->q.le_next); LIST_INSERT_AFTER(mp_c, mp_n, q); } return; alloc_err: if (mp_n != NULL) free(mp_n); (void)fprintf(stderr, "%.*s\n", (int)len, p); } nvi-1.81.6/vi/vs_refresh.c0100644000076400001440000005702510720065506014413 0ustar skimousers/*- * Copyright (c) 1992, 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1992, 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_refresh.c,v 10.50 2001/06/25 15:19:37 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:37 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" #define UPDATE_CURSOR 0x01 /* Update the cursor. */ #define UPDATE_SCREEN 0x02 /* Flush to screen. */ static void vs_modeline __P((SCR *)); static int vs_paint __P((SCR *, u_int)); /* * vs_refresh -- * Refresh all screens. * * PUBLIC: int vs_refresh __P((SCR *, int)); */ int vs_refresh(SCR *sp, int forcepaint) { GS *gp; SCR *tsp; int need_refresh; u_int priv_paint, pub_paint; gp = sp->gp; /* * 1: Refresh the screen. * * If SC_SCR_REDRAW is set in the current screen, repaint everything * that we can find, including status lines. */ if (F_ISSET(sp, SC_SCR_REDRAW)) for (tsp = sp->wp->scrq.cqh_first; tsp != (void *)&sp->wp->scrq; tsp = tsp->q.cqe_next) if (tsp != sp) F_SET(tsp, SC_SCR_REDRAW | SC_STATUS); /* * 2: Related or dirtied screens, or screens with messages. * * If related screens share a view into a file, they may have been * modified as well. Refresh any screens that aren't exiting that * have paint or dirty bits set. Always update their screens, we * are not likely to get another chance. Finally, if we refresh any * screens other than the current one, the cursor will be trashed. */ pub_paint = SC_SCR_REFORMAT | SC_SCR_REDRAW; priv_paint = VIP_CUR_INVALID | VIP_N_REFRESH; if (O_ISSET(sp, O_NUMBER)) priv_paint |= VIP_N_RENUMBER; for (tsp = sp->wp->scrq.cqh_first; tsp != (void *)&sp->wp->scrq; tsp = tsp->q.cqe_next) if (tsp != sp && !F_ISSET(tsp, SC_EXIT | SC_EXIT_FORCE) && (F_ISSET(tsp, pub_paint) || F_ISSET(VIP(tsp), priv_paint))) { (void)vs_paint(tsp, (F_ISSET(VIP(tsp), VIP_CUR_INVALID) ? UPDATE_CURSOR : 0) | UPDATE_SCREEN); F_SET(VIP(sp), VIP_CUR_INVALID); } /* * 3: Refresh the current screen. * * Always refresh the current screen, it may be a cursor movement. * Also, always do it last -- that way, SC_SCR_REDRAW can be set * in the current screen only, and the screen won't flash. */ if (vs_paint(sp, UPDATE_CURSOR | (!forcepaint && F_ISSET(sp, SC_SCR_VI) && KEYS_WAITING(sp) ? 0 : UPDATE_SCREEN))) return (1); /* * 4: Paint any missing status lines. * * XXX * This is fairly evil. Status lines are written using the vi message * mechanism, since we have no idea how long they are. Since we may be * painting screens other than the current one, we don't want to make * the user wait. We depend heavily on there not being any other lines * currently waiting to be displayed and the message truncation code in * the msgq_status routine working. * * And, finally, if we updated any status lines, make sure the cursor * gets back to where it belongs. */ for (need_refresh = 0, tsp = sp->wp->scrq.cqh_first; tsp != (void *)&sp->wp->scrq; tsp = tsp->q.cqe_next) if (F_ISSET(tsp, SC_STATUS)) { need_refresh = 1; vs_resolve(tsp, sp, 0); } if (need_refresh) (void)gp->scr_refresh(sp, 0); /* * A side-effect of refreshing the screen is that it's now ready * for everything else, i.e. messages. */ F_SET(sp, SC_SCR_VI); return (0); } /* * vs_paint -- * This is the guts of the vi curses screen code. The idea is that * the SCR structure passed in contains the new coordinates of the * screen. What makes this hard is that we don't know how big * characters are, doing input can put the cursor in illegal places, * and we're frantically trying to avoid repainting unless it's * absolutely necessary. If you change this code, you'd better know * what you're doing. It's subtle and quick to anger. */ static int vs_paint(SCR *sp, u_int flags) { GS *gp; SMAP *smp, tmp; VI_PRIVATE *vip; db_recno_t lastline, lcnt; size_t cwtotal, cnt, len, notused, off, y; int ch, didpaint, isempty, leftright_warp; CHAR_T *p; #define LNO sp->lno /* Current file line. */ #define OLNO vip->olno /* Remembered file line. */ #define CNO sp->cno /* Current file column. */ #define OCNO vip->ocno /* Remembered file column. */ #define SCNO vip->sc_col /* Current screen column. */ gp = sp->gp; vip = VIP(sp); didpaint = leftright_warp = 0; /* * 5: Reformat the lines. * * If the lines themselves have changed (:set list, for example), * fill in the map from scratch. Adjust the screen that's being * displayed if the leftright flag is set. */ if (F_ISSET(sp, SC_SCR_REFORMAT)) { /* Invalidate the line size cache. */ VI_SCR_CFLUSH(vip); /* Toss vs_line() cached information. */ if (F_ISSET(sp, SC_SCR_TOP)) { if (vs_sm_fill(sp, LNO, P_TOP)) return (1); } else if (F_ISSET(sp, SC_SCR_CENTER)) { if (vs_sm_fill(sp, LNO, P_MIDDLE)) return (1); } else if (vs_sm_fill(sp, OOBLNO, P_TOP)) return (1); F_SET(sp, SC_SCR_REDRAW); } /* * 6: Line movement. * * Line changes can cause the top line to change as well. As * before, if the movement is large, the screen is repainted. * * 6a: Small screens. * * Users can use the window, w300, w1200 and w9600 options to make * the screen artificially small. The behavior of these options * in the historic vi wasn't all that consistent, and, in fact, it * was never documented how various screen movements affected the * screen size. Generally, one of three things would happen: * 1: The screen would expand in size, showing the line * 2: The screen would scroll, showing the line * 3: The screen would compress to its smallest size and * repaint. * In general, scrolling didn't cause compression (200^D was handled * the same as ^D), movement to a specific line would (:N where N * was 1 line below the screen caused a screen compress), and cursor * movement would scroll if it was 11 lines or less, and compress if * it was more than 11 lines. (And, no, I have no idea where the 11 * comes from.) * * What we do is try and figure out if the line is less than half of * a full screen away. If it is, we expand the screen if there's * room, and then scroll as necessary. The alternative is to compress * and repaint. * * !!! * This code is a special case from beginning to end. Unfortunately, * home modems are still slow enough that it's worth having. * * XXX * If the line a really long one, i.e. part of the line is on the * screen but the column offset is not, we'll end up in the adjust * code, when we should probably have compressed the screen. */ if (IS_SMALL(sp)) if (LNO < HMAP->lno) { lcnt = vs_sm_nlines(sp, HMAP, LNO, sp->t_maxrows); if (lcnt <= HALFSCREEN(sp)) for (; lcnt && sp->t_rows != sp->t_maxrows; --lcnt, ++sp->t_rows) { ++TMAP; if (vs_sm_1down(sp)) return (1); } else goto small_fill; } else if (LNO > TMAP->lno) { lcnt = vs_sm_nlines(sp, TMAP, LNO, sp->t_maxrows); if (lcnt <= HALFSCREEN(sp)) for (; lcnt && sp->t_rows != sp->t_maxrows; --lcnt, ++sp->t_rows) { if (vs_sm_next(sp, TMAP, TMAP + 1)) return (1); ++TMAP; if (vs_line(sp, TMAP, NULL, NULL)) return (1); } else { small_fill: (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_clrtoeol(sp); for (; sp->t_rows > sp->t_minrows; --sp->t_rows, --TMAP) { (void)gp->scr_move(sp, TMAP - HMAP, 0); (void)gp->scr_clrtoeol(sp); } if (vs_sm_fill(sp, LNO, P_FILL)) return (1); F_SET(sp, SC_SCR_REDRAW); goto adjust; } } /* * 6b: Line down, or current screen. */ if (LNO >= HMAP->lno) { /* Current screen. */ if (LNO <= TMAP->lno) goto adjust; if (F_ISSET(sp, SC_SCR_TOP)) goto top; if (F_ISSET(sp, SC_SCR_CENTER)) goto middle; /* * If less than half a screen above the line, scroll down * until the line is on the screen. */ lcnt = vs_sm_nlines(sp, TMAP, LNO, HALFTEXT(sp)); if (lcnt < HALFTEXT(sp)) { while (lcnt--) if (vs_sm_1up(sp)) return (1); goto adjust; } goto bottom; } /* * 6c: If not on the current screen, may request center or top. */ if (F_ISSET(sp, SC_SCR_TOP)) goto top; if (F_ISSET(sp, SC_SCR_CENTER)) goto middle; /* * 6d: Line up. */ lcnt = vs_sm_nlines(sp, HMAP, LNO, HALFTEXT(sp)); if (lcnt < HALFTEXT(sp)) { /* * If less than half a screen below the line, scroll up until * the line is the first line on the screen. Special check so * that if the screen has been emptied, we refill it. */ if (db_exist(sp, HMAP->lno)) { while (lcnt--) if (vs_sm_1down(sp)) return (1); goto adjust; } /* * If less than a half screen from the bottom of the file, * put the last line of the file on the bottom of the screen. */ bottom: if (db_last(sp, &lastline)) return (1); tmp.lno = LNO; tmp.coff = HMAP->coff; tmp.soff = 1; lcnt = vs_sm_nlines(sp, &tmp, lastline+1, sp->t_rows); if (lcnt < HALFTEXT(sp)) { if (vs_sm_fill(sp, lastline, P_BOTTOM)) return (1); F_SET(sp, SC_SCR_REDRAW); goto adjust; } /* It's not close, just put the line in the middle. */ goto middle; } /* * If less than half a screen from the top of the file, put the first * line of the file at the top of the screen. Otherwise, put the line * in the middle of the screen. */ tmp.lno = 1; tmp.coff = HMAP->coff; tmp.soff = 1; lcnt = vs_sm_nlines(sp, &tmp, LNO, HALFTEXT(sp)); if (lcnt < HALFTEXT(sp)) { if (vs_sm_fill(sp, 1, P_TOP)) return (1); } else middle: if (vs_sm_fill(sp, LNO, P_MIDDLE)) return (1); if (0) { top: if (vs_sm_fill(sp, LNO, P_TOP)) return (1); } F_SET(sp, SC_SCR_REDRAW); /* * At this point we know part of the line is on the screen. Since * scrolling is done using logical lines, not physical, all of the * line may not be on the screen. While that's not necessarily bad, * if the part the cursor is on isn't there, we're going to lose. * This can be tricky; if the line covers the entire screen, lno * may be the same as both ends of the map, that's why we test BOTH * the top and the bottom of the map. This isn't a problem for * left-right scrolling, the cursor movement code handles the problem. * * There's a performance issue here if editing *really* long lines. * This gets to the right spot by scrolling, and, in a binary, by * scrolling hundreds of lines. If the adjustment looks like it's * going to be a serious problem, refill the screen and repaint. */ adjust: if (!O_ISSET(sp, O_LEFTRIGHT) && (LNO == HMAP->lno || LNO == TMAP->lno)) { cnt = vs_screens(sp, LNO, &CNO); if (LNO == HMAP->lno && cnt < HMAP->soff) if ((HMAP->soff - cnt) > HALFTEXT(sp)) { HMAP->soff = cnt; vs_sm_fill(sp, OOBLNO, P_TOP); F_SET(sp, SC_SCR_REDRAW); } else while (cnt < HMAP->soff) if (vs_sm_1down(sp)) return (1); if (LNO == TMAP->lno && cnt > TMAP->soff) if ((cnt - TMAP->soff) > HALFTEXT(sp)) { TMAP->soff = cnt; vs_sm_fill(sp, OOBLNO, P_BOTTOM); F_SET(sp, SC_SCR_REDRAW); } else while (cnt > TMAP->soff) if (vs_sm_1up(sp)) return (1); } /* * If the screen needs to be repainted, skip cursor optimization. * However, in the code above we skipped leftright scrolling on * the grounds that the cursor code would handle it. Make sure * the right screen is up. */ if (F_ISSET(sp, SC_SCR_REDRAW)) { if (O_ISSET(sp, O_LEFTRIGHT)) goto slow; goto paint; } /* * 7: Cursor movements (current screen only). */ if (!LF_ISSET(UPDATE_CURSOR)) goto number; /* * Decide cursor position. If the line has changed, the cursor has * moved over a tab, or don't know where the cursor was, reparse the * line. Otherwise, we've just moved over fixed-width characters, * and can calculate the left/right scrolling and cursor movement * without reparsing the line. Note that we don't know which (if any) * of the characters between the old and new cursor positions changed. * * XXX * With some work, it should be possible to handle tabs quickly, at * least in obvious situations, like moving right and encountering * a tab, without reparsing the whole line. * * If the line we're working with has changed, reread it.. */ if (F_ISSET(vip, VIP_CUR_INVALID) || LNO != OLNO) goto slow; /* Otherwise, if nothing's changed, ignore the cursor. */ if (CNO == OCNO) goto fast; /* * Get the current line. If this fails, we either have an empty * file and can just repaint, or there's a real problem. This * isn't a performance issue because there aren't any ways to get * here repeatedly. */ if (db_eget(sp, LNO, &p, &len, &isempty)) { if (isempty) goto slow; return (1); } #ifdef DEBUG /* Sanity checking. */ if (CNO >= len && len != 0) { msgq(sp, M_ERR, "Error: %s/%d: cno (%u) >= len (%u)", tail(__FILE__), __LINE__, CNO, len); return (1); } #endif /* * The basic scheme here is to look at the characters in between * the old and new positions and decide how big they are on the * screen, and therefore, how many screen positions to move. */ if (CNO < OCNO) { /* * 7a: Cursor moved left. * * Point to the old character. The old cursor position can * be past EOL if, for example, we just deleted the rest of * the line. In this case, since we don't know the width of * the characters we traversed, we have to do it slowly. */ p += OCNO; cnt = (OCNO - CNO) + 1; if (OCNO >= len) goto slow; /* * Quick sanity check -- it's hard to figure out exactly when * we cross a screen boundary as we do in the cursor right * movement. If cnt is so large that we're going to cross the * boundary no matter what, stop now. */ if (SCNO + 1 + MAX_CHARACTER_COLUMNS < cnt) goto slow; /* * Count up the widths of the characters. If it's a tab * character, go do it the the slow way. */ for (cwtotal = 0; cnt--; cwtotal += KEY_COL(sp, ch)) if ((ch = *(UCHAR_T *)p--) == '\t') goto slow; /* * Decrement the screen cursor by the total width of the * characters minus 1. */ cwtotal -= 1; /* * If we're moving left, and there's a wide character in the * current position, go to the end of the character. */ if (KEY_COL(sp, ch) > 1) cwtotal -= KEY_COL(sp, ch) - 1; /* * If the new column moved us off of the current logical line, * calculate a new one. If doing leftright scrolling, we've * moved off of the current screen, as well. */ if (SCNO < cwtotal) goto slow; SCNO -= cwtotal; } else { /* * 7b: Cursor moved right. * * Point to the first character to the right. */ p += OCNO + 1; cnt = CNO - OCNO; /* * Count up the widths of the characters. If it's a tab * character, go do it the the slow way. If we cross a * screen boundary, we can quit. */ for (cwtotal = SCNO; cnt--;) { if ((ch = *(UCHAR_T *)p++) == '\t') goto slow; if ((cwtotal += KEY_COL(sp, ch)) >= SCREEN_COLS(sp)) break; } /* * Increment the screen cursor by the total width of the * characters. */ SCNO = cwtotal; /* See screen change comment in section 6a. */ if (SCNO >= SCREEN_COLS(sp)) goto slow; } /* * 7c: Fast cursor update. * * We have the current column, retrieve the current row. */ fast: (void)gp->scr_cursor(sp, &y, ¬used); goto done_cursor; /* * 7d: Slow cursor update. * * Walk through the map and find the current line. */ slow: for (smp = HMAP; smp->lno != LNO; ++smp); /* * 7e: Leftright scrolling adjustment. * * If doing left-right scrolling and the cursor movement has changed * the displayed screen, scroll the screen left or right, unless we're * updating the info line in which case we just scroll that one line. * We adjust the offset up or down until we have a window that covers * the current column, making sure that we adjust differently for the * first screen as compared to subsequent ones. */ if (O_ISSET(sp, O_LEFTRIGHT)) { /* * Get the screen column for this character, and correct * for the number option offset. */ cnt = vs_columns(sp, NULL, LNO, &CNO, NULL); if (O_ISSET(sp, O_NUMBER)) cnt -= O_NUMBER_LENGTH; /* Adjust the window towards the beginning of the line. */ off = smp->coff; if (off >= cnt) { do { if (off >= O_VAL(sp, O_SIDESCROLL)) off -= O_VAL(sp, O_SIDESCROLL); else { off = 0; break; } } while (off >= cnt); goto shifted; } /* Adjust the window towards the end of the line. */ if (off == 0 && off + SCREEN_COLS(sp) < cnt || off != 0 && off + sp->cols < cnt) { do { off += O_VAL(sp, O_SIDESCROLL); } while (off + sp->cols < cnt); shifted: /* Fill in screen map with the new offset. */ if (F_ISSET(sp, SC_TINPUT_INFO)) smp->coff = off; else { for (smp = HMAP; smp <= TMAP; ++smp) smp->coff = off; leftright_warp = 1; } goto paint; } /* * We may have jumped here to adjust a leftright screen because * redraw was set. If so, we have to paint the entire screen. */ if (F_ISSET(sp, SC_SCR_REDRAW)) goto paint; } /* * Update the screen lines for this particular file line until we * have a new screen cursor position. */ for (y = -1, vip->sc_smap = NULL; smp <= TMAP && smp->lno == LNO; ++smp) { if (vs_line(sp, smp, &y, &SCNO)) return (1); if (y != -1) { vip->sc_smap = smp; break; } } goto done_cursor; /* * 8: Repaint the entire screen. * * Lost big, do what you have to do. We flush the cache, since * SC_SCR_REDRAW gets set when the screen isn't worth fixing, and * it's simpler to repaint. So, don't trust anything that we * think we know about it. */ paint: for (smp = HMAP; smp <= TMAP; ++smp) SMAP_FLUSH(smp); for (y = -1, vip->sc_smap = NULL, smp = HMAP; smp <= TMAP; ++smp) { if (vs_line(sp, smp, &y, &SCNO)) return (1); if (y != -1 && vip->sc_smap == NULL) vip->sc_smap = smp; } /* * If it's a small screen and we're redrawing, clear the unused lines, * ex may have overwritten them. */ if (F_ISSET(sp, SC_SCR_REDRAW) && IS_SMALL(sp)) for (cnt = sp->t_rows; cnt <= sp->t_maxrows; ++cnt) { (void)gp->scr_move(sp, cnt, 0); (void)gp->scr_clrtoeol(sp); } didpaint = 1; done_cursor: /* * Sanity checking. When the repainting code messes up, the usual * result is we don't repaint the cursor and so sc_smap will be * NULL. If we're debugging, die, otherwise restart from scratch. */ #ifdef DEBUG if (vip->sc_smap == NULL) { fprintf(stderr, "smap error\n"); sleep(100); abort(); } #else if (vip->sc_smap == NULL) { F_SET(sp, SC_SCR_REFORMAT); return (vs_paint(sp, flags)); } #endif /* * 9: Set the remembered cursor values. */ OCNO = CNO; OLNO = LNO; /* * 10: Repaint the line numbers. * * If O_NUMBER is set and the VIP_N_RENUMBER bit is set, and we * didn't repaint the screen, repaint all of the line numbers, * they've changed. */ number: if (O_ISSET(sp, O_NUMBER) && F_ISSET(vip, VIP_N_RENUMBER) && !didpaint && vs_number(sp)) return (1); /* * 11: Update the mode line, position the cursor, and flush changes. * * If we warped the screen, we have to refresh everything. */ if (leftright_warp) LF_SET(UPDATE_CURSOR | UPDATE_SCREEN); if (LF_ISSET(UPDATE_SCREEN) && !IS_ONELINE(sp) && !F_ISSET(vip, VIP_S_MODELINE) && !F_ISSET(sp, SC_TINPUT_INFO)) vs_modeline(sp); if (LF_ISSET(UPDATE_CURSOR)) { (void)gp->scr_move(sp, y, SCNO); /* * XXX * If the screen shifted, we recalculate the "most favorite" * cursor position. Vi won't know that we've warped the * screen, so it's going to have a wrong idea about where the * cursor should be. This is vi's problem, and fixing it here * is a gross layering violation. */ if (leftright_warp) (void)vs_column(sp, &sp->rcm); } if (LF_ISSET(UPDATE_SCREEN)) (void)gp->scr_refresh(sp, F_ISSET(vip, VIP_N_EX_PAINT)); /* 12: Clear the flags that are handled by this routine. */ F_CLR(sp, SC_SCR_CENTER | SC_SCR_REDRAW | SC_SCR_REFORMAT | SC_SCR_TOP); F_CLR(vip, VIP_CUR_INVALID | VIP_N_EX_PAINT | VIP_N_REFRESH | VIP_N_RENUMBER | VIP_S_MODELINE); return (0); #undef LNO #undef OLNO #undef CNO #undef OCNO #undef SCNO } /* * vs_modeline -- * Update the mode line. */ static void vs_modeline(SCR *sp) { static char * const modes[] = { "215|Append", /* SM_APPEND */ "216|Change", /* SM_CHANGE */ "217|Command", /* SM_COMMAND */ "218|Insert", /* SM_INSERT */ "219|Replace", /* SM_REPLACE */ }; GS *gp; size_t cols, curcol, curlen, endpoint, len, midpoint; const char *t; int ellipsis; char *p, buf[20]; gp = sp->gp; /* * We put down the file name, the ruler, the mode and the dirty flag. * If there's not enough room, there's not enough room, we don't play * any special games. We try to put the ruler in the middle and the * mode and dirty flag at the end. * * !!! * Leave the last character blank, in case it's a really dumb terminal * with hardware scroll. Second, don't paint the last character in the * screen, SunOS 4.1.1 and Ultrix 4.2 curses won't let you. * * Move to the last line on the screen. */ (void)gp->scr_move(sp, LASTLINE(sp), 0); /* If more than one screen in the display, show the file name. */ curlen = 0; if (IS_SPLIT(sp)) { for (p = sp->frp->name; *p != '\0'; ++p); for (ellipsis = 0, cols = sp->cols / 2; --p > sp->frp->name;) { if (*p == '/') { ++p; break; } if ((curlen += KEY_LEN(sp, *p)) > cols) { ellipsis = 3; curlen += KEY_LEN(sp, '.') * 3 + KEY_LEN(sp, ' '); while (curlen > cols) { ++p; curlen -= KEY_LEN(sp, *p); } break; } } if (ellipsis) { while (ellipsis--) (void)gp->scr_addstr(sp, KEY_NAME(sp, '.'), KEY_LEN(sp, '.')); (void)gp->scr_addstr(sp, KEY_NAME(sp, ' '), KEY_LEN(sp, ' ')); } for (; *p != '\0'; ++p) (void)gp->scr_addstr(sp, KEY_NAME(sp, *p), KEY_LEN(sp, *p)); } /* Clear the rest of the line. */ (void)gp->scr_clrtoeol(sp); /* * Display the ruler. If we're not at the midpoint yet, move there. * Otherwise, add in two extra spaces. * * Adjust the current column for the fact that the editor uses it as * a zero-based number. * * XXX * Assume that numbers, commas, and spaces only take up a single * column on the screen. */ cols = sp->cols - 1; if (O_ISSET(sp, O_RULER)) { vs_column(sp, &curcol); len = snprintf(buf, sizeof(buf), "%lu,%lu", sp->lno, curcol + 1); midpoint = (cols - ((len + 1) / 2)) / 2; if (curlen < midpoint) { (void)gp->scr_move(sp, LASTLINE(sp), midpoint); curlen += len; } else if (curlen + 2 + len < cols) { (void)gp->scr_addstr(sp, " ", 2); curlen += 2 + len; } (void)gp->scr_addstr(sp, buf, len); } /* * Display the mode and the modified flag, as close to the end of the * line as possible, but guaranteeing at least two spaces between the * ruler and the modified flag. */ #define MODESIZE 9 endpoint = cols; if (O_ISSET(sp, O_SHOWMODE)) { if (F_ISSET(sp->ep, F_MODIFIED)) --endpoint; t = msg_cat(sp, modes[sp->showmode], &len); endpoint -= len; } if (endpoint > curlen + 2) { (void)gp->scr_move(sp, LASTLINE(sp), endpoint); if (O_ISSET(sp, O_SHOWMODE)) { if (F_ISSET(sp->ep, F_MODIFIED)) (void)gp->scr_addstr(sp, KEY_NAME(sp, '*'), KEY_LEN(sp, '*')); (void)gp->scr_addstr(sp, t, len); } } } nvi-1.81.6/vi/vs_relative.c0100644000076400001440000001621410720065506014563 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_relative.c,v 10.18 2001/07/08 13:02:48 skimo Exp $ (Berkeley) $Date: 2001/07/08 13:02:48 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" /* * vs_column -- * Return the logical column of the cursor in the line. * * PUBLIC: int vs_column __P((SCR *, size_t *)); */ int vs_column(SCR *sp, size_t *colp) { VI_PRIVATE *vip; vip = VIP(sp); *colp = (O_ISSET(sp, O_LEFTRIGHT) ? vip->sc_smap->coff : (vip->sc_smap->soff - 1) * sp->cols) + vip->sc_col - (O_ISSET(sp, O_NUMBER) ? O_NUMBER_LENGTH : 0); return (0); } /* * vs_screens -- * Return the screens necessary to display the line, or if specified, * the physical character column within the line, including space * required for the O_NUMBER and O_LIST options. * * PUBLIC: size_t vs_screens __P((SCR *, db_recno_t, size_t *)); */ size_t vs_screens(SCR *sp, db_recno_t lno, size_t *cnop) { size_t cols, screens; /* Left-right screens are simple, it's always 1. */ if (O_ISSET(sp, O_LEFTRIGHT)) return (1); /* * Check for a cached value. We maintain a cache because, if the * line is large, this routine gets called repeatedly. One other * hack, lots of time the cursor is on column one, which is an easy * one. */ if (cnop == NULL) { if (VIP(sp)->ss_lno == lno) return (VIP(sp)->ss_screens); } else if (*cnop == 0) return (1); /* Figure out how many columns the line/column needs. */ cols = vs_columns(sp, NULL, lno, cnop, NULL); screens = (cols / sp->cols + (cols % sp->cols ? 1 : 0)); if (screens == 0) screens = 1; /* Cache the value. */ if (cnop == NULL) { VIP(sp)->ss_lno = lno; VIP(sp)->ss_screens = screens; } return (screens); } /* * vs_columns -- * Return the screen columns necessary to display the line, or, * if specified, the physical character column within the line. * * PUBLIC: size_t vs_columns __P((SCR *, CHAR_T *, db_recno_t, size_t *, size_t *)); */ size_t vs_columns(SCR *sp, CHAR_T *lp, db_recno_t lno, size_t *cnop, size_t *diffp) { size_t chlen, cno, curoff, last, len, scno; int ch, leftright, listset; CHAR_T *p; /* * Initialize the screen offset. */ scno = 0; /* Leading number if O_NUMBER option set. */ if (O_ISSET(sp, O_NUMBER)) scno += O_NUMBER_LENGTH; /* Need the line to go any further. */ if (lp == NULL) { (void)db_get(sp, lno, 0, &lp, &len); if (len == 0) goto done; } /* Missing or empty lines are easy. */ if (lp == NULL) { done: if (diffp != NULL) /* XXX */ *diffp = 0; return scno; } /* Store away the values of the list and leftright edit options. */ listset = O_ISSET(sp, O_LIST); leftright = O_ISSET(sp, O_LEFTRIGHT); /* * Initialize the pointer into the buffer and current offset. */ p = lp; curoff = 0; /* Macro to return the display length of any signal character. */ #define CHLEN(val) (ch = *(UCHAR_T *)p++) == '\t' && \ !listset ? TAB_OFF(val) : KEY_COL(sp, ch); /* * If folding screens (the historic vi screen format), past the end * of the current screen, and the character was a tab, reset the * current screen column to 0, and the total screen columns to the * last column of the screen. Otherwise, display the rest of the * character in the next screen. */ #define TAB_RESET { \ curoff += chlen; \ if (!leftright && curoff >= sp->cols) \ if (ch == '\t') { \ curoff = 0; \ scno -= scno % sp->cols; \ } else \ curoff -= sp->cols; \ } if (cnop == NULL) while (len--) { chlen = CHLEN(curoff); last = scno; scno += chlen; TAB_RESET; } else for (cno = *cnop;; --cno) { chlen = CHLEN(curoff); last = scno; scno += chlen; TAB_RESET; if (cno == 0) break; } /* Add the trailing '$' if the O_LIST option set. */ if (listset && cnop == NULL) scno += KEY_LEN(sp, '$'); /* * The text input screen code needs to know how much additional * room the last two characters required, so that it can handle * tab character displays correctly. */ if (diffp != NULL) *diffp = scno - last; return (scno); } /* * vs_rcm -- * Return the physical column from the line that will display a * character closest to the currently most attractive character * position (which is stored as a screen column). * * PUBLIC: size_t vs_rcm __P((SCR *, db_recno_t, int)); */ size_t vs_rcm(SCR *sp, db_recno_t lno, int islast) { size_t len; /* Last character is easy, and common. */ if (islast) { if (db_get(sp, lno, 0, NULL, &len) || len == 0) return (0); return (len - 1); } /* First character is easy, and common. */ if (sp->rcm == 0) return (0); return (vs_colpos(sp, lno, sp->rcm)); } /* * vs_colpos -- * Return the physical column from the line that will display a * character closest to the specified screen column. * * PUBLIC: size_t vs_colpos __P((SCR *, db_recno_t, size_t)); */ size_t vs_colpos(SCR *sp, db_recno_t lno, size_t cno) { size_t chlen, curoff, len, llen, off, scno; int ch, leftright, listset; CHAR_T *lp, *p; /* Need the line to go any further. */ (void)db_get(sp, lno, 0, &lp, &llen); /* Missing or empty lines are easy. */ if (lp == NULL || llen == 0) return (0); /* Store away the values of the list and leftright edit options. */ listset = O_ISSET(sp, O_LIST); leftright = O_ISSET(sp, O_LEFTRIGHT); /* Discard screen (logical) lines. */ off = cno / sp->cols; cno %= sp->cols; for (scno = 0, p = lp, len = llen; off--;) { for (; len && scno < sp->cols; --len) scno += CHLEN(scno); /* * If reached the end of the physical line, return the last * physical character in the line. */ if (len == 0) return (llen - 1); /* * If folding screens (the historic vi screen format), past * the end of the current screen, and the character was a tab, * reset the current screen column to 0. Otherwise, the rest * of the character is displayed in the next screen. */ if (leftright && ch == '\t') scno = 0; else scno -= sp->cols; } /* Step through the line until reach the right character or EOL. */ for (curoff = scno; len--;) { chlen = CHLEN(curoff); /* * If we've reached the specific character, there are three * cases. * * 1: scno == cno, i.e. the current character ends at the * screen character we care about. * a: off < llen - 1, i.e. not the last character in * the line, return the offset of the next character. * b: else return the offset of the last character. * 2: scno != cno, i.e. this character overruns the character * we care about, return the offset of this character. */ if ((scno += chlen) >= cno) { off = p - lp; return (scno == cno ? (off < llen - 1 ? off : llen - 1) : off - 1); } TAB_RESET; } /* No such character; return the start of the last character. */ return (llen - 1); } nvi-1.81.6/vi/vs_smap.c0100644000076400001440000006750710720065506013723 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_smap.c,v 10.30 2002/01/19 21:59:07 skimo Exp $ (Berkeley) $Date: 2002/01/19 21:59:07 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" static int vs_deleteln __P((SCR *, int)); static int vs_insertln __P((SCR *, int)); static int vs_sm_delete __P((SCR *, db_recno_t)); static int vs_sm_down __P((SCR *, MARK *, db_recno_t, scroll_t, SMAP *)); static int vs_sm_erase __P((SCR *)); static int vs_sm_insert __P((SCR *, db_recno_t)); static int vs_sm_reset __P((SCR *, db_recno_t)); static int vs_sm_up __P((SCR *, MARK *, db_recno_t, scroll_t, SMAP *)); /* * vs_change -- * Make a change to the screen. * * PUBLIC: int vs_change __P((SCR *, db_recno_t, lnop_t)); */ int vs_change(SCR *sp, db_recno_t lno, lnop_t op) { VI_PRIVATE *vip; SMAP *p; size_t cnt, oldy, oldx; vip = VIP(sp); /* * XXX * Very nasty special case. The historic vi code displays a single * space (or a '$' if the list option is set) for the first line in * an "empty" file. If we "insert" a line, that line gets scrolled * down, not repainted, so it's incorrect when we refresh the screen. * The vi text input functions detect it explicitly and don't insert * a new line. * * Check for line #2 before going to the end of the file. */ if (((op == LINE_APPEND && lno == 0) || (op == LINE_INSERT && lno == 1)) && !db_exist(sp, 2)) { lno = 1; op = LINE_RESET; } /* Appending is the same as inserting, if the line is incremented. */ if (op == LINE_APPEND) { ++lno; op = LINE_INSERT; } /* Ignore the change if the line is after the map. */ if (lno > TMAP->lno) return (0); /* * If the line is before the map, and it's a decrement, decrement * the map. If it's an increment, increment the map. Otherwise, * ignore it. */ if (lno < HMAP->lno) { switch (op) { case LINE_APPEND: abort(); /* NOTREACHED */ case LINE_DELETE: for (p = HMAP, cnt = sp->t_rows; cnt--; ++p) --p->lno; if (sp->lno >= lno) --sp->lno; F_SET(vip, VIP_N_RENUMBER); break; case LINE_INSERT: for (p = HMAP, cnt = sp->t_rows; cnt--; ++p) ++p->lno; if (sp->lno >= lno) ++sp->lno; F_SET(vip, VIP_N_RENUMBER); break; case LINE_RESET: break; } return (0); } F_SET(vip, VIP_N_REFRESH); /* * Invalidate the line size cache, and invalidate the cursor if it's * on this line, */ VI_SCR_CFLUSH(vip); if (sp->lno == lno) F_SET(vip, VIP_CUR_INVALID); /* * If ex modifies the screen after ex output is already on the screen * or if we've switched into ex canonical mode, don't touch it -- we'll * get scrolling wrong, at best. */ if (!F_ISSET(sp, SC_TINPUT_INFO) && (F_ISSET(sp, SC_SCR_EXWROTE) || VIP(sp)->totalcount > 1)) { F_SET(vip, VIP_N_EX_REDRAW); return (0); } /* Save and restore the cursor for these routines. */ (void)sp->gp->scr_cursor(sp, &oldy, &oldx); switch (op) { case LINE_DELETE: if (vs_sm_delete(sp, lno)) return (1); if (sp->lno > lno) --sp->lno; F_SET(vip, VIP_N_RENUMBER); break; case LINE_INSERT: if (vs_sm_insert(sp, lno)) return (1); if (sp->lno > lno) ++sp->lno; F_SET(vip, VIP_N_RENUMBER); break; case LINE_RESET: if (vs_sm_reset(sp, lno)) return (1); break; default: abort(); } (void)sp->gp->scr_move(sp, oldy, oldx); return (0); } /* * vs_sm_fill -- * Fill in the screen map, placing the specified line at the * right position. There isn't any way to tell if an SMAP * entry has been filled in, so this routine had better be * called with P_FILL set before anything else is done. * * !!! * Unexported interface: if lno is OOBLNO, P_TOP means that the HMAP * slot is already filled in, P_BOTTOM means that the TMAP slot is * already filled in, and we just finish up the job. * * PUBLIC: int vs_sm_fill __P((SCR *, db_recno_t, pos_t)); */ int vs_sm_fill(SCR *sp, db_recno_t lno, pos_t pos) { SMAP *p, tmp; size_t cnt; /* Flush all cached information from the SMAP. */ for (p = HMAP, cnt = sp->t_rows; cnt--; ++p) SMAP_FLUSH(p); /* * If the map is filled, the screen must be redrawn. * * XXX * This is a bug. We should try and figure out if the desired line * is already in the map or close by -- scrolling the screen would * be a lot better than redrawing. */ F_SET(sp, SC_SCR_REDRAW); switch (pos) { case P_FILL: tmp.lno = 1; tmp.coff = 0; tmp.soff = 1; /* See if less than half a screen from the top. */ if (vs_sm_nlines(sp, &tmp, lno, HALFTEXT(sp)) <= HALFTEXT(sp)) { lno = 1; goto top; } /* See if less than half a screen from the bottom. */ if (db_last(sp, &tmp.lno)) return (1); tmp.coff = 0; tmp.soff = vs_screens(sp, tmp.lno, NULL); if (vs_sm_nlines(sp, &tmp, lno, HALFTEXT(sp)) <= HALFTEXT(sp)) { TMAP->lno = tmp.lno; TMAP->coff = tmp.coff; TMAP->soff = tmp.soff; goto bottom; } goto middle; case P_TOP: if (lno != OOBLNO) { top: HMAP->lno = lno; HMAP->coff = 0; HMAP->soff = 1; } /* If we fail, just punt. */ for (p = HMAP, cnt = sp->t_rows; --cnt; ++p) if (vs_sm_next(sp, p, p + 1)) goto err; break; case P_MIDDLE: /* If we fail, guess that the file is too small. */ middle: p = HMAP + sp->t_rows / 2; p->lno = lno; p->coff = 0; p->soff = 1; for (; p > HMAP; --p) if (vs_sm_prev(sp, p, p - 1)) { lno = 1; goto top; } /* If we fail, just punt. */ p = HMAP + sp->t_rows / 2; for (; p < TMAP; ++p) if (vs_sm_next(sp, p, p + 1)) goto err; break; case P_BOTTOM: if (lno != OOBLNO) { TMAP->lno = lno; TMAP->coff = 0; TMAP->soff = vs_screens(sp, lno, NULL); } /* If we fail, guess that the file is too small. */ bottom: for (p = TMAP; p > HMAP; --p) if (vs_sm_prev(sp, p, p - 1)) { lno = 1; goto top; } break; default: abort(); } return (0); /* * Try and put *something* on the screen. If this fails, we have a * serious hard error. */ err: HMAP->lno = 1; HMAP->coff = 0; HMAP->soff = 1; for (p = HMAP; p < TMAP; ++p) if (vs_sm_next(sp, p, p + 1)) return (1); return (0); } /* * For the routines vs_sm_reset, vs_sm_delete and vs_sm_insert: if the * screen contains only a single line (whether because the screen is small * or the line large), it gets fairly exciting. Skip the fun, set a flag * so the screen map is refilled and the screen redrawn, and return. This * is amazingly slow, but it's not clear that anyone will care. */ #define HANDLE_WEIRDNESS(cnt) { \ if (cnt >= sp->t_rows) { \ F_SET(sp, SC_SCR_REFORMAT); \ return (0); \ } \ } /* * vs_sm_delete -- * Delete a line out of the SMAP. */ static int vs_sm_delete(SCR *sp, db_recno_t lno) { SMAP *p, *t; size_t cnt_orig; /* * Find the line in the map, and count the number of screen lines * which display any part of the deleted line. */ for (p = HMAP; p->lno != lno; ++p); if (O_ISSET(sp, O_LEFTRIGHT)) cnt_orig = 1; else for (cnt_orig = 1, t = p + 1; t <= TMAP && t->lno == lno; ++cnt_orig, ++t); HANDLE_WEIRDNESS(cnt_orig); /* Delete that many lines from the screen. */ (void)sp->gp->scr_move(sp, p - HMAP, 0); if (vs_deleteln(sp, cnt_orig)) return (1); /* Shift the screen map up. */ memmove(p, p + cnt_orig, (((TMAP - p) - cnt_orig) + 1) * sizeof(SMAP)); /* Decrement the line numbers for the rest of the map. */ for (t = TMAP - cnt_orig; p <= t; ++p) --p->lno; /* Display the new lines. */ for (p = TMAP - cnt_orig;;) { if (p < TMAP && vs_sm_next(sp, p, p + 1)) return (1); /* vs_sm_next() flushed the cache. */ if (vs_line(sp, ++p, NULL, NULL)) return (1); if (p == TMAP) break; } return (0); } /* * vs_sm_insert -- * Insert a line into the SMAP. */ static int vs_sm_insert(SCR *sp, db_recno_t lno) { SMAP *p, *t; size_t cnt_orig, cnt, coff; /* Save the offset. */ coff = HMAP->coff; /* * Find the line in the map, find out how many screen lines * needed to display the line. */ for (p = HMAP; p->lno != lno; ++p); cnt_orig = vs_screens(sp, lno, NULL); HANDLE_WEIRDNESS(cnt_orig); /* * The lines left in the screen override the number of screen * lines in the inserted line. */ cnt = (TMAP - p) + 1; if (cnt_orig > cnt) cnt_orig = cnt; /* Push down that many lines. */ (void)sp->gp->scr_move(sp, p - HMAP, 0); if (vs_insertln(sp, cnt_orig)) return (1); /* Shift the screen map down. */ memmove(p + cnt_orig, p, (((TMAP - p) - cnt_orig) + 1) * sizeof(SMAP)); /* Increment the line numbers for the rest of the map. */ for (t = p + cnt_orig; t <= TMAP; ++t) ++t->lno; /* Fill in the SMAP for the new lines, and display. */ for (cnt = 1, t = p; cnt <= cnt_orig; ++t, ++cnt) { t->lno = lno; t->coff = coff; t->soff = cnt; SMAP_FLUSH(t); if (vs_line(sp, t, NULL, NULL)) return (1); } return (0); } /* * vs_sm_reset -- * Reset a line in the SMAP. */ static int vs_sm_reset(SCR *sp, db_recno_t lno) { SMAP *p, *t; size_t cnt_orig, cnt_new, cnt, diff; /* * See if the number of on-screen rows taken up by the old display * for the line is the same as the number needed for the new one. * If so, repaint, otherwise do it the hard way. */ for (p = HMAP; p->lno != lno; ++p); if (O_ISSET(sp, O_LEFTRIGHT)) { t = p; cnt_orig = cnt_new = 1; } else { for (cnt_orig = 0, t = p; t <= TMAP && t->lno == lno; ++cnt_orig, ++t); cnt_new = vs_screens(sp, lno, NULL); } HANDLE_WEIRDNESS(cnt_orig); if (cnt_orig == cnt_new) { do { SMAP_FLUSH(p); if (vs_line(sp, p, NULL, NULL)) return (1); } while (++p < t); return (0); } if (cnt_orig < cnt_new) { /* Get the difference. */ diff = cnt_new - cnt_orig; /* * The lines left in the screen override the number of screen * lines in the inserted line. */ cnt = (TMAP - p) + 1; if (diff > cnt) diff = cnt; /* If there are any following lines, push them down. */ if (cnt > 1) { (void)sp->gp->scr_move(sp, p - HMAP, 0); if (vs_insertln(sp, diff)) return (1); /* Shift the screen map down. */ memmove(p + diff, p, (((TMAP - p) - diff) + 1) * sizeof(SMAP)); } /* Fill in the SMAP for the replaced line, and display. */ for (cnt = 1, t = p; cnt_new-- && t <= TMAP; ++t, ++cnt) { t->lno = lno; t->soff = cnt; SMAP_FLUSH(t); if (vs_line(sp, t, NULL, NULL)) return (1); } } else { /* Get the difference. */ diff = cnt_orig - cnt_new; /* Delete that many lines from the screen. */ (void)sp->gp->scr_move(sp, p - HMAP, 0); if (vs_deleteln(sp, diff)) return (1); /* Shift the screen map up. */ memmove(p, p + diff, (((TMAP - p) - diff) + 1) * sizeof(SMAP)); /* Fill in the SMAP for the replaced line, and display. */ for (cnt = 1, t = p; cnt_new--; ++t, ++cnt) { t->lno = lno; t->soff = cnt; SMAP_FLUSH(t); if (vs_line(sp, t, NULL, NULL)) return (1); } /* Display the new lines at the bottom of the screen. */ for (t = TMAP - diff;;) { if (t < TMAP && vs_sm_next(sp, t, t + 1)) return (1); /* vs_sm_next() flushed the cache. */ if (vs_line(sp, ++t, NULL, NULL)) return (1); if (t == TMAP) break; } } return (0); } /* * vs_sm_scroll * Scroll the SMAP up/down count logical lines. Different * semantics based on the vi command, *sigh*. * * PUBLIC: int vs_sm_scroll __P((SCR *, MARK *, db_recno_t, scroll_t)); */ int vs_sm_scroll(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd) { SMAP *smp; /* * Invalidate the cursor. The line is probably going to change, * (although for ^E and ^Y it may not). In any case, the scroll * routines move the cursor to draw things. */ F_SET(VIP(sp), VIP_CUR_INVALID); /* Find the cursor in the screen. */ if (vs_sm_cursor(sp, &smp)) return (1); switch (scmd) { case CNTRL_B: case CNTRL_U: case CNTRL_Y: case Z_CARAT: if (vs_sm_down(sp, rp, count, scmd, smp)) return (1); break; case CNTRL_D: case CNTRL_E: case CNTRL_F: case Z_PLUS: if (vs_sm_up(sp, rp, count, scmd, smp)) return (1); break; default: abort(); } /* * !!! * If we're at the start of a line, go for the first non-blank. * This makes it look like the old vi, even though we're moving * around by logical lines, not physical ones. * * XXX * In the presence of a long line, which has more than a screen * width of leading spaces, this code can cause a cursor warp. * Live with it. */ if (scmd != CNTRL_E && scmd != CNTRL_Y && rp->cno == 0 && nonblank(sp, rp->lno, &rp->cno)) return (1); return (0); } /* * vs_sm_up -- * Scroll the SMAP up count logical lines. */ static int vs_sm_up(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd, SMAP *smp) { int cursor_set, echanged, zset; SMAP *ssmp, s1, s2; /* * Check to see if movement is possible. * * Get the line after the map. If that line is a new one (and if * O_LEFTRIGHT option is set, this has to be true), and the next * line doesn't exist, and the cursor doesn't move, or the cursor * isn't even on the screen, or the cursor is already at the last * line in the map, it's an error. If that test succeeded because * the cursor wasn't at the end of the map, test to see if the map * is mostly empty. */ if (vs_sm_next(sp, TMAP, &s1)) return (1); if (s1.lno > TMAP->lno && !db_exist(sp, s1.lno)) { if (scmd == CNTRL_E || scmd == Z_PLUS || smp == TMAP) { v_eof(sp, NULL); return (1); } if (vs_sm_next(sp, smp, &s1)) return (1); if (s1.lno > smp->lno && !db_exist(sp, s1.lno)) { v_eof(sp, NULL); return (1); } } /* * Small screens: see vs_refresh.c section 6a. * * If it's a small screen, and the movement isn't larger than a * screen, i.e some context will remain, open up the screen and * display by scrolling. In this case, the cursor moves down one * line for each line displayed. Otherwise, erase/compress and * repaint, and move the cursor to the first line in the screen. * Note, the ^F command is always in the latter case, for historical * reasons. */ cursor_set = 0; if (IS_SMALL(sp)) { if (count >= sp->t_maxrows || scmd == CNTRL_F) { s1 = TMAP[0]; if (vs_sm_erase(sp)) return (1); for (; count--; s1 = s2) { if (vs_sm_next(sp, &s1, &s2)) return (1); if (s2.lno != s1.lno && !db_exist(sp, s2.lno)) break; } TMAP[0] = s2; if (vs_sm_fill(sp, OOBLNO, P_BOTTOM)) return (1); return (vs_sm_position(sp, rp, 0, P_TOP)); } cursor_set = scmd == CNTRL_E || vs_sm_cursor(sp, &ssmp); for (; count && sp->t_rows != sp->t_maxrows; --count, ++sp->t_rows) { if (vs_sm_next(sp, TMAP, &s1)) return (1); if (TMAP->lno != s1.lno && !db_exist(sp, s1.lno)) break; *++TMAP = s1; /* vs_sm_next() flushed the cache. */ if (vs_line(sp, TMAP, NULL, NULL)) return (1); if (!cursor_set) ++ssmp; } if (!cursor_set) { rp->lno = ssmp->lno; rp->cno = ssmp->c_sboff; } if (count == 0) return (0); } for (echanged = zset = 0; count; --count) { /* Decide what would show up on the screen. */ if (vs_sm_next(sp, TMAP, &s1)) return (1); /* If the line doesn't exist, we're done. */ if (TMAP->lno != s1.lno && !db_exist(sp, s1.lno)) break; /* Scroll the screen cursor up one logical line. */ if (vs_sm_1up(sp)) return (1); switch (scmd) { case CNTRL_E: if (smp > HMAP) --smp; else echanged = 1; break; case Z_PLUS: if (zset) { if (smp > HMAP) --smp; } else { smp = TMAP; zset = 1; } /* FALLTHROUGH */ default: break; } } if (cursor_set) return(0); switch (scmd) { case CNTRL_E: /* * On a ^E that was forced to change lines, try and keep the * cursor as close as possible to the last position, but also * set it up so that the next "real" movement will return the * cursor to the closest position to the last real movement. */ if (echanged) { rp->lno = smp->lno; rp->cno = vs_colpos(sp, smp->lno, (O_ISSET(sp, O_LEFTRIGHT) ? smp->coff : (smp->soff - 1) * sp->cols) + sp->rcm % sp->cols); } return (0); case CNTRL_F: /* * If there are more lines, the ^F command is positioned at * the first line of the screen. */ if (!count) { smp = HMAP; break; } /* FALLTHROUGH */ case CNTRL_D: /* * The ^D and ^F commands move the cursor towards EOF * if there are more lines to move. Check to be sure * the lines actually exist. (They may not if the * file is smaller than the screen.) */ for (; count; --count, ++smp) if (smp == TMAP || !db_exist(sp, smp[1].lno)) break; break; case Z_PLUS: /* The z+ command moves the cursor to the first new line. */ break; default: abort(); } if (!SMAP_CACHE(smp) && vs_line(sp, smp, NULL, NULL)) return (1); rp->lno = smp->lno; rp->cno = smp->c_scoff == 255 ? 0 : smp->c_sboff; return (0); } /* * vs_sm_1up -- * Scroll the SMAP up one. * * PUBLIC: int vs_sm_1up __P((SCR *)); */ int vs_sm_1up(SCR *sp) { /* * Delete the top line of the screen. Shift the screen map * up and display a new line at the bottom of the screen. */ (void)sp->gp->scr_move(sp, 0, 0); if (vs_deleteln(sp, 1)) return (1); /* One-line screens can fail. */ if (IS_ONELINE(sp)) { if (vs_sm_next(sp, TMAP, TMAP)) return (1); } else { memmove(HMAP, HMAP + 1, (sp->rows - 1) * sizeof(SMAP)); if (vs_sm_next(sp, TMAP - 1, TMAP)) return (1); } /* vs_sm_next() flushed the cache. */ return (vs_line(sp, TMAP, NULL, NULL)); } /* * vs_deleteln -- * Delete a line a la curses, make sure to put the information * line and other screens back. */ static int vs_deleteln(SCR *sp, int cnt) { GS *gp; size_t oldy, oldx; gp = sp->gp; /* If the screen is vertically split, we can't scroll it. */ if (IS_VSPLIT(sp)) { F_SET(sp, SC_SCR_REDRAW); return (0); } if (IS_ONELINE(sp)) (void)gp->scr_clrtoeol(sp); else { (void)gp->scr_cursor(sp, &oldy, &oldx); while (cnt--) { (void)gp->scr_deleteln(sp); (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_insertln(sp); (void)gp->scr_move(sp, oldy, oldx); } } return (0); } /* * vs_sm_down -- * Scroll the SMAP down count logical lines. */ static int vs_sm_down(SCR *sp, MARK *rp, db_recno_t count, scroll_t scmd, SMAP *smp) { SMAP *ssmp, s1, s2; int cursor_set, ychanged, zset; /* Check to see if movement is possible. */ if (HMAP->lno == 1 && (O_ISSET(sp, O_LEFTRIGHT) || HMAP->soff == 1) && (scmd == CNTRL_Y || scmd == Z_CARAT || smp == HMAP)) { v_sof(sp, NULL); return (1); } /* * Small screens: see vs_refresh.c section 6a. * * If it's a small screen, and the movement isn't larger than a * screen, i.e some context will remain, open up the screen and * display by scrolling. In this case, the cursor moves up one * line for each line displayed. Otherwise, erase/compress and * repaint, and move the cursor to the first line in the screen. * Note, the ^B command is always in the latter case, for historical * reasons. */ cursor_set = scmd == CNTRL_Y; if (IS_SMALL(sp)) { if (count >= sp->t_maxrows || scmd == CNTRL_B) { s1 = HMAP[0]; if (vs_sm_erase(sp)) return (1); for (; count--; s1 = s2) { if (vs_sm_prev(sp, &s1, &s2)) return (1); if (s2.lno == 1 && (O_ISSET(sp, O_LEFTRIGHT) || s2.soff == 1)) break; } HMAP[0] = s2; if (vs_sm_fill(sp, OOBLNO, P_TOP)) return (1); return (vs_sm_position(sp, rp, 0, P_BOTTOM)); } cursor_set = scmd == CNTRL_Y || vs_sm_cursor(sp, &ssmp); for (; count && sp->t_rows != sp->t_maxrows; --count, ++sp->t_rows) { if (HMAP->lno == 1 && (O_ISSET(sp, O_LEFTRIGHT) || HMAP->soff == 1)) break; ++TMAP; if (vs_sm_1down(sp)) return (1); } if (!cursor_set) { rp->lno = ssmp->lno; rp->cno = ssmp->c_sboff; } if (count == 0) return (0); } for (ychanged = zset = 0; count; --count) { /* If the line doesn't exist, we're done. */ if (HMAP->lno == 1 && (O_ISSET(sp, O_LEFTRIGHT) || HMAP->soff == 1)) break; /* Scroll the screen and cursor down one logical line. */ if (vs_sm_1down(sp)) return (1); switch (scmd) { case CNTRL_Y: if (smp < TMAP) ++smp; else ychanged = 1; break; case Z_CARAT: if (zset) { if (smp < TMAP) ++smp; } else { smp = HMAP; zset = 1; } /* FALLTHROUGH */ default: break; } } if (scmd != CNTRL_Y && cursor_set) return(0); switch (scmd) { case CNTRL_B: /* * If there are more lines, the ^B command is positioned at * the last line of the screen. However, the line may not * exist. */ if (!count) { for (smp = TMAP; smp > HMAP; --smp) if (db_exist(sp, smp->lno)) break; break; } /* FALLTHROUGH */ case CNTRL_U: /* * The ^B and ^U commands move the cursor towards SOF * if there are more lines to move. */ if (count < smp - HMAP) smp -= count; else smp = HMAP; break; case CNTRL_Y: /* * On a ^Y that was forced to change lines, try and keep the * cursor as close as possible to the last position, but also * set it up so that the next "real" movement will return the * cursor to the closest position to the last real movement. */ if (ychanged) { rp->lno = smp->lno; rp->cno = vs_colpos(sp, smp->lno, (O_ISSET(sp, O_LEFTRIGHT) ? smp->coff : (smp->soff - 1) * sp->cols) + sp->rcm % sp->cols); } return (0); case Z_CARAT: /* The z^ command moves the cursor to the first new line. */ break; default: abort(); } if (!SMAP_CACHE(smp) && vs_line(sp, smp, NULL, NULL)) return (1); rp->lno = smp->lno; rp->cno = smp->c_scoff == 255 ? 0 : smp->c_sboff; return (0); } /* * vs_sm_erase -- * Erase the small screen area for the scrolling functions. */ static int vs_sm_erase(SCR *sp) { GS *gp; gp = sp->gp; (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_clrtoeol(sp); for (; sp->t_rows > sp->t_minrows; --sp->t_rows, --TMAP) { (void)gp->scr_move(sp, TMAP - HMAP, 0); (void)gp->scr_clrtoeol(sp); } return (0); } /* * vs_sm_1down -- * Scroll the SMAP down one. * * PUBLIC: int vs_sm_1down __P((SCR *)); */ int vs_sm_1down(SCR *sp) { /* * Insert a line at the top of the screen. Shift the screen map * down and display a new line at the top of the screen. */ (void)sp->gp->scr_move(sp, 0, 0); if (vs_insertln(sp, 1)) return (1); /* One-line screens can fail. */ if (IS_ONELINE(sp)) { if (vs_sm_prev(sp, HMAP, HMAP)) return (1); } else { memmove(HMAP + 1, HMAP, (sp->rows - 1) * sizeof(SMAP)); if (vs_sm_prev(sp, HMAP + 1, HMAP)) return (1); } /* vs_sm_prev() flushed the cache. */ return (vs_line(sp, HMAP, NULL, NULL)); } /* * vs_insertln -- * Insert a line a la curses, make sure to put the information * line and other screens back. */ static int vs_insertln(SCR *sp, int cnt) { GS *gp; size_t oldy, oldx; gp = sp->gp; /* If the screen is vertically split, we can't scroll it. */ if (IS_VSPLIT(sp)) { F_SET(sp, SC_SCR_REDRAW); return (0); } if (IS_ONELINE(sp)) { (void)gp->scr_move(sp, LASTLINE(sp), 0); (void)gp->scr_clrtoeol(sp); } else { (void)gp->scr_cursor(sp, &oldy, &oldx); while (cnt--) { (void)gp->scr_move(sp, LASTLINE(sp) - 1, 0); (void)gp->scr_deleteln(sp); (void)gp->scr_move(sp, oldy, oldx); (void)gp->scr_insertln(sp); } } return (0); } /* * vs_sm_next -- * Fill in the next entry in the SMAP. * * PUBLIC: int vs_sm_next __P((SCR *, SMAP *, SMAP *)); */ int vs_sm_next(SCR *sp, SMAP *p, SMAP *t) { size_t lcnt; SMAP_FLUSH(t); if (O_ISSET(sp, O_LEFTRIGHT)) { t->lno = p->lno + 1; t->coff = p->coff; } else { lcnt = vs_screens(sp, p->lno, NULL); if (lcnt == p->soff) { t->lno = p->lno + 1; t->soff = 1; } else { t->lno = p->lno; t->soff = p->soff + 1; } } return (0); } /* * vs_sm_prev -- * Fill in the previous entry in the SMAP. * * PUBLIC: int vs_sm_prev __P((SCR *, SMAP *, SMAP *)); */ int vs_sm_prev(SCR *sp, SMAP *p, SMAP *t) { SMAP_FLUSH(t); if (O_ISSET(sp, O_LEFTRIGHT)) { t->lno = p->lno - 1; t->coff = p->coff; } else { if (p->soff != 1) { t->lno = p->lno; t->soff = p->soff - 1; } else { t->lno = p->lno - 1; t->soff = vs_screens(sp, t->lno, NULL); } } return (t->lno == 0); } /* * vs_sm_cursor -- * Return the SMAP entry referenced by the cursor. * * PUBLIC: int vs_sm_cursor __P((SCR *, SMAP **)); */ int vs_sm_cursor(SCR *sp, SMAP **smpp) { SMAP *p; /* See if the cursor is not in the map. */ if (sp->lno < HMAP->lno || sp->lno > TMAP->lno) return (1); /* Find the first occurence of the line. */ for (p = HMAP; p->lno != sp->lno; ++p); /* Fill in the map information until we find the right line. */ for (; p <= TMAP; ++p) { /* Short lines are common and easy to detect. */ if (p != TMAP && (p + 1)->lno != p->lno) { *smpp = p; return (0); } if (!SMAP_CACHE(p) && vs_line(sp, p, NULL, NULL)) return (1); if (p->c_eboff >= sp->cno) { *smpp = p; return (0); } } /* It was past the end of the map after all. */ return (1); } /* * vs_sm_position -- * Return the line/column of the top, middle or last line on the screen. * (The vi H, M and L commands.) Here because only the screen routines * know what's really out there. * * PUBLIC: int vs_sm_position __P((SCR *, MARK *, u_long, pos_t)); */ int vs_sm_position(SCR *sp, MARK *rp, u_long cnt, pos_t pos) { SMAP *smp; db_recno_t last; switch (pos) { case P_TOP: /* * !!! * Historically, an invalid count to the H command failed. * We do nothing special here, just making sure that H in * an empty screen works. */ if (cnt > TMAP - HMAP) goto sof; smp = HMAP + cnt; if (cnt && !db_exist(sp, smp->lno)) { sof: msgq(sp, M_BERR, "220|Movement past the end-of-screen"); return (1); } break; case P_MIDDLE: /* * !!! * Historically, a count to the M command was ignored. * If the screen isn't filled, find the middle of what's * real and move there. */ if (!db_exist(sp, TMAP->lno)) { if (db_last(sp, &last)) return (1); for (smp = TMAP; smp->lno > last && smp > HMAP; --smp); if (smp > HMAP) smp -= (smp - HMAP) / 2; } else smp = (HMAP + (TMAP - HMAP) / 2) + cnt; break; case P_BOTTOM: /* * !!! * Historically, an invalid count to the L command failed. * If the screen isn't filled, find the bottom of what's * real and try to offset from there. */ if (cnt > TMAP - HMAP) goto eof; smp = TMAP - cnt; if (!db_exist(sp, smp->lno)) { if (db_last(sp, &last)) return (1); for (; smp->lno > last && smp > HMAP; --smp); if (cnt > smp - HMAP) { eof: msgq(sp, M_BERR, "221|Movement past the beginning-of-screen"); return (1); } smp -= cnt; } break; default: abort(); } /* Make sure that the cached information is valid. */ if (!SMAP_CACHE(smp) && vs_line(sp, smp, NULL, NULL)) return (1); rp->lno = smp->lno; rp->cno = smp->c_sboff; return (0); } /* * vs_sm_nlines -- * Return the number of screen lines from an SMAP entry to the * start of some file line, less than a maximum value. * * PUBLIC: db_recno_t vs_sm_nlines __P((SCR *, SMAP *, db_recno_t, size_t)); */ db_recno_t vs_sm_nlines(SCR *sp, SMAP *from_sp, db_recno_t to_lno, size_t max) { db_recno_t lno, lcnt; if (O_ISSET(sp, O_LEFTRIGHT)) return (from_sp->lno > to_lno ? from_sp->lno - to_lno : to_lno - from_sp->lno); if (from_sp->lno == to_lno) return (from_sp->soff - 1); if (from_sp->lno > to_lno) { lcnt = from_sp->soff - 1; /* Correct for off-by-one. */ for (lno = from_sp->lno; --lno >= to_lno && lcnt <= max;) lcnt += vs_screens(sp, lno, NULL); } else { lno = from_sp->lno; lcnt = (vs_screens(sp, lno, NULL) - from_sp->soff) + 1; for (; ++lno < to_lno && lcnt <= max;) lcnt += vs_screens(sp, lno, NULL); } return (lcnt); } nvi-1.81.6/vi/vs_split.c0100644000076400001440000005537110720065506014112 0ustar skimousers/*- * Copyright (c) 1993, 1994 * The Regents of the University of California. All rights reserved. * Copyright (c) 1993, 1994, 1995, 1996 * Keith Bostic. All rights reserved. * * See the LICENSE file for redistribution information. */ #include "config.h" #ifndef lint static const char sccsid[] = "$Id: vs_split.c,v 10.42 2001/06/25 15:19:38 skimo Exp $ (Berkeley) $Date: 2001/06/25 15:19:38 $"; #endif /* not lint */ #include #include #include #include #include #include #include #include #include #include "../common/common.h" #include "vi.h" typedef enum { HORIZ_FOLLOW, HORIZ_PRECEDE, VERT_FOLLOW, VERT_PRECEDE } jdir_t; static SCR *vs_getbg __P((SCR *, char *)); static void vs_insert __P((SCR *sp, WIN *wp)); static int vs_join __P((SCR *, SCR **, jdir_t *)); /* * vs_split -- * Create a new screen, horizontally. * * PUBLIC: int vs_split __P((SCR *, SCR *, int)); */ int vs_split(SCR *sp, SCR *new, int ccl) /* Colon-command line split. */ { GS *gp; SMAP *smp; size_t half; int issmallscreen, splitup; gp = sp->gp; /* Check to see if it's possible. */ /* XXX: The IS_ONELINE fix will change this, too. */ if (sp->rows < 4) { msgq(sp, M_ERR, "222|Screen must be larger than %d lines to split", 4 - 1); return (1); } /* Wait for any messages in the screen. */ vs_resolve(sp, NULL, 1); /* Get a new screen map. */ CALLOC(sp, _HMAP(new), SMAP *, SIZE_HMAP(sp), sizeof(SMAP)); if (_HMAP(new) == NULL) return (1); _HMAP(new)->lno = sp->lno; _HMAP(new)->coff = 0; _HMAP(new)->soff = 1; /* Split the screen in half. */ half = sp->rows / 2; if (ccl && half > 6) half = 6; /* * Small screens: see vs_refresh.c section 6a. Set a flag so * we know to fix the screen up later. */ issmallscreen = IS_SMALL(sp); /* The columns in the screen don't change. */ new->coff = sp->coff; new->cols = sp->cols; /* * Split the screen, and link the screens together. If creating a * screen to edit the colon command line or the cursor is in the top * half of the current screen, the new screen goes under the current * screen. Else, it goes above the current screen. * * Recalculate current cursor position based on sp->lno, we're called * with the cursor on the colon command line. Then split the screen * in half and update the shared information. */ splitup = !ccl && (vs_sm_cursor(sp, &smp) ? 0 : (smp - HMAP) + 1) >= half; if (splitup) { /* Old is bottom half. */ new->rows = sp->rows - half; /* New. */ new->roff = sp->roff; sp->rows = half; /* Old. */ sp->roff += new->rows; /* * If the parent is the bottom half of the screen, shift * the map down to match on-screen text. */ memcpy(_HMAP(sp), _HMAP(sp) + new->rows, (sp->t_maxrows - new->rows) * sizeof(SMAP)); } else { /* Old is top half. */ new->rows = half; /* New. */ sp->rows -= half; /* Old. */ new->roff = sp->roff + sp->rows; } /* Adjust maximum text count. */ sp->t_maxrows = IS_ONELINE(sp) ? 1 : sp->rows - 1; new->t_maxrows = IS_ONELINE(new) ? 1 : new->rows - 1; /* * Small screens: see vs_refresh.c, section 6a. * * The child may have different screen options sizes than the parent, * so use them. Guarantee that text counts aren't larger than the * new screen sizes. */ if (issmallscreen) { /* Fix the text line count for the parent. */ if (splitup) sp->t_rows -= new->rows; /* Fix the parent screen. */ if (sp->t_rows > sp->t_maxrows) sp->t_rows = sp->t_maxrows; if (sp->t_minrows > sp->t_maxrows) sp->t_minrows = sp->t_maxrows; /* Fix the child screen. */ new->t_minrows = new->t_rows = O_VAL(sp, O_WINDOW); if (new->t_rows > new->t_maxrows) new->t_rows = new->t_maxrows; if (new->t_minrows > new->t_maxrows) new->t_minrows = new->t_maxrows; } else { sp->t_minrows = sp->t_rows = IS_ONELINE(sp) ? 1 : sp->rows - 1; /* * The new screen may be a small screen, even if the parent * was not. Don't complain if O_WINDOW is too large, we're * splitting the screen so the screen is much smaller than * normal. */ new->t_minrows = new->t_rows = O_VAL(sp, O_WINDOW); if (new->t_rows > new->rows - 1) new->t_minrows = new->t_rows = IS_ONELINE(new) ? 1 : new->rows - 1; } /* Adjust the ends of the new and old maps. */ _TMAP(sp) = IS_ONELINE(sp) ? _HMAP(sp) : _HMAP(sp) + (sp->t_rows - 1); _TMAP(new) = IS_ONELINE(new) ? _HMAP(new) : _HMAP(new) + (new->t_rows - 1); /* Reset the length of the default scroll. */ if ((sp->defscroll = sp->t_maxrows / 2) == 0) sp->defscroll = 1; if ((new->defscroll = new->t_maxrows / 2) == 0) new->defscroll = 1; /* Fit the screen into the logical chain. */ vs_insert(new, sp->wp); /* Tell the display that we're splitting. */ (void)gp->scr_split(sp, new); /* * Initialize the screen flags: * * If we're in vi mode in one screen, we don't have to reinitialize. * This isn't just a cosmetic fix. The path goes like this: * * return into vi(), SC_SSWITCH set * call vs_refresh() with SC_STATUS set * call vs_resolve to display the status message * call vs_refresh() because the SC_SCR_VI bit isn't set * * Things go downhill at this point. * * Draw the new screen from scratch, and add a status line. */ F_SET(new, SC_SCR_REFORMAT | SC_STATUS | F_ISSET(sp, SC_EX | SC_VI | SC_SCR_VI | SC_SCR_EX)); return (0); } /* * vs_vsplit -- * Create a new screen, vertically. * * PUBLIC: int vs_vsplit __P((SCR *, SCR *)); */ int vs_vsplit(SCR *sp, SCR *new) { GS *gp; size_t cols; gp = sp->gp; /* Check to see if it's possible. */ if (sp->cols / 2 <= MINIMUM_SCREEN_COLS) { msgq(sp, M_ERR, "288|Screen must be larger than %d columns to split", MINIMUM_SCREEN_COLS * 2); return (1); } /* Wait for any messages in the screen. */ vs_resolve(sp, NULL, 1); /* Get a new screen map. */ CALLOC(sp, _HMAP(new), SMAP *, SIZE_HMAP(sp), sizeof(SMAP)); if (_HMAP(new) == NULL) return (1); _HMAP(new)->lno = sp->lno; _HMAP(new)->coff = 0; _HMAP(new)->soff = 1; /* * Split the screen in half; we have to sacrifice a column to delimit * the screens. * * XXX * We always split to the right... that makes more sense to me, and * I don't want to play the stupid games that I play when splitting * horizontally. * * XXX * We reserve a column for the screen, "knowing" that curses needs * one. This should be worked out with the display interface. */ cols = sp->cols / 2; new->cols = sp->cols - cols - 1; sp->cols = cols; new->coff = sp->coff + cols + 1; sp->cno = 0; /* Nothing else changes. */ new->rows = sp->rows; new->t_rows = sp->t_rows; new->t_maxrows = sp->t_maxrows; new->t_minrows = sp->t_minrows; new->roff = sp->roff; new->defscroll = sp->defscroll; _TMAP(new) = _HMAP(new) + (new->t_rows - 1); /* Fit the screen into the logical chain. */ vs_insert(new, sp->wp); /* Tell the display that we're splitting. */ (void)gp->scr_split(sp, new); /* Redraw the old screen from scratch. */ F_SET(sp, SC_SCR_REFORMAT | SC_STATUS); /* * Initialize the screen flags: * * If we're in vi mode in one screen, we don't have to reinitialize. * This isn't just a cosmetic fix. The path goes like this: * * return into vi(), SC_SSWITCH set * call vs_refresh() with SC_STATUS set * call vs_resolve to display the status message * call vs_refresh() because the SC_SCR_VI bit isn't set * * Things go downhill at this point. * * Draw the new screen from scratch, and add a status line. */ F_SET(new, SC_SCR_REFORMAT | SC_STATUS | F_ISSET(sp, SC_EX | SC_VI | SC_SCR_VI | SC_SCR_EX)); return (0); } /* * vs_insert -- * Insert the new screen into the correct place in the logical * chain. */ static void vs_insert(SCR *sp, WIN *wp) { GS *gp; SCR *tsp; gp = sp->gp; sp->wp = wp; /* Move past all screens with lower row numbers. */ for (tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (tsp->roff >= sp->roff) break; /* * Move past all screens with the same row number and lower * column numbers. */ for (; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) if (tsp->roff != sp->roff || tsp->coff > sp->coff) break; /* * If we reached the end, this screen goes there. Otherwise, * put it before or after the screen where we stopped. */ if (tsp == (void *)&wp->scrq) { CIRCLEQ_INSERT_TAIL(&wp->scrq, sp, q); } else if (tsp->roff < sp->roff || (tsp->roff == sp->roff && tsp->coff < sp->coff)) { CIRCLEQ_INSERT_AFTER(&wp->scrq, tsp, sp, q); } else CIRCLEQ_INSERT_BEFORE(&wp->scrq, tsp, sp, q); } /* * vs_discard -- * Discard the screen, folding the real-estate into a related screen, * if one exists, and return that screen. * * PUBLIC: int vs_discard __P((SCR *, SCR **)); */ int vs_discard(SCR *sp, SCR **spp) { GS *gp; SCR *tsp, **lp, *list[100]; jdir_t jdir; gp = sp->gp; /* * Save the old screen's cursor information. * * XXX * If called after file_end(), and the underlying file was a tmp * file, it may have gone away. */ if (sp->frp != NULL) { sp->frp->lno = sp->lno; sp->frp->cno = sp->cno; F_SET(sp->frp, FR_CURSORSET); } /* If no other screens to join, we're done. */ if (!IS_SPLIT(sp)) { (void)gp->scr_discard(sp, NULL); if (spp != NULL) *spp = NULL; return (0); } /* * Find a set of screens that cover one of the screen's borders. * Check the vertical axis first, for no particular reason. * * XXX * It's possible (I think?), to create a screen that shares no full * border with any other set of screens, so we can't discard it. We * just complain at the user until they clean it up. */ if (vs_join(sp, list, &jdir)) return (1); /* * Modify the affected screens. Redraw the modified screen(s) from * scratch, setting a status line. If this is ever a performance * problem we could play games with the map, but I wrote that code * before and it was never clean or easy. * * Don't clean up the discarded screen's information. If the screen * isn't exiting, we'll do the work when the user redisplays it. */ switch (jdir) { case HORIZ_FOLLOW: case HORIZ_PRECEDE: for (lp = &list[0]; (tsp = *lp) != NULL; ++lp) { /* * Small screens: see vs_refresh.c section 6a. Adjust * text line info, unless it's a small screen. * * Reset the length of the default scroll. * * Reset the map references. */ tsp->rows += sp->rows; if (!IS_SMALL(tsp)) tsp->t_rows = tsp->t_minrows = tsp->rows - 1; tsp->t_maxrows = tsp->rows - 1; tsp->defscroll = tsp->t_maxrows / 2; *(_HMAP(tsp) + (tsp->t_rows - 1)) = *_TMAP(tsp); _TMAP(tsp) = _HMAP(tsp) + (tsp->t_rows - 1); switch (jdir) { case HORIZ_FOLLOW: tsp->roff = sp->roff; vs_sm_fill(tsp, OOBLNO, P_TOP); break; case HORIZ_PRECEDE: vs_sm_fill(tsp, OOBLNO, P_BOTTOM); break; default: abort(); } F_SET(tsp, SC_STATUS); } break; case VERT_FOLLOW: case VERT_PRECEDE: for (lp = &list[0]; (tsp = *lp) != NULL; ++lp) { if (jdir == VERT_FOLLOW) tsp->coff = sp->coff; tsp->cols += sp->cols + 1; /* XXX: DIVIDER */ vs_sm_fill(tsp, OOBLNO, P_TOP); F_SET(tsp, SC_STATUS); } break; default: abort(); } /* Find the closest screen that changed and move to it. */ tsp = list[0]; if (spp != NULL) *spp = tsp; /* Tell the display that we're discarding a screen. */ (void)gp->scr_discard(sp, list); return (0); } /* * vs_join -- * Find a set of screens that covers a screen's border. */ static int vs_join(SCR *sp, SCR **listp, jdir_t *jdirp) { GS *gp; WIN *wp; SCR **lp, *tsp; int first; size_t tlen; gp = sp->gp; wp = sp->wp; /* Check preceding vertical. */ for (lp = listp, tlen = sp->rows, tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) { if (sp == tsp) continue; /* Test if precedes the screen vertically. */ if (tsp->coff + tsp->cols + 1 != sp->coff) continue; /* * Test if a subset on the vertical axis. If overlaps the * beginning or end, we can't join on this axis at all. */ if (tsp->roff > sp->roff + sp->rows) continue; if (tsp->roff < sp->roff) { if (tsp->roff + tsp->rows >= sp->roff) break; continue; } if (tsp->roff + tsp->rows > sp->roff + sp->rows) break; #ifdef DEBUG if (tlen < tsp->rows) abort(); #endif tlen -= tsp->rows; *lp++ = tsp; } if (tlen == 0) { *lp = NULL; *jdirp = VERT_PRECEDE; return (0); } /* Check following vertical. */ for (lp = listp, tlen = sp->rows, tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) { if (sp == tsp) continue; /* Test if follows the screen vertically. */ if (tsp->coff != sp->coff + sp->cols + 1) continue; /* * Test if a subset on the vertical axis. If overlaps the * beginning or end, we can't join on this axis at all. */ if (tsp->roff > sp->roff + sp->rows) continue; if (tsp->roff < sp->roff) { if (tsp->roff + tsp->rows >= sp->roff) break; continue; } if (tsp->roff + tsp->rows > sp->roff + sp->rows) break; #ifdef DEBUG if (tlen < tsp->rows) abort(); #endif tlen -= tsp->rows; *lp++ = tsp; } if (tlen == 0) { *lp = NULL; *jdirp = VERT_FOLLOW; return (0); } /* Check preceding horizontal. */ for (first = 0, lp = listp, tlen = sp->cols, tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) { if (sp == tsp) continue; /* Test if precedes the screen horizontally. */ if (tsp->roff + tsp->rows != sp->roff) continue; /* * Test if a subset on the horizontal axis. If overlaps the * beginning or end, we can't join on this axis at all. */ if (tsp->coff > sp->coff + sp->cols) continue; if (tsp->coff < sp->coff) { if (tsp->coff + tsp->cols >= sp->coff) break; continue; } if (tsp->coff + tsp->cols > sp->coff + sp->cols) break; #ifdef DEBUG if (tlen < tsp->cols) abort(); #endif tlen -= tsp->cols + first; first = 1; *lp++ = tsp; } if (tlen == 0) { *lp = NULL; *jdirp = HORIZ_PRECEDE; return (0); } /* Check following horizontal. */ for (first = 0, lp = listp, tlen = sp->cols, tsp = wp->scrq.cqh_first; tsp != (void *)&wp->scrq; tsp = tsp->q.cqe_next) { if (sp == tsp) continue; /* Test if precedes the screen horizontally. */ if (tsp->roff != sp->roff + sp->rows) continue; /* * Test if a subset on the horizontal axis. If overlaps the * beginning or end, we can't join on this axis at all. */ if (tsp->coff > sp->coff + sp->cols) continue; if (tsp->coff < sp->coff) { if (tsp->coff + tsp->cols >= sp->coff) break; continue; } if (tsp->coff + tsp->cols > sp->coff + sp->cols) break; #ifdef DEBUG if (tlen < tsp->cols) abort(); #endif tlen -= tsp->cols + first; first = 1; *lp++ = tsp; } if (tlen == 0) { *lp = NULL; *jdirp = HORIZ_FOLLOW; return (0); } return (1); } /* * vs_fg -- * Background the current screen, and foreground a new one. * * PUBLIC: int vs_fg __P((SCR *, SCR **, CHAR_T *, int)); */ int vs_fg(SCR *sp, SCR **nspp, CHAR_T *name, int newscreen) { GS *gp; WIN *wp; SCR *nsp; char *np; size_t nlen; gp = sp->gp; wp = sp->wp; if (name) INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen); else np = NULL; if (newscreen) /* Get the specified background screen. */ nsp = vs_getbg(sp, np); else /* Swap screens. */ if (vs_swap(sp, &nsp, np)) return (1); if ((*nspp = nsp) == NULL) { msgq_wstr(sp, M_ERR, name, name == NULL ? "223|There are no background screens" : "224|There's no background screen editing a file named %s"); return (1); } if (newscreen) { /* Remove the new screen from the background queue. */ CIRCLEQ_REMOVE(&gp->hq, nsp, q); /* Split the screen; if we fail, hook the screen back in. */ if (vs_split(sp, nsp, 0)) { CIRCLEQ_INSERT_TAIL(&gp->hq, nsp, q); return (1); } } else { /* Move the old screen to the background queue. */ CIRCLEQ_REMOVE(&wp->scrq, sp, q); CIRCLEQ_INSERT_TAIL(&gp->hq, sp, q); } return (0); } /* * vs_bg -- * Background the screen, and switch to the next one. * * PUBLIC: int vs_bg __P((SCR *)); */ int vs_bg(SCR *sp) { GS *gp; WIN *wp; SCR *nsp; gp = sp->gp; wp = sp->wp; /* Try and join with another screen. */ if (vs_discard(sp, &nsp)) return (1); if (nsp == NULL) { msgq(sp, M_ERR, "225|You may not background your only displayed screen"); return (1); } /* Move the old screen to the background queue. */ CIRCLEQ_REMOVE(&wp->scrq, sp, q); CIRCLEQ_INSERT_TAIL(&gp->hq, sp, q); /* Toss the screen map. */ free(_HMAP(sp)); _HMAP(sp) = NULL; /* Switch screens. */ sp->nextdisp = nsp; F_SET(sp, SC_SSWITCH); return (0); } /* * vs_swap -- * Swap the current screen with a backgrounded one. * * PUBLIC: int vs_swap __P((SCR *, SCR **, char *)); */ int vs_swap(SCR *sp, SCR **nspp, char *name) { GS *gp; WIN *wp; SCR *nsp, *list[2]; gp = sp->gp; wp = sp->wp; /* Get the specified background screen. */ if ((*nspp = nsp = vs_getbg(sp, name)) == NULL) return (0); /* * Save the old screen's cursor information. * * XXX * If called after file_end(), and the underlying file was a tmp * file, it may have gone away. */ if (sp->frp != NULL) { sp->frp->lno = sp->lno; sp->frp->cno = sp->cno; F_SET(sp->frp, FR_CURSORSET); } /* Switch screens. */ sp->nextdisp = nsp; F_SET(sp, SC_SSWITCH); /* Initialize terminal information. */ VIP(nsp)->srows = VIP(sp)->srows; /* Initialize screen information. */ nsp->cols = sp->cols; nsp->rows = sp->rows; /* XXX: Only place in vi that sets rows. */ nsp->roff = sp->roff; /* * Small screens: see vs_refresh.c, section 6a. * * The new screens may have different screen options sizes than the * old one, so use them. Make sure that text counts aren't larger * than the new screen sizes. */ if (IS_SMALL(nsp)) { nsp->t_minrows = nsp->t_rows = O_VAL(nsp, O_WINDOW); if (nsp->t_rows > sp->t_maxrows) nsp->t_rows = nsp->t_maxrows; if (nsp->t_minrows > sp->t_maxrows) nsp->t_minrows = nsp->t_maxrows; } else nsp->t_rows = nsp->t_maxrows = nsp->t_minrows = nsp->rows - 1; /* Reset the length of the default scroll. */ nsp->defscroll = nsp->t_maxrows / 2; /* Allocate a new screen map. */ CALLOC_RET(nsp, _HMAP(nsp), SMAP *, SIZE_HMAP(nsp), sizeof(SMAP)); _TMAP(nsp) = _HMAP(nsp) + (nsp->t_rows - 1); /* Fill the map. */ nsp->wp = sp->wp; if (vs_sm_fill(nsp, nsp->lno, P_FILL)) return (1); /* * The new screen replaces the old screen in the parent/child list. * We insert the new screen after the old one. If we're exiting, * the exit will delete the old one, if we're foregrounding, the fg * code will move the old one to the background queue. */ CIRCLEQ_REMOVE(&gp->hq, nsp, q); CIRCLEQ_INSERT_AFTER(&wp->scrq, sp, nsp, q); /* * Don't change the screen's cursor information other than to * note that the cursor is wrong. */ F_SET(VIP(nsp), VIP_CUR_INVALID); /* Draw the new screen from scratch, and add a status line. */ F_SET(nsp, SC_SCR_REDRAW | SC_STATUS); list[0] = nsp; list[1] = NULL; (void)gp->scr_discard(sp, list); return (0); } /* * vs_resize -- * Change the absolute size of the current screen. * * PUBLIC: int vs_resize __P((SCR *, long, adj_t)); */ int vs_resize(SCR *sp, long int count, adj_t adj) { GS *gp; WIN *wp; SCR *g, *s, *prev, *next, *list[3] = {NULL, NULL, NULL}; size_t g_off, s_off; gp = sp->gp; wp = sp->wp; /* * Figure out which screens will grow, which will shrink, and * make sure it's possible. */ if (count == 0) return (0); if (adj == A_SET) { if (sp->t_maxrows == count) return (0); if (sp->t_maxrows > count) { adj = A_DECREASE; count = sp->t_maxrows - count; } else { adj = A_INCREASE; count = count - sp->t_maxrows; } } /* Find first overlapping screen */ for (next = sp->q.cqe_next; next != (void *)&wp->scrq && (next->coff >= sp->coff + sp->cols || next->coff + next->cols <= sp->coff); next = next->q.cqe_next); /* See if we can use it */ if (next != (void *)&wp->scrq && (sp->coff != next->coff || sp->cols != next->cols)) next = (void *)&wp->scrq; for (prev = sp->q.cqe_prev; prev != (void *)&wp->scrq && (prev->coff >= sp->coff + sp->cols || prev->coff + prev->cols <= sp->coff); prev = prev->q.cqe_prev); if (prev != (void *)&wp->scrq && (sp->coff != prev->coff || sp->cols != prev->cols)) prev = (void *)&wp->scrq; g_off = s_off = 0; if (adj == A_DECREASE) { if (count < 0) count = -count; s = sp; if (s->t_maxrows < MINIMUM_SCREEN_ROWS + count) goto toosmall; if ((g = prev) == (void *)&wp->scrq) { if ((g = next) == (void *)&wp->scrq) goto toobig; g_off = -count; } else s_off = count; } else { g = sp; if ((s = next) != (void *)&wp->scrq && s->t_maxrows >= MINIMUM_SCREEN_ROWS + count) s_off = count; else s = NULL; if (s == NULL) { if ((s = prev) == (void *)&wp->scrq) { toobig: msgq(sp, M_BERR, adj == A_DECREASE ? "227|The screen cannot shrink" : "228|The screen cannot grow"); return (1); } if (s->t_maxrows < MINIMUM_SCREEN_ROWS + count) { toosmall: msgq(sp, M_BERR, "226|The screen can only shrink to %d rows", MINIMUM_SCREEN_ROWS); return (1); } g_off = -count; } } /* * Fix up the screens; we could optimize the reformatting of the * screen, but this isn't likely to be a common enough operation * to make it worthwhile. */ s->rows += -count; s->roff += s_off; g->rows += count; g->roff += g_off; g->t_rows += count; if (g->t_minrows == g->t_maxrows) g->t_minrows += count; g->t_maxrows += count; _TMAP(g) += count; F_SET(g, SC_SCR_REFORMAT | SC_STATUS); s->t_rows -= count; s->t_maxrows -= count; if (s->t_minrows > s->t_maxrows) s->t_minrows = s->t_maxrows; _TMAP(s) -= count; F_SET(s, SC_SCR_REFORMAT | SC_STATUS); /* XXXX */ list[0] = g; list[1] = s; gp->scr_discard(0, list); return (0); } /* * vs_getbg -- * Get the specified background screen, or, if name is NULL, the first * background screen. */ static SCR * vs_getbg(SCR *sp, char *name) { GS *gp; SCR *nsp; char *p; gp = sp->gp; /* If name is NULL, return the first background screen on the list. */ if (name == NULL) { nsp = gp->hq.cqh_first; return (nsp == (void *)&gp->hq ? NULL : nsp); } /* Search for a full match. */ for (nsp = gp->hq.cqh_first; nsp != (void *)&gp->hq; nsp = nsp->q.cqe_next) if (!strcmp(nsp->frp->name, name)) break; if (nsp != (void *)&gp->hq) return (nsp); /* Search for a last-component match. */ for (nsp = gp->hq.cqh_first; nsp != (void *)&gp->hq; nsp = nsp->q.cqe_next) { if ((p = strrchr(nsp->frp->name, '/')) == NULL) p = nsp->frp->name; else ++p; if (!strcmp(p, name)) break; } if (nsp != (void *)&gp->hq) return (nsp); return (NULL); } nvi-1.81.6/vi/extern.h0100444000076400001440000001275510720065712013555 0ustar skimousers/* Do not edit: automatically built by build/distrib. */ int cs_init __P((SCR *, VCS *)); int cs_next __P((SCR *, VCS *)); int cs_fspace __P((SCR *, VCS *)); int cs_fblank __P((SCR *, VCS *)); int cs_prev __P((SCR *, VCS *)); int cs_bblank __P((SCR *, VCS *)); int v_at __P((SCR *, VICMD *)); int v_chrepeat __P((SCR *, VICMD *)); int v_chrrepeat __P((SCR *, VICMD *)); int v_cht __P((SCR *, VICMD *)); int v_chf __P((SCR *, VICMD *)); int v_chT __P((SCR *, VICMD *)); int v_chF __P((SCR *, VICMD *)); int v_delete __P((SCR *, VICMD *)); int v_erepaint __P((SCR *, EVENT *)); int v_event __P((SCR *, VICMD *)); int v_again __P((SCR *, VICMD *)); int v_exmode __P((SCR *, VICMD *)); int v_join __P((SCR *, VICMD *)); int v_shiftl __P((SCR *, VICMD *)); int v_shiftr __P((SCR *, VICMD *)); int v_suspend __P((SCR *, VICMD *)); int v_switch __P((SCR *, VICMD *)); int v_tagpush __P((SCR *, VICMD *)); int v_tagpop __P((SCR *, VICMD *)); int v_filter __P((SCR *, VICMD *)); int v_exec_ex __P((SCR *, VICMD *, EXCMD *)); int v_ex __P((SCR *, VICMD *)); int v_ecl_exec __P((SCR *)); int v_increment __P((SCR *, VICMD *)); int v_screen_copy __P((SCR *, SCR *)); int v_screen_end __P((SCR *)); int v_optchange __P((SCR *, int, char *, u_long *)); int v_iA __P((SCR *, VICMD *)); int v_ia __P((SCR *, VICMD *)); int v_iI __P((SCR *, VICMD *)); int v_ii __P((SCR *, VICMD *)); int v_iO __P((SCR *, VICMD *)); int v_io __P((SCR *, VICMD *)); int v_change __P((SCR *, VICMD *)); int v_Replace __P((SCR *, VICMD *)); int v_subst __P((SCR *, VICMD *)); int v_left __P((SCR *, VICMD *)); int v_cfirst __P((SCR *, VICMD *)); int v_first __P((SCR *, VICMD *)); int v_ncol __P((SCR *, VICMD *)); int v_zero __P((SCR *, VICMD *)); int v_mark __P((SCR *, VICMD *)); int v_bmark __P((SCR *, VICMD *)); int v_fmark __P((SCR *, VICMD *)); int v_emark __P((SCR *, VICMD *)); int v_match __P((SCR *, VICMD *)); int v_paragraphf __P((SCR *, VICMD *)); int v_paragraphb __P((SCR *, VICMD *)); int v_buildps __P((SCR *, char *, char *)); int v_Put __P((SCR *, VICMD *)); int v_put __P((SCR *, VICMD *)); int v_redraw __P((SCR *, VICMD *)); int v_replace __P((SCR *, VICMD *)); int v_right __P((SCR *, VICMD *)); int v_dollar __P((SCR *, VICMD *)); int v_screen __P((SCR *, VICMD *)); int v_lgoto __P((SCR *, VICMD *)); int v_home __P((SCR *, VICMD *)); int v_middle __P((SCR *, VICMD *)); int v_bottom __P((SCR *, VICMD *)); int v_up __P((SCR *, VICMD *)); int v_cr __P((SCR *, VICMD *)); int v_down __P((SCR *, VICMD *)); int v_hpageup __P((SCR *, VICMD *)); int v_hpagedown __P((SCR *, VICMD *)); int v_pagedown __P((SCR *, VICMD *)); int v_pageup __P((SCR *, VICMD *)); int v_lineup __P((SCR *, VICMD *)); int v_linedown __P((SCR *, VICMD *)); int v_searchb __P((SCR *, VICMD *)); int v_searchf __P((SCR *, VICMD *)); int v_searchN __P((SCR *, VICMD *)); int v_searchn __P((SCR *, VICMD *)); int v_searchw __P((SCR *, VICMD *)); int v_esearch __P((SCR *, VICMD *)); int v_correct __P((SCR *, VICMD *, int)); int v_sectionf __P((SCR *, VICMD *)); int v_sectionb __P((SCR *, VICMD *)); int v_sentencef __P((SCR *, VICMD *)); int v_sentenceb __P((SCR *, VICMD *)); int v_status __P((SCR *, VICMD *)); int v_tcmd __P((SCR *, VICMD *, ARG_CHAR_T, u_int)); int v_txt __P((SCR *, VICMD *, MARK *, const CHAR_T *, size_t, ARG_CHAR_T, db_recno_t, u_long, u_int32_t)); int v_txt_auto __P((SCR *, db_recno_t, TEXT *, size_t, TEXT *)); int v_ulcase __P((SCR *, VICMD *)); int v_mulcase __P((SCR *, VICMD *)); int v_Undo __P((SCR *, VICMD *)); int v_undo __P((SCR *, VICMD *)); void v_eof __P((SCR *, MARK *)); void v_eol __P((SCR *, MARK *)); void v_nomove __P((SCR *)); void v_sof __P((SCR *, MARK *)); void v_sol __P((SCR *)); int v_isempty __P((CHAR_T *, size_t)); void v_emsg __P((SCR *, char *, vim_t)); int v_wordW __P((SCR *, VICMD *)); int v_wordw __P((SCR *, VICMD *)); int v_wordE __P((SCR *, VICMD *)); int v_worde __P((SCR *, VICMD *)); int v_wordB __P((SCR *, VICMD *)); int v_wordb __P((SCR *, VICMD *)); int v_xchar __P((SCR *, VICMD *)); int v_Xchar __P((SCR *, VICMD *)); int v_yank __P((SCR *, VICMD *)); int v_z __P((SCR *, VICMD *)); int vs_crel __P((SCR *, long)); int v_zexit __P((SCR *, VICMD *)); int vi __P((SCR **)); int v_curword __P((SCR *)); int vs_line __P((SCR *, SMAP *, size_t *, size_t *)); int vs_number __P((SCR *)); void vs_busy __P((SCR *, const char *, busy_t)); void vs_home __P((SCR *)); void vs_update __P((SCR *, const char *, const CHAR_T *)); void vs_msg __P((SCR *, mtype_t, char *, size_t)); int vs_ex_resolve __P((SCR *, int *)); int vs_resolve __P((SCR *, SCR *, int)); int vs_refresh __P((SCR *, int)); int vs_column __P((SCR *, size_t *)); size_t vs_screens __P((SCR *, db_recno_t, size_t *)); size_t vs_columns __P((SCR *, CHAR_T *, db_recno_t, size_t *, size_t *)); size_t vs_rcm __P((SCR *, db_recno_t, int)); size_t vs_colpos __P((SCR *, db_recno_t, size_t)); int vs_change __P((SCR *, db_recno_t, lnop_t)); int vs_sm_fill __P((SCR *, db_recno_t, pos_t)); int vs_sm_scroll __P((SCR *, MARK *, db_recno_t, scroll_t)); int vs_sm_1up __P((SCR *)); int vs_sm_1down __P((SCR *)); int vs_sm_next __P((SCR *, SMAP *, SMAP *)); int vs_sm_prev __P((SCR *, SMAP *, SMAP *)); int vs_sm_cursor __P((SCR *, SMAP **)); int vs_sm_position __P((SCR *, MARK *, u_long, pos_t)); db_recno_t vs_sm_nlines __P((SCR *, SMAP *, db_recno_t, size_t)); int vs_split __P((SCR *, SCR *, int)); int vs_vsplit __P((SCR *, SCR *)); int vs_discard __P((SCR *, SCR **)); int vs_fg __P((SCR *, SCR **, CHAR_T *, int)); int vs_bg __P((SCR *)); int vs_swap __P((SCR *, SCR **, char *)); int vs_resize __P((SCR *, long, adj_t));